/* Examélior : page de présentation de MySTMG. Téléphone d'abord (320 px), mode sombre, mouvement réduit. */
@font-face { font-family: Nunito; src: url(img/nunito-latin-wght-normal.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --vert: #1c3b2e; --vert-2: #2b4f3c; --olive: #5f6e2f;
  --beige: #f3ede0; --creme: #faf6ee; --sable: #f1e9da; --carte: #fffdf8;
  --ligne: #ddd5c3; --encre: #22261f; --gris: #565b51;
  --ambre: #b4501a; --ambre-doux: #fbe9dc; --ambre-encre: #7f3510;
  --vert-doux: #edf2ea; --titre: #1c3b2e; --lien: #1c3b2e;
  --ombre: 0 .6rem 1.6rem rgba(0, 0, 0, .12);
  --rayon: 1.25rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --beige: #121a16; --creme: #17211b; --sable: #1d2a23; --carte: #1a251f;
    --ligne: #2f4237; --encre: #e7e2d4; --gris: #b9b7ab;
    --ambre: #f0a072; --ambre-doux: #33241b; --ambre-encre: #f6c3a3;
    --vert-doux: #1c2b23; --titre: #e9e3d2; --lien: #a8d8bb; --olive: #b7c77a;
    --ombre: 0 .6rem 1.6rem rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--beige); color: var(--encre); font: 500 1.0625rem/1.6 Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lien); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: .4rem; }
b, strong { font-weight: 800; }
h1, h2, h3 { color: var(--titre); line-height: 1.2; letter-spacing: -.015em; font-weight: 900; }
h2 { font-size: clamp(1.6rem, 6vw, 2.3rem); margin: 0 0 .6rem; }
h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
p { margin: 0 0 .8rem; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aller-contenu { position: absolute; left: .5rem; top: -4rem; background: var(--vert); color: #fff; padding: .6rem 1rem; border-radius: .6rem; z-index: 20; }
.aller-contenu:focus { top: .5rem; }

.cadre { width: min(100% - 2rem, 72rem); margin-inline: auto; }
section { padding: 3.5rem 0; }
.surtitre { display: inline-block; font-size: .8rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: var(--ambre); margin-bottom: .5rem; }
.chapo { color: var(--gris); font-size: 1.1rem; max-width: 42rem; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--beige) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.entete .cadre { display: flex; align-items: center; gap: .75rem; min-height: 3.75rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 900; font-size: 1.2rem; color: var(--titre); text-decoration: none; margin-right: auto; }
.entete .cadre { flex-wrap: wrap; }
.onglets-site { order: 3; flex-basis: 100%; display: flex; gap: .35rem; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .55rem; scrollbar-width: none; }
.onglets-site a { flex: none; display: inline-flex; align-items: center; min-height: 2.6rem; padding: .4rem .9rem; border-radius: 999px; font-weight: 800; font-size: .95rem; text-decoration: none; color: var(--encre); border: 1px solid var(--ligne); background: var(--carte); }
.onglets-site a:hover { border-color: var(--ambre); }
.onglets-site a[aria-current="page"] { background: var(--vert); color: #f1e9da; border-color: var(--vert); }
@media (prefers-color-scheme: dark) { .onglets-site a[aria-current="page"] { background: #a8d8bb; color: #10201a; border-color: #a8d8bb; } }
@media (min-width: 60rem) { html { scroll-padding-top: 4.75rem; } .onglets-site { order: 0; flex-basis: auto; margin: 0; padding: 0; overflow: visible; } }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.25rem; border-radius: .9rem; font-weight: 900; text-decoration: none; text-align: center; border: 2px solid transparent; }
.bouton.plein { background: var(--ambre); color: #fff; box-shadow: 0 .25rem 0 #7f3510; }
@media (prefers-color-scheme: dark) { .bouton.plein { color: #2a1408; box-shadow: 0 .25rem 0 #9b5631; } }
.bouton.plein:hover { filter: brightness(1.06); }
.bouton.clair { background: transparent; color: inherit; border-color: currentColor; }
.bouton.petit { min-height: 2.75rem; padding: .45rem .9rem; font-size: .95rem; }

/* Héros */
.heros { background: linear-gradient(150deg, #1c3b2e 0%, #244a39 55%, #3c5a33 100%); color: #f1e9da; padding: 3rem 0 0; overflow: hidden; position: relative; }
.heros::after { content: ""; position: absolute; right: -10rem; top: -12rem; width: 34rem; height: 34rem; border-radius: 50%; background: radial-gradient(circle, rgba(241,233,218,.14), rgba(241,233,218,0) 68%); pointer-events: none; }
.heros .cadre { display: grid; gap: 2rem; position: relative; z-index: 1; }
.heros h1 { color: #fff; font-size: clamp(2.1rem, 9vw, 3.6rem); margin: .3rem 0 .8rem; }
.heros h1 em { font-style: normal; color: #f5b98f; }
.heros .chapo { color: #e6dfcf; font-size: 1.15rem; }
.marque-app { display: inline-flex; align-items: center; gap: .6rem; font-weight: 900; font-size: 1.05rem; }
.marque-app img { width: 2.6rem; height: 2.6rem; background: #f1e9da; border-radius: .75rem; padding: .35rem; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.2rem 0 1.6rem; padding: 0; list-style: none; }
.etiquettes li { font-size: .85rem; font-weight: 800; padding: .45rem .9rem; border-radius: 999px; background: rgba(241,233,218,.12); border: 1px solid rgba(241,233,218,.3); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.heros .bouton.plein { background: #f1e9da; color: #1c3b2e; box-shadow: 0 .25rem 0 #b9ad93; }
.heros .bouton.clair { color: #f1e9da; }
.heros-visuel { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; }
.heros-visuel .telephone { width: min(15rem, 62vw); margin-bottom: -2.5rem; }
.heros-visuel .mascotte { width: 6.5rem; align-self: center; }
@media (prefers-reduced-motion: no-preference) {
  .heros-visuel .mascotte { animation: flotte 5s ease-in-out infinite; }
  @keyframes flotte { 50% { transform: translateY(-.5rem); } }
}
@media (min-width: 56rem) {
  .heros { padding-top: 4.5rem; }
  .heros .cadre { grid-template-columns: 1.15fr .85fr; align-items: center; }
  .heros-visuel .telephone { width: 17rem; margin-bottom: -4rem; }
}
.heros-bas { height: 3rem; }

/* Téléphones (captures d'écran) */
.telephone { border-radius: 1.6rem; border: .45rem solid #22261f; background: #22261f; overflow: hidden; box-shadow: var(--ombre); }
.telephone img { width: 100%; border-radius: 1.1rem; }
.telephone.coupe { aspect-ratio: 9 / 17; }
.telephone.coupe img { height: 100%; object-fit: cover; object-position: top; }
.ecran-large { border-radius: 1rem; overflow: hidden; border: 1px solid var(--ligne); box-shadow: var(--ombre); background: #fff; }

/* Chiffres et repères */
.reperes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.reperes li { background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1rem; }
.reperes b { display: block; font-size: 1.05rem; color: var(--titre); }
.reperes span { color: var(--gris); font-size: .95rem; line-height: 1.4; display: block; }
@media (min-width: 48rem) { .reperes { grid-template-columns: repeat(4, 1fr); } }

/* Objectifs */
.objectifs { display: grid; gap: 1rem; margin-top: 1.5rem; }
.objectif { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.4rem; }
.objectif.prof { background: var(--vert-doux); }
@media (min-width: 48rem) { .objectifs { grid-template-columns: 1fr 1fr; } }

/* Matières */
.matieres { display: grid; gap: 1rem; margin-top: 1.5rem; }
.matiere { border-radius: var(--rayon); padding: 1.3rem 1.4rem; border: 1px solid var(--ligne); background: var(--carte); position: relative; }
.matiere .pastille { display: inline-block; font-size: .78rem; font-weight: 900; padding: .35rem .8rem; border-radius: 999px; margin-bottom: .6rem; }
.matiere.dispo .pastille { background: var(--vert); color: #f1e9da; }
@media (prefers-color-scheme: dark) { .matiere.dispo .pastille { background: #a8d8bb; color: #10201a; } }
.matiere.bientot { border-style: dashed; background: transparent; }
.matiere.bientot .pastille { background: var(--ambre-doux); color: var(--ambre-encre); }
.matiere ul { margin: .4rem 0 0; padding-left: 1.1rem; color: var(--gris); }
@media (min-width: 56rem) { .matieres { grid-template-columns: repeat(3, 1fr); } }

/* Mise en page « texte + capture » */
.duo { display: grid; gap: 2rem; align-items: center; }
.duo .visuel { justify-self: center; width: min(17rem, 78vw); }
@media (min-width: 56rem) {
  .duo { grid-template-columns: 1.2fr .8fr; gap: 3.5rem; }
  .duo.inverse > .visuel { order: -1; }
}
.fond-creme { background: var(--creme); border-block: 1px solid var(--ligne); }

/* Les quatre ressources */
.ressources { display: grid; gap: .9rem; margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: r; }
.ressources li { background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1rem 1.1rem 1rem 3.4rem; position: relative; counter-increment: r; }
.ressources li::before { content: counter(r); position: absolute; left: 1rem; top: 1rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ambre); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .ressources li::before { color: #2a1408; } }
.ressources h3 { font-size: 1.08rem; }
.ressources p { color: var(--gris); margin: 0; }
.plus { margin-top: .55rem !important; font-size: .95rem; background: var(--vert-doux); color: var(--encre) !important; border-radius: .6rem; padding: .65rem .85rem; }

/* Notions */
.etats { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0 1rem; padding: 0; list-style: none; }
.etats li { font-size: .9rem; font-weight: 800; border-radius: 999px; padding: .4rem .85rem; background: var(--carte); border: 1px solid var(--ligne); display: inline-flex; align-items: center; gap: .4rem; }
.etats li::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); border: 2px solid var(--c); }
.etats li.vide::before { background: transparent; }
.cartes2 { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.carte { border-radius: var(--rayon); padding: 1.4rem; border: 1px solid var(--ligne); background: var(--carte); display: grid; gap: 1.25rem; }
.carte.vert { background: var(--vert-doux); }
.carte.ambre { background: var(--ambre-doux); border-color: color-mix(in srgb, var(--ambre) 35%, transparent); }
.carte.ambre h3 { color: var(--ambre-encre); }
.carte .visuel { width: min(15rem, 72vw); justify-self: center; }
.carte .tableau { border-radius: .9rem; overflow: hidden; border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.rythme { display: flex; gap: .3rem; align-items: flex-end; height: 2.6rem; margin-top: .6rem; max-width: 16rem; }
.rythme span { flex: 1; background: var(--ambre); border-radius: .25rem .25rem 0 0; opacity: .85; }
.rythme-l { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 900; color: var(--ambre-encre); max-width: 16rem; }
@media (min-width: 56rem) {
  .cartes2 { grid-template-columns: 1fr 1fr; }
  .carte { grid-template-columns: 1fr 13rem; align-items: start; }
  .carte .visuel { width: 100%; }
}

/* Mode guidé : étapes */
.etapes { display: grid; grid-auto-flow: column; grid-auto-columns: min(15.5rem, 76vw); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem 1rem 1.25rem; margin: 1.5rem -1rem 0; list-style: none; }
.etapes li { scroll-snap-align: center; display: flex; flex-direction: column; gap: .8rem; }
.etapes h3 { font-size: 1.08rem; display: flex; align-items: center; gap: .5rem; }
.puce { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ambre); color: #fff; font-size: .9rem; font-weight: 900; }
@media (prefers-color-scheme: dark) { .puce { color: #2a1408; } }
.etapes p { color: var(--gris); margin: 0; font-size: .98rem; }
.glisser { font-size: .9rem; color: var(--gris); margin-top: .25rem; }
@media (min-width: 64rem) {
  .etapes { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 1.5rem 0 0; padding: 0; }
  .glisser { display: none; }
}

/* Motivation */
.motivation { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.liste li { padding-left: 1.6rem; position: relative; }
.liste li::before { content: ""; position: absolute; left: .2rem; top: .55rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--olive); }
.avatars { display: flex; justify-content: center; align-items: flex-end; gap: .5rem; margin: 1rem 0 0; }
.avatars img { width: 30%; max-width: 6.5rem; height: auto; min-width: 0; }
@media (min-width: 56rem) { .motivation { grid-template-columns: 1.1fr .9fr; align-items: center; } }

/* Espace professeur */
.prof-grille { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.bloc { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.3rem; display: grid; gap: 1rem; align-content: start; }
.bloc .visuel { width: min(14rem, 70vw); justify-self: center; }
.bloc p { color: var(--gris); margin: 0; }
.bloc .demande { border-radius: .7rem; overflow: hidden; border: 1px solid var(--ligne); }
.bloc.large { grid-column: 1 / -1; }
.onglets-prof { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.onglets-prof li { font-size: .88rem; font-weight: 800; padding: .45rem .9rem; border-radius: 999px; background: var(--vert-doux); border: 1px solid var(--ligne); }
@media (min-width: 56rem) { .prof-grille { grid-template-columns: repeat(3, 1fr); } }

/* Points forts */
.forts { display: grid; gap: .9rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.forts li { display: grid; grid-template-columns: 2.75rem 1fr; gap: .85rem; align-items: start; background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1rem; }
.forts svg { width: 2.75rem; height: 2.75rem; padding: .55rem; border-radius: .8rem; background: var(--vert-doux); color: var(--titre); }
.forts b { display: block; color: var(--titre); }
.forts span { color: var(--gris); font-size: .97rem; line-height: 1.45; display: block; }
@media (min-width: 48rem) { .forts { grid-template-columns: 1fr 1fr; } }

/* Comment ça marche */
.marche { display: grid; gap: .9rem; margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: m; }
.marche li { counter-increment: m; background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1.1rem 1.1rem 1.1rem 4rem; position: relative; }
.marche li::before { content: counter(m); position: absolute; left: 1rem; top: 1rem; width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: var(--vert); color: #f1e9da; display: grid; place-items: center; font-weight: 900; }
@media (prefers-color-scheme: dark) { .marche li::before { background: #a8d8bb; color: #10201a; } }
.marche p { color: var(--gris); margin: 0; }
@media (min-width: 56rem) { .marche { grid-template-columns: repeat(4, 1fr); } .marche li { padding: 4rem 1.1rem 1.1rem; } }

/* Bientôt */
.bientot-bloc { border: 2px dashed var(--ligne); border-radius: var(--rayon); padding: 1.5rem; display: grid; gap: 1.2rem; align-items: center; }
.bientot-bloc img { width: 7rem; justify-self: center; }
.etiquette-b { display: inline-block; font-size: .78rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; background: var(--ambre); color: #fff; border-radius: 999px; padding: .35rem .9rem; margin-bottom: .5rem; }
@media (prefers-color-scheme: dark) { .etiquette-b { color: #2a1408; } }
@media (min-width: 56rem) { .bientot-bloc { grid-template-columns: 8rem 1fr 1fr; padding: 2rem; } .bientot-bloc img { width: 100%; } }

/* Questions fréquentes */
.faq { display: grid; gap: .7rem; margin-top: 1.5rem; max-width: 48rem; }
.faq details { background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; }
.faq summary { cursor: pointer; padding: 1rem 3rem 1rem 1.1rem; font-weight: 900; color: var(--titre); list-style: none; position: relative; min-height: 2.75rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: .8rem; font-size: 1.4rem; line-height: 1; color: var(--ambre); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.1rem 1rem; color: var(--gris); }
.faq details > div p:last-child { margin: 0; }

/* Pied de page */
.pied { border-top: 1px solid var(--ligne); padding: 2rem 0 2.5rem; font-size: .95rem; color: var(--gris); }
.pied .cadre { display: grid; gap: .8rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.pied nav a { display: inline-block; padding: .35rem 0; }
.entete .bouton { white-space: nowrap; padding-inline: .8rem; }
@media (max-width: 22rem) { .logo { font-size: 1.05rem; } .logo img { width: 1.9rem; height: 1.9rem; } }
@media (min-width: 56rem) { .bloc.large { grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: center; } }

/* ═══ Pages du site : accueil, rubriques, fiches ═══ */
.bandeau-page { background: linear-gradient(150deg, #1c3b2e 0%, #244a39 55%, #3c5a33 100%); color: #f1e9da; padding: 2.75rem 0 2.5rem; }
.bandeau-page h1 { color: #fff; font-size: clamp(1.9rem, 7.5vw, 3rem); margin: .2rem 0 .7rem; }
.bandeau-page h1 em { font-style: normal; color: #f5b98f; }
.bandeau-page p { color: #e6dfcf; font-size: 1.1rem; max-width: 44rem; margin: 0; }
.bandeau-page .fil { margin-bottom: .6rem; font-size: .95rem; }
.bandeau-page .fil a { color: #f1e9da; }

.rubriques { display: grid; gap: 1rem; margin-top: 1.5rem; }
.rubrique { display: grid; gap: .5rem; align-content: start; background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.4rem; color: inherit; text-decoration: none; }
a.rubrique:hover { border-color: var(--ambre); }
.rubrique h3 { font-size: 1.25rem; margin: 0; }
.rubrique p { color: var(--gris); margin: 0; }
.rubrique .suite { font-weight: 900; color: var(--lien); margin-top: .3rem; }
.rubrique.bientot { border-style: dashed; background: transparent; }
@media (min-width: 56rem) { .rubriques { grid-template-columns: repeat(3, 1fr); } }

.fiches { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; counter-reset: f; }
.fiches li { counter-increment: f; }
.fiches a { display: grid; grid-template-columns: 2.75rem 1fr; gap: .9rem; align-items: start; background: var(--carte); border: 1px solid var(--ligne); border-radius: 1.1rem; padding: 1.15rem; color: inherit; text-decoration: none; height: 100%; }
.fiches a:hover { border-color: var(--ambre); }
.fiches a::before { content: counter(f); width: 2.75rem; height: 2.75rem; border-radius: .8rem; background: var(--vert-doux); color: var(--titre); display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; }
.fiches h3 { margin: 0 0 .25rem; font-size: 1.12rem; }
.fiches p { margin: 0; color: var(--gris); font-size: .98rem; }
@media (min-width: 48rem) { .fiches { grid-template-columns: 1fr 1fr; } }

.a-relire { background: var(--ambre-doux); color: var(--ambre-encre); border: 1px dashed var(--ambre); border-radius: .8rem; padding: .7rem 1rem; font-size: .95rem; font-weight: 700; margin: 0 0 1.5rem; }

/* Fiche méthode */
.fiche { width: min(100% - 2rem, 46rem); margin: 0 auto; padding: 2.5rem 0 3rem; }
.fiche h2 { font-size: clamp(1.55rem, 4vw + .6rem, 1.85rem); margin: 2.4rem 0 .7rem; }
.fiche h2:first-of-type { margin-top: 0; }
.fiche h3 { margin: 1.5rem 0 .4rem; }
.fiche ul, .fiche ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.fiche li { margin: .3rem 0; }
.fiche .en-bref { background: var(--vert-doux); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1.1rem 1.2rem; margin-bottom: 2rem; }
.fiche .titre-bref { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 900; color: var(--titre); }
.fiche .en-bref ol, .fiche .en-bref ul { margin: 0; }
.tableau-defile { overflow-x: auto; margin: .5rem 0 1.25rem; padding: .4rem; border: 1px solid var(--ligne); border-radius: .9rem; background: var(--carte); }
.fiche table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .97rem; }
.fiche th, .fiche td { padding: .65rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--ligne); }
.fiche tr:last-child td { border-bottom: 0; }
.fiche th { background: var(--vert-doux); color: var(--titre); font-weight: 900; }
.lettre { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--ambre); color: #fff; font-weight: 900; margin-right: .4rem; }
@media (prefers-color-scheme: dark) { .lettre { color: #2a1408; } }
.etape-fiche { position: relative; padding: 1.1rem 1.2rem 1.1rem 4rem; background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; margin: 0 0 .9rem; }
.etape-fiche .num { position: absolute; left: 1rem; top: 1rem; width: 2.2rem; height: 2.2rem; border-radius: .7rem; background: var(--vert); color: #f1e9da; display: grid; place-items: center; font-weight: 900; }
@media (prefers-color-scheme: dark) { .etape-fiche .num { background: #a8d8bb; color: #10201a; } }
.etape-fiche h3 { margin: 0 0 .35rem; }
.etape-fiche p:last-child, .etape-fiche ul:last-child { margin-bottom: 0; }
.exemple { border: 1px solid var(--ligne); background: var(--carte); border-radius: 1rem; padding: 1rem 1.2rem; margin: .8rem 0 1.25rem; }
.exemple .etiquette { display: block; font-size: .85rem; font-weight: 900; color: var(--olive); margin-bottom: .4rem; }
.exemple p:last-child, .exemple ul:last-child { margin-bottom: 0; }
.piege { background: var(--ambre-doux); border-radius: 1rem; padding: 1rem 1.2rem; margin: .8rem 0 1.25rem; }
.piege strong:first-child { color: var(--ambre-encre); }
.piege p:last-child, .piege ul:last-child { margin-bottom: 0; }
.mots { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0 !important; margin: .5rem 0 1rem !important; }
.mots li { margin: 0 !important; padding: .35rem .8rem; border-radius: 999px; background: var(--carte); border: 1px solid var(--ligne); font-weight: 700; font-size: .95rem; }
.formule { display: block; text-align: center; font-weight: 800; font-size: 1.08rem; background: var(--carte); border: 1px solid var(--ligne); border-radius: .8rem; padding: .9rem 1rem; margin: .5rem 0 1rem; font-variant-numeric: tabular-nums; }
.navigation-fiches { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ligne); }
.navigation-fiches a { font-weight: 800; display: inline-flex; align-items: center; min-height: 2.75rem; }
.lien-app { background: var(--vert-doux); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1rem 1.2rem; margin-top: 2rem; }
.lien-app p:last-child { margin: 0; }
/* Onglets sur deux lignes au téléphone, pour qu'ils restent tous visibles */
@media (max-width: 59.99rem) { .onglets-site { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 0 .6rem; } .onglets-site a { min-height: 2.5rem; padding: .35rem .8rem; font-size: .92rem; } }
/* Tableaux des fiches empilés au téléphone */
@media (max-width: 36rem) {
  .tableau-defile { overflow: visible; }
  .fiche table { min-width: 0; }
  .fiche thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fiche table, .fiche tbody, .fiche tr, .fiche td { display: block; width: 100%; }
  .fiche tr { padding: .8rem .9rem; border-bottom: 1px solid var(--ligne); }
  .fiche tr:last-child { border-bottom: 0; }
  .fiche td { border: 0; padding: .2rem 0; }
  .fiche td:first-child { font-weight: 900; color: var(--titre); padding-bottom: .35rem; }
  .fiche td + td::before { content: attr(data-label) " : "; font-weight: 800; color: var(--gris); }
}
/* Au téléphone, l'en-tête sur deux lignes ne reste pas collé en haut : il prendrait trop de place */
@media (max-width: 59.99rem) { .entete { position: static; } html { scroll-padding-top: 1rem; } }

/* Schéma de la courbe de l'oubli */
.schema-oubli { margin: 1rem 0 1.75rem; background: var(--carte); border: 1px solid var(--ligne); border-radius: 1rem; padding: 1rem; }
.schema-oubli svg { width: 100%; max-width: 28rem; height: auto; display: block; margin: 0 auto; }
.schema-oubli .axes line { stroke: var(--gris); stroke-width: 1.5; }
.schema-oubli text { fill: var(--gris); font: 700 15px Nunito, system-ui, sans-serif; }
.schema-oubli .legende-axe { font-weight: 800; fill: var(--encre); }
.schema-oubli path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.schema-oubli .sans { stroke: var(--ambre); stroke-dasharray: 7 6; }
.schema-oubli .avec { stroke: var(--olive); }
.schema-oubli .pastilles circle { fill: var(--olive); stroke: var(--carte); stroke-width: 2; }
.schema-oubli .etiquette-sans { fill: var(--ambre-encre); font-weight: 900; font-size: 15px; }
.schema-oubli .etiquette-avec { fill: var(--olive); font-weight: 900; font-size: 15px; }
.schema-oubli figcaption { font-size: .9rem; color: var(--gris); margin-top: .5rem; }
@media (max-width: 36rem) {
  .comparaison td:first-child { font-weight: 500; color: var(--encre); padding-bottom: .2rem; }
  .comparaison td::before { content: attr(data-label) " : "; font-weight: 800; color: var(--gris); }
}

/* ═══ Exercices interactifs ═══ */
.exercice { background: var(--carte); border: 1px solid var(--ligne); border-radius: 1.1rem; padding: 1.2rem; margin: 1rem 0 1.5rem; }
.exercice > .titre-exo { font-weight: 900; color: var(--titre); font-size: 1.1rem; margin: 0 0 .3rem; }
.exercice > .consigne-exo { color: var(--gris); margin: 0 0 1rem; }
.tri-liste { list-style: none; padding: 0 !important; margin: 0 0 1rem !important; display: grid; gap: .75rem; }
.tri-item { margin: 0 !important; border: 1px solid var(--ligne); border-radius: .9rem; padding: .85rem .95rem; background: var(--beige); }
.tri-item p { margin: 0 0 .6rem; }
.tri-choix-groupe { display: flex; flex-wrap: wrap; gap: .4rem; }
.tri-choix { font: inherit; font-weight: 800; font-size: .92rem; min-height: 2.75rem; min-width: 2.75rem; padding: .35rem .8rem; border-radius: .7rem; border: 2px solid var(--ligne); background: var(--carte); color: var(--encre); cursor: pointer; }
.tri-choix:hover { border-color: var(--ambre); }
.tri-choix[aria-pressed="true"] { background: var(--vert); border-color: var(--vert); color: #f1e9da; }
@media (prefers-color-scheme: dark) { .tri-choix[aria-pressed="true"] { background: #a8d8bb; border-color: #a8d8bb; color: #10201a; } }
.tri-retour { margin: .55rem 0 0 !important; font-size: .95rem; font-weight: 700; }
.tri-item.juste { border-color: var(--olive); }
.tri-item.juste .tri-retour { color: var(--olive); }
.tri-item.faux { border-color: var(--ambre); }
.tri-item.faux .tri-retour { color: var(--ambre-encre); }
.exo-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.exo-actions button, .bouton-exo { font: inherit; font-weight: 900; min-height: 2.9rem; padding: .55rem 1.1rem; border-radius: .8rem; cursor: pointer; border: 2px solid var(--titre); background: var(--titre); color: var(--beige); }
.exo-actions button.secondaire { background: transparent; color: var(--titre); }
.tri-bilan, .calc-bilan { font-weight: 800; color: var(--titre); margin: .8rem 0 0 !important; }
.exercice details { margin-top: 1rem; border-top: 1px solid var(--ligne); padding-top: .8rem; }
.exercice summary { cursor: pointer; font-weight: 900; color: var(--lien); min-height: 2.75rem; display: flex; align-items: center; }

/* Champs */
.champs { display: grid; gap: .8rem; margin-bottom: 1rem; }
.champ label { display: block; font-weight: 800; margin-bottom: .3rem; }
.champ .aide { display: block; font-weight: 500; color: var(--gris); font-size: .9rem; }
.champ input { font: inherit; font-weight: 700; width: 100%; max-width: 16rem; min-height: 2.9rem; padding: .5rem .8rem; border-radius: .7rem; border: 2px solid var(--ligne); background: var(--beige); color: var(--encre); font-variant-numeric: tabular-nums; }
.champ input:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }
.champ input.juste { border-color: var(--olive); }
.champ input.faux { border-color: var(--ambre); }
.champ .retour { display: block; font-size: .92rem; font-weight: 700; margin-top: .25rem; color: var(--gris); }
@media (min-width: 40rem) { .champs.deux { grid-template-columns: 1fr 1fr; } }
.sim-resultats { background: var(--vert-doux); border-radius: .9rem; padding: .9rem 1rem; margin-bottom: .9rem; font-variant-numeric: tabular-nums; }
.sim-resultats p { margin: .2rem 0; }
.sim-lecture { margin: 0; }

/* Bilan fonctionnel */
.bilan-fonctionnel { display: grid; gap: .8rem; margin: .5rem 0 1rem; }
@media (min-width: 40rem) { .bilan-fonctionnel { grid-template-columns: 1fr 1fr; } }
.bilan-fonctionnel table { min-width: 0 !important; }
.bilan-fonctionnel td:last-child, .bilan-fonctionnel th:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bilan-fonctionnel tr.total td { font-weight: 900; color: var(--titre); background: var(--vert-doux); }
@media (max-width: 36rem) {
  .bilan-fonctionnel table, .bilan-fonctionnel tbody { display: table !important; width: 100%; }
  .bilan-fonctionnel tbody { display: table-row-group !important; }
  .bilan-fonctionnel tr { display: table-row !important; padding: 0 !important; }
  .bilan-fonctionnel td { display: table-cell !important; width: auto !important; padding: .45rem .6rem !important; border-bottom: 1px solid var(--ligne) !important; }
  .bilan-fonctionnel td:first-child { font-weight: 500 !important; color: var(--encre) !important; }
  .bilan-fonctionnel td + td::before { content: none !important; }
  .bilan-fonctionnel thead { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
}

/* Liste de vérification */
.liste-verif ul { list-style: none; padding: 0 !important; margin: 0 0 .8rem !important; display: grid; gap: .5rem; }
.liste-verif li { margin: 0 !important; }
.liste-verif label { display: flex; gap: .7rem; align-items: flex-start; min-height: 2.75rem; padding: .5rem .7rem; border-radius: .7rem; background: var(--beige); cursor: pointer; }
.liste-verif input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; flex: none; accent-color: var(--olive); }
.verif-compteur { font-weight: 900; color: var(--titre); }

/* Niveaux de réponse */
.niveaux { display: grid; gap: .6rem; margin: .5rem 0 1.25rem; }
.niveau { border: 1px solid var(--ligne); border-radius: .9rem; padding: .85rem 1rem; background: var(--carte); }
.niveau b { display: block; color: var(--titre); }
.niveau .barre-niveau { display: flex; gap: 3px; margin: .4rem 0 .5rem; }
.niveau .barre-niveau i { flex: 1; height: .45rem; border-radius: 2px; background: var(--piste-niveau, var(--ligne)); }
.niveau .barre-niveau i.on { background: var(--olive); }
.niveau p { margin: 0; color: var(--gris); }
.note-exo { font-size: .95rem; background: var(--vert-doux); border-radius: .7rem; padding: .6rem .8rem; }

/* ═══ Logo, accueil, sommaire, pages légales ═══ */
.logo picture, .logo img { display: block; width: 2.15rem; height: 2.15rem; }
.logo span { letter-spacing: -.01em; }
.surtitre-accueil { font-size: .9rem; font-weight: 800; color: #f5b98f; margin: 0 0 .6rem; letter-spacing: .01em; }
.bandeau-page .actions { margin-top: 1.4rem; }
.bandeau-page .bouton.plein { background: #f1e9da; color: #1c3b2e; box-shadow: 0 .25rem 0 #b9ad93; }
.bandeau-page .bouton.clair { color: #f1e9da; }

.besoins { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.besoins li { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 1.2rem 1.25rem; display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.besoins li > a:first-of-type { margin-top: auto; } /* liens alignés en bas des cartes */
.besoins .besoin { font-weight: 900; color: var(--titre); font-size: 1.08rem; margin: 0; }
.besoins p { margin: 0; color: var(--gris); }
.besoins a { font-weight: 900; display: inline-flex; align-items: center; min-height: 2.75rem; }
.besoins li.besoin-app { background: var(--vert-doux); }
@media (min-width: 48rem) { .besoins { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .besoins { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 56rem) { .bientot-bloc.deux { grid-template-columns: 8rem 1fr; } }

.sommaire { border-left: 3px solid var(--ligne); padding: .2rem 0 .2rem 1.1rem; margin: -.5rem 0 2.2rem; }
@media (min-width: 48rem) { .sommaire ol { columns: 2; column-gap: 2rem; } .sommaire li { break-inside: avoid; } }
.sommaire ol { margin: 0; padding-left: 1.3rem; }
.sommaire li { margin: 0; }
.sommaire li { padding: .2rem 0; }
.sommaire a { font-weight: 700; line-height: 1.5; }
.fiche h2[id], .fiche h3[id] { scroll-margin-top: 1rem; }
@media (min-width: 60rem) { .fiche h2[id], .fiche h3[id] { scroll-margin-top: 5rem; } }
.maj-fiche { margin-top: 2rem; font-size: .9rem; color: var(--gris); }

/* Page MySTMG : logo complet de l'application */
.logo-app { display: flex; width: fit-content; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.logo-app img { width: 4rem; height: 4rem; }
.logo-app-texte { display: grid; line-height: 1; }
.logo-app-nom { font-size: 2.3rem; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.logo-app-by { font-size: 1.05rem; font-weight: 400; color: rgba(241,233,218,.8); letter-spacing: .14em; margin-top: .35rem; }
.logo-app-by b { font-weight: 800; color: #f5b98f; }
.etiquette-app { display: inline-block; font-size: .85rem; font-weight: 800; color: #f1e9da; background: rgba(241,233,218,.12); border: 1px solid rgba(241,233,218,.3); border-radius: 999px; padding: .3rem .8rem; margin: 0 0 .4rem; }
.pour-prof { display: inline-block; font-size: .9rem; font-weight: 800; color: var(--ambre-encre); background: var(--ambre-doux); border-radius: 999px; padding: .35rem .9rem; margin: 0 0 .8rem; }

/* Pages légales */
.legal h2 { font-size: clamp(1.3rem, 4vw + .3rem, 1.55rem); }

/* Page introuvable */
.introuvable { text-align: center; padding: 3rem 0 4rem; }
.introuvable img { width: 9rem; margin: 0 auto 1rem; }
.introuvable .actions { justify-content: center; margin-top: 1.5rem; }

/* ═══ Impression des fiches ═══ */
@media print {
  :root { --beige: #fff; --carte: #fff; --creme: #fff; --sable: #fff; --encre: #111; --gris: #333; --titre: #1c3b2e; --lien: #1c3b2e; --ligne: #bbb; --vert-doux: #f2f2f2; --ambre: #9c3f12; --ambre-doux: #f6f6f6; --ambre-encre: #7f3510; --olive: #4d5a26; }
  body { background: #fff; color: #111; }
  .entete, .pied, .aller-contenu, .navigation-fiches, .sommaire, .lien-app, .exo-actions, .tri-choix-groupe, .tri-retour, .tri-bilan, .calc-bilan, .simulateur-bilan, .calcul-temps, .bouton { display: none !important; }
  .bandeau-page { background: none !important; color: #111; padding: 0 0 .5rem; border-bottom: 2px solid #1c3b2e; }
  .bandeau-page h1, .bandeau-page p, .bandeau-page .fil a { color: #111 !important; }
  .bandeau-page h1 em { color: #1c3b2e; }
  .fiche { width: 100%; padding: 1rem 0 0; }
  .fiche h2 { break-after: avoid; }
  .etape-fiche, .exemple, .piege, .exercice, table, .en-bref { break-inside: avoid; }
  details > *:not(summary) { display: block !important; }
  details summary { display: none; }
  .tableau-defile { overflow: visible; }
  .fiche::after { content: "Source : Examélior, Chafi GANGAT, examelior.fr"; display: block; margin-top: 1.5rem; font-size: 9pt; color: #555; }
  .lettre, .puce, .ressources li::before, .etiquette-b, .etape-fiche .num, .marche li::before { color: #fff !important; background: #1c3b2e !important; }
  .bouton.plein { color: #111 !important; background: #fff !important; }
  .heros { background: none !important; padding: 0 0 1rem; }
  .heros *, .bandeau-page * { color: #111 !important; }
  .heros em, .bandeau-page em { color: #1c3b2e !important; }
  .heros-visuel, .heros-bas { display: none !important; }
  a { color: inherit; text-decoration: none; }
}
