/* Le style commun du site Andrew apprend : « néo-brutalisme scientifique et joyeux ».
   Toutes les décisions visuelles sont des jetons (variables) ci-dessous : couleurs avec un sens,
   bordures, ombres, rayons, espaces, deux polices. Trois niveaux d'intensité :
   1 calme (lecture), 2 interactif (on peut toucher), 3 important (rare : l'école maintenant, l'essentiel du CM2). */

/* les deux polices sont déclarées dans assets/fonts.css (chargé avant ce fichier) */

:root{
  /* surfaces et texte */
  --bg:#d1c9ba; --surface:#fffdf8; --surface-muted:#f4f1ea; --surface-book:#fbf5e7;
  --text:#1b1f27; --text-muted:#4a5160; --border-color:#14161b; --border-quiet:#c9c2b2;

  /* les matières : une couleur forte (texte, repères) et une teinte claire (fonds) */
  --french:#b8235a; --french-bright:#e0477f; --french-tint:#fbe4ed;
  --english:#1c4ea0; --english-bright:#3a6fd6; --english-tint:#e3ebfa;
  --history:#8f610a; --history-bright:#e0a326; --history-tint:#f9edd2;
  --geography:#1b7f52; --geography-bright:#3fbf7f; --geography-tint:#ddf2e6;
  --science:#6e3fc4; --science-bright:#9b6cf0; --science-tint:#eee6fc;
  --maths:#08789f; --maths-bright:#29b6e8; --maths-tint:#dbf1fa;
  --other:#55606f; --other-bright:#8a96a6; --other-tint:#eceef1;

  /* l'essentiel du CM2, pour aller plus loin, et les états */
  --core:#e9b23a; --core-tint:#fff4d4;
  --explore-tint:#ecf3f4;
  --accent:#ff90e8; --accent-tint:#ffe0f8;
  --success:#2a7a4b; --success-tint:#d9f1e1;
  --developing:#a35f00; --developing-tint:#fdeecf;
  --hint:#fff1ad; --warning:#b3261e;
  --focus:#f0b429;

  /* bordures, rayons, ombres, espaces */
  --border-thin:1px; --border-normal:2px; --border-strong:3px;
  --radius-small:4px; --radius-medium:8px; --radius-soft:14px; --radius-pill:999px;
  --shadow-small:3px 3px 0 var(--border-color); --shadow-medium:5px 5px 0 var(--border-color); --shadow-large:8px 8px 0 var(--border-color);
  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem; --space-5:1.5rem; --space-6:2rem; --space-7:3rem;

  /* polices et mesure de lecture */
  --font-read:"Atkinson Hyperlegible Next","Atkinson fallback",Verdana,Arial,sans-serif;
  --font-display:"Bricolage Grotesque","Bricolage fallback",Arial,sans-serif;
  --measure:40rem;
}
/* chaque page ou carte dit sa matière avec data-subj ; --s est alors la couleur de la matière */
[data-subj="francais"]{--s:var(--french);--s-bright:var(--french-bright);--s-tint:var(--french-tint)}
[data-subj="anglais"]{--s:var(--english);--s-bright:var(--english-bright);--s-tint:var(--english-tint)}
[data-subj="histoire"]{--s:var(--history);--s-bright:var(--history-bright);--s-tint:var(--history-tint)}
[data-subj="geographie"]{--s:var(--geography);--s-bright:var(--geography-bright);--s-tint:var(--geography-tint)}
[data-subj="sciences"]{--s:var(--science);--s-bright:var(--science-bright);--s-tint:var(--science-tint)}
[data-subj="maths"]{--s:var(--maths);--s-bright:var(--maths-bright);--s-tint:var(--maths-tint)}
[data-subj="emc"],[data-subj="arts"],[data-subj="autre"]{--s:var(--other);--s-bright:var(--other-bright);--s-tint:var(--other-tint)}
[data-subj="memoire"]{--s:#7a4fb0;--s-bright:#a77fe0;--s-tint:#f0e8fb}

*{box-sizing:border-box}
[hidden]{display:none !important}
html{font-size:20px}
html.size-1{font-size:23px}
html.size-2{font-size:26px}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-read);font-size:1rem;line-height:1.6;font-optical-sizing:auto;font-kerning:normal;overflow-wrap:break-word}
button,input,select,textarea{font-family:inherit}
.btn,.tag,.label,.homebtn,.seg button{font-optical-sizing:auto}
table,.tl-years,.num{font-variant-numeric:tabular-nums}
main{max-width:58rem;margin:0 auto;padding:0 16px var(--space-6)}
a{color:inherit}
p{margin:0 0 var(--space-3)}
h1,h2,h3,.display{font-family:var(--font-display);letter-spacing:-.01em;line-height:1.2}
h1{font-size:2rem;font-weight:800;margin:0 0 var(--space-3)}
h2{font-size:1.3rem;font-weight:750;margin:0 0 var(--space-3)}
h3{font-size:1.05rem;font-weight:700;margin:0 0 var(--space-2)}
/* le focus : un anneau foncé et un halo jaune, visible sur le beige comme sur le rose */
:focus-visible{outline:3px solid var(--border-color);outline-offset:2px;box-shadow:0 0 0 6px var(--focus)}
#main:focus-visible{box-shadow:none}
.small{font-size:.8rem;color:var(--text-muted)}
.muted{color:var(--text-muted)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* une étiquette courte en capitales (jamais pour les titres longs) */
.label{display:inline-flex;align-items:center;gap:var(--space-2);font-family:var(--font-display);font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--text)}
.label .sq{width:.8rem;height:.8rem;border:var(--border-normal) solid var(--border-color);background:var(--s,var(--accent));border-radius:2px;flex:none}

/* ---------- barre du haut : seulement des boutons, Accueil toujours au même endroit ---------- */
.topbar{max-width:58rem;margin:0 auto;padding:var(--space-4) 16px var(--space-3);display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}
.homebtn{display:inline-flex;align-items:center;gap:var(--space-2);min-height:48px;padding:.3rem .9rem;background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);box-shadow:var(--shadow-small);font-family:var(--font-display);font-weight:800;text-decoration:none;color:var(--text)}
.homebtn:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--border-color)}
.homebtn svg{width:26px;height:26px;flex:none}
.homebtn.here{opacity:.5;box-shadow:none}
.homebtn.here:hover{transform:none;box-shadow:none}
.topbar .grow{flex:1}

/* le fil d'Ariane : discret, sous la barre du haut */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem .45rem;font-size:.8rem;color:var(--text-muted);margin:0 0 var(--space-5)}
.crumbs a{color:var(--text-muted);min-height:44px;display:inline-flex;align-items:center}
.crumbs .sep{color:var(--text-muted)}
.crumbs [aria-current]{color:var(--text);font-weight:700}

/* ---------- les trois niveaux d'intensité ---------- */
/* niveau 1, calme : pour lire */
.calm{background:var(--surface);border:var(--border-thin) solid var(--border-quiet);border-radius:var(--radius-medium);padding:var(--space-4) var(--space-5)}
/* niveau 2, interactif ou concept : bordure nette, petite ombre */
.card{background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);padding:var(--space-4) var(--space-5);margin:0 0 var(--space-5)}
a.card,button.card{display:block;text-decoration:none;color:inherit;box-shadow:var(--shadow-small);font:inherit;text-align:left;width:100%;cursor:pointer}
a.card:hover,button.card:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--border-color)}
/* niveau 3, important : rare, bordure forte, bandeau de couleur, grande ombre */
.strong{background:var(--surface);border:var(--border-strong) solid var(--border-color);border-radius:var(--radius-small);box-shadow:var(--shadow-medium);margin:0 0 var(--space-5);overflow:hidden}
.strong>.band{display:flex;align-items:center;gap:var(--space-2);padding:.35rem var(--space-5);background:var(--s-tint,var(--accent-tint));border-bottom:var(--border-normal) solid var(--border-color)}
.strong>.body{padding:var(--space-4) var(--space-5) var(--space-5)}

/* ---------- boutons : un seul principal par écran ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:48px;padding:.35rem 1rem;font-family:var(--font-display);font-size:.95rem;font-weight:700;color:var(--text);background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);box-shadow:var(--shadow-small);text-decoration:none;cursor:pointer}
.btn:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--border-color)}
.btn:active{transform:translate(2px,2px);box-shadow:none}
.btn-primary{background:var(--accent);border-width:var(--border-strong);font-weight:800}
.btn-quiet{background:transparent;border-color:transparent;box-shadow:none;text-decoration:underline;text-underline-offset:4px;font-weight:600;color:var(--text-muted)}
.btn-quiet:hover{transform:none;box-shadow:none;color:var(--text)}
.btn .arrow{font-size:1.1em;line-height:1}

/* ---------- la page d'accueil : « l'école maintenant » d'abord ---------- */
.hello{margin:var(--space-2) 0 var(--space-6)}
.hello h1{font-size:2.3rem;margin:0 0 var(--space-1)}
.hello .ask{font-family:var(--font-display);font-size:1.15rem;font-weight:600;margin:0 0 var(--space-3)}
.hello .day{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);font-size:.85rem;color:var(--text-muted)}
.hello .day b{color:var(--text)}
.zone{margin:0 0 var(--space-7)}
.zone>.zhead{display:flex;align-items:baseline;gap:var(--space-3);flex-wrap:wrap;margin:0 0 var(--space-4)}
.zone>.zhead h2{margin:0;font-size:1.25rem}
.zone>.zhead h2{display:inline-flex;align-items:center;gap:var(--space-2)}
.zico{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:none;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);background:var(--s-tint,var(--surface))}
.zico svg{width:22px;height:22px}
.zone.tertiary .zico{width:28px;height:28px;border-color:var(--border-quiet)}
.zone.tertiary .zico svg{width:18px;height:18px}
.zone>.zhead .note{font-size:.8rem;color:var(--text-muted)}
.zone.secondary>.zhead h2{font-size:1.05rem}
.zone.tertiary>.zhead h2{font-size:.95rem;color:var(--text-muted)}

/* une carte de « l'école maintenant » : la matière en bandeau, ce qu'il faut faire, un bouton */
.now{display:grid;grid-template-columns:auto 1fr;gap:var(--space-4);align-items:center}
.now .ico{width:72px;height:72px;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-medium);background:var(--s-tint);display:flex;align-items:center;justify-content:center}
.now .ico svg{width:46px;height:46px}
.now .what{font-family:var(--font-display);font-size:1.45rem;font-weight:800;line-height:1.2;margin:0}
.now .where{margin:var(--space-1) 0 var(--space-3);color:var(--text-muted)}
.now .where b{color:var(--text)}
.now .go{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:var(--space-3);align-items:center}
@media (min-width:700px){.now{grid-template-columns:auto 1fr auto}.now .go{grid-column:auto}}
.also{font-size:.85rem;color:var(--text-muted);margin:-.4rem 0 0}
.also b{color:var(--text)}

/* le chemin d'un livre ou d'une leçon : ✓ fait, ● ici, ○ à venir */
.minipath{display:flex;align-items:center;gap:3px;margin:var(--space-2) 0 0;flex-wrap:wrap}
.minipath i{display:block;width:16px;height:16px;border:var(--border-normal) solid var(--border-color);border-radius:50%;background:var(--surface)}
.minipath i.done{background:var(--s)}
.minipath i.here{width:22px;height:22px;background:var(--accent);box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--border-color)}
.minipath i.lock{border-color:var(--border-quiet);background:var(--surface-muted)}

/* niveau 2 : la carte « prêt à retenir » */
.mem{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-4);background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);padding:var(--space-4) var(--space-5)}
.mem .num{font-family:var(--font-display);font-size:2.2rem;font-weight:800;line-height:1;min-width:2.4rem;text-align:center}
.mem .txt{flex:1 1 16rem}
.mem .txt b{display:block}
/* la ligne du jour : un lien vers l'activité du jour */
.hello .day a{color:var(--text);font-weight:700;text-underline-offset:3px;min-height:44px;display:inline-flex;align-items:center;gap:var(--space-1)}

/* la semaine en un coup d'œil (sans pourcentage géant) */
.week{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:var(--space-3)}
.week .w{background:var(--surface);border:var(--border-thin) solid var(--border-quiet);border-radius:var(--radius-medium);padding:var(--space-3) var(--space-4)}
.week .w .n{font-family:var(--font-display);font-size:1.6rem;font-weight:800;line-height:1.1}
.week .w .t{font-size:.85rem;color:var(--text-muted)}
/* la semaine par leçon ou par livre : ✓ fini, ◐ à revoir */
.weekunits{list-style:none;margin:var(--space-4) 0 0;padding:0;display:grid;gap:var(--space-3)}
.weekunits>li{background:var(--surface);border:var(--border-thin) solid var(--border-quiet);border-left:6px solid var(--s,var(--border-quiet));border-radius:var(--radius-medium);padding:var(--space-3) var(--space-4)}
.weekunits h3{font-size:1rem;margin:0 0 var(--space-1)}
.weekunits ul{list-style:none;margin:0;padding:0}
.weekunits ul li{display:flex;gap:var(--space-2);font-size:.9rem;max-width:var(--measure)}
.weekunits .mk{flex:none;width:1.2rem;font-weight:800;text-align:center}
.weekunits li.ok .mk{color:var(--success)}
.weekunits li.dev .mk{color:var(--developing)}

/* ---------- « l'essentiel du CM2 » et « pour aller plus loin » : la différence doit sauter aux yeux ---------- */
.core{position:relative;background:var(--core-tint);border:var(--border-strong) solid var(--border-color);border-left-width:12px;border-left-color:var(--core);border-radius:var(--radius-small);padding:var(--space-4) var(--space-5);margin:0 0 var(--space-5)}
.core>.label{margin-bottom:var(--space-2)}
.core h2,.core h3{margin-top:0}
.deeper{background:var(--explore-tint);border:var(--border-normal) dashed var(--border-color);border-radius:var(--radius-soft);padding:var(--space-4) var(--space-5);margin:0 0 var(--space-5)}
.deeper>.label{margin-bottom:var(--space-2)}
a.deeper{display:block;text-decoration:none;color:inherit}
a.deeper:hover{border-style:solid}

/* ---------- les matières (la carte du CM2) ---------- */
.subjects{display:grid;grid-template-columns:repeat(auto-fill,minmax(13rem,1fr));gap:var(--space-3)}
.subject{display:flex;align-items:center;gap:var(--space-3);min-height:64px;padding:var(--space-2) var(--space-3);background:var(--surface);border:var(--border-normal) solid var(--border-color);border-left:10px solid var(--s);border-radius:var(--radius-small);text-decoration:none;color:var(--text);line-height:1.3}
.subject:hover{box-shadow:var(--shadow-small);transform:translate(-1px,-1px)}
.subject .t{font-family:var(--font-display);font-weight:800}
.subject .d{font-size:.78rem;color:var(--text-muted)}
.subject.quiet{border-color:var(--border-quiet);border-left-color:var(--s-bright);background:var(--surface-muted)}
.pic{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);background:var(--s-tint,#eee)}
.pic svg{width:70%;height:70%}

/* ---------- page d'une matière ---------- */
.subjhead{display:flex;align-items:center;gap:var(--space-4);margin:0 0 var(--space-2)}
.subjhead .pic{width:64px;height:64px}
.subjhead h1{margin:0}
.subjbar{height:8px;background:var(--s);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-pill);margin:0 0 var(--space-6);max-width:16rem}
.unit{display:block;text-decoration:none;color:inherit}
.lesson{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-4);margin:0 0 var(--space-2);background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);box-shadow:var(--shadow-small);text-decoration:none;color:var(--text)}
.lesson:hover{transform:translate(-1px,-1px);box-shadow:4px 4px 0 var(--border-color)}
.lesson .t{font-family:var(--font-display);font-weight:800;flex:1 1 10rem;min-width:0}
.lesson .d{color:var(--text-muted);font-size:.85rem}
.tag{flex:none;font-family:var(--font-display);font-size:.72rem;font-weight:800;letter-spacing:.04em;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-pill);padding:.05rem .6rem;background:var(--surface-muted);white-space:nowrap}
.tag.go{background:var(--success-tint)}
.tag.new{background:var(--accent-tint)}
.tag.now{background:var(--accent);}
.soon{color:var(--text-muted);font-size:.85rem;margin:var(--space-2) 0 0}
/* « Lié à » : sous une leçon ou sous un thème, des liens calmes vers ce qui va avec */
/* les liens restent dans la phrase (« Lié à : » ne reste pas seul sur sa ligne) ; l'espace en haut et en bas du lien agrandit la zone à toucher */
.rel{margin:0 0 var(--space-2);font-size:.85rem;line-height:2.2;color:var(--text-muted)}
.lesson+.rel{padding-left:var(--space-4)}
.rel a{color:var(--text);font-weight:700;padding:.65rem 0;text-underline-offset:3px}

/* l'histoire : une ligne du temps verticale dans l'ordre de l'année ; les années de chaque leçon à gauche */
.tl{list-style:none;margin:0;padding:0 0 0 2.2rem;position:relative}
.tl::before{content:"";position:absolute;left:calc(.55rem + 8px);top:.6rem;bottom:.6rem;width:5px;background:var(--border-color);border-radius:3px}
.tl-th{position:relative;margin:0 0 var(--space-6)}
.tl-th:last-child{margin-bottom:0}
.tl-th::before{content:"";position:absolute;left:-2.2rem;top:.1rem;margin-left:.55rem;width:22px;height:22px;border:var(--border-strong) solid var(--border-color);border-radius:50%;background:var(--s-bright,var(--accent));box-sizing:border-box}
.tl-th.quiet::before{background:var(--surface);border-color:var(--border-quiet)}
.tl-th.here::before{width:28px;height:28px;left:calc(-2.2rem - 3px);background:var(--accent)}
.tl-head{margin:0 0 var(--space-2)}
.tl-when{display:inline-flex;gap:var(--space-2);align-items:center;font-family:var(--font-display);font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted)}
.tl-head h3{font-size:1.05rem;margin:.15rem 0 0}
.tl-th.quiet .tl-head h3{color:var(--text-muted)}
.tl-soon{margin:0;font-size:.85rem;color:var(--text-muted)}
.tl-l{gap:var(--space-4);flex-wrap:wrap}
.tl-years{flex:none;min-width:5rem;display:flex;flex-direction:column;align-items:center;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);background:var(--s-tint,var(--history-tint));padding:.15rem .4rem;line-height:1.25;font-family:var(--font-display)}
.tl-years b{font-size:1.15rem;font-weight:800}
.tl-years span{font-size:.72rem;font-weight:700}

/* ---------- glossaire (mes mots) ---------- */
.words{display:grid;gap:var(--space-4)}
.word{border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);padding:var(--space-3) var(--space-4);background:var(--surface)}
.word h3{margin:0 0 .2rem;font-size:1.15rem}
.word p{margin:0 0 .4rem}
.etym{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;font-size:.85rem;margin:.3rem 0}
.etp{display:inline-flex;flex-direction:column;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);padding:.1rem .5rem;background:var(--core-tint)}
.etp span{font-size:.75rem;color:var(--text-muted)}
.op{font-weight:900}
.seen{font-size:.8rem;color:var(--text-muted)}
.letters{display:flex;flex-wrap:wrap;gap:.4rem;margin:0 0 var(--space-5)}
.letters a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);font-family:var(--font-display);font-weight:800;text-decoration:none}

/* ---------- formulaires (réglages, espace parent) ---------- */
.setrow{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);padding:var(--space-3) 0;border-bottom:var(--border-thin) solid var(--border-quiet)}
.setrow:last-child{border-bottom:0}
.setrow .lbl{flex:1 1 14rem;font-weight:700}
.setrow .lbl small{display:block;font-weight:400;color:var(--text-muted)}
.seg{display:inline-flex;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);overflow:hidden}
.seg button{min-height:48px;min-width:72px;padding:0 .8rem;font:inherit;font-size:.9rem;background:var(--surface);border:0;border-right:var(--border-normal) solid var(--border-color);cursor:pointer}
.seg button:last-child{border-right:0}
.seg button.on{background:var(--accent);font-weight:bold}
/* .seg coupe ce qui dépasse : l'anneau du focus se dessine à l'intérieur du bouton */
.seg button:focus-visible{outline-offset:-3px;box-shadow:inset 0 0 0 7px var(--focus)}
@media (max-width:600px){.seg{display:flex;flex-wrap:wrap;width:100%}.seg button{flex:1 1 40%;border-bottom:var(--border-normal) solid var(--border-color);overflow-wrap:normal;word-break:normal;padding:.3rem .5rem}}
select,input[type=text],input[type=number],input[type=password],textarea{font:inherit;font-size:.95rem;min-height:48px;padding:.3rem .6rem;background:var(--surface);color:var(--text);border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);max-width:100%}
textarea{min-height:5rem;width:100%}
.saved{font-size:.85rem;color:var(--text-muted);min-height:1.4em;margin:var(--space-3) 0 0}
.formgrid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-4)}
.fgroup{border:var(--border-normal) solid var(--border-color);border-left:10px solid var(--s);border-radius:var(--radius-small);padding:var(--space-3) var(--space-4);background:var(--surface)}
.fgroup>h3{display:flex;align-items:center;gap:var(--space-2)}
.frow{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2) var(--space-3);margin:var(--space-2) 0}
.frow>label{flex:0 0 11rem;font-weight:700;font-size:.9rem}
.frow>select,.frow>input{flex:1 1 14rem;min-width:0;max-width:100%}

/* ---------- espace parent ---------- */
.tablewrap{overflow-x:auto;margin:0 0 var(--space-3)}
table{border-collapse:collapse;width:100%;font-size:.8rem}
th,td{border:var(--border-normal) solid var(--border-color);padding:.35rem .5rem;text-align:left;vertical-align:top}
th{background:var(--surface-muted)}
details{margin:.6rem 0;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small);padding:.4rem .8rem;background:var(--surface)}
summary{cursor:pointer;font-weight:bold;min-height:44px;display:flex;align-items:center}
/* une partie qui s'ouvre se voit : ▸ fermée, ▾ ouverte (le triangle du navigateur disparaît avec display:flex) */
summary::-webkit-details-marker{display:none}
summary::after{content:"▸";margin-left:auto;padding-left:var(--space-3);font-size:1.1rem}
details[open]>summary::after{content:"▾"}
.bar{height:14px;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-pill);background:var(--surface);overflow:hidden;min-width:80px}
.bar i{display:block;height:100%;background:var(--success-tint)}
.credthumb{display:block;max-width:96px;max-height:64px;width:auto;height:auto;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-small)}
/* la lecture à voix haute : la note sur les enregistrements, le test du micro, les lectures d'Andrew (calmes : niveau 1) */
.privacy{font-size:.85rem;max-width:var(--measure);background:var(--surface-muted);border:var(--border-thin) solid var(--border-quiet);border-left:6px solid var(--border-quiet);border-radius:var(--radius-small);padding:var(--space-2) var(--space-3);margin:var(--space-3) 0 var(--space-5)}
.mictest{margin:var(--space-3) 0 0}
.mictest audio{display:block;width:100%;max-width:22rem}
.meter{height:16px;max-width:20rem;border:var(--border-normal) solid var(--border-color);border-radius:var(--radius-pill);background:var(--surface);overflow:hidden}
.meter i{display:block;height:100%;width:0;background:var(--border-quiet)}
.meter i.on{background:var(--success)}
details.lday>summary,details.tstep>summary{flex-wrap:wrap;gap:0 var(--space-3)}
details.lday>summary .cnt,details.tstep>summary .cnt{font-size:.8rem;font-weight:600;color:var(--text-muted)}
.lecs{list-style:none;margin:0;padding:0}
.lec{padding:var(--space-3) 0;border-top:var(--border-thin) solid var(--border-quiet)}
.lec:first-child{border-top:0}
.lec p{margin:0 0 var(--space-1)}
.lec audio{display:block;width:100%;max-width:22rem;margin:var(--space-2) 0}
.lec .typed{max-width:var(--measure);background:var(--surface-muted);border-radius:var(--radius-small);padding:var(--space-2) var(--space-3);margin:var(--space-2) 0}
details.ltext{margin:var(--space-2) 0;border:var(--border-thin) solid var(--border-quiet);padding:0 var(--space-3)}
details.ltext>summary{font-weight:600;font-size:.85rem}
details.ltext p{max-width:var(--measure);margin:0 0 var(--space-2)}
.lec .btn-quiet{padding-left:0}
.lecend{margin:var(--space-4) 0 0}
.lecmsg:empty{min-height:0;margin:0}
/* le score du premier coup et le temps : « à refaire » et « rapide » en ambre calme (jamais en rouge), et toujours écrits */
.tries th,.tries td{overflow-wrap:normal}
.tag.dev{background:var(--developing-tint)}
.tag.fast{background:var(--developing-tint);border-color:var(--developing)}
tr.fast td{background:var(--developing-tint)}
/* sur un téléphone, le tableau des essais tient dans la carte : des cases plus serrées, et « Réussie ✓ » peut passer à la ligne */
@media (max-width:600px){.tries th,.tries td{padding:.3rem .35rem}.tries .tag{white-space:normal;display:inline-block;padding:.05rem .45rem;line-height:1.3}}
/* un message pour le parent en haut de l'Espace parent (le micro bloqué) : ambre calme, jamais rouge */
.notice{max-width:var(--measure);background:var(--developing-tint);border:var(--border-normal) solid var(--developing);border-radius:var(--radius-small);padding:var(--space-3) var(--space-4);margin:0 0 var(--space-5);font-weight:600}
.pcrow{margin:0}

/* les points de progression : NOUVEAU ●○○○○ … MAÎTRISÉ ●●●●● */
.dots{display:inline-flex;align-items:center;gap:3px;vertical-align:middle}
.dots i{width:12px;height:12px;border:var(--border-normal) solid var(--border-color);border-radius:50%;background:var(--surface)}
.dots i.on{background:var(--s,var(--success))}
.lvl{display:inline-flex;align-items:center;gap:var(--space-2);font-family:var(--font-display);font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
/* la légende des cinq niveaux (Mes mots) */
.lvlegend{list-style:none;margin:0 0 var(--space-2);padding:0;display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-4);font-size:.85rem}
.lvlegend li{display:inline-flex;align-items:center;gap:var(--space-2)}

/* ---------- les pages du site plus larges (Mes mots, Ma grande frise, Défi mémoire, Mon carnet) ----------
   la barre du haut et la ligne du bas suivent la largeur de la page ; les textes à lire gardent 55 à 80 signes par ligne */
body.sitepage .topbar,body.sitepage .foot{max-width:72rem}
/* 33em suit la taille du texte : au plus 80 signes pour le texte normal, 75 pour les petits textes (.small) */
body.sitepage main>p,body.sitepage .calm>p,body.sitepage .cnote .ct,body.sitepage .cnote .cq,body.sitepage .cnote textarea,body.sitepage .clist,body.sitepage .evlist{max-width:33em}
/* Mon carnet : les personnes et les lieux, et les petites cases d'une ligne */
.clist{margin:var(--space-1) 0 0}
.cnote textarea{display:block}
a.wchip{text-decoration:none;color:inherit}
.oa.one{min-height:48px}
.evlist.cdates{font-size:.9rem}
/* Ma grande frise ouverte par un lien (frise.html#guerre-1914) : la phrase en haut et l'événement du lien dans la liste, en rose */
.frgo{background:var(--accent-tint);border:var(--border-strong) solid var(--border-color);border-radius:var(--radius-small);padding:var(--space-2) var(--space-3)}
.frgo b{white-space:nowrap}
.evlist li.go{background:var(--accent-tint);box-shadow:0 0 0 4px var(--accent-tint),0 0 0 6px var(--border-color);border-radius:2px;margin:.3rem 0;font-weight:bold}

/* ---------- ligne du bas : toujours les mêmes liens ---------- */
.foot{max-width:58rem;margin:0 auto;padding:var(--space-3) 16px var(--space-6);display:flex;justify-content:center;flex-wrap:wrap;gap:var(--space-2) var(--space-5);font-size:.8rem}
.foot a{color:var(--text-muted);min-height:44px;display:inline-flex;align-items:center}
.foot a[aria-current]{font-weight:bold;color:var(--text);text-decoration:none}

@media (max-width:520px){
  html{font-size:18px}
  h1{font-size:1.7rem}
  .hello h1{font-size:1.9rem}
  .now{grid-template-columns:1fr}
  .now .ico{width:56px;height:56px}
  .card,.strong>.body,.core,.deeper{padding-left:var(--space-4);padding-right:var(--space-4)}
  .frow>label{flex-basis:100%}
}
@media (prefers-reduced-motion:reduce){.homebtn:hover,.lesson:hover,.subject:hover,.btn:hover,a.card:hover{transform:none}}
@media print{.topbar,.foot{display:none}body{background:#fff}.card,.strong{box-shadow:none}}
