/* Documentation L'UàG Affichage — charte de L'UàG (marine, laiton, ivoire, Verdana), 28 nov. 2026 */
:root {
  --marine: #22386A; --marine-fonce: #1B2C52; --marine-clair: #334D77; --bleu-pale: #DDE3F0; --bleu-texte: #AEB8D0;
  --or: #C9A24A; --or-clair: #E6C878; --or-pale: #F3E7C4; --or-fonce: #8C6D24;
  --ivoire: #F5F2EA; --ivoire-clair: #FBF9F4; --bord: #D9D3C4; --gris: #6B7385; --gris-fonce: #4A5675; --blanc: #FFFFFF;
  --texte: #1E2433;
  --police: Verdana, Geneva, "DejaVu Sans", sans-serif;
  --menu: 290px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivoire); color: var(--texte); font: 15px/1.65 var(--police); }
a { color: var(--marine); }
a:hover { color: var(--or-fonce); }

/* bandeau marine, sigle, filet de laiton */
.bandeau { background: var(--marine-fonce); border-bottom: 3px solid var(--or); position: sticky; top: 0; z-index: 10; }
/* Ancres (2 déc. 2026) : le bandeau collant, 62 px, cachait les deux premières lignes de l'entrée visée (le nom du terme) */
[id] { scroll-margin-top: 80px; }
.bandeau .in { display: flex; align-items: center; gap: 24px; max-width: 1320px; margin: 0 auto; padding: 10px 20px; }
.marque { display: flex; align-items: center; gap: 12px; color: var(--blanc); text-decoration: none; font-size: 12px; line-height: 1.25; letter-spacing: .02em; }
.marque b { color: var(--or-clair); font-size: 14px; font-weight: bold; }
.marque:hover { color: var(--blanc); }
.recherche { flex: 1; max-width: 460px; margin-left: auto; }
.recherche input { width: 100%; padding: 8px 14px; border: 1px solid var(--marine-clair); border-radius: 18px; background: var(--marine); color: var(--blanc); font: 14px var(--police); }
.recherche input::placeholder { color: var(--bleu-texte); }
.recherche input:focus { outline: 2px solid var(--or); background: var(--blanc); color: var(--texte); }
.menu-bouton { display: none; }

/* la scène de la coupe, sur l'accueil seulement */
.scene { line-height: 0; background: var(--marine-clair); border-bottom: 3px solid var(--or); }
.scene img { width: 100%; height: clamp(140px, 22vw, 280px); object-fit: cover; object-position: 50% 62%; }

/* sommaire à gauche, texte à droite */
.cadre { display: flex; max-width: 1320px; margin: 0 auto; align-items: flex-start; min-height: calc(100vh - 140px); }
.menu { width: var(--menu); flex: none; padding: 22px 14px 40px 20px; position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow-y: auto; font-size: 13px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu .n1 > li { margin-bottom: 4px; }
.menu .n1 > li > a { font-weight: bold; color: var(--marine-fonce); }
.menu .n2 { margin: 2px 0 8px 10px; padding-left: 10px; border-left: 2px solid var(--bord); }
.menu li:not(.ouvert) > .n2 { display: none; }
.menu a { display: block; padding: 4px 8px; border-radius: 6px; text-decoration: none; color: var(--gris-fonce); }
.menu a:hover { background: var(--or-pale); color: var(--marine-fonce); }
/* page en cours : blanc sur marine, quel que soit le niveau (la règle du niveau 1 est plus précise) */
.menu .courant > a, .menu .n1 > li.courant > a, .menu .courant > a:hover { background: var(--marine); color: var(--blanc); }

main { flex: 1; min-width: 0; padding: 22px clamp(20px, 4vw, 56px) 60px; }
article { max-width: 68em; background: var(--ivoire-clair); border: 1px solid var(--bord); border-radius: 10px; padding: clamp(20px, 3vw, 40px); }
.fil { font-size: 12px; color: var(--gris); margin-bottom: 12px; }
.fil a { color: var(--gris-fonce); }

h1 { font-size: 26px; line-height: 1.25; color: var(--marine-fonce); margin: 0 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--or); font-weight: normal; letter-spacing: .01em; }
h2 { font-size: 19px; color: var(--marine); margin: 34px 0 10px; }
h3 { font-size: 16px; color: var(--marine); margin: 26px 0 8px; }
h4 { font-size: 15px; color: var(--gris-fonce); margin: 20px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 4px; }
li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }
strong { color: var(--marine-fonce); }
code { font-size: 13px; background: var(--bleu-pale); padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 28px 0; }

blockquote { margin: 18px 0; padding: 12px 18px; background: var(--or-pale); border-left: 4px solid var(--or); border-radius: 0 8px 8px 0; }
blockquote p:last-child, blockquote ul:last-child { margin-bottom: 0; }
blockquote ul { list-style: none; padding: 0; }

/* liens vers les tutoriels vidéo */
a.video { display: inline-block; padding: 3px 12px 3px 10px; border: 1px solid var(--or); border-radius: 14px; background: var(--blanc); text-decoration: none; color: var(--marine-fonce); }
a.video:hover { background: var(--marine); color: var(--or-clair); border-color: var(--marine); }
/* lecteur plein écran des tutoriels : Échap ou « Revenir » rend la page là où on l'avait laissée */
.video-voile { position: fixed; inset: 0; z-index: 1100; display: flex; flex-direction: column; background: #0B1226; }
.video-haut { flex: none; display: flex; align-items: center; gap: 16px; padding: 8px 14px; background: var(--marine-fonce); border-bottom: 2px solid var(--or); }
.video-titre { flex: 1; min-width: 0; color: var(--or-clair); font-size: 14px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-revenir { flex: none; padding: 5px 14px; border: 1px solid var(--or); border-radius: 14px; background: transparent; color: #E9DFC6; font: 13px var(--police); cursor: pointer; }
.video-revenir:hover, .video-revenir:focus-visible { background: var(--or); color: var(--marine-fonce); outline: none; }
.video-lecteur { flex: 1; min-height: 0; width: 100%; background: #000; }

.v6 { margin: 0 0 22px; padding: 10px 14px; border: 1px solid var(--bord); border-left: 4px solid var(--gris); border-radius: 0 8px 8px 0; background: var(--ivoire); color: var(--gris-fonce); font-size: 13px; }

/* tableaux */
.tableau { overflow-x: auto; margin: 0 0 18px; }
table { border-collapse: collapse; font-size: 13px; min-width: 60%; }
th { background: var(--marine); color: var(--blanc); text-align: left; font-weight: normal; padding: 7px 10px; }
td { padding: 6px 10px; border-bottom: 1px solid var(--bord); vertical-align: top; }
tr:nth-child(even) td { background: var(--ivoire); }

/* captures d'écran */
a.capture { display: inline-block; max-width: 100%; }
article img { max-width: 100%; height: auto; border: 1px solid var(--bord); border-radius: 4px; background: var(--blanc); vertical-align: middle; }

/* recherche */
#resultats ol { padding-left: 0; list-style: none; }
#resultats li { margin-bottom: 16px; }
#resultats .t { font-weight: bold; }
#resultats .x { color: var(--gris-fonce); font-size: 13px; }
#resultats mark { background: var(--or-pale); color: inherit; padding: 0 1px; }
#resultats .ancienne { font-size: 11px; color: var(--gris); margin-left: 6px; }

.pied { border-top: 3px solid var(--or); background: var(--marine-fonce); color: var(--bleu-texte); font-size: 12px; }
.pied .in { max-width: 1320px; margin: 0 auto; padding: 16px 20px; }
.pied a { color: var(--or-clair); }

/* téléphone et petite fenêtre : le sommaire devient un volet */
/* --- gabarits (28 nov. 2026) --- */
/* le texte garde une largeur de lecture ; captures et tableaux prennent toute la colonne */
article > p, article > ul, article > ol, article > blockquote, article > aside, article > h2, article > h3, article > h4, ol.legende { max-width: 46em; }
ol.legende { max-width: none; }
/* capture annotée : repères numérotés sur l'image, légende numérotée dessous */
figure.annotee { margin: 22px 0 26px; }
figure.annotee .cadre-img { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
figure.annotee img { width: 100%; height: auto; border: 1px solid var(--bord); border-radius: 6px; box-shadow: 0 2px 10px rgba(27,44,82,.12); }
.pin { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%;
  background: var(--or); color: var(--marine-fonce); border: 2px solid var(--blanc); box-shadow: 0 1px 4px rgba(0,0,0,.35);
  font: bold 11px/18px var(--police); text-align: center; line-height: 18px; pointer-events: none; }
figure.annotee figcaption { font-size: 12px; color: var(--gris); margin-top: 8px; line-height: 1.4; }
ol.legende { counter-reset: rep; list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; columns: 2; column-gap: 28px; }
ol.legende li { counter-increment: rep; position: relative; padding-left: 30px; margin-bottom: 7px; break-inside: avoid; -webkit-column-break-inside: avoid; line-height: 1.45; min-height: 22px; }
/* min-height : la pastille (20 px, à 1 px du haut) dépassait d'une ligne de 19 px, et Safari la coupait entre deux colonnes */
ol.legende li::before { content: counter(rep); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--or); color: var(--marine-fonce); font: bold 11px/20px var(--police); text-align: center; }
/* zoomeur : un clic agrandit l'image dans la page, un clic ou Échap la rend */
figure.annotee .cadre-img, article a.zoomable img, article img.zoomable { cursor: zoom-in; }
.zoom-voile { position: fixed; inset: 0; z-index: 1000; background: rgba(16, 24, 46, .84); opacity: 0; transition: opacity .25s ease; cursor: zoom-out; }
.zoom-voile.ouvert { opacity: 1; }
.zoom-objet { position: fixed; z-index: 1001; margin: 0; line-height: 0; transform-origin: 0 0; cursor: zoom-out; }
.zoom-objet img { display: block; width: 100%; height: 100%; border-radius: 6px; background: var(--blanc); box-shadow: 0 8px 40px rgba(0,0,0,.45); }
.zoom-objet .pin { width: 28px; height: 28px; font-size: 13px; line-height: 24px; }
.zoom-aide { position: fixed; z-index: 1002; left: 50%; bottom: 10px; transform: translateX(-50%); color: #E9DFC6; font-size: 12px; opacity: 0; transition: opacity .25s; pointer-events: none; }
.zoom-voile.ouvert ~ .zoom-aide { opacity: .8; }
@media (prefers-reduced-motion: reduce) { .zoom-voile, .zoom-objet { transition: none !important; } }
/* encadrés */
aside.encadre { margin: 20px 0; padding: 12px 18px 4px; border-radius: 8px; border: 1px solid var(--bord); border-left-width: 5px; background: var(--blanc); }
aside.encadre .titre-encadre { margin: 0 0 6px; font-weight: bold; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; }
aside.avant { border-left-color: var(--marine); background: var(--bleu-pale); }
aside.avant .titre-encadre { color: var(--marine); }
aside.attention { border-left-color: #B23A2E; background: #FBEDEB; }
aside.attention .titre-encadre { color: #8E2A20; }
aside.astuce, aside.savoir { border-left-color: var(--or); background: var(--or-pale); }
aside.astuce .titre-encadre, aside.savoir .titre-encadre { color: var(--or-fonce); }
aside.liste { border-left-color: #2E7D4F; background: #EEF6F0; }
aside.liste .titre-encadre { color: #1F5C39; }
aside.liste ul { list-style: none; padding-left: 0; }
aside.liste li { position: relative; padding-left: 26px; }
aside.liste li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 13px; height: 13px; border: 2px solid #2E7D4F; border-radius: 3px; background: var(--blanc); }
/* étapes d'un parcours */
article h3 { padding-top: 6px; border-top: 1px dashed var(--bord); }
article h2 + h3 { border-top: 0; }
/* accueil : tuiles et listes de parcours */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.tuile { background: var(--blanc); border: 1px solid var(--bord); border-top: 4px solid var(--or); border-radius: 8px; padding: 12px 16px; }
.tuile h3 { margin: 0 0 6px; border: 0; padding: 0; }
.tuile h3 a { text-decoration: none; }
.tuile p { font-size: 13px; color: var(--gris-fonce); margin: 0; }
.parcours ul { list-style: none; padding-left: 0; }
.parcours li { padding: 7px 0 7px 22px; border-bottom: 1px solid var(--bord); position: relative; }
.parcours li::before { content: "›"; position: absolute; left: 6px; color: var(--or-fonce); font-weight: bold; }
.parcours li em { color: var(--gris); font-size: 12px; }
@media (max-width: 900px) { ol.legende { columns: 1; } .pin { width: 18px; height: 18px; font-size: 9px; line-height: 14px; } }

@media (max-width: 900px) {
  .bandeau .in { flex-wrap: wrap; gap: 10px 14px; padding: 8px 16px; }
  .marque span { display: none; }
  .recherche { order: 3; flex-basis: 100%; max-width: none; }
  .menu-bouton { display: block; margin-left: auto; padding: 6px 14px; border: 1px solid var(--or); border-radius: 16px; background: transparent; color: var(--or-clair); font: 13px var(--police); }
  .cadre { display: block; }
  .menu { display: none; position: static; width: auto; max-height: none; padding: 12px 16px; background: var(--ivoire-clair); border-bottom: 1px solid var(--bord); }
  body.menu-ouvert .menu { display: block; }
  main { padding: 14px 16px 40px; }
  article { padding: 18px 16px; }
  h1 { font-size: 22px; }
}
@media print {
  .bandeau, .menu, .pied, .scene, .fil { display: none; }
  body, article { background: var(--blanc); border: 0; }
}

/* schéma des pages « Comprendre » : SVG en ligne, couleurs de la charte par les variables */
figure.schema { margin: 22px 0 26px; max-width: 720px; }
figure.schema svg { width: 100%; height: auto; display: block; background: var(--ivoire-clair); border: 1px solid var(--bord); border-radius: 6px; }
figure.schema svg text { font-family: var(--police); }
figure.schema figcaption { font-size: 12px; color: var(--gris); margin-top: 8px; line-height: 1.4; }

/* schéma directeur des pages à étapes (29 nov. 2026) */
nav.etapes { margin: 18px 0 28px; }
nav.etapes .titre-etapes { font-size: 12px; font-weight: bold; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); margin: 0 0 8px; }
nav.etapes ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; counter-reset: none; }
nav.etapes li { margin: 0; position: relative; }
nav.etapes a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--marine); background: var(--blanc); border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(27,44,82,.08); transition: transform .12s, box-shadow .12s, border-color .12s; }
nav.etapes a:hover, nav.etapes a:focus { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(27,44,82,.16); border-color: var(--or); }
nav.etapes img, nav.etapes .vide { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: var(--ivoire-clair); border-bottom: 1px solid var(--bord); }
nav.etapes .num { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--marine); color: #fff; font-size: 13px; font-weight: bold; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--or); }
nav.etapes .t { font-size: 13px; font-weight: bold; line-height: 1.3; padding: 8px 9px 2px; }
nav.etapes .geste { align-self: flex-start; margin: 4px 9px 9px; font-size: 11px; color: var(--marine); background: #F3E7C4; border-radius: 10px; padding: 1px 8px; }
article h3.etape { border-left: 4px solid var(--or); padding-left: 10px; scroll-margin-top: 80px; }
@media (max-width: 900px) { [id], article h3.etape { scroll-margin-top: 120px; } }   /* bandeau sur deux lignes : 103 px */
/* « En détail » replié : le lecteur pressé ne le voit pas, l'assistant le lit */
details.detail { margin: 16px 0 22px; border: 1px solid var(--bord); border-radius: 8px; background: var(--ivoire-clair); }
details.detail > summary { cursor: pointer; padding: 9px 14px; font-weight: bold; color: var(--marine); list-style: none; }
details.detail > summary::-webkit-details-marker { display: none; }
details.detail > summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--or); transition: transform .12s; }
details.detail[open] > summary::before { transform: rotate(90deg); }
details.detail .detail-corps { padding: 0 16px 6px; border-top: 1px solid var(--bord); }
figure.schema p.lecteur, .lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
