/* ==========================================================================
   CONATUS — FEUILLE DE STYLE DES MENTIONS LÉGALES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES GLOBALES (Couleurs, Typographies, Tailles)
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs de fond et de surface */
  --ink: #0a0a0f;                 /* Fond principal très sombre */
  --surface: #0e0e14;             /* Fond des cartes et sections */
  
  /* Palette de violets (Accents lumineux) */
  --violet: #8f6bff;              /* Violet primaire de marque */
  --violet-bright: #b49cff;       /* Violet clair pour les hovers & focus */
  
  /* Couleurs de texte */
  --paper: #eeecff;               /* Texte blanc cassé / principal */
  --muted: #aaa9bf;               /* Texte secondaire / estompé */
  
  /* Bordures et effets de transparence */
  --line: rgba(238, 236, 255, 0.14); /* Lignes séparatrices subtiles */
  --glass: rgba(255, 255, 255, 0.045);/* Effet dépoli / verre */
  
  /* Typographies */
  --display: 'Playfair Display', Georgia, serif; /* Titres */
  --body: 'Manrope', sans-serif;                 /* Texte courant */
  --mono: 'DM Mono', monospace;                  /* Numéros, tags et labels */
  
  /* Largeur maximale du contenu */
  --max: 1240px;
}

/* --------------------------------------------------------------------------
   2. RÉINITIALISATION & BASE
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Grille d'arrière-plan avec dégradé subtil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(143, 107, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 107, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

/* Liens génériques */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--violet-bright);
}

/* Accessibilité : Focus clavier */
:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  background: var(--violet);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  color: #09080e;
  z-index: 5;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   3. EN-TÊTE & NAVIGATION (Header / Nav)
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1240px, calc(100% - 64px));
  height: 90px;
  margin: auto;
  margin-top: 5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo de marque */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 25px;
  height: 21px;
}

/* Barres du logo Conatus */
.brand-mark i {
  display: block;
  width: 6px;
  background: var(--violet);
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(143, 107, 255, 0.8);
}

.brand-mark i:nth-child(1) { height: 11px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 15px; }

/* Bouton retour vers l'accueil */
.back-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.back-link span {
  color: var(--violet);
  font-size: 18px;
  margin-right: 8px;
}

/* --------------------------------------------------------------------------
   4. SECTION HÉRO (Titre principal)
   -------------------------------------------------------------------------- */
.legal-hero {
  position: relative;
  width: min(var(--max), calc(100% - 64px));
  min-height: 430px;
  margin: auto;
  padding: 112px 0 75px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--violet-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--muted);
  padding: 0 5px;
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(58px, 9vw, 128px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.legal-hero h1 em {
  color: var(--violet-bright);
  font-weight: 600;
}

.intro {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.updated {
  margin: 28px 0 0;
  color: #77768b;
  font-family: var(--mono);
  font-size: 11px;
}

.updated strong {
  color: var(--paper);
  font-weight: 400;
}

/* Effet d'orbe lumineuse violette en arrière-plan */
.hero-orbit {
  position: absolute;
  right: 9%;
  top: 56px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(143, 107, 255, 0.25);
  border-radius: 50%;
  box-shadow: 
    0 0 100px rgba(143, 107, 255, 0.16),
    inset 0 0 70px rgba(143, 107, 255, 0.08);
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 41px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(143, 107, 255, 0.4), transparent 52%), rgba(143, 107, 255, 0.04);
  filter: blur(1px);
}

/* --------------------------------------------------------------------------
   5. STRUCTURE DU CONTENU (Layout 2 colonnes)
   -------------------------------------------------------------------------- */
.legal-layout {
  width: min(var(--max), calc(100% - 64px));
  margin: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 100px;
  padding: 80px 0 120px;
}

/* --------------------------------------------------------------------------
   6. SOMMAIRE LATÉRAL (Table of Contents / TOC)
   -------------------------------------------------------------------------- */
.toc {
  position: sticky;
  top: 28px;
  align-self: start;
  padding-top: 5px;
}

.toc-title {
  margin: 0 0 20px;
  color: #6f6d80;
  font: 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.toc a {
  display: flex;
  gap: 16px;
  padding: 9px 0;
  color: #77768b;
  font: 11px var(--mono);
  border-bottom: 1px solid transparent;
}

.toc a:hover,
.toc a:focus {
  color: var(--paper);
  border-color: var(--line);
}

.toc a.is-active {
  color: var(--violet-bright);
}

.toc a span {
  font-family: var(--body);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   7. CARTES & ARTICLES DE CONTENU LÉGAL
   -------------------------------------------------------------------------- */
.legal-content {
  min-width: 0;
}

.legal-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  padding: 42px 44px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.15);
  scroll-margin-top: 30px;
}

.legal-card:hover {
  border-color: rgba(143, 107, 255, 0.42);
}

.legal-card.featured {
  border-color: rgba(143, 107, 255, 0.36);
  box-shadow: 0 0 55px rgba(143, 107, 255, 0.08);
}

.card-number {
  color: var(--violet);
  font: 12px var(--mono);
  padding-top: 8px;
}

.card-body h2 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.card-body p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 14px;
}

.card-body p:last-child {
  margin-bottom: 0;
}

.card-body strong {
  color: var(--paper);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. GRILLE DE DÉTAILS / LISTES DE DÉFINITIONS (dt / dd)
   -------------------------------------------------------------------------- */
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  margin: 28px 0 0;
}

.details div {
  padding: 17px 18px 15px 0;
  border-bottom: 1px solid var(--line);
}

.details div:nth-child(even) {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

dt {
  margin-bottom: 5px;
  color: #77768b;
  font: 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

dd {
  margin: 0;
  color: var(--paper);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   9. ÉLÉMENTS DE TEXTE SPÉCIFIQUES & FOOTER
   -------------------------------------------------------------------------- */
.placeholder {
  color: #c1b4ff;
  background: rgba(143, 107, 255, 0.1);
  padding: 1px 4px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.9em;
}

address {
  margin: 20px 0;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.note,
.legal-footnote {
  color: #77768b !important;
  font-size: 11px !important;
}

.note {
  border-left: 2px solid var(--violet);
  padding-left: 14px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--violet-bright);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.legal-footnote {
  padding: 20px 0;
}

footer {
  width: min(1240px, calc(100% - 64px));
  margin: auto;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  color: #777691;
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-items: center;
}

footer .brand {
  color: var(--paper);
  font-family: var(--body);
  font-size: 11px;
}

/* ==========================================================================
   10. RESPONSIVE / MEDIA QUERIES
   ========================================================================== */

/* Tablette & petits écrans (max 820px) */
@media (max-width: 820px) {
  .nav,
  .legal-hero,
  .legal-layout {
    width: min(100% - 40px, var(--max));
  }

  .legal-hero {
    min-height: auto;
    padding: 80px 0 58px;
  }

  .hero-orbit {
    right: -20px;
    top: 72px;
    width: 250px;
    height: 250px;
    opacity: 0.55;
  }

  .legal-layout {
    display: block;
    padding: 48px 0 10px;
  }

  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-bottom: 35px;
  }

  .toc-title {
    width: 100%;
    margin-bottom: 8px;
  }

  .toc a {
    padding: 5px 0;
  }

  .legal-card {
    padding: 30px 24px;
    grid-template-columns: 36px 1fr;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .details div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

    footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding: 10px 20px 40px;
  }
}

/* Mobile (max 480px) */
@media (max-width: 480px) {
  .nav {
    height: 90px;
  }

  .brand {
    font-size: 11px;
  }

  .back-link {
    font-size: 0;
  }

  .back-link span {
    font-size: 22px;
  }

  .legal-hero h1 {
    font-size: 60px;
  }

  .intro {
    font-size: 14px;
  }

  .legal-card {
    padding: 25px 18px;
    gap: 10px;
  }

  .card-number {
    font-size: 10px;
  }

  .card-body h2 {
    font-size: 29px;
  }

  .card-body p {
    font-size: 13px;
  }

  .details dd {
    font-size: 12px;
  }

  .hero-orbit {
    opacity: 0.35;
  }
}

/* Accessibilité : Réduction des animations */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}