/* =====================================================================
   UMBRAL — Feuille de style partagée
   Thème sombre sci-fi, sobre et pro. Responsive.
   Aucune dépendance externe obligatoire (les polices Google ont un
   fallback système, donc le site répond même sans réseau).
   ===================================================================== */

/* ----------  Tokens / variables  ---------- */
:root {
  --bg:            #06070d;
  --bg-elevated:   #0c0e18;
  --bg-card:       #10131f;
  --border:        #1e2233;
  --border-strong: #2b3350;

  --text:          #e6e9f5;
  --text-muted:    #9aa0b8;
  --text-faint:    #6b7092;

  --accent:        #7c5cff;   /* violet ombral */
  --accent-2:      #22d3ee;   /* cyan lueur */
  --accent-soft:   rgba(124, 92, 255, 0.14);
  --danger:        #ff6b6b;

  --radius:        14px;
  --radius-sm:     9px;
  --maxw:          1080px;
  --maxw-read:     760px;

  --font-display:  "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body:     "Inter", -apple-system, "Segoe UI", system-ui, Roboto, sans-serif;

  --shadow:        0 20px 60px -20px rgba(0,0,0,0.7);
}

/* ----------  Reset  ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Ambient background glow — the "eclipse" of Umbral */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(124,92,255,0.16), transparent 60%),
    radial-gradient(760px 480px at 10% 8%, rgba(34,211,238,0.09), transparent 55%),
    radial-gradient(1200px 700px at 50% 120%, rgba(124,92,255,0.08), transparent 60%);
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: #7ce9f7; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: 0.2px; }

/* ----------  Layout containers  ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container--read { max-width: var(--maxw-read); }
main { flex: 1 0 auto; }

/* ----------  Header / nav  ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(6, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 3px;
  color: var(--text);
  text-transform: uppercase;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 26px; height: 26px; flex: none; }
.nav__spacer { flex: 1; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.nav__links a:hover { color: var(--text); background: var(--accent-soft); }
.nav__links a.is-active { color: var(--text); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 1px;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--text-muted);
}
.lang-switch a.is-active { background: var(--accent); color: #fff; }
.lang-switch a:hover:not(.is-active) { color: var(--text); background: var(--accent-soft); }

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 42px; height: 40px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ----------  Hero  ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 12vw, 128px) 0 clamp(48px, 8vw, 96px);
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--border-strong);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
  background: rgba(34,211,238,0.05);
}
.hero__title {
  font-size: clamp(3rem, 12vw, 6.5rem);
  letter-spacing: clamp(4px, 2vw, 14px);
  margin: 0 0 18px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #b9b6e8 55%, #7c5cff 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(124,92,255,0.25);
}
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  color: var(--text);
  letter-spacing: 1px;
  margin: 0 auto 18px;
  max-width: 640px;
}
.hero__sub {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: 1.05rem;
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ----------  Buttons  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #5b3ef0);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124,92,255,0.7);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(124,92,255,0.8); }
.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }

/* ----------  Sections & cards  ---------- */
.section { padding: clamp(48px, 8vw, 90px) 0; }
.section__head { text-align: center; max-width: 660px; margin: 0 auto 48px; }
.section__eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-2);
}
.section__title { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 10px 0 14px; }
.section__lead { color: var(--text-muted); font-size: 1.06rem; }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--text-muted); }

/* CTA band */
.cta-band {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px);
  background:
    radial-gradient(600px 300px at 50% -30%, rgba(124,92,255,0.16), transparent 70%),
    linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
}

/* ----------  Legal / long-form pages  ---------- */
.page-head {
  padding: clamp(44px, 8vw, 80px) 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-head__eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-2);
}
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0 12px; }
.page-head__meta { color: var(--text-faint); font-size: 0.92rem; }

.prose { color: var(--text); padding-bottom: 72px; }
.prose h2 {
  font-size: 1.5rem;
  margin: 44px 0 14px;
  padding-top: 8px;
  color: var(--text);
}
.prose h2 .num { color: var(--accent); margin-right: 10px; }
.prose h3 { font-size: 1.15rem; margin: 26px 0 10px; color: var(--text); }
.prose p, .prose li { color: #cfd3e6; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--border-strong);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.prose th { background: var(--bg-elevated); font-family: var(--font-display); font-weight: 600; }

/* Table of contents */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.toc h2 { margin: 0 0 12px; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 30px; }
.toc li { margin: 5px 0; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--accent-2); }

/* Placeholder highlight — makes [TO_COMPLETE] fields obvious */
.ph {
  background: rgba(255, 107, 107, 0.13);
  border: 1px dashed rgba(255,107,107,0.5);
  color: #ffd0d0;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.9em;
  white-space: nowrap;
}

/* Callout / notice */
.notice {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}
.notice strong { color: var(--text); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-list .label { display: block; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-family: var(--font-display); letter-spacing: .5px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ----------  Footer  ---------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 48px 0 30px;
  margin-top: 40px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer__brand .brand { margin-bottom: 12px; }
.footer__brand p { color: var(--text-muted); font-size: 0.94rem; max-width: 320px; margin: 0; }
.footer__col h4 { font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin: 9px 0; }
.footer__col a { color: var(--text-muted); font-size: 0.95rem; }
.footer__col a:hover { color: var(--accent-2); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.86rem;
}
.footer__legal-note { max-width: 640px; }

/* ----------  Responsive  ---------- */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
/* Collapse the horizontal nav to a hamburger before it gets cramped */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 18px;
    gap: 2px;
  }
  .nav.is-open .lang-switch { align-self: flex-start; margin-top: 8px; }
}
@media (max-width: 680px) {
  .grid--3, .grid--2, .contact-grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

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