:root {
  --bg: #fcfbf8;
  --panel: #ffffff;
  --fg: #16181d;
  --muted: #5d6270;
  --rule: #e0ddd4;
  --navy: #123a6b;
  --navy-deep: #0d2b50;
  --amber: #d98518;
  --amber-soft: #f0a83a;
  --link: #8a4a12;
  --max: 48rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116;
    --panel: #161a21;
    --fg: #e9e7e1;
    --muted: #9aa0ad;
    --rule: #2a2f38;
    --navy: #2b5c99;
    --navy-deep: #0d2b50;
    --amber: #f0a83a;
    --amber-soft: #f7c06a;
    --link: #f0a83a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.sans {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Bandeau de tête ---------- */

header.site {
  background: var(--navy-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}

header.site::after {
  content: "";
  position: absolute;
  top: -40px; right: -30px;
  width: 200px; height: 160px;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 9px,
      rgba(240,168,58,0.30) 9px 11px);
  transform: rotate(0deg);
  pointer-events: none;
}

header.site .wrap {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  position: relative;
  z-index: 1;
}

header.site a.brand {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border-left: 3px solid var(--amber-soft);
  padding-left: 0.65rem;
}

header.site a.brand:hover { color: var(--amber-soft); }

header.site nav {
  margin-left: auto;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

header.site nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  margin-left: 1.1rem;
}

header.site nav a:hover { color: var(--amber-soft); }

/* ---------- Titres ---------- */

main.wrap { padding-top: 4.25rem; }

@media (max-width: 34rem) { main.wrap { padding-top: 3.25rem; } }

h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.85rem);
  line-height: 1.12;
  margin: 0 0 0.7rem;
  letter-spacing: -0.015em;
}

h1 .accent { color: var(--amber); }

h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}

h3 { font-size: 1.3rem; margin: 0.2rem 0 0.45rem; line-height: 1.25; }

.kicker {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.85rem;
}

.byline { font-size: 1.08rem; margin: 0 0 0.3rem; }

.meta {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.lede { font-size: 1.16rem; line-height: 1.6; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Bloc d'ouverture ---------- */

.hero { margin-bottom: 2.5rem; }

.hero .role {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.93rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.rule-accent {
  width: 64px; height: 3px;
  background: var(--amber);
  margin: 0 0 1.6rem;
}

/* ---------- Cartes ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.35rem 1.5rem;
  margin: 0 0 1.1rem;
}

.card.featured {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 1.35rem;
  align-items: start;
}

.card.featured img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
  display: block;
}

.card p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.98rem; }
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { color: var(--link); }

@media (max-width: 30rem) {
  .card.featured { grid-template-columns: 1fr; }
  .card.featured img { max-width: 150px; }
}

/* ---------- Rayon de publications (accueil) ---------- */

.section-lede {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.8rem;
  max-width: 44rem;
}
.section-lede strong { color: var(--fg); font-weight: 600; }

/* ---------- Collection : sommaire des numéros ---------- */

.coll-head {
  margin: 0 0 0.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--rule);
}
.coll-head .kicker { margin: 0; }
.coll-head h3 { margin: 0.25rem 0 0; font-size: 1.5rem; letter-spacing: -0.01em; }
.coll-head h3 a { color: var(--fg); text-decoration: none; }
.coll-head h3 a:hover { color: var(--link); }
.coll-note {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.numeros { list-style: none; margin: 0; padding: 0; }

.numero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.numero:last-child { border-bottom: 0; padding-bottom: 1.6rem; }

.numero .cover { display: block; }
.numero .cover img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(13, 43, 80, 0.10), 0 8px 22px rgba(13, 43, 80, 0.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.numero .cover:hover img {
  transform: translateY(-3px);
  box-shadow: 0 2px 5px rgba(13, 43, 80, 0.14), 0 14px 32px rgba(13, 43, 80, 0.12);
}

.numero .kicker { margin: 0 0 0.6rem; }
.numero h3 { font-size: 1.34rem; line-height: 1.34; margin: 0 0 0.75rem; }
.numero h3 a { color: var(--fg); text-decoration: none; }
.numero h3 a:hover { color: var(--link); }
.numero p.sum { margin: 0 0 1.1rem; color: var(--muted); font-size: 1rem; line-height: 1.68; }
.numero p.facts {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 0.85rem;
  margin: 0 0 1.15rem;
  line-height: 1.7;
}
.numero p.go { margin: 0; }

.tag-neuf {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  margin-inline-end: 0.65rem;   /* côté logique : à droite en français, à gauche en arabe */
  vertical-align: 0.05em;
}
[dir="rtl"] .tag-neuf { letter-spacing: 0; font-size: 0.74rem; padding: 0.18rem 0.65rem; }

.coll-more {
  margin: 0 0 2.6rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--rule);
  max-width: none;          /* le filet court sur toute la largeur, comme celui du titre */
}
.coll-link {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}
.coll-link::after { content: " \2192"; }
.coll-link:hover { text-decoration: underline; }

@media (max-width: 40rem) {
  .numero { grid-template-columns: 116px minmax(0, 1fr); gap: 1.4rem; }
  .numero h3 { font-size: 1.2rem; }
  .numero p.sum { font-size: 0.97rem; }
}

@media (max-width: 26rem) {
  .numero { grid-template-columns: 1fr; gap: 1.2rem; }
  .numero .cover img { max-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .numero .cover img { transition: none; }
  .numero .cover:hover img { transform: none; }
}

/* ---------- Bloc « Lire aussi » ---------- */

.issue.also { grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: start; }
.issue.also h3 { font-size: 1.24rem; margin-bottom: 0.45rem; }
.issue.also .summary { font-size: 0.97rem; color: var(--muted); }

@media (max-width: 34rem) {
  .issue.also { grid-template-columns: 1fr; }
  .issue.also img { max-width: 130px; }
}

/* ---------- Tableau de doctrine (Cahier n° 6) ---------- */

table.doctrines {
  border-collapse: collapse;
  width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  margin: 0.3rem 0;
}
table.doctrines th {
  text-align: left;
  border-bottom: 2px solid var(--amber);
  padding: 0.3rem 0.5rem;
}
table.doctrines td {
  border-bottom: 1px solid var(--rule);
  padding: 0.42rem 0.5rem;
  vertical-align: top;
}
table.doctrines td:first-child { color: var(--muted); font-weight: 600; width: 24%; }

/* ---------- Interroger une IA ---------- */

.ask-ai {
  margin: 2.6rem 0 0;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--amber-soft);
  border-radius: 5px;
  background: var(--panel);
}

.ask-ai .label {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.ask-ai .btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.ask-ai .btns a {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.42rem 1rem;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.ask-ai .btns a:hover {
  border-color: var(--amber);
  color: var(--link);
  background: var(--panel);
}

.ask-ai .note {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media print { .ask-ai, .issue.also { display: none; } }

/* ---------- Liens d'identité ---------- */

ul.identity {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0.55rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

ul.identity li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

ul.identity .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }

ul.identity.domains { gap: 0; }

ul.identity.domains li {
  grid-template-columns: 10.5rem 1fr;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}

ul.identity.domains li:first-child { padding-top: 0.35rem; }
ul.identity.domains li:last-child { border-bottom: 0; }

ul.identity.domains .label {
  padding-top: 0.15rem;
  padding-right: 0.75rem;
  color: var(--amber);
  font-weight: 600;
}

ul.identity.domains span:last-child { line-height: 1.58; }

/* Disposition empilée : le libellé devient un intertitre, avec sa respiration */
@media (max-width: 40rem) {
  ul.identity.domains li {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1.15rem 0;
  }
  ul.identity.domains .label {
    display: block;
    margin-bottom: 0.72rem;
    padding: 0;
    font-size: 0.78rem;
  }
}

@media (max-width: 30rem) {
  ul.identity li { grid-template-columns: 1fr; gap: 0; margin-bottom: 0.4rem; }
}

/* ---------- Téléchargement ---------- */

.pdf-link {
  display: inline-block;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--navy);
  padding: 0.75rem 1.3rem;
  border-radius: 4px;
  margin: 0.4rem 0 0.4rem;
  border-bottom: 3px solid var(--amber);
}

.pdf-link:hover { background: var(--navy-deep); }

.pdf-note {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem; color: var(--muted);
}

/* ---------- Citation et notice ---------- */

.cite {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  padding: 1.05rem 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

dl.biblio {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem;
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
}

dl.biblio dt { color: var(--muted); }
dl.biblio dd { margin: 0; }

@media (max-width: 34rem) {
  dl.biblio { grid-template-columns: 1fr; gap: 0; }
  dl.biblio dd { margin-bottom: 0.65rem; }
}

ul.issues { list-style: none; padding: 0; margin: 0; }

/* ---------- Bloc de définition ---------- */

.definition {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  border-radius: 4px;
  padding: 1.5rem 1.6rem 1.35rem;
}

.definition .term {
  font-size: 1.32rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}

.definition .pron {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.95rem;
  font-style: italic;
}

.definition p { margin: 0 0 0.9rem; }
.definition p:last-child { margin-bottom: 0; }

/* ---------- Nameplate de la collection ---------- */

.nameplate {
  border-top: 4px solid var(--navy-deep);
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0 1.5rem;
  margin-bottom: 2.75rem;
}

.nameplate h1 { margin-bottom: 0.45rem; }

.nameplate .sub {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.nameplate .stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nameplate .stamp b { color: var(--fg); font-weight: 600; letter-spacing: 0.04em; }

/* ---------- Numéro mis en avant ---------- */

.issue {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.9rem;
  align-items: start;
  padding: 0.4rem 0 0.2rem;
}

.issue img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: transform .18s ease;
}

.issue a:hover img { transform: translateY(-2px); }

.issue h3 { font-size: 1.55rem; margin-bottom: 0.6rem; }
.issue h3 a { color: var(--fg); text-decoration: none; }
.issue h3 a:hover { color: var(--link); }
.issue .summary { margin: 0 0 1rem; }

.issue .facts {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 2px solid var(--rule);
  padding-left: 0.85rem;
  margin: 0 0 1.1rem;
}

@media (max-width: 34rem) {
  .issue { grid-template-columns: 1fr; gap: 1.2rem; }
  .issue img { max-width: 160px; }
}

/* ---------- Fil d'Ariane ---------- */

nav.breadcrumb {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1.6rem;
  letter-spacing: 0.02em;
}

nav.breadcrumb a { color: var(--muted); text-decoration: none; }
nav.breadcrumb a:hover { color: var(--link); text-decoration: underline; }
nav.breadcrumb span.sep { opacity: 0.5; margin: 0 0.45rem; }
nav.breadcrumb [aria-current] { color: var(--fg); }

/* ---------- Pied ---------- */

footer.site {
  border-top: 4px solid var(--navy-deep);
  background: var(--panel);
  margin-top: 5rem;
  padding: 2.4rem 0 3rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  color: var(--muted);
}

footer.site .cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.1rem;
}

footer.site h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.75rem;
  font-family: inherit;
}

footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 0.4rem; line-height: 1.45; }
footer.site a { color: var(--fg); text-decoration: none; }
footer.site a:hover { color: var(--link); text-decoration: underline; }

footer.site .colophon {
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
  font-size: 0.8rem;
  line-height: 1.6;
}

footer.site .colophon p { margin: 0.3rem 0; }

@media (max-width: 34rem) {
  footer.site .cols { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ---------- Corps d'article ---------- */

article, main p { max-width: 42rem; }

ol.sources {
  font-size: 0.93rem;
  line-height: 1.6;
  padding-left: 1.3rem;
  color: var(--muted);
}

ol.sources li { margin-bottom: 0.7rem; }
ol.sources em, ol.sources i { color: var(--fg); }

/* ---------- Format long : page d'article ---------- */

body.article .wrap { max-width: 54rem; }

body.article main.wrap > p,
body.article main.wrap > h2,
body.article .toc,
body.article ol.sources,
body.article .cite { max-width: 40rem; }

body.article main.wrap > p {
  font-size: 1.11rem;
  line-height: 1.75;
  margin: 0 0 1.35rem;
}

body.article .lede {
  font-size: 1.3rem;
  line-height: 1.55;
  margin-bottom: 2.2rem;
}

body.article main.wrap > h2 {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--fg);
  border-bottom: 0;
  margin: 3.2rem 0 1rem;
  padding: 0 0 0 0.9rem;
  border-left: 4px solid var(--amber);
  line-height: 1.25;
}

/* Citation de contrat mise en exergue */
body.article main.wrap > p em {
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.93em;
  background: linear-gradient(transparent 62%, rgba(240,168,58,0.28) 62%);
  padding: 0 0.1em;
}

body.article main.wrap > p em i,
body.article main.wrap > p i { font-family: inherit; background: none; font-style: italic; }

/* ---------- Sommaire ---------- */

.toc {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--navy);
  border-radius: 4px;
  padding: 1.1rem 1.4rem 1.2rem;
  margin: 0 0 2.6rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.toc p.toc-title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.38rem; line-height: 1.45; }
.toc a { color: var(--fg); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Sources ---------- */

body.article ol.sources { font-size: 0.9rem; line-height: 1.62; }
body.article ol.sources li { margin-bottom: 0.85rem; }

@media (max-width: 40rem) {
  body.article main.wrap > p { font-size: 1.05rem; }
  body.article .lede { font-size: 1.16rem; }
  body.article main.wrap > h2 { font-size: 1.24rem; margin-top: 2.5rem; }
}

/* ---------- Impression et génération PDF ---------- */

@media print {
  header.site, footer.site, nav.breadcrumb, .toc { display: none !important; }
  body { background: #fff; color: #111; font-size: 11.5pt; line-height: 1.5; }
  main.wrap, body.article .wrap { max-width: 100%; padding: 0; }
  body.article main.wrap { padding-top: 0; }
  body.article main.wrap > p { max-width: 100%; font-size: 11.5pt; line-height: 1.55; }
  body.article .lede { font-size: 13pt; }
  h1 { font-size: 22pt; line-height: 1.15; }
  body.article main.wrap > h2 {
    font-size: 13.5pt; border-left: 3px solid #b8791a; color: #111;
    page-break-after: avoid; margin-top: 18pt;
  }
  body.article main.wrap > p em { background: none; border-bottom: 1px solid #b8791a; }
  .cite { border: 1px solid #ccc; border-left: 3px solid #b8791a; font-size: 9.5pt; }
  ol.sources { font-size: 9.5pt; }
  ol.sources li, .cite, dl.biblio { page-break-inside: avoid; }
  a { color: #111; text-decoration: none; }
  .colophon-print { display: block !important; }
}

.colophon-print { display: none; }

@page { size: A4; margin: 18mm 17mm 20mm 17mm; }

.colophon .legal {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.colophon .legal a {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

ul.plain { list-style: none; padding: 0; margin: 0 0 1.2rem; }
ul.plain li {
  padding: 0.45rem 0 0.45rem 1.1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 0.5rem;
}
ul.plain li b { color: var(--fg); font-weight: 600; }

/* ---------- Retour en haut ---------- */

.to-top {
  position: fixed;
  right: max(1.15rem, env(safe-area-inset-right));
  bottom: max(1.15rem, env(safe-area-inset-bottom));
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-deep);
  color: #fff;
  border: 1px solid rgba(240, 168, 58, 0.45);
  box-shadow: 0 2px 6px rgba(13, 43, 80, 0.20), 0 10px 26px rgba(13, 43, 80, 0.16);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s,
              background .15s ease, color .15s ease, border-color .15s ease;
  z-index: 40;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

.to-top:hover,
.to-top:focus-visible {
  background: var(--amber-soft);
  color: var(--navy-deep);
  border-color: var(--amber-soft);
}

.to-top:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.to-top svg { width: 1.15rem; height: 1.15rem; display: block; }

header.site:focus { outline: none; }

@media (max-width: 30rem) {
  .to-top { width: 2.5rem; height: 2.5rem; }
  .to-top svg { width: 1rem; height: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

@media print { .to-top { display: none; } }

footer.site .cols li.nom {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- Citation en bloc (introduite avec le n° 3) ---------- */

blockquote {
  margin: 1.8rem 0 2rem;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--amber);
  color: var(--muted);
}

blockquote p {
  margin: 0 0 0.7rem;
  font-size: 0.99rem;
  line-height: 1.62;
}

blockquote p:last-child { margin-bottom: 0; }
blockquote strong { color: var(--fg); }

@media print {
  blockquote {
    border-left: 2px solid #999;
    color: #222;
    page-break-inside: avoid;
  }
}

/* Un document imprime ne contient pas sa propre invitation au telechargement */
@media print {
  #telecharger,
  #telecharger + .issue,
  #lire-aussi { display: none !important; }
}

/* ---------- Texte integral des Cahiers (introduit avec le n° 1) ---------- */

/* Entree de lexique : le terme defini ouvre le paragraphe */
.terme {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}

.terme strong { color: var(--fg); }

/* Jalon de chronologie : la date ancre le paragraphe */
.jalon strong,
.groupe-sources strong {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 0.25rem;
}

.jalon { padding-left: 1rem; border-left: 2px solid var(--amber); }

/* Intertitre de regroupement dans la bibliographie */
.groupe-sources { margin: 1.8rem 0 0.5rem; }
.groupe-sources strong { margin-bottom: 0; }

.note-sources {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

@media print {
  .terme, .jalon { border-left: 1.5pt solid #b8791a; page-break-inside: avoid; }
  .jalon strong, .groupe-sources strong { color: #8a5a10; }
  .groupe-sources { page-break-after: avoid; }
}

/* ---------- Figures analytiques (introduites avec l'article sur le cloud) ---------- */
figure { margin: 2.4rem 0 2.2rem; }
figure svg {
  width: 100%; height: auto; display: block;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
figcaption {
  margin-top: 0.8rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.88rem; line-height: 1.55; color: var(--muted);
}
figcaption b { color: var(--fg); font-weight: 600; }
figure .num {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}
/* Jeu de classes utilisé à l'intérieur des SVG, pour suivre le thème clair ou sombre */
.f-titre { fill: var(--fg); font-weight: 600; }
.f-txt   { fill: var(--fg); }
.f-mut   { fill: var(--muted); }
.f-amb   { fill: var(--amber); font-weight: 600; }
.f-cadre { fill: var(--panel); stroke: var(--rule); stroke-width: 1; }
.f-plein { fill: var(--bg); stroke: var(--rule); stroke-width: 1; }
.f-trait { stroke: var(--rule); stroke-width: 1; fill: none; }
.f-acc   { stroke: var(--amber); stroke-width: 1.5; fill: none; }
.f-barre { stroke: var(--amber); stroke-width: 2; }

/* Photographies dans les figures : pleine largeur, cadre discret */
figure img.photo {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

/* Sur écran étroit, la figure garde une taille lisible et défile dans son cadre,
   plutôt que de réduire son texte à six pixels. Le débordement reste confiné
   à la figure : la page, elle, ne défile pas latéralement. */
@media (max-width: 600px) {
  figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  figure svg { min-width: 540px; }
  figcaption { position: sticky; left: 0; }
}

/* Contenu en arabe (Cahier n° 7) : droite-à-gauche sur le bloc de contenu seulement,
   jamais d'espacement de lettres, interligne large, polices arabes du système. */
[dir="rtl"] { text-align: right; line-height: 2.05em;
  font-family: "Noto Naskh Arabic", "Geeza Pro", "Al Bayan", "Segoe UI", Tahoma, Arial, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .kicker, [dir="rtl"] .meta,
[dir="rtl"] .toc, [dir="rtl"] .facts, [dir="rtl"] .summary, [dir="rtl"] figcaption,
[dir="rtl"] .ask-ai .label, [dir="rtl"] .ask-ai .note { letter-spacing: 0; text-transform: none; }
[dir="rtl"] h1 { line-height: 1.5; }
[dir="rtl"] h2 { letter-spacing: 0; }
[dir="rtl"] .toc ol { padding-right: 1.3rem; padding-left: 0; }
[dir="rtl"] ol.sources { padding-right: 1.4rem; padding-left: 0; }
[dir="rtl"] ol.sources li, [dir="rtl"] .cite, [dir="rtl"] .biblio dd a[href^="http"] { unicode-bidi: plaintext; }
[dir="rtl"] .cite { direction: ltr; text-align: left; }
[dir="rtl"] .biblio dt { text-align: right; }
[dir="rtl"] .issue.also { direction: rtl; }
[dir="rtl"] .colophon-print p { direction: ltr; text-align: left; }

/* Sélecteur de langue (FR / EN / ع), en fin de navigation d'en-tête. */
header.site nav .langs { margin-left: 1.1rem; padding-left: 1.1rem; border-left: 1px solid rgba(255,255,255,0.28); white-space: nowrap; }
header.site nav .langs a { margin-left: 0.55rem; font-weight: 600; letter-spacing: 0.04em; }
header.site nav .langs a:first-child { margin-left: 0; }
header.site nav .langs a[lang="ar"] { letter-spacing: 0; font-size: 0.95rem; }
header.site nav .langs a[aria-current="page"] { color: var(--amber-soft); }
@media (max-width: 34rem) {
  header.site .wrap { flex-wrap: wrap; row-gap: 0.4rem; }
  /* Les liens du menu se touchent dans le code (aucune espace entre eux) : la
     ligne ne pouvait jamais se couper, et sur iPhone 13 (390 points, polices
     d'Apple plus larges) « عربي » sortait de l'écran (14/11/2026). Le menu
     devient une rangée souple : espacement resserré, et sur un écran très
     étroit, les langues passent proprement à la ligne. */
  header.site nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    column-gap: 0.7rem;
    row-gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
  }
  header.site nav a { margin-left: 0; }
  header.site nav .langs { margin-left: 0; padding-left: 0.6rem; }
  header.site nav .langs a { margin-left: 0.5rem; }
  header.site nav .langs a:first-child { margin-left: 0; }
}
/* Liens de navigation isolés : sans cela, des libellés arabes consécutifs forment un seul
   segment droite-à-gauche et l'algorithme bidi inverse leur ordre dans l'en-tête. */
header.site nav a, header.site nav .langs { unicode-bidi: isolate; }

/* ---------- Versions linguistiques d'un numéro (pastilles) ----------
   Chaque langue est nommée dans sa propre langue (English, Français, العربية).
   Posées par .outils/versions-langues.py sous la ligne de faits des blocs. */
p.versions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin: -0.35rem 0 1.15rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
p.versions .versions-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-inline-end: 0.15rem;
}
a.lang-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600; line-height: 1;
  color: var(--navy); text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--amber-soft); border-radius: 999px;
  padding: 0.38rem 0.85rem 0.38rem 0.7rem;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
a.lang-pill::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--amber-soft); flex: none;
}
a.lang-pill:hover, a.lang-pill:focus-visible {
  background: var(--amber-soft); color: #0d2b50; border-color: var(--amber-soft);
}
a.lang-pill:hover::before, a.lang-pill:focus-visible::before { background: #0d2b50; }
a.lang-pill[lang="ar"] { font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; font-size: 0.92rem; letter-spacing: 0; }
[dir="rtl"] p.versions .versions-label { letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a.lang-pill { color: #e8e4da; }
}
:root[data-theme="dark"] a.lang-pill { color: #e8e4da; }
@media print { p.versions { display: none; } }

/* ---------- Tableau de stratification (Cahier n° 1) ---------- */

table.strates {
  border-collapse: collapse;
  width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
}
table.strates th {
  text-align: left;
  border-bottom: 2px solid var(--amber);
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
table.strates td {
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.45rem;
  vertical-align: top;
}
table.strates td.horizon { font-weight: 600; white-space: nowrap; color: var(--muted); }
table.strates .alerte { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.95em; }
@media (max-width: 600px) { table.strates { min-width: 720px; } }
table.strates th:nth-child(1) { width: 10%; }
table.strates th:nth-child(2) { width: 17%; }
table.strates th:nth-child(3) { width: 15%; }
table.strates th:nth-child(4) { width: 29%; }
table.strates th:nth-child(5) { width: 29%; }
@media print {
  figure.strates { margin: 0.8rem 0 1rem; }
  table.strates { font-size: 6.6pt; line-height: 1.35; }
  table.strates th { font-size: 6.2pt; }
  table.strates td { padding: 3pt 4pt; }
  table.strates thead { display: table-header-group; }
  table.strates tr { page-break-inside: avoid; }
}

/* ---------- Application installable : volet de proposition ---------- */

.volet-appli {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 60;
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1rem 0.9rem;
  padding-inline-end: 2.75rem;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--amber-soft);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(13, 43, 80, 0.16), 0 18px 40px rgba(13, 43, 80, 0.14);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
  animation: volet-entree 0.28s ease-out;
}

@keyframes volet-entree {
  from { transform: translateY(1.25rem); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .volet-appli { animation: none; }
}

.volet-icone { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.volet-corps { flex: 1; min-width: 0; }
.volet-titre { margin: 0 0 0.2rem; font-weight: 650; color: var(--fg); }
.volet-texte { margin: 0 0 0.7rem; color: var(--muted); }
.volet-texte svg { width: 1.15em; height: 1.15em; vertical-align: -0.22em; color: var(--navy); }

.volet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }

.volet-bouton {
  min-height: 2.75rem;
  padding: 0.4rem 1.05rem;
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.volet-principal { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.volet-lien {
  min-height: 2.75rem;
  padding: 0.3rem 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.volet-fermer {
  position: absolute;
  top: 0.3rem;
  inset-inline-end: 0.3rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.volet-bouton:focus-visible,
.volet-lien:focus-visible,
.volet-fermer:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

body.volet-ouvert .to-top { opacity: 0; visibility: hidden; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .volet-texte svg { color: var(--amber-soft); }
  :root:not([data-theme="light"]) .volet-appli { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
}

/* Longues adresses web (références, notes) : elles passent à la ligne au lieu
   d'élargir la page. Sans cela, sur téléphone, la page débordait de côté
   (Cahier n° 7 : 588 px de large pour un écran de 375) et les éléments fixés
   en bas d'écran sortaient de la partie visible. Constaté le 14/11/2026. */
main { overflow-wrap: break-word; }
main a[href^="http"] { overflow-wrap: anywhere; }

/* ---------- Notifications de parution : encart au fil du Cahier ---------- */

.encart-parution {
  margin: 2.2rem 0;
  padding: 1.05rem 1.2rem 0.95rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--amber-soft);
  border-radius: 6px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}
.encart-titre { margin: 0 0 0.3rem; font-weight: 650; color: var(--fg); }
.encart-texte { margin: 0 0 0.75rem; color: var(--muted); }
.encart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0; }
.encart-actions:empty { display: none; }
.encart-etat { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); }
.encart-etat:empty { display: none; }
.encart-abonne .encart-texte { color: var(--fg); }
.encart-parution .volet-bouton:disabled { opacity: 0.6; cursor: progress; }

/* Gestion de l'abonnement aux notifications (page confidentialité). */
.gestion-notifications {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem;
  margin: 0.4rem 0 1.4rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.92rem;
}
.gestion-notifications:empty { display: none; }
.gestion-etat { margin: 0; color: var(--muted); }
a.volet-bouton { display: inline-flex; align-items: center; text-decoration: none; }
a.volet-principal, a.volet-principal:visited, a.volet-principal:hover { color: #fff; }
