/* Styles propres aux jeux de la famille « cerveau » (chargés par sa page) — site/jeux/cerveau/*.js, 28/10/2026.
   Couleurs du site (variables de site/assets/style.css), grands éléments, cibles tactiles ≥ 44 px,
   et aucune animation pour qui l'a demandé (prefers-reduced-motion). Préfixe « cv- » partout. */

.cv { display: grid; gap: 12px; }
.cv-entete { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; color: var(--doux); }
.cv-entete b { color: var(--texte); font-size: 1.05rem; }
.cv-vies { font-size: 1rem; letter-spacing: 1px; }
.cv-barre { height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.cv-barre i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--p-clair), var(--p)); border-radius: 99px; transition: width .35s ease; }
.cv-consigne { text-align: center; font-weight: 700; font-size: 1.05rem; min-height: 1.7em; line-height: 1.45; }
.cv-consigne.cv-ok { color: var(--vert); }
.cv-consigne.cv-ko { color: var(--rouge); }
.cv-consigne.cv-alerte { color: #b45309; animation: cv-secoue .35s; }
.cv-consigne .btn { margin-top: 12px; }
.cv-aide { text-align: center; font-size: .85rem; color: var(--doux); }
.cv-compte { display: block; font-size: 4.6rem; font-weight: 900; line-height: 1; animation: cv-pop .5s ease-out; }
.cv-legende { display: block; margin-top: 10px; font-size: 1rem; font-weight: 700; }
.cv-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; min-height: 12px; }
.cv-points i { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; transition: background .2s; }
.cv-points i.fait { background: var(--p); }
@keyframes cv-pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } to { transform: scale(1); } }
@keyframes cv-secoue { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes cv-battement { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ── Réflexes : la grande zone (aucune transition : le vert doit apparaître d'un coup) ── */
.cv-cible { width: 100%; min-height: 270px; border: 0; border-radius: 20px; padding: 18px; font: inherit; font-weight: 900; font-size: 1.6rem; line-height: 1.2; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: none; }
.cv-cible small { display: block; font-size: .98rem; font-weight: 600; opacity: .95; }
.cv-cible .cv-icone { font-size: 3.2rem; line-height: 1; }
.cv-cible:focus-visible { outline: 4px solid var(--or); outline-offset: 3px; }
.cv-cible.pret { background: linear-gradient(135deg, var(--p), var(--p-fonce)); }
.cv-cible.attente { background: #b91c1c; }
.cv-cible.go { background: #4ade80; color: #052e16; font-size: 2.3rem; }
.cv-cible.resultat { background: linear-gradient(135deg, #1e3a8a, #115e59); }
.cv-cible.rate { background: #fbbf24; color: #1c1917; }
.cv-temps { font-size: 3.6rem; font-weight: 900; animation: cv-pop .35s ease-out; }
.cv-temps small { display: inline; font-size: 1.5rem; }
.cv-historique { list-style: none; display: flex; justify-content: center; align-items: flex-end; gap: 6px; min-height: 80px; padding: 0; width: 100%; }
.cv-historique li { flex: 0 1 46px; min-width: 0; height: 80px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: .78rem; font-weight: 800; color: var(--texte); }
.cv-historique li i { display: block; width: 100%; height: var(--h, 30px); border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--p-clair), var(--p)); animation: cv-monte .4s ease-out; transform-origin: bottom; }
@keyframes cv-monte { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ── Mémoire des chiffres ── */
.cv-scene-chiffres { display: grid; gap: 14px; justify-items: center; min-height: 230px; align-content: center; text-align: center; }
.cv-chiffre { width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 5.2rem; font-weight: 900; color: #fff; background: radial-gradient(circle at 32% 28%, var(--p-clair), var(--p-fonce)); box-shadow: 0 12px 30px rgba(15, 118, 110, .35); }
.cv-chiffre:not(.vide) { animation: cv-pop .3s ease-out; }
.cv-chiffre.vide { background: #e2e8f0; box-shadow: none; }
.cv-cases { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.cv-case { width: 42px; height: 52px; border: 2px solid var(--bord); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900; color: var(--texte); }
.cv-case.active { border-color: var(--p); box-shadow: 0 0 0 3px rgba(20, 184, 166, .25); }
.cv-case.juste { border-color: var(--vert); background: #dcfce7; }
.cv-case.faux { border-color: var(--rouge); background: #fee2e2; }
.cv-pave { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 330px; }
.cv-pave button { min-height: 58px; border: 2px solid var(--bord); border-radius: 14px; background: #fff; color: var(--texte); font: inherit; font-size: 1.6rem; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.cv-pave button:hover { border-color: var(--p-clair); background: var(--p-pale); }
.cv-pave button:active { transform: scale(.96); }
.cv-pave button:focus-visible, .cv-couleur:focus-visible, .cv-bloc:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.cv-pave .cv-effacer { font-size: 1.4rem; color: var(--doux); }
.cv-pave .cv-valider { grid-column: span 2; font-size: 1.1rem; background: #e2e8f0; color: var(--doux); border-color: #e2e8f0; }
.cv-pave .cv-valider.pret { background: var(--p); border-color: var(--p); color: #fff; }
.cv-solution { letter-spacing: 3px; }

/* ── Mémoire visuelle : le plateau de Corsi ── */
.cv-plateau { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin: 0 auto; border-radius: 20px; background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 75%); box-shadow: inset 0 0 0 1px #334155; overflow: hidden; }
.cv-bloc { position: absolute; width: 18%; height: 18%; border: 0; border-radius: 14%; background: #334155; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .3), 0 0 0 2px #475569; color: #0f172a; font: inherit; font-size: 1.5rem; font-weight: 900; cursor: pointer; touch-action: manipulation; transition: none; }   /* allumé / éteint d'un coup, comme l'épreuve classique */
.cv-bloc:disabled { cursor: default; }
.cv-bloc:not(:disabled):hover { background: #3f4e66; }
.cv-bloc.allume { background: #facc15; box-shadow: 0 0 28px 6px rgba(250, 204, 21, .75), 0 0 0 2px #fde68a; transform: scale(1.06); }
.cv-bloc.touche { animation: cv-eclair .35s ease-out; }
.cv-bloc.juste { background: #4ade80; box-shadow: 0 0 18px rgba(74, 222, 128, .6); }
.cv-bloc.faux { background: #f87171; animation: cv-secoue .35s; }
.cv-bloc.solution { background: #e2e8f0; color: #0f172a; }
@keyframes cv-eclair { from { background: #5eead4; box-shadow: 0 0 22px 4px rgba(94, 234, 212, .8); } to { background: #334155; } }
.cv-voile { display: none; }
.cv-voile.actif { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; background: rgba(15, 23, 42, .82); color: #fff; z-index: 2; }

/* ── Attention : Stroop ── */
.cv-scene { min-height: 170px; border-radius: 18px; background: #0f172a; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.cv-mot { font-size: clamp(2.5rem, 12vw, 4rem); font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
.cv-croix { font-size: 2.6rem; color: #94a3b8; font-weight: 300; }
.cv-pret { font-size: 1.8rem; font-weight: 900; animation: cv-pop .4s ease-out; }
.cv-couleurs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cv-couleur { min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--bord); border-radius: 14px; background: #fff; color: var(--texte); font: inherit; font-size: 1.1rem; font-weight: 800; text-align: left; cursor: pointer; touch-action: manipulation; }
.cv-couleur:hover { border-color: var(--p-clair); }
.cv-couleur .j-touche { flex: none; }
.cv-pastille { flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(15, 23, 42, .35); }
.cv-couleur.juste { border-color: var(--vert); background: #dcfce7; }
.cv-couleur.faux { border-color: var(--rouge); background: #fee2e2; animation: cv-secoue .3s; }
.cv-couleur.attendu { border-color: var(--vert); border-style: dashed; }

/* ── Âge du cerveau : les étapes et les écrans d'annonce ── */
.cv-etapes { list-style: none; display: flex; gap: 6px; padding: 0; }
.cv-etape { flex: 1; text-align: center; padding: 9px 4px; border-radius: 12px; background: #f1f5f9; color: var(--doux); font-size: .84rem; font-weight: 800; white-space: nowrap; }
.cv-etape.active { background: var(--p); color: #fff; box-shadow: 0 6px 16px rgba(15, 118, 110, .3); }
.cv-etape.faite { background: #ccfbf1; color: var(--p-fonce); }
.cv-intro { text-align: center; padding: 10px 4px 6px; display: grid; gap: 8px; justify-items: center; }
.cv-grande-icone { font-size: 3.6rem; line-height: 1.1; animation: cv-pop .45s ease-out; }
.cv-etape-num { color: var(--doux); font-weight: 700; font-size: .9rem; }
.cv-intro-titre { font-size: 1.5rem; margin: 0; }
.cv-intro-texte { max-width: 440px; color: #334155; }
.cv-acquis { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cv-acquis span { background: #ccfbf1; color: var(--p-fonce); border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: .88rem; }
.cv-pulse { animation: cv-battement 1s ease-in-out infinite; }

@media (max-width: 400px) {
  .cv-cible { min-height: 240px; font-size: 1.4rem; }
  .cv-chiffre { width: 128px; height: 128px; font-size: 4.4rem; }
  .cv-case { width: 36px; height: 46px; font-size: 1.4rem; }
  .cv-couleur { font-size: 1rem; gap: 8px; padding: 10px 8px; }
  .cv-etape { font-size: .76rem; }
  .cv-historique { gap: 4px; }
  .cv-historique li { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cv *, .cv { animation: none !important; transition: none !important; }
  .cv-bloc.allume { transform: none; }
}

/* ══ Bilan du cerveau (jeu-bilan-cerveau, 28/10/2026) : 7 épreuves enchaînées. Préfixe « bilan- ». ══
   Le cadre (.cv.bilan) reprend les règles « cv- » ci-dessus, dont « aucune animation » si on l'a demandé. */
.bilan-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .9rem; color: var(--doux); }
.bilan-nom { color: var(--texte); }
.bilan-progres { height: 8px; background: var(--bord); border-radius: 99px; overflow: hidden; }
.bilan-progres i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--p), #2563eb); border-radius: 99px; transition: width .4s ease; }
.bilan-etapes { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
.bilan-etape { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px; background: #f1f5f9; color: var(--doux); font-size: .72rem; font-weight: 800; text-align: center; }
.bilan-etape > span:first-child { font-size: 1.15rem; line-height: 1.2; }
.bilan-etape-nom { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bilan-etape.active { background: var(--p); color: #fff; box-shadow: 0 4px 12px rgba(15, 118, 110, .28); }
.bilan-etape.faite { background: #ccfbf1; color: var(--p-fonce); }
.bilan-etape.passee { background: #f8fafc; color: #94a3b8; opacity: .7; }
.bilan-passer-zone { text-align: center; margin: 0; }
.bilan-passer, .bilan-passer-intro { min-height: 44px; }
.bilan-plan { font-weight: 700; color: var(--p-fonce); }
.cv-acquis .bilan-passee { background: #f1f5f9; color: var(--doux); }
/* Pendant l'épreuve de la vue : rien de coloré autour du disque (les couleurs voisines tromperaient l'œil) */
.bilan-neutre .bilan-progres i { background: #9ca3af; }
.bilan-neutre .bilan-etape.active { background: #4b5563; box-shadow: none; }
.bilan-neutre .bilan-etape.faite { background: #e5e7eb; color: #374151; }
.bilan-neutre .bilan-haut, .bilan-neutre .bilan-etapes, .bilan-neutre .bilan-passer-zone { filter: grayscale(1); }   /* les icônes aussi */
/* Le graphique de fin (dans #f-visuel du cadre) : pleine largeur au téléphone, sans devenir géant à l'ordinateur */
.bilan-graphe { display: block; max-width: 380px; margin: 0 auto; }

/* ── Vue : le disque sur fond gris sombre neutre (couleurs posées par le script, sans transition) ── */
.bilan-scene { border-radius: 20px; padding: 16px 14px 20px; min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; color: #e5e5e5; text-align: center; }
.bilan-scene-num { margin: 0; font-size: .88rem; font-weight: 700; color: #a3a3a3; }
.bilan-disque { width: min(62vw, 230px); aspect-ratio: 1; border-radius: 50%; transition: none; }
.bilan-scene-etat { margin: 0; min-height: 2.9em; font-weight: 700; line-height: 1.4; color: #e5e5e5; max-width: 420px; }
.bilan-vu { width: 100%; max-width: 320px; min-height: 56px; border: 1px solid #525252; border-radius: 14px; background: #3a3a3a; color: #fafafa; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bilan-vu:hover:not(:disabled) { background: #474747; }
.bilan-vu:disabled { opacity: .45; cursor: default; }
.bilan-vu:focus-visible { outline: 3px solid #e5e5e5; outline-offset: 3px; }

/* ── Ouïe : l'écran de sécurité, puis l'écoute (le même écran pour un son et pour un essai muet) ── */
.bilan-secu { display: grid; gap: 12px; }
.bilan-secu-titre { margin: 0; font-size: 1.2rem; }
.bilan-consignes { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; color: #334155; }
.bilan-aide { margin: 0; background: var(--p-pale); border: 1px solid var(--p-bord); border-radius: 12px; padding: 10px 12px; color: #134e4a; }
.bilan-go { margin: 0; }
.bilan-ecoute { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 6px 0; }
.bilan-ouie-num { margin: 0; font-size: .9rem; font-weight: 700; color: var(--doux); }
.bilan-oreille { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; font-size: 4rem; background: radial-gradient(circle, #eff6ff, #dbeafe); }
.bilan-ecoute.en-cours .bilan-oreille { animation: cv-battement 1.6s ease-in-out infinite; }
.bilan-ouie-etat { margin: 0; min-height: 2.9em; font-weight: 700; line-height: 1.4; max-width: 440px; }
.bilan-entends { width: 100%; max-width: 320px; min-height: 60px; font-size: 1.15rem; }
.bilan-entends:disabled { opacity: .5; box-shadow: none; }

/* ── Logique : 5 énigmes (même allure que le test de logique, sans dépendre de sa feuille) ── */
.bilan-lg { --bilan-case: 76px; display: grid; gap: 10px; text-align: center; }
.bilan-lg-niv { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 99px; padding: 1px 10px; font-size: .78rem; }
.bilan-lg-sorte { justify-self: center; margin: 0; background: #ccfbf1; color: var(--p-fonce); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 3px 10px; border-radius: 99px; }
.bilan-lg-consigne { margin: 0; font-weight: 800; font-size: 1.08rem; line-height: 1.35; }
.bilan-lg-case { position: relative; width: var(--bilan-case); aspect-ratio: 1; background: #fff; border: 1.5px solid var(--bord); border-radius: 12px; display: grid; place-items: center; padding: 5px; }
.bilan-lg-case svg, .bilan-lg-option svg { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.bilan-lg-trou { border: 2px dashed #93c5fd; background: #eff6ff; color: #2563eb; font-size: 1.8rem; font-weight: 900; }
.bilan-lg-revele { border-style: solid; border-color: var(--vert); background: #f0fdf4; }
.bilan-lg-lettre { position: absolute; top: 2px; left: 6px; font-size: .72rem; color: var(--doux); }
.bilan-lg-suite { display: flex; justify-content: center; gap: 6px; width: 100%; max-width: 500px; margin: 0 auto; }
.bilan-lg-suite .bilan-lg-case { width: auto; flex: 1 1 0; max-width: 92px; min-width: 0; padding: 3px; }
.bilan-lg-analogie { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bilan-lg-paire { display: flex; align-items: center; gap: 10px; }
.bilan-lg-paire + .bilan-lg-paire { padding-top: 8px; border-top: 1px dashed var(--bord); }
.bilan-lg-fleche { font-size: 1.5rem; color: var(--p); font-weight: 800; line-height: 1; }
.bilan-lg-grille { display: grid; grid-template-columns: repeat(3, var(--bilan-case)); gap: 6px; justify-content: center; width: max-content; margin: 0 auto; padding: 8px; background: var(--p-pale); border: 1px solid var(--p-bord); border-radius: 16px; }
.bilan-lg-options { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px; margin: 0 auto; }
.bilan-lg-n4 { --n: 4; } .bilan-lg-n5 { --n: 5; } .bilan-lg-n6 { --n: 6; }
.bilan-lg-option { position: relative; aspect-ratio: 1; min-height: 56px; background: #fff; border: 2px solid var(--bord); border-radius: 14px; padding: 11%; color: inherit; cursor: pointer; touch-action: manipulation; transition: border-color .15s, background .15s; }
.bilan-lg-option:hover:not(:disabled) { border-color: var(--p-clair); background: var(--p-pale); }
.bilan-lg-option:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.bilan-lg-option:disabled { cursor: default; }
.bilan-lg-option:disabled:not(.juste):not(.faux) { opacity: .5; }
.bilan-lg-option.juste { border-color: var(--vert); background: #dcfce7; box-shadow: 0 0 0 3px rgba(21, 128, 61, .22); }
.bilan-lg-option.faux { border-color: var(--rouge); background: #fee2e2; animation: cv-secoue .35s; }
.bilan-lg-touche { position: absolute; top: 4px; left: 5px; width: 20px; height: 20px; border-radius: 6px; background: var(--fond); border: 1px solid var(--bord); font-size: .7rem; font-weight: 700; color: var(--doux); display: inline-flex; align-items: center; justify-content: center; }
@media (hover: none) { .bilan-lg-touche { display: none; } }
.bilan-lg-retour { min-height: 1.5em; font-size: .95rem; color: #334155; width: 100%; max-width: 560px; margin: 0 auto; }
.bilan-lg-retour.ok strong { color: var(--vert); }
.bilan-lg-retour.ko strong { color: var(--rouge); }
.bilan-lg-retour span { display: block; margin-top: 4px; }
.bilan-lg-suite-zone { margin: 0; }

@media (max-width: 560px) {
  .bilan-etape-nom { display: none; }                          /* téléphone : les icônes seules */
  .bilan-etape { padding: 7px 1px; }
}
@media (max-width: 520px) {
  .bilan-lg { --bilan-case: 70px; }
  .bilan-lg-n5, .bilan-lg-n6 { --n: 3; }
  .bilan-lg-grandes.bilan-lg-n4 { --n: 2; max-width: 280px; }  /* l'intrus : les figures SONT l'énigme */
  .bilan-lg-options { gap: 8px; }
  .bilan-scene { min-height: 340px; }
}
@media (max-width: 360px) { .bilan-lg { --bilan-case: 62px; } }
