/* LireNet — présentation moderne, accessible et adaptative */
:root {
  color-scheme: light;
  --page: #e8ebed; --surface: #f5f4ef; --surface-alt: #e7ebea;
  --ink: #202b38; --muted: #536477; --heading: #153b63;
  --link: #075e9f; --link-visited: #60458b; --accent: #1769aa;
  --border: #cbd3d8; --shadow: 0 8px 28px rgba(22,48,74,.08);
  --note: #fff7e6; --note-border: #b7791f;
  --radius: 16px; --content: 82rem;
}
html[data-theme="sombre"] {
  color-scheme: dark;
  --page: #111923; --surface: #1b2734; --surface-alt: #263646;
  --ink: #f0f4f8; --muted: #c0ccd8; --heading: #d7eaff;
  --link: #8fcaff; --link-visited: #d0b4ff; --accent: #78bfff;
  --border: #425466; --shadow: 0 8px 28px rgba(0,0,0,.22);
  --note: #332b1c; --note-border: #e5ae52;
}
html[data-theme="clair"] {
  color-scheme: light;
  --page: #e8ebed; --surface: #f5f4ef; --surface-alt: #e7ebea;
  --ink: #202b38; --muted: #536477; --heading: #153b63;
  --link: #075e9f; --link-visited: #60458b; --accent: #1769aa;
  --border: #cbd3d8; --shadow: 0 8px 28px rgba(22,48,74,.08);
  --note: #fff7e6; --note-border: #b7791f;
}
html[data-theme="jaune"] {
  color-scheme: dark;
  --page: #000; --surface: #000; --surface-alt: #111;
  --ink: #ffeb00; --muted: #ffeb00; --heading: #ffeb00;
  --link: #fff36a; --link-visited: #ffdc65; --accent: #ffeb00;
  --border: #a99c00; --shadow: none; --note: #111; --note-border: #ffeb00;
}
html { scroll-behavior:smooth; scroll-padding-top:1.5rem; font-size:calc(18px * var(--taille, 1)); background:var(--page); }
body {
  max-width:var(--content); margin:0 auto; padding:0 clamp(.75rem,2.8vw,2.25rem) 3rem;
  color:var(--ink); background:var(--page);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:1rem; line-height:1.75; letter-spacing:.006em;
}
* { box-sizing:border-box; }
a { color:var(--link); text-decoration-thickness:.09em; text-underline-offset:.18em; overflow-wrap:anywhere; }
a:visited { color:var(--link-visited); }
/* Liens sur fond de couleur (bandeau d'annonce de l'accueil, style.css) : même couleur, visités ou non.
   Sans cela, a:visited ci-dessus l'emporte (même spécificité, feuille chargée après style.css) : un lien
   déjà ouvert, « Devenez testeur » par exemple, devient jaune sur le bandeau jaune. */
.annonce a, .annonce a:visited { color:var(--accent-texte); }
a:hover { text-decoration-thickness:.15em; }
:focus-visible { outline:3px solid #e5a323!important; outline-offset:4px!important; border-radius:4px; }
.evitement { position:absolute; z-index:1000; top:-6rem; left:1rem; padding:.7rem 1rem; background:var(--surface); color:var(--ink); border:2px solid var(--accent); border-radius:8px; }
.evitement:focus { top:1rem; }
header {
  margin:1rem 0 1.25rem; padding:clamp(1rem,3vw,2rem);
  color:#fff; background:linear-gradient(125deg,#123453,#1769aa);
  border-radius:var(--radius); box-shadow:var(--shadow);
}
.entete { max-width:100%; }
.marque { display:inline-flex; align-items:center; gap:.8rem; color:#fff!important; font-size:1.7rem; font-weight:800; text-decoration:none; letter-spacing:-.03em; }
.marque img { width:64px; height:64px; object-fit:contain; }
header nav { margin:1.1rem 0; }
header nav ul { display:flex; flex-wrap:wrap; gap:.4rem .55rem; list-style:none; padding:0; margin:0; }
header nav a { display:inline-block; padding:.42rem .7rem; color:#fff!important; border:1px solid rgba(255,255,255,.35); border-radius:999px; text-decoration:none; font-size:.9rem; }
header nav a:hover, header nav a[aria-current="page"] { background:rgba(255,255,255,.18); border-color:#fff; }
.outils { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-top:1rem; }
.outils button {
  min-height:2.6rem; padding:.45rem .8rem; color:#123453; background:#fff;
  border:1px solid rgba(255,255,255,.75); border-radius:9px; font:inherit; font-size:.9rem; font-weight:650; cursor:pointer;
}
.outils button[aria-pressed="true"] { color:#fff; background:#17476f; outline:2px solid #fff; outline-offset:1px; }
main { padding:clamp(1rem,3vw,2.4rem); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); }
.contenu.manuel { max-width:76rem; margin:0 auto; }
.ouverture { padding:clamp(1rem,2.5vw,2rem); margin:0 0 2rem; background:var(--surface-alt); border:1px solid var(--border); border-radius:14px; }
h1,h2,h3,h4,h5,h6 { color:var(--heading); line-height:1.25; letter-spacing:-.02em; scroll-margin-top:1rem; text-wrap:balance; }
h1 { margin:.1rem 0 1rem; font-size:clamp(2rem,4.5vw,3.1rem); font-weight:850; }
h2 { margin:3.2rem 0 1.1rem; padding:0 0 .65rem; font-size:clamp(1.65rem,3vw,2.15rem); border-bottom:3px solid var(--accent); }
h3 { margin:2.25rem 0 .8rem; font-size:clamp(1.28rem,2.2vw,1.55rem); }
h4 { margin:1.7rem 0 .6rem; font-size:1.13rem; }
p { margin:0 0 1.1rem; }
.chapeau { max-width:68rem; font-size:1.12rem; color:var(--muted); }
.note { padding:1rem 1.15rem; margin:1.2rem 0; background:var(--note); border-left:5px solid var(--note-border); border-radius:0 10px 10px 0; }
.ouverture nav[aria-label="Chapitres"] { margin-top:1.4rem; padding:1rem 1.1rem; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.sommaire-manuel { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap:.35rem .9rem; margin:.3rem 0; padding-left:1.3rem; }
.sommaire-manuel li { padding:.15rem 0; }
.sommaire-manuel a { font-weight:650; }
blockquote { margin:1.2rem 0; padding:1rem 1.2rem; color:var(--ink); background:var(--surface-alt); border-left:5px solid var(--accent); border-radius:0 10px 10px 0; }
blockquote p:last-child { margin-bottom:0; }
ul,ol { padding-left:1.6rem; margin:.65rem 0 1.2rem; }
li { margin:.25rem 0; }
table { width:100%; margin:1.2rem 0 1.8rem; border-collapse:separate; border-spacing:0; border:1px solid var(--border); border-radius:11px; overflow:hidden; font-size:.94rem; line-height:1.55; }
th,td { padding:.75rem .85rem; text-align:left; vertical-align:top; border-bottom:1px solid var(--border); }
thead th { color:var(--heading); background:var(--surface-alt); font-weight:750; }
tbody tr:nth-child(even) { background:color-mix(in srgb,var(--surface-alt) 52%,var(--surface)); }
tbody tr:last-child td { border-bottom:0; }
td p,th p { margin:0; }
img,video,svg { max-width:100%; height:auto; }
p > img { display:block; margin:1.2rem auto; border-radius:10px; border:1px solid var(--border); }
img.large { box-shadow:var(--shadow); }
p.photo-seule img { max-height:75vh; object-fit:contain; }
em { color:var(--muted); }
code { padding:.12rem .35rem; background:var(--surface-alt); border-radius:5px; overflow-wrap:anywhere; }
footer { margin:1.25rem 0 0; padding:1.4rem clamp(1rem,3vw,2rem); color:var(--muted); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
footer ul { display:flex; flex-wrap:wrap; gap:.4rem 1.4rem; padding-left:1.2rem; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
[id] { scroll-margin-top:1.25rem; }
@media(max-width:700px) {
 html { font-size:calc(17px * var(--taille, 1)); }
 body { padding-inline:.55rem; line-height:1.7; }
 header { margin-top:.55rem; padding:1rem; }
 .marque img { width:50px; height:50px; }
 header nav ul { gap:.35rem; }
 header nav a { padding:.38rem .58rem; font-size:.85rem; }
 .outils button { flex:1 1 auto; }
 main { padding:.9rem; }
 .ouverture { padding:.9rem; }
 table { display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
 th,td { min-width:8rem; padding:.65rem .7rem; }
 h2 { margin-top:2.5rem; }
}
@media(prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto; }
 *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
@media print {
 html,body { background:#fff!important; color:#000!important; font-size:11pt; }
 body { max-width:none; padding:0; }
 header,main,.ouverture,footer,blockquote { color:#000!important; background:#fff!important; box-shadow:none!important; }
 header nav,.outils,.evitement { display:none!important; }
 main,footer { border:0!important; padding:0; }
 h1,h2,h3,h4 { color:#000!important; break-after:avoid; }
 a { color:#000!important; text-decoration:none; }
 table,blockquote,img { break-inside:avoid; }
}
