/* Pages de documents d'Avanti (confidentialité, conditions, règles par pays). Même identité que l'accueil. */
:root {
  color-scheme: light;
  --night: #0c1233;
  --night-2: #172052;
  --indigo: #4253e0;
  --gold: #f5bd39;
  --paper: #f7f5ef;
  --card: #fff;
  --ink: #141a3d;
  --muted: #5a6078;
  --line: #e4e1d6;
  --on-night-muted: #b8bedb;
  --sans: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.7; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--night-2); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* En-tête : bandeau nuit, titre du document et retour à l'accueil. */
.doc-head { position: relative; overflow: hidden; padding: 22px var(--gutter) clamp(40px, 6vw, 64px); background: radial-gradient(120% 140% at 85% 0%, #26318a 0%, var(--night-2) 45%, var(--night) 100%); color: #fff; }
.doc-head > * { max-width: 820px; margin-right: auto; margin-left: auto; }
.doc-back { display: flex; align-items: center; gap: 9px; width: fit-content; margin-bottom: clamp(28px, 5vw, 48px); margin-left: max(0px, calc((100% - 820px) / 2)); color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -.05em; text-decoration: none; }
.doc-back img { border-radius: 8px; }
.doc-back::before { margin-right: 4px; color: var(--gold); content: "←"; font-weight: 600; letter-spacing: 0; transition: translate .25s; }
.doc-back:hover { color: #fff; }
.doc-back:hover::before { translate: -4px 0; }
h1 { margin: 0 0 10px; font-size: clamp(34px, 5.5vw, 56px); font-weight: 820; letter-spacing: -.045em; line-height: 1.05; }
.doc-head small { color: var(--on-night-muted); font-size: 14px; }

/* Corps : une colonne de lecture, chaque partie sur une carte. */
main { max-width: 820px; margin: -28px auto 0; padding: 0 var(--gutter) 64px; }
main > section { margin-bottom: 16px; padding: clamp(22px, 3.5vw, 34px); border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
main > p { color: var(--muted); }
h2 { margin: 0 0 14px; font-size: clamp(21px, 2.6vw, 26px); font-weight: 780; letter-spacing: -.03em; line-height: 1.25; }
h3 { margin: 22px 0 8px; color: var(--indigo); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
p { margin: 0 0 12px; }
section > :last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--indigo); }
strong { font-weight: 700; }
small { color: var(--muted); font-size: 13px; }

/* Tableaux : lisibles, et défilables sur petit écran. */
table { display: block; overflow-x: auto; max-width: 100%; margin: 6px 0 14px; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef0ff; color: var(--night-2); font-size: 13px; font-weight: 750; white-space: nowrap; }
tr:first-child th:first-child { border-top-left-radius: 10px; }
tr:first-child th:last-child { border-top-right-radius: 10px; }

/* Formulaire du choix de pays (page « Règles de mon pays »). */
form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
label { font-weight: 650; }
select { flex: 1 1 220px; min-width: 0; max-width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #cfd3e6; border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; }
button { min-height: 46px; padding: 10px 22px; border: 0; border-radius: 999px; background: var(--gold); color: var(--night); font: inherit; font-weight: 750; cursor: pointer; transition: translate .2s, background-color .2s; }
button:hover { background: #ffcb52; translate: 0 -1px; }

/* Pied de page commun. */
.doc-foot { padding: 26px var(--gutter); background: #070b24; }
.doc-foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; max-width: 820px; margin: 0 auto; }
.doc-foot a { color: var(--on-night-muted); font-size: 14px; text-decoration: none; }
.doc-foot a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  main { margin-top: -20px; }
  main > section { border-radius: 18px; }
  th, td { padding: 9px 10px; }
}

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

/* Avertissement pour un lecteur germanophone : le document n'existe qu'en français. */
.doc-lang { position: relative; box-sizing: border-box; width: calc(min(100%, 820px) - 2 * var(--gutter)); margin: -28px auto 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 14px; background: var(--card); font-size: 15px; }
.doc-lang + main { margin-top: 16px; }
