/* ── Pages légales Map Scale (Termes, Confidentialité, CGV) ── */
:root {
  --blue:     #3d9fff;
  --blue-dk:  #1a6fd4;
  --blue-lt:  #8cc6ff;
  --bg:       #07090f;
  --bg-card:  #0d1120;
  --line:     rgba(255,255,255,.08);
  --border:   rgba(61,159,255,.18);
  --text:     #c8d4e8;
  --muted:    rgba(255,255,255,.62);
  --dim:      rgba(255,255,255,.42);
  --ease:     cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: #fff;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 35%, transparent 100%);
}
body::after {
  content: '';
  position: absolute; top: -260px; left: 50%; transform: translateX(-50%);
  width: 1000px; max-width: 100%; height: 620px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse, rgba(61,159,255,.22) 0%, transparent 65%);
  filter: blur(60px);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(61,159,255,.35); }

/* ── HERO ────────────────────────────────── */
.legal-hero { max-width: 1100px; margin: 0 auto; padding: 88px 24px 48px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--blue); background: rgba(61,159,255,.08); border: 1px solid rgba(61,159,255,.22);
  padding: 7px 14px; border-radius: 50px; margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.page-title {
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.1; letter-spacing: -.03em;
  color: #fff; max-width: 820px; margin: 0 auto;
}
.page-subtitle { color: var(--muted); font-size: .95rem; margin-top: 14px; }

/* ── CONTENU + SOMMAIRE ──────────────────── */
.legal { max-width: 820px; margin: 0 auto; padding: 0 24px 100px; }
.doc { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.doc-section {
  background: linear-gradient(180deg, rgba(17,24,39,.85), rgba(13,17,32,.85));
  border: 1px solid var(--line); border-radius: 22px; padding: 30px 34px;
  scroll-margin-top: 100px;
  transition: border-color .3s, opacity .6s var(--ease), transform .6s var(--ease);
}
.doc-section:hover { border-color: rgba(61,159,255,.3); }
.doc-section h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.35;
  margin-bottom: 16px;
}
.doc-section h2::before {
  content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 12px var(--blue);
}
.doc-section h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 22px 0 8px; }
.doc-section p { color: var(--text); font-size: .95rem; margin-bottom: 12px; }
.doc-section p:last-child { margin-bottom: 0; }
.doc-section p strong { color: #fff; }
.doc-section ul { list-style: none; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.doc-section ul li { color: var(--text); font-size: .95rem; padding-left: 28px; position: relative; }
.doc-section ul li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(61,159,255,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d9fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat;
}

.back {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk)); color: #fff; font-weight: 700; font-size: .95rem;
  padding: 14px 28px; border-radius: 50px; box-shadow: 0 8px 28px rgba(61,159,255,.35);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.back:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 36px rgba(61,159,255,.5); }

.sa { opacity: 0; transform: translateY(20px); }
.sa.in { opacity: 1; transform: none; }

/* ── PIED DE PAGE ────────────────────────── */
.page-footer { border-top: 1px solid var(--line); padding: 28px 24px; color: var(--muted); font-size: .84rem; text-align: center; }

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

@media (max-width: 600px) {
  .legal-hero { padding: 48px 16px 32px; }
  .legal { padding: 0 16px 64px; }
  .doc-section { padding: 22px 20px; border-radius: 18px; }
  .back { width: 100%; justify-content: center; }
}

/* ════════ DA « BLEU ROI » — inspirée du logo M ════════ */
:root {
  --royal: #0a4fd6; --royal-ink: #041f6b;
  --blue: #ffffff; --blue-lt: #d6e8ff;
  --glass: rgba(4,24,92,.42); --glass-b: rgba(170,205,255,.30);
  --line: rgba(170,205,255,.24); --border: rgba(170,205,255,.30);
  --text: rgba(232,240,255,.9); --muted: rgba(225,236,255,.84); --dim: rgba(210,226,255,.62);
}
body { background: var(--royal); }
body::before, body::after { display: none; }
::selection { background: rgba(255,255,255,.3); }
a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }

.bg-deco { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% 112%, rgba(40,150,255,.75), transparent 60%),
    radial-gradient(900px 500px at 50% -10%, rgba(30,110,255,.55), transparent 70%),
    linear-gradient(180deg, #0846c8 0%, #0a4fd6 38%, #0743bd 70%, #06379f 100%); }
.bg-deco::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(3,25,90,.55) 100%); }
.circuits { position: absolute; inset: 0; width: 100%; height: 100%; }
.circuits path { fill: none; stroke: rgba(150,195,255,.28); stroke-width: 1.6; }
.circuits .pulse { stroke: rgba(190,220,255,.95); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 70 1400;
  filter: drop-shadow(0 0 6px rgba(160,210,255,.9)); animation: travel 7s linear infinite; }
.circuits .pulse.p2 { animation-duration: 9s; animation-delay: -3s; }
.circuits .pulse.p3 { animation-duration: 8s; animation-delay: -5s; }
.circuits .pulse.p4 { animation-duration: 10s; animation-delay: -1s; }
@keyframes travel { from { stroke-dashoffset: 1470; } to { stroke-dashoffset: 0; } }
.floor { position: absolute; left: -50%; right: -50%; bottom: -2px; height: 46vh; transform-origin: 50% 100%; transform: perspective(420px) rotateX(68deg);
  background-image: linear-gradient(rgba(140,200,255,.55) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(140,200,255,.45) 1.5px, transparent 1.5px);
  background-size: 90px 90px; animation: floorMove 3.5s linear infinite;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); }
@keyframes floorMove { to { background-position: 0 90px, 0 0; } }
.floor-glow { position: absolute; left: 50%; bottom: -18vh; width: 110vw; height: 40vh; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(80,180,255,.65), transparent 65%); filter: blur(10px); animation: glowP 5s ease-in-out infinite; }
@keyframes glowP { 0%,100% { opacity: .75; } 50% { opacity: 1; } }

.page-title, .doc-section h2 { font-family: 'Exo 2', 'Inter', sans-serif; font-style: italic; font-weight: 900; letter-spacing: 0; }
.page-title { text-transform: uppercase; transform: skewX(-4deg); text-shadow: 0 4px 0 rgba(4,31,107,.35), 0 0 40px rgba(170,215,255,.5); }
.eyebrow { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.eyebrow::before, .doc-section h2::before { background: #fff; box-shadow: 0 0 10px #fff; }
.doc-section {
  background: var(--glass); border-color: var(--glass-b);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 30px 60px -30px rgba(2,16,60,.8), inset 0 1px 0 rgba(255,255,255,.12);
}
.doc-section:hover { border-color: rgba(255,255,255,.55); }
.doc-section ul li::before { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a4fd6' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat; }
.back { background: #fff; color: var(--royal); font-weight: 800; text-decoration: none; box-shadow: 0 12px 30px -10px rgba(2,16,60,.8); }
.back:hover { box-shadow: 0 18px 38px -12px rgba(2,16,60,.9), 0 0 28px -2px rgba(200,228,255,.9); }
.page-footer { border-top-color: rgba(255,255,255,.18); background: rgba(3,25,90,.35); }
@media (max-width: 768px) {
  .doc-section { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5,34,120,.72); }
  .floor { height: 34vh; }
}

/* ════════ FOND BLEU NUIT (comme mapscale-base44) — seul le fond change ════════ */
.bg-deco {
  background:
    radial-gradient(1200px 700px at 50% 115%, rgba(30,110,255,.38), transparent 60%),
    radial-gradient(900px 520px at 50% -12%, rgba(25,95,240,.42), transparent 70%),
    linear-gradient(180deg, #071c55 0%, #05143f 40%, #040f30 75%, #030a22 100%);
}
/* fond simple, identique à la page de référence */
body { background:
      radial-gradient(1200px 700px at 50% 115%,rgba(30,110,255,.38),transparent 60%),
      radial-gradient(900px 520px at 50% -12%,rgba(25,95,240,.42),transparent 70%),
      linear-gradient(180deg,#071c55 0%,#05143f 40%,#040f30 75%,#030a22 100%);
    background-attachment:fixed;background-color:#05143f; }
.bg-deco { display: none; }
.floor-glow { opacity: .55; }
.floor { opacity: .6; }
.circuits path { stroke: rgba(150,195,255,.18); }
/* blocs figés dans la couleur qu'ils avaient sur l'ancien fond */
.doc-section { background: rgb(8,56,163); }
.eyebrow { background: rgb(39,100,219); }
.page-footer { background: transparent; }
@media (max-width: 768px) { .doc-section { background: rgb(6,47,146); } }

/* petites cases dans le même bleu que les blocs */
.eyebrow { background: rgb(8,56,163); border-color: rgba(170,205,255,.30); }
