/* ================================================================
   navbar.css — Design system partagé Cre@teMe
   Commun à toutes les pages
   ================================================================ */

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  --color-bg:        #0a0a0a;
  --color-surface:   #121212;
  --color-gold:      #c9a96e;
  --color-gold-light:#e8c98a;
  --color-gold-dark: #9a7a4a;
  --color-ivory:     #f5f0e8;
  --color-muted:     #a0987e;
  --color-border:    rgba(201,169,110,0.18);
  --font-serif:      'Cormorant Garamond', Georgia, serif;
  --font-sans:       'Inter', system-ui, sans-serif;
  --transition:      0.3s cubic-bezier(0.4,0,0.2,1);
  --radius:          4px;
}
html[data-theme="light"] {
  --color-bg:        #f8f5f0;
  --color-surface:   #ffffff;
  --color-gold:      #9a6f2e;
  --color-gold-light:#b8863e;
  --color-gold-dark: #6a4a18;
  --color-ivory:     #1a1512;
  --color-muted:     #6b5d4a;
  --color-border:    rgba(138,100,40,0.18);
}

/* ── Theme smooth switch ───────────────────────────────────────── */
html[data-theme="light"] .cm-header        { background: rgba(248,245,240,.75); }
html[data-theme="light"] .cm-header.scrolled { background: rgba(248,245,240,.97); border-bottom-color: var(--color-border); }
html.theme-switch *,
html.theme-switch *::before,
html.theme-switch *::after {
  transition:
    background       0.55s cubic-bezier(0.4,0,0.2,1),
    background-color 0.55s cubic-bezier(0.4,0,0.2,1),
    color            0.45s cubic-bezier(0.4,0,0.2,1),
    border-color     0.45s cubic-bezier(0.4,0,0.2,1),
    box-shadow       0.45s cubic-bezier(0.4,0,0.2,1) !important;
}

/* ── Skip link ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--color-gold); color: var(--color-bg);
  padding: 0.5rem 1rem; font-weight: 500;
  border-radius: var(--radius); z-index: 10000;
  text-decoration: none; font-family: var(--font-sans);
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ── Header ────────────────────────────────────────────────────── */
.cm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.cm-header.scrolled {
  background: rgba(10,10,10,0.95);
  border-bottom-color: var(--color-border);
}

/* ── Nav layout ────────────────────────────────────────────────── */
.cm-header nav {
  max-width: 1280px; margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}

/* ── Logo ──────────────────────────────────────────────────────── */
.nav-logo {
  font-family: var(--font-serif); font-size: 1.45rem;
  text-decoration: none; letter-spacing: 0.04em;
  display: flex; align-items: baseline; gap: 0; flex-shrink: 0;
}
.nav-logo .logo-light {
  font-weight: 300;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-logo .logo-bold {
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-size: 1.6rem;
}

/* ── Links ─────────────────────────────────────────────────────── */
.nav-list { display: flex; gap: 2.25rem; list-style: none; }
.nav-list a {
  color: var(--color-muted); text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.76rem; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.5rem 0; display: inline-block;
  position: relative; transition: color var(--transition);
}
.nav-list a::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--color-gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--color-gold); }
.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

/* ── Controls ──────────────────────────────────────────────────── */
.nav-controls { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.nav-cta {
  display: inline-block; padding: .45rem 1.25rem;
  border: 1px solid var(--color-gold); color: var(--color-gold);
  text-decoration: none; font-family: var(--font-sans);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  border-radius: 100px;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.nav-cta:hover {
  background-color: var(--color-gold); color: var(--color-bg);
  box-shadow: 0 0 18px rgba(201,169,110,.2);
}
.theme-toggle {
  background: none; border: 1px solid var(--color-border);
  color: var(--color-gold); cursor: pointer; padding: .38rem .65rem;
  border-radius: 50%; font-size: 1rem; line-height: 1;
  width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), background-color var(--transition);
}
.theme-toggle:hover { border-color: var(--color-gold); background: rgba(201,169,110,.08); }
.nav-toggle {
  display: none; background: none;
  border: 1px solid var(--color-border); color: var(--color-gold);
  cursor: pointer; padding: 0.4rem 0.7rem;
  border-radius: var(--radius); font-size: 1.2rem; line-height: 1;
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-list {
    display: none; flex-direction: column; gap: 1.2rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    padding: 2rem; border-bottom: 1px solid var(--color-border);
  }
  .nav-list.open { display: flex; }
  .nav-toggle { display: block; }
  .cm-header nav { flex-wrap: wrap; }
}

/* ── Spacer for fixed header ───────────────────────────────────── */
.cm-spacer { height: 5rem; }

/* ================================================================
   LIGHT THEME OVERRIDES pour pages Stitch (Tailwind dark-class)
   Cible html:not(.dark) pour corriger les classes hardcodées
   ================================================================ */

/* Textes clairs hardcodés (slate-100/200/300) → sombres en light */
html:not(.dark) .text-slate-100,
html:not(.dark) .text-slate-200,
html:not(.dark) .text-slate-300 {
  color: #2d2822 !important;
}
html:not(.dark) .text-slate-400 {
  color: #5c5242 !important;
}
html:not(.dark) .text-slate-500 {
  color: #7a6d5f !important;
}
html:not(.dark) .text-slate-600 {
  color: #6b5f52 !important;
}

/* Fond dark hardcodé → clair en light */
html:not(.dark) .dark\:bg-background-dark,
html:not(.dark) [class*="bg-background-dark"] {
  background-color: #f8f5f0 !important;
}
html:not(.dark) [class*="bg-card-dark"],
html:not(.dark) [class*="bg-surface-dark"],
html:not(.dark) [class*="bg-obsidian"] {
  background-color: #ede8e0 !important;
}

/* Glassmorphism → translucide clair en light */
html:not(.dark) .glass,
html:not(.dark) .glass-card,
html:not(.dark) .glass-morphism,
html:not(.dark) .glass-nav {
  background: rgba(255,255,255,0.82) !important;
  border-color: rgba(158,120,60,0.22) !important;
}

/* Gradient or → version sombre lisible sur fond clair */
html:not(.dark) .gold-gradient-text {
  background: linear-gradient(135deg, #7a5010, #c9a96e) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Text ivory hardcodé */
html:not(.dark) .text-ivory,
html:not(.dark) [class*="text-ivory"] {
  color: #1a1512 !important;
}

/* Textes antique-gold (doré foncé en light mode) */
html:not(.dark) .text-antique-gold {
  color: #7a5a2a !important;
}

/* Dark section CTA / footer → fond crème */
html:not(.dark) section[class*="bg-background-dark"],
html:not(.dark) footer[class*="bg-background-dark"],
html:not(.dark) footer[class*="bg-surface-dark"],
html:not(.dark) footer[class*="bg-obsidian"],
html:not(.dark) footer[class*="bg-card-dark"],
html:not(.dark) footer[class*="bg-charcoal"],
html:not(.dark) footer[class*="bg-black"],
html:not(.dark) footer.bg-surface-dark,
html:not(.dark) footer.bg-obsidian,
html:not(.dark) footer.bg-card-dark,
html:not(.dark) footer.bg-charcoal {
  background-color: #e8e2d8 !important;
}

/* Textes dans footer : lisibles sur fond crème */
html:not(.dark) footer .text-slate-100,
html:not(.dark) footer .text-slate-200,
html:not(.dark) footer .text-slate-300,
html:not(.dark) footer .text-slate-400,
html:not(.dark) footer .text-slate-500,
html:not(.dark) footer .text-slate-600,
html:not(.dark) footer .text-ivory,
html:not(.dark) footer .text-antique-gold {
  color: #3d3020 !important;
}

/* Liens footer */
html:not(.dark) footer a {
  color: #6b5030 !important;
}
html:not(.dark) footer a:hover,
html:not(.dark) footer a.hover\:text-primary:hover {
  color: #9a6f2e !important;
}

/* Bordures footer */
html:not(.dark) footer [class*="border-primary"],
html:not(.dark) footer [class*="border-glass"] {
  border-color: rgba(138,100,40,0.2) !important;
}

/* Ambient glow → neutre en light */
html:not(.dark) .ambient-glow {
  background: radial-gradient(circle at 50% 50%, rgba(180,140,60,0.06) 0%, transparent 70%) !important;
}

/* Mobile nav en light */
@media (max-width: 640px) {
  html[data-theme="light"] .nav-list {
    background: rgba(248,245,240,0.97) !important;
  }
}
