/* Styles partages de l'espace enseignants : enseignants.html, programme.html,
   en-classe.html. Extraits du bloc <style> inline de enseignants.html le 31/07/2026
   pour eviter de les tripler a l'ouverture de la section. */
        .teachers-hero {
            padding: calc(var(--nav-height) + 4rem) 2rem 3.5rem;
            text-align: center;
            background:
                radial-gradient(ellipse at 65% 50%, rgba(139, 21, 56, 0.07) 0%, transparent 55%),
                radial-gradient(ellipse at 20% 60%, rgba(26, 58, 92, 0.08) 0%, transparent 50%),
                linear-gradient(160deg, #f0ddb8 0%, #e8d4a8 40%, #dcc89a 100%);
            border-bottom: 2px solid var(--parchment-burnt);
        }

        .teachers-hero-eyebrow {
            display: inline-block;
            padding: 0.35rem 1rem;
            background: rgba(26, 58, 92, 0.1);
            border: 1px solid rgba(26, 58, 92, 0.35);
            border-radius: 100px;
            font-family: 'Cinzel', serif;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--royal-blue);
            margin-bottom: 1rem;
        }

        .teachers-hero h1 {
            font-family: 'Cinzel Decorative', serif;
            font-size: clamp(1.8rem, 4vw, 3rem);
            color: var(--royal-blue);
            /* Le paragraphe du hero est borne a 680px ; sans borne ici, le titre
               filait d'un bord a l'autre de l'ecran et desalignait le bloc. */
            max-width: 900px;
            margin: 0 auto 1rem;
            line-height: 1.2;
        }

        .teachers-hero h1 span {
            color: var(--crimson);
        }

        .teachers-hero p {
            font-size: 1.15rem;
            color: var(--ink-sepia);
            max-width: 680px;
            margin: 0 auto 2rem;
            line-height: 1.7;
        }

        .teachers-hero-ctas {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .teachers-main {
            max-width: 900px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        .teachers-section {
            padding: 4rem 0;
        }

        /* programme.html ouvre directement sur une section, sans .teachers-hero :
           au-dessus de 900px le nav est en position: fixed (site.css), il ne
           reserve donc aucune place dans le flux et le fil d'Ariane passait
           dessous. En dessous de 900px le nav repasse en position: relative et
           occupe deja sa hauteur — on ne compense plus, sinon ~124px de vide. */
        main > .teachers-section:first-child {
            padding-top: calc(var(--nav-height) + 2.5rem);
        }
        @media (max-width: 900px) {
            main > .teachers-section:first-child {
                padding-top: 2.5rem;
            }
        }

        .teachers-section-alt {
            background: linear-gradient(180deg, rgba(212, 188, 130, 0.3) 0%, rgba(232, 212, 168, 0.2) 100%);
        }

        .teachers-breadcrumb {
            font-family: 'Cinzel', serif;
            font-size: 0.8rem;
            color: var(--ink-light);
            margin-bottom: 2rem;
            letter-spacing: 0.04em;
        }

        .teachers-breadcrumb a {
            color: var(--ink-light);
            text-decoration: none;
        }

        .teachers-breadcrumb a:hover {
            color: var(--crimson);
        }

        .teachers-section h2 {
            font-family: 'Cinzel Decorative', serif;
            font-size: clamp(1.4rem, 3vw, 1.9rem);
            color: var(--royal-blue);
            margin-bottom: 1rem;
            line-height: 1.25;
        }

        .teachers-section h3,
        .teachers-section h2.titre-bloc {
            font-family: 'Cinzel', serif;
            font-size: 1.15rem;
            color: var(--ink-brown);
            margin: 2rem 0 0.75rem;
        }

        .teachers-section p {
            color: var(--ink-sepia);
            line-height: 1.75;
            margin-bottom: 1rem;
        }

        /* Liens de TEXTE uniquement. Les boutons portent leur propre couleur de
           libellé (.btn-crimson → parchemin clair, .btn-primary → encre noire,
           .btn-secondary → encre brune) : sans le :not(.btn), cette règle les
           écrasait — spécificité 0,1,1 contre 0,1,0 — et « Créer une fiche
           d'exercices » s'affichait en crimson sur fond crimson. */
        .teachers-section a:not(.btn) {
            color: var(--crimson);
            text-decoration: none;
        }

        .teachers-section a:not(.btn):hover {
            border-bottom: 1px solid var(--crimson);
        }

        .teachers-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 1rem;
            margin: 2rem 0;
        }

        .teachers-stat {
            background: rgba(255, 255, 255, 0.55);
            border: 1px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 1.25rem;
            text-align: center;
            box-shadow: 0 4px 16px var(--shadow-soft);
        }

        /* Le HTML porte <strong>, pas <b> : le selecteur d'origine ne visait
           rien et les trois chiffres du bloc de confiance s'affichaient en
           petit, colles a leur libelle, sur une seule ligne. */
        .teachers-stat strong {
            display: block;
            font-family: 'Cinzel Decorative', serif;
            font-size: 1.5rem;
            color: var(--crimson);
            margin-bottom: 0.25rem;
        }

        .teachers-stat span {
            font-size: 0.85rem;
            color: var(--ink-sepia);
        }

        .teachers-steps {
            counter-reset: step;
            list-style: none;
            padding: 0;
            margin: 1.5rem 0;
            display: grid;
            gap: 1rem;
        }

        .teachers-steps li {
            counter-increment: step;
            position: relative;
            padding: 1.25rem 1.25rem 1.25rem 4rem;
            background: rgba(255, 255, 255, 0.5);
            border: 1px solid var(--parchment-dark);
            border-radius: 12px;
        }

        .teachers-steps li::before {
            content: counter(step);
            position: absolute;
            left: 1.25rem;
            top: 1.25rem;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background: var(--gold-base);
            color: var(--ink-black);
            font-family: 'Cinzel', serif;
            font-weight: 700;
            display: grid;
            place-items: center;
            font-size: 0.9rem;
        }

        .teachers-steps li strong {
            display: block;
            font-family: 'Cinzel', serif;
            color: var(--ink-brown);
            margin-bottom: 0.25rem;
        }

        .teachers-steps li span {
            color: var(--ink-sepia);
            font-size: 0.97rem;
        }

        .teachers-feature-list {
            list-style: none;
            padding: 0;
            margin: 1rem 0;
        }

        .teachers-feature-list li {
            padding: 0.55rem 0 0.55rem 1.75rem;
            position: relative;
            color: var(--ink-sepia);
            line-height: 1.65;
            border-bottom: 1px solid rgba(212, 188, 130, 0.5);
        }

        .teachers-feature-list li:last-child {
            border-bottom: none;
        }

        .teachers-feature-list li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: var(--gold-dark);
            font-weight: 700;
        }

        .teachers-cta {
            background: linear-gradient(160deg, var(--royal-blue) 0%, #243f68 100%);
            border: 2px solid var(--gold-base);
            border-radius: 12px;
            padding: 2.5rem 2rem;
            text-align: center;
            margin: 2.5rem 0 0;
            box-shadow: 0 8px 32px rgba(26, 58, 92, 0.35);
        }

        .teachers-cta h2 {
            font-family: 'Cinzel Decorative', serif;
            font-size: 1.5rem;
            color: var(--gold-light);
            margin-bottom: 0.75rem;
        }

        .teachers-cta p {
            color: rgba(245, 230, 200, 0.9);
            margin-bottom: 1.5rem;
        }

        .teachers-link-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 1rem;
            margin-top: 1.5rem;
        }

        .teachers-link-grid a {
            display: block;
            background: rgba(255, 255, 255, 0.55);
            border: 1px solid var(--parchment-dark);
            border-radius: 12px;
            padding: 1.25rem;
            text-align: center;
            text-decoration: none;
            color: var(--ink-brown);
            font-family: 'Cinzel', serif;
            font-weight: 600;
            font-size: 0.9rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

        .teachers-link-grid a:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 28px var(--shadow-soft);
            border-color: var(--gold-base);
            border-bottom: 1px solid var(--gold-base);
        }

        .teachers-faq .faq-category-title {
            font-size: clamp(1.4rem, 3vw, 1.9rem);
            margin-bottom: 2rem;
        }

        .teachers-features {
            margin-top: 2rem;
        }

        /* ── Couverture du programme ─────────────────────────────────── */
        .prog-section {
            scroll-margin-top: calc(var(--nav-height) + 1rem);
            border-top: 2px solid var(--parchment-burnt);
            border-bottom: 2px solid var(--parchment-burnt);
            background:
                radial-gradient(ellipse at 20% 0%, rgba(26, 58, 92, 0.05) 0%, transparent 55%),
                linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 100%);
        }

        .prog-lede {
            font-size: 1.05rem;
        }

        .prog-tablewrap {
            overflow-x: auto;
            margin: 1.5rem 0 0.75rem;
            border: 1px solid var(--parchment-dark);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.5);
            box-shadow: 0 4px 16px var(--shadow-soft);
            -webkit-overflow-scrolling: touch;
        }

        table.prog-table {
            border-collapse: collapse;
            width: 100%;
            min-width: 720px;
            font-size: 0.95rem;
        }

        /* Les tableaux débordent de la colonne de texte (900px) sur grand écran :
           la prose reste lisible, le tableau respire. */
        @media (min-width: 1080px) {
            .prog-section .prog-tablewrap,
            .prog-section .prog-details {
                width: min(1180px, calc(100vw - 4rem));
                margin-left: 50%;
                transform: translateX(-50%);
            }

            .prog-section .prog-details .prog-tablewrap {
                width: auto;
                margin-left: 0;
                transform: none;
            }
        }

        .prog-table th,
        .prog-table td {
            padding: 0.85rem 1.1rem;
            text-align: left;
            vertical-align: top;
            border-bottom: 1px solid rgba(212, 188, 130, 0.6);
        }

        .prog-table thead th {
            font-family: 'Cinzel', serif;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--ink-light);
            background: rgba(212, 188, 130, 0.3);
            border-bottom: 2px solid var(--parchment-burnt);
            white-space: nowrap;
        }

        .prog-table tbody tr:last-child td {
            border-bottom: none;
        }

        .prog-table tbody tr:hover td {
            background: rgba(255, 255, 255, 0.45);
        }

        .prog-table td:first-child {
            color: var(--ink-brown);
            font-weight: 600;
            min-width: 15rem;
        }

        .prog-table td.prog-ours {
            color: var(--ink-sepia);
            min-width: 17rem;
        }

        .prog-table td.prog-ours a {
            color: inherit;
            text-decoration: underline;
            text-underline-offset: 2px;
        }

        .prog-table td.prog-ours a:hover {
            text-decoration-thickness: 2px;
        }

        .prog-table td.prog-note {
            color: var(--ink-light);
            font-size: 0.88rem;
            min-width: 14rem;
        }

        .prog-state {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            white-space: nowrap;
            font-family: 'Cinzel', serif;
            font-size: 0.82rem;
            font-weight: 600;
        }

        .prog-state::before {
            content: "";
            width: 0.62rem;
            height: 0.62rem;
            border-radius: 50%;
            flex: none;
        }

        .prog-ok { color: var(--emerald); }
        .prog-ok::before { background: var(--emerald); }
        .prog-part { color: var(--gold-dark); }
        .prog-part::before { background: var(--gold-dark); }
        .prog-wip { color: var(--royal-blue); }
        .prog-wip::before { background: var(--royal-blue); box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.18); }
        .prog-none { color: var(--crimson); }
        .prog-none::before { background: transparent; border: 1.5px solid var(--crimson); }
        .prog-out { color: var(--ink-light); }
        .prog-out::before { background: var(--parchment-burnt); }

        .prog-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem 1.5rem;
            list-style: none;
            padding: 0;
            margin: 0 0 0.5rem;
            font-size: 0.85rem;
            color: var(--ink-sepia);
        }

        .prog-legend li {
            display: flex;
            align-items: baseline;
            gap: 0.4rem;
        }

        .prog-scroll-hint {
            font-size: 0.82rem;
            color: var(--ink-light);
            font-style: italic;
            margin-bottom: 2rem;
        }

        .prog-details {
            border: 1px solid var(--parchment-dark);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.45);
            margin: 2rem 0 0;
            overflow: hidden;
        }

        .prog-details > summary {
            cursor: pointer;
            padding: 1.1rem 1.25rem;
            font-family: 'Cinzel', serif;
            font-weight: 600;
            color: var(--royal-blue);
            list-style: none;
        }

        .prog-details > summary::-webkit-details-marker {
            display: none;
        }

        .prog-details > summary::before {
            content: "▸ ";
            color: var(--gold-dark);
        }

        .prog-details[open] > summary::before {
            content: "▾ ";
        }

        .prog-details > summary:hover {
            color: var(--crimson);
        }

        .prog-cycle {
            background: rgba(255, 255, 255, 0.6);
            border-color: var(--parchment-burnt);
            box-shadow: 0 4px 16px var(--shadow-soft);
            margin: 1rem 0 0;
        }

        .prog-cycle > summary {
            display: block;
            padding: 1.15rem 1.35rem;
        }

        .prog-cycle > summary::before,
        .prog-cycle[open] > summary::before {
            content: none;
        }

        .prog-cycle-name {
            display: block;
            font-family: 'Cinzel Decorative', serif;
            font-size: 1.1rem;
            color: var(--royal-blue);
        }

        .prog-cycle-name::before {
            content: "▸ ";
            color: var(--gold-dark);
        }

        .prog-cycle[open] .prog-cycle-name::before {
            content: "▾ ";
        }

        .prog-cycle-meta {
            display: block;
            margin-top: 0.3rem;
            font-family: 'Literata', Georgia, serif;
            font-weight: 400;
            font-size: 0.88rem;
            color: var(--ink-sepia);
        }

        .prog-footnote {
            font-size: 0.85rem;
            color: var(--ink-light);
            font-style: italic;
            padding: 0.9rem 1.35rem 1.1rem;
            margin: 0;
        }

        .prog-cycle .prog-footnote {
            border-top: 1px solid var(--parchment-dark);
        }

        .prog-details .prog-tablewrap {
            margin: 0;
            border: none;
            border-top: 1px solid var(--parchment-dark);
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .prog-details .prog-table {
            min-width: 700px;
        }

        .prog-sources {
            font-size: 0.85rem;
            color: var(--ink-light);
            line-height: 1.7;
            margin-top: 2rem;
            padding-top: 1.25rem;
            border-top: 1px solid var(--parchment-dark);
        }

        .prog-sources a {
            color: var(--ink-sepia);
        }

        /* Sur petit écran, les tableaux deviennent des blocs empilés :
           chaque cellule porte son intitulé de colonne (data-label). */
        @media (max-width: 767px) {
            .prog-tablewrap {
                overflow-x: visible;
            }

            table.prog-table,
            .prog-details table.prog-table {
                min-width: 0;
            }

            .prog-table thead {
                position: absolute;
                width: 1px;
                height: 1px;
                overflow: hidden;
                clip: rect(0 0 0 0);
                white-space: nowrap;
            }

            .prog-table tr {
                display: block;
                padding: 0.9rem 0 1.1rem;
                border-bottom: 1px solid var(--parchment-burnt);
            }

            .prog-table tbody tr:last-child {
                border-bottom: none;
            }

            .prog-table td,
            .prog-table td:first-child,
            .prog-table td.prog-ours,
            .prog-table td.prog-note {
                display: block;
                border: none;
                min-width: 0;
                padding: 0.25rem 1.1rem;
            }

            .prog-table td::before {
                content: attr(data-label);
                display: block;
                font-family: 'Cinzel', serif;
                font-size: 0.65rem;
                text-transform: uppercase;
                letter-spacing: 0.1em;
                color: var(--ink-light);
                margin-bottom: 0.15rem;
            }

            .prog-table td:first-child {
                font-size: 1.02rem;
                line-height: 1.4;
                padding-bottom: 0.5rem;
            }

            .prog-table td:first-child::before {
                display: none;
            }

            .prog-table tbody tr:hover td {
                background: none;
            }

            .prog-scroll-only {
                display: none;
            }
        }

/* ── FAQ de l'espace enseignants ─────────────────────────────────────────────
   faq.css est ecrite pour le balisage de faq.html : <div class="faq-question">
   contenant un <h3> et le <span class="faq-toggle">. Ici la question est un
   <button> (focusable au clavier, annonce comme controle) — forme preferable,
   mais qui arrive avec le style UA du navigateur : bordure grise, police
   systeme, et surtout largeur shrink-to-fit. Resultat avant reset : six boutons
   de largeurs differentes flottant chacun dans sa carte, et le « + » colle au
   texte puisque `justify-content: space-between` n'avait aucun espace libre a
   repartir. */
.teachers-faq .faq-question {
  width: 100%;
  margin: 0;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  gap: 1rem;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-brown);
}
.teachers-faq .faq-question .faq-toggle { flex: none; line-height: 1; }

/* ── Onglets de cycle (programme.html) ───────────────────────────────────────
   Greffes sur les <details> existants : sans JS, la page reste un accordeon.
   La barre est masquee quand le JS n'a pas pu s'executer serait trompeur, on la
   laisse donc visible et inerte plutot que d'ouvrir un etat incoherent. */
.prog-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 18px; }
.prog-tab {
  flex: 1 1 160px; display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border: 1px solid var(--parchment-dark, #d9d8d1);
  background: transparent; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: inherit;
  text-align: left; transition: background .15s, border-color .15s;
}
.prog-tab span { font-weight: 400; font-size: .82em; opacity: .7; }
.prog-tab:hover { background: rgba(51, 71, 91, .06); }
.prog-tab.is-on {
  background: var(--royal, #33475B); border-color: var(--royal, #33475B); color: #fff;
}
.prog-tab.is-on span { opacity: .85; }
/* L'entete de volet fait doublon avec les onglets — mais UNIQUEMENT si le script
   a pu s'executer : sans lui, le summary est le seul moyen d'ouvrir un cycle. */
.prog-tabs-actifs .prog-details.prog-cycle > summary { display: none; }
@media (max-width: 560px) { .prog-tab { flex: 1 1 100%; } }

/* ── Blocs d'appel a l'action et liens de pied de section ────────────────── */
.teachers-cta-block { text-align: center; }
.teachers-cta-block .btn { margin-top: 6px; }

/* Seconde issue du bloc d'appel : lire avant de générer (pages /exercices/). */
.prog-cta-suite {
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--ink-sepia);
}
.teachers-links-inline { margin-top: 22px; font-size: .92rem; opacity: .8; }
.teachers-links-inline a { white-space: nowrap; }
/* À 320 px, « DictoQuest en classe sans offre établissement » est plus large que l'écran
   (WCAG 1.4.10) : sur petit écran, un lien long passe à la ligne. */
@media (max-width: 480px) { .teachers-links-inline a { white-space: normal; } }
.teachers-note { margin-top: 22px; padding: 14px 18px; border-left: 3px solid var(--gold, #c8a45c);
  background: rgba(200, 164, 92, .08); font-size: .95rem; }


/* ── Hub de l'espace enseignants ─────────────────────────────────────────────
   Les destinations de la section, a egalite. La carte « bientot » n'est pas un
   lien : elle annonce sans simuler une page qui n'existe pas encore. */
/* Quatre portes : une grille 2x2 les tient a egalite. En auto-fit on obtenait
   3 + 1, qui hierarchise sans le vouloir la carte releguee seule en bas. */
.hub-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
@media (max-width: 780px) { .hub-grid { grid-template-columns: 1fr; } }
.hub-card {
  display: flex; flex-direction: column; gap: 8px; padding: 26px 26px 22px;
  border: 1px solid var(--parchment-dark, #e3e2db); border-radius: 12px;
  background: rgba(255, 255, 255, .55); text-decoration: none;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
/* Sélecteur qualifié par la section, et pas `.hub-card` seul : la carte est un
   <a> dans `.teachers-section`, donc `.teachers-section a:not(.btn)` la vise à
   0,2,0 — `:not()` compte la spécificité de son argument. Un simple
   `color: inherit` était écrasé en silence, et la carte héritait du crimson des
   liens de texte. Invisible tant que h2 et p portent leur propre couleur ;
   le premier texte nu ajouté dans une carte l'aurait révélé. */
.teachers-section a.hub-card { color: inherit; }
a.hub-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20, 22, 28, .10);
  border-color: var(--gold, #c8a45c); }
.hub-card h2 { margin: 0; font-size: 1.25rem; }
.hub-card p { margin: 0; flex: 1; font-size: .95rem; line-height: 1.6; opacity: .85; }
/* Les icones etaient des emoji : rendu different sur chaque OS, et etranger a la
   direction artistique illustree du reste du produit. Ce sont desormais les
   assets du jeu (`frontend/assets`), copies dans `images/teachers/`. Hauteur
   fixe et `width: auto` : les sources vont du carre (169x168) au portrait
   (372x649), seule la hauteur peut les aligner. */
/* Boite carree + `object-fit: contain` + image CENTREE dedans. Les sources vont du
   quasi-carre (279x288) a l'oriflamme en 372x649 : dans une boite de 64, cette
   derniere ne fait que 37 de large, et calee a gauche elle paraissait decalee des
   autres. Le centrage aligne les masses optiques, pas les bords. */
.hub-icon { height: 64px; width: 64px; object-fit: contain; object-position: center; align-self: flex-start; }

/* Meme traitement pour les cartes de en-classe.html, qui heritent de
   `.feature-icon` (site.css) — calee pour un emoji en `font-size: 2.5rem`. */
.teachers-features .feature-icon {
  height: 64px;
  width: 64px;
  object-fit: contain;
  object-position: center;
  margin-bottom: 1rem;
}

/* ── Apercu d'une fiche reelle (enseignants.html) ────────────────────────────
   Deux captures d'une generation reelle. `object-fit: cover` + `object-position:
   top` : on montre le haut de la feuille, la coupe basse est assumee et signale
   que la page continue. Sans elle, une A4 entiere reduite a 400px de large
   devient illisible et ne prouve plus rien. */
.fiche-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 2rem 0 1.5rem;
}
@media (max-width: 700px) { .fiche-preview { grid-template-columns: 1fr; } }
.fiche-preview figure { margin: 0; }
/* Degrade blanc sur le dernier quart : la coupe nette laissait croire a une
   image tronquee. Il porte sur un conteneur dedie et non sur la <figure>, qui
   contient aussi la legende — un `bottom: 0` sur la figure aurait voile le
   texte. Pose par-dessus l'image mais dans le cadre, pour ne pas l'effacer :
   c'est le cadre qui dit « feuille », le degrade dit « ca continue ». */
.fiche-shot { position: relative; display: block; }
.fiche-shot::after {
  content: '';
  position: absolute;
  left: 1px; right: 1px; bottom: 1px;
  height: 90px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 88%);
  pointer-events: none;
}
.fiche-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
  background: #fff;
  border: 1px solid var(--parchment-dark, #d4bc82);
  border-radius: 6px;
  box-shadow: 0 10px 30px var(--shadow-soft, rgba(20, 22, 28, .12));
}
.fiche-preview figcaption {
  margin-top: 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light, #7a6a4f);
  text-align: center;
}
.fiche-preview-note { font-size: 0.95rem; }
.fiche-preview-note code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(26, 58, 92, 0.08);
}
.hub-go { margin-top: 6px; font-weight: 600; color: var(--crimson, #8B1538); }
.hub-card-bientot { opacity: .72; }
.hub-card-bientot .hub-go { color: inherit; opacity: .6; font-weight: 500; }
.hub-tag { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: .62em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  vertical-align: middle; background: var(--gold, #c8a45c); color: #fff; }

/* ── Portail établissement (enseignants.html) ────────────────────────────────
   La page mène d'abord au portail (atouts, maquette de « Ma classe », parcours
   démo → test → devis) ; les ressources gratuites viennent ensuite. */
.teachers-hero-sub {
  margin: 1.25rem auto 0 !important;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem !important;
  letter-spacing: 0.05em;
  color: var(--ink-light, #7a6a4f) !important;
}

/* Sur le fond bleu du bloc d'appel, le bouton secondaire (encre brune sur
   transparent) devenait illisible : il passe en parchemin. */
.teachers-cta .btn-secondary { color: var(--parchment-light); border-color: rgba(245, 230, 200, .55); }
.teachers-cta .btn-secondary:hover { color: var(--gold-light); border-color: var(--gold-base); background: rgba(245, 230, 200, .08); }

.portail-atouts { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 1.5rem; }
@media (max-width: 860px) { .portail-atouts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portail-atouts { grid-template-columns: 1fr; } }
.portail-atout {
  padding: 22px 22px 18px;
  border: 1px solid var(--parchment-dark, #d4bc82);
  border-radius: 12px;
  background: rgba(255, 255, 255, .55);
}
.portail-atout img { height: 52px; width: 52px; object-fit: contain; object-position: center; display: block; }
.teachers-section .portail-atout h3 { margin: .75rem 0 .4rem; font-size: 1.02rem; }
.teachers-section .portail-atout p { margin: 0; font-size: .93rem; line-height: 1.6; }

/* Maquette de l'écran « Ma classe » : une illustration en HTML, pas une capture.
   Elle reprend la sobriété du portail (fond clair, lignes fines), pour que
   l'enseignant reconnaisse l'écran quand il ouvrira la démo. */
.portail-maquette {
  margin: 1.75rem 0 1.5rem;
  padding: 20px 22px 14px;
  background: #fffdf8;
  border: 1px solid var(--parchment-dark, #d4bc82);
  border-radius: 12px;
  box-shadow: 0 12px 34px var(--shadow-soft, rgba(20, 22, 28, .12));
  font-size: .92rem;
  color: var(--ink-brown, #3d2914);
}
.pm-barre { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pm-titre { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem; color: var(--royal-blue); }
.pm-periode { font-size: .82rem; padding: 3px 10px; border: 1px solid var(--parchment-dark, #d4bc82); border-radius: 6px; }
.teachers-section p.pm-mention { margin: .3rem 0 .9rem; font-size: .8rem; font-style: italic; color: var(--ink-light, #7a6a4f); }
.pm-totaux { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px; border-radius: 8px;
  background: rgba(26, 58, 92, .06); margin-bottom: 1rem; }
.pm-totaux strong { color: var(--royal-blue); }
.pm-bloc { margin-bottom: 1rem; }
.teachers-section p.pm-bloc-titre { margin: 0 0 .35rem; font-family: 'Cinzel', serif; font-weight: 700;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--crimson); }
.pm-discret { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-light, #7a6a4f); }
.pm-ligne { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 7px 2px; border-bottom: 1px solid rgba(212, 188, 130, .45); }
.pm-bloc:last-of-type .pm-ligne { grid-template-columns: 1.2fr .8fr 1.4fr; }
.pm-entete { font-size: .76rem; color: var(--ink-light, #7a6a4f); text-transform: uppercase; letter-spacing: .05em; }
.pm-nb { font-weight: 700; color: var(--royal-blue); white-space: nowrap; }
.pm-actions { display: flex; gap: 8px; font-size: .8rem; }
.pm-actions span { padding: 2px 9px; border: 1px solid var(--parchment-dark, #d4bc82); border-radius: 6px; white-space: nowrap; }
.pm-actions .pm-fiche { background: var(--crimson); border-color: var(--crimson); color: var(--parchment-light); }
.portail-maquette figcaption { margin-top: .4rem; font-size: .75rem; text-align: right; color: var(--ink-light, #7a6a4f); }
@media (max-width: 560px) {
  .portail-maquette { padding: 16px 14px 10px; font-size: .85rem; }
  .pm-ligne { grid-template-columns: 1fr auto; }
  .pm-actions { grid-column: 1 / -1; }
  .pm-bloc:last-of-type .pm-ligne { grid-template-columns: 1fr auto; }
  .pm-entete { display: none; }
  .pm-bloc:last-of-type .pm-ligne > span:last-child { grid-column: 1 / -1; font-size: .8rem; opacity: .85; }
}

/* Sommaire collant de enseignants.html. Au-dessus de 900px le nav du site est
   fixe (hauteur --nav-height) : le sommaire se colle juste dessous. En dessous,
   le nav n'est plus fixe et le sommaire se colle en haut de l'écran. */
.ens-sommaire {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: rgba(245, 230, 200, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--parchment-dark, #d4bc82);
}
.ens-sommaire-liens {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ens-sommaire-liens::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .ens-sommaire { top: 0; }
  /* Place pour le burger flottant du site (site.css, entete-hors-ecran). */
  body.entete-hors-ecran .ens-sommaire { padding-right: 60px; }
  .ens-sommaire-liens { justify-content: flex-start; }
}
.ens-sommaire-liens a {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink-brown, #3d2914);
  text-decoration: none;
  white-space: nowrap;
}
.ens-sommaire-liens a:hover { background: rgba(26, 58, 92, .08); }
.ens-sommaire-liens a.is-on { background: var(--royal-blue); color: var(--parchment-light); }
/* Les fiches gratuites sont la porte d'entrée la plus fréquente : on les signale. */
.ens-sommaire-liens a.ens-sommaire-ressources { border: 1px solid var(--crimson); color: var(--crimson); }
.ens-sommaire-liens a.ens-sommaire-ressources.is-on { background: var(--crimson); color: var(--parchment-light); }
/* Une ancre ne doit pas finir sous le nav fixe + le sommaire. */
#portail, #offre, #en-classe, #ressources, #faq { scroll-margin-top: calc(var(--nav-height) + 56px); }
@media (max-width: 900px) { #portail, #offre, #en-classe, #ressources, #faq { scroll-margin-top: 72px; } }
html { scroll-behavior: smooth; }

.teachers-hero .teachers-hero-ressources { margin: .6rem auto 0; font-size: .98rem; }
.teachers-hero-ressources a { color: var(--crimson); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
@media (max-width: 560px) {
  .ens-sommaire { padding: 8px 8px; }
  .ens-sommaire-liens { gap: 2px; }
  .ens-sommaire-liens a { padding: 5px 9px; font-size: .7rem; letter-spacing: 0; }
}

        /* Page du programme de maths : un intertitre par domaine, et le texte cité en petit. */
        .prog-table tr.prog-groupe th {
            text-align: left;
            font-size: 0.85em;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            background: rgba(139, 21, 56, 0.06);
        }
        .prog-source {
            font-size: 0.85em;
            opacity: 0.7;
            white-space: nowrap;
        }
        .prog-table.prog-citations td:first-child { font-weight: 400; }
        .prog-voir-aussi { margin-top: -0.5rem; font-size: 0.95em; }

/* Ce qui se déplie dans les ressources (cartes par matière, exemple de fiche) : la page
   reste courte, le contenu reste dans le HTML servi. */
.ens-plus {
    margin: 1.5rem 0;
    border-top: 1px solid var(--parchment-dark);
    padding-top: 0.5rem;
}

.ens-plus > summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-brown);
    list-style: none;
}

.ens-plus > summary::-webkit-details-marker { display: none; }

.ens-plus > summary::after {
    content: '▾';
    content: '▾' / '';
    color: var(--crimson);
    transition: transform 0.2s ease;
}

.ens-plus[open] > summary::after { transform: rotate(180deg); }

.ens-plus > summary:hover { color: var(--crimson); }

.ens-plus > summary:focus-visible {
    outline: 2px solid var(--gold-base);
    outline-offset: 2px;
}

.ens-plus[open] > summary { margin-bottom: 1rem; }

@media (prefers-reduced-motion: reduce) {
    .ens-plus > summary::after { transition: none; }
}

/* Sous les boutons du bloc bleu : une ligne discrète, lisible sur le fond sombre. */
.teachers-cta p.teachers-cta-note {
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
}

.teachers-cta p.teachers-cta-note a {
    color: var(--gold-light);
    text-decoration: underline;
}
