/* SVT Kinda-e — feuille de style du site
   Couleurs du logo : bleu Kinda-e et gris. Les titres des cours sont illustrés en CSS
   (dégradé de la branche + motif SVG en arrière-plan), sans image de couverture. */

:root {
  --bleu: #1565c0;
  --bleu-fonce: #0d47a1;
  --bleu-clair: #e3f0fc;
  --gris-logo: #a7a9ac;
  --texte: #1f2933;
  --texte-doux: #52606d;
  --fond: #f3f5f8;
  --carte: #ffffff;
  --bord: #e1e6ed;
  --vert: #2e7d32;
  --rouge: #c62828;
  --orange: #ef6c00;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(16, 42, 67, .06), 0 4px 14px rgba(16, 42, 67, .06);
  --titres: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --corps: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--corps); font-size: 17px; line-height: 1.6; color: var(--texte); background: var(--fond); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bleu-fonce); }
h1, h2, h3 { font-family: var(--titres); font-weight: 600; line-height: 1.2; letter-spacing: .01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #90caf9; outline-offset: 2px; }
.conteneur { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.petit { font-size: .88rem; color: var(--texte-doux); }
.aller-au-contenu { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.aller-au-contenu:focus { left: 8px; }

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .6em 1.15em; border-radius: 999px; border: 2px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .15s, color .15s, transform .1s; background: none; }
.bouton:active { transform: translateY(1px); }
.bouton-plein { background: var(--bleu); color: #fff; }
.bouton-plein:hover { background: var(--bleu-fonce); color: #fff; }
.bouton-contour { border-color: var(--bleu); color: var(--bleu); background: #fff; }
.bouton-contour:hover { background: var(--bleu-clair); }
.bouton-blanc { background: #fff; color: var(--bleu-fonce); }
.bouton-blanc:hover { background: var(--bleu-clair); color: var(--bleu-fonce); }
.bouton-contour-blanc { border-color: rgba(255,255,255,.8); color: #fff; }
.bouton-contour-blanc:hover { background: rgba(255,255,255,.15); color: #fff; }
.bouton-danger { background: var(--rouge); color: #fff; }
.bouton-danger:hover { background: #8e0000; color: #fff; }
.bouton-bloc { display: flex; width: 100%; margin-top: 8px; }
.bouton-grand { font-size: 1.1rem; padding: .8em 1.6em; margin-top: 12px; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--texte-doux); cursor: pointer; font-size: .9rem; }
.lien-bouton:hover { color: var(--bleu); text-decoration: underline; }
.lien-bouton.danger:hover { color: var(--rouge); }
.lien-fleche { font-weight: 700; text-decoration: none; font-size: .95rem; }

/* ---------- Entête ---------- */
.entete { background: #fff; border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 30; }
.entete-interieur { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: block; flex: 0 0 auto; }
.logo img { display: block; height: 46px; width: auto; }
.recherche { flex: 1 1 auto; max-width: 380px; margin-left: auto; display: flex; background: var(--fond); border: 1px solid var(--bord); border-radius: 999px; overflow: hidden; }
.recherche input { flex: 1; border: 0; background: none; padding: 9px 16px; min-width: 0; }
.recherche input:focus { outline: none; }
.recherche:focus-within { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-clair); }
.recherche button { border: 0; background: none; padding: 0 14px; color: var(--texte-doux); cursor: pointer; }
.compte { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.icone-entete { position: relative; color: var(--texte-doux); font-size: 1.25rem; padding: 6px; }
.pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--rouge); color: #fff; font-size: .72rem; font-weight: 700; }
.icone-entete .pastille { position: absolute; top: -4px; right: -8px; }
.bouton-kindae { background: var(--bleu); color: #fff; padding: .45em 1em .45em .45em; }
.bouton-kindae:hover { background: var(--bleu-fonce); color: #fff; }
.bouton-kindae .k { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; background: #fff; color: var(--bleu); border-radius: 6px; font-family: var(--titres); font-weight: 700; }
.txt-court { display: none; }
.menu-compte { position: relative; }
.menu-compte summary { list-style: none; cursor: pointer; display: flex; }
.menu-compte summary::-webkit-details-marker { display: none; }
.menu-compte-liste { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: 0 12px 32px rgba(16,42,67,.16); min-width: 230px; padding: 8px; z-index: 40; }
.menu-compte-liste a, .menu-compte-liste button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--texte); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-compte-liste a:hover, .menu-compte-liste button:hover { background: var(--fond); }
.menu-compte-liste form { margin: 0; border-top: 1px solid var(--bord); margin-top: 6px; padding-top: 6px; }
.menu-compte-nom { margin: 4px 12px 8px; line-height: 1.3; }
.menu-compte-nom span { font-size: .85rem; color: var(--texte-doux); }
.bouton-menu { display: none; border: 0; background: none; font-size: 1.4rem; padding: 6px; cursor: pointer; color: var(--texte); }

.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bord); display: inline-block; vertical-align: middle; }
.avatar-lettre { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-family: var(--titres); background: hsl(var(--t), 55%, 45%); }

/* ---------- Menu ---------- */
.menu { background: linear-gradient(90deg, var(--bleu-fonce), var(--bleu)); color: #fff; }
.menu-interieur { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.menu-interieur > a { color: #fff; text-decoration: none; padding: 12px 16px; font-weight: 600; border-bottom: 3px solid transparent; }
.menu-interieur > a:hover { background: rgba(255,255,255,.1); }
.menu-interieur > a.actif { border-bottom-color: #fff; background: rgba(255,255,255,.12); }
.menu-interieur > a i { opacity: .85; margin-right: 4px; }
.menu-branches { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; padding: 6px 0; }
.menu-branches a { color: #fff; text-decoration: none; font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.menu-branches a:hover { background: #fff; color: var(--c); }

/* ---------- Mise en page ---------- */
.zone-pub-entete { padding-top: 16px; }
.mise-en-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-top: 24px; padding-bottom: 40px; align-items: start; }
.principal { min-width: 0; }
.secondaire { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.collant { position: sticky; top: 90px; }
body.admin .principal { min-height: 60vh; }

/* ---------- Publicités (7 emplacements) ---------- */
.pub { margin: 24px 0; text-align: center; min-height: 100px; }
.pub-etiquette { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #9aa5b1; margin-bottom: 4px; }
.pub-entete { margin: 0; min-height: 90px; }
.secondaire .pub { margin: 0; min-height: 250px; }
.pied .pub { margin: 0 0 28px; }
.pub-factice { display: flex; align-items: center; justify-content: center; min-height: inherit; height: 100%; padding: 28px 12px; border: 2px dashed #c3ccd6; border-radius: 10px; color: #9aa5b1; font-size: .9rem; background: repeating-linear-gradient(45deg, #fafbfc 0 12px, #f1f4f7 12px 24px); }
.secondaire .pub-factice { min-height: 250px; }

/* ---------- Bandeaux de titre illustrés en CSS ---------- */
.bandeau { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: 20px; padding: 34px 32px 30px; margin-bottom: 24px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: var(--ombre); }
.bandeau::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--motif); opacity: .22; }
.bandeau::after { content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; right: -90px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); }
.bandeau h1 { margin: 6px 0 8px; font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 22ch; text-shadow: 0 2px 12px rgba(0,0,0,.15); }
.bandeau-icone { position: absolute; right: 28px; bottom: 18px; font-size: 6.5rem; opacity: .18; z-index: -1; transform: rotate(-8deg); }
.bandeau-sur-titre { margin: 0; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .92; }
.bandeau-sur-titre a { color: #fff; text-decoration: none; }
.bandeau-sur-titre a:hover { text-decoration: underline; }
.bandeau-sur-titre .fa-chevron-right { font-size: .7em; margin: 0 6px; opacity: .7; }
.bandeau-sous-titre { margin: 0; max-width: 60ch; opacity: .95; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.bandeau .niveau { background: rgba(255,255,255,.95); }
.bandeau-compact { padding: 22px 26px; }
.bandeau-compact h1 { font-size: 1.7rem; margin: 2px 0 4px; }

/* ---------- Accueil ---------- */
.accueil-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: 22px; padding: 44px 36px; background: linear-gradient(130deg, #0d47a1 0%, #1565c0 45%, #00897b 100%); box-shadow: var(--ombre); }
.accueil-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: 8px 0 12px; max-width: 18ch; }
.accueil-hero h1 span { display: block; color: #b3e5fc; }
.accueil-hero > p { max-width: 52ch; font-size: 1.1rem; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-chiffres { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 28px 0 0; }
.hero-chiffres strong { font-family: var(--titres); font-size: 1.7rem; display: block; line-height: 1; }
.hero-decor { position: absolute; inset: 0; z-index: -1; }
.hero-decor span { position: absolute; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); }
.hero-decor span::after { content: ""; position: absolute; width: 30%; height: 30%; left: 38%; top: 30%; border-radius: 50%; background: rgba(255,255,255,.16); }
.hero-decor span:nth-child(1) { width: 260px; height: 220px; right: -40px; top: -50px; }
.hero-decor span:nth-child(2) { width: 140px; height: 150px; right: 190px; bottom: -40px; }
.hero-decor span:nth-child(3) { width: 80px; height: 70px; right: 80px; bottom: 60px; }
.hero-decor span:nth-child(4) { width: 46px; height: 50px; right: 260px; top: 40px; }
.bonjour { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px 18px; margin: 18px 0 0; }

.section { margin: 32px 0; }
.titre-section { font-size: 1.45rem; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.titre-section i { color: var(--bleu); font-size: .9em; }
.titre-page { font-size: 2rem; margin: 0 0 20px; }
.titre-page i { color: var(--bleu); }

.grille-branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.carte-branche { display: flex; flex-direction: column; background: #fff; border-radius: var(--rayon); overflow: hidden; text-decoration: none; color: var(--texte); box-shadow: var(--ombre); border: 1px solid var(--bord); transition: transform .15s, box-shadow .15s; }
.carte-branche:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16,42,67,.14); color: var(--texte); }
.carte-branche-haut { position: relative; height: 92px; background: linear-gradient(135deg, var(--c1), var(--c2)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.4rem; isolation: isolate; overflow: hidden; }
.carte-branche-haut::before { content: ""; position: absolute; inset: 0; background-image: var(--motif); opacity: .3; z-index: -1; }
.carte-branche-corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.carte-branche-corps strong { font-family: var(--titres); font-size: 1.2rem; font-weight: 600; color: var(--c1); }
.carte-branche-corps span { font-size: .92rem; color: var(--texte-doux); }
.carte-branche-corps em { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 700; font-size: .85rem; }

.grille-niveaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.carte-niveau { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--rayon); text-decoration: none; color: #fff; box-shadow: var(--ombre); }
.carte-niveau i { font-size: 2rem; margin-bottom: 6px; opacity: .9; }
.carte-niveau strong { font-family: var(--titres); font-size: 1.35rem; font-weight: 600; }
.carte-niveau em { font-style: normal; font-weight: 700; margin-top: 6px; }
.carte-niveau:hover { color: #fff; filter: brightness(1.06); }
.carte-niveau .bouton { margin-top: 14px; background: #fff; color: var(--texte); align-self: flex-start; }
.carte-niveau .record { background: rgba(0,0,0,.15); padding: 6px 10px; border-radius: 8px; margin-top: 8px; font-size: .9rem; }
.niveau-elementaire { background: linear-gradient(135deg, #2e7d32, #66bb6a); }
.niveau-bac { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.niveau-universite { background: linear-gradient(135deg, #4a148c, #8e24aa); }
.grille-niveaux.grande .carte-niveau { padding: 26px; }

.bloc-communaute { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 24px; }
.bloc-communaute h2 { margin: 0 0 6px; font-size: 1.35rem; }
.bloc-communaute p { margin: 0; color: var(--texte-doux); max-width: 56ch; }
.bloc-communaute-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Listes de cours ---------- */
.liste-cours { display: grid; gap: 12px; }
.carte-cours { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; text-decoration: none; color: var(--texte); transition: border-color .15s, box-shadow .15s; }
.carte-cours:hover { border-color: var(--c1); box-shadow: var(--ombre); color: var(--texte); }
.carte-cours-pastille { position: relative; flex: 0 0 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; isolation: isolate; }
.carte-cours-pastille::before { content: ""; position: absolute; inset: 0; background-image: var(--motif); background-size: 120px auto; opacity: .35; z-index: -1; }
.carte-cours-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-cours-texte strong { font-family: var(--titres); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.carte-cours-texte > span:last-child { color: var(--texte-doux); font-size: .95rem; }
.carte-cours-meta { font-size: .82rem; color: var(--texte-doux); }
.carte-cours.lu { background: linear-gradient(90deg, #f1f8f2, #fff 40%); }
.deja-lu { color: var(--vert); font-weight: 700; }
.niveau { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.niveau.niveau-elementaire { background: #e8f5e9; color: #1b5e20; }
.niveau.niveau-bac { background: #e3f2fd; color: #0d47a1; }
.niveau.niveau-universite { background: #f3e5f5; color: #4a148c; }
.titre-branche { font-size: 1.4rem; margin: 0 0 12px; padding-left: 12px; border-left: 5px solid var(--c); }
.titre-branche a { color: var(--c); text-decoration: none; }
.titre-branche i { font-size: .85em; margin-right: 4px; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.filtres a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--bord); color: var(--texte); text-decoration: none; font-size: .92rem; font-weight: 600; }
.filtres a:hover { border-color: var(--bleu); }
.filtres a.actif { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.resume-branche { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px 18px; }
.parcours { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: etape; }
.parcours[start="4"] { counter-reset: etape 3; }
.parcours li { counter-increment: etape; position: relative; padding-left: 44px; }
.parcours li::before { content: counter(etape); position: absolute; left: 0; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--bleu); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--titres); }

/* ---------- Lecture d'un cours ---------- */
.article-cours, .contenu-cours { background: #fff; border-radius: var(--rayon); }
.article-cours { border: 1px solid var(--bord); padding: 28px 34px; }
div.contenu-cours:not(.article-cours .contenu-cours) { border: 1px solid var(--bord); padding: 28px 34px; }
.contenu-cours { font-size: 1.06rem; }
.contenu-cours > :first-child { margin-top: 0; }
.contenu-cours .chapeau { font-size: 1.18rem; color: #334e68; border-left: 4px solid var(--c1, var(--bleu)); padding-left: 16px; }
.contenu-cours h2 { position: relative; font-size: 1.6rem; margin: 2em 0 .6em; padding: 10px 14px 10px 54px; color: #fff; border-radius: 12px; background: linear-gradient(110deg, var(--c1, var(--bleu)), var(--c2, #42a5f5)); overflow: hidden; isolation: isolate; }
.contenu-cours h2::before { content: ""; position: absolute; left: 14px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); box-shadow: inset 0 0 0 5px rgba(255,255,255,.25); }
.contenu-cours h2::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--motif); opacity: .18; background-position: right center; }
.contenu-cours h3 { font-size: 1.3rem; color: var(--c1, var(--bleu)); margin: 1.6em 0 .4em; padding-bottom: 4px; border-bottom: 2px dotted color-mix(in srgb, var(--c1, #1565c0) 40%, transparent); }
.contenu-cours ul, .contenu-cours ol { padding-left: 1.4em; }
.contenu-cours li { margin: .25em 0; }
.contenu-cours li::marker { color: var(--c1, var(--bleu)); }
.contenu-cours table, .tableau { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; background: #fff; }
.contenu-cours table { display: block; overflow-x: auto; }
.contenu-cours th, .contenu-cours td, .tableau th, .tableau td { border: 1px solid var(--bord); padding: 8px 10px; text-align: left; vertical-align: top; }
.contenu-cours thead th, .tableau thead th { background: color-mix(in srgb, var(--c1, #1565c0) 10%, #fff); font-weight: 700; }
.tableau tr.inactif { opacity: .6; }
.tableau tr.actif td { background: #fff8e1; }
.illustration { margin: 1.6em 0; text-align: center; }
.illustration img { border-radius: 12px; border: 1px solid var(--bord); background: #fff; }
.illustration figcaption { font-size: .92rem; color: var(--texte-doux); margin-top: 8px; }
.illustration .credit { display: block; font-size: .78rem; color: #8a96a3; margin-top: 2px; }
.illustration .credit a { color: inherit; }
.encadre { border-radius: 12px; padding: 14px 18px; margin: 1.4em 0; border-left: 5px solid; background: #f5f7fa; }
.encadre > :last-child { margin-bottom: 0; }
.encadre-titre { font-family: var(--titres); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.encadre-titre::before { font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 8px; }
.encadre.definition { background: #e8f1fd; border-color: #1565c0; }
.encadre.definition .encadre-titre { color: #0d47a1; }
.encadre.definition .encadre-titre::before { content: "\f02d"; }
.encadre.a-retenir { background: #e8f5e9; border-color: #2e7d32; }
.encadre.a-retenir .encadre-titre { color: #1b5e20; }
.encadre.a-retenir .encadre-titre::before { content: "\f0eb"; }
.encadre.exemple { background: #fff8e1; border-color: #f9a825; }
.encadre.exemple .encadre-titre { color: #8d6e00; }
.encadre.exemple .encadre-titre::before { content: "\f0c3"; }
.encadre.attention { background: #ffebee; border-color: #c62828; }
.encadre.attention .encadre-titre { color: #b71c1c; }
.encadre.attention .encadre-titre::before { content: "\f071"; }
.encadre.le-savais-tu { background: #f3e5f5; border-color: #8e24aa; }
.encadre.le-savais-tu .encadre-titre { color: #6a1b9a; }
.encadre.le-savais-tu .encadre-titre::before { content: "\f05a"; }
.sommaire { background: var(--fond); border-radius: 12px; padding: 12px 18px; margin-bottom: 24px; }
.sommaire summary { cursor: pointer; font-weight: 700; font-family: var(--titres); font-size: 1.1rem; }
.sommaire ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2; column-gap: 28px; }
.sommaire li { break-inside: avoid; }
.sommaire a { text-decoration: none; }
.cours-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.cours-navigation a { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 18px; text-decoration: none; }
.cours-navigation a span { font-size: .85rem; color: var(--texte-doux); }
.cours-navigation a strong { font-family: var(--titres); font-weight: 600; font-size: 1.1rem; }
.cours-navigation .suivant { text-align: right; grid-column: 2; }
.appel-quiz { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--bleu-clair); border-radius: var(--rayon); padding: 18px 22px; }
.appel-quiz p { margin: 0; }
.partager-communaute { text-align: center; color: var(--texte-doux); }

/* ---------- Contenu secondaire ---------- */
.carte-aside { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; }
.carte-aside h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.carte-aside h2 i { color: var(--bleu); }
.carte-aside p { margin: 0 0 8px; font-size: .95rem; }
.liste-branches { list-style: none; padding: 0; margin: 0; }
.liste-branches a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--texte); font-size: .95rem; }
.liste-branches a:hover { background: var(--fond); }
.liste-branches i { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--c); font-size: .85rem; }
.liste-branches span { margin-left: auto; font-size: .8rem; color: var(--texte-doux); background: var(--fond); border-radius: 999px; padding: 0 8px; }
.aside-quiz .bouton { font-size: .9rem; }
.liste-mini { list-style: none; padding: 0; margin: 0 0 10px; }
.liste-mini li { padding: 8px 0; border-bottom: 1px solid var(--bord); font-size: .93rem; line-height: 1.35; }
.liste-mini li:last-child { border-bottom: 0; }
.liste-mini a { color: var(--texte); text-decoration: none; display: block; }
.liste-mini a:hover { color: var(--bleu); }
.liste-mini span { display: block; font-size: .8rem; color: var(--texte-doux); margin-top: 2px; }
.liste-mini.grande { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 4px 18px; }
.liste-cours-aside { padding-left: 1.3em; margin: 0; font-size: .93rem; }
.liste-cours-aside li { margin: 6px 0; }
.liste-cours-aside li.actuel a { font-weight: 700; color: var(--texte); }
.liste-cours-aside .fa-check { color: var(--vert); }
.menu-admin { list-style: none; padding: 0; margin: 0 0 10px; }
.menu-admin a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--texte); }
.menu-admin a:hover, .menu-admin a.actif { background: var(--bleu-clair); color: var(--bleu-fonce); }

/* ---------- Alertes, vides ---------- */
.alerte { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; }
.alerte-succes { background: #e8f5e9; color: #1b5e20; }
.alerte-erreur { background: #ffebee; color: #b71c1c; }
.alerte-info { background: var(--bleu-clair); color: var(--bleu-fonce); }
.vide { text-align: center; padding: 48px 16px; color: var(--texte-doux); }
.vide > i { font-size: 3rem; color: var(--gris-logo); }
.invitation { display: flex; gap: 12px; align-items: center; background: var(--bleu-clair); border-radius: var(--rayon); padding: 14px 18px; margin: 0 0 18px; }
.invitation i { color: var(--bleu); font-size: 1.3rem; }
.invitation p { margin: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--fond); color: var(--texte-doux); vertical-align: middle; white-space: nowrap; }
.badge-ancien { background: #fff3e0; color: #e65100; }
.badge-moderateur { background: #e8f5e9; color: #1b5e20; }
.badge-administrateur { background: #ede7f6; color: #4527a0; }
.verifie { color: var(--bleu); font-size: .85em; }
.lien-profil { display: inline-flex; align-items: center; gap: 8px; color: var(--texte); text-decoration: none; font-weight: 700; }
.lien-profil:hover span { text-decoration: underline; }

/* ---------- Quiz ---------- */
.quiz-progression { position: sticky; top: 76px; z-index: 5; background: rgba(243,245,248,.95); backdrop-filter: blur(4px); padding: 8px 0; display: flex; align-items: center; gap: 12px; }
.quiz-progression p { margin: 0; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.quiz-barre { flex: 1; height: 10px; background: var(--bord); border-radius: 999px; overflow: hidden; }
.quiz-barre span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--vert), #66bb6a); transition: width .25s; }
.question { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px 20px; margin: 0 0 14px; }
.question legend { float: left; width: 100%; font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; padding: 0; }
.question legend + * { clear: both; }
.question-numero { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--bleu); color: #fff; font-family: var(--titres); margin-right: 6px; }
.question.repondue .question-numero { background: var(--vert); }
.question-meta { margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: var(--c); }
.choix { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--bord); border-radius: 10px; margin: 8px 0; cursor: pointer; transition: border-color .1s, background .1s; }
.choix:hover { border-color: var(--bleu); }
.choix input { margin-top: 5px; accent-color: var(--bleu); }
.choix:has(input:checked) { border-color: var(--bleu); background: var(--bleu-clair); }
.resultat-quiz { text-align: center; border-radius: 20px; padding: 32px 20px; color: #fff; margin-bottom: 24px; }
.resultat-quiz > i { font-size: 3rem; }
.resultat-quiz h1 { margin: 6px 0; font-size: 2.2rem; }
.resultat-quiz .score { font-family: var(--titres); font-size: 1.6rem; margin: 0; }
.resultat-quiz .score strong { font-size: 3.4rem; }
.resultat-quiz .hero-actions { justify-content: center; margin-top: 16px; }
.resultat-quiz .bouton-plein { background: #fff; color: var(--texte); }
.resultat-quiz .bouton-contour { background: transparent; border-color: #fff; color: #fff; }
.resultat-quiz .petit, .resultat-quiz .petit a { color: #fff; }
.resultat-excellent { background: linear-gradient(135deg, #1b5e20, #43a047); }
.resultat-bien { background: linear-gradient(135deg, #0d47a1, #1e88e5); }
.resultat-moyen { background: linear-gradient(135deg, #e65100, #fb8c00); }
.resultat-faible { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }
.correction { padding-left: 1.6em; }
.correction > li { background: #fff; border: 1px solid var(--bord); border-left: 5px solid; border-radius: 12px; padding: 14px 18px; margin: 0 0 12px; }
.correction > li.juste { border-left-color: var(--vert); }
.correction > li.faux { border-left-color: var(--rouge); }
.correction ul { list-style: none; padding: 0; margin: 6px 0; }
.correction ul li { padding: 3px 0; color: var(--texte-doux); }
.correction ul li.bonne { color: var(--vert); font-weight: 700; }
.correction ul li.choisie { color: var(--rouge); text-decoration: line-through; }
.question-texte { font-weight: 700; margin: 0; }
.explication { background: #fffde7; border-radius: 8px; padding: 8px 12px; margin: 8px 0 0; font-size: .95rem; }
.explication i { color: #f9a825; }
.sans-reponse { color: var(--rouge); font-size: .9rem; margin: 0; }
.liste-etapes { padding-left: 1.2em; }

/* ---------- Communauté ---------- */
.composer { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; margin: 0 0 20px; }
.composer-type { display: flex; gap: 8px; margin-bottom: 10px; }
.composer-type label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--bord); cursor: pointer; font-weight: 600; font-size: .92rem; }
.composer-type label:has(input:checked) { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.composer-type input { position: absolute; opacity: 0; pointer-events: none; }
.composer-ligne { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea, .carte-formulaire textarea, .carte-formulaire input, .carte-formulaire select, .composer select, .composer-sondage input, .filtres-admin input, .filtres-admin select { width: 100%; border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; background: #fff; }
.composer textarea:focus, .carte-formulaire :is(input, textarea, select):focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-clair); }
.composer-sondage { padding: 8px 0 0 52px; display: grid; gap: 8px; }
.composer-sondage p { margin: 0; }
.composer-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.composer-actions select { width: auto; max-width: 60%; }
.fil { display: grid; gap: 14px; }
.publication { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 18px; }
.publication-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.publication-date { font-size: .85rem; }
.publication-date a { color: var(--texte-doux); text-decoration: none; }
.etiquette-branche { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--c); text-decoration: none; border: 1px solid currentColor; border-radius: 999px; padding: 1px 10px; }
.publication-texte { overflow-wrap: anywhere; }
.lire-suite { font-weight: 700; font-size: .92rem; }
.publication-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bord); font-size: .9rem; }
.publication-pied > a { color: var(--texte-doux); text-decoration: none; font-weight: 600; }
.publication-pied form { margin: 0; }
.publication-pied form:last-child { margin-left: auto; }
.sondage { margin: 12px 0 4px; display: grid; gap: 8px; }
.sondage-resultat { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-radius: 10px; background: var(--fond); overflow: hidden; isolation: isolate; }
.sondage-barre { position: absolute; left: 0; top: 0; bottom: 0; background: #cfe3fa; z-index: -1; border-radius: 10px; transition: width .4s; }
.mon-choix .sondage-barre { background: #a9cdf5; }
.mon-choix { font-weight: 700; }
.sondage-pct { font-weight: 700; }
.sondage-total { font-size: .85rem; color: var(--texte-doux); margin: 0; }
.sondage .bouton { justify-self: start; }
.commentaires { margin-top: 24px; }
.commentaire { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bord); }
.commentaire-corps { flex: 1; min-width: 0; }
.commentaire-entete { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .92rem; }
.commentaire-entete > span:last-child { color: var(--texte-doux); font-size: .82rem; }
.commentaire-texte { overflow-wrap: anywhere; margin-top: 2px; }
.commentaire-actions { margin-top: 4px; }
.commentaire-actions form { margin: 0; }
.composer-commentaire { margin-top: 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--bord); text-decoration: none; }
.pagination a.actif { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.fil-ariane { margin: 0 0 14px; }
.fil-ariane a { text-decoration: none; font-weight: 600; }

/* ---------- Messagerie ---------- */
.onglets { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; scrollbar-width: thin; }
.onglets a { white-space: nowrap; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--bord); text-decoration: none; color: var(--texte); font-weight: 600; font-size: .93rem; }
.onglets a.actif { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.discussion { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); display: flex; flex-direction: column; min-height: 420px; }
.discussion-entete { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bord); }
.retour-liste { display: none; }
.discussion-fil { flex: 1; overflow-y: auto; max-height: 62vh; min-height: 340px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#fafcfe, #f5f8fb); }
.discussion-vide { margin: auto; color: var(--texte-doux); }
.discussion .invitation, .discussion .alerte { margin: 12px; }
.message { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.message.a-moi { align-self: flex-end; flex-direction: row-reverse; }
.message-bulle { position: relative; background: #fff; border: 1px solid var(--bord); border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; min-width: 0; }
.a-moi .message-bulle { background: var(--bleu); color: #fff; border-color: var(--bleu); border-radius: 16px 16px 4px 16px; }
.a-moi .message-bulle a { color: #fff; }
.message-auteur { margin: 0 0 2px; font-size: .82rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-right: 22px; }
.message-auteur .lien-profil { font-size: .85rem; }
.message-texte { overflow-wrap: anywhere; }
.message-heure { margin: 2px 0 0; font-size: .7rem; opacity: .65; text-align: right; }
.message.supprime .message-bulle { background: #f5f5f5; color: #888; }
.message-outils { position: absolute; top: 4px; right: 6px; }
.message-outils summary { list-style: none; cursor: pointer; color: var(--texte-doux); padding: 0 4px; border-radius: 6px; }
.message-outils summary::-webkit-details-marker { display: none; }
.message-outils > div { position: absolute; right: 0; top: 22px; z-index: 10; background: #fff; border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 10px 28px rgba(16,42,67,.16); min-width: 220px; padding: 6px; }
.message-outils button, .message-outils a { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--texte); text-decoration: none; font-size: .88rem; }
.message-outils button:hover, .message-outils a:hover { background: var(--fond); }
.message-outils [data-action="sanctionner"], .message-outils [data-action="supprimer"] { color: var(--rouge); }
.discussion-saisie { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--bord); align-items: flex-end; }
.discussion-saisie textarea { flex: 1; border: 1px solid var(--bord); border-radius: 20px; padding: 10px 16px; resize: none; max-height: 160px; }
.discussion-saisie textarea:focus { outline: none; border-color: var(--bleu); }
.discussion-saisie .bouton { width: 46px; height: 46px; padding: 0; }
.note-moderation { margin-top: 12px; }
.prive { display: grid; grid-template-columns: 290px 1fr; gap: 16px; align-items: start; }
.prive:not(.avec-conversation) { grid-template-columns: 1fr; }
.prive-liste { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px; }
.prive-liste h2 { font-size: 1.1rem; margin: 4px 6px 10px; }
.conversation { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: var(--texte); }
.conversation:hover, .conversation.actif { background: var(--bleu-clair); }
.conversation > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.conversation .apercu { font-size: .85rem; color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation.non-lu strong, .conversation.non-lu .apercu { color: var(--texte); font-weight: 700; }

/* ---------- Profil ---------- */
.profil-entete { position: relative; background: #fff; border: 1px solid var(--bord); border-radius: 20px; overflow: hidden; padding: 0 24px 20px; }
.profil-decor { height: 110px; margin: 0 -24px; background: linear-gradient(120deg, #0d47a1, #1565c0 50%, #00897b); position: relative; isolation: isolate; }
.profil-decor::before { content: ""; position: absolute; inset: 0; background-image: var(--motif); opacity: .25; }
.profil-identite { display: flex; gap: 18px; align-items: flex-end; margin-top: -48px; flex-wrap: wrap; }
.profil-identite > .avatar { border: 5px solid #fff; box-shadow: var(--ombre); position: relative; }
.profil-identite h1 { margin: 0; font-size: 1.9rem; }
.profil-pseudo { margin: 0; color: var(--texte-doux); display: flex; gap: 8px; align-items: center; }
.profil-identite .petit { margin: 2px 0 0; }
.profil-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.profil-actions form { margin: 0; }
.profil-infos { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 20px; margin-top: 16px; }
.profil-bio { margin: 0 0 10px; font-size: 1.05rem; }
.profil-infos ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.profil-infos li i { color: var(--bleu); width: 18px; }
.profil-infos li span { color: var(--texte-doux); }
.profil-chiffres { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.profil-chiffres li { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.profil-chiffres i { color: var(--bleu); font-size: 1.3rem; }
.profil-chiffres strong { font-family: var(--titres); font-size: 1.7rem; line-height: 1.1; }
.profil-chiffres span { font-size: .88rem; color: var(--texte-doux); }
.profil-quiz { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.profil-niveau { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px; border-radius: var(--rayon); color: #fff; }
.profil-niveau > i { font-size: 1.6rem; }
.profil-niveau strong { font-family: var(--titres); font-size: 1.25rem; }
.profil-niveau .petit { color: rgba(255,255,255,.85); }
.profil-niveau span { font-size: .85rem; }
.profil-niveau em { font-style: normal; font-weight: 700; background: rgba(255,255,255,.2); border-radius: 999px; padding: 2px 10px; margin-top: 4px; }
.jauge { --p: 0; width: 86px; height: 86px; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; margin: 6px 0; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.25) 0); }
.jauge span { width: 66px; height: 66px; border-radius: 50%; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-family: var(--titres); font-size: 1.15rem !important; }
.progression-branches { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 8px 18px; }
.progression-branches li { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr 52px; gap: 12px; align-items: center; padding: 8px 0; font-size: .95rem; }
.progression-branches li i { color: var(--c); width: 20px; }
.barre { height: 10px; border-radius: 999px; background: var(--fond); overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--c); border-radius: 999px; }

/* ---------- Formulaires, administration ---------- */
.carte-formulaire { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px 22px; margin: 0 0 18px; }
.carte-formulaire h2 { margin: 0 0 10px; font-size: 1.3rem; }
.carte-formulaire label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: .95rem; }
.carte-formulaire .bouton { margin-top: 14px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ligne-compte { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.filtres-admin { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filtres-admin input { flex: 1 1 240px; width: auto; }
.filtres-admin select { flex: 0 0 auto; width: auto; }
.carte-action { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; text-decoration: none; color: var(--texte); margin-bottom: 12px; }
.carte-action i { color: var(--bleu); font-size: 1.3rem; }
.carte-action.alerte-action { border-color: var(--rouge); }
.carte-action.alerte-action i { color: var(--rouge); }
.signalement blockquote { margin: 8px 0; padding: 10px 14px; border-left: 4px solid var(--bord); background: var(--fond); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.boutons form { margin: 0; }
.boutons .bouton { margin: 0; }
.tableau { border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }

/* ---------- Pied de page ---------- */
.pied { background: #1c2733; color: #c9d3dd; padding: 32px 0 18px; }
.pied a { color: #e6edf4; text-decoration: none; }
.pied a:hover { text-decoration: underline; color: #fff; }
.pied h2 { color: #fff; font-size: 1.1rem; margin: 0 0 10px; }
.pied ul { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.pied li { margin: 4px 0; }
.pied-grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.pied-logo { height: 40px; width: auto; filter: brightness(1.4) saturate(.9); background: #fff; border-radius: 8px; padding: 6px 10px; }
.pied-bas { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 14px; font-size: .82rem; color: #8fa0b1; }
.pied .pub-etiquette { color: #8fa0b1; }
.pied .pub-factice { background: #243241; border-color: #3a4a5c; color: #8fa0b1; }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 1020px) {
  .mise-en-page { grid-template-columns: minmax(0, 1fr); }
  .secondaire { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .collant { position: static; }
  .menu-branches { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bouton-menu { display: block; }
  .logo img { height: 34px; }
  .entete-interieur { gap: 8px; min-height: 58px; }
  .recherche { display: none; }
  .compte { margin-left: auto; }
  .txt-long { display: none; }
  .txt-court { display: inline; }
  .menu { display: none; }
  .bandeau, .accueil-hero { padding: 26px 20px; border-radius: 16px; }
  .bandeau-icone { font-size: 4.5rem; right: 14px; }
  .article-cours, div.contenu-cours:not(.article-cours .contenu-cours) { padding: 18px 16px; }
  .contenu-cours h2 { font-size: 1.3rem; padding-left: 46px; }
  .contenu-cours h2::before { left: 12px; width: 22px; height: 22px; margin-top: -11px; }
  .sommaire ol { columns: 1; }
  .cours-navigation { grid-template-columns: 1fr; }
  .cours-navigation .suivant { grid-column: 1; }
  .carte-cours { padding: 12px; gap: 12px; }
  .carte-cours-pastille { flex-basis: 44px; height: 44px; font-size: 1.1rem; }
  .pied-grille { grid-template-columns: 1fr; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .composer-sondage { padding-left: 0; }
  .composer-ligne > .avatar { display: none; }
  .prive.avec-conversation { grid-template-columns: 1fr; }
  .prive.avec-conversation .prive-liste { display: none; }
  .retour-liste { display: inline-flex; }
  .message { max-width: 96%; }
  .progression-branches li { grid-template-columns: 1fr 52px; }
  .progression-branches .barre { grid-column: 1 / -1; grid-row: 2; }
  .quiz-progression { top: 58px; }
  .etiquette-branche { margin-left: 0; }
  .parcours li { padding-left: 0; }
  .parcours li::before { display: none; }
}

/* ---------- Motifs SVG des bandeaux (générés) ---------- */
.motif-cellules { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='160' viewBox='0 0 200 160'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cellipse cx='50' cy='45' rx='34' ry='28'/%3E%3Ccircle cx='56' cy='42' r='9' fill='white' fill-opacity='.5'/%3E%3Ccircle cx='36' cy='56' r='3' fill='white'/%3E%3Cpath d='M30 34q6-4 10 0'/%3E%3Cellipse cx='150' cy='118' rx='30' ry='34'/%3E%3Ccircle cx='145' cy='112' r='8' fill='white' fill-opacity='.5'/%3E%3Cpath d='M160 135q5 3 9-1M132 128q3-5 8-3'/%3E%3Ccircle cx='150' cy='30' r='6'/%3E%3Ccircle cx='40' cy='130' r='10'/%3E%3Ccircle cx='42' cy='128' r='3' fill='white'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-adn { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80' viewBox='0 0 120 80'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M0 40C20 5 40 5 60 40S100 75 120 40'/%3E%3Cpath d='M0 40C20 75 40 75 60 40S100 5 120 40'/%3E%3Cpath d='M10 22v36M22 12v56M34 10v60M46 16v48M74 16v48M86 10v60M98 12v56M110 22v36' stroke-width='1.4' stroke-opacity='.7'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-pouls { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='90' viewBox='0 0 220 90'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-width='2.4'%3E%3Cpath d='M0 50h60l8-22 10 46 12-62 10 52 6-14h114'/%3E%3C/g%3E%3Cg fill='white' fill-opacity='.6'%3E%3Cpath d='M180 22c-4-6-13-4-13 3 0 6 13 13 13 13s13-7 13-13c0-7-9-9-13-3z'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-feuilles { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='140' viewBox='0 0 160 140'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20 70Q22 28 70 18Q66 62 20 70Z'/%3E%3Cpath d='M20 70L58 30'/%3E%3Cpath d='M100 130Q96 90 140 76Q144 118 100 130Z'/%3E%3Cpath d='M100 130L132 88'/%3E%3Cpath d='M120 40q6-14 20-16' /%3E%3Cpath d='M40 120q10-6 22 0q-10 8-22 0z'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-reseau { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='140' viewBox='0 0 160 140'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-width='1.6'%3E%3Cpath d='M20 30L80 60L140 20M80 60L60 120L130 110L80 60M20 30L60 120' stroke-opacity='.7'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='20' cy='30' r='6'/%3E%3Ccircle cx='80' cy='60' r='9'/%3E%3Ccircle cx='140' cy='20' r='5'/%3E%3Ccircle cx='60' cy='120' r='6'/%3E%3Ccircle cx='130' cy='110' r='7'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-arbre { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='140' viewBox='0 0 180 140'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M90 140V90M90 90L50 60M90 90L130 55M50 60L30 30M50 60L66 28M130 55L112 24M130 55L156 30M30 30L22 10M30 30L40 12M156 30L168 12'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='22' cy='10' r='4'/%3E%3Ccircle cx='40' cy='12' r='4'/%3E%3Ccircle cx='66' cy='28' r='4'/%3E%3Ccircle cx='112' cy='24' r='4'/%3E%3Ccircle cx='168' cy='12' r='4'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-microbes { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='150' viewBox='0 0 180 150'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Crect x='14' y='20' width='56' height='22' rx='11' transform='rotate%28-20 42 31%29'/%3E%3Cpath d='M70 22q10-4 16 4M12 44q-8 6-4 14'/%3E%3Ccircle cx='130' cy='50' r='16'/%3E%3Cpath d='M130 26v-8M130 82v-8M106 50h-8M162 50h-8M113 33l-6-6M153 73l-6-6M147 33l6-6M107 73l6-6'/%3E%3Crect x='50' y='100' width='60' height='20' rx='10'/%3E%3Ccircle cx='150' cy='120' r='7'/%3E%3Ccircle cx='164' cy='126' r='7'/%3E%3Ccircle cx='20' cy='120' r='9'/%3E%3C/g%3E%3C/svg%3E"); }
.motif-strates { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' viewBox='0 0 240 120'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M0 20Q60 8 120 20T240 20'/%3E%3Cpath d='M0 50Q60 36 120 50T240 50' stroke-opacity='.8'/%3E%3Cpath d='M0 80Q60 70 120 82T240 80'/%3E%3Cpath d='M0 108Q60 98 120 110T240 108' stroke-opacity='.7'/%3E%3C/g%3E%3Cg fill='white' fill-opacity='.7'%3E%3Ccircle cx='40' cy='64' r='3'/%3E%3Ccircle cx='150' cy='94' r='2.5'/%3E%3Ccircle cx='200' cy='34' r='2'/%3E%3Cpath d='M100 66q6-8 12 0q-6 6-12 0z'/%3E%3C/g%3E%3C/svg%3E"); }
.carte-formulaire label.case { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 12px 0; }
.carte-formulaire label.case input { width: auto; }
.carte-formulaire h3 { margin: 22px 0 4px; font-size: 1.1rem; }

/* ---------- Menu téléphone : tiroir qui glisse depuis la gauche ---------- */
.tiroir-conteneur { display: none; }
@media (max-width: 760px) {
  .tiroir-conteneur { display: block; position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; transition: visibility 0s linear .28s; }
  .tiroir-conteneur.ouvert, .tiroir-conteneur.glisse { visibility: visible; pointer-events: auto; transition: none; }
  .tiroir-fond { position: absolute; inset: 0; background: rgba(10, 25, 41, .5); opacity: 0; transition: opacity .28s ease; }
  .tiroir-conteneur.ouvert .tiroir-fond { opacity: 1; }
  .tiroir { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 320px); display: flex; flex-direction: column;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 8px 0 32px rgba(10, 25, 41, .25); transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .tiroir-conteneur.ouvert .tiroir { transform: none; }
  .tiroir-conteneur.glisse .tiroir, .tiroir-conteneur.glisse .tiroir-fond { transition: none; }
  .tiroir-entete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--bord); }
  .tiroir-logo img { display: block; height: 32px; width: auto; }
  .tiroir-fermer { border: 0; background: var(--fond); width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--texte); flex: 0 0 auto; }
  .tiroir-corps { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 28px; }
  .tiroir-profil { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--bord); text-decoration: none; color: var(--texte); }
  .tiroir-profil span { min-width: 0; display: flex; flex-direction: column; }
  .tiroir-profil strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tiroir-profil small { color: var(--texte-doux); }
  .tiroir-recherche { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 0 14px; background: #fff; border: 1px solid var(--bord); border-radius: 999px; color: var(--texte-doux); }
  .tiroir-recherche input { flex: 1; border: 0; background: none; padding: 10px 0; min-width: 0; outline: none; }
  .tiroir-titre { margin: 18px 10px 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--texte-doux); }
  .tiroir-lien { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; border: 0; background: none; text-decoration: none; color: var(--texte); font-weight: 600; text-align: left; cursor: pointer; }
  .tiroir-lien i { width: 22px; text-align: center; color: var(--bleu); }
  .tiroir-lien:hover, .tiroir-lien.actif { background: var(--bleu-clair); color: var(--bleu-fonce); }
  .tiroir-lien .pastille { margin-left: auto; }
  .tiroir-branche i { color: var(--c); }
  .tiroir-corps form { margin: 0; }
  body.tiroir-ouvert { overflow: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .tiroir, .tiroir-fond { transition: none; }
}
