/* ==========================================================================
   Infertiles mais Heureux ! — Parcours d'Avent 2026
   ========================================================================== */

/* Police Nunito (variable, graisses 200 → 1000), hébergée avec le site.
   Sous-ensemble « latin » : couvre le français (é, œ, ’, €…). Licence : assets/fonts/OFL.txt */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("assets/fonts/nunito-latin.woff2") format("woff2");
}

:root {
  /* Couleurs */
  --c-fond: #634897;
  --c-violet-fonce: #390d90;
  --c-violet-clair: #e3d4ff;
  --c-blanc: #ffffff;
  --c-carte: rgba(0, 0, 0, 0.2);
  --c-vert: #1f8a4c;           /* confirmation « Lien copié » (contraste AA avec le blanc) */

  /* Halos de fond (palette de l'illustration), répartis sur toute la hauteur de la page */
  --halo-taille: clamp(280px, 70vw, 720px);   /* rayon d'un halo */
  --halo-orange:    rgba(235, 93, 43, 0.20);   /* #EB5D2B */
  --halo-turquoise: rgba(5, 124, 146, 0.24);   /* #057C92 */
  --halo-ambre:     rgba(242, 140, 27, 0.14);  /* #F28C1B */
  --halo-lavande:   rgba(139, 142, 191, 0.18); /* #8B8EBF */
  --halo-ciel:      rgba(149, 211, 226, 0.12); /* #95D3E2 */
  --halo-corail:    rgba(239, 121, 115, 0.16); /* #EF7973 */

  /* Typo — Nunito (Figma : Helvetica) */
  --f-texte: "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-default: 18px;   --lh-default: 24px;   /* default / default bold */
  --fs-sm: 14px;   --lh-sm: 18px;   /* small */
  --fs-titre: 24px;     --lh-titre: normal;   /* Section title */
  --fs-soustitre: 22px; --lh-soustitre: 26px; /* sub-title */

  /* Composants */
  --gutter: 32px;
  --radius: 16px;
  --btn-h: 46px;
  --num-size: 32px;         /* pastilles des étapes */
  --etape-gap: 12px;        /* pastille ↔ libellé */
  --etapes-gap: 16px;       /* entre deux étapes */
  --carte-pad: 12px;        /* cartes couples */
  --couple-margin: 40px;
  --formule-pad: 16px;      /* cartes modalités */
  --formule-radius: 16px;
  --formule-gap: 16px;
  --modalites-gap: 20px;
  --icon-size: 24px;
  --puce-indent: 27px;

  /* Habillage de fond */
  --hab-scale: 1;
  --hab-top: 0px;
  --hab-dx: -25.91px;

  /* Largeurs max */
  --section-max: 600px;
  --accueil-max: 800px;
}

/* ---------- Tablette ---------- */
@media (min-width: 768px) {
  :root {
    --fs-default: 20px;   --lh-default: 28px;
    --fs-sm: 16px;   --lh-sm: 20px;
    --fs-titre: 28px;     --lh-titre: 40px;
    --fs-soustitre: 28px; --lh-soustitre: 32px;
    --btn-h: 56px;
    --num-size: 40px;
    --etape-gap: 16px;
    --etapes-gap: 28px;
    --carte-pad: 16px;
    --couple-margin: 80px;
    --formule-pad: 20px;
    --formule-radius: 20px;
    --formule-gap: 20px;
    --modalites-gap: 24px;
    --icon-size: 26px;
    --puce-indent: 30px;
    --hab-scale: 1.4812;
    --hab-top: -19px;
    --hab-dx: 0px;
    --section-max: 800px;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 1200px) {
  :root {
    --fs-default: 24px;   --lh-default: 32px;
    --fs-sm: 18px;   --lh-sm: 22px;
    --fs-titre: 32px;     --lh-titre: 40px;
    --fs-soustitre: 32px; --lh-soustitre: 36px;
    --btn-h: 64px;
    --num-size: 46px;
    --etape-gap: 20px;
    --carte-pad: 24px;
    --couple-margin: 120px;
    --formule-pad: 24px;
    --formule-radius: 24px;
    --formule-gap: 24px;
    --icon-size: 28px;
    --puce-indent: 36px;
    --hab-scale: 1.4824;
    --hab-top: 29px;
    --hab-dx: -24px;
    --section-max: 950px;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  /* Fond violet + halos de couleur très légers. Les positions verticales (%)
     se rapportent à toute la hauteur de la page : les halos défilent avec le contenu. */
  background-color: var(--c-fond);
  background-image:
    radial-gradient(circle var(--halo-taille) at 95% 6%,  var(--halo-orange),    transparent 70%),
    radial-gradient(circle var(--halo-taille) at 0% 20%,  var(--halo-turquoise), transparent 70%),
    radial-gradient(circle var(--halo-taille) at 100% 33%, var(--halo-ambre),    transparent 70%),
    radial-gradient(circle var(--halo-taille) at 5% 47%,  var(--halo-lavande),   transparent 70%),
    radial-gradient(circle var(--halo-taille) at 95% 60%, var(--halo-corail),    transparent 70%),
    radial-gradient(circle var(--halo-taille) at 0% 74%,  var(--halo-ciel),      transparent 70%),
    radial-gradient(circle var(--halo-taille) at 100% 88%, var(--halo-turquoise), transparent 70%),
    radial-gradient(circle var(--halo-taille) at 10% 99%, var(--halo-orange),    transparent 70%);
  background-repeat: no-repeat;
  color: var(--c-blanc);
  font-family: var(--f-texte);
  font-size: var(--fs-default);
  line-height: var(--lh-default);
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul { margin: 0; }
[hidden] { display: none !important; }
strong { font-weight: 700; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--c-blanc);
  outline-offset: 3px;
}

/* ---------- Habillage de fond ---------- */
/* Conteneur = boîte du calque Figma tourné (783×847 en mobile), mis à l'échelle
   en tablette/desktop ; l'export SVG (697×675) y est calé à 86,3 px. */
.habillage {
  position: absolute;
  top: var(--hab-top);
  left: calc(50% + var(--hab-dx));
  width: 783px;
  height: 847px;
  transform: translateX(-50%) scale(var(--hab-scale));
  transform-origin: top center;
  pointer-events: none;
  z-index: 0;
}
.habillage__shape {
  position: absolute;
  left: 86.3px;
  top: 86.3px;
  display: block;
  max-width: none;
}

.page { position: relative; z-index: 1; }

/* ---------- Sections ---------- */
.section {
  width: 100%;
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 60px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  /* Chaque section occupe au moins un écran ; le contenu garde sa hauteur
     naturelle (« hug ») et se centre verticalement dans l'espace restant. */
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
}
.section > * { width: 100%; }
.section > .btn { width: 100%; }

.section--accueil { max-width: var(--accueil-max); gap: 0; }
.section--presentation { padding-top: 40px; }

/* ---------- Typo ---------- */
.titre {
  font-size: var(--fs-titre);
  line-height: var(--lh-titre);
  font-weight: 700;
}
.texte p + p { margin-top: 8px; }

/* ---------- Accueil ---------- */
/* h1 = logo + accroche (le texte du h1 porte les mots-clés) */
.titre-principal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: inherit;            /* même espacement que la section d'accueil */
  font-size: inherit;
  font-weight: inherit;
}
.logo {
  display: block;
  width: 321px;
  max-width: 100%;
  height: auto;
}

.accroche {
  display: block;
  width: 100%;
  position: relative;
  padding-top: 60px;
  font-size: var(--fs-soustitre);
  line-height: var(--lh-soustitre);
  font-weight: 700;
  text-align: center;
}

.accroche__ligne { display: block; }

.illustration {
  width: 364px;
  max-width: calc(100% + 2 * (var(--gutter) - 10.5px)); /* déborde légèrement, comme dans Figma */
  margin-inline: calc(-1 * (var(--gutter) - 10.5px));
}
.illustration img { display: block; width: 100%; height: auto; }

.section--accueil .btn { margin-top: 40px; }
.section--accueil .btn--accueil-faq { margin-top: 16px; }

/* Décors : positions reprises de Figma, calées sur le centre du bloc d'accroche */
.deco { position: absolute; display: block; height: auto; pointer-events: none; }
.deco--croix  { width: 45.76px; left: calc(50% - 167.5px); top: 114.7px; transform: rotate(-20deg); }
.deco--etoile { width: 43.23px; left: calc(50% + 127.9px); top: 9.1px; }

@media (min-width: 768px) {
  .section--accueil { padding-top: 100px; gap: 24px; }
  .logo { width: 400px; }
  .accroche { padding-top: 80px; }
  .accroche__ligne + .accroche__ligne { margin-top: 8px; }
  .illustration { width: 652px; max-width: 100%; margin-inline: 0; }
  .section--accueil .btn { margin-top: 16px; }
  .section--accueil .btn--accueil-faq { margin-top: 8px; }
  .deco--croix  { width: 91.93px; left: calc(50% - 292px);  top: 179.5px; }
  .deco--etoile { width: 82.09px; left: calc(50% + 220.2px); top: -46.7px; }
}
@media (min-width: 1200px) {
  .section--accueil { gap: 8px; }
  .logo { width: 593px; }
  .illustration { width: 735px; }
  .deco--croix  { width: 91.93px;  left: calc(50% - 358.5px); top: 213px; }
  .deco--etoile { width: 115.54px; left: calc(50% + 310px); top: 0; }
}

/* ---------- Boutons (composant Figma « Button » : solid / light) ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  height: var(--btn-h);
  padding: 12px 60px;
  align-self: center;
  background: var(--c-blanc);
  color: var(--c-violet-fonce);
  border-radius: 60px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25); background: var(--c-violet-clair); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25); }

.btn--light {
  background: none;
  color: var(--c-blanc);
  box-shadow: none;
}
.btn--light:hover { box-shadow: none; text-decoration: underline; background: transparent; }
.btn--light:active { box-shadow: none; }

/* Bouton avec icône (ex. Instagram) : icône à gauche du texte */
.btn--icone { gap: 12px; padding-inline: 24px; }
.btn__icone {
  flex: none;
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
}
.btn--icone:hover span { text-decoration: underline; }
.btn--icone:hover { text-decoration: none; }

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.actions .btn { width: 100%; }

/* ---------- Étapes ---------- */
.etapes {
  list-style: none;
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: var(--etapes-gap);
}
.etape {
  display: flex;
  align-items: center;
  gap: var(--etape-gap);
  min-height: 36px;
}
.etape:nth-child(2) { padding-left: 12px; }
.etape:nth-child(3) { padding-left: 24px; }
.etape:nth-child(4) { padding-left: 36px; }
.etape__num {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--num-size);
  height: var(--num-size);
  border-radius: 999px;
  background: var(--c-violet-clair);
  color: var(--c-violet-fonce);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
}

/* ---------- Deux temps (En couple / En groupe) ---------- */
.temps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--c-violet-clair);
  color: var(--c-violet-fonce);
  white-space: nowrap;
}

/* ---------- Modalités (composant Figma « Frame 46 ») ---------- */
.formules {
  display: flex;
  flex-direction: column;
  gap: var(--formule-gap);
}
.formule {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: var(--formule-pad);
  border-radius: var(--formule-radius);
  background: var(--c-carte);
}
.formule__titre {
  font-size: var(--fs-soustitre);
  line-height: var(--lh-soustitre);
  font-weight: 700;
}



@media (min-width: 768px) {
  .formules { flex-direction: row; align-items: flex-start; }
  .formule { flex: 1 1 0; min-width: 0; }
}

.modalites {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--modalites-gap);
}
.modalite,
.modalite__ligne {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.modalite--dates { flex-direction: column; gap: 12px; }
.modalite--note { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--c-violet-clair); }
.modalite__ligne { align-items: center; }

.icon {
  flex: none;
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
}

.dates { padding-left: var(--puce-indent); list-style: disc; }

/* ---------- Accordéons (couples + FAQ) ---------- */
.accordion__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.accordion__trigger > span { flex: 1 1 0; min-width: 0; }

.chevron {
  flex: none;
  display: block;
  width: 24px;
  height: 24px;
  transition: transform 0.25s ease;
}
.accordion.is-open .chevron { transform: rotate(180deg); }

/* Titres h3 autour des boutons d'accordéon : neutres visuellement */
.accordion__heading { font-size: inherit; line-height: inherit; font-weight: inherit; }

/* Animation hauteur : grille 0fr -> 1fr */
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.accordion.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__inner { overflow: hidden; min-height: 0; }

/* Cartes couples (composant Figma « Thumbnail ») — décalées en quinconce */
.couples { display: flex; flex-direction: column; gap: 32px; }
.couple {
  background: var(--c-carte);
  border-radius: var(--radius);
}
.couple .accordion__inner p { padding: var(--carte-pad); padding-top: 0;color: var(--c-violet-clair); }
.couple .accordion__trigger { padding: var(--carte-pad); }
.couple--gauche { margin-right: var(--couple-margin); }
.couple--droite { margin-left: var(--couple-margin); }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq__item { scroll-margin-top: 24px; } /* marge en haut quand un lien y fait défiler */
.faq__item .accordion__trigger { padding: 12px 0; }
.faq__item .accordion__inner p { color: var(--c-violet-clair); }
.faq__item .accordion__inner p:last-child { padding-bottom: 16px; }
.faq__item .accordion__inner p + p { margin-top: 8px; }

/* ---------- Partage ---------- */
.section--partage { min-height: initial; padding-top: 100px; padding-bottom: 100px; }
.flyers {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.flyers a { text-decoration: underline; text-underline-offset: 3px; }
.flyers a:hover { color: var(--c-violet-clair); }

/* Bouton « Partager » : état « Lien copié » (ordinateur) */
.btn.is-copied,
.btn.is-copied:hover {
  background: var(--c-vert);
  color: var(--c-blanc);
}
button.btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* Texte lu uniquement par les lecteurs d'écran */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Contact / légal ---------- */
.section--legal {
  min-height: 0; /* pied de page : hauteur du contenu uniquement */
  position: relative;
  z-index: 1;
  gap: 60px;
}
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
}
.contact p { width: 100%; }
.contact .btn { width: 100%; }
.mentions {
  text-align: center;
  text-decoration: none;
}
.mentions:hover { text-decoration: underline; }

/* ---------- Petits écrans ---------- */
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .btn { padding-inline: 24px; }
}

/* ==========================================================================
   Écrans peu hauts — Accueil en deux colonnes (paysage : Mac, tablette et
   mobile à l'horizontale). En portrait peu haut : version compacte.

     ┌──────────────────┬──────────────────────────┐
     │                  │ Logo                     │
     │  Illustration    │ Parcours d'Avent 2026…   │
     │                  │ [ Découvrir ]            │
     └──────────────────┴──────────────────────────┘
   ========================================================================== */
@media (orientation: landscape) and (min-width: 568px) and (max-height: 1150px) {
  .section--accueil {
    max-width: min(1280px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;     /* titre (logo + accroche), bouton, lien FAQ */
    align-content: center;
    column-gap: clamp(24px, 5vw, 96px);
    row-gap: 0;
    padding-top: clamp(16px, 5svh, 72px);
    padding-bottom: clamp(16px, 5svh, 72px);
  }

  /* Forme violette de fond : centrée dans l'écran d'accueil, taille liée à la hauteur.
     Le conteneur garde les proportions du calque Figma (783 × 847) ; la forme y est
     calée en pourcentages (86,3 / 697 / 675 px ramenés à cette boîte). */
  .habillage {
    --hab-h: 96svh;                         /* forme visible ≈ 76 % de la hauteur d'écran */
    top: 50svh;
    left: 50%;
    width: calc(var(--hab-h) * 783 / 847);
    height: var(--hab-h);
    transform: translate(-50%, -50%);
  }
  .habillage__shape {
    left: 11.02%;
    top: 10.19%;
    width: 89.02%;
    height: 79.69%;
  }

  /* Colonne de gauche : l'illustration, sur toute la hauteur */
  .illustration {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: center;
    width: 100%;
    max-width: min(100%, 100svh);           /* illustration ≈ 75 % de la hauteur */
    margin: 0;
  }

  /* Colonne de droite : logo + accroche (le h1), puis le bouton — alignés à gauche */
  .titre-principal {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    align-items: flex-start;
    gap: clamp(8px, 3svh, 40px);
  }
  .logo { max-width: min(100%, 48svh); }    /* logo ≈ 16 % de la hauteur */
  .accroche {
    padding-top: 0;
    text-align: left;
    font-size: clamp(20px, 5.6svh, var(--fs-soustitre));
    line-height: 1.2;
  }
  .section--accueil .btn {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    width: 100%;
    max-width: 400px;
    margin-top: clamp(16px, 4svh, 48px);
  }
  .section--accueil .btn--accueil-faq {
    grid-row: 3;
    margin-top: clamp(4px, 1.5svh, 16px);
  }

  /* Décors : étoile à droite du logo, croix sous le bouton */
  .deco--etoile { width: clamp(28px, 8svh, 116px); right: auto; left: calc(min(100%, 48svh) + clamp(12px, 3svh, 40px)); top: -80%; }  /* juste à droite du logo */
  .deco--croix  { width: clamp(24px, 7svh, 92px);  left: auto; right: 10%; top: calc(100% + clamp(70px, 16svh, 170px)); }
}

/* Mobile à l'horizontale : bouton à taille « mobile » */
@media (orientation: landscape) and (max-height: 480px) {
  .section--accueil .btn { height: 44px; font-size: 18px; line-height: 24px; }
}

/* Portrait peu haut (ex. iPhone SE) : version compacte, même composition qu'en mobile */
@media (orientation: portrait) and (max-height: 700px) {
  .section--accueil { padding-top: clamp(16px, 5svh, 60px); padding-bottom: 16px; }
  .logo { max-width: min(100%, 48svh); }
  .accroche { padding-top: clamp(8px, 4svh, 60px); font-size: clamp(16px, 3.3svh, var(--fs-soustitre)); line-height: 1.15; }
  .illustration { max-width: min(100%, 54svh); margin-inline: auto; }
  .section--accueil .btn { margin-top: clamp(8px, 3svh, 40px); }
  .section--accueil .btn--accueil-faq { margin-top: clamp(4px, 1svh, 16px); }
}
/* ---------- Animation douce des décors de l'accueil ----------
   Étoile : va-et-vient nord-ouest ↔ sud-est. Croix : nord-est ↔ sud-ouest.
   On anime la propriété « translate » (indépendante de « transform ») :
   la rotation de -20° de la croix est conservée. */
:root {
  --deco-amplitude: 6px;     /* distance parcourue de part et d'autre */
  --deco-duree: 6s;          /* durée d'un aller (le retour prend autant) */
}
@keyframes deco-no-se {
  from { translate: calc(-1 * var(--deco-amplitude)) calc(-1 * var(--deco-amplitude)); }
  to   { translate: var(--deco-amplitude) var(--deco-amplitude); }
}
@keyframes deco-ne-so {
  from { translate: var(--deco-amplitude) calc(-1 * var(--deco-amplitude)); }
  to   { translate: calc(-1 * var(--deco-amplitude)) var(--deco-amplitude); }
}
.deco--etoile { animation: deco-no-se var(--deco-duree) ease-in-out infinite alternate; }
.deco--croix  { animation: deco-ne-so calc(var(--deco-duree) * 1.25) ease-in-out infinite alternate; }

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  .deco--etoile, .deco--croix { animation: none; }
}
