/* Naftavio · site de la politique de confidentialité
   Valeurs reprises de DESIGN.md (couleurs, police Inter, rayons 24/16/pilule).
   Une colonne de lecture de 680 px, un en-tête avec le sélecteur de langue. */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #57667b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand: #2680f8;
  --primary: #1a66d9;
  --primary-soft: #eaf2ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-pop: 0 8px 24px rgba(15, 23, 42, .12);

  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 680px;
  --r-card: 24px;
  --r-block: 16px;
  --r-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-muted: #18233a;
    --text: #e9f2ff;
    --text-muted: #94a3b8;
    --border: #22304a;
    --border-strong: #33425f;
    --primary: #54abff;
    --primary-soft: #13284a;
    --shadow: none;
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-muted: #18233a;
  --text: #e9f2ff;
  --text-muted: #94a3b8;
  --border: #22304a;
  --border-strong: #33425f;
  --primary: #54abff;
  --primary-soft: #13284a;
  --shadow: none;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.625;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--surface); color: var(--primary);
  padding: 8px 16px; border-radius: var(--r-pill); z-index: 20;
}
.skip:focus { top: 8px; }

/* Colonne commune : même gouttière pour l'en-tête, le contenu et le pied. */
.wrap {
  max-width: calc(var(--measure) + 40px);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
@media (max-width: 400px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

/* En-tête */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-block: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  min-height: 48px;
}
.brand img {
  width: 40px; height: 40px; border-radius: 10px;
  background: #ffffff; border: 1px solid #e2e8f0;
}

/* Sélecteur de langue : <details> natif, aucune dépendance au JavaScript. */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary .globe { width: 18px; height: 18px; flex: none; }
.lang summary::after {
  content: ""; width: 7px; height: 7px; margin-left: 2px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); opacity: .6;
}
.lang[open] summary { border-color: var(--primary); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  margin: 0; padding: 8px; list-style: none;
  min-width: 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-block); box-shadow: var(--shadow-pop);
}
.lang li a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px;
}
.lang li a:hover { background: var(--surface-muted); }
.lang li a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Contenu */
main { padding-block: 8px 48px; }

.policy h1, .home h1 {
  font-size: 28px; line-height: 32px; font-weight: 800; letter-spacing: -.5px;
  margin: 16px 0 8px; text-wrap: balance;
}
.updated { margin: 0 0 24px; color: var(--text-muted); font-size: 14px; }
.updated em { font-style: normal; }

.policy p { margin: 0 0 16px; }

.summary {
  background: var(--primary-soft);
  border-radius: var(--r-block);
  padding: 16px 20px;
  margin: 24px 0 8px !important;
}

.policy h2 {
  font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -.01em;
  margin: 40px 0 16px; padding-top: 24px;
  border-top: 1px solid var(--border);
  text-wrap: balance;
}
.policy h3 {
  font-size: 16px; line-height: 22px; font-weight: 600;
  margin: 28px 0 8px;
}

.policy ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.policy li { position: relative; padding-left: 20px; }
.policy li::before {
  content: ""; position: absolute; left: 4px; top: .7em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-strong);
}
.policy strong { font-weight: 650; }
.policy a { overflow-wrap: anywhere; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding-block: 20px 32px; color: var(--text-muted); font-size: 14px;
}
.site-footer a { color: var(--text-muted); }

/* Accueil et page de choix de langue */
.home .lead { font-size: 18px; line-height: 1.55; margin: 0 0 8px; max-width: 34em; }
.home .lead + .lead { color: var(--text-muted); font-size: 16px; }
.home .hero-logo {
  width: 72px; height: 72px; border-radius: 18px;
  background: #ffffff; border: 1px solid #e2e8f0; margin-top: 24px;
}
.label {
  font-size: 11px; line-height: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
  margin: 32px 0 12px;
}
.lang-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.lang-grid a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 0 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-block); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.lang-grid a:hover { border-color: var(--primary); color: var(--primary); }
.lang-grid .code { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }

.notice { color: var(--text-muted); font-size: 14px; margin-top: 24px; }

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