/* ═══════════════════════════════════════════════════════════════
   BAKA — Politique de Confidentialité
   Design Premium : Vantablack · Or Moutarde · Glassmorphisme réel
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:           #050507;
  --bg-mid:       #0B0B0F;
  --surface:      rgba(255,255,255,0.045);
  --surface-2:    rgba(255,255,255,0.075);
  --border:       rgba(255,255,255,0.10);
  --border-gold:  rgba(201,168,76,0.35);
  --gold:         #C9A84C;
  --gold-light:   #EDD9A3;
  --gold-dim:     rgba(201,168,76,0.12);
  --green:        #4ADE80;
  --green-dim:    rgba(74,222,128,0.09);
  --warning:      #FBBF24;
  --danger:       #F87171;
  --text:         rgba(255,255,255,0.92);
  --text-muted:   rgba(255,255,255,0.42);
  --text-sub:     rgba(255,255,255,0.62);
  --gold-grad:    linear-gradient(145deg, #EDD9A3, #C9A84C, #9E7C2E);
  --blur-sm:      blur(12px);
  --blur-md:      blur(20px);
  --blur-lg:      blur(32px);
  --radius-card:  20px;
  --radius-pill:  999px;
  --shadow-gold:  0 0 40px rgba(201,168,76,0.12);
  --shadow-card:  0 8px 32px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.05) inset;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Fond cosmique ──────────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% -5%,  rgba(201,168,76,0.09)  0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 105%, rgba(74,222,128,0.06)  0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50%  50%, rgba(255,255,255,0.01) 0%, transparent 70%);
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
  transition: background .3s, backdrop-filter .3s, border-color .3s;
}

.site-header.scrolled {
  background: rgba(5,5,7,0.75);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: .75rem; }

.logo-mark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .08em;
}

.logo-sub {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding-top: 2px;
}

.header-nav { display: flex; gap: 2rem; }

.nav-link {
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color .2s;
}
.nav-link:hover { color: var(--gold); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 7rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.3), transparent);
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  font-size: .78rem;
  color: var(--gold-light);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-sub);
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.meta-chip {
  padding: .4rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .78rem;
  color: var(--text-muted);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}

/* ── Layout ──────────────────────────────────────────────────── */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ── Sidebar TOC ─────────────────────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: 80px;
}

.toc-card {
  background: var(--surface);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.toc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--green), transparent);
}

.toc-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Fraunces', serif;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

.toc-nav { display: flex; flex-direction: column; gap: .1rem; }

.toc-link {
  display: block;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .2s;
  line-height: 1.4;
  position: relative;
}

.toc-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.toc-link.active {
  color: var(--gold-light);
  background: var(--gold-dim);
}

.toc-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Content area ────────────────────────────────────────────── */
.content { min-width: 0; }

/* ── Articles ────────────────────────────────────────────────── */
article {
  margin-bottom: 1.5rem;
  animation: fadeUp .5s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.article-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 8px;
  padding: .35rem .6rem;
  letter-spacing: .1em;
  flex-shrink: 0;
}

.article-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.article-lead {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.03), transparent 60%);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), var(--shadow-gold);
  transform: translateY(-2px);
}

.card p {
  font-size: .92rem;
  color: var(--text-sub);
  line-height: 1.75;
}

.card h4 {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .5rem;
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: .75rem;
  display: block;
}

.right-card {
  border-left: 3px solid var(--gold);
}

/* ── Info boxes ───────────────────────────────────────────────── */
.info-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  margin: 1.25rem 0;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}

.info-gold {
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.28);
}

.info-green {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.25);
}

.info-warning {
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.22);
}

.info-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }

.info-box strong { color: var(--text); }
.info-box p, .info-box div { font-size: .88rem; color: var(--text-sub); line-height: 1.65; }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}

thead th {
  padding: .85rem 1rem;
  text-align: left;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,168,76,0.06);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: .85rem 1rem;
  color: var(--text-sub);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  line-height: 1.55;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.025); }

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.badge-gold    { background: rgba(201,168,76,.14); color: var(--gold);    border: 1px solid rgba(201,168,76,.28); }
.badge-green   { background: rgba(74,222,128,.12); color: var(--green);   border: 1px solid rgba(74,222,128,.25); }
.badge-danger  { background: rgba(248,113,113,.12); color: var(--danger); border: 1px solid rgba(248,113,113,.25); }
.badge-muted   { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Grids ────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

/* ── Section title (in-article) ───────────────────────────────── */
.section-title {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  margin: 2rem 0 .75rem;
  padding-left: .75rem;
  border-left: 2px solid var(--gold);
}

/* ── Partners ─────────────────────────────────────────────────── */
.partner-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem 1rem;
}

.partner-logo {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: .9rem;
  color: #050507;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(201,168,76,.3);
}

.partner-card strong { font-size: .92rem; color: var(--text); }
.partner-card p { font-size: .78rem; color: var(--text-muted); margin: 0; }

.partner-header { display: flex; align-items: center; gap: 1rem; }

.partner-logo-lg {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 1.05rem;
  color: #050507;
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(201,168,76,.3);
}

.partner-role { font-size: .8rem; color: var(--text-muted); margin: .15rem 0 0; }

.external-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--gold);
  text-decoration: none;
  padding: .35rem .85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(201,168,76,.25);
  transition: background .2s, border-color .2s;
}
.external-link:hover {
  background: var(--gold-dim);
  border-color: var(--border-gold);
}

/* ── Contact card ─────────────────────────────────────────────── */
.contact-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--surface);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-card), var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(201,168,76,.06), transparent 60%);
  pointer-events: none;
}

.contact-logo {
  width: 80px; height: 80px;
  border-radius: 20px;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 1.3rem;
  color: #050507;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(201,168,76,.35);
}

.contact-info { flex: 1; position: relative; z-index: 1; }

.contact-info h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.contact-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.contact-row:last-child { border-bottom: none; }

.contact-label {
  font-size: .75rem;
  color: var(--text-muted);
  min-width: 170px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.contact-value { font-size: .88rem; color: var(--text-sub); }

/* ── Styled list ──────────────────────────────────────────────── */
.styled-list { list-style: none; margin: 1rem 0 0; }

.styled-list li {
  padding: .5rem 0 .5rem 1.5rem;
  position: relative;
  font-size: .88rem;
  color: var(--text-sub);
  border-bottom: 1px solid rgba(255,255,255,.04);
  line-height: 1.6;
}
.styled-list li:last-child { border-bottom: none; }
.styled-list li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--gold);
  font-size: .8rem;
  top: .6rem;
}

/* ── Gold link ────────────────────────────────────────────────── */
.gold-link { color: var(--gold); text-decoration: none; }
.gold-link:hover { color: var(--gold-light); text-decoration: underline; }

/* ── Hosting map (article 10) ─────────────────────────────────── */
.hosting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.hosting-item {
  background: var(--surface);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .2s, transform .2s;
}
.hosting-item:hover { border-color: var(--border-gold); transform: translateY(-2px); }

.hosting-flag { font-size: 2rem; }
.hosting-service { font-size: .82rem; color: var(--text-muted); }
.hosting-location {
  font-family: 'Fraunces', serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
.hosting-note {
  font-size: .75rem;
  color: var(--text-muted);
  padding: .3rem .6rem;
  background: rgba(255,255,255,.04);
  border-radius: 6px;
  display: inline-block;
  margin-top: .25rem;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}

.footer-inner {
  background: var(--surface);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
}

.footer-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 400px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
  letter-spacing: .1em;
}

.footer-tagline {
  font-size: .8rem;
  color: var(--text-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: .8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Back to top ──────────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all .3s;
  z-index: 200;
  box-shadow: var(--shadow-gold);
}

#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--gold-dim); transform: translateY(-3px); }

/* ── Scroll reveal ────────────────────────────────────────────── */
.will-reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.will-reveal.revealed { opacity: 1; transform: none; }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; }
  .toc-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .header-nav { display: none; }
  .hero { padding: 5rem 1.5rem 3.5rem; }
  .layout { padding: 0 1.25rem 4rem; }
}

@media (max-width: 540px) {
  .hero-title { font-size: 2.4rem; }
  .contact-card { flex-direction: column; }
  .contact-logo { width: 60px; height: 60px; font-size: 1rem; }
  .contact-label { min-width: 100px; }
  .toc-nav { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .hosting-grid { grid-template-columns: 1fr; }
  .partner-header { flex-direction: column; }
  .article-header h2 { font-size: 1.2rem; }
}
