/* Charte (CLAUDE.md, section 7 ; décision du 12/11/2026 pour le bleu ciel). */
:root {
  --bleu: #1677C4;
  --bleu-ombre: #0E528A;
  --bleu-clair: #DCEDFB;
  --or: #F2C46A;
  --creme: #F3F1E7;
  --or-clair: #FBEBC8;
  --or-ombre: #C9993F;
  --blanc: #FFFFFF;
  --encre: #1E2A33;
  --doux: #4F5A53;
  --trait: #E2DDCC;
  --trait-ombre: #D3CDB8;
  --rouge: #B3261E;
  --rouge-pale: #FDE7E4;
  --rouge-trait: #F4B9B2;
  --rayon: 20px;
  --rayon-petit: 14px;
  --bas: max(28px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  --police-titre: 'Poppins', system-ui, sans-serif;
  --police-texte: 'Inter', system-ui, sans-serif;
  --police-enfant: 'Andika', 'Inter', system-ui, sans-serif;
}

/* Polices servies par l'application, pour marcher hors connexion : Google Fonts, sous-ensemble
   latin, licence OFL, téléchargées le 13/11/2026 avec l'accord d'Harry. */
@font-face { font-family: 'Andika'; font-weight: 400; font-display: swap; src: url(../fonts/andika-400.woff2) format('woff2'); }
@font-face { font-family: 'Andika'; font-weight: 700; font-display: swap; src: url(../fonts/andika-700.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(../fonts/inter.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format('woff2'); }

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

html, body { margin: 0; height: 100%; }

body {
  background: var(--creme);
  color: var(--encre);
  font: 17px/1.45 var(--police-texte);
  /* Décisions du 07/11 : pas de texte sélectionnable ni de cadre au toucher. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}
input, .selectionnable { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
button:focus:not(:focus-visible) { outline: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

h1 { font: 700 28px/1.2 var(--police-titre); margin: 0 0 12px; text-wrap: balance; }
h2 { font-family: var(--police-titre); font-weight: 700; }
p { margin: 0 0 12px; }

button {
  font: 600 17px var(--police-texte);
  min-height: 48px;
  min-width: 48px;
  cursor: pointer;
}

/* Écrans : un seul visible à la fois. Les marges d'iPhone (barre d'état, barre du bas)
   sont dans .cadre et .corps. */
.app { min-height: 100%; display: flex; flex-direction: column; }
.ecran { display: none; flex: 1; flex-direction: column; }
.ecran.actif { display: flex; }
.ecran.blanc { background: var(--blanc); }
.cadre { width: 100%; max-width: 440px; margin-inline: auto;
         padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.corps { flex: 1; display: flex; flex-direction: column; padding-block: max(24px, env(safe-area-inset-top, 0px)) var(--bas); }

.enfant { font-family: var(--police-enfant); font-size: 40px; }

/* ---------- Première ouverture (maquette docs/maquettes/premiere-ouverture.md, version 3) ---------- */
.doux { color: var(--doux); }
.pousse { flex: 1; min-height: 16px; }
.cache { display: none !important; }
.centre { text-align: center; }
.espace-haut { margin: 18px 0 10px; }
.espace-haut-petit { margin-top: 8px; }
.marque { font: 700 15px var(--police-titre); color: var(--bleu); margin: 0 0 18px; }
.etiquette { align-self: flex-start; display: inline-block; background: var(--or-clair); border-radius: 999px; padding: 5px 12px; font: 600 14px var(--police-texte); margin-bottom: 14px; }
.bloc { background: var(--creme); border-radius: var(--rayon); padding: 16px 18px; }
.bouton { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; border: 0;
          border-radius: 999px; background: var(--bleu); color: var(--blanc); font: 700 18px var(--police-texte);
          box-shadow: 0 5px 0 var(--bleu-ombre); padding: 14px 20px; transition: transform .06s, box-shadow .06s; }
.bouton:active { transform: translateY(5px); box-shadow: 0 0 0 var(--bleu-ombre); }
.bouton:disabled { cursor: progress; }
.bouton svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lien { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px auto 0; min-height: 48px; padding: 10px 14px; background: none; border: 0;
        color: var(--bleu-ombre); font: 600 16px var(--police-texte); text-decoration: underline; text-underline-offset: 3px; }

.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.etapes li { display: flex; gap: 14px; align-items: center; font-weight: 600; }
.etapes .pas { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--bleu); color: var(--bleu-ombre);
               display: grid; place-items: center; font: 700 17px var(--police-titre); background: var(--blanc); }

.gestes { list-style: none; counter-reset: g; margin: 0; padding: 0; display: grid; gap: 14px; }
.gestes li { counter-increment: g; display: flex; gap: 12px; align-items: center; }
.gestes li::before { content: counter(g); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bleu); color: var(--blanc);
                     display: grid; place-items: center; font: 700 15px var(--police-titre); }
.picto { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blanc); border: 2px solid var(--trait);
         vertical-align: middle; margin: 0 2px; }
.picto svg { width: 20px; height: 20px; fill: none; stroke: var(--encre); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mot { font-weight: 700; background: var(--blanc); border-radius: 6px; padding: 1px 6px; }
.lien-affiche { margin: 12px 0 0; padding: 12px 14px; border: 2px dashed var(--trait-ombre); border-radius: var(--rayon-petit); word-break: break-all; font-weight: 600; }

.cle { display: flex; gap: 8px; }
.champ { flex: 1; min-width: 0; min-height: 58px; border: 2px solid var(--trait-ombre); border-radius: var(--rayon-petit); padding: 12px 14px;
         font: 600 19px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; color: var(--encre); background: var(--blanc); text-transform: uppercase; }
.champ::placeholder { text-transform: none; letter-spacing: 0; font: 500 17px var(--police-texte); color: #6B746E; }
.champ:focus { border-color: var(--bleu); outline: none; }
.champ.erreur { border-color: var(--rouge); }
.coller { flex: none; min-width: 96px; min-height: 58px; border-radius: var(--rayon-petit); border: 2px solid var(--bleu); background: var(--bleu-clair);
          color: var(--bleu-ombre); font: 700 16px var(--police-texte); box-shadow: 0 4px 0 #7FB2E3; display: flex; align-items: center; justify-content: center; gap: 6px; }
.coller:active { transform: translateY(4px); box-shadow: none; }
.coller svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.alerte { display: flex; gap: 10px; align-items: flex-start; background: var(--rouge-pale); border: 2px solid var(--rouge-trait); border-radius: var(--rayon-petit);
          padding: 12px 14px; margin-top: 12px; }
.alerte p { margin: 0; }
.alerte svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--rouge); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.aide { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.aide svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--doux); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.aide p { margin: 0; color: var(--doux); font-size: 16px; }
.attente { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .4); border-top-color: var(--blanc); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.coche-grande { width: 96px; height: 96px; margin: 18px auto 14px; border-radius: 50%; background: var(--bleu); display: grid; place-items: center; box-shadow: 0 6px 0 var(--bleu-ombre); }
.coche-grande svg { width: 52px; height: 52px; fill: none; stroke: var(--blanc); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.info { display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.info svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--bleu-ombre); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.info + .info { margin-top: 12px; }
.info p { margin: 0; }

/* Le bouton du bas reste visible pendant qu'on lit, même sur un petit écran. */
.collant { position: sticky; bottom: 0; padding: 14px 0 var(--bas); background: linear-gradient(rgba(255, 255, 255, 0), var(--blanc) 30%); }
#e-installer .corps, #e-cle .corps { padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .bouton, .coller { transition: none; } .attente { animation-duration: 3s; } }

/* ---------- Accueil, porte parentale, ajout d'un enfant (maquette docs/maquettes/accueil-parent.md, version 5) ---------- */
.bloc + .bloc { margin-top: 12px; }
.titre-section { font: 600 13px var(--police-texte); color: var(--doux); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.espace-section { margin-top: 20px; }
.bouton.second { background: var(--blanc); color: var(--encre); border: 2px solid var(--trait); box-shadow: 0 4px 0 var(--trait-ombre); }
.bouton.second:active { box-shadow: 0 0 0 var(--trait-ombre); }
.lien svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.retour { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 48px; margin: -8px 0 6px -6px; padding: 8px 6px; border: 0; background: none;
          color: var(--doux); font: 600 16px var(--police-texte); }
.retour svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Dessins des profils : chacun a sa forme ET sa couleur (lisible pour les daltoniens) */
.dessin { display: block; }
.dessin svg { width: 100%; height: 100%; display: block; }

.qui { font: 700 30px/1.2 var(--police-enfant); margin: 0 0 18px; }
.profils { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profil { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 14px; border-radius: var(--rayon);
          border: 2px solid var(--trait); background: var(--blanc); box-shadow: 0 4px 0 var(--trait-ombre);
          font: 700 22px/1.2 var(--police-enfant); color: var(--encre); transition: transform .06s, box-shadow .06s; overflow-wrap: anywhere; }
.profil:active { transform: translateY(4px); box-shadow: 0 0 0 var(--trait-ombre); }
.profil .dessin { width: 76px; height: 76px; }
.profil.ajout { border-style: dashed; box-shadow: none; color: var(--bleu-ombre); font: 600 16px var(--police-texte); justify-content: center; }
.profil.ajout .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--bleu-clair); display: grid; place-items: center; }
.profil.ajout .plus svg { width: 26px; height: 26px; fill: none; stroke: var(--bleu-ombre); stroke-width: 3; stroke-linecap: round; }

/* La porte parentale : garder le doigt appuyé */
.porte { position: relative; overflow: hidden; touch-action: none; }
.porte .jauge { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, .28); }
.porte.appui .jauge { width: 100%; transition: width 3s linear; }
.porte span { position: relative; }

.champ-nom { display: block; width: 100%; min-height: 56px; border: 2px solid var(--trait-ombre); border-radius: var(--rayon-petit); padding: 12px 14px;
             font: 700 22px var(--police-enfant); color: var(--encre); background: var(--blanc); }
.champ-nom:focus { border-color: var(--bleu); outline: none; }
.dessins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choix-dessin { aspect-ratio: 1; border-radius: var(--rayon-petit); border: 3px solid transparent; background: var(--blanc); padding: 8px; }
.choix-dessin[aria-pressed="true"] { border-color: var(--bleu); background: var(--bleu-clair); }
.choix-dessin:disabled { opacity: .3; cursor: default; }
.niveaux { display: grid; gap: 10px; }
.niv { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; border-radius: var(--rayon-petit); border: 2px solid var(--trait);
       background: var(--blanc); text-align: left; font: 500 16px/1.3 var(--police-texte); color: var(--encre); }
.niv b { display: block; font: 700 18px var(--police-titre); }
.niv .num { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--bleu); display: grid; place-items: center; font: 700 17px var(--police-titre); color: var(--bleu-ombre); }
.niv[aria-pressed="true"] { border-color: var(--bleu); background: var(--bleu-clair); }
.niv[aria-pressed="true"] .num { background: var(--bleu); color: var(--blanc); }
.message-erreur { color: #9A3B1E; font-weight: 600; min-height: 24px; margin: 8px 0 0; text-align: center; }
#e-ajout .corps { padding-bottom: 0; }
@media (max-height: 700px) { .profil { padding: 12px 8px 10px; } .profil .dessin { width: 62px; height: 62px; } .qui { margin-bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .profil { transition: none; } }

/* ---------- Espace parent, suppression, rythme (maquette docs/maquettes/accueil-parent.md, version 5) ---------- */
.enfants { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.puce { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 2px solid var(--trait);
        background: var(--blanc); font: 600 16px var(--police-texte); color: var(--encre); }
.puce .dessin { width: 34px; height: 34px; }
.puce[aria-pressed="true"] { border-color: var(--bleu); background: var(--bleu-clair); }
.fiche-enfant { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.fiche-enfant .dessin { width: 64px; height: 64px; flex: none; }
.fiche-enfant .nom { font: 700 26px/1.15 var(--police-enfant); margin: 0; }
.fiche-enfant .ou { margin: 2px 0 0; color: var(--doux); font-size: 16px; }
.chemin-niv { height: 14px; border-radius: 999px; background: var(--blanc); overflow: hidden; margin: 6px 0 8px; }
.chemin-niv i { display: block; height: 100%; background: var(--bleu); border-radius: 999px; }
.chemin-txt { margin: 0; font-size: 15px; }
.jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font: 600 13px var(--police-texte); color: var(--doux); }
.jours .rond { width: 34px; height: 34px; margin: 4px auto 0; border-radius: 50%; border: 2px solid var(--trait-ombre); background: var(--blanc); display: grid; place-items: center; }
.jours .fait .rond { background: var(--bleu); border-color: var(--bleu); }
.jours .rond svg { width: 18px; height: 18px; fill: none; stroke: var(--blanc); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
/* Semaine complète (au rythme choisi) : les ronds passent à l'or ; ils restent à plat (Harry, 13/11) */
.jours.complete .fait .rond { background: var(--or); border-color: var(--or-ombre); }
.jours.complete .rond svg { stroke: #7A4300; }
.semaine-txt { margin: 12px 0 0; }
.bilans { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bilans li { display: flex; align-items: center; gap: 12px; }
.bilans .signe { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.bilans .signe svg { width: 18px; height: 18px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bilans .ok { background: var(--bleu); } .bilans .ok svg { stroke: var(--blanc); }
.bilans .refaire { background: var(--or); } .bilans .refaire svg { stroke: var(--encre); }
.bilans b { display: block; font-size: 16px; } .bilans small { display: block; color: var(--doux); font-size: 15px; }
.pas-bilan { margin: 0; }
/* Rappel de fin d'accès : fond doré pâle, bordé d'or, pour ne pas ressembler à une alerte (Harry, 12/11) */
.rappel { background: #FFF6D6; border: 2px solid #F6DC86; border-radius: var(--rayon); padding: 16px 18px; margin-bottom: 12px; }
.rappel p { margin: 0 0 12px; }
.outils { display: grid; gap: 4px; margin-top: 8px; }
.outil { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--trait); background: none;
         font: 600 16px var(--police-texte); color: var(--encre); text-align: left; width: 100%; }
.outil svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--bleu-ombre); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.outil.danger { color: var(--rouge); } .outil.danger svg { stroke: var(--rouge); }
/* L'accès vaut pour toute l'application : une information en gris, rien à toucher (Harry, 12/11) */
.info-acces { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; color: var(--doux); font-size: 16px; }
.info-acces svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--doux); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.version { font-size: 13px; color: var(--doux); text-align: center; margin: 14px 0 0; }
#e-parent .corps { padding-bottom: 0; }
/* Bouton doré, dans l'esprit des boutons dorés de Duolingo (Harry, 12/11) */
.bouton.dore { position: relative; overflow: hidden; color: #7A4300; font-weight: 800; letter-spacing: .01em;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 34px, rgba(255, 255, 255, .28) 34px 52px, rgba(255, 255, 255, 0) 52px 70px), linear-gradient(#FFE27A, #FFD43B 55%, #FFC81F);
  box-shadow: 0 5px 0 #E0A100, inset 0 2px 0 rgba(255, 255, 255, .55); }
.bouton.dore:active { box-shadow: 0 0 0 #E0A100, inset 0 2px 0 rgba(255, 255, 255, .55); }
.bouton.dore span { position: relative; z-index: 2; }
.bouton.dore .reflet { position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0)); transform: skewX(-20deg);
  animation: reflet 5s ease-in-out 1.5s infinite; }
@keyframes reflet { 0% { left: -40%; } 22%, 100% { left: 125%; } }
.bouton.dore .etincelle { position: absolute; z-index: 3; width: 14px; height: 14px; fill: #FFFFFF; pointer-events: none; opacity: 0;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)); animation: scintille 2.6s ease-in-out infinite; }
.bouton.dore .e1 { left: 9%; top: 16%; animation-delay: .2s; } .bouton.dore .e2 { left: 83%; top: 12%; width: 11px; height: 11px; animation-delay: 1.1s; }
.bouton.dore .e3 { left: 70%; top: 58%; width: 9px; height: 9px; animation-delay: 1.8s; } .bouton.dore .e4 { left: 20%; top: 60%; width: 8px; height: 8px; animation-delay: .7s; }
@keyframes scintille { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(.5) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .bouton.dore .reflet, .bouton.dore .etincelle { animation: none; } .bouton.dore .e1 { opacity: 1; } }
/* Suppression définitive : rouge plein ; le geste qui ne perd rien en bas, là où tombe le pouce */
.bouton.danger { background: var(--rouge); color: var(--blanc); box-shadow: 0 5px 0 #7C1A14; }
.bouton.danger:active { box-shadow: 0 0 0 #7C1A14; }
.bouton.garder { margin-top: 16px; }
.dessin-supprimer { width: 72px; height: 72px; margin: 6px 0 12px; }
.avertir { background: var(--rouge-pale); border: 2px solid var(--rouge-trait); border-radius: var(--rayon); padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.avertir svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--rouge); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.avertir p { margin: 0 0 8px; } .avertir p:last-child { margin: 0; }
.rassure { display: flex; gap: 12px; align-items: center; margin: 16px 2px 0; }
.rassure svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--bleu-ombre); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-height: 700px) { .dessin-supprimer { display: none; } }

/* ---------- Test de niveau (maquette docs/maquettes/demo-test-niveau.md, version 8) ---------- */
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.liste li { display: flex; gap: 14px; align-items: center; }
.tuile-ico { flex: none; width: 44px; height: 44px; border-radius: var(--rayon-petit); background: var(--blanc); display: grid; place-items: center; }
.pic { width: 24px; height: 24px; fill: none; stroke: var(--bleu); stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
/* Les trois signes : couleur et forme ensemble (jamais la couleur seule) */
.signe { flex: none; width: 44px; height: 44px; border-radius: var(--rayon-petit); display: grid; place-items: center; }
.signe svg { width: 22px; height: 22px; display: block; fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.s-ok { background: var(--bleu); border-radius: 50%; } .s-ok svg { stroke: var(--blanc); }
.s-c { background: var(--or); color: var(--encre); } .s-c svg { stroke: var(--encre); }
.s-non { background: var(--trait); } .s-non svg { stroke: var(--encre); }
.apercu { display: grid; gap: 14px; }
.apercu .ligne { display: flex; align-items: center; gap: 14px; }
.apercu b { display: block; font-size: 16px; }
.apercu small { display: block; font-size: 15px; color: var(--doux); line-height: 1.35; }
.encadre { background: var(--or-clair); border-radius: var(--rayon-petit); padding: 14px 16px; font-size: 16px; margin-top: 12px; }
#e-preparer .corps { padding-bottom: 0; }
/* Écran de question : une barre épaisse, le calcul en très gros (72 px dès 380 px d'écran) */
.barre { display: flex; align-items: center; gap: 14px; }
.partie { font: 700 15px var(--police-titre); white-space: nowrap; }
.progres { flex: 1; height: 16px; border-radius: 999px; background: #ECE9DE; overflow: hidden; }
.progres i { position: relative; display: block; height: 100%; width: 0; border-radius: 999px; background: var(--bleu); transition: width .25s ease-out; }
.progres i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .28); }
.consigne { font: 600 13px var(--police-texte); color: var(--doux); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 6px; }
.question { font: 700 min(72px, 19vw)/1.1 var(--police-enfant); margin: 0 0 18px; white-space: nowrap; }
.question.longue { white-space: normal; font-size: 30px; line-height: 1.3; }
.repere { display: flex; align-items: center; gap: 12px; background: var(--creme); border-radius: var(--rayon-petit); padding: 10px 14px; }
.reponse { font-size: 16px; color: var(--doux); }
.reponse b { color: var(--encre); font: 700 24px var(--police-enfant); margin-left: 4px; }
/* Repère des 5 secondes : il ne change pas de couleur à la fin et ne déclenche rien */
.anneau { width: 34px; height: 34px; flex: none; margin-left: auto; }
.anneau circle { fill: none; stroke-width: 5; }
.anneau .fond { stroke: var(--blanc); }
.anneau .plein { stroke: var(--bleu); stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: 88; transform: rotate(-90deg); transform-origin: 50% 50%; }
.anneau.court .plein { animation: remplir 5s linear forwards; }
@keyframes remplir { to { stroke-dashoffset: 0; } }
.aide10 { font-size: 16px; font-weight: 600; color: var(--doux); margin: 12px 0 0; visibility: hidden; }
.aide10.visible { visibility: visible; }
.notes { display: grid; gap: 12px; }
.note { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 70px; border-radius: var(--rayon); border: 2px solid var(--trait);
        background: var(--blanc); color: var(--encre); padding: 10px 14px; font: 700 17px var(--police-texte); text-align: left;
        box-shadow: 0 4px 0 var(--trait-ombre); transition: transform .06s, box-shadow .06s; }
.note:active { transform: translateY(4px); box-shadow: 0 0 0 var(--trait-ombre); border-color: var(--bleu); }
/* Pause et résultat */
.medaille { width: 120px; height: 120px; margin: 12px auto 14px; display: block; }
.score { font: 700 52px/1 var(--police-titre); color: var(--bleu); }
.score small { font: 600 20px var(--police-texte); color: var(--doux); }
#t-suite { white-space: nowrap; }
.depart { display: flex; align-items: center; gap: 16px; background: var(--or-clair); border-radius: var(--rayon); padding: 18px; }
.depart svg { flex: none; width: 64px; height: 64px; }
.depart .petit { font: 600 14px var(--police-texte); color: var(--doux); margin: 0; }
.niveau { font: 700 38px/1.1 var(--police-titre); color: var(--bleu); margin: 2px 0 4px; }
.depart [data-niveau] { margin: 0; font-size: 16px; }
.tuiles { display: grid; gap: 10px; }
.tuile { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.coche { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bleu); display: grid; place-items: center; }
.coche svg { width: 16px; height: 16px; fill: none; stroke: var(--blanc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* Petits écrans (640 px de haut) : les trois notes restent visibles sans faire défiler */
@media (max-height: 700px) {
  .consigne { margin-top: 14px; } .question { margin-bottom: 12px; } .question.longue { font-size: 24px; line-height: 1.25; }
  .notes { gap: 10px; } .note { min-height: 60px; } #b-t-revenir { margin-top: 4px; } }
@media (prefers-reduced-motion: reduce) { .anneau.court .plein { animation: none; stroke-dashoffset: 0; } .note, .progres i { transition: none; } }

/* ---------- Séance du jour (maquette docs/maquettes/seance-du-jour.md, version 4). Tout ce que lit l'enfant est en Andika. ---------- */
:root { --touche: 72px; }   /* hauteur d'une touche du pavé (Harry, 12/11, testé sur son téléphone) */
.bonjour { font: 700 32px/1.15 var(--police-enfant); margin: 0 0 6px; }
.fiche-du-jour { display: flex; align-items: center; gap: 16px; background: var(--or-clair); border-radius: var(--rayon); padding: 18px; margin: 14px 0 12px; }
.fiche-du-jour .num { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--blanc); display: grid; place-items: center;
                      font: 700 28px var(--police-titre); color: var(--bleu); }
.fiche-du-jour .petit { font: 600 14px var(--police-texte); color: var(--doux); margin: 0; }
.fiche-du-jour .quoi { font: 700 20px/1.25 var(--police-enfant); margin: 2px 0 0; }
.chemin { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.chemin::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 3px; border-radius: 2px; background: var(--trait); }
.chemin li { position: relative; display: flex; align-items: center; gap: 14px; font-weight: 600; }
.chemin .pas { flex: none; width: 41px; height: 41px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--bleu); display: grid; place-items: center; }
.chemin .pas svg { width: 20px; height: 20px; fill: none; stroke: var(--bleu); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Moment du parent : la ligne à dire, la réponse en petit */
.oral { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.oral li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; background: var(--creme); border-radius: var(--rayon-petit); padding: 12px 16px; }
.oral .dit { font: 700 30px/1.1 var(--police-enfant); }
.oral .attendu { font-size: 15px; color: var(--doux); text-align: right; }
.oral .attendu .case { min-width: 0; border: 0; padding: 0 .25em; border-radius: 8px; background: var(--or-clair); color: var(--encre); font: 700 18px var(--police-enfant); }
#e-oral .corps { padding-bottom: 0; }
/* L'exercice : une ligne à la fois, en très gros ; la case active encadrée de la couleur principale */
.fermer { flex: none; width: 48px; height: 48px; border: 0; background: none; padding: 12px; }
.fermer svg { width: 24px; height: 24px; fill: none; stroke: var(--doux); stroke-width: 2.6; stroke-linecap: round; }
.consigne-enfant { font: 700 22px/1.3 var(--police-enfant); margin: 12px 0 8px; }
.enonce { font: 400 21px/1.4 var(--police-enfant); margin: 0 0 6px; }
.zone { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 90px; }
.ligne-exo { font-family: var(--police-enfant); font-weight: 700; text-align: center; }
.ligne-exo.calcul { white-space: nowrap; font-size: 56px; line-height: 1.2; }
.ligne-exo.phrase { font-size: 26px; line-height: 1.7; text-align: left; }
.ligne-exo svg.cadre10 { display: block; width: min(220px, 64vw); height: auto; margin: 0 auto 14px; }
.ligne-exo svg.cadre10 rect, .ligne-exo svg.cadre10 circle { stroke: var(--bleu); }
.ligne-exo svg.cadre10 circle[fill="#000"] { fill: var(--bleu); }
.case { display: inline-block; min-width: 1.5em; padding: 0 .12em; border-radius: 12px; border: 3px dashed var(--trait-ombre);
        text-align: center; line-height: 1.15; vertical-align: baseline; color: var(--encre); }
.ligne-exo.phrase .case { min-width: 2em; border-radius: 10px; }
.case.active { border: 3px solid var(--bleu); background: var(--bleu-clair); }
.case.juste { border: 3px solid transparent; color: var(--bleu); }
.case.montree { border: 3px solid transparent; background: var(--or-clair); }
.case.vide::after { content: "\00a0"; }
.message { min-height: 40px; margin: 6px 0 0; text-align: center; font: 700 22px/1.3 var(--police-enfant); }
.message.bravo { color: var(--bleu); font-size: 30px; }
.secoue { animation: secoue .3s; }
@keyframes secoue { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
/* Pavé de chiffres : des touches en relief, comme les boutons */
.pave { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.touche { height: var(--touche); border: 2px solid var(--trait); border-radius: 18px; background: var(--blanc); color: var(--encre);
          font: 700 30px var(--police-enfant); box-shadow: 0 4px 0 var(--trait-ombre); display: grid; place-items: center;
          transition: transform .06s, box-shadow .06s; }
.touche:active { transform: translateY(4px); box-shadow: 0 0 0 var(--trait-ombre); }
.touche svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
/* Effacer : se distingue des chiffres sans rouge ni orange, ce n'est pas une faute (Harry, 12/11) */
.touche.effacer { background: var(--bleu-clair); border-color: #9CC6EC; color: var(--bleu-ombre); box-shadow: 0 4px 0 #7FB2E3; }
.touche.effacer:active { box-shadow: 0 0 0 #7FB2E3; }
.touche.valider { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); box-shadow: 0 4px 0 var(--bleu-ombre); }
.touche.valider:active { box-shadow: 0 0 0 var(--bleu-ombre); }
.touche:disabled { opacity: .4; }
#b-suite { margin-top: 12px; }
/* Fin : l'autocollant gagné, puis la correction ensemble */
.autocollant { width: 132px; height: 132px; display: block; margin: 6px auto 10px; }
.autocollant.fait { margin-top: 40px; }   /* « Séance faite, à demain » : l'étoile du jour, rien d'autre à lire */
.bilan { display: flex; align-items: center; gap: 16px; background: var(--or-clair); border-radius: var(--rayon); padding: 16px 18px; margin: 12px 0; text-align: left; }
.bilan .score { flex: none; font: 700 40px/1 var(--police-titre); color: var(--bleu); }
.bilan .score small { font: 600 17px var(--police-texte); color: var(--doux); }
.bilan p { margin: 0; font-size: 16px; }
.revoir { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.revoir li { font: 700 20px/1.35 var(--police-enfant); }
.revoir li .case { min-width: 0; padding: 0 .3em; border: 0; background: var(--or-clair); }
.revoir li svg.cadre10 { display: inline-block; width: 90px; height: auto; vertical-align: middle; margin-right: 6px; }
.revoir li svg.cadre10 circle[fill="#000"] { fill: var(--encre); }
@media (max-height: 700px) {
  .consigne-enfant { margin-top: 12px; font-size: 20px; } .ligne-exo.calcul { font-size: 48px; }
  .pave { gap: 8px; } :root { --touche: 64px; }
  .enonce { font-size: 18px; line-height: 1.35; margin-bottom: 4px; } .ligne-exo.phrase { font-size: 21px; line-height: 1.5; }
  .zone { min-height: 56px; } .message { min-height: 34px; margin-top: 4px; font-size: 19px; } .message.bravo { font-size: 26px; }
  .oral { gap: 8px; } .oral li { padding: 8px 14px; } .oral .dit { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .touche { transition: none; } .secoue { animation: none; } }

/* Bandeau de mise à jour : jamais montré pendant un exercice (js/app.js). */
.bandeau-maj {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bleu-ombre);
  color: #fff;
}
.bandeau-maj[hidden] { display: none; }
.bandeau-maj button {
  border: 0; border-radius: 12px; padding: 0 16px;
  background: var(--or); color: var(--encre);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Démo gratuite du test (?demo=1) : accueil de la maquette validée (version 8), trame légère de signes de calcul */
#e-demo { background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' fill='none' stroke='%231677C4' stroke-opacity='.045' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M16 26h20M26 16v20M98 32h20M66 68l16 16M82 68L66 84M14 112h22M14 121h22M114 112h14M121 105v14'/%3E%3C/svg%3E") 0 0 / 180px 180px; }
#e-demo .corps { padding-bottom: 0; }
.chapeau { font-size: 18px; color: var(--doux); margin-bottom: 22px; }
.chemin .pas.chiffre { color: var(--bleu); font: 700 16px var(--police-titre); }
.chemin .quoi { line-height: 1.35; }
.photo { display: flex; gap: 12px; align-items: center; }
a.bouton { text-decoration: none; }   /* « Avoir le programme complet » est un lien : il garde l'allure d'un bouton */
