/* Atlas (12/11/2026) — styles des écrans refaits : accueil, lecture d'un chapitre, cartes de cours.
   (Max professeur : css/atelier.css, section « Max prof » ; documents : css/perso.css.)
   Chargé après app.css, atelier.css et perso.css. Uniquement des variables de studyos-tokens.css.
   Les composants d'Atlas (.sentier, .etat, .repere, .borne, .pro) viennent de studyos-components.css.
   Les seuils des @media et @container sont les seules valeurs écrites ici : une condition ne peut pas
   être une variable.

   0. À remonter dans les jetons
   1. Communs : cartouche, titre de bloc, liste, case, échéance, source
   2. Accueil : titre-écran, itinéraire du jour, tableau de bord, cascade
   3. Lecture d'un chapitre : outils, sommaire, légende des surlignages, tableaux et frises
   4. Cours : cartes dans les couleurs de matière, page d'un cours
   5. Mouvement réduit
*/

/* ----------------------------------------------------------
   0. À REMONTER DANS LES JETONS (chantier F : studyos-tokens.css)
      Des valeurs propres aux écrans, qui n'existent pas encore dans les jetons.
   ---------------------------------------------------------- */
/* (remontés dans studyos-tokens.css, section « Atlas — écrans ») */

/* ----------------------------------------------------------
   1. Communs
   ---------------------------------------------------------- */
/* La cartouche : la carte de Trame (feuille sur vélin). */
.at-cartouche { position: relative; min-width: 0; padding: var(--s-5); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.at-cartouche__vide { font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-cartouche__vide a, .at-titre-bloc a { color: var(--c-ardoise-text); font-weight: var(--fw-moyen); text-underline-offset: var(--decal-souligne); }

.at-titre-bloc { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); min-width: 0; margin-bottom: var(--s-3); }
.at-titre-bloc h2 { margin: 0; font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); line-height: var(--lh-titre); letter-spacing: var(--tr-titre); color: var(--c-ink); min-width: 0; overflow-wrap: anywhere; }
.at-titre-bloc > a { flex-shrink: 0; font-size: var(--t-s); display: inline-flex; align-items: center; min-height: var(--size-cible); margin: calc((var(--size-cible) - var(--lh-ui) * var(--t-s)) / -2) 0; }
.at-titre-bloc__compte { flex-shrink: 0; font-size: var(--t-s); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; }

/* Les listes d'une cartouche : un filet entre les lignes, rien autour. */
.at-liste { margin: 0; padding: 0; list-style: none; display: grid; }
.at-liste > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: start; min-width: 0; padding: var(--s-3) 0; border-top: var(--w-trait) solid var(--c-line); }
.at-liste > li:first-child { border-top: 0; padding-top: 0; }
.at-liste > li:last-child { padding-bottom: 0; }
.at-liste__ic { width: var(--size-icone); height: var(--size-icone); margin-top: var(--s-0); color: var(--c-ink-3); }
.at-liste__ic--ocre { color: var(--c-ocre); }
.at-liste__corps { min-width: 0; display: grid; gap: var(--s-0); }
.at-liste__titre { margin: 0; font-size: var(--t-m); font-weight: var(--fw-fort); line-height: var(--lh-ui); color: var(--c-ink); overflow-wrap: break-word; hyphens: auto; text-decoration: none; }
a.at-liste__titre { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: var(--decal-souligne); transition: text-decoration-color var(--d-survol) var(--ease-survol); }
@media (hover: hover) and (pointer: fine) { a.at-liste__titre:hover { text-decoration-color: currentColor; } }
.at-liste__meta { margin: 0; font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-liste__bout { display: grid; justify-items: end; gap: var(--s-1); text-align: right; font-size: var(--t-s); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; max-width: 45vw; }
.at-liste__bout b { display: block; color: var(--c-ink); font-size: var(--t-m); white-space: nowrap; }
.at-liste__bout a { color: var(--c-ardoise-text); font-weight: var(--fw-moyen); white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--size-cible); margin: calc(var(--s-3) * -1) 0; }
.at-liste__bout .sty-tag { white-space: nowrap; }
.at-liste > li > .sty-btn { align-self: center; }
.at-liste__ligne--faite .at-liste__titre { text-decoration: line-through; text-decoration-thickness: var(--w-trait); color: var(--c-ink-3); }

/* L'échéance : ocre, terre quand elle est passée. Toujours un mot. */
.at-echeance { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--size-pastille); padding: var(--s-0) var(--s-2); border-radius: var(--r-m); background: var(--c-ocre-soft); color: var(--c-ocre); font-size: var(--t-xs); font-weight: var(--fw-fort); line-height: var(--lh-ui); white-space: normal; text-align: right; }
.at-echeance--retard { background: var(--c-terre-soft); color: var(--c-terre); }

/* La case à cocher d'un devoir : cible de 44 px, boîte de 20 px, vert de gris une fois faite. */
.at-case { width: var(--size-cible); height: var(--size-cible); margin: calc(var(--s-3) * -1) 0 calc(var(--s-3) * -1) calc(var(--s-3) * -1); display: grid; place-items: center; padding: 0; border: 0; background: transparent; border-radius: var(--r-s); color: var(--c-on-ardoise); cursor: pointer; transition: transform var(--d-press) var(--ease-out); }
.at-case:active { transform: scale(var(--scale-press)); }
.at-case__boite { width: var(--size-icone); height: var(--size-icone); display: grid; place-items: center; border-radius: var(--r-xs); box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-control); transition: background-color var(--d-survol) var(--ease-survol), box-shadow var(--d-survol) var(--ease-survol); }
.at-case__boite .sty-icon { width: var(--size-icone-s); height: var(--size-icone-s); opacity: 0; transition: opacity var(--d-survol) var(--ease-survol); }
.at-case[aria-checked="true"] .at-case__boite { background: var(--c-vert); box-shadow: none; }
.at-case[aria-checked="true"] .at-case__boite .sty-icon { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .at-case:hover .at-case__boite { box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ink-2); } .at-case[aria-checked="true"]:hover .at-case__boite { box-shadow: none; } }

/* La source d'une recommandation : une ligne, petite, en encre 2. */
.at-source { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; font-size: var(--t-s); line-height: var(--lh-ui); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-source > .sty-icon { flex-shrink: 0; margin-top: var(--s-0); }
.at-source > span { min-width: 0; }

/* ----------------------------------------------------------
   2. Accueil : le centre de pilotage
   ---------------------------------------------------------- */
.at-accueil { container: at-accueil / inline-size; display: grid; gap: var(--s-6); align-content: start; }
.at-accueil > .section, .at-accueil > .carte-prenom { margin: 0; }

/* Le titre-écran : la date en capitales ocre, le bonjour en Alegreya, la phrase et le résumé. */
.at-titre-ecran { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--s-4); margin: 0; }
.at-titre-ecran__textes { display: grid; gap: var(--s-1); min-width: 0; }
.at-titre-ecran__date { margin: 0; font-size: var(--t-s); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); }
.at-titre-ecran__titre.vue-titre { margin: 0; font-family: var(--font-titre); font-size: var(--t-2xl); font-weight: var(--fw-titre); line-height: var(--lh-serre); letter-spacing: var(--tr-affiche); color: var(--c-ink); overflow-wrap: anywhere; }
.at-titre-ecran__phrase { margin: 0; max-width: var(--mesure); font-size: var(--t-m); line-height: var(--lh-ui); color: var(--c-ink-2); text-wrap: pretty; }
.at-titre-ecran__resume { color: var(--c-ink); }
.at-titre-ecran__cote { display: flex; align-items: flex-start; gap: var(--s-6); }
.at-titre-ecran__borne { display: none; width: var(--size-borne-s); pointer-events: none; }
.at-titre-ecran__borne .borne { width: 100%; height: auto; }
/* Une seule borne à la fois : si l'accueil montre déjà un état vide (avec sa borne), l'en-tête n'en remet pas. */
.vue-page:has(.sty-empty .borne) .at-titre-ecran__borne { visibility: hidden; }
@container at-accueil (min-width: 760px) {
  .at-titre-ecran__titre.vue-titre { font-size: var(--t-3xl); }
  .at-titre-ecran__phrase { font-size: var(--t-lecture); }
  .at-titre-ecran__borne { display: block; }
}

/* L'itinéraire du jour : un sentier vertical sur téléphone, horizontal (et qui défile) sur ordinateur. */
.at-itineraire { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.at-etape { position: relative; display: grid; grid-template-columns: var(--size-repere-l) minmax(0, 1fr); gap: var(--s-3); min-width: 0; padding-bottom: var(--s-5); }
.at-etape:last-child { padding-bottom: 0; }
.at-etape::before { /* le tronçon vers l'étape suivante : pointillé à parcourir */
  content: ""; position: absolute; left: calc(var(--size-repere-l) / 2 - var(--w-chemin) / 2); top: var(--size-repere-l); bottom: 0; width: var(--w-chemin);
  background-image: linear-gradient(var(--c-line-strong) 50%, transparent 50%); background-size: var(--w-chemin) var(--s-2);
}
.at-etape:last-child::before { display: none; }
.at-etape--passee::before { background: var(--c-ocre-fill); }
.at-etape__repere { position: relative; width: var(--size-repere-l); height: var(--size-repere-l); display: grid; place-items: center; border-radius: var(--r-rond); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-line-strong); color: var(--c-ink-2); }
.at-etape__repere .sty-icon { width: var(--size-icone-s); height: var(--size-icone-s); }
.at-etape--passee .at-etape__repere { box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ocre-fill); color: var(--c-ocre); }
.at-etape--ici .at-etape__repere { background: var(--c-marque-vif); box-shadow: none; color: var(--c-surface); }   /* « tu es ici » */
.at-etape--prochaine .at-etape__repere { box-shadow: inset 0 0 0 var(--w-trait-fort) var(--c-ardoise); color: var(--c-ardoise-text); }
.at-etape__corps { display: grid; align-content: start; gap: var(--s-0); min-width: 0; padding-top: var(--s-0); }
.at-etape__quand { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); font-size: var(--t-s); color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; }
.at-etape__quand b { color: var(--c-ink); }
.at-etape__quand .etat { padding: 0 var(--s-2); }
.at-etape__titre { justify-self: start; font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); line-height: var(--lh-titre); color: var(--c-ink); overflow-wrap: break-word; hyphens: auto; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: var(--decal-souligne); transition: text-decoration-color var(--d-survol) var(--ease-survol); }
@media (hover: hover) and (pointer: fine) { .at-etape__titre:hover { text-decoration-color: currentColor; } }
.at-etape__detail { font-size: var(--t-s); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-etape--passee .at-etape__titre { color: var(--c-ink-2); }
@container at-accueil (min-width: 760px) {
  .at-itineraire { grid-auto-flow: column; grid-auto-columns: minmax(var(--size-etape), 1fr); gap: var(--s-4); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: var(--s-2); }
  .at-etape { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--size-repere-l) auto; padding-bottom: 0; }
  .at-etape::before {
    left: var(--size-repere-l); right: calc(var(--s-4) * -1); top: calc(var(--size-repere-l) / 2 - var(--w-chemin) / 2); bottom: auto; width: auto; height: var(--w-chemin);
    background-image: linear-gradient(90deg, var(--c-line-strong) 50%, transparent 50%); background-size: var(--s-2) var(--w-chemin);
  }
  .at-etape--passee::before { background: var(--c-ocre-fill); }
}
.at-route .sty-empty { padding: var(--s-6) var(--s-4); }

/* Le tableau de bord : une colonne sur téléphone, deux à partir d'une largeur d'ordinateur. */
.at-tableau-bord { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
.at-tableau-bord__col { display: grid; gap: var(--s-5); min-width: 0; align-content: start; }
@container at-accueil (min-width: 760px) { .at-tableau-bord { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }

/* Reprendre */
.at-reprendre { display: grid; gap: var(--s-4); }
.at-reprendre .at-titre-bloc { margin-bottom: 0; }
.at-reprendre__corps { display: grid; gap: var(--s-1); min-width: 0; }
.at-reprendre__titre { justify-self: start; font-family: var(--font-titre); font-size: var(--t-xl); font-weight: var(--fw-titre); line-height: var(--lh-titre); color: var(--c-ink); overflow-wrap: anywhere; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .at-reprendre__titre:hover { text-decoration: underline; text-underline-offset: var(--decal-souligne); text-decoration-thickness: var(--w-trait); } }
.at-reprendre__meta { margin: 0 0 var(--s-2); font-size: var(--t-s); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-reprendre__sentier .sentier__entete { color: var(--c-ink-2); }
.at-reprendre__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Max te propose : le visage de Max (la seule sphère violette), une phrase en Alegreya, la source. */
.at-max-reco { display: grid; gap: var(--s-3); }
.at-max-reco__tete { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.at-max-reco__tete h2 { margin: 0; font-family: var(--font-texte); font-size: var(--t-s); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ink-2); }
.at-max-reco__visage { width: var(--size-avatar); height: var(--size-avatar); flex-shrink: 0; }
.at-max-reco [data-proposition] { display: grid; gap: var(--s-3); min-width: 0; }
.at-max-reco__texte { margin: 0; font-family: var(--font-titre); font-size: var(--t-xl); line-height: var(--lh-titre); color: var(--c-ink); overflow-wrap: anywhere; text-wrap: pretty; }
.at-max-reco__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* La cascade de l'arrivée (une fois par jour) : meneur 12 px, soutiens 8 px, décor en fondu seul.
   Animations réduites : les jetons --rise-* et --d-pas valent 0, il reste un fondu commun. */
.at-joue-cascade [data-cascade] { animation: at-cascade var(--d-entree-support) var(--ease-out) both; animation-delay: calc(var(--delai, 0ms) * var(--d-pas)); }
.at-joue-cascade [data-cascade="meneur"] { --rise: var(--rise-lead); animation-duration: var(--d-entree); }
.at-joue-cascade [data-cascade="soutien"] { --rise: var(--rise-support); }
.at-joue-cascade [data-cascade="decor"] { --rise: 0px; animation-name: none; }
@keyframes at-cascade { from { opacity: 0; transform: translateY(var(--rise, 0px)); } }
/* En attendant que l'intro parte, ce qui va entrer reste invisible (rien ne se montre puis disparaît). */
.at-attend-cascade [data-cascade]:not([data-cascade="decor"]) { opacity: 0; }

/* ----------------------------------------------------------
   3. Lecture d'un chapitre
   ---------------------------------------------------------- */
.at-lecture { container: at-lecture / inline-size; }
.lecture.at-lecture--sommaire { max-width: calc(var(--size-read) + var(--size-sommaire) + var(--s-10) + 2 * var(--s-12)); }
.at-lecture__texte { position: relative; }
.at-lecture .texte-cours { max-width: var(--mesure); }
.at-lu .sentier__entete { color: var(--c-ink-2); }
.lecture-pied__sentier { width: 100%; }
.at-lecture__sommaire-panneau { display: grid; gap: var(--s-4); }
.at-lecture__grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.at-lecture__sommaire { display: none; }
@container at-lecture (min-width: 860px) {
  .at-lecture__grille { grid-template-columns: minmax(0, var(--size-sommaire)) minmax(0, 1fr); gap: var(--s-10); }
  .at-lecture__sommaire { display: grid; gap: var(--s-4); position: sticky; top: var(--o-ancre); max-height: calc(100dvh - var(--o-ancre) - var(--s-6)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: var(--s-2); }
  .at-lecture [data-sommaire-bouton] { display: none; }
}
.at-lecture__texte { min-width: 0; }
.at-lecture .lecture__titre { font-family: var(--font-titre); font-size: calc(var(--t-lecture) * var(--doc-echelle-h1)); font-weight: var(--fw-titre); line-height: var(--lh-serre); letter-spacing: var(--tr-affiche); overflow-wrap: anywhere; hyphens: auto; text-wrap: balance; }
@container at-lecture (min-width: 760px) { .at-lecture .lecture__titre { font-size: var(--t-3xl); } }
.at-lecture .lecture__meta { font-size: var(--t-s); color: var(--c-ink-2); }
.at-lecture__cours { margin: 0 0 var(--s-1); font-size: var(--t-s); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); overflow-wrap: anywhere; }
.at-lecture .texte-cours :is(h2, h3, h4) { scroll-margin-top: var(--o-ancre); }

/* Les outils au-dessus du texte : le sommaire (fenêtres étroites) et la légende des surlignages. */
.at-lecture__outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-5); }
.at-legende { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0; font-size: var(--t-s); color: var(--c-ink-2); }
.at-legende__bouton { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--size-cible); max-width: 100%; padding: 0 var(--s-3); border: 0; border-radius: var(--r-rond); background: var(--c-surface); box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); font: inherit; font-size: var(--t-s); color: var(--c-ink); cursor: pointer; transition: transform var(--d-press) var(--ease-out), color var(--d-survol) var(--ease-survol); }
.at-legende__bouton:active { transform: scale(var(--scale-press)); }
.at-legende__bouton > span:not(.at-legende__ech) { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.at-legende__bouton[aria-pressed="false"] { color: var(--c-ink-3); }
.at-legende__bouton[aria-pressed="false"] .at-legende__ech { opacity: 0.35; }
.at-legende__ech { flex-shrink: 0; width: var(--s-4); height: var(--s-3); border-radius: var(--r-xs); transition: opacity var(--d-survol) var(--ease-survol); }
.at-legende__n { color: var(--c-ink-2); font-variant-numeric: lining-nums tabular-nums; }
@media (hover: hover) and (pointer: fine) { .at-legende__bouton:hover { box-shadow: inset 0 0 0 var(--w-trait) var(--c-control); } }

/* Le sommaire : un filet à gauche, le titre lu en ocre. */
.at-sommaire__cours { margin: 0; font-size: var(--t-xs); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-toc { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); font-size: var(--t-s); }
.at-toc a { min-height: var(--size-cible); display: flex; align-items: center; padding: var(--s-1) 0 var(--s-1) var(--s-3); color: var(--c-ink-2); text-decoration: none; border-left: var(--w-trait-fort) solid var(--c-line); overflow-wrap: anywhere; line-height: var(--lh-ui); transition: color var(--d-survol) var(--ease-survol), border-color var(--d-survol) var(--ease-survol); }
.at-toc a[aria-current="true"] { color: var(--c-ink); font-weight: var(--fw-fort); border-left-color: var(--c-ocre-fill); }
.at-toc .at-toc--n3 a { padding-left: var(--s-6); }
@media (hover: hover) and (pointer: fine) { .at-toc a:hover { color: var(--c-ink); } }

/* Les surlignages : un fond, et un trait de 2 px dessous (Atlas). Masqués depuis la légende. */
.texte-cours mark[class^="sl-"] { padding: 0 var(--s-0); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.texte-cours mark.sl-jaune { box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-jaune-trait); }
.texte-cours mark.sl-vert { box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-vert-trait); }
.texte-cours mark.sl-bleu { box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-bleu-trait); }
.texte-cours mark.sl-rose { box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-rose-trait); }
.texte-cours mark.sl-orange { box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-orange-trait); }
.at-legende__ech.sl-jaune { background: var(--c-sl-jaune); box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-jaune-trait); }
.at-legende__ech.sl-vert { background: var(--c-sl-vert); box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-vert-trait); }
.at-legende__ech.sl-bleu { background: var(--c-sl-bleu); box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-bleu-trait); }
.at-legende__ech.sl-rose { background: var(--c-sl-rose); box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-rose-trait); }
.at-legende__ech.sl-orange { background: var(--c-sl-orange); box-shadow: inset 0 calc(var(--w-trait-fort) * -1) 0 var(--c-sl-orange-trait); }
.texte-cours.at-sans-jaune mark.sl-jaune, .texte-cours.at-sans-vert mark.sl-vert, .texte-cours.at-sans-bleu mark.sl-bleu,
.texte-cours.at-sans-rose mark.sl-rose, .texte-cours.at-sans-orange mark.sl-orange { background: transparent; box-shadow: none; }

/* Un tableau ou une frise d'un chapitre : posé sur une feuille, défile seul s'il est large. */
.at-tableau, .at-frise { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); }
.at-frise { padding: var(--s-4); }
.at-tableau:focus-visible, .at-frise:focus-visible { outline: var(--w-focus) solid var(--c-focus); outline-offset: var(--o-focus); }

/* ----------------------------------------------------------
   4. Cours : les cartes, dans les couleurs de matière
   ---------------------------------------------------------- */
/* Chaque carte porte la couleur de sa matière : celle choisie pour le cours, sinon une couleur tirée
   de la matière (deux cours de la même matière ont la même). Une lisière en haut, la tuile teintée. */
.carte-cours.at-carte-cours { position: relative; overflow: hidden; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--sh-1); border: 0; transition: box-shadow var(--d-survol) var(--ease-survol); }
.at-carte-cours[data-couleur]::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: var(--size-lisiere); background: var(--teinte); }
/* La bannière choisie (Personnaliser la carte) : un lavis plat de la couleur, plus de dégradé ; l'image reste l'image. */
.banniere-cours:not(.banniere-cours--image):not(.banniere-cours--neutre) { background-image: none; background-color: color-mix(in oklab, var(--teinte, var(--c-cours-1)) var(--mix-cours), var(--c-surface)); }
@media (hover: hover) and (pointer: fine) { a.carte-cours.at-carte-cours:hover { box-shadow: var(--sh-2); } }
.at-carte-cours .carte-cours__titre { font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); line-height: var(--lh-titre); letter-spacing: var(--tr-titre); overflow-wrap: anywhere; hyphens: auto; }
.at-carte-cours .carte-cours__meta { font-size: var(--t-s); color: var(--c-ink-2); overflow-wrap: anywhere; }
.at-carte-cours .tuile-cours { border-radius: var(--r-m); }
.at-carte-cours .carte-cours__haut .sty-tag { flex-shrink: 0; }
.at-carte-cours .sentier__entete { color: var(--c-ink-2); }
.carte-cours-bloc .carte-cours__menu { z-index: 1; }
.carte-nouveau.at-carte-nouveau { border-radius: var(--r-m); background: transparent; box-shadow: inset 0 0 0 var(--w-trait) var(--c-line-strong); transition: box-shadow var(--d-survol) var(--ease-survol), transform var(--d-press) var(--ease-out); }
.carte-nouveau.at-carte-nouveau:active { transform: scale(var(--scale-press)); }
.at-carte-nouveau .carte-nouveau__titre { font-family: var(--font-titre); font-size: var(--t-l); font-weight: var(--fw-titre); }
@media (hover: hover) and (pointer: fine) { .carte-nouveau.at-carte-nouveau:hover { box-shadow: inset 0 0 0 var(--w-trait) var(--c-control); } }

/* La page d'un cours : titre en Alegreya, le sentier de la maîtrise. */
.at-cours-tete .vue-titre { font-family: var(--font-titre); font-size: var(--t-2xl); font-weight: var(--fw-titre); line-height: var(--lh-serre); letter-spacing: var(--tr-affiche); }
@media (min-width: 768px) { .at-cours-tete .vue-titre { font-size: var(--t-3xl); } }
.at-cours-tete .fil { font-size: var(--t-xs); font-weight: var(--fw-fort); letter-spacing: var(--tr-capitales); text-transform: uppercase; color: var(--c-ocre); }
.at-cours-tete .fil a { color: var(--c-ocre); }
.at-cours-tete__sentier { width: 100%; max-width: var(--size-col-l); margin-top: var(--s-4); }
.at-cours-tete__sentier .sentier__entete { color: var(--c-ink-2); }
.num-chapitre { font-family: var(--font-titre); font-variant-numeric: lining-nums tabular-nums; }
.num-chapitre--maitrise { background: var(--c-vert-soft); color: var(--c-vert); }
.num-chapitre--a_revoir { background: var(--c-terre-soft); color: var(--c-terre); }
.num-chapitre--en_cours { background: var(--c-marque-soft); color: var(--c-marque); }
.num-chapitre--jamais, .num-chapitre--neutre { background: var(--c-sunken); color: var(--c-ink-2); }

/* ----------------------------------------------------------
   5. Mouvement réduit (réglage de Trame ou système) : la cascade garde son fondu (jetons),
      le reste de ces écrans ne se déplace plus.
   ---------------------------------------------------------- */
:root[data-mouvement-reduit] :is(.at-case, .at-legende__bouton, .at-carte-nouveau):active { transform: none; }
@media (prefers-reduced-motion: reduce) { :is(.at-case, .at-legende__bouton, .at-carte-nouveau):active { transform: none; } }

/* ----------------------------------------------------------
   6. Cibles de 44 px : les liens-titres gardent leur dessin, leur zone de clic s'étend au-dessus et au-dessous.
   ---------------------------------------------------------- */
:is(a.at-liste__titre, .at-etape__titre, .at-reprendre__titre, .at-cours-tete .fil a) { position: relative; }
:is(a.at-liste__titre, .at-etape__titre, .at-reprendre__titre, .at-cours-tete .fil a)::after { content: ""; position: absolute; inset: calc(var(--s-3) * -1) 0; }
.lecture-barre .sty-btn { height: auto; min-height: var(--size-cible); }
