/* ============================================================
   SHARED.CSS — Custodia Capital
   Styles communs à toutes les pages du site
============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-primary:        #0B1929;
  --bg-card:           #0E2236;
  --bg-card-alt:       #122A42;
  --gold:              #C9A84C;
  --gold-light:        #E8C97A;
  --gold-dim:          rgba(201, 168, 76, 0.15);
  --gold-border:       rgba(201, 168, 76, 0.2);
  --gold-border-hover: rgba(201, 168, 76, 0.55);
  --text-primary:      #F5F5F0;
  --text-secondary:    #9A9A8A;
  --text-muted:        #5A5A4A;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-xxl: 8rem;

  --max-width:  1200px;
  --nav-height: 72px;

  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a    { text-decoration: none; color: inherit; }
img, svg { display: block; }
ul   { list-style: none; }
section { padding-block: var(--space-xl); }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* ── Typography utilities ───────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-primary);
}

.section-title strong { font-weight: 600; }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-top: var(--space-sm);
  line-height: 1.7;
}

.section-header { text-align: center; margin-bottom: var(--space-lg); }
.section-header .section-subtitle { margin-inline: auto; }

.divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: var(--space-sm) auto 0;
  border-radius: 2px;
}

.text-center { text-align: center; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  /* Perf: only animate properties that actually change */
  will-change: transform, box-shadow;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0A0A;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(245, 245, 240, 0.25);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.82rem; }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  /* Perf: pre-promote animated layers */
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  /* Remove will-change after animation to free GPU memory */
  will-change: auto;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(11, 25, 41, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--gold-border);
}

/* Always visible on non-hero pages */
.nav--solid {
  background: rgba(11, 25, 41, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--gold-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.nav__logo { display: inline-flex; align-items: center; }
.nav__logo-img { height: 38px; width: auto; display: block; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  transition: color var(--transition);
}
.nav__link:hover   { color: var(--text-primary); }
.nav__link.active  { color: var(--gold); }

.nav__phone {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}
.nav__phone:hover { color: var(--gold-light); }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(11, 25, 41, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
  padding: var(--space-md);
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 999;
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link,
.nav__mobile .nav__phone {
  font-size: 1rem;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--gold-border);
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: #060F1A;
  border-top: 1px solid var(--gold-border);
  padding-block: var(--space-lg) var(--space-md);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__logo-img  { height: 44px; width: auto; display: block; margin-bottom: 0.75rem; }
.footer__brand-name { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-primary); }
.footer__tagline   { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; max-width: 260px; }

.footer__col-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.footer__list { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__list li      { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5; }
.footer__list li strong { color: var(--text-primary); font-weight: 500; }

/* Standardised gap — was inconsistent (0.6rem vs 0.75rem inline) */
.footer__list--contact { gap: 0.75rem; }

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
}
.footer__contact-item svg { width: 14px; height: 14px; stroke: var(--gold); flex-shrink: 0; }
.footer__contact-item a { transition: color var(--transition); }
.footer__contact-item a:hover { color: var(--gold); }

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }
.footer__legal a { font-size: 0.78rem; color: var(--text-muted); transition: color var(--transition); }
.footer__legal a:hover { color: var(--gold); }
.footer__copy  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Page header (shared by article + legal pages) ───────── */
.page-header { margin-bottom: var(--space-lg); }
.page-header__label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--space-sm);
}
.page-header__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300; line-height: 1.2; margin-bottom: var(--space-sm);
}
.page-header__title strong { font-weight: 600; }
.page-header__date { font-size: 0.82rem; color: var(--text-muted); }
.page-header__divider {
  width: 48px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin-top: var(--space-sm); border-radius: 2px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: var(--space-md);
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }

/* ── Info box (unified — was different on legal vs article pages) ─ */
.info-box {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
  margin-top: 0.75rem;
}
.info-box p   { font-size: 0.87rem; color: var(--text-secondary); margin: 0; line-height: 1.7; }
.info-box strong { color: var(--gold); }

/* ── Filter buttons (articles page) ─────────────────────── */
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--gold-border);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}

/* Article card hidden state (class-based, not inline style) */
.art-card--hidden { display: none; }

/* ── Grain texture overlay ───────────────────────────────── */
/* Donne de la profondeur et évite l'aspect "trop propre/digital" */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9990;
  mix-blend-mode: overlay;
}

/* ── Animated background orbs (hero) ────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.orb--gold {
  background: radial-gradient(circle, rgba(201,168,76,0.18) 0%, transparent 65%);
  filter: blur(70px);
  animation: orb-drift 14s ease-in-out infinite alternate;
}
.orb--blue {
  background: radial-gradient(circle, rgba(30,90,180,0.14) 0%, transparent 65%);
  filter: blur(90px);
  animation: orb-drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes orb-drift {
  0%   { transform: translate(0,    0)    scale(1);   }
  50%  { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-20px, 45px) scale(0.95); }
}

/* ── Enhanced card glow on hover ─────────────────────────── */
/* Applied globally — each page can override */
[class*="__card"]:hover,
[class*="sol-card"]:hover,
[class*="prod-card"]:hover {
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(201, 168, 76, 0.07),
    0 0  0 1px rgba(201, 168, 76, 0.12) !important;
}

/* ── Responsive — Navigation ─────────────────────────────── */
@media (max-width: 1023px) {
  .nav__links  { display: none; }
  .nav__burger { display: flex; }
}

/* ── Responsive — Footer ─────────────────────────────────── */
@media (min-width: 768px) {
  .footer__top { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .nav__burger { display: none; }
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer__legal  { justify-content: flex-end; }
}


/* ── Focus-visible (navigation clavier) ─────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }
