/* Respire : site vitrine. Polices hébergées ici, aucun appel à un service tiers. */

@font-face { font-family: "Fraunces"; font-weight: 400; font-display: swap; src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }

:root {
  --ground: #EDEEE6;
  --card: #F8F8F3;
  --ink: #26332C;
  --muted: #56645C;
  --sage: #4E7363;
  --sage-dark: #3A584B;
  --ring1: #D8DFD3;
  --ring2: #C3D1C4;
  --ring3: #A9C0AF;
  --line: #D9DDD2;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito", system-ui, sans-serif;

  /* Échelle typographique fluide */
  --step--1: clamp(0.875rem, 0.86rem + 0.08vw, 0.9375rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.6rem);

  /* Échelle d'espacement */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Rayons et ombres légères */
  --radius-s: 8px;
  --radius-m: 20px;
  --radius-l: 28px;
  --shadow-s: 0 1px 2px rgb(38 51 44 / 0.06), 0 4px 14px rgb(38 51 44 / 0.06);
  --shadow-m: 0 2px 4px rgb(38 51 44 / 0.08), 0 18px 40px rgb(38 51 44 / 0.14);
  --measure: 40em;
  --ease: 160ms ease-out;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--ground);
  background-image:
    radial-gradient(48rem 34rem at 92% -6%, color-mix(in srgb, var(--sage) 20%, transparent), transparent 62%),
    radial-gradient(44rem 32rem at -8% 26%, color-mix(in srgb, var(--ring3) 26%, transparent), transparent 62%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
}
a { color: var(--sage-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- En-tête ---- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.375rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
.top nav { display: flex; gap: 20px; font-weight: 600; font-size: 0.9375rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* ---- Accroche : la question posée par l'appli, devant le cercle qui respire ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 88px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 11ch;
}
.lede { font-size: 1.1875rem; max-width: 34em; margin: 28px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
}
.btn-primary { background: linear-gradient(120deg, var(--sage), var(--sage-dark)); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-quiet { color: var(--sage-dark); box-shadow: inset 0 0 0 2px var(--ring2); }
.btn-quiet:hover { box-shadow: inset 0 0 0 2px var(--sage); color: var(--ink); }
.fine { font-size: 0.9375rem; color: var(--muted); margin-top: 16px; max-width: 34em; }

.breath {
  position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin-left: auto;
  display: grid; place-items: center;
}
.breath span { position: absolute; border-radius: 50%; animation: breathe 8s ease-in-out infinite; }
.breath .r1 { inset: 0; background: var(--ring1); }
.breath .r2 { inset: 14%; background: var(--ring2); animation-delay: -0.4s; }
.breath .r3 { inset: 30%; background: var(--ring3); animation-delay: -0.8s; }
.breath b {
  position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 8vw, 5rem); color: var(--ink);
}
.breath figcaption {
  position: absolute; bottom: -28px; left: 0; right: 0; text-align: center;
  font-size: 0.9375rem; color: var(--muted);
}
@keyframes breathe { 0%, 100% { transform: scale(0.62); } 50% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .breath span { animation: none; transform: scale(0.85); } }

/* ---- Sections ---- */
section { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
h2 {
  font-family: var(--serif); font-weight: 600; font-size: var(--step-3);
  line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--space-2); max-width: 26ch;
}
.intro { max-width: var(--measure); color: var(--muted); margin: 0 0 var(--space-5); }
.intro + .intro { margin-top: calc(-1 * var(--space-4)); }

/* Fonctions : deux colonnes de texte, la preuve en retrait sous chaque fonction */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; margin: 0; padding: 0; list-style: none; }
.features h3 { font-family: var(--serif); font-weight: 600; font-size: var(--step-2); margin: 0 0 6px; }
.features p { margin: 0; max-width: 32em; }
.features .why { margin-top: 10px; padding-left: 14px; border-left: 3px solid var(--ring2); font-size: 0.9375rem; color: var(--muted); }

/* Vie privée : un encart plein, le seul fond coloré de la page */
.privacy-box { background: var(--sage); color: #fff; border-radius: var(--radius-l); padding: var(--space-5); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; }
.privacy-box h2 { color: #fff; }
.privacy-box p { margin: 0 0 16px; }
.privacy-box ul { margin: 0; padding-left: 1.2em; }
.privacy-box li { margin-bottom: 8px; }
.privacy-box a { color: #fff; }

/* Installation : une vraie séquence, donc numérotée */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; max-width: 44em; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 56px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: inset 0 0 0 2px var(--ring2);
  font-family: var(--serif); font-weight: 600; color: var(--sage-dark);
}
.steps strong { font-weight: 700; }

details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 44em; }
details summary { cursor: pointer; font-weight: 700; font-size: 1.0625rem; list-style-position: inside; }
details p { margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.9375rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---- Page de texte (politique de confidentialité) ---- */
.doc { max-width: 42em; padding: 56px 0 72px; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 8px; }
.doc .date { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 80px; gap: 56px; }
  .breath { margin: 0 auto; max-width: 300px; }
  .features { grid-template-columns: 1fr; gap: 32px; }
  .privacy-box { grid-template-columns: 1fr; padding: 28px 24px; gap: 8px; }
  .top nav { gap: 14px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .top nav a.hide-sm { display: none; }
}

/* ---- Page « Pourquoi » : chaque règle, sa raison, et ce qui la soutient ---- */
.doc h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin: 32px 0 6px; }
.doc .proof, .doc .choice { margin: 10px 0 0; padding-left: 14px; border-left: 3px solid var(--ring2); font-size: 0.9375rem; color: var(--muted); }
.doc .choice { border-left-style: dashed; border-left-color: var(--ring3); }
.doc .proof b, .doc .choice b { color: var(--ink); font-weight: 700; }
.doc .toc { padding-left: 1.2em; columns: 2; column-gap: 32px; }
.doc .refs li { font-size: 0.9375rem; margin-bottom: 10px; }
@media (max-width: 560px) { .doc .toc { columns: 1; } }

/* ---- Accueil : sections « Pour qui », étapes et captures ---- */
.features.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); }
.features.three p { max-width: none; }

/* Captures : grille à trois colonnes, rien ne les étire.
   Le ratio vient des attributs width/height de chaque <img> (dimensions réelles du fichier),
   aucune hauteur ni aspect-ratio n'est imposé ici. Le cadre de téléphone est un simple
   box-shadow (anneau + ombre) : il ne change pas la boîte de l'image. */
.shots { align-items: start; justify-items: center; }
.shots > li { width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.shots h3 { margin-bottom: var(--space-3); text-align: center; }
.shots p { margin-top: var(--space-4); max-width: 24em; }
.shot {
  display: block; width: auto; max-width: min(300px, calc(100% - 12px)); height: auto; margin: 6px auto 0;
  border-radius: 26px; background: var(--card);
  box-shadow: 0 0 0 6px var(--ink), var(--shadow-m);
}
@media (max-width: 820px) {
  .features.three:not(.shots) { grid-template-columns: 1fr; }
  .shots { gap: var(--space-5) var(--space-3); }
  .shot { border-radius: 18px; box-shadow: 0 0 0 4px var(--ink), var(--shadow-s); }
}
@media (max-width: 600px) {
  .shots { grid-template-columns: 1fr; }
  .shot { max-width: min(240px, calc(100% - 12px)); }
}

/* ---- Navigation, boutons, focus ---- */
.top { flex-wrap: wrap; }
.top nav { flex-wrap: wrap; gap: 0 var(--space-3); }
.top nav a, footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.brand { min-height: 44px; }
.btn { transition: filter var(--ease), box-shadow var(--ease), transform var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: var(--shadow-s); }
.privacy-box :focus-visible { outline-color: #fff; }
.privacy-box a { text-decoration-thickness: 2px; }
.hero { padding-top: var(--space-6); padding-bottom: var(--space-7); }
.fine, .lede { max-width: 34em; }

/* ---- Cartes : une seule famille pour « Pour qui », « Ce que Respire ne fait pas », atelier ---- */
#for .features > li, #limits .features > li, #studio .features > li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--space-4); box-shadow: var(--shadow-s);
}
#for .features h3, #limits .features h3, #studio .features h3 { font-size: var(--step-1); line-height: 1.25; }
#limits .features, #studio .features { gap: var(--space-4); }
#studio .why { border-left: 0; padding-left: 0; font-size: var(--step-0); }
#studio .why a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.features .why { max-width: 32em; }

/* ---- Questions fréquentes ---- */
details { background: transparent; border-bottom: 1px solid var(--line); padding: 0; transition: background-color var(--ease); }
details summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 56px; padding: var(--space-2) var(--space-1); cursor: pointer; list-style: none;
  font-weight: 700; font-size: var(--step-0);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--sage-dark); border-bottom: 2px solid var(--sage-dark);
  transform: rotate(45deg); transition: transform var(--ease);
}
details[open] summary::after { transform: rotate(-135deg); }
details[open] { background: color-mix(in srgb, var(--card) 70%, transparent); }
details summary:hover { color: var(--sage-dark); }
details p { margin: 0; padding: 0 var(--space-1) var(--space-3); max-width: 38em; }
details summary:focus-visible { outline-offset: -3px; }

/* ---- Simulateur : cadre et boutons ---- */
#simulateur button { min-height: 44px; transition: filter var(--ease), color var(--ease); }
#simulateur button:hover { filter: brightness(1.08); }
#simulateur .re-tab { min-width: 44px; }

/* ---- Pied de page ---- */
footer { margin-top: var(--space-5); }
footer .wrap { align-items: center; }

/* ---- Mouvement réduit ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Mobile : 360 px ---- */
@media (max-width: 420px) {
  .hero { padding-top: var(--space-4); padding-bottom: var(--space-6); gap: var(--space-5); }
  .btn { width: 100%; }
  .privacy-box { border-radius: var(--radius-m); }
  .breath figcaption { bottom: -44px; }
  section { padding: var(--space-5) 0; }
}

/* ---- Impression (surtout la politique de confidentialité) ---- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .top nav, .actions, .breath, #simulateur, footer nav { display: none; }
  .doc { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .doc h2, .doc h3 { break-after: avoid; }
  .doc li, .doc p { break-inside: avoid; }
  section { padding: 12pt 0; }
}

/* ---- Accueil par besoins : en bref, besoins numérotés ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#brief { padding: var(--space-4) 0; }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
.rules strong { display: block; font-family: var(--serif); font-size: var(--step-1); }
.rules span { color: var(--muted); font-size: 0.9375rem; }
.need { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-3) var(--space-5); padding: var(--space-5) 0; border-top: 1px solid var(--line); align-items: start; }
.need .num { margin: 0 0 var(--space-1); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.need h3 { font-family: var(--serif); font-weight: 600; font-size: var(--step-2); line-height: 1.2; margin: 0; }
.need .body p { margin: 0 0 var(--space-3); }
.need .body ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.need .body li { margin-bottom: 8px; }
.need .body li strong { color: var(--ink); }
@media (max-width: 820px) {
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .need { grid-template-columns: 1fr; }
}

/* ---- Socle Pilmil : identité Respire ---- */
:root {
  color-scheme: light dark;
  --pm-accent: var(--sage); --pm-on-accent: #fff;
  --pm-bg: var(--ground); --pm-surface: var(--card); --pm-fg: var(--ink); --pm-muted: var(--muted); --pm-line: var(--line);
  --pm-display: var(--serif);
}
.pm-section > h2, .pm-seq h3, .pm-way h3, .pm-card h3 { font-weight: 600; }
.brand img { width: 32px; height: 32px; }
.hero > .pm-phone { justify-self: center; }
.pledges { display: flex; flex-wrap: wrap; gap: var(--space-1); list-style: none; padding: 0; margin: var(--space-4) 0 0; }
.pledges li { padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 0.875rem; font-weight: 600; }
.pm-seq > * { min-width: 0; }
.also { font-family: var(--serif); font-weight: 600; font-size: var(--step-2); margin: var(--space-4) 0 var(--space-2); }
.also-list { max-width: var(--measure); padding-left: 1.2em; margin: 0; }
.also-list li { margin-bottom: var(--space-1); }
#aller-plus-loin h2 { margin-bottom: var(--space-4); }
.after-install { max-width: var(--measure); color: var(--muted); margin: var(--space-4) 0 0; }
.pm-card ul.plain { list-style: disc; padding-left: 1.2em; margin-bottom: 0.75rem; color: var(--muted); font-size: 0.95rem; }
.pm-card ul.tech { list-style: disc; padding-left: 1.2em; margin-bottom: 0.75rem; }
.pm-card code { overflow-wrap: anywhere; font-size: 0.85em; }
.pm-card details p { padding-inline: 0; }
.doc .pm-btn { min-height: 48px; }
footer .pm-brand { margin-top: var(--space-4); padding-inline: 24px; }
/* La démo reproduit l'écran clair de l'appli, dans les deux thèmes. */
#simulateur, #simulator { --sage: #4E7363; --sage-dark: #3A584B; }

/* ---- Mode sombre ---- */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --ground: #151D18;
    --card: #1F2A23;
    --ink: #E9EEE8;
    --muted: #AEBCB2;
    --sage: #8FBBA4;
    --sage-dark: #A9CFBA;
    --ring1: #233128;
    --ring2: #33483B;
    --ring3: #456051;
    --line: #34433A;
    --pm-accent: #9DC4AF; --pm-on-accent: #10201A;
    --shadow-s: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-m: 0 12px 30px rgb(0 0 0 / 0.4);
  }
  .btn-primary { background: #9DC4AF; color: #10201A; }
  .btn-primary:hover { color: #10201A; }
  .privacy-box { background: #2F4A3C; }
  .shot { box-shadow: 0 0 0 6px #0B0F0D, var(--shadow-m); }
  html .hub, html .g-more { --g: #9DC4AF; --g-ink: #10201A; }
  html .g-card.feat { background: linear-gradient(135deg, #33503F, #22362B); color: #F0F4EE; }
}
@media screen and (prefers-color-scheme: dark) and (max-width: 820px) {
  .shot { box-shadow: 0 0 0 4px #0B0F0D, var(--shadow-s); }
}
