/* ============================================================================
 * assets/css/learning.css — ComApo E-learning
 * Composants spécifiques : catalogue, fiche formation, lecteur de leçon, quiz.
 * Langage « Précision éditoriale » : progression pédagogique = or,
 * feedback de validation (quiz, alertes) = vert/rouge sémantiques.
 * ========================================================================== */

/* ─── Motif de couverture (remplace l'aplat + lettre quand il n'y a pas
   d'image) : nuit encre + halos dorés discrets, signature ComApo. */
.cover-pattern {
    background-color: var(--ink-900);
    background-image:
        radial-gradient(circle at 20% 22%, rgba(230, 216, 0, .32) 0%, transparent 46%),
        radial-gradient(circle at 82% 78%, rgba(230, 216, 0, .14) 0%, transparent 50%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0px, rgba(255, 255, 255, .04) 2px, transparent 2px, transparent 22px);
}
.cover-pattern__icon { opacity: .5; }

/* ─── Bandeau d'accueil visiteur : sobre, clair et court ────────────────
   Le catalogue reste visible sans scroller — le produit d'abord. */
.hero-lite { background: var(--bg-elev); border-bottom: 1px solid var(--border-soft); }
.hero-lite__inner {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
    padding-top: 52px; padding-bottom: 44px;
}
.hero-lite__main { min-width: 0; max-width: 640px; }
.hero-lite .kicker { margin-bottom: 12px; color: var(--gold-deep); }
.hero-lite h1 {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0 0 12px;
    letter-spacing: -.02em; line-height: 1.1;
}
.hero-lite h1 em { font-style: normal; box-shadow: inset 0 -0.34em var(--gold-tint); }
.hero-lite__sub { margin: 0; color: var(--text-muted); font-size: 15.5px; line-height: 1.65; max-width: 540px; }
.hero-lite__actions { flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 6px; }
@media (max-width: 860px) {
    .hero-lite__inner { flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 40px; padding-bottom: 34px; }
}

/* ─── Accueil connecté : bonjour + reprendre + catalogue ───────────────── */
.home-head { margin-bottom: 26px; }
.home-head h1 { margin: 0 0 6px; font-size: 27px; }
.home-head__sub { margin: 0; color: var(--text-muted); font-size: 14.5px; }
.home-section__title { margin: 38px 0 4px; font-size: 18px; }
.resume-card {
    display: flex; align-items: center; gap: 20px; padding: 20px 24px;
    background: var(--ink-900); color: #fff; border-radius: var(--radius);
    transition: box-shadow .15s ease;
}
.resume-card:hover { box-shadow: var(--shadow-md); }
.resume-card:hover .resume-card__arrow { transform: translateX(4px); }
.resume-card__icon {
    flex: none; width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 50%; background: var(--gold-bright); color: var(--ink-900);
}
.resume-card__icon .icon { width: 20px; height: 20px; }
.resume-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.resume-card__kicker {
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--gold-bright);
}
.resume-card__text strong { font-family: var(--font-display); font-size: 17px; }
.resume-card__text small { font-size: 13px; color: rgba(255, 255, 255, .62); }
.resume-card__progress { flex: none; display: flex; align-items: center; gap: 10px; width: 200px; }
.resume-card__progress .progress-bar { flex: 1; background: rgba(255, 255, 255, .18); }
.resume-card__progress .progress-bar span { background: var(--gold-bright); }
.resume-card__pct { font-size: 12.5px; font-weight: 700; color: var(--gold-bright); }
.resume-card__arrow { flex: none; font-size: 20px; color: rgba(255, 255, 255, .6); transition: transform .15s ease; }
@media (max-width: 720px) {
    .resume-card { flex-wrap: wrap; }
    .resume-card__progress { width: 100%; order: 4; }
    .resume-card__arrow { display: none; }
}

.catalog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px; padding: 40px 0 64px;
}

/* ─── État vide (catalogue, mes formations) ─────────────────────────── */
.empty-state {
    max-width: 440px; margin: 64px auto 100px; padding: 48px 40px; text-align: center;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
}
.empty-state__icon {
    width: 60px; height: 60px; margin: 0 auto 20px; display: grid; place-items: center;
    font-size: 26px; border-radius: 50%; background: var(--gold-tint); color: var(--gold-deep);
}
.empty-state h2 { font-size: 20px; margin: 0 0 10px; }
.empty-state p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.empty-state .btn { margin-top: 22px; }

/* ─── Carte formation : nette, image plein bord, hover discret ───────── */
.course-card { overflow: hidden; transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.course-card:hover { border-color: var(--ink-400); box-shadow: var(--shadow-sm); }
.course-card__cover {
    position: relative; height: 150px; background-color: var(--ink-900); background-size: cover; background-position: center;
    display: grid; place-items: center; color: var(--gold-bright); font-size: 40px; font-weight: 800;
}
.course-card__status {
    position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--radius-pill);
    font-size: 11.5px; font-weight: 650; background: rgba(255, 255, 255, .94); color: var(--ink-700);
}
.course-card__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-400); }
.course-card__status.is-done { color: var(--ink-900); }
.course-card__status.is-done::before { background: var(--gold); }
.course-card__status.is-progress::before { background: var(--gold); }
.course-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.course-card__body h2 { font-size: 18px; font-weight: 650; margin: 0 0 6px; }
.badge-internal { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 3px 10px; margin: 0 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--gold-tint); color: var(--gold-deep); }
.badge-internal .icon { width: 12px; height: 12px; }
.course-card__summary {
    color: var(--text-muted); font-size: 14px; margin: 0 0 12px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55;
}
.course-card__meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-400); }
.course-card__link { margin-top: auto; padding-top: 14px; font-size: 13.5px; font-weight: 650; color: var(--ink-900); }
.course-card:hover .course-card__link { color: var(--gold-deep); }

/* ─── Fiche formation ────────────────────────────────────────────────── */
.course-detail { padding: 48px 24px 72px; }

/* Hero : texte à gauche, grande couverture à droite. */
.course-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px;
    align-items: center; margin-bottom: 40px;
}
.course-hero__kicker {
    margin: 0 0 10px; font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; color: var(--gold-deep);
}
.course-hero h1, .course-hero h2 { margin: 0 0 12px; font-size: 36px; line-height: 1.15; }
.course-hero__summary { margin: 0 0 18px; color: var(--text-muted); font-size: 16px; line-height: 1.6; max-width: 560px; }
.course-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.course-hero__meta span {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
    color: var(--ink-700); padding: 6px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-pill); background: var(--bg-elev);
}
.course-hero__progress { display: flex; align-items: center; gap: 10px; max-width: 340px; margin-bottom: 24px; }
.course-hero__progress .progress-bar { flex: 1; }
.course-hero__pct { font-size: 12.5px; font-weight: 700; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.course-hero__cover {
    width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius);
    background-color: var(--ink-900); background-size: cover; background-position: center;
    display: grid; place-items: center; color: var(--gold-bright); box-shadow: var(--shadow-md);
}
.course-detail__description { margin: 0 0 8px; line-height: 1.7; max-width: 720px; }
.course-detail__toc-title { margin: 40px 0 20px; }

.toc__module { margin-bottom: 26px; }
.toc__module h3 {
    display: flex; align-items: center; gap: 10px; font-size: 15.5px; margin: 0 0 10px; color: var(--ink-900);
    font-weight: 650;
}
.toc__module-link { display: block; border-radius: var(--radius-sm); margin: -4px -4px 6px; padding: 4px; transition: background .12s; }
.toc__module-link:hover { background: var(--gold-tint); }
.toc__module-link h3 { margin-bottom: 4px; cursor: pointer; }
.toc__module-lock-hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-400); margin: -2px 0 10px; }
.toc__module-badge {
    flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
    background: var(--gold-tint); color: var(--gold-deep); font-size: 12.5px; font-weight: 700;
}
.toc__module ul { list-style: none; margin: 0; padding: 0; }
.toc__module li {
    border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border-soft);
    margin-bottom: 6px; font-size: 14.5px; transition: border-color .12s; overflow: hidden;
}
.toc__module li:hover { border-color: var(--ink-400); }
.toc__module li.is-locked { opacity: .55; }
.toc__lesson-link, .toc__lesson-locked {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    color: inherit; text-decoration: none;
}
.toc__lesson-link:hover { background: var(--ink-50); }
.toc__step {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    font-size: 11px; font-weight: 650; color: var(--ink-500); background: var(--ink-100);
}
.toc__module li.is-done .toc__step { background: var(--gold); color: var(--ink-900); }
.toc__module li.is-done .toc__title { color: var(--ink-500); }
.toc__title { flex: 1; }
.toc__badge { font-size: 12px; color: var(--gold-deep); font-weight: 650; white-space: nowrap; }
@media (max-width: 560px) { .toc__lesson-link, .toc__lesson-locked { flex-wrap: wrap; } }

/* ─── Écran de célébration de fin de formation ───────────────────────
   Le territoire où l'or est généreux : c'est ici que vit le « wow ». */
.completion-hero {
    position: relative; overflow: hidden; text-align: center; padding: 56px 24px 44px;
    margin-bottom: 40px; background: linear-gradient(165deg, #101012, #1E1D14);
    border-radius: var(--radius); color: #fff;
}
.completion-hero::before, .completion-hero::after {
    content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, var(--gold) 0%, transparent 70%); pointer-events: none;
}
.completion-hero::before { top: -140px; left: -90px; opacity: .2; }
.completion-hero::after { bottom: -150px; right: -70px; opacity: .14; }
.completion-hero__badge {
    position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
    background: var(--gold-bright); color: var(--ink-900);
    display: grid; place-items: center; font-size: 32px; font-weight: 800;
    box-shadow: 0 0 0 8px rgba(255, 252, 3, .14);
}
.completion-hero__kicker {
    position: relative; z-index: 1; color: var(--gold-bright); text-transform: uppercase;
    letter-spacing: .12em; font-weight: 650; font-size: 12.5px; margin: 0 0 8px;
}
.completion-hero h1 { position: relative; z-index: 1; color: #fff; margin: 0 0 10px; font-size: 34px; }
.completion-hero__text {
    position: relative; z-index: 1; color: #CFCFC7; max-width: 480px; margin: 0 auto 30px; font-size: 15.5px;
}
.completion-hero__stats {
    position: relative; z-index: 1; display: flex; justify-content: center; gap: 36px;
    flex-wrap: wrap; margin-bottom: 30px;
}
.completion-hero__stat { display: flex; flex-direction: column; }
.completion-hero__stat strong { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold-bright); line-height: 1.1; }
.completion-hero__stat span { font-size: 12px; color: #A8A89F; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.completion-hero__actions { position: relative; z-index: 1; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.completion-hero .btn-outline { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.completion-hero .btn-outline:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }

/* ─── Page de partage (carte de réussite) ────────────────────────────── */
.share-page { max-width: 700px; margin: 0 auto; padding: 48px 20px 80px; text-align: center; }
.share-page__intro h1 { margin: 6px 0 12px; font-size: 30px; }
.share-card {
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
    margin: 28px 0; border: 1px solid var(--border);
}
.share-card img { width: 100%; height: auto; display: block; }
.share-page__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.share-page__caption { text-align: left; }
.share-page__caption textarea {
    width: 100%; resize: none; font-family: inherit; font-size: 14px; padding: 14px 16px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0; border: 1px solid var(--border); border-bottom: none; background: var(--bg-elev);
    color: var(--text); cursor: pointer; line-height: 1.5;
}
.share-page__caption #copyCaptionBtn { border-radius: 0 0 var(--radius-sm) var(--radius-sm); width: 100%; border-color: var(--border); }

/* ─── Mes formations : tableau de bord deux colonnes ─────────────────── */
.my-head { padding: 4px 0 26px; }
.my-head h1 { margin: 0 0 6px; }
.my-head__sub { margin: 0; color: var(--text-muted); font-size: 15px; }

.my-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px;
    align-items: start; padding-bottom: 72px;
}
.my-main { display: flex; flex-direction: column; gap: 30px; min-width: 0; }

.my-section__badge {
    display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px;
    border-radius: 999px; background: var(--gold-tint); color: var(--gold-deep);
    font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 600; vertical-align: 1px;
}
.my-section__badge .icon { width: 11px; height: 11px; }
.mc-card--assigned { border-left: 3px solid var(--gold-bright, #FFD500); }
.my-section__title {
    font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-500); margin: 0 0 12px;
}
.my-section .mc-card + .mc-card { margin-top: 12px; }

/* Carte formation : couverture, corps, action — une seule ligne calme. */
.mc-card {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 18px 14px 14px; transition: border-color .15s, box-shadow .15s;
}
.mc-card:hover { border-color: var(--ink-400); box-shadow: var(--shadow-sm); }
.mc-card__cover {
    width: 96px; height: 72px; border-radius: var(--radius-sm); background-color: var(--ink-900);
    background-size: cover; background-position: center; display: grid; place-items: center;
    color: var(--gold-bright); overflow: hidden;
}
.mc-card__body h3 { font-size: 16.5px; margin: 0 0 4px; }
.mc-card__body h3 a { color: inherit; text-decoration: none; }
.mc-card__body h3 a:hover { text-decoration: underline; }
.mc-card__next {
    margin: 0 0 10px; font-size: 13px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-card__progress { display: flex; align-items: center; gap: 10px; }
.mc-card__progress .progress-bar { flex: 1; max-width: 340px; }
.mc-card__pct { font-size: 12.5px; font-weight: 700; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.mc-card__status {
    display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 0;
    font-size: 13px; font-weight: 650; color: var(--success);
}
.mc-card__actions { display: flex; gap: 8px; align-items: center; }

/* Lien vers le catalogue : invitation discrète en fin de liste. */
.my-discover {
    display: flex; align-items: center; gap: 14px; padding: 16px 20px;
    border: 1.5px dashed var(--ink-200); border-radius: var(--radius);
    text-decoration: none; transition: border-color .15s, background .15s;
}
.my-discover:hover { border-color: var(--ink-400); background: var(--bg-elev); }
.my-discover__icon {
    flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--gold-tint); color: var(--gold-deep);
}
.my-discover__text strong { display: block; font-size: 14.5px; color: var(--ink-900); }
.my-discover__text small { font-size: 12.5px; color: var(--text-muted); }
.my-discover__arrow { margin-left: auto; font-size: 18px; color: var(--ink-400); }

/* Colonne latérale : niveau, série, badges. */
.my-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.side-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.side-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.side-card__head strong { font-size: 15px; }
.level-chip {
    background: var(--ink-900); color: var(--gold-bright);
    font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: var(--radius-pill);
}
.side-card__hint { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); }
.side-streak {
    display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 14px;
    border-radius: var(--radius-sm); background: var(--ink-50); border: 1px solid var(--border-soft);
    color: var(--ink-500); font-size: 13px;
}
.side-streak.is-active { background: var(--gold-tint); border-color: #EDE4A8; color: var(--ink-900); }
.side-streak__flame { display: grid; place-items: center; color: var(--ink-400); }
.side-streak.is-active .side-streak__flame { color: var(--gold-deep); }
.side-streak strong { font-size: 17px; font-weight: 700; }

.side-card__title-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.side-card__title-row h2 { font-size: 15px; margin: 0; }
.side-card__count { font-size: 12.5px; font-weight: 700; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.badge-list { list-style: none; margin: 0; padding: 0; }
.badge-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.badge-list li + li { border-top: 1px solid var(--border-soft); }
.badge-list__icon {
    flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: var(--ink-50); color: var(--ink-400);
}
.badge-list li.is-unlocked .badge-list__icon { background: var(--gold-tint); color: var(--gold-deep); }
.badge-list__text strong { display: block; font-size: 13.5px; }
.badge-list li:not(.is-unlocked) .badge-list__text strong { color: var(--ink-500); font-weight: 600; }
.badge-list__text small { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ─── Toast de récompense (fin de leçon) ─────────────────────────────── */
.reward-toast { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.reward-toast__chip {
    display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650;
    padding: 6px 14px; border-radius: var(--radius-pill); animation: reward-pop .3s ease-out;
}
.reward-toast__chip--xp { background: var(--ink-900); color: var(--gold-bright); }
.reward-toast__chip--streak { background: var(--ink-100); color: var(--ink-900); }
.reward-toast__chip--level { background: var(--gold); color: var(--ink-900); }
.reward-toast__chip--badge { background: var(--gold-tint); color: var(--gold-deep); }
@keyframes reward-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reward-toast--hero { position: relative; z-index: 1; justify-content: center; margin-bottom: 22px; }

/* ─── Carte "à suivre" (fin de leçon) ─────────────────────────────────── */
.up-next {
    display: flex; align-items: center; gap: 16px; margin: 32px 0; padding: 16px 20px;
    background: var(--ink-900); border-radius: var(--radius); text-decoration: none;
    transition: background .15s;
}
.up-next:hover { background: var(--ink-700); }
.up-next__thumb {
    flex: none; width: 52px; height: 52px; border-radius: 50%; background-color: rgba(255, 255, 255, .08);
    background-size: cover; background-position: center; display: grid; place-items: center; color: var(--gold-bright);
    font-size: 19px;
}
.up-next__thumb--finish { background: var(--gold-bright); color: var(--ink-900); }
.up-next__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-next__kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-bright); font-weight: 650; }
.up-next__title { color: #fff; font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-next__arrow { color: var(--gold-bright); font-size: 20px; flex: none; }

/* ─── États verrouillés (plateau de jeu) ──────────────────────────────── */
.lesson-sidebar__module li.is-locked a,
.lesson-sidebar__module li.is-locked { color: var(--text-muted); opacity: .55; cursor: default; }
/* Item verrouillé : pas de lien, mais même géométrie que les items
   cliquables pour que le rail de progression reste aligné. */
.lesson-sidebar__module li.is-locked {
    display: flex; align-items: center; gap: 10px; padding: 7px 8px; font-size: 14px;
}
.lesson-sidebar__module li.is-locked .lesson-sidebar__step { background: transparent; font-size: 13px; border-color: var(--ink-200); }
.roadmap__module.is-locked .roadmap__card { opacity: .5; filter: grayscale(.4); }
.roadmap__module.is-locked .roadmap__marker-image { opacity: .6; filter: grayscale(1); color: var(--text-muted); }

/* ─── Parcours visuel (roadmap) : rail vertical unique, aligné à gauche ─ */
.roadmap { position: relative; max-width: 780px; padding: 4px 0; }
.roadmap::before {
    content: ""; position: absolute; left: 32px; top: 14px; bottom: 14px; width: 0;
    border-left: 2px dashed var(--ink-200); z-index: 0;
}
.roadmap__module {
    position: relative; z-index: 1; display: grid; grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 22px; align-items: start; margin-bottom: 22px;
}
.roadmap__marker { position: relative; width: 64px; padding-top: 2px; }
.roadmap__marker-image {
    width: 64px; height: 64px; border-radius: 50%; background-color: var(--ink-900); background-size: cover;
    background-position: center; border: 4px solid var(--bg); box-shadow: var(--shadow-sm);
    display: grid; place-items: center; color: var(--gold-bright); font-weight: 800; font-size: 18px;
    transition: box-shadow .15s;
}
.roadmap__module.is-current .roadmap__marker-image { box-shadow: 0 0 0 3px var(--gold), var(--shadow-md); }
.roadmap__marker-check {
    position: absolute; bottom: 0; right: -2px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--gold); color: var(--ink-900); display: grid; place-items: center; font-size: 12px;
    font-weight: 800; border: 3px solid var(--bg);
}
.roadmap__card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px 8px;
}
.roadmap__module.is-current .roadmap__card { border-color: var(--ink-900); }
.roadmap__marker-image--finish { background: var(--gold-bright); font-size: 26px; color: var(--ink-900); }
.roadmap__card--finish { padding: 18px 20px; }
.roadmap__card--finish p { color: var(--text-muted); font-size: 13.5px; margin: 4px 0 0; }

@media (max-width: 720px) {
    .roadmap::before { left: 24px; }
    .roadmap__module { grid-template-columns: 48px 1fr; column-gap: 14px; }
    .roadmap__marker { width: 48px; }
    .roadmap__marker-image { width: 48px; height: 48px; font-size: 15px; border-width: 3px; }
    .roadmap__marker-check { width: 20px; height: 20px; font-size: 10px; border-width: 2px; }
}

/* ─── Lecteur de leçon : mode focus, chrome minimal ──────────────────── */
.lesson-layout {
    display: grid; grid-template-columns: 264px minmax(0, 800px); gap: 48px;
    justify-content: center; padding: 28px 24px 80px; align-items: start;
}
.admin-preview-banner { grid-column: 1 / -1; }
.lesson-sidebar {
    position: sticky; top: 24px; padding: 4px 12px 4px 0;
    max-height: calc(100dvh - 48px); overflow-y: auto;
    border: none; background: transparent;
}
.lesson-sidebar > summary { list-style: none; cursor: pointer; }
.lesson-sidebar > summary::-webkit-details-marker { display: none; }
.lesson-sidebar__summary {
    display: none; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-elev); font-size: 13.5px; font-weight: 650;
}
.lesson-sidebar__summary-meta { color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.lesson-sidebar__body { display: block; }
.lesson-sidebar__back { display: block; font-weight: 550; font-size: 13.5px; margin-bottom: 16px; color: var(--ink-500); }
.lesson-sidebar__back:hover { color: var(--ink-900); }
.lesson-sidebar__progress { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.lesson-sidebar__progress .progress-bar { margin-bottom: 6px; }
.lesson-sidebar__progress span:last-child { font-size: 12.5px; font-weight: 650; color: var(--gold-deep); }
.lesson-sidebar__module h4 {
    font-size: 12px; text-transform: uppercase; color: var(--ink-400); margin: 18px 0 8px;
    letter-spacing: .06em; font-weight: 600;
}
.lesson-sidebar__module ul { list-style: none; margin: 0; padding: 0; }
/* Rail vertical : une ligne continue relie les étapes — dorée sur la
   partie accomplie, la signature de progression du produit. */
.lesson-sidebar__module li { position: relative; }
.lesson-sidebar__module li:not(:last-child)::before {
    content: ""; position: absolute; left: 18px; top: 30px; bottom: -4px; width: 2px;
    background: var(--ink-100); border-radius: 2px;
}
.lesson-sidebar__module li.is-done:not(:last-child)::before { background: var(--gold); }
.lesson-sidebar__module li a {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 14px;
    color: var(--text); transition: background .12s;
}
.lesson-sidebar__module li a:hover { background: var(--ink-100); }
.lesson-sidebar__module li.is-current a { background: var(--gold-tint); color: var(--ink-900); font-weight: 650; }
.lesson-sidebar__module li.is-locked { display: flex; align-items: center; gap: 10px; padding: 7px 8px; font-size: 14px; color: var(--ink-400); }
.lesson-sidebar__step {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    font-size: 11.5px; font-weight: 650; color: var(--ink-500); background: var(--bg);
    border: 1.5px solid var(--ink-200);
}
.lesson-sidebar__module li.is-current .lesson-sidebar__step {
    background: var(--ink-900); color: var(--gold-bright); border-color: var(--ink-900);
}
.lesson-sidebar__module li.is-done .lesson-sidebar__step { background: var(--gold); color: var(--ink-900); border-color: var(--gold); }

/* ─── Contenu de la leçon ────────────────────────────────────────────── */
.lesson-meta {
    display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 10px;
    font-size: 12px; font-weight: 600; color: var(--ink-400); text-transform: uppercase; letter-spacing: .06em;
}
.lesson-meta__module { color: var(--gold-deep); }
.lesson-meta span:not(:last-child)::after { content: "·"; margin-left: 14px; color: var(--ink-200); }
.lesson-content h1 { margin-top: 0; font-size: 32px; }

/* ─── Contenu en "Stories" : un écran à la fois, pas un mur de texte ──── */
.story { margin: 22px 0 36px; user-select: none; }
.story__progress { display: flex; gap: 5px; margin-bottom: 18px; }
.story__segment { flex: 1; height: 3px; border-radius: 999px; background: var(--ink-200); overflow: hidden; transition: background .2s; }
.story__segment.is-done, .story__segment.is-current { background: var(--gold); }
.story__viewport {
    position: relative; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0; border-bottom: none;
    padding: 48px 56px; min-height: 380px; max-height: min(62vh, 560px); display: flex;
    cursor: pointer; overflow-y: auto;
}
.story__slide { display: none; width: 100%; margin: auto; user-select: text; }
.story__slide.is-active { display: block; animation: story-fade-in .3s ease; }
@keyframes story-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.story__slide-inner { font-size: 18px; line-height: 1.75; max-width: 640px; margin: 0 auto; }
.story__slide-inner p { margin: 0 0 14px; }
.story__slide-inner p:last-child { margin-bottom: 0; }
.story__slide-inner strong { color: var(--ink-900); }

/* Slide citation : inversée — nuit encre, texte or. Le moment spectaculaire. */
.story__slide--quote .story__slide-inner {
    background: var(--ink-900); color: var(--gold-bright); border-radius: var(--radius);
    padding: 38px 42px; font-family: var(--font-display); font-size: 22px; font-weight: 600;
    line-height: 1.45; text-align: center; letter-spacing: -.01em;
}
.story__slide--quote blockquote, .story__slide--quote blockquote p { margin: 0; }

.story__slide--list .story__slide-inner ul, .story__slide--list .story__slide-inner ol {
    margin: 0; padding: 0; list-style: none; font-size: 17.5px;
}
.story__slide--list .story__slide-inner li { position: relative; padding: 8px 0 8px 36px; margin-bottom: 6px; }
.story__slide--list .story__slide-inner li::before {
    content: "\2713"; position: absolute; left: 0; top: 8px; width: 24px; height: 24px; border-radius: 8px;
    background: var(--gold-tint); color: var(--gold-deep); font-size: 12px; font-weight: 800; display: grid; place-items: center;
}

.story__media { width: 100%; border-radius: var(--radius-sm); display: block; max-height: 420px; object-fit: contain; margin: 0 auto; }
.story__media--video { position: relative; padding-top: 56.25%; border-radius: var(--radius-sm); overflow: hidden; background: #000; width: 100%; }
.story__media--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story__video-error { text-align: center; color: var(--text-muted); background: var(--ink-50); border-radius: var(--radius-sm); padding: 32px 20px; }

/* Pied de carte : la navigation fait partie de la story, pas des boutons
   qui flottent en dessous. */
.story__nav {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px; background: var(--bg-elev); border: 1px solid var(--border);
    border-top: 1px solid var(--border-soft); border-radius: 0 0 var(--radius) var(--radius);
}
.story__btn {
    border: 1px solid var(--ink-200); background: var(--bg-elev); border-radius: var(--radius-sm); padding: 10px 22px;
    font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; color: var(--text);
    font-family: inherit;
}
.story__btn:hover { border-color: var(--ink-900); }
.story__btn--next { background: var(--ink-900); color: var(--gold-bright); border-color: var(--ink-900); }
.story__btn--next:hover { background: var(--ink-700); border-color: var(--ink-700); }
.story__btn--prev:disabled { opacity: .35; cursor: default; }
.story__btn--prev:disabled:hover { border-color: var(--ink-200); }
.story__counter { font-size: 13px; color: var(--ink-400); font-weight: 600; font-variant-numeric: tabular-nums; }
.after-story.is-hidden { display: none; }

@media (max-width: 640px) {
    .story__viewport {
        padding: 20px 16px; min-height: 200px; max-height: none;
        cursor: default;
    }
    .story__slide-inner { font-size: 16px; line-height: 1.7; }
    .story__slide--quote .story__slide-inner { padding: 24px 18px; font-size: 17px; }
    .story__nav { gap: 8px; padding: 10px 12px; }
    .story__btn { padding: 11px 14px; flex: 1; text-align: center; }
    .story__btn--prev { flex: 0 0 auto; min-width: 48px; }
    .story__media { max-height: 280px; }
}

.lesson-cta-card {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    margin: 36px 0; padding: 22px 26px; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.lesson-cta-card__title { font-weight: 700; margin: 0 0 4px; font-size: 15.5px; }
.lesson-cta-card__hint { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.lesson-complete-form { flex: none; }
.lesson-done-banner {
    display: inline-flex; align-items: center; gap: 8px; margin: 32px 0; padding: 12px 18px;
    background: #F0FDF4; color: var(--success); border: 1px solid #BBF7D0;
    border-radius: var(--radius-sm); font-weight: 650; font-size: 14px;
}
.lesson-nav { display: flex; justify-content: space-between; margin-top: 40px; }

/* ─── Quiz ───────────────────────────────────────────────────────────── */
.quiz-block { margin: 36px 0; padding: 26px 28px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.quiz-question { margin-bottom: 22px; }
.quiz-question__title { display: flex; align-items: center; gap: 10px; font-weight: 650; margin: 0 0 12px; }
.quiz-question__number {
    flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
    background: var(--ink-900); color: var(--gold-bright); font-size: 12.5px; font-weight: 700;
}
.quiz-option {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 8px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-soft); cursor: pointer; font-size: 14.5px;
    transition: background .12s, border-color .12s;
}
.quiz-option:hover { border-color: var(--ink-400); }
.quiz-option:has(input:checked) { border-color: var(--ink-900); background: var(--gold-tint); font-weight: 600; }
.quiz-option__letter {
    flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
    background: var(--ink-100); color: var(--ink-500); font-size: 11px; font-weight: 700;
}
.quiz-option:has(input:checked) .quiz-option__letter { background: var(--ink-900); color: var(--gold-bright); }
.quiz-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-question__hint { font-size: 13px; color: var(--text-muted); margin: -4px 0 14px; }
.quiz-option.is-correct { border-color: var(--success); background: #F0FDF4; font-weight: 600; }
.quiz-option.is-correct .quiz-option__letter { background: var(--success); color: #fff; }
.quiz-option.is-wrong { border-color: var(--danger); background: #FEF2F2; }
.quiz-option.is-wrong .quiz-option__letter { background: var(--danger); color: #fff; }
.quiz-option__check { margin-left: auto; color: var(--success); font-weight: 800; }
.quiz-option__cross { margin-left: auto; color: var(--danger); font-weight: 800; }

/* Fil de progression : or pur sur piste neutre — la signature. */
.progress-bar { height: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

/* ─── Mon compte ─────────────────────────────────────────────────────── */
.account-page { padding: 36px 24px 64px; max-width: 640px; }
.account-section { padding: 24px 28px; margin-bottom: 20px; }
.account-section h2 { font-size: 18px; margin: 0 0 16px; }
.account-section--danger { border-color: #FECACA; }

/* ─── Certificat ─────────────────────────────────────────────────────── */
.certificate-page { padding: 60px 24px; display: grid; place-items: center; }
.certificate-preview {
    max-width: 560px; padding: 48px 40px; text-align: center;
    border-top: 4px solid var(--gold); box-shadow: var(--shadow-sm);
}
.certificate-preview__label { color: var(--gold-deep); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; font-size: 12px; margin: 0 0 10px; }
.certificate-preview h1 { font-size: 28px; margin: 0 0 12px; }
.certificate-preview__course { color: var(--text-muted); margin: 0 0 18px; }
.certificate-preview .btn { margin-top: 16px; }

/* ─── Pages légales ──────────────────────────────────────────────────── */
.legal-page { padding: 40px 24px 80px; max-width: 720px; line-height: 1.7; }
.legal-page h1 { letter-spacing: -.02em; }
.legal-page h2 {
    font-size: 17px; margin: 34px 0 10px; padding-left: 14px;
    border-left: 3px solid var(--gold); color: var(--ink-900);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .course-hero { grid-template-columns: 1fr; gap: 24px; }
    .course-hero__cover { order: -1; aspect-ratio: 16 / 9; }
    .course-hero h1, .course-hero h2 { font-size: clamp(1.45rem, 5.5vw, 1.75rem); }
    .course-detail { padding: 28px 16px 56px; }

    .lesson-layout {
        grid-template-columns: 1fr; gap: 18px;
        padding: 16px 16px 64px;
    }
    .lesson-sidebar {
        position: static; max-height: none; overflow: visible;
        padding: 0; order: -1;
    }
    .lesson-sidebar__summary { display: flex; }
    .lesson-sidebar[open] .lesson-sidebar__summary {
        border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-bottom-color: transparent;
    }
    .lesson-sidebar__body {
        padding: 12px 14px 14px; border: 1px solid var(--border); border-top: none;
        border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--bg-elev);
        max-height: min(50dvh, 360px); overflow-y: auto;
    }
    .lesson-content h1 { font-size: clamp(1.35rem, 5vw, 1.85rem); }
    .lesson-nav { display: flex; flex-wrap: wrap; gap: 10px; }
    .lesson-nav .btn { flex: 1; text-align: center; min-width: 140px; }

    .my-layout { grid-template-columns: 1fr; }
    .my-side { position: static; }
    .mc-card { grid-template-columns: 72px minmax(0, 1fr); }
    .mc-card__cover { width: 72px; height: 56px; }
    .mc-card__actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .mc-card__actions .btn { flex: 1; text-align: center; min-width: 0; }

    .account-page.container { padding-left: 16px; padding-right: 16px; }
    .account-page { padding: 20px 0 48px; max-width: none; }
    .account-section { padding: 18px 16px; }

    .empty-state { margin: 40px auto 64px; padding: 32px 20px; }
    .page-pad { padding-top: 24px; padding-bottom: 48px; }
    .container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 640px) {
    .nav-game__chip { padding: 3px 8px; font-size: 11.5px; }
    .resume-card { gap: 12px; padding: 14px; }
    .resume-card__icon { width: 40px; height: 40px; }
    .resume-card__text strong,
    .resume-card__text small {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%;
    }
    .mc-card__actions { flex-direction: column; }
    .mc-card__actions .btn { width: 100%; }
    .certificate-preview { padding: 32px 20px; }
    .certificate-preview h1 { font-size: 22px; }
}

/* ─── Guides PDF ─────────────────────────────────────────────────────────── */
.guides-page { padding-bottom: 64px; }
.guides-hero { margin-bottom: 28px; max-width: 640px; }
.guides-hero .kicker { margin-bottom: 10px; color: var(--gold-deep); }
.guides-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    letter-spacing: -.02em;
}
.guides-hero__sub { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
}
.guide-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: box-shadow .15s ease, transform .15s ease;
}
.guide-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide-card__cover {
    height: 120px;
    display: grid;
    place-items: center;
}
.guide-card__cover .icon { width: 36px; height: 36px; color: var(--gold-bright); opacity: .85; }
.guide-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 18px 20px;
    flex: 1;
}
.guide-card__body h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
}
.guide-card__summary {
    margin: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.55;
    flex: 1;
}
.guide-card__body .btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
}
.guide-card__body .btn .icon { width: 14px; height: 14px; }
.guides-hero__dl-hint {
    margin: 14px 0 0;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--gold-deep);
}
.guides-autodl {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
}

/* ─── Gate d'accès guide (wow page avant inscription/connexion) ─────────── */
.guide-gate {
    position: relative;
    min-height: calc(100vh - 72px);
    overflow: hidden;
    padding: 36px 0 72px;
}
.guide-gate__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 12% 0%, rgba(230, 216, 0, .16), transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(16, 16, 18, .06), transparent 55%),
        linear-gradient(180deg, #f7f7f4 0%, var(--bg) 45%, #fff 100%);
    pointer-events: none;
}
.guide-gate__inner { position: relative; z-index: 1; }
.guide-gate__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text-muted);
    text-decoration: none;
}
.guide-gate__back:hover { color: var(--ink-900); }
.guide-gate__back .icon { width: 16px; height: 16px; }
.guide-gate__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 48px;
    align-items: center;
}
.guide-gate__copy .kicker { display: inline-block; margin-bottom: 14px; color: var(--gold-deep); }
.guide-gate__copy h1 {
    margin: 0 0 16px;
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -.03em;
}
.guide-gate__copy h1 em {
    font-style: normal;
    box-shadow: inset 0 -0.28em var(--gold-tint);
}
.guide-gate__lead {
    margin: 0 0 22px;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}
.guide-gate__perks {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.guide-gate__perks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text);
}
.guide-gate__perks .icon {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: var(--gold-deep);
}
.guide-gate__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.guide-gate__actions .btn-lg { padding: 14px 22px; font-size: 15px; }
.guide-gate__fine {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
}
.guide-gate__card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transform: rotate(1.2deg);
}
.guide-gate__card-cover {
    height: 180px;
    display: grid;
    place-items: center;
}
.guide-gate__card-cover .icon {
    width: 52px;
    height: 52px;
    color: var(--gold-bright);
    opacity: .9;
}
.guide-gate__card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.guide-gate__card-body h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}
.guide-gate__card-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.guide-gate__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    font-size: 12.5px;
    font-weight: 650;
    color: var(--text-muted);
}
.guide-gate__card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.guide-gate__card-meta .icon { width: 14px; height: 14px; }

@media (max-width: 900px) {
    .guide-gate__layout { grid-template-columns: 1fr; gap: 32px; }
    .guide-gate__card { max-width: 420px; transform: none; }
}
@media (max-width: 560px) {
    .guide-gate { padding: 24px 0 56px; }
    .guide-gate__actions { flex-direction: column; }
    .guide-gate__actions .btn { width: 100%; justify-content: center; }
}
