/* Français Lingala : feuille de style unique.
   Couleur principale : bleu ciel. Mode jour / nuit avec html[data-mode="nuit"]. */

/* ------------------------------------------------------------------ Thème */
:root {
    --bleu: #0284c7;
    --bleu-vif: #0ea5e9;
    --bleu-clair: #e0f2fe;
    --bleu-pale: #f0f9ff;
    --bleu-fonce: #0c4a6e;
    --fond: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --bord: #e2e8f0;
    --texte: #0f172a;
    --texte-2: #475569;
    --texte-3: #94a3b8;
    --vert: #059669;
    --vert-clair: #d1fae5;
    --rouge: #dc2626;
    --rouge-clair: #fee2e2;
    --or: #b45309;
    --or-clair: #fef3c7;
    --violet: #6d28d9;
    --violet-clair: #ede9fe;
    --ombre: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
    --ombre-forte: 0 10px 30px rgba(15, 23, 42, .14);
    --rayon: 16px;
    --rayon-petit: 10px;
    --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}
html[data-mode="nuit"] {
    --bleu: #38bdf8;
    --bleu-vif: #0ea5e9;
    --bleu-clair: #0c4a6e;
    --bleu-pale: #082f49;
    --bleu-fonce: #bae6fd;
    --fond: #0b1120;
    --surface: #111a2e;
    --surface-2: #19243b;
    --bord: #24314b;
    --texte: #e2e8f0;
    --texte-2: #a3b1c6;
    --texte-3: #66758c;
    --vert: #34d399;
    --vert-clair: #064e3b;
    --rouge: #f87171;
    --rouge-clair: #4c1515;
    --or: #fbbf24;
    --or-clair: #422c06;
    --violet: #a78bfa;
    --violet-clair: #2e1f5e;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --ombre-forte: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--police);
    font-size: 16px;
    line-height: 1.6;
    color: var(--texte);
    background: var(--fond);
    overflow-x: hidden;
    transition: background .25s, color .25s;
}
a { color: var(--bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--bleu-vif); outline-offset: 2px; border-radius: 6px; }
.aller-contenu { position: absolute; left: -999px; top: 8px; background: var(--bleu); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.aller-contenu:focus { left: 8px; }
.cache { display: none !important; }
.texte-2 { color: var(--texte-2); }
.texte-3 { color: var(--texte-3); font-size: .875rem; }

/* ------------------------------------------------------------------ En-tête */
.entete {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(12px);
    -webkit-backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid var(--bord);
}
.entete__in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--texte); font-size: 1.15rem; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo__icone {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #0284c7 60%, #075985);
    box-shadow: 0 4px 12px rgba(14, 165, 233, .35);
}
.logo__texte strong { color: var(--bleu); }
.menu { display: flex; gap: 4px; margin-left: 12px; }
.menu__lien { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--texte-2); font-weight: 500; }
.menu__lien:hover { background: var(--surface-2); color: var(--texte); text-decoration: none; }
.menu__lien.est-actif { background: var(--bleu-pale); color: var(--bleu); }
.entete__droite { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bouton-icone {
    position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--bord);
    background: var(--surface); color: var(--texte-2); display: grid; place-items: center; cursor: pointer;
}
.bouton-icone:hover { color: var(--bleu); text-decoration: none; border-color: var(--bleu); }
.bouton-icone.est-actif { color: var(--bleu); background: var(--bleu-pale); }
html[data-mode="nuit"] .icone-nuit, html:not([data-mode="nuit"]) .icone-jour { display: none; }
.pastille {
    position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: var(--rouge); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface);
}
.compte-menu { position: relative; }
.compte-menu__bouton { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; display: block; }
.compte-menu__liste {
    position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: var(--surface); border: 1px solid var(--bord);
    border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 8px; display: none;
}
.compte-menu.est-ouvert .compte-menu__liste { display: block; }
.compte-menu__tete { padding: 10px 12px 12px; border-bottom: 1px solid var(--bord); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.compte-menu__tete span { color: var(--texte-3); font-size: .875rem; }
.compte-menu__tete .badge { align-self: flex-start; margin-top: 6px; }
.compte-menu__liste a, .compte-menu__liste button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px;
    color: var(--texte); background: none; border: 0; cursor: pointer; text-align: left;
}
.compte-menu__liste a:hover, .compte-menu__liste button:hover { background: var(--surface-2); text-decoration: none; }
.compte-menu__liste i { width: 18px; color: var(--texte-2); }

/* Barre du bas (téléphone) */
.barre-mobile { display: none; }
@media (max-width: 820px) {
    .menu { display: none; }
    .cache-mobile { display: none; }
    .entete__in { padding: 8px 14px; }
    .barre-mobile {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--bord); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .barre-mobile a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--texte-3); padding: 4px 0; border-radius: 10px; }
    .barre-mobile a i { font-size: 18px; }
    .barre-mobile a:hover { text-decoration: none; }
    .barre-mobile a.est-actif { color: var(--bleu); }
    body { padding-bottom: 72px; }
}

/* ------------------------------------------------------------------ Mise en page */
.principal { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; min-height: 60vh; }
.principal--large { max-width: none; padding: 0 0 48px; }
.conteneur { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.principal:not(.principal--large) .conteneur { padding: 0; }
.section { margin: 40px 0; }
.section__tete { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section__tete h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section__tete h2 i { color: var(--bleu); }
.section__tete p { margin: 4px 0 0; color: var(--texte-2); }
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grille--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .deux-colonnes { grid-template-columns: minmax(0, 1fr); } }
.titre-page { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.titre-page h1 { margin: 0; }
.titre-page p { margin: 2px 0 0; color: var(--texte-2); }
.titre-page__icone {
    flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 22px;
    color: var(--bleu); background: var(--bleu-pale); border: 1px solid var(--bleu-clair);
}

/* ------------------------------------------------------------------ Composants */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; min-width: 0; }
.carte + .carte { margin-top: 16px; }
.carte h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.carte h2 i { color: var(--bleu); }
.bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
    border: 1px solid transparent; background: var(--bleu-vif); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: transform .12s, box-shadow .12s, background .12s;
}
.bouton:hover { text-decoration: none; background: #0284c7; box-shadow: 0 6px 18px rgba(14, 165, 233, .3); }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.bouton--clair { background: var(--surface); color: var(--texte); border-color: var(--bord); }
.bouton--clair:hover { background: var(--surface-2); box-shadow: none; }
.bouton--doux { background: var(--bleu-pale); color: var(--bleu); }
.bouton--doux:hover { background: var(--bleu-clair); box-shadow: none; }
.bouton--danger { background: var(--rouge); }
.bouton--danger:hover { background: #b91c1c; box-shadow: none; }
.bouton--petit { padding: 6px 12px; font-size: .875rem; }
.bouton--large { width: 100%; }
.bouton--kindae { background: #4f46e5; padding: 8px 16px 8px 8px; }
.bouton--kindae:hover { background: #4338ca; }
.bouton--kindae .k { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #4f46e5; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
@media (max-width: 820px) { .bouton--kindae { padding: 7px; } }
.lien-fleche { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.6; vertical-align: middle; white-space: nowrap; }
.badge--admin { background: var(--or-clair); color: var(--or); }
.badge--modo { background: var(--violet-clair); color: var(--violet); }
.badge--niveau { background: var(--bleu-pale); color: var(--bleu); }
.badge--petit { width: 20px; height: 20px; padding: 0; justify-content: center; font-size: 10px; }
.etiquette { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--bleu); background: var(--bleu-pale); padding: 3px 10px; border-radius: 999px; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; background: var(--surface-2); }
.avatar--lettre { display: inline-grid; place-items: center; color: #fff; font-weight: 700; }

.alerte { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--rayon-petit); margin-bottom: 20px; font-weight: 500; }
.alerte--succes { background: var(--vert-clair); color: var(--vert); }
.alerte--erreur { background: var(--rouge-clair); color: var(--rouge); }
.alerte--info { background: var(--bleu-pale); color: var(--bleu); }

.champ { display: block; margin-bottom: 14px; }
.champ > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .925rem; }
.entree, textarea.entree, select.entree {
    width: 100%; padding: 11px 14px; border-radius: var(--rayon-petit); border: 1px solid var(--bord); background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
textarea.entree { resize: vertical; min-height: 90px; }
.entree:focus { outline: none; border-color: var(--bleu-vif); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bleu-vif) 18%, transparent); }
.aide-champ { color: var(--texte-3); font-size: .825rem; margin-top: 4px; }

.onglets { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--bord); margin-bottom: 20px; overflow-x: auto; }
.onglets a { flex: 1; text-align: center; padding: 9px 16px; border-radius: 999px; color: var(--texte-2); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.onglets a:hover { text-decoration: none; color: var(--texte); }
.onglets a.est-actif { background: var(--surface); color: var(--bleu); box-shadow: var(--ombre); }
.compte-onglet { font-size: .75rem; background: var(--bord); color: var(--texte-2); border-radius: 999px; padding: 0 8px; }

.vide { text-align: center; padding: 40px 20px; color: var(--texte-2); }
.vide i { font-size: 34px; color: var(--texte-3); margin-bottom: 10px; display: block; }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

/* ------------------------------------------------------------------ Publicité (une par une, jamais de débordement) */
/* Règle AdSense : une annonce ne doit jamais être coupée ni cachée. Le cadre n'a donc ni overflow: hidden,
   ni hauteur maximale : Google choisit la taille et la position. min-height réserve la place (pas de saut). */
.pub { display: block; width: 100%; margin: 32px 0; padding: 4px 0; text-align: center; clear: both; }
.pub ins.adsbygoogle { display: block; min-height: 250px; }
.pub__etiquette { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); margin-bottom: 4px; }
.pub--essai { min-height: 120px; border: 2px dashed var(--bord); border-radius: var(--rayon); display: grid; place-items: center; }
.grille > .pub { grid-column: 1 / -1; margin: 4px 0; }

/* ------------------------------------------------------------------ Accueil */
.heros {
    position: relative; overflow: hidden; color: #fff; border-radius: 0 0 32px 32px;
    background:
        radial-gradient(900px 400px at 85% -10%, rgba(186, 230, 253, .45), transparent 60%),
        radial-gradient(600px 300px at 0% 110%, rgba(3, 105, 161, .9), transparent 70%),
        linear-gradient(135deg, #0369a1, #0ea5e9 55%, #38bdf8);
}
.heros::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.heros__in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 64px 20px 72px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.heros h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 14px; }
.heros p { font-size: 1.1rem; opacity: .92; max-width: 560px; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.heros .bouton { background: #fff; color: #0284c7; }
.heros .bouton--clair { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.heros__chiffres { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.heros__chiffres strong { display: block; font-size: 1.6rem; }
.heros__chiffres span { opacity: .8; font-size: .9rem; }
.heros__visuel { position: relative; min-height: 300px; }
.heros__visuel .couv { position: absolute; width: 78%; box-shadow: 0 30px 60px rgba(2, 6, 23, .35); }
.heros__visuel .couv:nth-child(1) { top: 0; right: 0; transform: rotate(3deg); }
.heros__visuel .couv:nth-child(2) { bottom: 0; left: 0; transform: rotate(-4deg); }
@media (max-width: 860px) { .heros__in { grid-template-columns: 1fr; padding: 40px 20px 48px; } .heros__visuel { display: none; } }

.parcours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .parcours { grid-template-columns: 1fr; } }
.parcours__carte { display: block; color: var(--texte); background: var(--surface); border: 1px solid var(--bord); border-radius: 20px; overflow: hidden; box-shadow: var(--ombre); transition: transform .2s, box-shadow .2s; }
.parcours__carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); text-decoration: none; }
.parcours__corps { padding: 16px 18px 18px; }
.parcours__corps p { color: var(--texte-2); margin: 0 0 10px; font-size: .95rem; }

.atouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .atouts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .atouts { grid-template-columns: 1fr; } }
.atout { padding: 18px; }
.atout i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bleu-pale); color: var(--bleu); font-size: 18px; margin-bottom: 10px; }
.atout h3 { margin-bottom: 4px; }
.atout p { color: var(--texte-2); margin: 0; font-size: .925rem; }

/* ------------------------------------------------------------------ Cours */
.carte-article { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); color: var(--texte); transition: transform .2s, box-shadow .2s; min-width: 0; }
.carte-article:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); text-decoration: none; }
.carte-article__corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.carte-article__corps p { color: var(--texte-2); margin: 0; font-size: .925rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carte-article__pied { margin-top: auto; display: flex; justify-content: space-between; color: var(--texte-3); font-size: .825rem; }

.article { max-width: 780px; }
.article__tete .couv { border-radius: 22px; margin-bottom: 20px; }
.fil { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--texte-3); font-size: .875rem; margin-bottom: 16px; }
.fil a { color: var(--texte-2); }
.article__infos { display: flex; flex-wrap: wrap; gap: 16px; color: var(--texte-3); font-size: .875rem; margin-bottom: 24px; }
.article__infos span { display: inline-flex; align-items: center; gap: 6px; }
.contenu-cours { font-size: 1.05rem; line-height: 1.75; overflow-wrap: anywhere; }
.contenu-cours h2 { margin-top: 1.8em; padding-bottom: 6px; border-bottom: 2px solid var(--bleu-clair); }
.contenu-cours h3 { margin-top: 1.4em; color: var(--bleu); }
.contenu-cours ul, .contenu-cours ol { padding-left: 1.3em; }
.contenu-cours li { margin-bottom: .35em; }
.contenu-cours table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; display: block; overflow-x: auto; }
.contenu-cours th, .contenu-cours td { border: 1px solid var(--bord); padding: 9px 12px; text-align: left; }
.contenu-cours th { background: var(--bleu-pale); color: var(--bleu); }
.contenu-cours blockquote, .contenu-cours .astuce { margin: 1.2em 0; padding: 14px 18px; border-left: 4px solid var(--bleu-vif); background: var(--bleu-pale); border-radius: 0 12px 12px 0; }
.contenu-cours .exemple { font-style: normal; background: var(--surface-2); border-radius: 12px; padding: 12px 16px; margin: 1em 0; }
.contenu-cours .en, .contenu-cours .ln, .ln { color: var(--bleu); font-weight: 600; }
.contenu-cours code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

.liste-cote a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: var(--texte); }
.liste-cote a:hover { background: var(--surface-2); text-decoration: none; }
.liste-cote .couv--mini { width: 92px; flex: none; }
.liste-cote strong { font-size: .925rem; line-height: 1.35; display: block; }

/* ------------------------------------------------------------------ Couvertures en CSS */
.couv {
    position: relative; overflow: hidden; aspect-ratio: 16 / 9; width: 100%; color: #fff; isolation: isolate;
    background: #1e293b; container-type: inline-size;
}
.couv--grande { aspect-ratio: 21 / 9; }
@media (max-width: 600px) { .couv--grande { aspect-ratio: 16 / 10; } }
.couv--mini { aspect-ratio: 4 / 3; border-radius: 10px; }
.couv__scene { position: absolute; inset: 0; z-index: 0; }
.couv__scene i, .couv__scene b, .couv__scene u { position: absolute; display: block; font-style: normal; text-decoration: none; }
/* Grain de photo et vignettage */
.couv::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.couv::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .35)), linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, .78));
}
.couv__titre { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 6cqw 5.5cqw 5cqw; }
.couv__sur { display: inline-block; font-size: clamp(9px, 3.2cqw, 13px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(14, 165, 233, .9); padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.couv__nom { margin: 0; font-size: clamp(14px, 6.4cqw, 34px); line-height: 1.15; font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); letter-spacing: -.01em; }
.couv--grande .couv__nom { font-size: clamp(20px, 5cqw, 44px); }
.couv--mini .couv__titre { display: none; }
.couv--mini::after { background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .3)); }

/* Fleuve Congo au coucher du soleil (Kinshasa) : palmier, ville, pirogue */
.couv--fleuve { background: linear-gradient(180deg, #0284c7 0%, #38bdf8 22%, #fb923c 58%, #fbbf24 70%, #0f172a 70.5%); }
.couv--fleuve .c-soleil { width: 24%; aspect-ratio: 1; left: 58%; top: 45%; border-radius: 50%; background: radial-gradient(circle, #fff7ed 0 30%, #fde68a 45%, rgba(251, 146, 60, 0) 70%); filter: blur(1px); }
.couv--fleuve .c-ville { left: 0; right: 0; bottom: 29%; height: 22%; background: #1c1917; opacity: .92; clip-path: polygon(0 75%, 10% 75%, 10% 55%, 16% 55%, 16% 70%, 30% 70%, 30% 35%, 34% 35%, 34% 20%, 37% 20%, 37% 35%, 41% 35%, 41% 62%, 52% 62%, 52% 45%, 60% 45%, 60% 70%, 72% 70%, 72% 40%, 78% 40%, 78% 60%, 88% 60%, 88% 72%, 100% 72%, 100% 100%, 0 100%); }
.couv--fleuve .c-palmier { left: 13%; bottom: 27%; width: 2.6%; height: 56%; background: linear-gradient(90deg, #1c1410, #3b2a1e 50%, #1c1410); border-radius: 40% 40% 0 0; transform: rotate(5deg); transform-origin: bottom; }
.couv--fleuve .c-palmier b, .couv--fleuve .c-palmier u { top: -1.2cqw; width: 15cqw; height: 5.5cqw; border-top: 1.3cqw solid #0b2416; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.couv--fleuve .c-palmier b { left: 50%; transform-origin: 0 100%; transform: rotate(-8deg); }
.couv--fleuve .c-palmier u { right: 50%; transform-origin: 100% 100%; transform: rotate(8deg); }
.couv--fleuve .c-palmier b::before, .couv--fleuve .c-palmier b::after, .couv--fleuve .c-palmier u::before, .couv--fleuve .c-palmier u::after {
    content: ""; position: absolute; bottom: 0; width: 100%; height: 100%; border-top: 1.3cqw solid #0b2416; border-radius: inherit; }
.couv--fleuve .c-palmier b::before, .couv--fleuve .c-palmier b::after { left: 0; transform-origin: 0 100%; }
.couv--fleuve .c-palmier u::before, .couv--fleuve .c-palmier u::after { right: 0; transform-origin: 100% 100%; }
.couv--fleuve .c-palmier b::before { transform: rotate(32deg) scale(.9); }
.couv--fleuve .c-palmier b::after { transform: rotate(-38deg) scale(.75); }
.couv--fleuve .c-palmier u::before { transform: rotate(-32deg) scale(.9); }
.couv--fleuve .c-palmier u::after { transform: rotate(38deg) scale(.75); }
.couv--fleuve .c-eau { left: 0; right: 0; bottom: 0; height: 29%; background: repeating-linear-gradient(180deg, rgba(251, 191, 36, .35) 0 2px, transparent 2px 7px), linear-gradient(180deg, #c2410c, #0c4a6e); }
.couv--fleuve .c-pirogue { left: 30%; bottom: 12%; width: 30%; height: 4%; background: #0c0a09; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.couv--fleuve .c-pirogue b { left: 44%; bottom: 90%; width: 5%; height: 260%; background: #0c0a09; border-radius: 40% 40% 10% 10%; }
.couv--fleuve .c-pirogue u { left: 56%; bottom: 80%; width: 1%; height: 420%; background: #0c0a09; transform: rotate(-28deg); transform-origin: bottom; }

/* Bibliothèque */
.couv--bibliotheque { background: linear-gradient(180deg, #3b2314, #24150c); }
.couv--bibliotheque .c-etagere { left: 0; right: 0; height: 33.4%; border-bottom: 3.2cqw solid #5b3a22; box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .5); }
.couv--bibliotheque .e1 { top: 0; background: repeating-linear-gradient(90deg, #7f1d1d 0 5%, #b45309 5% 8%, #1e3a8a 8% 13%, #065f46 13% 16%, #f5f5f4 16% 18%, #6b21a8 18% 23%, #92400e 23% 26%, #1d4ed8 26% 30%, #3f6212 30% 35%, transparent 35% 37%); }
.couv--bibliotheque .e2 { top: 33.3%; background: repeating-linear-gradient(90deg, #0f766e 0 4%, #78350f 4% 9%, #9f1239 9% 12%, #e7e5e4 12% 14%, #1e40af 14% 19%, #a16207 19% 23%, #4c1d95 23% 26%, transparent 26% 29%, #14532d 29% 34%); }
.couv--bibliotheque .e3 { top: 66.6%; background: repeating-linear-gradient(90deg, #92400e 0 6%, #1e3a8a 6% 9%, #b91c1c 9% 14%, #d6d3d1 14% 16%, #365314 16% 21%, #581c87 21% 24%, #0c4a6e 24% 30%); }
.couv--bibliotheque .c-etagere::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 25%, transparent 75%, rgba(0, 0, 0, .3)), repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 3%); }
.couv--bibliotheque .c-lumiere { inset: 0; background: radial-gradient(60% 70% at 75% 15%, rgba(253, 224, 71, .35), transparent 70%); mix-blend-mode: screen; }

/* Tableau noir */
.couv--tableau { background: linear-gradient(180deg, #d6d3d1, #a8a29e); }
.couv--tableau .c-cadre {
    inset: 7% 5% 16%; border: 2.4cqw solid #7c4a24; border-radius: 4px; box-shadow: 0 10px 25px rgba(0, 0, 0, .35), inset 0 0 40px rgba(0, 0, 0, .55);
    background: radial-gradient(80% 80% at 30% 30%, rgba(255, 255, 255, .08), transparent 60%), linear-gradient(135deg, #1f3d2e, #183326 60%, #142a20);
}
.couv--tableau .c-cadre b { left: 8%; top: 8%; font: 700 8.5cqw/1 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; color: rgba(255, 255, 255, .85); transform: rotate(-4deg); text-shadow: 0 0 2px rgba(255, 255, 255, .5); }
.couv--tableau .c-cadre u { right: 8%; top: 14%; font: 400 4.2cqw/1 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; color: rgba(254, 240, 138, .8); transform: rotate(3deg); }
.couv--tableau .c-craie { left: 30%; bottom: 13.5%; width: 10%; height: 2.2%; background: linear-gradient(90deg, #fafaf9, #e7e5e4); border-radius: 2px; box-shadow: 18cqw 0 0 -0.1cqw #fde68a; }

/* Conversation au café */
.couv--dialogue { background: linear-gradient(135deg, #78350f, #b45309 45%, #451a03); }
.couv--dialogue .c-flou { inset: 0; background: radial-gradient(8% 12% at 20% 25%, rgba(254, 243, 199, .7), transparent), radial-gradient(6% 9% at 70% 18%, rgba(253, 230, 138, .6), transparent), radial-gradient(10% 15% at 88% 60%, rgba(254, 215, 170, .45), transparent), radial-gradient(7% 10% at 40% 70%, rgba(255, 237, 213, .4), transparent); filter: blur(6px); }
.couv--dialogue .c-bulle { padding: 3cqw 4cqw; border-radius: 3.5cqw; font-size: 4.6cqw; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); }
.couv--dialogue .c-bulle b { position: static; font-weight: 700; white-space: nowrap; }
.couv--dialogue .b1 { left: 7%; top: 10%; background: #fff; color: #075985; border-bottom-left-radius: 0; }
.couv--dialogue .b2 { right: 7%; top: 34%; background: #0ea5e9; color: #fff; border-bottom-right-radius: 0; }

/* Casque audio */
.couv--casque { background: radial-gradient(70% 90% at 50% 30%, #0ea5e9, #075985 70%, #0f172a); }
.couv--casque .c-ondes { inset: 0; background: repeating-radial-gradient(circle at 50% 42%, transparent 0 7cqw, rgba(255, 255, 255, .12) 7cqw 7.4cqw); }
.couv--casque .c-casque { left: 33%; top: 9%; width: 34%; aspect-ratio: 1.15; border: 3.4cqw solid #e2e8f0; border-bottom: 0; border-radius: 50% 50% 0 0 / 60% 60% 0 0; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .15); }
.couv--casque .c-casque b, .couv--casque .c-casque u { bottom: -22%; width: 30%; height: 46%; border-radius: 40%; background: linear-gradient(90deg, #0f172a, #334155 60%, #1e293b); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.couv--casque .c-casque b { left: -22%; }
.couv--casque .c-casque u { right: -22%; }

/* Carnet et crayon */
.couv--carnet { background: linear-gradient(135deg, #a16207, #713f12); }
.couv--carnet .c-page {
    left: 10%; top: 8%; width: 70%; height: 100%; transform: rotate(-5deg); border-radius: 4px; box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
    background: linear-gradient(90deg, transparent 13%, #f87171 13% 13.5%, transparent 13.5%), repeating-linear-gradient(180deg, #fffdf5 0 5.6cqw, #7dd3fc 5.6cqw 5.8cqw);
}
.couv--carnet .c-page b { left: 18%; top: 6%; font: 700 6cqw/1.2 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; color: #075985; }
.couv--carnet .c-crayon { right: 4%; top: 18%; width: 6%; height: 70%; transform: rotate(18deg); border-radius: 2px; background: linear-gradient(90deg, #f59e0b, #fbbf24 50%, #d97706); clip-path: polygon(0 8%, 50% 0, 100% 8%, 100% 100%, 0 100%); box-shadow: 0 10px 18px rgba(0, 0, 0, .35); }

/* Ville la nuit */
.couv--nuit { background: linear-gradient(180deg, #020617, #1e1b4b 55%, #312e81); }
.couv--nuit .c-lune { right: 12%; top: 10%; width: 11%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fefce8, #e2e8f0 60%, #94a3b8); box-shadow: 0 0 30px 6px rgba(226, 232, 240, .35); }
.couv--nuit .c-immeubles { left: 0; right: 0; bottom: 18%; height: 62%; background: #0b1020; clip-path: polygon(0 45%, 8% 45%, 8% 25%, 15% 25%, 15% 55%, 22% 55%, 22% 10%, 26% 0, 30% 10%, 30% 40%, 40% 40%, 40% 30%, 48% 30%, 48% 60%, 56% 60%, 56% 18%, 64% 18%, 64% 48%, 72% 48%, 72% 28%, 80% 28%, 80% 52%, 88% 52%, 88% 35%, 100% 35%, 100% 100%, 0 100%); }
.couv--nuit .c-fenetres { left: 0; right: 0; bottom: 18%; height: 52%; opacity: .9; clip-path: polygon(0 45%, 8% 45%, 8% 25%, 15% 25%, 15% 55%, 22% 55%, 22% 10%, 30% 10%, 30% 40%, 40% 40%, 40% 30%, 48% 30%, 48% 60%, 56% 60%, 56% 18%, 64% 18%, 64% 48%, 72% 48%, 72% 28%, 80% 28%, 80% 52%, 88% 52%, 88% 35%, 100% 35%, 100% 100%, 0 100%);
    background: repeating-linear-gradient(90deg, transparent 0 1.4%, rgba(0, 0, 0, 0) 1.4% 2.8%), repeating-linear-gradient(180deg, transparent 0 3%, rgba(11, 16, 32, 1) 3% 6%), repeating-linear-gradient(90deg, #fde68a 0 1.2%, #0b1020 1.2% 2.6%, #fbbf24 2.6% 3.6%, #0b1020 3.6% 5.5%, #0b1020 5.5% 7%, #fef3c7 7% 8%, #0b1020 8% 9.6%); }
.couv--nuit .c-reflet { left: 0; right: 0; bottom: 0; height: 18%; background: repeating-linear-gradient(180deg, rgba(253, 230, 138, .25) 0 2px, transparent 2px 6px), linear-gradient(180deg, #1e1b4b, #020617); }

/* Bureau */
.couv--bureau { background: radial-gradient(80% 80% at 30% 20%, #e7d3b5, #b08a5c 70%, #8a6740); }
.couv--bureau::before { opacity: .3; }
.couv--bureau .c-portable { left: 8%; top: 10%; width: 56%; aspect-ratio: 1.55; border-radius: 3cqw; background: linear-gradient(135deg, #cbd5e1, #94a3b8); box-shadow: 0 18px 30px rgba(0, 0, 0, .35); transform: rotate(-6deg); }
.couv--bureau .c-portable b { inset: 6%; border-radius: 1.5cqw; background: linear-gradient(135deg, #0284c7, #0ea5e9); box-shadow: inset 0 0 0 1.5cqw #0f172a; }
.couv--bureau .c-tasse { right: 12%; top: 14%; width: 17%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #3f1d0b 0 52%, #f8fafc 53% 68%, #e2e8f0 70%); box-shadow: 4cqw 4cqw 10px rgba(0, 0, 0, .25), inset 0 0 0 .4cqw rgba(0, 0, 0, .05); }
.couv--bureau .c-plante { right: 4%; top: -8%; width: 22%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #4ade80, #15803d 60%, #14532d); clip-path: polygon(50% 0, 62% 35%, 100% 30%, 70% 55%, 90% 95%, 50% 70%, 10% 95%, 30% 55%, 0 30%, 38% 35%); opacity: .9; }

/* ------------------------------------------------------------------ Shorts */
.short { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px 18px 12px; box-shadow: var(--ombre); }
.short + .short { margin-top: 16px; }
.short--officiel { border-left: 4px solid var(--bleu-vif); }
.short__tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.short__auteur { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.short__auteur a { color: var(--texte); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.short__auteur span { color: var(--texte-3); font-size: .825rem; }
.short__titre { font-size: 1.08rem; margin: 0 0 6px; }
.short__texte { overflow-wrap: anywhere; }
.short__actions { display: flex; gap: 4px; border-top: 1px solid var(--bord); margin-top: 12px; padding-top: 8px; }
.action { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 0; background: none; color: var(--texte-2); cursor: pointer; font-weight: 600; font-size: .9rem; }
.action:hover { background: var(--surface-2); color: var(--texte); text-decoration: none; }
.action.est-aime { color: #e11d48; }
.action--droite { margin-left: auto; }
.commentaires { margin-top: 10px; display: none; }
.commentaires.est-ouvert { display: block; }
.commentaire { display: flex; gap: 10px; padding: 8px 0; }
.commentaire__bulle { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; min-width: 0; flex: 1; }
.commentaire__bulle a { color: var(--texte); font-weight: 700; font-size: .9rem; }
.commentaire__bulle p { margin: 2px 0 0; overflow-wrap: anywhere; }
.commentaire__meta { display: flex; gap: 8px; align-items: center; color: var(--texte-3); font-size: .78rem; }
.commentaire__meta button { border: 0; background: none; color: var(--texte-3); cursor: pointer; padding: 0; font-size: .78rem; }
.form-commentaire { display: flex; gap: 8px; margin-top: 8px; }
.form-commentaire .entree { padding: 9px 14px; border-radius: 999px; }
.compteur-car { text-align: right; font-size: .78rem; color: var(--texte-3); }

/* ------------------------------------------------------------------ Quiz */
.types-quiz { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
@media (max-width: 700px) { .types-quiz { grid-template-columns: 1fr; } }
.type-quiz { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.type-quiz i { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.type-quiz p { margin: 0; color: var(--texte-2); font-size: .875rem; }
.ic-carre { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.ic-duo { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.ic-ecrit { background: linear-gradient(135deg, #10b981, #047857); }
.progression { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--bord); }
.progression span { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, #0284c7); border-radius: inherit; transition: width .4s; }
.bloc-niveaux { margin-bottom: 30px; }
.bloc-niveaux h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.niveaux { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 560px) { .niveaux { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media (max-width: 380px) { .niveaux { grid-template-columns: repeat(3, 1fr); } }
.niveau {
    aspect-ratio: 1; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: var(--surface); border: 1px solid var(--bord); color: var(--texte); box-shadow: var(--ombre); position: relative; font-weight: 800; font-size: 1.35rem;
    transition: transform .15s;
}
.niveau small { font-size: .7rem; font-weight: 600; color: var(--texte-3); }
.niveau:hover { text-decoration: none; transform: translateY(-3px); }
.niveau--reussi { background: linear-gradient(135deg, #0ea5e9, #0369a1); color: #fff; border-color: transparent; }
.niveau--reussi small { color: rgba(255, 255, 255, .85); }
.niveau--ouvert { border: 2px solid var(--bleu-vif); color: var(--bleu); animation: pulse 2s infinite; }
.niveau--ferme { color: var(--texte-3); background: var(--surface-2); box-shadow: none; cursor: not-allowed; font-size: 1.1rem; }
.niveau--ferme:hover { transform: none; }
.niveau__etoiles { position: absolute; top: 6px; right: 8px; font-size: 10px; color: #fde68a; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, .35); } 50% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); } }
@media (prefers-reduced-motion: reduce) { .niveau--ouvert { animation: none; } * { transition: none !important; } }

.jeu { max-width: 720px; margin: 0 auto; }
.jeu__haut { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.jeu__haut .progression { flex: 1; }
.jeu__compte { font-weight: 700; color: var(--texte-2); font-size: .9rem; white-space: nowrap; }
.question { font-size: clamp(1.2rem, 3vw, 1.55rem); font-weight: 700; margin: 6px 0 20px; text-align: center; overflow-wrap: anywhere; }
.consigne { text-align: center; color: var(--texte-2); margin: 0; font-size: .9rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.choix { display: grid; gap: 12px; }
.choix--carre { grid-template-columns: repeat(2, 1fr); }
.choix--duo { grid-template-columns: repeat(2, 1fr); }
.choix button {
    min-height: 74px; padding: 14px; border-radius: 16px; border: 2px solid var(--bord); background: var(--surface); cursor: pointer;
    font-weight: 700; font-size: 1.05rem; box-shadow: 0 3px 0 var(--bord); transition: transform .1s, border-color .1s; overflow-wrap: anywhere;
}
.choix--carre button { aspect-ratio: 2 / 1; }
.choix--duo button { min-height: 120px; font-size: 1.2rem; }
.choix button:hover:not(:disabled) { border-color: var(--bleu-vif); transform: translateY(-2px); }
.choix button.est-bon { border-color: var(--vert); background: var(--vert-clair); color: var(--vert); box-shadow: 0 3px 0 var(--vert); }
.choix button.est-faux { border-color: var(--rouge); background: var(--rouge-clair); color: var(--rouge); box-shadow: 0 3px 0 var(--rouge); }
.choix button:disabled { cursor: default; }
.ecrit { display: flex; gap: 10px; }
.ecrit .entree { font-size: 1.15rem; padding: 14px 16px; }
.ecrit .entree.est-bon { border-color: var(--vert); background: var(--vert-clair); }
.ecrit .entree.est-faux { border-color: var(--rouge); background: var(--rouge-clair); }
@media (max-width: 480px) { .ecrit { flex-direction: column; } .choix--carre button { aspect-ratio: auto; } }
.correction { margin-top: 18px; padding: 14px 16px; border-radius: 14px; display: none; gap: 12px; align-items: flex-start; }
.correction.est-visible { display: flex; }
.correction i { font-size: 20px; margin-top: 2px; }
.correction--bon { background: var(--vert-clair); color: var(--vert); }
.correction--faux { background: var(--rouge-clair); color: var(--rouge); }
.correction p { margin: 0; color: var(--texte); }
.jeu__suite { margin-top: 18px; text-align: right; }
.resultat { text-align: center; padding: 30px 20px; }
.resultat__score { width: 150px; height: 150px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: var(--bleu);
    background: conic-gradient(var(--bleu-vif) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; }
.resultat__score::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.resultat__score span { position: relative; }
.resultat__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ------------------------------------------------------------------ Profil */
.profil-tete { position: relative; overflow: hidden; padding: 0; }
.profil-tete__fond { height: 130px; background: linear-gradient(120deg, #075985, #0ea5e9 50%, #38bdf8); position: relative; }
.profil-tete__fond::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px); background-size: 18px 18px; }
.profil-tete__corps { padding: 0 22px 22px; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-top: -48px; position: relative; }
.profil-tete__corps .avatar { border: 4px solid var(--surface); box-shadow: var(--ombre); }
.profil-tete__nom { flex: 1; min-width: 200px; }
.profil-tete__nom h1 { font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profil-tete__nom p { margin: 0; color: var(--texte-3); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; text-align: center; }
.stat i { color: var(--bleu); }
.stat strong { display: block; font-size: 1.5rem; }
.stat span { color: var(--texte-3); font-size: .825rem; }

/* ------------------------------------------------------------------ Messagerie */
.messagerie { display: grid; grid-template-columns: 320px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; height: min(72vh, 720px); box-shadow: var(--ombre); }
.messagerie__liste { border-right: 1px solid var(--bord); overflow-y: auto; }
.messagerie__liste h2 { font-size: 1rem; padding: 16px; margin: 0; border-bottom: 1px solid var(--bord); }
.conv { display: flex; gap: 10px; align-items: center; padding: 12px 16px; color: var(--texte); border-bottom: 1px solid var(--bord); }
.conv:hover { background: var(--surface-2); text-decoration: none; }
.conv.est-actif { background: var(--bleu-pale); }
.conv__texte { min-width: 0; flex: 1; }
.conv__texte strong { display: flex; gap: 6px; align-items: center; }
.conv__texte span { display: block; color: var(--texte-3); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv__non-lu { width: 10px; height: 10px; border-radius: 50%; background: var(--bleu-vif); flex: none; }
.fil-msg { display: flex; flex-direction: column; min-height: 0; }
.fil-msg__tete { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bord); }
.fil-msg__tete a { color: var(--texte); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.fil-msg__corps { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--fond); }
.msg { max-width: 75%; padding: 9px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--bord); align-self: flex-start; overflow-wrap: anywhere; }
.msg--moi { align-self: flex-end; background: var(--bleu-vif); color: #fff; border-color: transparent; }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; }
.fil-msg__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--bord); }
.fil-msg__form textarea { min-height: 44px; max-height: 140px; border-radius: 22px; padding: 10px 16px; resize: none; }
@media (max-width: 760px) {
    .messagerie { grid-template-columns: 1fr; height: calc(100vh - 190px); }
    .messagerie--fil .messagerie__liste { display: none; }
    .messagerie:not(.messagerie--fil) .fil-msg { display: none; }
}

/* ------------------------------------------------------------------ Paramètres */
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--bord); flex-wrap: wrap; }
.reglage:first-of-type { border-top: 0; }
.reglage strong { display: block; }
.reglage span { color: var(--texte-2); font-size: .9rem; }
.choix-theme { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 999px; border: 1px solid var(--bord); }
.choix-theme button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--texte-2); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.choix-theme button.est-actif { background: var(--surface); color: var(--bleu); box-shadow: var(--ombre); }
.compte-kindae { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; flex-wrap: wrap; }
.compte-kindae .k { width: 44px; height: 44px; border-radius: 12px; background: #4f46e5; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 20px; }

/* ------------------------------------------------------------------ Administration */
.tableau { width: 100%; border-collapse: collapse; }
.tableau th, .tableau td { padding: 10px 12px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: middle; }
.tableau th { color: var(--texte-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.defile-x { overflow-x: auto; }
.choix-couv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choix-couv label { cursor: pointer; border-radius: 12px; border: 2px solid transparent; overflow: hidden; display: block; }
.choix-couv input { position: absolute; opacity: 0; }
.choix-couv input:checked + .couv { outline: 3px solid var(--bleu-vif); outline-offset: -3px; }
.choix-couv .couv { border-radius: 10px; }

/* ------------------------------------------------------------------ Pied */
.pied { border-top: 1px solid var(--bord); background: var(--surface); margin-top: 20px; }
.pied__in { max-width: 1180px; margin: 0 auto; padding: 32px 20px 12px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.pied__in p { color: var(--texte-2); margin-top: 10px; font-size: .925rem; }
.pied__liens { display: flex; flex-direction: column; gap: 8px; }
.pied__liens a { color: var(--texte-2); }
.pied__copie { text-align: center; color: var(--texte-3); font-size: .825rem; padding: 12px 20px 24px; margin: 0; }
@media (max-width: 700px) { .pied__in { grid-template-columns: 1fr 1fr; } .pied__in > div:first-child { grid-column: 1 / -1; } }

/* Dans une grille, les cartes ne se décalent pas */
.grille > .carte, .atouts > .carte, .grille--2 > .carte { margin-top: 0; }
.heros__visuel .couv { border-radius: 18px; }

/* Robot */
.badge--robot { background: var(--vert-clair); color: var(--vert); }
.avatar--robot { background: linear-gradient(135deg, #10b981, #047857); }

/* ------------------------------------------------------------------ Zone secondaire (sidebar) */
.avec-cote { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.avec-cote.conteneur { padding-top: 8px; }
.colonne-principale { min-width: 0; }
.zone-secondaire { display: flex; flex-direction: column; gap: 16px; }
.zone-secondaire .carte + .carte { margin-top: 0; }
.zone-secondaire .pub { margin: 8px 0; }
@media (max-width: 1000px) {
    .avec-cote { grid-template-columns: minmax(0, 1fr); }
    .zone-secondaire { margin-top: 12px; }
}
.widget h2 { font-size: 1.02rem; margin-bottom: 12px; }
.widget__recherche { display: flex; gap: 8px; }
.widget__recherche .entree { padding: 9px 14px; }
.reseaux { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.reseaux a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--bord); color: var(--texte); font-weight: 600; font-size: .9rem; }
.reseaux a i { color: var(--c); font-size: 18px; width: 20px; text-align: center; }
html[data-mode="nuit"] .reseaux a i { filter: brightness(1.4); }
.reseaux a:hover { border-color: var(--c); text-decoration: none; background: var(--surface-2); }
.liste-cote a > span { display: flex; flex-direction: column; min-width: 0; }
.widget__short { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--bord); color: var(--texte); }
.widget__short:first-of-type { border-top: 0; }
.widget__short:hover { text-decoration: none; }
.widget__short:hover strong { color: var(--bleu); }
.widget__short > span { min-width: 0; font-size: .9rem; }
.widget__extrait { display: block; color: var(--texte-2); overflow-wrap: anywhere; }
.parcours { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* ------------------------------------------------------------------ Conjugaison */
.conj-recherche { display: flex; gap: 10px; flex-wrap: wrap; }
.conj-recherche .entree { flex: 1; min-width: 200px; font-size: 1.1rem; }
.conj-formes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.conj-formes div { background: var(--bleu-pale); border-radius: 12px; padding: 10px 14px; }
.conj-formes span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); }
.conj-formes strong { color: var(--bleu); font-size: 1.1rem; }
.conj-temps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.conj-temps .carte { padding: 16px; margin: 0; }
.conj-temps h3 { font-size: 1rem; margin-bottom: 2px; color: var(--bleu); }
.conj-temps .usage { color: var(--texte-3); font-size: .8rem; margin-bottom: 8px; }
.conj-temps ul { list-style: none; margin: 0; padding: 0; }
.conj-temps li { padding: 3px 0; border-top: 1px dashed var(--bord); }
.conj-temps li:first-child { border-top: 0; }
.conj-temps b { color: var(--texte); }
.conj-pronom { color: var(--texte-3); }
.conj-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.conj-liste a { padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--bord); color: var(--texte); font-size: .9rem; }
.conj-liste a:hover { border-color: var(--bleu); color: var(--bleu); text-decoration: none; }
@media (min-width: 1001px) { .cache-ordinateur { display: none !important; } }
/* Tableaux de cours : les mots ne sont jamais coupés, le tableau défile si besoin */
.contenu-cours th, .contenu-cours td { overflow-wrap: normal; word-break: normal; min-width: 90px; }
.short__titre a { color: inherit; }
.short__titre a:hover { color: var(--bleu); text-decoration: none; }
.short__date { color: inherit; font-weight: 400; }
