/* QasbaGuard — site vitrine
   Concept : la kasbah de nuit. Fond nuit, pisé ocre, lumière d'or des lanternes, jade des
   remparts. Motif signature : la ligne de créneaux qui sépare les sections. */
/* Polices servies par le site (licence SIL OFL : voir assets/fonts/LICENCES.txt) */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/reem-kufi-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/reem-kufi-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/reem-kufi-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/reem-kufi-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/reem-kufi-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Reem Kufi"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/reem-kufi-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/noto-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/noto-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Tifinagh"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/noto-sans-tifinagh-tifinagh-400-normal.woff2") format("woff2"); unicode-range: U+2D30-2D7F; }
:root {
  --night: #0b161c;
  --night-2: #10212a;
  --night-3: #163039;
  --line: #24414b;
  --sand: #ebe1cd;
  --sand-2: #b9ae98;
  --mute: #8a9599;
  --ochre: #c47846;
  --ochre-2: #de9663;
  --jade: #00b894;
  --jade-2: #5fe0c0;
  --gold: #e8b84d;
  --red: #eb6b5e;
  --f-display: "Reem Kufi", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1120px;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--night); color: var(--sand);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--sand); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
code, .mono { font-family: var(--f-mono); font-size: .88em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.eyebrow { font: 600 .78rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--jade-2); }
.lead { color: var(--sand-2); font-size: 1.08rem; max-width: 60ch; }
.muted { color: var(--mute); }

/* ---------- en-tête ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--night); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sand); font: 600 1.25rem/1 var(--f-display); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--sand-2); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--sand); }
.nav .btn { padding: 8px 14px; font-size: .9rem; }
.nav .btn-gold, .nav .btn-gold:hover { color: #1d1405; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; font: 600 1rem/1 var(--f-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #1d1405; }
.btn-gold:hover { background: #f2c868; color: #1d1405; }
.btn-ghost { border-color: var(--line); color: var(--sand); background: transparent; }
.btn-ghost:hover { border-color: var(--sand-2); color: var(--sand); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- séparateur à créneaux (motif signature) ---------- */
.crenel { height: 14px; background:
  linear-gradient(var(--night-2), var(--night-2)) bottom / 100% 6px no-repeat,
  repeating-linear-gradient(90deg, var(--night-2) 0 18px, transparent 18px 30px) top / 100% 8px no-repeat; }
.crenel.flip { transform: scaleY(-1); }
.band { background: var(--night-2); }

/* ---------- hero ---------- */
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 64px 56px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { margin-top: 20px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--mute); font-size: .88rem; }
.hero .meta > span::before { content: "◆"; color: var(--ochre); font-size: .6em; margin-inline-end: 8px; vertical-align: 2px; }
.sky { position: relative; aspect-ratio: 48 / 34; width: 100%; max-width: 100%; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 70% 15%, #183846 0%, var(--night-2) 55%, var(--night) 100%); border: 1px solid var(--line); }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.counter { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .92rem; color: var(--sand-2); }
.counter b { color: var(--sand); font-variant-numeric: tabular-nums; }
.counter::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 4px color-mix(in srgb, var(--jade) 25%, transparent); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 40px; } .sky { order: -1; } }

/* ---------- sections ---------- */
section { padding-block: 80px; }
.sec-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }

/* ce que l'antivirus ne voit pas */
.gaps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gap { background: var(--night); padding: 26px 24px; display: grid; gap: 10px; align-content: start; }
.gap .ico { width: 34px; height: 34px; color: var(--ochre-2); }
.gap .tag { font: 600 .72rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.gap p { color: var(--sand-2); font-size: .97rem; }
@media (max-width: 900px) { .gaps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gaps { grid-template-columns: 1fr; } }

/* étapes */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.step { display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: s; content: counter(s); font: 600 1.05rem/1 var(--f-display); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ochre); color: var(--ochre-2); }
.step p { color: var(--sand-2); }
.shot { margin-top: 44px; border-radius: 12px; box-shadow: 0 30px 80px -30px #000c; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* profils */
.prof { display: grid; grid-template-columns: .95fr 1.05fr; gap: 40px; align-items: start; }
.prof .stage { position: sticky; top: 90px; }
.prof .sky { aspect-ratio: 48 / 30; }
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; background: var(--night); border: 1px solid var(--line); border-radius: 16px; }
.levels button { appearance: none; border: 0; background: transparent; color: var(--sand-2); padding: 12px 6px 10px; border-radius: 11px; cursor: pointer; display: grid; gap: 4px; justify-items: center; font: 500 .9rem/1.1 var(--f-body); }
.levels button b { font: 600 1.35rem/1 var(--f-display); color: var(--sand); }
.levels button:hover { background: var(--night-3); }
.levels button[aria-selected="true"] { background: var(--ochre); color: #22120a; }
.levels button[aria-selected="true"] b { color: #22120a; }
.pdesc { margin-top: 26px; display: grid; gap: 20px; }
.pdesc h3 { font-size: 1.7rem; }
.pdesc .tagline { color: var(--gold); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--night-3); color: var(--sand); font-size: .88rem; border: 1px solid var(--line); }
.changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.changes li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--sand); }
.changes li.inh { grid-template-columns: 1fr; color: var(--sand-2); }
.changes li.inh::before { display: none; }
.changes li::before { content: ""; width: 12px; height: 12px; margin-top: 7px; background: var(--jade); clip-path: polygon(0 30%, 30% 30%, 30% 0, 70% 0, 70% 30%, 100% 30%, 100% 100%, 0 100%); }
.meters { display: grid; gap: 12px; }
.meter { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; font-size: .92rem; color: var(--sand-2); }
.meter .bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.meter .bars i { height: 10px; border-radius: 3px; background: var(--night-3); border: 1px solid var(--line); }
.meter.prot .bars i.on { background: var(--jade); border-color: var(--jade); }
.meter.cost .bars i.on { background: var(--ochre); border-color: var(--ochre); }
.warn { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--sand); font-size: .94rem; }
.quiz { margin-top: 34px; padding: 22px; border-radius: var(--r); border: 1px dashed var(--line); display: grid; gap: 16px; }
.quiz .q { display: grid; gap: 8px; }
.quiz .q > span { font-weight: 600; }
.quiz .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz .opts button { appearance: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--sand-2); font: 500 .9rem/1.2 var(--f-body); }
.quiz .opts button:hover { border-color: var(--sand-2); color: var(--sand); }
.quiz .opts button[aria-pressed="true"] { background: var(--sand); color: var(--night); border-color: var(--sand); }
.quiz .res { color: var(--gold); font-weight: 600; min-height: 1.6em; }
@media (max-width: 900px) { .prof { grid-template-columns: 1fr; } .prof .stage { position: static; } }
@media (max-width: 460px) { .meter { grid-template-columns: 1fr; gap: 6px; } .levels button { font-size: .78rem; } }

/* antivirus */
.av { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.av ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.av li { font: 500 .9rem/1 var(--f-mono); padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--sand-2); }
@media (max-width: 820px) { .av { grid-template-columns: 1fr; } }

/* téléchargement */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--night); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.card.reco { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.card .badge { justify-self: start; font: 600 .72rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--gold); color: #1d1405; }
.card .badge.alt { background: var(--night-3); color: var(--sand-2); }
.card ul { margin: 0; padding-inline-start: 18px; color: var(--sand-2); display: grid; gap: 4px; }
.card .file { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mute); font-size: .86rem; }
.hash { display: flex; gap: 8px; align-items: center; min-width: 0; }
.hash code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 10px; border-radius: 8px; background: var(--night-2); color: var(--sand-2); font-size: .74rem; }
.hash button { appearance: none; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--sand-2); border-radius: 8px; padding: 7px 10px; font: 500 .8rem/1 var(--f-body); }
.hash button:hover { color: var(--sand); border-color: var(--sand-2); }
.dl-foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--mute); font-size: .92rem; }
@media (max-width: 760px) { .dl { grid-template-columns: 1fr; } }

/* dons */
.don { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; padding: 36px; border-radius: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--ochre) 22%, var(--night-2)), var(--night-2) 70%); border: 1px solid var(--line); }
.don .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
@media (max-width: 760px) { .don { grid-template-columns: 1fr; padding: 26px; } .don .acts { justify-content: flex-start; } }

/* faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; background: var(--night); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font: 500 1.3rem/1 var(--f-body); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 18px; color: var(--sand-2); }

/* pied */
.foot { border-top: 1px solid var(--line); padding-block: 40px 50px; color: var(--mute); font-size: .9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--sand-2); text-decoration: none; }
.foot a:hover { color: var(--sand); }

/* ---------- pages intérieures (guide, versions, légal) ---------- */
.page-head { padding-block: 56px 30px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.page-head .lead { margin-top: 14px; }
.doc > * { min-width: 0; }
.prose code { overflow-wrap: anywhere; }
.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 50px; padding-bottom: 80px; }
.toc { position: sticky; top: 88px; align-self: start; display: grid; gap: 4px; font-size: .93rem; }
.toc a { color: var(--sand-2); text-decoration: none; padding: 6px 10px; border-inline-start: 2px solid var(--line); }
.toc a:hover { color: var(--sand); border-inline-start-color: var(--gold); }
.prose { display: grid; gap: 18px; max-width: 760px; }
.prose h2 { font-size: 1.75rem; margin-top: 34px; scroll-margin-top: 90px; }
.prose h2 .n { color: var(--ochre-2); margin-inline-end: 10px; }
.prose h3 { margin-top: 10px; }
.prose p, .prose li { color: var(--sand-2); }
.prose strong { color: var(--sand); }
.prose ol, .prose ul { padding-inline-start: 22px; display: grid; gap: 8px; margin: 0; }
.prose figure { margin: 6px 0 10px; display: grid; gap: 10px; }
.prose figure img { border-radius: 10px; border: 1px solid var(--line); }
.prose figcaption { color: var(--mute); font-size: .88rem; }
.note { padding: 14px 18px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); color: var(--sand-2); }
.note b { color: var(--gold); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.tbl th, .tbl td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--sand); font-weight: 600; background: var(--night-2); }
.tbl td { color: var(--sand-2); }
.tbl tr:last-child td { border-bottom: 0; }
kbd { font: 600 .82em/1 var(--f-mono); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; color: var(--sand); background: var(--night-2); }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .toc { position: static; grid-auto-flow: column; overflow-x: auto; } .toc a { white-space: nowrap; border-inline-start: 0; border-bottom: 2px solid var(--line); } }

/* versions */
.rel { display: grid; gap: 18px; padding-bottom: 80px; max-width: 860px; }
.rel article { border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 14px; background: var(--night); }
.rel article.latest { border-color: var(--gold); }
.rel .rh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.rel .rh h2 { font-size: 1.5rem; }
.rel ul { margin: 0; padding-inline-start: 20px; color: var(--sand-2); display: grid; gap: 4px; }
.rel .files { display: grid; gap: 10px; }
.rel .frow { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
@media (max-width: 560px) { .rel .frow { grid-template-columns: 1fr; } }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--night); display: grid; gap: 6px; }
.kpi b { font: 600 2rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--mute); font-size: .86rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--night); min-width: 0; }
.panel h3 { font-size: 1rem; margin-bottom: 12px; font-family: var(--f-body); }
.rows { display: grid; gap: 6px; font-size: .9rem; }
.rows div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; position: relative; padding: 4px 8px; }
.rows div i { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--jade) 18%, transparent); border-radius: 6px; }
.rows div span, .rows div b { position: relative; }
.rows div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sand-2); }
.rows div b { font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 180px; }
@media (max-width: 820px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid2 { grid-template-columns: 1fr; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--sand); color: var(--night); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; z-index: 40; max-width: calc(100% - 32px); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row input, .form-row select { padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--night-2); color: var(--sand); font: 400 1rem var(--f-body); min-width: 0; }

/* ---------- langues ---------- */
[lang="ar"] { --f-body: "Noto Sans Arabic", "Instrument Sans", "Segoe UI", Tahoma, sans-serif; --f-display: "Reem Kufi", "Noto Sans Arabic", "Segoe UI", sans-serif; font-family: var(--f-body); }
[lang="zgh"] { --f-body: "Noto Sans Tifinagh", Ebrima, "Instrument Sans", "Segoe UI", sans-serif; --f-display: "Noto Sans Tifinagh", Ebrima, "Reem Kufi", sans-serif; font-family: var(--f-body); }
[lang="fr"], [lang="en"] { --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif; --f-display: "Reem Kufi", "Trebuchet MS", system-ui, sans-serif; font-family: var(--f-body); }
:lang(ar), :lang(zgh) { letter-spacing: 0 !important; }
:lang(ar) { text-transform: none !important; }
html[lang="ar"] body, main[lang="ar"], .secours[lang="ar"] { line-height: 1.85; }
html[lang="zgh"] body { line-height: 1.75; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.35; }
:lang(ar) h3 { font-family: "Noto Sans Arabic", "Instrument Sans", sans-serif; }   /* Reem Kufi perd sa lisibilite en petit */
code, kbd, .mono { direction: ltr; unicode-bidi: isolate; }
.secours.long { display: block; text-align: start; }
.brand img { flex: none; }
.note-ia { margin: 0; padding: 10px 20px 18px; text-align: center; font-size: .78rem; color: var(--mute); }
.foot-nom { color: var(--sand); font-family: var(--f-display); font-size: 1.1rem; }
.dl-foot + .note { margin-top: 16px; }
.bandeau { margin: 0; padding: 8px 20px; text-align: center; font-size: .88rem; color: var(--sand); background: color-mix(in srgb, var(--gold) 16%, var(--night-2)); border-bottom: 1px solid var(--line); }

.lang { position: relative; flex: none; }
.lang summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--sand-2); font-size: .9rem; padding: 6px 4px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--sand); }
.lang summary svg { width: 18px; height: 18px; flex: none; }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 25; display: grid; gap: 2px; min-width: 160px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--night-2); box-shadow: 0 14px 40px -12px #000a; }
.lang-menu a { padding: 8px 12px; border-radius: 8px; color: var(--sand-2); text-decoration: none; font-size: .95rem; text-align: start; }
.lang-menu a:hover { background: var(--night-3); color: var(--sand); }
.lang-menu a[aria-current] { color: var(--gold); }

.langbar { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 35; max-width: 640px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--night-3); box-shadow: 0 14px 40px -12px #000c; font-size: .92rem; color: var(--sand-2); }
.langbar[hidden] { display: none; }
.langbar-liens { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.langbar a { color: var(--sand); text-underline-offset: 3px; }
.langbar a[aria-current] { color: var(--gold); }
.langbar button { margin-inline-start: auto; appearance: none; border: 0; background: transparent; color: var(--sand-2); font-size: 1.3rem; line-height: 1; padding: 2px 6px; cursor: pointer; }
.langbar button:hover { color: var(--sand); }
@media (max-width: 720px) { .top .wrap { gap: 12px; } }
@media (max-width: 460px) { .lang summary span { display: none; } .brand { font-size: 1.1rem; } }

/* ---------- communaute ---------- */
.formulaire { display: grid; gap: 18px; max-width: 680px; }
.formulaire label, .champ { display: grid; gap: 6px; font-weight: 600; }
.formulaire .muted, .champ .muted { font-weight: 400; font-size: .86rem; }
.formulaire input, .formulaire select, .formulaire textarea, .adm-champ { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--night-2); color: var(--sand); font: 400 1rem var(--f-body); }
.formulaire textarea { resize: vertical; min-height: 120px; }
.formulaire input[type=file] { padding: 8px; }
.formulaire .btn { justify-self: start; }
.formulaire button:disabled { opacity: .6; cursor: wait; }
.piege { position: absolute; inset-inline-start: -9999px; height: 1px; overflow: hidden; }
.apercu { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.form-msg { padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.form-msg:not(.ok):not(.ko) { color: var(--sand-2); background: var(--night-2); }
.form-msg.ok { background: color-mix(in srgb, var(--jade) 14%, transparent); color: var(--jade-2); }
.form-msg.ko { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--sand); }
.avis-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.avis { margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--night); display: grid; gap: 8px; overflow-wrap: anywhere; }
.avis p { white-space: pre-wrap; color: var(--sand); }
.avis footer { font-size: .86rem; }
.don-adr { flex: 1 1 100%; display: grid; gap: 6px; font-size: .92rem; min-width: 0; }
.adm-onglets { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adm-onglets button { font-size: .95rem; grid-auto-flow: column; justify-content: center; }
.adm-onglets button b { font: 600 .95rem/1 var(--f-body); }
.adm-liste { display: grid; gap: 12px; margin-top: 16px; }
.adm-liste audio, .adm-liste img { max-width: 100%; }
@media (max-width: 760px) { .avis-grille { grid-template-columns: 1fr; } }
