/* ============================================================
   Rey Dedy Pangou — Design system commun
   Palette dark gold + mode clair · Fraunces + Inter + JetBrains Mono
   ============================================================ */

/* ---------- Variables : sombre (défaut) ---------- */
:root,
.dark {
  --bg:            #07070b;
  --bg-warm:       #0d0b12;
  --surface:       #0e0e15;
  --surface-2:     #131319;
  --ink:           #1c1826;
  --line:          rgba(201, 168, 76, 0.14);
  --line-soft:     rgba(240, 236, 245, 0.07);
  --border:        rgba(201, 168, 76, 0.12);
  --border-strong: rgba(201, 168, 76, 0.25);
  --gold:          #c9a84c;
  --gold-light:    #f5e49a;
  --gold-dim:      rgba(201, 168, 76, 0.5);
  --text:          #f0eaff;
  --text-muted:    #9b9bab;
  --text-dim:      #6a6358;
  --success:       #34d399;
  --term:          #7fdca0;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --radius: 12px;
  --transition: 0.2s ease;
}

/* ---------- Variables : clair ---------- */
.light {
  --bg:            #fbf9f3;
  --bg-warm:       #f7f3ea;
  --surface:       #f4f0e8;
  --surface-2:     #ede8dc;
  --ink:           #e2dccb;
  --line:          rgba(160, 133, 55, 0.18);
  --line-soft:     rgba(28, 24, 38, 0.08);
  --border:        rgba(160, 133, 55, 0.18);
  --border-strong: rgba(160, 133, 55, 0.35);
  --gold:          #a08537;
  --gold-light:    #c9a84c;
  --gold-dim:      rgba(160, 133, 55, 0.55);
  --text:          #1a1815;
  --text-muted:    #5a564f;
  --text-dim:      #8a8478;
  --success:       #0d8e6d;
  --term:          #0d8e6d;
}

/* ---------- Reset + base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--gold); color: var(--bg); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

/* Scrollbar discrète or */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------- Layout ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Petits éléments partagés ---------- */
.eyebrow, .kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.gold-emphasis {
  font-style: italic;
  background: linear-gradient(120deg, var(--gold), var(--gold-light), var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.gold-emphasis::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 500;
  padding: 14px 24px; border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  text-align: center;
}
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--gold);
  color: #07070b;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(201, 168, 76, 0.45);
}

.btn-ghost, .btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover, .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: var(--surface);
}

/* Bouton WhatsApp — variante verte */
.btn-wa {
  background: linear-gradient(135deg, #25d366, #128c7e, #075e54);
  color: #fff;
}
.btn-wa:hover { opacity: 0.94; transform: translateY(-1px); }

/* ---------- Cards ---------- */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.surface-card:hover {
  border-color: var(--gold-dim);
  background: var(--surface-2);
}

/* ---------- Tags techniques ---------- */
.tech-tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* ---------- Liens discrets ---------- */
.link-discreet {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-discreet:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

/* ============================================================
   Header — sticky, scroll blur, drawer mobile
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
  background: rgba(7, 7, 11, 0.72);
  border-bottom-color: var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.light .site-header.scrolled {
  background: rgba(251, 249, 243, 0.82);
}

.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}

.site-header .logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.site-header .logo .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  transition: transform 0.2s ease;
}
.site-header .logo:hover .dot { transform: scale(1.3); }
.site-header .logo .sep { color: var(--text-dim); }

.site-header nav.desktop {
  display: flex; align-items: center; gap: 4px;
}
.site-header nav.desktop a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.site-header nav.desktop a:hover { color: var(--text); }
.site-header nav.desktop a.active { color: var(--gold); }

.site-header .actions { display: flex; align-items: center; gap: 10px; }
.site-header .actions .btn-primary {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
}

/* Toggle thème */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--gold-dim); color: var(--gold); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.light .theme-toggle .icon-sun { display: block; }
.light .theme-toggle .icon-moon { display: none; }

/* Hamburger mobile */
.hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  align-items: center; justify-content: center;
}
.hamburger:hover { border-color: var(--gold-dim); color: var(--text); }

/* Drawer mobile */
.site-header .drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-header .drawer nav {
  display: flex; flex-direction: column;
  padding: 12px 0;
}
.site-header .drawer nav a {
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .drawer nav a:last-child { border-bottom: 0; }
.site-header .drawer nav a.active { color: var(--gold); }
.site-header.open .drawer { display: block; }

@media (max-width: 820px) {
  .site-header nav.desktop { display: none; }
  .site-header .actions .btn-primary { display: none; }
  .hamburger { display: flex; }
}

/* ============================================================
   Footer commun
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 80px;
  padding: 40px 0 48px;
  font-size: 13px;
  color: var(--text-dim);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.site-footer .links {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 18px;
}
.site-footer .links a { color: var(--text-muted); }
.site-footer .links a:hover { color: var(--gold-light); }
.site-footer .credit { text-align: right; }
.site-footer .credit .accent { color: var(--gold); }

@media (max-width: 720px) {
  .site-footer .cols {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .site-footer .credit { text-align: center; }
}

/* ============================================================
   Marquee (bandeau défilant stack) — utilisé sur l'accueil
   ============================================================ */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee {
  overflow: hidden;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-warm);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  width: max-content;
  gap: 48px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  will-change: transform;
  font-size: 14px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .group { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.marquee-track .group .label {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.marquee-track .group .sep { color: var(--text-dim); }
.marquee-track .diamond { color: var(--gold-dim); flex-shrink: 0; }

/* ============================================================
   Reveal — animation à l'apparition
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Utilitaires de mise en page pour les sections
   ============================================================ */
section { padding: 72px 0; }
.section-head { margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  margin-top: 12px;
  letter-spacing: -0.01em;
}
.section-head p {
  color: var(--text-muted);
  max-width: 55ch;
  margin-top: 10px;
}

/* ============================================================
   Focus visible
   ============================================================ */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ============================================================
   Motion réduite
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
