/* ==========================================================================
   Sections 13 à 17 : tarifs, mot du fondateur (masqué), questions, dernier appel, pied de page.
   D'après les planches Page-{1440,390}-3 (section 13) et -4 (sections 14 à 17) et le prototype Proto-Tarifs-{1440,390}
   (docs/design/site-vitrine/maquette/), reprises avec les jetons du site (D5, D11).
   S'appuie sur sections-a.css (.section-a, .entete-section, .pastille-titre).
   Mobile d'abord ; deux colonnes dès 800 px ; le sentier passe sur le côté dès 1300 px (bornes en bas du fichier).
   États animés : posés par js/tarifs.js, js/dernier.js. Sans JS, en pause ou en mouvement réduit : états finaux,
   rien ne bouge (bloc « Mouvement réduit » avant les bornes).
   ========================================================================== */

.section-d { padding-top: var(--e7); }

/* Sur téléphone (et jusqu'à 1299 px), le sentier passe au centre, derrière les blocs de texte : ils ont le fond de la page */
@media (max-width: 1299px) {
  .tarifs .entete-section, .tarifs__notes p, .questions .entete-section, .fondateur__grille { background: var(--creme); }
}


/* ==========================================================================
   13 · Tarifs
   ========================================================================== */
/* Interrupteur mensuel / annuel : la pastille verte glisse (250 ms, ressort doux) */
.inter {
  position: relative; display: flex; width: 100%; max-width: 420px; margin: 22px auto 0; padding: 4px;
  border-radius: var(--r-pastille); background: var(--sable);
}
.inter__pastille {
  position: absolute; left: 4px; top: 4px; height: 48px; width: calc((100% - 8px) / 2);
  border-radius: var(--r-pastille); background: var(--vert-action);
  transition: transform 250ms var(--courbe-ressort), width 250ms var(--courbe-ressort);
}
.inter[data-periode="annuel"] .inter__pastille { transform: translateX(100%); }
.inter__option {
  position: relative; z-index: 1; flex: 1; min-width: 0; height: 48px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--r-pastille); background: transparent; color: var(--encre-douce);
  font: 600 1.0625rem/1 var(--police-titre); cursor: pointer;
  transition: color var(--duree-micro) var(--courbe-sortie);
}
.inter__option:hover { color: var(--encre); }
.inter__option[aria-checked="true"] { color: #fff; }
.inter__option .inter__coche { display: none; width: 18px; height: 18px; }   /* plus précis que .section-a .ic */
.inter__option[aria-checked="true"] .inter__coche { display: block; }
.inter__reduc {
  display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: var(--r-pastille);
  background: var(--ambre); color: var(--vert-nuit); font: 700 0.75rem/1 var(--police-texte); white-space: nowrap;
}
@media (max-width: 379px) {
  .inter__option { gap: 4px; padding: 0 4px; font-size: 1rem; }
  .inter__coche { display: none !important; }
}

.tarifs__cartes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 960px; margin: 20px auto 0; }

.offre { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px 20px; border-radius: 24px; }
.offre h3 { font-size: 1.5rem; line-height: 1.2; }
.offre--gratuit { background: var(--papier); border: 1.5px solid var(--filet); }
.offre--premium {
  background: var(--vert-profond); color: var(--creme);
  box-shadow: 0 0 0 4px rgba(252, 185, 1, .35), 0 24px 48px -24px rgba(0, 44, 35, .6);
}
.offre--premium h3 { color: var(--creme); }
.offre__tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offre__offerts {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 7px; border-radius: var(--r-pastille);
  background: var(--ambre); color: var(--vert-nuit); font: 700 0.75rem/1 var(--police-texte); white-space: nowrap;
}
.offre__offerts .ic { width: 17px; height: 17px; }

.offre__prix { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; white-space: nowrap; }
.offre__nombre { font: 600 2.5rem/1 var(--police-titre); color: var(--vert-nuit); }
.offre--premium .offre__nombre { color: var(--ambre); }
.offre__unite { font: 600 1.125rem/1 var(--police-titre); }
.offre__sous { margin-top: 6px; font: 700 0.875rem/1.4 var(--police-texte); color: var(--encre-douce); }

/* Les deux prix occupent la même cellule : la hauteur de la carte ne dépend pas de la période (fondu croisé 200 ms) */
.prix-zone { display: grid; }
.prix {
  grid-area: 1 / 1; opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--courbe-sortie), visibility 0s linear 200ms;
}
.prix.est-actif { opacity: 1; visibility: visible; transition: opacity 200ms var(--courbe-sortie), visibility 0s; }
.prix__ligne { margin-top: 6px; font: 700 0.9375rem/1.4 var(--police-texte); }
.prix__autre { margin-top: 2px; font: 400 0.875rem/1.4 var(--police-texte); color: var(--gris-clair); }

.offre__liste { flex: 1; list-style: none; margin: 14px 0 0; padding: 0; }
.ligne {
  display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--sable);
  font: 400 0.9375rem/1.4 var(--police-texte);
}
.ligne .ic { width: 22px; height: 22px; color: var(--vert-action); }
.offre--premium .ligne { border-color: var(--vert-foret); }
.offre--premium .ligne .ic { color: var(--ambre); }
.ligne--non { color: var(--encre-douce); }
.ligne--non .ic { color: var(--gris-clair); }

.offre__bouton {
  display: flex; align-items: center; justify-content: center; gap: var(--e2);
  min-height: 52px; margin-top: 18px; border-radius: var(--r-pastille); box-sizing: border-box;
  font: 600 1.0625rem/1 var(--police-titre); text-decoration: none; cursor: pointer;
  transition: background var(--duree-micro) var(--courbe-sortie), transform 150ms var(--courbe-sortie);
}
.offre__bouton .ic { width: 22px; height: 22px; }
.offre__bouton:active { transform: translateY(2px); }
.offre__bouton--trait { border: 2px solid var(--vert-action); color: var(--vert-action); }
.offre__bouton--trait:hover { background: var(--vert-pale); color: var(--vert-nuit); }
.offre__bouton--ambre { background: var(--ambre); color: var(--vert-nuit); }
.offre__bouton--ambre:hover { background: var(--orange); color: var(--vert-nuit); }

.tarifs__notes { display: grid; gap: 12px; max-width: 960px; margin: 20px auto 0; }
.tarifs__notes p { display: flex; gap: 10px; font: 400 0.875rem/1.55 var(--police-texte); color: var(--encre-douce); }
.tarifs__notes .ic { width: 22px; height: 22px; color: var(--vert-action); }

.fondatrices {
  display: flex; align-items: flex-start; gap: 14px; max-width: 960px; margin: 20px auto 0; padding: 18px;
  border-radius: 20px; background: var(--ambre-pale);
}
.fondatrices__rond {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ambre); color: var(--vert-nuit);
}
.fondatrices__rond .ic { width: 26px; height: 26px; }
.fondatrices h3 { font-size: 1.1875rem; line-height: 1.2; }
.fondatrices p { margin-top: 4px; font-size: 0.9375rem; line-height: 1.5; color: var(--encre); }

/* La carte Premium respire doucement : halo qui s'élargit et revient, échelle 1 → 1,01, boucle de 6 s */
@keyframes tarifsRespire {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(252, 185, 1, .35), 0 24px 48px -24px rgba(0, 44, 35, .6); }
  50% { transform: scale(1.01); box-shadow: 0 0 0 10px rgba(252, 185, 1, .16), 0 28px 56px -24px rgba(0, 44, 35, .6); }
}
.offre--premium { animation: tarifsRespire 6s ease-in-out infinite; }
.offre--premium:hover { animation-play-state: paused; }

@media (min-width: 800px) {
  .inter { display: inline-flex; width: auto; max-width: none; margin-top: 28px; }
  .inter__pastille { height: 52px; width: 156px; }
  .inter[data-periode="annuel"] .inter__pastille { width: 200px; transform: translateX(156px); }
  .inter__option { flex: none; height: 52px; font-size: 1.125rem; }
  .inter__option[data-choix="mensuel"] { width: 156px; padding: 0 14px; }
  .inter__option[data-choix="annuel"] { width: 200px; padding: 0 12px; }
  .inter__coche { width: 20px; height: 20px; }
  .inter__reduc { height: 26px; padding: 0 8px; font-size: 0.8125rem; }

  .tarifs__cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e5); margin-top: 36px; align-items: stretch; }
  .offre { padding: var(--e6); border-radius: var(--r-grand); }
  .offre h3 { font-size: 1.625rem; }
  .offre__prix { margin-top: 10px; }
  .offre__nombre { font-size: 3rem; }
  .offre__unite { font-size: 1.25rem; }
  .offre__offerts { height: 30px; padding: 0 12px 0 8px; font-size: 0.8125rem; }
  .offre__offerts .ic { width: 18px; height: 18px; }
  .offre__sous { margin-top: 6px; }
  .offre--gratuit .offre__liste { margin-top: 22px; }
  .offre--premium .offre__liste { margin-top: 16px; }
  .ligne { padding: 10px 0; }
  .offre__bouton { min-height: 56px; margin-top: var(--e5); font-size: 1.125rem; }

  .tarifs__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e5); margin-top: var(--e5); }
  .tarifs__notes p { font-size: 0.9375rem; }
  .fondatrices { align-items: center; gap: 18px; margin-top: 28px; padding: 22px 28px; border-radius: var(--e5); }
  .fondatrices__rond { width: 56px; height: 56px; }
  .fondatrices__rond .ic { width: 30px; height: 30px; }
  .fondatrices h3 { font-size: 1.375rem; }
  .fondatrices p { font-size: 1rem; }
}

/* ==========================================================================
   14 · Le mot du fondateur (dans un <template> tant que le texte de Yassin manque, D7)
   ========================================================================== */
.fondateur__grille { display: grid; gap: var(--e4); max-width: 840px; margin: 0 auto; }
.fondateur__rond {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--ambre); color: var(--vert-nuit); font: 600 2.25rem/1 var(--police-titre); box-shadow: 0 0 0 6px var(--ambre-pale);
}
.fondateur h2 { margin-top: 14px; font-size: 1.875rem; }
.fondateur__texte {
  margin-top: 14px; padding: 18px; border: 2px dashed var(--filet); border-radius: 18px; background: var(--papier);
  font-size: 1rem; line-height: 1.6; color: var(--encre-douce);
}
.fondateur__nom { margin-top: 12px; font: 600 1.125rem/1.2 var(--police-titre); color: var(--vert-nuit); }
@media (min-width: 800px) {
  .fondateur__grille { grid-template-columns: 120px minmax(0, 1fr); gap: 40px; align-items: start; }
  .fondateur__rond { width: 120px; height: 120px; font-size: 3.5rem; box-shadow: 0 0 0 8px var(--ambre-pale); }
  .fondateur h2 { margin-top: 18px; font-size: 2.5rem; }
  .fondateur__texte { padding: 22px 24px; border-radius: var(--r-carte); font-size: 1.1875rem; }
  .fondateur__nom { margin-top: 16px; font-size: 1.25rem; }
}

/* ==========================================================================
   15 · Questions : accordéon <details name="faq">
   ========================================================================== */
.conteneur--etroit { max-width: 960px; }
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: var(--e5); interpolate-size: allow-keywords; }
.q { border-radius: 18px; background: var(--papier); box-shadow: var(--ombre-carte); }
.q summary {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box; min-height: 60px; padding: 8px 12px 8px 18px;
  border-radius: 18px; cursor: pointer; list-style: none;
  font: 600 1.0625rem/1.3 var(--police-titre); color: var(--vert-nuit);
}
.q summary::-webkit-details-marker { display: none; }
.q__chevron {
  display: grid; place-items: center; flex: none; margin-left: auto; width: 36px; height: 36px; border-radius: 50%;
  background: var(--sable); color: var(--vert-action); transition: transform var(--duree-micro) var(--courbe-sortie);
}
.q__chevron .ic { width: 22px; height: 22px; }
.q[open] .q__chevron { transform: rotate(180deg); }
.q__reponse { margin: 0; padding: 0 18px 18px; font-size: 0.9375rem; line-height: 1.55; color: var(--encre-douce); }
/* Ouverture douce (hauteur, 250 ms) là où le navigateur sait animer le contenu d'un <details> ; ailleurs, elle est instantanée */
.q::details-content { block-size: 0; overflow: clip; transition: block-size 250ms var(--courbe-sortie), content-visibility 250ms allow-discrete; }
.q[open]::details-content { block-size: auto; }
@media (min-width: 800px) {
  .faq { gap: 12px; margin-top: 40px; }
  .q { border-radius: var(--r-carte); }
  .q summary { min-height: 68px; gap: 16px; padding: 0 20px 0 24px; border-radius: var(--r-carte); font-size: 1.25rem; }
  .q__chevron { width: 40px; height: 40px; }
  .q__reponse { padding: 0 72px 22px 24px; font-size: 1.0625rem; line-height: 1.6; }
}

/* ==========================================================================
   16 · Dernier appel : nuit verte, croissant, étoiles qui s'allument
   ========================================================================== */
.dernier { padding-top: 150px; background: var(--vert-nuit); color: var(--creme); text-align: center; }
/* Avec le sentier (js/chemin.js), la nuit est dessinée dans son calque, sous la bande : la section reste transparente */
html.chemin-actif .dernier { background: transparent; }
.dernier__contenu { position: relative; }
.dernier h2 { font-size: clamp(2.375rem, 1.864rem + 2.095vw, 3.75rem); line-height: 1.1; color: var(--creme); }
.dernier h2 .accent { color: var(--ambre); }
.dernier__texte { max-width: 600px; margin: 14px auto 0; font-size: var(--t-base); line-height: 1.5; color: var(--gris-clair); text-wrap: pretty; }
.dernier__stores { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e3) var(--e5); margin-top: 28px; }
.dernier__iphone { display: inline-flex; align-items: center; min-height: var(--cible); font: 600 1rem/1.2 var(--police-titre); color: var(--creme); }
.dernier__qr { display: none; align-items: center; gap: 18px; margin-top: 32px; text-align: left; }
.dernier__qr img { width: 120px; height: 120px; flex: none; border-radius: 16px; }
.dernier__qr p { max-width: 250px; font-size: 0.9375rem; line-height: 1.5; color: var(--gris-clair); }
.dernier__qr strong { color: var(--creme); font-weight: 700; }
@media (min-width: 900px) {
  .dernier__texte { margin-top: 18px; font-size: var(--t-grand); }
  .dernier__stores { margin-top: 36px; }
  .dernier__qr { display: inline-flex; }
}

/* Ciel : chaque élément a deux positions (téléphone : --mx/--my/--t, seulement ceux marqués --m ; ordinateur : --dx/--dy/--td) */
.ciel { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ciel__e { position: absolute; display: none; left: var(--mx); top: var(--my); width: var(--t); height: var(--t); opacity: var(--o, 1); }
.ciel__e--m { display: block; }
.ciel__e svg { display: block; width: 100%; height: 100%; }
.ciel__e--ambre { color: var(--ambre); }
.ciel__e--creme { color: var(--creme); }
.ciel__e--croissant { color: var(--ambre); }
.ciel__e--point { border-radius: 50%; background: var(--gris-clair); }
@media (min-width: 900px) {
  .ciel__e { display: block; left: var(--dx); top: var(--dy); width: var(--td); height: var(--td); }
}

/* Allumage : opacité et échelle (0,3 → 1 et ×0,6 → 1), 400 ms, ressort doux, 150 ms d'écart ; sur téléphone, deux groupes */
.ciel__e { transition: opacity 400ms var(--courbe-ressort) calc(var(--g, 0) * 250ms), transform 400ms var(--courbe-ressort) calc(var(--g, 0) * 250ms); }
@media (min-width: 900px) {
  .ciel__e { transition-delay: calc(var(--i, 0) * 150ms), calc(var(--i, 0) * 150ms); }
}
.dernier.est-prete .ciel__e { opacity: 0.3; transform: scale(.6); }
.dernier.est-prete.est-allumee .ciel__e { opacity: var(--o, 1); transform: none; }
.dernier.est-prete .ciel__e--croissant { opacity: 0; }
.dernier.est-prete.est-allumee .ciel__e--croissant { opacity: 1; }

/* Puis scintillement lent (4 à 8 s) ; le croissant flotte de ±6 px (8 s) */
@keyframes cielScintille { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes cielFlotte { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
html.js .ciel__e--etoile svg { animation: cielScintille var(--d, 6s) ease-in-out infinite; }
html.js .ciel__e--croissant svg { animation: cielFlotte 8s ease-in-out infinite; }

/* ==========================================================================
   17 · Pied de page (le gabarit est dans gabarit.css) : filet léger entre la nuit et le pied
   ========================================================================== */
main + .pied { border-top: 1px solid rgba(252, 245, 237, .2); }
@media (max-width: 899px) {
  main + .pied { padding-top: var(--e7); padding-bottom: calc(var(--e8) + var(--cible)); }
}

/* ==========================================================================
   Mouvement réduit ou pause des animations : états finaux, rien ne bouge
   (bascule instantanée, pas de respiration, ciel déjà allumé ; la section entre avec .entree, en fondu)
   ========================================================================== */
html:is(.mouvement-reduit, .anim-pause) .offre--premium { animation: none; }
html:is(.mouvement-reduit, .anim-pause) .inter__pastille, html:is(.mouvement-reduit, .anim-pause) .inter__option,
html:is(.mouvement-reduit, .anim-pause) .prix, html:is(.mouvement-reduit, .anim-pause) .prix.est-actif { transition: none; }
html:is(.mouvement-reduit, .anim-pause) .q::details-content { transition: none; }
html:is(.mouvement-reduit, .anim-pause) .q__chevron { transition: none; }
html:is(.mouvement-reduit, .anim-pause) .ciel__e svg { animation: none; }
html:is(.mouvement-reduit, .anim-pause) .dernier .ciel__e { opacity: var(--o, 1) !important; transform: none !important; transition: none; }
html:is(.mouvement-reduit, .anim-pause) .dernier .ciel__e--croissant { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) {
  .offre--premium { animation: none; }
  .inter__pastille, .inter__option, .prix, .prix.est-actif { transition: none; }
  .q::details-content { transition: none; }
  .q__chevron { transition: none; }
  .ciel__e svg { animation: none; }
  .dernier .ciel__e { opacity: var(--o, 1) !important; transform: none !important; transition: none; }
  .dernier .ciel__e--croissant { opacity: 1 !important; }
}

/* ==========================================================================
   Bornes du chemin (voir css/chemin.css et sections-a.css).
   Jusqu'à 1299 px : une étoile au centre en bas de chaque section, le sentier passe derrière les blocs (fond de page) ;
   le dernier appel a la sienne en haut de la nuit.
   Dès 1300 px : la 13 garde le sentier à gauche (x = 48) puis le ramène au centre ; les questions le font passer à droite ;
   il entre dans la nuit à droite et finit à l'étoile d'arrivée, un peu à l'intérieur (comme la planche Page-1440-4).
   ========================================================================== */
.borne--tarifs-etoile, .borne--questions-etoile, .borne--fondateur-etoile { left: 50%; bottom: 32px; }
.borne--tarifs-sortie, .borne--questions-entree, .borne--questions-sortie, .borne--dernier-entree, .borne--fondateur-gauche { display: none; }
.borne--dernier-etoile { left: 50%; top: 84px; }

@media (min-width: 1300px) {
  .borne--tarifs-etoile { left: 48px; bottom: auto; top: 60%; }
  .borne--tarifs-sortie { display: block; left: 50%; bottom: 0; }

  .borne--fondateur-gauche { display: block; left: 48px; top: 30%; }
  .borne--fondateur-etoile { left: 50%; bottom: 0; }

  .borne--questions-entree { display: block; left: calc(100% - 48px); top: 0; }
  .borne--questions-etoile { left: calc(100% - 48px); bottom: auto; top: 55%; }
  .borne--questions-sortie { display: block; left: calc(100% - 48px); bottom: 0; }

  /* .borne--dernier-entree reste masquée : elle tomberait au même point que .borne--questions-sortie (petite boucle de la courbe) */
  .borne--dernier-etoile { left: calc(100% - 200px); top: 349px; }
}
