/* assets/css/elearning.css — LES PAGES PUBLIQUES « ÉVALUATION E-LEARNING » (06/10/2026).
 *
 * stagiaire/elearning.php (à chaud) et stagiaire/elearning_froid.php (à froid). Mobile d'abord : une seule colonne, 17 px, cibles
 * tactiles de 48 px au moins, contrastes ≥ 4,5:1 dans les deux thèmes. À charger APRÈS style.css (les jetons de couleur).
 */

html { -webkit-text-size-adjust: 100%; }
body.el-page {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font-body); font-size: 17px; line-height: 1.55;
    padding-left: env(safe-area-inset-left, 0); padding-right: env(safe-area-inset-right, 0);
}
.el-page *, .el-page *::before, .el-page *::after { box-sizing: border-box; }

.el-saut { position: absolute; left: -9999px; top: 0; background: var(--paper-raised); color: var(--ink); padding: .6rem 1rem; z-index: 50; }
.el-saut:focus { left: 8px; top: 8px; outline: 3px solid var(--accent-strong); }

.el-entete { max-width: 40rem; margin: 0 auto; padding: 1rem 1rem .2rem; }
.el-entete img { display: block; height: 44px; width: auto; }
.el-cadre { max-width: 40rem; margin: 0 auto; padding: .4rem 1rem 3rem; }
.el-cadre h1 { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.25; margin: .8rem 0 .5rem; }
.el-intro { margin: 0 0 1rem; color: var(--ink); }

/* La progression : collée en haut pendant la saisie. */
.el-progression {
    position: sticky; top: 0; z-index: 20; background: var(--paper); margin: 0 -1rem 1rem; padding: .55rem 1rem .6rem;
    border-bottom: 1px solid var(--border);
}
.el-progression-texte { display: block; font-size: .9rem; color: var(--ink-muted); margin-bottom: .35rem; }
.el-barre { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.el-barre span { display: block; height: 100%; width: 0; background: var(--success); transition: width .25s ease; }
.el-legende { font-size: .92rem; color: var(--ink-muted); margin: 0 0 1rem; }

.el-section {
    background: var(--paper-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.1rem 1rem .4rem; margin: 0 0 1rem;
}
.el-section h2 { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; margin: 0 0 .9rem; }

.el-question { margin: 0 0 1.25rem; }
.el-etiquette, .el-groupe legend { display: block; font-weight: 600; margin: 0 0 .4rem; padding: 0; }
.el-groupe { border: 0; margin: 0; padding: 0; min-width: 0; }
.el-groupe legend { float: left; width: 100%; }
.el-groupe legend + * { clear: both; }
.el-oblig { color: var(--critical); font-weight: 700; }
.el-facultatif { font-weight: 400; color: var(--ink-muted); font-size: .88rem; }
.el-aide { font-size: .92rem; color: var(--ink-muted); margin: 0 0 .5rem; }

.el-champ {
    display: block; width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; font-size: 16px;
    border: 2px solid var(--border-strong); border-radius: var(--radius-md); background: var(--paper); color: var(--ink);
}
textarea.el-champ { min-height: 7rem; resize: vertical; }
.el-champ:focus { outline: 3px solid var(--accent-strong); outline-offset: 1px; border-color: var(--accent-strong); }
.el-question-erreur .el-champ, .el-question-erreur .el-note-case span, .el-question-erreur .el-option { border-color: var(--critical); }
.el-erreur { margin: .4rem 0 0; color: var(--critical); font-weight: 600; font-size: .95rem; }
.el-erreur::before { content: "⚠ "; }

/* Un choix unique : toute la ligne se touche. */
.el-option {
    display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .55rem .8rem; margin: 0 0 .5rem;
    border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--paper); cursor: pointer;
}
.el-option:hover { border-color: var(--border-strong); }
.el-option input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--accent-strong); }
.el-option:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-tint); }
.el-option:has(input:focus-visible) { outline: 3px solid var(--accent-strong); outline-offset: 1px; }
.el-consentement { margin-top: .7rem; align-items: flex-start; }
.el-consentement input { margin-top: .1rem; }

/* La note : cinq cases d'égale largeur (jamais moins de 48 px de haut). */
.el-note { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; }
.el-note-case { display: block; position: relative; cursor: pointer; }
.el-note-case span {
    display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: 1.25rem; font-weight: 700;
    border: 2px solid var(--border-strong); border-radius: var(--radius-md); background: var(--paper); color: var(--ink);
}
.el-note-case:hover span { border-color: var(--accent-strong); }
.el-note-case input:checked + span { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.el-note-case input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.el-note-bornes { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; color: var(--ink-muted); margin-top: .35rem; }

.el-sr, .el-sr-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }

/* Le champ piège : hors de l'écran, jamais en display:none (les robots le savent). */
.el-piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.el-resume-erreurs {
    background: var(--critical-bg); color: var(--critical); border: 2px solid var(--critical); border-radius: var(--radius-md);
    padding: .8rem 1rem; margin: 0 0 1rem;
}
.el-resume-erreurs p { margin: .2rem 0 .3rem; color: var(--ink); font-size: .92rem; }
.el-resume-erreurs ul { margin: 0; padding-left: 1.2rem; }
.el-resume-erreurs a { color: var(--critical); font-weight: 600; }
.el-resume-erreurs:focus { outline: 3px solid var(--critical); outline-offset: 2px; }
.el-info { background: var(--pending-bg); color: var(--ink); border: 1px solid var(--pending); border-radius: var(--radius-md); padding: .8rem 1rem; margin: 0 0 1rem; }

.el-bouton {
    display: block; width: 100%; min-height: 56px; padding: .9rem 1rem; font: inherit; font-size: 1.1rem; font-weight: 700;
    border: 0; border-radius: var(--radius-md); background: var(--accent-strong); color: #fff; cursor: pointer; text-align: center; text-decoration: none;
}
.el-bouton:hover { filter: brightness(1.08); }
.el-bouton:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.el-bouton[disabled] { opacity: .65; cursor: wait; }
.el-bouton-discret {
    display: inline-block; min-height: 48px; padding: .7rem 1rem; font: inherit; font-weight: 600; border: 2px solid var(--border-strong);
    border-radius: var(--radius-md); background: var(--paper-raised); color: var(--ink); cursor: pointer; text-decoration: none;
}
.el-rgpd { font-size: .86rem; color: var(--ink-muted); margin: 1.2rem 0 0; line-height: 1.5; }
.el-merci { text-align: center; padding: 2rem 1rem; }
.el-merci h1 { margin-top: 0; }
.el-coche { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success);
            align-items: center; justify-content: center; font-size: 2rem; margin-bottom: .5rem; }

:root[data-theme="dark"] .el-bouton, :root[data-theme="dark"] .el-note-case input:checked + span { color: #15181B; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .el-bouton, :root:not([data-theme="light"]) .el-note-case input:checked + span { color: #15181B; }
}
@media (min-width: 640px) {
    .el-cadre { padding-top: 1rem; }
    .el-section { padding: 1.4rem 1.4rem .6rem; }
}
@media (max-width: 360px) {
    .el-note { gap: .3rem; }
}
@media (prefers-reduced-motion: reduce) { .el-barre span { transition: none; } }

/* ==== AUX COULEURS DE LA MARQUE (20/10/2026, lot 4 de l'espace stagiaire) =========================
 * Bandeau pétrole à la place du logo ; le bouton d'envoi en pétrole moyen avec la flèche sable (la variante
 * retenue pour tout l'espace stagiaire) ; la réponse choisie en pétrole. Les contrastes restent ≥ 4,5:1. */
body.el-page { --el-action: #155A78; --el-action-fort: #0F4760; --el-fleche: #CA9E68; --el-choix: #063952; }
:root[data-theme="dark"] body.el-page { --el-action: #7FB6CF; --el-action-fort: #9CC8DC; --el-fleche: #063952; --el-choix: #9DB4C0; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.el-page { --el-action: #7FB6CF; --el-action-fort: #9CC8DC; --el-fleche: #063952; --el-choix: #9DB4C0; }
}
.el-bandeau { background: var(--bandeau-fond, #063952); padding: calc(.85rem + env(safe-area-inset-top, 0px)) 1rem .85rem; }
.el-bandeau-dedans { max-width: 40rem; margin: 0 auto; display: flex; align-items: center; gap: .55rem;
    color: var(--bandeau-encre-douce, #C7DAE4); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.el-bandeau-dedans svg { flex: none; }
.el-bouton { background: var(--el-action); }
.el-bouton:hover { filter: none; background: var(--el-action-fort); }
.el-bouton::after { content: " →"; color: var(--el-fleche); }
.el-saut:focus, .el-champ:focus { outline-color: var(--el-action); }
.el-champ:focus { border-color: var(--el-action); }
.el-option input { accent-color: var(--el-choix); }
.el-option:has(input:checked) { border-color: var(--el-choix); background: color-mix(in srgb, var(--el-choix) 9%, var(--paper)); }
.el-option:has(input:focus-visible) { outline-color: var(--el-choix); }
.el-note-case:hover span { border-color: var(--el-choix); }
.el-note-case input:checked + span { background: var(--el-choix); border-color: var(--el-choix); }
