/* ============================================================================
 * GO — Lot F : la Famille Go, le parcours initiatique du Mycélium (29/10/2026)   build mycell-2026-10-29-2
 * Récit d'entrée, étincelles, Mon chemin, chemin du pro, Mon réseau, chiffres de la Famille.
 * Le monde « sous l'île » est sombre et lumineux (vert profond, fils clairs), jour comme nuit.
 * Animations : transform, opacity, tracé de traits ; coupées si le téléphone demande moins de mouvement.
 * ========================================================================== */

/* ─── F1 · Le récit d'entrée ─── */
.recit { position: fixed; inset: 0; z-index: 9000; display: grid; color: #ECFFF4;
  background: radial-gradient(120% 70% at 50% 40%, #0E4A33 0%, #062419 60%, #03110B 100%); animation: recit-entree .5s ease both; }
.recit.sortie { animation: recit-sortie .45s ease forwards; }
@keyframes recit-entree { from { opacity: 0; } }
@keyframes recit-sortie { to { opacity: 0; transform: scale(1.03); } }
html.recit-ouvert body { overflow: hidden; }
.recit-scene { display: grid; grid-template-rows: 1fr auto auto; height: 100%; max-width: 520px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
.recit-fils { width: min(78vw, 360px); height: auto; margin: auto; overflow: visible; }
.recit-fils path { fill: none; stroke: #7CFFB0; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px #5CFF9D);
  animation: recit-trace 1.4s cubic-bezier(.4,0,.2,1) calc(var(--i) * .12s) forwards; }
.recit-fils circle { fill: #C9FFE0; opacity: 0; transform-box: fill-box; transform-origin: center; animation: recit-point .5s ease calc(1s + var(--i) * .12s) forwards; filter: drop-shadow(0 0 6px #7CFFB0); }
.recit-fils .recit-coeur { fill: #FFFFFF; opacity: 1; animation: recit-pouls 2.4s ease-in-out infinite; }
[data-scene="0"] .recit-fils path:nth-of-type(n+4), [data-scene="0"] .recit-fils circle:not(.recit-coeur):nth-of-type(n+4) { display: none; }
@keyframes recit-trace { to { stroke-dashoffset: 0; } }
@keyframes recit-point { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes recit-pouls { 50% { transform: scale(1.25); opacity: .8; } }
.recit-fils .recit-coeur { transform-box: fill-box; transform-origin: center; }
.recit-texte { text-align: center; }
.recit-sur { margin: 0 0 6px; font: 700 var(--t-s, 14px)/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #7CFFB0; }
.recit-texte h2 { margin: 0 0 10px; font: 900 clamp(26px, 7vw, 34px)/1.15 var(--font-titre, var(--font)); color: #FFFFFF; }
.recit-texte p { margin: 0 auto; max-width: 30ch; font-size: var(--t-l, 18px); line-height: 1.45; color: rgba(236,255,244,.88); }
.recit-pied { display: grid; gap: 16px; margin-top: 22px; }
.recit-points { display: flex; justify-content: center; gap: 8px; }
.recit-points i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); transition: width .3s ease, background .3s ease; }
.recit-points i.ici { width: 24px; border-radius: 99px; background: #7CFFB0; }
.recit-bt { display: flex; gap: 10px; justify-content: center; }
.recit-bt button { min-height: 52px; padding: 0 26px; border-radius: 999px; font: 750 var(--t-m, 16px)/1 var(--font); cursor: pointer; }
.recit-passer { background: transparent; color: rgba(236,255,244,.8); border: 1px solid rgba(236,255,244,.35); }
.recit-suite { background: linear-gradient(160deg, #22C55E, #15803D); color: #fff; border: 0; box-shadow: 0 10px 26px rgba(34,197,94,.35); flex: 1; max-width: 260px; }
.recit-bt button:focus-visible { outline: 3px solid #7CFFB0; outline-offset: 3px; }

/* ─── L'étincelle (étape franchie) ─── */
.etincelle { position: fixed; z-index: 70; left: 50%; top: calc(12px + env(safe-area-inset-top)); width: min(92vw, 420px); display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 0; border-radius: 18px; text-align: left; cursor: pointer; font: inherit; color: #ECFFF4;
  background: linear-gradient(120deg, #0E4A33, #14532D); box-shadow: 0 16px 40px rgba(4,21,15,.45), inset 0 0 0 1px rgba(124,255,176,.35);
  transform: translate(-50%, -140%); opacity: 0; transition: transform .45s var(--ressort, ease), opacity .3s ease; }
.etincelle.visible { transform: translate(-50%, 0); opacity: 1; }
.etincelle span:last-child { display: flex; flex-direction: column; }
.etincelle small { color: rgba(236,255,244,.85); }
.et-eclat { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; color: #fff;
  background: radial-gradient(circle, rgba(124,255,176,.55), transparent 70%); animation: et-eclat 1.6s ease-in-out infinite; }
@keyframes et-eclat { 50% { transform: scale(1.15) rotate(15deg); } }

/* ─── Mon chemin ─── */
.chemin-depuis { margin: 0 0 12px; font-weight: 700; color: var(--ink2); }
.chemin-etapes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 0; position: relative; }
.chemin-etapes li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 0; }
.chemin-etapes li + li::before { content: ""; position: absolute; left: 21px; top: -10px; height: 20px; width: 2px; background: var(--ligne); }
.chemin-etapes li.fait + li::before { background: linear-gradient(#22C55E, var(--ligne)); }
.ch-emo { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; background: var(--carte2); border: 2px solid var(--ligne); }
.chemin-etapes li.fait .ch-emo { background: linear-gradient(160deg, #0E4A33, #15803D); border-color: #22C55E; box-shadow: 0 0 16px rgba(34,197,94,.35); }
.chemin-etapes li.ici .ch-emo { border-color: #22C55E; animation: et-eclat 2.4s ease-in-out infinite; }
.chemin-etapes li.avenir { opacity: .6; }
.chemin-etapes li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chemin-etapes small { color: var(--ink2); font-size: var(--t-s); }
.ch-ok { flex: none; color: #22C55E; font-weight: 900; }
.chemin-fin { margin: 0 0 10px; font-weight: 650; }
.chemin-saison { display: flex; align-items: center; gap: 12px; margin: 8px 0; padding: 12px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--sc) 12%, var(--carte)); border: 1px solid color-mix(in srgb, var(--sc) 35%, var(--ligne)); }
.cs-emo { font-size: 28px; }
.chemin-saison div { display: flex; flex-direction: column; } .chemin-saison small { color: var(--ink2); }
.chemin-collection { margin: 6px 0; color: var(--ink2); } .chemin-collection span { font-size: 22px; letter-spacing: 4px; }

/* ─── Chiffres de la Famille Go ─── */
.famille-chiffres { margin: 12px 0; padding: 12px 14px; border-radius: var(--r); background: linear-gradient(120deg, rgba(14,74,51,.10), rgba(34,197,94,.08)); border: 1px solid color-mix(in srgb, #22C55E 25%, var(--ligne)); }
.famille-chiffres .sur-titre { margin: 0 0 6px; }
.famille-chiffres ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.famille-chiffres li { font-size: var(--t-s); }

/* ─── Moi : la Famille Go ─── */
.famille-points { display: flex; gap: 6px; margin: 4px 0 10px; }
.famille-points span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--carte2); border: 1px solid var(--ligne); filter: grayscale(1); opacity: .5; }
.famille-points span.fait { filter: none; opacity: 1; border-color: #22C55E; background: color-mix(in srgb, #22C55E 14%, var(--carte)); }

/* ─── F4 · Le chemin du pro ─── */
.chemin-pro { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--r-l); color: #ECFFF4; background: radial-gradient(120% 140% at 0% 0%, #14532D, #062419); box-shadow: var(--ombre); }
.cp-tete h2 { margin: 0; font-size: var(--t-l); color: #fff; }
.cp-tete small { color: rgba(236,255,244,.85); }
.cp-etapes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; position: relative; }
.cp-etapes li { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; opacity: .45; }
.cp-etapes li span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(124,255,176,.25); }
.cp-etapes li b { font-size: 11px; line-height: 1.2; font-weight: 700; }
.cp-etapes li.fait { opacity: 1; } .cp-etapes li.fait span { background: rgba(34,197,94,.3); border-color: #7CFFB0; box-shadow: 0 0 12px rgba(124,255,176,.4); }
.cp-etapes li.ici { opacity: 1; } .cp-etapes li.ici span { border: 2px dashed #7CFFB0; animation: et-eclat 2.4s ease-in-out infinite; }

/* ─── F3 · Mon réseau ─── */
.mr-intro { margin: 0 0 10px; }
.mr-toile { display: grid; place-items: center; margin: 0 -4px; }
.mr-toile canvas { display: block; max-width: 100%; border-radius: 22px; box-shadow: 0 18px 40px rgba(4,21,15,.35); cursor: pointer; touch-action: manipulation; }
.mr-resume { margin: 10px 0 2px; text-align: center; font-weight: 750; }
.mr-legende { display: flex; justify-content: center; gap: 16px; margin: 4px 0 8px; color: var(--ink2); font-size: var(--t-xs); }
.mr-legende i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: #7CC; vertical-align: middle; }
.mr-legende i.coeur { width: 14px; height: 14px; background: #4ADE80; box-shadow: 0 0 8px #4ADE80; }
.mr-liste { margin: 6px 0; } .mr-liste summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.mr-liste ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; } .mr-liste small { color: var(--ink3); }

@media (prefers-reduced-motion: reduce) {
  .recit, .recit.sortie, .recit-fils path, .recit-fils circle, .recit-fils .recit-coeur, .et-eclat, .chemin-etapes li.ici .ch-emo, .cp-etapes li.ici span { animation: none; }
  .recit-fils path { stroke-dashoffset: 0; } .recit-fils circle { opacity: 1; }
  .etincelle { transition: none; }
}
html[data-mouvement="reduit"] .recit-fils path { animation: none; stroke-dashoffset: 0; }
html[data-mouvement="reduit"] .recit-fils circle { animation: none; opacity: 1; }

/* ════════════ Audit du 29/10 : stabilité de l'affichage (CLS mesuré à 0,66 sur mobile) ════════════
   Les ronds arrivent après les données : leur place est réservée. Le bandeau pro et le pied de page
   (en bas de l'accueil) restaient visibles en haut d'une page encore vide, puis sautaient : cachés jusqu'au 1er affichage. */
.stories { min-height: 112px; }
html:not(.annuaire-pret) #vue-explorer .bandeau-pro, html:not(.annuaire-pret) #vue-explorer .pied-liens, html:not(.annuaire-pret) #vue-explorer .pied-createur { display: none; }
/* Le toast passe au-dessus de la bulle panier (elle le cachait : « Connectez-vous pour continuer ») */
body:has(.toast.on) .bulle-panier { opacity: 0; pointer-events: none; }
