@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

:root {
    /* Charte ROMEO (demande client : "les couleurs du site : orange et
       bleu", d'après le logo fourni) : le bleu existant reste la couleur de
       fond/structure, l'orange devient la couleur d'accent principale
       (boutons, marque, dégradés). Tokens ajoutés sans renommer les
       existants pour ne rien casser ailleurs dans le CSS. */
    /* Couleurs recalées sur le vrai logo ROMEO fourni (échantillonnage direct
       du PNG) : orange du fuselage / bleu ciel de l'hélice et de l'avion. */
    --orange: #f2790e;
    --orange-dark: #c9600a;
    --orange-light: #fff1e0;
    --logo-blue: #1f8fd1;
    --blue: #2f6fed;
    --blue-dark: #1f4fc4;
    --blue-light: #e8f0ff;
    --aviation: #0b3d91;
    --sky: #00c2ff;
    --green: #16a34a;
    --green-light: #dcfce7;
    --red: #e11d48;
    --red-light: #fde8ec;
    --amber: #d97706;
    --amber-light: #fef3c7;
    --ink: #14213d;
    --muted: #64748b;
    --bg: #f2f5fb;
    --card: #ffffff;
    --border: #e2e8f5;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(20, 33, 61, 0.06), 0 4px 12px rgba(20, 33, 61, 0.05);
    --shadow-hover: 0 4px 16px rgba(20, 33, 61, 0.09);
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    /* Pied de page toujours en bas (demande client : "le footer doit tt le
       temps rester en bas car quand y'a peu d'éléments dans la page le
       footer remonte") : body en colonne flex, tous les blocs existants
       (topbar, contenu de chaque page...) gardent leur taille naturelle, et
       c'est le footer lui-même (dernier enfant, voir topbar.php) qui absorbe
       tout l'espace restant au-dessus de lui via margin-top:auto ci-dessous
       — aucune page individuelle n'a besoin d'être modifiée pour ça. */
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 100% -10%, rgba(0, 194, 255, 0.12), transparent 40%),
        radial-gradient(circle at -10% 20%, rgba(47, 111, 237, 0.08), transparent 35%),
        var(--bg);
    color: #263049;
    -webkit-font-smoothing: antialiased;
}
body > * { flex-shrink: 0; }
h1, h2, h3 { font-family: 'Poppins', 'Inter', sans-serif; color: var(--ink); }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar — refonte complète (demande client : "un menu comme Octopus/CRM
   avocat", capture de référence fournie) : barre blanche flottante, coins
   arrondis, ombre légère, sur fond de page ; marque à gauche avec badge
   (icône avion), navigation au centre, actions de compte à droite sous
   forme de VRAIS BOUTONS séparés (contour "Mon compte" + plein "Déconnexion")
   plutôt qu'un sous-menu déroulant pour ces deux actions — élimine
   définitivement le risque de sous-menu tronqué/hors écran signalé par le
   client pour cette zone. Les sous-menus de navigation (Admin/Classes/
   Pédagogie, "Je m'entraîne avec") restent des menus déroulants classiques,
   mais avec un positionnement corrigé (voir bug ci-dessous). */
.topbar-outer { padding: 16px 20px 0; position: sticky; top: 0; z-index: 50; }
.topbar {
    background: var(--card);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 10px 14px;
    flex-wrap: wrap;
    gap: 14px;
    max-width: 1320px;
    margin: 0 auto;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.topbar-brand-zone { display: flex; align-items: center; flex-shrink: 0; }
.topbar-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1; justify-content: center; }
.topbar-account-zone { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.topbar a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: background .15s ease, color .15s ease; }
.topbar a:hover { background: var(--blue-light); color: var(--aviation); text-decoration: none; }
.topbar a.topbar-link-active { color: var(--aviation); background: var(--blue-light); }
.topbar .brand { display: inline-flex; align-items: center; padding: 4px 10px 4px 4px; }
.brand-logo-img { height: 42px; width: auto; display: block; }
@media (max-width: 720px) { .brand-logo-img { height: 34px; } }

/* Logo-mascotte animé sur les écrans "ça mouline" (demande client : "des
   qu il y a une page qui mouline met le logo qui bouge ou rebondi") —
   utilisé dans l'overlay de fin d'exercice pendant la correction. */
.romeo-bounce-icon { width: 64px; height: 64px; object-fit: contain; animation: romeo-bounce 0.9s ease-in-out infinite; }
@keyframes romeo-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-14px) scale(1.05); }
}

/* Boutons d'action (Mon compte / Déconnexion) — deux styles, comme la
   référence : contour discret pour l'action secondaire, rempli pour
   l'action principale. */
.topbar-greeting { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 2px; white-space: nowrap; }
.topbar-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; transition: all .15s ease; }
.topbar-btn.outline { color: var(--aviation); background: #fff; border: 1.5px solid var(--aviation); }
.topbar-btn.outline:hover { background: var(--blue-light); text-decoration: none; }
.topbar-btn.solid { color: #fff; background: var(--orange); border: 1.5px solid transparent; box-shadow: 0 2px 8px rgba(242, 121, 14, 0.3); }
.topbar-btn.solid:hover { filter: brightness(1.08); text-decoration: none; }

/* Groupes de navigation avec sous-menu (Admin / Classes / Pédagogie côté
   admin, "Je m'entraîne avec" côté élève). */
.topbar-group { position: relative; display: inline-flex; align-items: center; }
.topbar-group-label {
    font-family: inherit; font-size: 13.5px; font-weight: 600;
    color: var(--muted); background: transparent; border: none; cursor: pointer;
    padding: 8px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
    transition: background .15s ease, color .15s ease;
}
.topbar-group-label::after { content: '▾'; font-size: 9px; opacity: .7; transition: transform .15s ease; }
.topbar-group-label:hover, .topbar-group.open .topbar-group-label { background: var(--blue-light); color: var(--aviation); }
.topbar-group.open .topbar-group-label::after { transform: rotate(180deg); }
/* BUG corrigé (menu "rogné à droite") : l'ancien CSS posait `left:14px` sur
   `.topbar-group-menu` APRÈS avoir posé `left:auto;right:0` sur
   `.topbar-account-menu` — à spécificité égale, la règle la plus bas dans le
   fichier gagnait et réappliquait `left:14px` PAR-DESSUS `right:0`, ce qui
   étirait le menu de façon incohérente et le faisait déborder de l'écran.
   Ici, chaque variante de position est portée par une classe modificatrice
   dédiée, sans jamais mélanger left et right sur le même menu. */
.topbar-group-menu {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; margin-top: 10px;
    background: #fff; border: 1px solid var(--border);
    border-radius: 12px; padding: 6px; min-width: 240px; box-shadow: var(--shadow-hover); z-index: 80;
}
.topbar-group-menu.topbar-menu-right { left: auto; right: 0; }
.topbar-group.open .topbar-group-menu { display: flex; }
.topbar-group-menu a { display: block; padding: 9px 12px; color: var(--ink); font-weight: 600; border-radius: 8px; }
.topbar-group-menu a:hover { background: var(--blue-light); color: var(--aviation); }
@media (max-width: 980px) {
    .topbar-outer { padding: 12px 10px 0; }
    .topbar { border-radius: var(--radius); padding: 10px; }
    .topbar-nav { justify-content: flex-start; gap: 0; }
    .topbar-greeting { display: none; }
    .topbar-btn { padding: 8px 12px; font-size: 12px; }
    .topbar-group-menu { left: 0; right: 0; min-width: unset; }
    .topbar-group-menu.topbar-menu-right { left: 0; right: 0; }
}

/* Menu mobile (demande client : "sur smartphone, le menu est pas joli et
   pas adapté du tout") : avant, .topbar-nav passait juste à la ligne
   (flex-wrap) sur petit écran — illisible dès qu'il y a plusieurs liens.
   À partir de 760px, on bascule sur un vrai menu burger : la nav et la zone
   compte sont repliées (hauteur 0) et s'ouvrent en panneau déroulant, avec
   une transition glissée, au clic sur le bouton ☰. Partagé par le topbar
   connecté (partials/topbar.php) ET le header public
   (partials/public_header.php), qui ont chacun leur propre petit script de
   toggle (voir ces fichiers) mais réutilisent exactement ce même CSS. */
.topbar-burger {
    display: none;
    align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    border: 1.5px solid var(--border); background: #fff;
    margin-left: auto; cursor: pointer; flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease;
}
.topbar-burger:hover { background: var(--blue-light); }
.topbar-burger-bars { position: relative; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: background .2s ease; }
.topbar-burger-bars::before, .topbar-burger-bars::after {
    content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform .25s ease, top .25s ease, opacity .2s ease;
}
.topbar-burger-bars::before { top: -6px; }
.topbar-burger-bars::after { top: 6px; }
.topbar.mobile-open .topbar-burger-bars { background: transparent; }
.topbar.mobile-open .topbar-burger-bars::before { top: 0; transform: rotate(45deg); }
.topbar.mobile-open .topbar-burger-bars::after { top: 0; transform: rotate(-45deg); }

/* Wrapper commun à .topbar-nav et .topbar-account-zone (voir topbar.php /
   public_header.php). Neutre sur desktop : display:contents fait que ses 2
   enfants se comportent comme des enfants flex directs de .topbar, exactement
   comme avant — rien ne change au-dessus de 760px. */
.topbar-mobile-panel { display: contents; }

@media (max-width: 760px) {
    .topbar { position: relative; }
    .topbar-burger { display: inline-flex; }
    /* BUG CORRIGÉ ("le menu téléphone il s'ouvre il pousse le site vers le
       bas") : la nav n'agrandit plus la hauteur de la barre (ce qui
       repoussait tout le contenu de la page en dessous) — le panneau est
       maintenant positionné en absolu, par-dessus la page, sans affecter la
       mise en page du reste du site. */
    .topbar-mobile-panel {
        display: block; position: absolute; left: 10px; right: 10px; top: calc(100% + 8px);
        background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
        box-shadow: var(--shadow-hover); padding: 10px;
        max-height: 75vh; overflow-y: auto;
        opacity: 0; transform: translateY(-8px); pointer-events: none;
        transition: opacity .25s ease, transform .25s ease;
        z-index: 70;
    }
    .topbar.mobile-open .topbar-mobile-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .topbar-nav, .topbar-account-zone {
        display: flex; flex-direction: column; align-items: stretch;
        justify-content: flex-start; gap: 4px; width: 100%; margin-left: 0;
    }
    .topbar-account-zone { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
    .topbar-nav a, .topbar-nav .topbar-group { width: 100%; }
    .topbar-nav .topbar-group-label { width: 100%; justify-content: space-between; }
    .topbar-nav .topbar-group-menu { position: static; box-shadow: none; border: none; margin-top: 2px; padding-left: 10px; }
    .topbar-account-zone .topbar-btn, .topbar-account-zone > a { width: 100%; justify-content: center; }
}

/* Petites animations "mouvement" (demande client : "design niveau motion,
   niveau animation, fais un effort") — légères, jamais intrusives :
   apparition progressive au scroll pour les pages publiques, et léger
   flottement pour la mascotte en page d'accueil. */
/* Le contenu reste visible par défaut : seul le petit script inline dans
   <head> (voir index.php/bts-tourisme.php/grct.php/partenariat.php) pose la
   classe html.js-anim, AVANT que la page s'affiche. Si JS est désactivé ou
   bloqué, cette classe n'est jamais posée et rien n'est masqué. */
html.js-anim .reveal-on-scroll { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
/* BUG CORRIGÉ ("y a rien la !", des sections entières de contenu invisibles
   en permanence, même après l'apparition censée les révéler) : la classe
   .is-visible posée par le script JS (voir public_header.php) est bien
   ajoutée au bon moment, mais la règle ci-dessus gagnait quand même, car en
   CSS la règle la plus précise l'emporte, peu importe l'ordre d'écriture —
   et "html.js-anim .reveal-on-scroll" (balise + 2 classes) est PLUS précise
   que ".reveal-on-scroll.is-visible" (2 classes seulement), qui perdait donc
   systématiquement : opacité bloquée à 0 pour toujours. Fix : on répète le
   même préfixe "html.js-anim" pour que la règle "visible" soit au moins
   aussi précise que la règle "caché" qu'elle doit annuler. */
html.js-anim .reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@keyframes romeo-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}
.romeo-float-icon { animation: romeo-float 3.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .romeo-float-icon { animation: none; }
    .reveal-on-scroll { transition: none; opacity: 1; transform: none; }
}

.wrap { max-width: 1200px; margin: 28px auto; padding: 0 16px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    border: 1px solid var(--border);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
/* Accent de couleur réservé, avec parcimonie, aux cartes qui signalent
   vraiment quelque chose (ex: alerte) — pas un liseré systématique partout. */
.card.card-alert { border-left: 3px solid var(--red); }

table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 11px 12px; border-bottom: 1px solid #eef1f8; text-align: left; font-size: 14px; }
table th { background: #f7f9ff; color: var(--muted); text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; }
table tbody tr:nth-child(even) { background: #fbfcff; }
table tbody tr:hover { background: var(--blue-light); }

/* Bouton principal — retravaillé (retour client : "les boutons son pas
   beau, reprend la couleur du logo") : orange plein (celui du fuselage
   ROMEO, pas un dégradé qui ternissait la couleur), forme pilule cohérente
   avec les boutons de la topbar, ombre teintée orange plutôt que bleue. */
.btn {
    display: inline-block;
    position: relative;
    overflow: hidden;
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(242, 121, 14, 0.35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease;
}
/* Effet "reflet" au survol (demande client : "rajoute des effets dans les
   boutons") : un léger flash lumineux qui balaie le bouton, en plus du
   soulèvement déjà en place. Purement CSS, aucun impact sur le clic. */
.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
    pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 18px rgba(242, 121, 14, 0.45); text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: var(--blue-dark); box-shadow: 0 3px 10px rgba(31, 79, 196, 0.25); }
.btn.danger { background: var(--red); box-shadow: 0 3px 10px rgba(225, 29, 72, 0.3); }
.btn.success { background: var(--green); box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3); }
.btn.ai-generate-btn { background: linear-gradient(135deg, #8e44ad, #6c3483); font-size: 15px; padding: 13px 26px; box-shadow: 0 3px 10px rgba(142, 68, 173, 0.3); }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 12px;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,0.15); }
label { font-weight: 600; font-size: 13px; color: #475569; display: block; margin-bottom: 5px; }
.form-row { margin-bottom: 14px; }

.alert { padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; animation: fadeIn .25s ease; }
.alert.success { background: var(--green-light); color: #166534; border-left: 4px solid var(--green); }
.alert.error { background: var(--red-light); color: #9f1239; border-left: 4px solid var(--red); }
.alert.info { background: var(--blue-light); color: #1e3a8a; border-left: 4px solid var(--blue); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.badge.locked { background: #eef1f6; color: #94a3b8; }
.badge.unlocked { background: var(--amber-light); color: #92400e; }
.badge.passed { background: var(--green-light); color: #166534; }
.badge.mandatory-pnr { background: var(--red-light); color: var(--red); font-size: 10px; padding: 3px 9px; margin-top: 4px; white-space: nowrap; }

/* Page d'aide élève ("Aide avec tous les codes") — légende de la pastille
   "Obligatoire PNR" et explications longues (fonctionnalité 3). */
.help-legend { border-left: 4px solid var(--red); }
.help-sequence { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.9; }
.help-sequence code { background: var(--blue-light); color: var(--blue-dark); padding: 1px 6px; border-radius: 5px; }
/* Séquence "post-PNR" (FXP/SM/TTP) : même liste, mais grisée pour marquer
   visuellement que ces étapes ne sont pas obligatoires pour le PNR lui-même
   (retour client — voir HELP_POST_PNR_SEQUENCE). */
.help-sequence-optional { opacity: 0.75; }
.help-sequence-optional code { background: var(--bg); color: var(--muted); }
.help-long-desc { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.badge.failed { background: var(--red-light); color: #9f1239; }

/* Stat cards (tableau de bord admin) */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 6px; }
.stat-card {
    background: linear-gradient(160deg, #ffffff, #f4f8ff);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card.stat-card-alert { border-color: rgba(225,29,72,0.35); background: linear-gradient(160deg, #fff, var(--red-light)); }

/* Bandeau "🔔 À corriger" du tableau de bord admin (item 6) */
.correction-bell-card { margin-bottom: 22px; }
.correction-bell-item {
    display: block; text-decoration: none; color: var(--ink);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; transition: transform .2s ease, box-shadow .2s ease;
}
.correction-bell-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
@keyframes bell-shake-anim {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-12deg) scale(1.05); }
    20% { transform: rotate(10deg) scale(1.05); }
    30% { transform: rotate(-8deg) scale(1.02); }
    40% { transform: rotate(6deg) scale(1.02); }
    50% { transform: rotate(0deg) scale(1); }
}
.bell-shake { display: inline-block; transform-origin: 50% 0; animation: bell-shake-anim 2s ease-in-out infinite; }
.stat-icon { font-size: 26px; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 800; font-family: 'Poppins', sans-serif; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* Parcours façon Duolingo : chemin en zigzag, nœuds reliés visuellement */
.path {
    display: flex;
    flex-wrap: wrap;
    gap: 26px 18px;
    padding: 28px 6px;
    position: relative;
}
.path-node {
    width: 160px;
    text-align: center;
    padding: 20px 12px 16px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--border);
    animation: popIn .4s ease backwards;
    transition: transform .2s ease, box-shadow .2s ease;
}
.path:nth-child(odd) .path-node:nth-child(even) { transform: translateY(18px); }
.path-node:nth-child(1) { animation-delay: .02s; }
.path-node:nth-child(2) { animation-delay: .08s; }
.path-node:nth-child(3) { animation-delay: .14s; }
.path-node:nth-child(4) { animation-delay: .2s; }
.path-node:nth-child(5) { animation-delay: .26s; }
.path-node:not(.locked):hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.path-node.locked { opacity: 0.6; }
.path-node:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -24px;
    width: 22px;
    height: 4px;
    background: repeating-linear-gradient(90deg, #cbd5f5 0 6px, transparent 6px 10px);
    border-radius: 4px;
}
.path-node .circle {
    width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    border: 4px solid #fff;
}
.path-node.locked .circle { background: linear-gradient(160deg, #cbd5e1, #94a3b8); }
.path-node.unlocked .circle { background: linear-gradient(160deg, var(--sky), var(--blue)); animation: pulseGlow 2s ease-in-out infinite; }
.path-node.passed .circle { background: linear-gradient(160deg, #4ade80, var(--green)); }
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 4px 10px rgba(47,111,237,0.25); } 50% { box-shadow: 0 4px 18px rgba(47,111,237,0.55); } }

.progress-bar { background: #eef1f8; border-radius: 20px; height: 14px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.08); }
.progress-bar > div { background: linear-gradient(90deg, var(--sky), var(--blue)); height: 100%; border-radius: 20px; transition: width .6s ease; animation: growBar 1s ease; }
@keyframes growBar { from { width: 0 !important; } }

/* Choix du type d'exercice IA (élève) */
.exercise-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.exercise-type-card {
    display: block;
    position: relative;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.exercise-type-card input { position: absolute; opacity: 0; }
.exercise-type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.exercise-type-card.selected { border-color: var(--blue); background: var(--blue-light); }
.etc-icon { font-size: 30px; margin-bottom: 8px; }
.etc-title { font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.etc-desc { font-size: 12.5px; color: var(--muted); }
@media (max-width: 800px) { .exercise-type-grid { grid-template-columns: 1fr; } }

/* Terminal GDS */
#am-terminal {
    background: linear-gradient(160deg, #0f1b3d, #16265c);
    color: #d7e6ff; font-family: 'Courier New', monospace; font-size: 15px;
    padding: 20px; border-radius: var(--radius); height: 520px; overflow-y: auto; display: flex; flex-direction: column;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.25), var(--shadow);
    border: 1px solid #1e2f5e;
}
#am-output { white-space: pre-wrap; flex-grow: 1; line-height: 1.45; }
#am-input-line { display: flex; align-items: center; margin-top: 10px; }
#am-input { background: transparent; border: none; color: #eaf2ff; font-family: 'Courier New', monospace; font-size: 15px; font-weight: bold; outline: none; flex-grow: 1; text-transform: uppercase; }
.cmd-echo { color: #7dd3fc; font-weight: bold; }
.am-timer { font-size: 15px; font-weight: bold; color: var(--red); background: var(--red-light); padding: 6px 14px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; z-index: 5; }
.am-timer.am-timer-unlimited { color: #166534; background: var(--green-light); }
/* Alerte des 10 dernières secondes (demande client), voir terminal.js. */
.am-timer.am-timer-alert { animation: am-timer-blink 1s step-start infinite; }
@keyframes am-timer-blink {
    0%, 49%   { background: var(--red-light); color: var(--red); }
    50%, 100% { background: var(--red); color: #fff; }
}
/* En-tête du terminal (titre + chrono + progression) : ne doit jamais se
   chevaucher ni disparaître, même sur petit écran (cause identifiée du
   "chrono invisible" côté client : reste toujours visible en haut du
   terminal, quel que soit l'espace disponible). */
.am-terminal-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; position: relative; }
.am-progress-badge { font-size: 12.5px; font-weight: 700; color: #1e3a8a; background: #eef4ff; border: 1px solid #c9dcff; padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
.am-pricing-badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
.am-pricing-badge.not-priced { color: #92400e; background: var(--amber-light); }
.am-pricing-badge.priced { color: #166534; background: var(--green-light); }
#am-pnr-list { background: #eef4ff; padding: 14px; border-radius: 10px; border: 1px solid #c9dcff; min-height: 200px; max-height: 320px; overflow-y: auto; font-family: monospace; font-size: 13px; white-space: pre-wrap; font-weight: bold; color: #1e3a8a; }
.error-hint { color: #9f1239; font-style: italic; font-size: 13px; margin-top: 10px; background: var(--red-light); padding: 10px; border-left: 4px solid var(--red); border-radius: 8px; }
.am-hover-class { position: relative; cursor: pointer; border-bottom: 1px dashed #38bdf8; display: inline-block; }
.am-seat-menu, .am-fare-menu { display: none; position: absolute; top: 100%; left: 0; background: #0b1330; border: 1px solid #38bdf8; padding: 5px; z-index: 100; flex-direction: row; gap: 5px; border-radius: 6px; }
.am-hover-class:hover .am-seat-menu, .am-fare-line:hover .am-fare-menu { display: flex; }
.am-seat-btn, .am-fare-btn { background: #16265c; color: #7dd3fc; padding: 3px 9px; border-radius: 4px; font-size: 13px; cursor: pointer; border: 1px solid #38bdf8; white-space: nowrap; transition: background .15s ease; }
.am-seat-btn:hover, .am-fare-btn:hover { background: #1e3a8a; }
.am-fare-line { position: relative; cursor: pointer; border-bottom: 1px dashed #38bdf8; display: inline-block; }

/* Modale SM enrichie (sièges / repas / bagages / APIS) */
.sm-overlay { display: none; position: fixed; inset: 0; background: rgba(11, 22, 51, 0.55); z-index: 500; align-items: center; justify-content: center; padding: 16px; }
.sm-modal { background: #fff; border-radius: var(--radius); max-width: 760px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(11,22,51,.4); overflow: hidden; }
.sm-modal-header { background: linear-gradient(120deg, var(--aviation), var(--blue) 70%, var(--sky)); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.sm-modal-header h3 { color: #fff; margin: 0; font-size: 17px; }
.sm-close { background: transparent; border: none; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.sm-modal-body { padding: 18px 20px; overflow-y: auto; flex-grow: 1; }
.sm-modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #f9fafe; }
.sm-preview { font-family: monospace; font-size: 12.5px; color: var(--muted); flex-grow: 1; word-break: break-all; }
.sm-section { margin-bottom: 20px; }
.sm-section-title { font-weight: 700; color: var(--aviation); text-transform: uppercase; font-size: 12.5px; letter-spacing: .03em; margin-bottom: 10px; }
.sm-seg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sm-seg-tab { border: 1px solid var(--border); background: #f4f7ff; color: var(--blue-dark); border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.sm-seg-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.sm-seatmap { background: #0f1b3d; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; max-height: 300px; overflow-y: auto; }
.sm-row { display: flex; align-items: center; gap: 4px; }
.sm-row-label { color: #7dd3fc; font-size: 11px; width: 18px; text-align: right; font-family: monospace; }
.sm-aisle { width: 14px; }
.sm-seat { width: 26px; height: 26px; border-radius: 6px; border: 1px solid #38bdf8; background: #16265c; color: #cfe4ff; font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; }
.sm-seat:hover:not(:disabled) { background: #1e3a8a; }
.sm-seat-front { border-color: #facc15; }
.sm-seat-exit { border-color: #34d399; }
.sm-seat-occupied { background: #334155; color: #64748b; border-color: #475569; cursor: not-allowed; }
.sm-seat-selected { background: var(--sky); color: #0b1330; border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.sm-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.sm-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.sm-swatch-free { background: #16265c; border: 1px solid #38bdf8; }
.sm-swatch-occupied { background: #334155; border: 1px solid #475569; }
.sm-swatch-selected { background: var(--sky); border: 1px solid #fff; }
.sm-swatch-front { background: #16265c; border: 1px solid #facc15; }
.sm-swatch-exit { background: #16265c; border: 1px solid #34d399; }
.sm-meals { display: flex; flex-direction: column; gap: 6px; }
.sm-meal-item { font-weight: 500; font-size: 13.5px; color: #334155; }
.sm-meal-item input { width: auto; margin-right: 6px; }
.sm-baggage-row { display: flex; gap: 16px; flex-wrap: wrap; }
.sm-baggage-row label { flex: 1; min-width: 200px; }
@media (max-width: 640px) { .sm-modal { max-height: 100vh; border-radius: 0; } }

/* Animation d'attente "avion" (génération d'exercice IA) : orbite circulaire
   autour d'un point central (remplace l'ancienne traversée horizontale de
   l'écran, jugée trop proche d'un "chargement de page" par le client). */
.ai-loading-overlay { position: fixed; inset: 0; background: rgba(11, 22, 51, 0.7); z-index: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.ai-loading-sky { position: relative; width: 150px; height: 150px; }
.ai-loading-sky::before { content: ''; position: absolute; inset: 0; border: 2px dashed rgba(255,255,255,.32); border-radius: 50%; }
.ai-loading-sky::after { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px; background: rgba(0, 194, 255, 0.9); border-radius: 50%; box-shadow: 0 0 12px rgba(0, 194, 255, 0.9); }
.ai-loading-plane { position: absolute; top: 50%; left: 50%; font-size: 34px; margin: -17px; transform-origin: center; animation: am-plane-orbit 2.4s linear infinite; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
@keyframes am-plane-orbit {
    from { transform: rotate(0deg) translateX(66px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(66px) rotate(-360deg); }
}
.ai-loading-text { color: #eaf2ff; font-weight: 700; font-size: 15px; letter-spacing: .02em; }

/* Écran "connexion réussie" (demande client : "quand on se connecte mets un
   effet avec l'avion en gros qui pulse") — plein écran, affiché juste après
   une connexion valide, avant la redirection JS vers le tableau de bord
   (voir public/login.php). */
.login-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0b3d91, #2f6fed 55%, #f2790e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
}
.romeo-login-pulse {
    width: 180px;
    height: auto;
    animation: romeo-login-pulse-anim 1s ease-in-out infinite;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
@keyframes romeo-login-pulse-anim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
.login-success-sub { color: rgba(255,255,255,.88); font-size: 15px; margin: -12px 0 0; text-align: center; }
.login-success-text { color: #fff; font-weight: 800; font-size: 26px; letter-spacing: .02em; font-family: 'Poppins', 'Inter', sans-serif; }

/* Modale "Envoyer cet exercice ?" + écran de félicitations à l'envoi
   (public/assets/js/terminal.js, partagée par attempt.php ET
   exam_attempt.php) : injectée en JS, masquée par défaut. */
.am-finish-overlay { display: none; position: fixed; inset: 0; background: rgba(11, 22, 51, 0.6); z-index: 700; align-items: center; justify-content: center; padding: 16px; }
.am-finish-overlay.open { display: flex; }
.am-finish-box { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(11,22,51,.4); padding: 34px 30px; max-width: 380px; width: 100%; text-align: center; }
.am-finish-icon { font-size: 46px; margin-bottom: 10px; }
.am-finish-box h3 { margin: 0 0 8px; font-size: 19px; }
.am-finish-box p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.am-finish-actions { display: flex; gap: 12px; justify-content: center; }
.am-finish-actions .btn { flex: 1; }

/* Grille responsive de cartes (cours/niveaux/scénarios/classes) : côte à
   côte quand la largeur le permet, empilé sur mobile. */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 22px; }
.card-grid .card { margin-bottom: 0; }
.scenario-card, .course-card, .level-card, .class-card { display: flex; flex-direction: column; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* BUG CORRIGÉ (demande client : capture d'écran smartphone montrant la page
   d'exercice Roméo illisible, les 2 colonnes écrasées côte à côte) : cette
   page (public/student/attempt.php) utilisait ".grid-2" mais avec un style
   EN LIGNE ("style=grid-template-columns:1fr 3fr") pour avoir une colonne de
   droite plus large (le terminal). Un style en ligne a toujours priorité sur
   une règle @media de app.css, même ciblée sur petit écran : la tentative
   précédente de forcer 1 seule colonne sur mobile (.grid-2{...}) ne pouvait
   donc JAMAIS s'appliquer sur cette page précise, d'où un écran coupé en 2
   bandes minuscules sur téléphone. Remplacé ici par une classe dédiée
   (am-exercise-grid) qui porte son propre ratio de colonnes ET sait
   correctement repasser en 1 seule colonne sur petit écran, sans conflit de
   priorité CSS. */
.am-exercise-grid { display: grid; grid-template-columns: 1fr 3fr; gap: 20px; align-items: start; }
@media (max-width: 860px) {
    .am-exercise-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .topbar { padding: 10px 14px; }
    .topbar a { margin-left: 8px; font-size: 12.5px; padding: 5px 8px; }
    .wrap { margin: 16px auto; padding: 0 12px; }
    #am-terminal { height: 400px; }

    /* BUG CORRIGÉ (demande client : "affichage smartphone catastrophique") :
       un <table> admin (élèves, tentatives, erreurs...) a toujours autant de
       colonnes sur téléphone que sur grand écran — sans aucune règle
       responsive, il débordait silencieusement de sa carte et cassait toute
       la mise en page de la page (texte coupé, boutons inaccessibles). Les
       tableaux sont systématiquement posés dans une .card dans ce projet :
       on rend donc CETTE carte défilante horizontalement (uniquement sur
       petit écran) et on impose une largeur minimale au tableau, pour qu'il
       reste lisible et défile PROPREMENT dans sa carte au lieu de déborder
       de la page entière.
       NE PAS faire overflow-x:auto hors mobile : certains menus internes
       (ex: ⋮ actions) pourraient sinon s'y retrouver rognés. */
    .card { overflow-x: auto; }
    .card table { min-width: 560px; }

    /* BUG CORRIGÉ : les résultats de recherche de vol (commande AN) sont de
       longues lignes alignées en police à chasse fixe (monospace) — sur un
       écran de téléphone, elles ne rentrent jamais et le texte se chevauchait
       avec les menus de sélection sièges/tarifs. On réduit la police du
       terminal ET on autorise un défilement horizontal PROPRE à l'intérieur
       du terminal (jamais sur toute la page) pour les lignes encore trop
       longues malgré la police réduite. */
    #am-terminal { font-size: 12.5px; overflow-x: auto; }
    #am-output { white-space: pre; }
    #am-input { font-size: 13px; }
}

.step-row { background: #f9fafe; padding: 16px 16px 16px 42px; margin-bottom: 12px; border: 1px solid var(--border); position: relative; border-radius: 10px; transition: box-shadow .15s ease; }
.step-row:hover { box-shadow: var(--shadow); }
.drag-handle { position: absolute; left: 12px; top: 16px; cursor: grab; color: #94a3b8; font-size: 18px; }
.step-row textarea { font-family: monospace; }
small.hint { color: var(--muted); }

/* =====================================================================
   Tableau de bord élève ("Mon parcours") — refonte visuelle (demande
   client : l'ancienne version était jugée "nulle"). Classes scopées en
   dash-*/path-card pour ne jamais toucher .card/.progress-bar/.badge
   ailleurs dans l'app (même palette/tokens que le reste du site).
   ===================================================================== */
/* Page "Tableau de bord élève" : wrapper dédié pour ajouter de l'air sans
   toucher .wrap ailleurs dans l'app (demande client "met de l'espace",
   fonctionnalité 5 — écarts volontairement augmentés, pas de simple
   ajustement cosmétique). */
.dash-wrap { padding-top: 20px; }

.dash-hero {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
    margin-bottom: 34px;
    padding: 8px 0 22px;
    border-bottom: 1px solid var(--border);
}
.dash-greeting { margin: 0 0 10px; font-size: 27px; line-height: 1.3; }
.dash-subtitle { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Bandeau de présentation de la plateforme (nouvelle page d'accueil, item 1) :
   4 cartes compactes en raccourci vers les grandes façons de s'entraîner. */
.dash-intro { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 38px; }
.dash-intro-card {
    display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px 18px; color: var(--ink); text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.dash-intro-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.dash-intro-icon { font-size: 24px; margin-bottom: 8px; }
.dash-intro-card h3 { margin: 0 0 6px; font-size: 15px; }
.dash-intro-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 900px) { .dash-intro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .dash-intro { grid-template-columns: 1fr; } }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 42px; }
.dash-stat {
    background: linear-gradient(160deg, #ffffff, #f4f8ff);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px 22px; text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.dash-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.dash-stat-icon { font-size: 26px; margin-bottom: 10px; }
.dash-stat-value { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 30px; color: var(--ink); }
.dash-stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 8px; }

.dash-section-title { font-size: 19px; margin: 36px 0 20px; color: var(--ink); }

/* Cartes côte à côte (demande client) : au moins 2 colonnes dès que la
   largeur le permet, au lieu d'un simple auto-fill qui pouvait retomber sur
   1 seule colonne selon la largeur réellement disponible dans .dash-wrap. */
.dash-path-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-bottom: 34px; }
@media (min-width: 1100px) { .dash-path-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .dash-path-grid { grid-template-columns: 1fr; } }
.path-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 14px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.path-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.path-card-head h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.path-card-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.path-card-bar { height: 12px; margin: 4px 0; }
.path-card-meta { margin: 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.path-card-cta { margin-top: 8px; text-align: center; font-size: 14px; padding: 11px 18px; }
.path-card-finished { opacity: 0.9; }

.dash-finished { margin-top: 12px; }
.dash-finished-toggle {
    display: inline-flex; align-items: center; gap: 8px; background: var(--green-light); color: #166534;
    border: none; border-radius: 10px; padding: 12px 20px; font-weight: 700; font-size: 14px; cursor: pointer;
    margin-bottom: 22px; transition: filter .15s ease;
}
.dash-finished-toggle:hover { filter: brightness(0.97); }
.dash-finished-arrow { transition: transform .15s ease; display: inline-block; }
.dash-finished-toggle.open .dash-finished-arrow { transform: rotate(180deg); }

.dash-wrap .alert { padding: 20px 24px; font-size: 14.5px; line-height: 1.6; }

@media (max-width: 640px) {
    .dash-stats { grid-template-columns: 1fr; }
    .dash-hero { flex-direction: column; align-items: flex-start; }
}

/* Sélecteur de prérequis en 2 étapes (registre de commandes) */
.req-selector { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; background: #f9fafe; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 6px; }
.req-step-title { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; }
.req-categories { display: flex; flex-direction: column; gap: 6px; }
.req-category-item, .req-command-item { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13.5px; color: #334155; cursor: pointer; }
.req-command-block { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.req-command-block:last-child { border-bottom: none; }
.req-command-block-title { font-weight: 700; font-size: 12px; color: var(--blue-dark); text-transform: uppercase; margin-bottom: 5px; }
.req-command-item { margin-bottom: 4px; }
@media (max-width: 640px) { .req-selector { grid-template-columns: 1fr; } }

/* Bascule "Simple / Avancé" du formulaire d'ajout de commande personnalisée
   (demande client : "l'ajout de commande est pas assez intuitif"). */
.req-mode-option { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 13.5px; color: #334155; cursor: pointer; transition: all .15s ease; }
.req-mode-option:has(input:checked) { border-color: var(--orange); background: var(--orange-light); }
.req-mode-option input { width: auto; margin: 0; }

/* Footer commun "Une création Papa Travaille Sur Ordi" — injecté en JS par
   partials/topbar.php (présent sur toutes les pages connectées).
   BUG CORRIGÉ ("pas beau et pas centré") : le footer était un simple bloc de
   texte gris sans réel style, et n'utilisait qu'un text-align (peu fiable
   selon le contenu des pages). Refonte en petite barre flottante centrée,
   dans le même esprit visuel que la topbar (carte blanche, coins arrondis,
   ombre légère), avec le texte réellement centré via flexbox plutôt que par
   un simple text-align. */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    /* Pousse le footer tout en bas même quand la page a peu de contenu (voir
       body > * { flex-shrink:0 } plus haut) — remplace l'ancien margin-top
       fixe qui ne collait le footer au bas que si le contenu remplissait
       déjà tout l'écran. */
    margin: auto 0 0;
    padding: 14px 20px;
    background: var(--card, #fff);
    color: var(--muted, #94a3b8);
    font-size: 12.5px;
    letter-spacing: .2px;
    border-top: 1px solid var(--border, #e2e8f5);
    box-shadow: 0 -2px 10px rgba(20, 33, 61, 0.04);
}
.site-footer strong { color: var(--orange, #f2790e); font-weight: 700; }

/* Traînée de fumée au curseur : RETIRÉE (demande client : "vire la traîne
   de fumée c'est trop"). Classe .romeo-smoke-puff supprimée du CSS. */

/* Effet au clic (demande client), sur tout le site : petit cercle orange qui
   se dilate depuis le point cliqué puis disparaît. */
.romeo-click-burst {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
    width: 16px; height: 16px;
    margin-left: -8px; margin-top: -8px;
    border-radius: 50%;
    border: 3px solid var(--orange, #f2790e);
    background: rgba(242,121,14,.18);
    animation: romeo-click-fade .5s ease-out forwards;
}
@keyframes romeo-click-fade {
    0%   { opacity: .9; transform: scale(.4); }
    100% { opacity: 0; transform: scale(2.6); }
}
/* ---- Compte à rebours de démarrage d'examen (public/student/exam_start.php) ---- */
.center-card { text-align: center; }
.exam-countdown-label { font-weight: 600; color: #475569; margin: 18px 0 0; }
.exam-countdown-number {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 96px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--orange, #f2790e);
}
.exam-countdown-bar { height: 8px; background: #e2e8f5; border-radius: 999px; overflow: hidden; margin: 8px auto 0; max-width: 320px; }
.exam-countdown-bar > div { height: 100%; width: 100%; background: linear-gradient(90deg, #2f6fed, #f2790e); transition: width 1s linear; }

/* ---- Suppression en masse (public/partials/bulk_bar.php) ---- */
.bulk-bar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: #f7f9ff; border: 1px solid #e2e8f5; border-radius: 12px;
    padding: 10px 14px; margin: 0 0 12px;
}
.bulk-bar .bulk-all-label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; cursor: pointer; }
.bulk-bar input[type=checkbox], input.bulk-check { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: #2f6fed; }
.bulk-bar .bulk-count { color: #64748b; font-size: 13.5px; }
.bulk-bar .bulk-form { margin: 0 0 0 auto; }
.bulk-bar .bulk-submit:disabled { opacity: .45; cursor: not-allowed; }

/* =========================================================================
   Passe design (demande client : "améliore le design, centre ce qu'il faut
   centrer") — règles ajoutées en fin de fichier, elles complètent (sans
   casser) les styles ci-dessus.
   ========================================================================= */

/* --- Accueil élève : titre centré, 3 raccourcis alignés, compteurs centrés --- */
.dash-hero {
    flex-direction: column; justify-content: center; text-align: center;
    background: linear-gradient(135deg, #f4f8ff, #fff4e8);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 18px; gap: 16px;
}
.dash-greeting { font-size: 30px; }
.dash-subtitle { max-width: 560px; margin: 0 auto; }
.dash-intro { grid-template-columns: repeat(3, 1fr); max-width: 980px; margin-left: auto; margin-right: auto; }
.dash-intro-card { text-align: center; padding: 26px 20px; }
.dash-intro-icon { font-size: 34px; margin-bottom: 10px; }
.dash-intro-card h3 { font-size: 17px; }
.dash-intro-card p { font-size: 13.5px; }
.dash-stats { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin-left: auto; margin-right: auto; }
.dash-stat-value { font-size: 36px; }
@media (max-width: 900px) { .dash-intro { grid-template-columns: 1fr; max-width: 460px; } }
@media (max-width: 640px) {
    .dash-hero { align-items: center; }
    .dash-stats { grid-template-columns: 1fr; max-width: 460px; }
}

/* --- Pages d'entrée (connexion, inscription, mot de passe, rejoindre un examen) --- */
.narrow-page h1 { text-align: center; font-size: 24px; margin: 0 0 18px; }
.narrow-page .card { padding: 30px 28px; box-shadow: 0 12px 34px rgba(20, 33, 61, 0.12); }
.narrow-page .card:hover { transform: none; }
.narrow-page .card > p { text-align: center; }
.narrow-page .btn { display: block; width: 100%; text-align: center; }
.login-success-text { text-align: center; }

/* --- Pages de résultat : titre, notes et boutons centrés --- */
.result-page h1 { text-align: center; }
.result-page .grid-3 { max-width: 760px; margin-left: auto; margin-right: auto; }
.result-page .grid-3 .card { text-align: center; }
.result-page > a.btn { display: block; width: fit-content; margin: 22px auto; }
@media (max-width: 760px) { .result-page .grid-3 { grid-template-columns: 1fr; } }

/* --- Tableau de bord admin : chiffres centrés --- */
.admin-dash .grid-3 .card, .admin-dash .grid-4 .card { text-align: center; }
.admin-dash .grid-4 { margin-bottom: 20px; }
@media (max-width: 900px) { .admin-dash .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .admin-dash .grid-4 { grid-template-columns: 1fr; } }

/* Pied de page : l'espace entre "Une création" et le nom disparaissait (flex). */
.site-footer { gap: .35em; }

/* =========================================================================
   Accueil élève v4 (demande client : "l'écran élève n'est pas beau du tout,
   centre les éléments"). Nouvelles classes home-* : tout est centré, rien
   ne dépend des anciennes règles dash-* (laissées en place, inutilisées).
   ========================================================================= */
.home-wrap { max-width: 1040px; padding-top: 10px; padding-bottom: 40px; }

.home-hero {
    text-align: center; position: relative; overflow: hidden;
    padding: 34px 20px 32px; margin-bottom: 30px;
    border-radius: 22px; border: 1px solid var(--border);
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 194, 255, .16), transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(242, 121, 14, .17), transparent 44%),
        linear-gradient(135deg, #ffffff, #f3f7ff);
    box-shadow: var(--shadow);
}
.home-hero-mascot {
    display: block; margin: 0 auto 6px; width: 104px; height: 104px; object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(20, 33, 61, .22));
    animation: home-float 3.4s ease-in-out infinite;
}
@keyframes home-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.home-hero-title { margin: 0 0 8px; font-size: 34px; line-height: 1.2; color: var(--ink); }
.home-hero-sub { margin: 0 auto 22px; max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.home-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.home-hero-actions .btn { padding: 13px 26px; font-size: 15px; }

.home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 30px; }
.home-card {
    --accent: var(--blue); --accent-bg: var(--blue-light);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--accent);
    border-radius: 18px; box-shadow: var(--shadow); padding: 28px 22px 24px;
    color: var(--ink); text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.home-card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(20, 33, 61, .13); text-decoration: none; }
.home-card--orange { --accent: var(--orange); --accent-bg: var(--orange-light); }
.home-card--green  { --accent: var(--green);  --accent-bg: var(--green-light); }
.home-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%; background: var(--accent-bg);
    font-size: 30px; margin-bottom: 14px;
}
.home-card h2 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.home-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; flex: 1; }
.home-card-go { font-weight: 700; font-size: 14px; color: var(--accent); }
.home-card:hover .home-card-go span { display: inline-block; transform: translateX(4px); transition: transform .2s ease; }

.home-progress {
    text-align: center; background: var(--card); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: var(--shadow); padding: 24px 20px 22px;
    max-width: 640px; margin: 0 auto;
}
.home-progress h2 { margin: 0 0 16px; font-size: 17px; color: var(--ink); }
.home-progress-row { display: flex; align-items: center; justify-content: center; gap: 0; }
.home-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 10px; }
.home-stat-value { font-family: 'Poppins', 'Inter', sans-serif; font-weight: 800; font-size: 44px; line-height: 1.1; color: var(--ink); }
.home-stat-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.home-progress-sep { width: 1px; align-self: stretch; background: var(--border); }
.home-progress-link { display: inline-block; margin-top: 16px; font-weight: 700; font-size: 14px; color: var(--blue-dark); text-decoration: none; }
.home-progress-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .home-cards { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 520px) {
    .home-hero { padding: 26px 14px 24px; border-radius: 18px; }
    .home-hero-title { font-size: 27px; }
    .home-hero-actions .btn { width: 100%; text-align: center; }
    .home-progress-row { flex-direction: column; gap: 14px; }
    .home-progress-sep { width: 60%; height: 1px; align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .home-hero-mascot { animation: none; } }

/* =========================================================================
   Compte à rebours d'examen animé (public/student/exam_start.php) :
   construction d'un PNR en direct (destination, compagnie, vol, passager,
   contact, TK, RF, ER) pendant les 10 secondes.
   ========================================================================= */
.pnr-card { padding: 28px 24px 24px; overflow: hidden; }
.pnr-title { margin: 0 0 6px; font-size: 24px; }
.pnr-lead { margin: 0 auto 18px; max-width: 480px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.pnr-ring { position: relative; width: 132px; height: 132px; margin: 0 auto 20px; }
.pnr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pnr-ring circle { fill: none; stroke-width: 9; }
.pnr-ring-track { stroke: #e6ecf8; }
.pnr-ring-fill { stroke: var(--orange); stroke-linecap: round; }
.pnr-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pnr-ring-number { font-family: 'Poppins', 'Inter', sans-serif; font-weight: 800; font-size: 46px; line-height: 1; color: var(--orange); }
.pnr-ring-unit { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.pnr-stage { max-width: 540px; margin: 0 auto; }

.pnr-route { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 14px; }
.pnr-city { width: 108px; text-align: center; }
.pnr-code {
    font-family: 'Poppins', 'Inter', sans-serif; font-weight: 800; font-size: 30px; letter-spacing: .06em;
    color: var(--ink); background: #f3f7ff; border: 1px solid var(--border); border-radius: 12px; padding: 6px 0;
    transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.pnr-name { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); min-height: 1.2em; }
.pnr-track { position: relative; flex: 1; height: 28px; min-width: 60px; }
.pnr-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed #b9c6e2; }
.pnr-plane { position: absolute; left: 0; top: 50%; font-size: 22px; transform: translate(-50%, -50%); line-height: 1; filter: drop-shadow(0 2px 3px rgba(20, 33, 61, .25)); }

.pnr-slot.pnr-rolling { color: var(--blue-dark); background: var(--blue-light); border-color: #bcd0ff; }
.pnr-slot.pnr-locked { color: #166534; background: var(--green-light); border-color: #86d9a3; animation: pnr-pop .45s ease; }
@keyframes pnr-pop { 0% { transform: scale(.88); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }

.pnr-airline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pnr-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 50px; padding: 5px 10px;
    font-family: 'Poppins', 'Inter', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: .05em;
    color: var(--ink); background: #f3f7ff; border: 1px solid var(--border); border-radius: 10px;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.pnr-airline-name { font-weight: 600; font-size: 14px; color: #475569; }
.pnr-flight { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-weight: 700; font-size: 13px; color: var(--orange-dark); min-width: 4.5em; text-align: left; }

.pnr-term { background: #0e1a33; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 26px rgba(14, 26, 51, .28); text-align: left; }
.pnr-term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #16264a; }
.pnr-term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3c4f7c; }
.pnr-term-bar i:nth-child(1) { background: #ff6159; }
.pnr-term-bar i:nth-child(2) { background: #ffbd2e; }
.pnr-term-bar i:nth-child(3) { background: #28c940; }
.pnr-term-bar em { margin-left: 8px; font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: #8fa3cf; text-transform: uppercase; }
.pnr-lines { padding: 12px 14px 14px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace; font-size: 13.5px; line-height: 1.75; }
.pnr-line { display: flex; gap: 8px; opacity: .55; transition: opacity .25s ease; }
.pnr-line-on { opacity: 1; }
.pnr-n { flex: 0 0 1.6em; color: #ffbd2e; text-align: right; }
.pnr-t { white-space: pre-wrap; overflow-wrap: anywhere; color: #7dffb4; }
.pnr-head { color: #8fa3cf; }
.pnr-empty { color: #3f5282; }
.pnr-typing::after { content: '▌'; margin-left: 1px; animation: pnr-blink .7s steps(1) infinite; color: #7dffb4; }
@keyframes pnr-blink { 50% { opacity: 0; } }
.pnr-loc { color: #ffd166; font-weight: 700; }

.pnr-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 10px; min-height: 26px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.pnr-spin { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; border: 3px solid #cfdcf7; border-top-color: var(--blue); animation: pnr-rot .8s linear infinite; }
.pnr-spin-ok { animation: none; border-color: var(--green); background: var(--green); position: relative; }
.pnr-spin-ok::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; color: #fff; }
@keyframes pnr-rot { to { transform: rotate(360deg); } }

.pnr-dots { display: flex; justify-content: center; gap: 8px; }
.pnr-dots i { width: 28px; height: 6px; border-radius: 999px; background: #dfe7f7; transition: background .3s ease; }
.pnr-dots i.done { background: var(--green); }
.pnr-dots i.now { background: var(--orange); animation: pnr-pulse 1s ease-in-out infinite; }
@keyframes pnr-pulse { 50% { opacity: .45; } }

.pnr-cancel { margin: 22px 0 0; }

@media (max-width: 520px) {
    .pnr-card { padding: 22px 14px 20px; }
    .pnr-title { font-size: 20px; }
    .pnr-city { width: 84px; }
    .pnr-code { font-size: 24px; }
    .pnr-lines { font-size: 11.5px; padding: 10px; }
    .pnr-dots i { width: 20px; }
    .pnr-status { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .pnr-spin, .pnr-dots i.now, .pnr-typing::after, .pnr-slot.pnr-locked { animation: none; }
}

.home-hero-sub, .pnr-lead { text-wrap: balance; }

/* =========================================================================
   Corrigé d'une copie : tableau 3 colonnes (attendu / tapé / verdict) avec
   code couleur. Demande client : "dans la correction ce n'est pas assez
   intuitif... un code couleur parlant et une mise en page top".
   Utilisé en mode examen ET en entraînement Roméo (src/CorrectionView.php).
   ========================================================================= */
.corr-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.corr-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.corr-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.corr-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
.corr-table thead th {
    position: sticky; top: 0; z-index: 1;
    background: #f1f5f9; text-align: left; padding: 9px 10px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #475569;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.corr-table thead th:last-child { text-align: center; }
.corr-row td { padding: 9px 10px; vertical-align: top; border-bottom: 1px solid rgba(15, 23, 42, .07); }
.corr-cmd {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace;
    font-weight: 600; word-break: break-word; min-width: 150px;
}
.corr-time { display: block; margin-top: 3px; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500; color: #64748b; }
.corr-dash { color: #94a3b8; font-family: 'Inter', sans-serif; font-weight: 400; }
.corr-why { min-width: 260px; }
.corr-reason { margin-top: 3px; color: #334155; line-height: 1.5; }
.corr-ai { margin-top: 5px; padding: 5px 8px; background: rgba(255, 255, 255, .7); border-radius: 6px; color: #475569; font-size: 12.5px; line-height: 1.5; }
.corr-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.corr-pts { text-align: center; font-weight: 800; white-space: nowrap; color: #166534; }
.corr-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.corr-sum { flex: 1 1 110px; text-align: center; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); }
.corr-sum b { display: block; font-size: 22px; line-height: 1.2; }
.corr-sum span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.corr-todo { background: #f3e8ff; border: 1px solid #d8b4fe; color: #6b21a8; font-weight: 700; padding: 9px 12px; border-radius: 8px; margin: 0 0 12px; }
@media (max-width: 640px) {
    .corr-table { font-size: 12px; }
    .corr-cmd, .corr-why { min-width: 0; }
}

/* Fenêtre SM : attribution d'un siège et d'un repas PAR PASSAGER, sur chaque
   vol (demande client : "SM ouvre le plan cabine pour le choix de la place en
   fonction du nombre de personnes et si vol aller-retour, et donne aussi les
   repas"). Voir public/assets/js/sm_modal.js. */
.sm-pax-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sm-pax {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
    padding: 7px 12px; border-radius: 10px; cursor: pointer; text-align: left;
    border: 2px solid var(--border); background: #fff; color: var(--ink);
    font-family: inherit; transition: border-color .15s ease, background .15s ease;
}
.sm-pax:hover { border-color: var(--blue); }
.sm-pax.active { border-color: var(--orange); background: var(--orange-light); }
.sm-pax.sm-pax-done { background: var(--green-light); border-color: #86d9a3; }
.sm-pax.sm-pax-done.active { border-color: var(--orange); }
.sm-pax-n { font-weight: 800; font-size: 12px; letter-spacing: .04em; color: var(--blue-dark); }
.sm-pax-name { font-weight: 700; font-size: 13px; }
.sm-pax-seat { font-size: 11.5px; font-weight: 600; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.sm-progress { margin-bottom: 10px; }
.sm-prog { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--orange-light); color: var(--orange-dark); font-weight: 700; font-size: 13px; }
.sm-prog.sm-prog-ok { background: var(--green-light); color: #166534; }
.sm-prog-warn { display: inline-block; padding: 5px 12px; border-radius: 999px; background: #ffebee; color: #c62828; font-weight: 700; font-size: 13px; }
.sm-seg-count { font-size: 11px; font-weight: 800; opacity: .75; margin-left: 4px; }
.sm-seg-tab.sm-seg-done { background: var(--green-light); border-color: #86d9a3; color: #166534; }
.sm-meal-pax { padding: 10px 0; border-top: 1px solid var(--border); }
.sm-meal-pax:first-child { border-top: 0; padding-top: 0; }
.sm-meal-pax-name { font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.sm-meal-pax-name b { color: var(--blue-dark); }
.sm-meal-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; }

/* Résultat de l'analyse IA, affiché en grand avec un bouton Fermer
   (demande client). */
.ai-overlay {
    position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(14, 26, 51, .55); backdrop-filter: blur(2px);
}
.ai-box {
    background: var(--card); border-radius: 20px; box-shadow: 0 24px 60px rgba(14, 26, 51, .35);
    padding: 34px 30px 28px; max-width: 580px; width: 100%; text-align: center;
    animation: ai-pop .25s ease;
}
@keyframes ai-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ai-box-icon { font-size: 50px; line-height: 1; margin-bottom: 10px; }
.ai-box h2 { margin: 0 0 14px; font-size: 24px; color: var(--ink); }
.ai-box-summary { margin: 0 0 14px; font-size: 20px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.ai-box-detail { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.ai-box .btn { padding: 12px 34px; font-size: 16px; }

/* Tableau par étapes : numéro, barème, menu de verdict, commandes isolées. */
.corr-num { text-align: center; font-weight: 800; color: #64748b; }
.corr-max { font-weight: 600; color: #94a3b8; font-size: 11.5px; }
.corr-set { margin-top: 8px; }
.corr-set select {
    width: auto; min-width: 150px; margin: 0; padding: 5px 8px;
    font-size: 12.5px; font-weight: 700; border-radius: 8px; background: #fff;
}
.corr-extras { margin-top: 14px; }
.corr-extras h4 { margin: 0 0 8px; font-size: 14px; color: var(--ink); }
@media (max-width: 520px) { .ai-box { padding: 26px 18px 22px; } .ai-box-summary { font-size: 17px; } }

/* Récapitulatif rapide d'un élève (notes d'examen + entraînement Roméo),
   ouvert en modale depuis students.php (demande client). Réutilise
   .ai-overlay pour le fond assombri, mais une boîte plus large et alignée à
   gauche : c'est un tableau de données, pas un message centré. */
.recap-box {
    background: var(--card); border-radius: 20px; box-shadow: 0 24px 60px rgba(14, 26, 51, .35);
    padding: 26px 28px 24px; max-width: 760px; width: 100%; max-height: 85vh; overflow-y: auto;
    text-align: left; animation: ai-pop .2s ease;
}
.recap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 560px) { .recap-box { padding: 18px 16px 18px; } }

/* Fusion d'une commande de l'élève avec une étape, et essais précédents. */
.corr-prev { margin-top: 6px; font-size: 11.5px; font-weight: 500; color: #94a3b8; line-height: 1.6; }
.corr-prev i { font-style: normal; opacity: .8; }
.corr-merge { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.corr-merge select { width: auto; max-width: 260px; margin: 0; padding: 5px 8px; font-size: 12.5px; border-radius: 8px; background: #fff; }
.corr-pick { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .85); border: 1px dashed var(--orange); }
.corr-pick label { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--orange-dark); width: 100%; }
