/* ============================================================
   Pages légales — mentions, confidentialité, CGU, CGV
   ============================================================

   Ces quatre pages sont servies telles quelles depuis /public : elles ne
   passent pas par le build, et ne peuvent donc pas importer les tokens du
   site. Les valeurs sont recopiées ici, et c'est la seule entorse assumée
   à la règle « une seule source de vérité ».

   Si la palette change, ce fichier est le second endroit à mettre à jour.
   Les valeurs sont celles de src/styles/tokens.css au 16 septembre 2026.
   ============================================================ */

:root {
  --papier:       #F6ECDB;
  --papier-ombre: #EEE2CC;
  --encre:        #14181C;
  --accent:       #12455C;
  --accent-profond: #0C3242;
  --gris:         #5F6468;
  --filet:        color-mix(in srgb, var(--encre) 12%, transparent);

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-texte:   'Switzer', ui-sans-serif, system-ui, sans-serif;

  --rond-interactif: 10px;
  --rond-bloc: 16px;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-std.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/fonts/switzer-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/fonts/switzer-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

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

body {
  background: var(--papier);
  color: var(--encre);
  font-family: var(--font-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── En-tête ───────────────────────────────────────────────── */
.legal-header { border-bottom: 1px solid var(--filet); }

.legal-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1440px;
  margin-inline: auto;
  padding: 24px 64px;
}

.legal-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.legal-back {
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-back:hover { color: var(--accent-profond); }

/* La flèche et le logo n'avaient pas de taille : la flèche prenait toute
   la largeur, le logo ses 283 px d'origine et faisait déborder la page
   au téléphone (2 octobre 2026). */
.legal-back { display: inline-flex; align-items: center; gap: 8px; }
.legal-back svg { width: 18px; height: 18px; flex: none; }
.legal-brand img { display: block; height: 26px; width: auto; }

/* ─── Contenu ───────────────────────────────────────────────── */
/* La page entière tient dans une colonne de lecture centrée. Le titre,
   la date, l'intro et le sommaire n'avaient aucun style et collaient au
   bord gauche de l'écran (2 octobre 2026). */
.legal-main {
  max-width: calc(76ch + 128px);
  margin-inline: auto;
  padding: 96px 64px;
}
.legal-eyebrow { display: block; }
.legal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.legal-meta { margin-top: 20px; font-size: 0.875rem; color: var(--gris); }
.legal-intro { margin-top: 32px; line-height: 1.6; }
.legal-toc {
  margin-top: 40px;
  padding: 28px 32px;
  border-radius: 16px;
  background: var(--papier-ombre);
}
.legal-toc-label { font-size: 0.875rem; font-weight: 500; color: var(--encre); margin-bottom: 12px; }
.legal-toc ol { list-style: none; display: grid; gap: 6px; }
.legal-toc a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-toc a:hover { color: var(--accent-profond); }
.legal-content { margin-top: 24px; }

.legal-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gris);
  margin-bottom: 16px;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 92%;
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--filet);
}

.legal-content h3 { font-size: 1.0625rem; font-weight: 500; margin-top: 32px; }

.legal-content p,
.legal-content li { margin-top: 16px; }

.legal-content ul { margin-top: 8px; }
.legal-content li { padding-left: 20px; position: relative; }
.legal-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.legal-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-content a:hover { color: var(--accent-profond); }

.legal-content strong { font-weight: 500; }

/* ─── Pied ──────────────────────────────────────────────────── */
.legal-footer {
  background: var(--encre);
  color: var(--papier);
}

.legal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1440px;
  margin-inline: auto;
  /* 96 px sous les liens : en bas de page, le bouton « remonter »
     (44 px à 24 px du bord) se posait sur « CGV ». */
  padding: 32px 64px 96px;
  font-size: 0.875rem;
}

.legal-footer-copy { opacity: 0.72; }

.legal-footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.legal-footer-links a {
  padding-block: 4px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.legal-footer-links a:hover { opacity: 0.72; }

/* ─── Focus ─────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.legal-footer :focus-visible { outline-color: var(--papier); }

@media (max-width: 767px) {
  .legal-header-inner,
  .legal-footer-inner { padding-inline: 24px; }
}

/* ─── Remonter en haut de page ──────────────────────────────
   Même bouton que sur le reste du site (src/styles/components/
   remonter.css), recopié ici : ces pages ne chargent pas la feuille du
   site. Caché tant qu'on n'a pas défilé deux écrans ; en négatif
   au-dessus du pied de page. */
.remonter {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 800;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--encre);
  border-radius: 50%;
  background: var(--papier);
  color: var(--encre);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease, background-color 200ms ease, color 200ms ease;
}
.remonter.est-visible,
.remonter:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.remonter svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 300ms ease;
}
.remonter:hover { background: var(--encre); color: var(--papier); }
.remonter:hover svg { transform: translateY(-2px); }
.remonter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.remonter.sur-sombre { border-color: var(--papier); background: var(--encre); color: var(--papier); }
.remonter.sur-sombre:hover { background: var(--papier); color: var(--encre); }
@media (max-width: 767px) {
  .legal-main { padding: 56px 24px; }
  .legal-toc { padding: 22px 20px; } .remonter { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .remonter, .remonter svg { transition: none; } }
