/* ════════════════════════════════════════════════════════════════════════════
   OpenOverlay Docs — Feuille de style globale
   ════════════════════════════════════════════════════════════════════════════ */

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

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --bg:       #0c0c10;
  --bg2:      #13131a;
  --bg3:      #1a1a24;
  --surface:  #1e1e2a;
  --border:   rgba(255,255,255,0.07);
  --accent:   #7c5cfc;
  --accent2:  #c084fc;
  --live:     #ff4554;
  --text:     #f0eeff;
  --muted:    #7c7a99;
  --tag-bg:   rgba(124,92,252,0.12);
  --green:    #22c55e;
  --green-bg: rgba(34,197,94,0.1);
  --code-bg:  #0d0d14;
  --radius:   14px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(12,12,16,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo-nav {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.logo-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
  background: var(--tag-bg);
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: 100px;
  padding: 2px 8px;
  margin-left: 2px;
}

nav ul { list-style: none; display: flex; gap: 2rem; }

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
}
nav a:hover  { color: var(--text); }
nav a.active { color: var(--accent2); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ── Burger menu ─────────────────────────────────────────────────────────── */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}
.burger-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease;
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; width: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Menu mobile ─────────────────────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 57px; left: 0; right: 0;
  background: rgba(12,12,16,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 2rem 1.5rem;
  z-index: 99;
  display: flex;
  flex-direction: column;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav a {
  display: block;
  padding: 13px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-nav a:hover { color: var(--text); }
.mobile-nav .mob-cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 13px;
  margin-top: 14px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: none;
}
.mobile-nav .mob-cta:hover { opacity: 0.85; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  position: relative;
  padding: 9rem 2rem 4rem;
  text-align: center;
  overflow: hidden;
}
.page-header .grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,92,252,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,252,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 80%);
  pointer-events: none;
}
.page-header .glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,252,0.12) 0%, transparent 70%);
  top: 0; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  position: relative;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: rgba(255,255,255,0.2); }
.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  position: relative;
}
.page-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
  position: relative;
}

/* ── Section label ───────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Conteneur ───────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
}
footer a { color: var(--accent2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Fade-in scroll ──────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Composants doc partagés ─────────────────────────────────────────────── */

/* Code inline */
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.83em;
  background: var(--code-bg);
  color: #c5b8ff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(124,92,252,0.15);
}

/* Blocs de code */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 1rem 0 1.4rem;
}
pre code {
  background: none; border: none; padding: 0;
  font-size: 0.82rem; color: #c5b8ff; line-height: 1.65;
}

/* Callouts */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 10px; margin: 1rem 0 1.4rem;
  font-size: 0.88rem; font-weight: 300; line-height: 1.6;
}
.callout-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.callout p { color: inherit; margin: 0; max-width: 100%; font-size: inherit; font-weight: inherit; }
.callout strong { font-weight: 600; }
.callout.info  { background: rgba(124,92,252,0.08); border: 1px solid rgba(124,92,252,0.2); color: #c5b8ff; }
.callout.tip   { background: var(--green-bg);        border: 1px solid rgba(34,197,94,0.2);  color: #86efac; }
.callout.warn  { background: rgba(251,191,36,0.08);  border: 1px solid rgba(251,191,36,0.2); color: #fde68a; }
.callout.plain { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--muted); }

/* Tables */
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 1rem 0 1.4rem; }
.doc-table th {
  text-align: left; padding: 8px 12px;
  background: var(--bg3); color: var(--muted);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.doc-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 300; line-height: 1.5; vertical-align: top; }
.doc-table td:first-child { color: var(--text); font-weight: 400; }
.doc-table td code { font-size: 0.78rem; }
.doc-table tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 99px; vertical-align: middle;
}
.badge-required { background: rgba(255,69,84,0.15); color: #f87171; border: 1px solid rgba(255,69,84,0.3); }
.badge-optional { background: rgba(34,197,94,0.1);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }

/* Boutons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white;
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 12px 28px; border-radius: 100px;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 0 30px rgba(124,92,252,0.3);
  border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--muted);
  text-decoration: none; font-size: 0.95rem; font-weight: 400;
  padding: 12px 24px; border-radius: 100px;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.btn-secondary:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav ul      { display: none; }
  .nav-cta    { display: none; }
  .burger-btn { display: flex; }
}
@media (max-width: 480px) {
  nav         { padding: 1rem 1.2rem; }
  .mobile-nav { padding-left: 1.2rem; padding-right: 1.2rem; }
}
