/* Centre d'aide SmartCampus — feuille de style unique (aucune dépendance externe) */
@import url("code.css");

:root {
  --fond: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --texte: #1b2333;
  --texte-2: #545f75;
  --texte-3: #7a8499;
  --bord: #e2e6ee;
  --bord-fort: #cfd5e1;
  --primaire: #2f4a8a;
  --primaire-fort: #223a70;
  --primaire-doux: #e8eef9;
  --primaire-texte: #ffffff;
  --accent: #c98a00;
  --accent-doux: #fff4d6;
  --ombre: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
  --ombre-forte: 0 12px 40px rgba(15, 25, 50, .22);
  --mark: #ffe58a;
  --info: #1f6fd1;      --info-fond: #eaf2fd;
  --astuce: #18825a;    --astuce-fond: #e7f6ef;
  --attention: #b26a00; --attention-fond: #fff4e0;
  --danger: #c0352b;    --danger-fond: #fdecea;
  --question: #6b47c2;  --question-fond: #f1ecfc;
  --note: #4a5a7a;      --note-fond: #eef1f6;
  --rayon: 10px;
  --barre: 60px;
  --police: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0e1320; --surface: #151b2a; --surface-2: #1b2234; --texte: #e6e9f1; --texte-2: #a6afc2; --texte-3: #7f899e;
    --bord: #263047; --bord-fort: #34405c; --primaire: #8fa8ff; --primaire-fort: #b3c3ff; --primaire-doux: #1e2946;
    --primaire-texte: #0e1320; --accent: #f2b740; --accent-doux: #3a2f14;
    --ombre: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --mark: #6b5a12;
    --info: #74a9ff; --info-fond: #15233d; --astuce: #4fcf98; --astuce-fond: #112a22;
    --attention: #f2b54a; --attention-fond: #2e2412; --danger: #ff7d73; --danger-fond: #34171a;
    --question: #b39bff; --question-fond: #231c3d; --note: #a8b5d1; --note-fond: #1b2234;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0e1320; --surface: #151b2a; --surface-2: #1b2234; --texte: #e6e9f1; --texte-2: #a6afc2; --texte-3: #7f899e;
  --bord: #263047; --bord-fort: #34405c; --primaire: #8fa8ff; --primaire-fort: #b3c3ff; --primaire-doux: #1e2946;
  --primaire-texte: #0e1320; --accent: #f2b740; --accent-doux: #3a2f14;
  --ombre: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); --mark: #6b5a12;
  --info: #74a9ff; --info-fond: #15233d; --astuce: #4fcf98; --astuce-fond: #112a22;
  --attention: #f2b54a; --attention-fond: #2e2412; --danger: #ff7d73; --danger-fond: #34171a;
  --question: #b39bff; --question-fond: #231c3d; --note: #a8b5d1; --note-fond: #1b2234;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--barre) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.65 var(--police); }
a { color: var(--primaire); text-underline-offset: 2px; }
a:hover { color: var(--primaire-fort); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primaire); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.evitement { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 6px; }
.evitement:focus { left: 8px; }

/* ------------------------------------------------------------------ barre du haut */
.barre {
  position: sticky; top: 0; z-index: 30; height: var(--barre);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bord);
}
.marque { display: flex; align-items: center; gap: 10px; color: var(--texte); text-decoration: none; font-weight: 700; white-space: nowrap; }
.marque:hover { color: var(--texte); }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--primaire); color: var(--primaire-texte); font-size: 13px; letter-spacing: .5px; }
.onglets { display: flex; gap: 4px; margin-left: 18px; }
.onglet { padding: 6px 12px; border-radius: 8px; color: var(--texte-2); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.onglet:hover { background: var(--surface-2); color: var(--texte); }
.onglet[aria-current] { color: var(--primaire); background: var(--primaire-doux); }
.champ-recherche {
  margin-left: auto; display: flex; align-items: center; gap: 8px; width: 260px; height: 38px; padding: 0 10px 0 12px;
  border: 1px solid var(--bord); border-radius: 9px; background: var(--surface-2); color: var(--texte-3); cursor: pointer; font-size: 15px;
}
.champ-recherche:hover { border-color: var(--bord-fort); }
.champ-recherche span { flex: 1; text-align: left; }
kbd {
  font: 12px/1 var(--police-code); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--bord-fort);
  border-bottom-width: 2px; background: var(--surface); color: var(--texte-2); white-space: nowrap;
}
.btn-icone { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--texte-2); cursor: pointer; flex: none; }
.btn-icone:hover { background: var(--surface-2); color: var(--texte); }
.ic-soleil { display: none; }
:root[data-theme="dark"] .ic-soleil { display: block; } :root[data-theme="dark"] .ic-lune { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-soleil { display: block; } :root:not([data-theme="light"]) .ic-lune { display: none; } }
.seulement-mobile { display: none; }

/* ------------------------------------------------------------------ cadre */
.cadre { display: grid; grid-template-columns: 280px minmax(0, 1fr) 240px; max-width: 1480px; margin: 0 auto; }
body.accueil .cadre { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) { body.accueil .nav { display: none; } }
.nav {
  position: sticky; top: var(--barre); height: calc(100vh - var(--barre)); overflow-y: auto; padding: 24px 14px 40px 20px;
  border-right: 1px solid var(--bord); scrollbar-width: thin;
}
.onglets-mobile { display: none; }
.nav-titre { margin: 0 0 10px 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); }
.nav-arbre, .nav-arbre ul { list-style: none; margin: 0; padding: 0; }
.nav-arbre ul { margin: 2px 0 6px 12px; padding-left: 8px; border-left: 1px solid var(--bord); }
.nav-arbre a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 7px; color: var(--texte-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.nav-arbre a:hover { background: var(--surface-2); color: var(--texte); }
.nav-arbre a[aria-current] { background: var(--primaire-doux); color: var(--primaire); font-weight: 600; }
.nav-arbre a.lu::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--astuce); opacity: .7; flex: none; }
.nav-arbre summary { list-style: none; cursor: pointer; display: flex; align-items: center; border-radius: 7px; font-size: 14.5px; font-weight: 600; color: var(--texte); }
.nav-arbre summary::-webkit-details-marker { display: none; }
.nav-arbre summary::before { content: ""; width: 7px; height: 7px; margin: 0 6px 0 10px; border-right: 2px solid var(--texte-3); border-bottom: 2px solid var(--texte-3); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.nav-arbre details[open] > summary::before { transform: rotate(45deg); }
.nav-arbre summary a { flex: 1; padding-left: 4px; font-weight: 600; color: var(--texte); }
.nav-arbre summary:not(:has(a)) { padding: 6px 10px 6px 0; }
.titre-rubrique a { font-weight: 600; color: var(--texte); }

main { min-width: 0; padding: 32px 48px 24px; }
.page { max-width: 820px; margin: 0 auto; }
body.accueil .page { max-width: 1040px; }

/* ------------------------------------------------------------------ typographie */
.fil { font-size: 14px; color: var(--texte-3); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.fil a { color: var(--texte-2); text-decoration: none; } .fil a:hover { color: var(--primaire); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--texte); letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 36px); margin: 0 0 18px; letter-spacing: -.02em; }
h2 { font-size: 24px; margin: 44px 0 14px; padding-top: 8px; }
h3 { font-size: 19px; margin: 32px 0 10px; }
h4 { font-size: 16.5px; margin: 24px 0 8px; }
.headerlink { margin-left: 8px; color: var(--texte-3); text-decoration: none; opacity: 0; font-weight: 400; transition: opacity .15s; }
h2:hover .headerlink, h3:hover .headerlink, .headerlink:focus { opacity: 1; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
li > ul, li > ol { margin: 4px 0; }
strong { font-weight: 650; }
hr { border: none; border-top: 1px solid var(--bord); margin: 32px 0; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
code { font: .88em var(--police-code); background: var(--surface-2); border: 1px solid var(--bord); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
blockquote { margin: 0 0 14px; padding: 4px 16px; border-left: 3px solid var(--bord-fort); color: var(--texte-2); }

/* blocs de code */
.highlight { position: relative; margin: 0 0 16px; }
.highlight pre, pre { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: var(--rayon); border: 1px solid var(--bord); background: var(--surface-2) !important; font: 13.5px/1.6 var(--police-code); }
.highlight code, pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copier { position: absolute; top: 8px; right: 8px; padding: 4px 10px; font-size: 12.5px; border-radius: 6px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte-2); cursor: pointer; opacity: 0; transition: opacity .15s; }
.highlight:hover .copier, .copier:focus { opacity: 1; }
.copier.ok { color: var(--astuce); border-color: var(--astuce); opacity: 1; }
@media (hover: none) { .copier { opacity: 1; } }

/* tableaux */
.tableau { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--bord); }
th { background: var(--surface-2); font-weight: 650; font-size: 14px; color: var(--texte-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--primaire-doux) 45%, transparent); }

/* captures */
figure { margin: 22px 0; }
.capture .zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); cursor: zoom-in; overflow: hidden; box-shadow: var(--ombre); }
.capture img { display: block; width: 100%; height: auto; transition: transform .25s; }
.capture .zoom:hover img { transform: scale(1.01); }
figcaption { margin-top: 8px; font-size: 14px; color: var(--texte-3); text-align: center; }
.diagramme { padding: 18px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); text-align: center; overflow-x: auto; }
.diagramme img { max-height: 520px; width: auto; max-width: 100%; }
.seulement-sombre { display: none !important; }
:root[data-theme="dark"] .seulement-sombre { display: inline !important; } :root[data-theme="dark"] .seulement-clair { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seulement-sombre { display: inline !important; } :root:not([data-theme="light"]) .seulement-clair { display: none !important; } }

/* encadrés (admonitions et blocs repliables) */
:where(.admonition, .page details) { --c: var(--note); --f: var(--note-fond); }
.admonition, .page details {
  margin: 0 0 16px; padding: 12px 16px; border-radius: var(--rayon); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  border-left: 4px solid var(--c); background: var(--f);
}
.admonition > :last-child, .page details > :last-child { margin-bottom: 0; }
.admonition-title, .page details > summary { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 650; color: var(--c); }
.admonition-title::before, .page details > summary::before {
  content: ""; width: 18px; height: 18px; flex: none; background: var(--c);
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
:where(.admonition, .page details) {
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E");
}
.info, .abstract { --c: var(--info); --f: var(--info-fond);
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E"); }
.tip, .success, .hint { --c: var(--astuce); --f: var(--astuce-fond);
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.success { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.warning, .caution, .attention { --c: var(--attention); --f: var(--attention-fond);
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20z'/%3E%3Cpath d='M12 10v4M12 17v.5'/%3E%3C/svg%3E"); }
.danger, .error, .failure, .bug { --c: var(--danger); --f: var(--danger-fond);
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 2h8l6 6v8l-6 6H8l-6-6V8z'/%3E%3Cpath d='M12 8v5M12 16v.5'/%3E%3C/svg%3E"); }
.question, .faq, .help { --c: var(--question); --f: var(--question-fond);
  --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14M12 17v.5'/%3E%3C/svg%3E"); }
.example { --c: var(--question); --f: var(--question-fond); }
.page details > summary { cursor: pointer; list-style: none; margin: -12px -16px; padding: 12px 40px 12px 16px; position: relative; }
.page details > summary::-webkit-details-marker { display: none; }
.page details > summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--c); border-bottom: 2px solid var(--c); transform: rotate(45deg); transition: transform .15s; }
.page details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.page details[open] > summary { margin-bottom: 8px; }
.page details:not([open]) { padding-bottom: 12px; }

/* onglets (pymdownx.tabbed) */
.tabbed-set { display: flex; flex-wrap: wrap; margin: 0 0 18px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); overflow: hidden; }
.tabbed-set > input { position: absolute; opacity: 0; pointer-events: none; }
.tabbed-labels { display: flex; width: 100%; border-bottom: 1px solid var(--bord); background: var(--surface-2); overflow-x: auto; }
.tabbed-labels > label { padding: 10px 16px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--texte-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabbed-labels > label:hover { color: var(--texte); }
.tabbed-content { width: 100%; padding: 14px 16px 2px; }
.tabbed-block { display: none; }
.tabbed-set > input:nth-of-type(1):checked ~ .tabbed-content > .tabbed-block:nth-child(1),
.tabbed-set > input:nth-of-type(2):checked ~ .tabbed-content > .tabbed-block:nth-child(2),
.tabbed-set > input:nth-of-type(3):checked ~ .tabbed-content > .tabbed-block:nth-child(3),
.tabbed-set > input:nth-of-type(4):checked ~ .tabbed-content > .tabbed-block:nth-child(4),
.tabbed-set > input:nth-of-type(5):checked ~ .tabbed-content > .tabbed-block:nth-child(5) { display: block; }
.tabbed-set > input:nth-of-type(1):checked ~ .tabbed-labels > label:nth-child(1),
.tabbed-set > input:nth-of-type(2):checked ~ .tabbed-labels > label:nth-child(2),
.tabbed-set > input:nth-of-type(3):checked ~ .tabbed-labels > label:nth-child(3),
.tabbed-set > input:nth-of-type(4):checked ~ .tabbed-labels > label:nth-child(4),
.tabbed-set > input:nth-of-type(5):checked ~ .tabbed-labels > label:nth-child(5) { color: var(--primaire); border-bottom-color: var(--primaire); background: var(--surface); }
.tabbed-set > input:focus-visible ~ .tabbed-labels { outline: 3px solid var(--primaire); outline-offset: -3px; }

/* listes à cocher */
.task-list { list-style: none; padding-left: 4px; }
.task-list-item { position: relative; padding-left: 32px; list-style: none; }
.task-list-control { position: absolute; left: 0; top: 3px; display: inline-flex; cursor: pointer; }
.task-list-control input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.task-list-indicator { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--bord-fort); background: var(--surface); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.task-list-control input:checked + .task-list-indicator { background: var(--astuce); border-color: var(--astuce); }
.task-list-control input:checked + .task-list-indicator::after { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.task-list-control input:focus-visible + .task-list-indicator { outline: 3px solid var(--primaire); outline-offset: 2px; }
.task-list-item.fait > :not(.task-list-control) { color: var(--texte-3); text-decoration: line-through; text-decoration-color: var(--bord-fort); }
.progression-liste { display: flex; align-items: center; gap: 12px; margin: -4px 0 14px; font-size: 14px; color: var(--texte-2); }
.progression-liste .jauge { flex: 1; max-width: 240px; }
.lien-discret { background: none; border: 0; padding: 0; color: var(--primaire); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 2px; }
.lien-discret .ic { width: 16px; height: 16px; }

/* glossaire */
dl dt { font-weight: 650; margin-top: 16px; scroll-margin-top: calc(var(--barre) + 16px); }
dl dd { margin: 4px 0 0; padding-left: 14px; border-left: 2px solid var(--bord); color: var(--texte-2); }
dl dt:target, dl dt.cible { color: var(--primaire); }
.terme { text-decoration: underline dotted var(--texte-3); text-underline-offset: 3px; cursor: help; }
.infobulle {
  position: absolute; z-index: 60; max-width: 320px; padding: 10px 14px; border-radius: 9px; font-size: 14px; line-height: 1.5;
  background: var(--texte); color: var(--fond); box-shadow: var(--ombre-forte); pointer-events: none;
}
.infobulle strong { display: block; margin-bottom: 2px; }
.filtre-glossaire { width: 100%; height: 44px; padding: 0 14px; margin: 0 0 8px; border-radius: 9px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte); font-size: 16px; }
.alphabet { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.alphabet a { min-width: 30px; padding: 3px 6px; text-align: center; border-radius: 6px; background: var(--surface-2); text-decoration: none; font-weight: 600; font-size: 14px; }

/* touches */
.keys kbd { margin: 0 1px; }

/* sommaire de droite */
.colonne-toc { position: sticky; top: var(--barre); height: calc(100vh - var(--barre)); overflow-y: auto; padding: 32px 20px 40px 8px; scrollbar-width: thin; }
.toc-titre { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--bord); }
.toc ul ul { border: 0; padding-left: 12px; }
.toc li { margin: 0; }
.toc a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 2px solid transparent; color: var(--texte-2); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.toc a:hover { color: var(--texte); }
.toc a.actif { color: var(--primaire); border-left-color: var(--primaire); font-weight: 600; }

/* pages voisines, pied */
.prec-suiv { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 820px; margin: 48px auto 0; }
.prec-suiv a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.prec-suiv a:hover { border-color: var(--primaire); box-shadow: var(--ombre); }
.prec-suiv span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texte-3); }
.prec-suiv .ic { width: 16px; height: 16px; }
.prec-suiv strong { color: var(--texte); font-weight: 600; }
.prec-suiv .suiv { grid-column: 2; text-align: right; align-items: flex-end; }
.pied { max-width: 820px; margin: 40px auto 0; padding: 20px 0; border-top: 1px solid var(--bord); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--texte-3); }
.pied p { margin: 0; }
body.accueil .pied { max-width: 1040px; }

/* bandeau de parcours sur les pages */
.bandeau-parcours { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -4px 0 24px; padding: 12px 16px; border-radius: var(--rayon); background: var(--primaire-doux); border: 1px solid color-mix(in srgb, var(--primaire) 25%, transparent); font-size: 14.5px; }
.bandeau-parcours .ic { color: var(--primaire); }
.bandeau-parcours .bp-texte { flex: 1; min-width: 200px; }
.bandeau-parcours .bp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jauge { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--bord-fort) 70%, transparent); overflow: hidden; }
.jauge > span { display: block; height: 100%; border-radius: 3px; background: var(--astuce); transition: width .3s; }

/* boutons */
.btn-principal, .btn-secondaire { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-principal { background: var(--primaire); color: var(--primaire-texte); border: 1px solid var(--primaire); }
.btn-principal:hover { background: var(--primaire-fort); color: var(--primaire-texte); }
.btn-secondaire { background: var(--surface); color: var(--texte); border: 1px solid var(--bord-fort); }
.btn-secondaire:hover { border-color: var(--primaire); color: var(--primaire); }
.btn-principal .ic, .btn-secondaire .ic { width: 18px; height: 18px; }
.petit { height: 32px; padding: 0 12px; font-size: 14px; }

/* ------------------------------------------------------------------ accueil */
.hero { text-align: center; padding: 36px 0 12px; }
.surtitre { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
.hero-texte { max-width: 620px; margin: 0 auto 24px; color: var(--texte-2); font-size: 18px; }
.hero-recherche { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 6px 6px 6px 16px; border: 1px solid var(--bord-fort); border-radius: 14px; background: var(--surface); box-shadow: var(--ombre); }
.hero-recherche:focus-within { border-color: var(--primaire); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primaire) 18%, transparent); }
.hero-recherche .ic { color: var(--texte-3); }
.hero-recherche input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; color: var(--texte); font-size: 17px; }
.puces { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px auto 0; max-width: 700px; }
.puce { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2); font-size: 14px; cursor: pointer; }
.puce:hover { border-color: var(--primaire); color: var(--primaire); }
.bloc { margin-top: 56px; }
.bloc-entete { margin-bottom: 18px; }
.bloc-entete h2 { margin: 0 0 4px; padding: 0; font-size: 24px; }
.bloc-entete p { margin: 0; color: var(--texte-2); }
.grille-profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.carte-profil { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.carte-profil:hover { border-color: var(--primaire); box-shadow: var(--ombre); transform: translateY(-1px); }
.carte-profil[aria-pressed="true"] { border-color: var(--primaire); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primaire) 22%, transparent); }
.pastille { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 10px; background: var(--primaire-doux); color: var(--primaire); }
.profil-titre { font-weight: 650; font-size: 16px; }
.profil-resume { font-size: 14px; color: var(--texte-2); line-height: 1.45; }
.profil-etapes { margin-top: 6px; font-size: 13px; color: var(--texte-3); }
.carte-profil .jauge { width: 100%; margin-top: 8px; }
.detail-parcours { margin-top: 16px; padding: 22px; border: 1px solid var(--bord); border-radius: 14px; background: var(--surface); box-shadow: var(--ombre); }
.detail-parcours h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.detail-parcours .dp-sous { margin: 0 0 16px; color: var(--texte-2); }
.etapes { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; margin: 0; }
.etapes a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--texte); }
.etapes a:hover { background: var(--surface-2); }
.etapes a::before { content: counter(etape); display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--bord-fort); font-size: 13px; font-weight: 700; color: var(--texte-2); }
.etapes .lu a::before { content: "✓"; background: var(--astuce); border-color: var(--astuce); color: #fff; }
.etapes .etat { margin-left: auto; font-size: 13px; color: var(--texte-3); }
.dp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grille-taches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.grille-taches li { margin: 0; }
.grille-taches a { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 13px 16px; border: 1px solid var(--bord); border-radius: 11px; background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.grille-taches a:hover { border-color: var(--primaire); box-shadow: var(--ombre); }
.tache-libelle { font-weight: 600; color: var(--texte); }
.tache-page { grid-row: 2; font-size: 13px; color: var(--texte-3); }
.grille-taches .ic { grid-row: 1 / 3; grid-column: 2; color: var(--texte-3); width: 18px; }
.grille-taches a:hover .ic { color: var(--primaire); }
.grille-rubriques { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.carte-rubrique { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--bord); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--texte); transition: border-color .15s, box-shadow .15s; }
.carte-rubrique:hover { border-color: var(--primaire); box-shadow: var(--ombre); color: var(--texte); }
.rubrique-nom { font-size: 19px; font-weight: 700; }
.rubrique-desc { color: var(--texte-2); font-size: 15px; flex: 1; }
.rubrique-nb { display: flex; align-items: center; gap: 6px; color: var(--primaire); font-weight: 600; font-size: 14px; }
.rubrique-nb .ic { width: 16px; height: 16px; }
.note-word { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--texte-2); font-size: 15px; }
.note-word .ic { color: var(--primaire); }
.contenu-accueil > .admonition:first-of-type, .contenu-accueil > h2:first-of-type { margin-top: 0; }

/* ------------------------------------------------------------------ recherche */
.recherche-modale { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 8vh 16px 16px; background: rgba(10, 15, 30, .45); backdrop-filter: blur(3px); }
.recherche-boite { width: 100%; max-width: 720px; max-height: 80vh; display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); box-shadow: var(--ombre-forte); border: 1px solid var(--bord); overflow: hidden; }
.recherche-saisie { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--bord); }
.recherche-saisie .ic { color: var(--texte-3); }
.recherche-saisie input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: none; color: var(--texte); font-size: 17px; }
.recherche-filtres { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--bord); overflow-x: auto; }
.recherche-saisie input::-webkit-search-cancel-button, .hero-recherche input::-webkit-search-cancel-button { display: none; }
.recherche-filtres button { display: inline-flex; align-items: center; height: 30px; line-height: 1; padding: 0 12px; border-radius: 999px; border: 1px solid var(--bord); background: none; color: var(--texte-2); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.recherche-filtres button[aria-pressed="true"] { background: var(--primaire); border-color: var(--primaire); color: var(--primaire-texte); }
.resultats { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.resultats li { margin: 0; }
.resultats a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--texte); }
.resultats a .r-chemin { display: block; font-size: 12.5px; color: var(--texte-3); }
.resultats a .r-titre { display: block; font-weight: 600; }
.resultats a .r-extrait { display: block; margin-top: 2px; font-size: 14px; color: var(--texte-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.resultats a[aria-selected="true"], .resultats a:hover { background: var(--primaire-doux); }
.resultats .vide { padding: 28px 14px; text-align: center; color: var(--texte-2); }
.recherche-aide { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--bord); font-size: 12.5px; color: var(--texte-3); flex-wrap: wrap; }
.r-badge { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: var(--question-fond); color: var(--question); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }

/* surlignage après recherche */
.surligne { background: var(--mark); border-radius: 3px; }
.bandeau-recherche { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 14px; border-radius: 9px; background: var(--accent-doux); font-size: 14px; }

/* ------------------------------------------------------------------ visionneuse */
.visionneuse { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: rgba(8, 12, 22, .92); color: #fff; }
.vis-barre { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.vis-barre p { flex: 1; margin: 0; font-size: 15px; color: #dfe4ef; }
.vis-barre button { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.vis-barre button:hover { background: rgba(255,255,255,.18); }
.vis-scene { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 0 16px 16px; }
.vis-scene img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; cursor: zoom-in; background: #fff; }
.vis-scene.zoom { align-items: flex-start; justify-content: flex-start; }
.vis-scene.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.vis-compteur { font-size: 13px; color: #aab3c5; min-width: 52px; text-align: center; }

/* ------------------------------------------------------------------ haut de page */
.remonter { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2); box-shadow: var(--ombre); cursor: pointer; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none; }
.remonter.visible { opacity: 1; transform: none; pointer-events: auto; }

/* ------------------------------------------------------------------ adaptatif */
@media (max-width: 1240px) {
  .cadre { grid-template-columns: 260px minmax(0, 1fr); }
  .colonne-toc { display: none; }
  main { padding: 28px 36px 24px; }
}
@media (max-width: 1060px) { .onglets { display: none; } .champ-recherche { width: 220px; } }
@media (max-width: 900px) {
  .seulement-mobile { display: inline-grid; }
  .cadre, body.accueil .cadre { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(320px, 86vw); height: 100%; padding-top: 18px; background: var(--surface); border-right: 1px solid var(--bord); transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--ombre-forte); }
  .nav.ouverte { transform: none; }
  .onglets-mobile { display: flex; flex-direction: column; gap: 2px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--bord); }
  .onglets-mobile .onglet { padding: 8px 10px; }
  .voile { position: fixed; inset: 0; z-index: 65; background: rgba(10, 15, 30, .4); }
  main { padding: 22px 16px 20px; }
  .barre { padding: 0 10px; gap: 6px; }
  .marque span:last-child { display: none; }
  .champ-recherche { width: auto; flex: 1; margin-left: 4px; }
  .champ-recherche kbd { display: none; }
  .prec-suiv { grid-template-columns: 1fr; }
  .prec-suiv .suiv { grid-column: 1; }
  h2 { font-size: 21px; margin-top: 36px; }
  .hero { padding-top: 16px; }
  .hero-texte { font-size: 16px; }
  .hero-recherche { padding-left: 12px; }
  .hero-recherche .btn-principal { padding: 0 12px; }
  .grille-taches { grid-template-columns: 1fr; }
  .bloc { margin-top: 40px; }
  .detail-parcours { padding: 16px; }
}
@media (max-width: 420px) { .hero-recherche .btn-principal { display: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ impression */
@media print {
  .barre, .nav, .colonne-toc, .prec-suiv, .pied, .remonter, .copier, .headerlink, #bandeau-parcours, .evitement { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .cadre { display: block; } main { padding: 0; }
  .capture .zoom { box-shadow: none; }
  details { display: block; } details > * { display: block !important; }
  a { color: inherit; }
  h2, h3 { break-after: avoid; } figure, table { break-inside: avoid; }
}
@media (max-width: 600px) {
  .grille-profils { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .carte-profil { padding: 12px; }
  .profil-resume { font-size: 13px; }
}
