/* ============================================================
   BASE.CSS – Variables CSS, Reset moderne, Typographie
   Bonege Conseil – Consultant en Services Bancaires
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */

:root {
  /* ── Couleurs principales ─────────────────────────────── */
  --color-navy:       #1B2E4A;   /* Navy profond – couleur de marque principale */
  --color-navy-dark:  #111F33;   /* Navy très sombre – hero, footer */
  --color-navy-mid:   #243654;   /* Navy intermédiaire – hover, accents */
  --color-navy-light: #334E74;   /* Navy clair – éléments secondaires */

  --color-gold:       #C9A96E;   /* Or chaud – accent premium */
  --color-gold-light: #E8D5B0;   /* Or pâle – backgrounds légers */
  --color-gold-dark:  #A88550;   /* Or foncé – hover states */
  --color-gold-muted: rgba(201, 169, 110, 0.15); /* Or transparent */

  --color-cream:      #F5F3EF;   /* Crème chaud – sections alternées */
  --color-cream-dark: #EDE9E3;   /* Crème foncé – borders sur fond crème */

  --color-white:      #FFFFFF;
  --color-off-white:  #FAFAFA;

  --color-text:         #1E1E1E;   /* Texte principal */
  --color-text-secondary: #5A6070; /* Texte secondaire */
  --color-text-muted:   #8A939B;   /* Texte discret */
  --color-text-light:   rgba(255, 255, 255, 0.88); /* Texte sur fond sombre */
  --color-text-light-muted: rgba(255, 255, 255, 0.60);

  --color-border:       #E5E2DB;   /* Bordures sur fond clair */
  --color-border-dark:  rgba(255, 255, 255, 0.12); /* Bordures sur fond sombre */

  /* ── Typographie ──────────────────────────────────────── */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-md:   1.125rem;   /* 18px */
  --fs-lg:   1.25rem;    /* 20px */
  --fs-xl:   1.5rem;     /* 24px */
  --fs-2xl:  1.875rem;   /* 30px */
  --fs-3xl:  2.25rem;    /* 36px */
  --fs-4xl:  3rem;       /* 48px */
  --fs-5xl:  3.75rem;    /* 60px */
  --fs-6xl:  4.5rem;     /* 72px */

  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  --lh-tight:  1.2;
  --lh-snug:   1.35;
  --lh-base:   1.6;
  --lh-relaxed: 1.75;

  --ls-tight: -0.025em;
  --ls-normal: 0;
  --ls-wide:  0.05em;
  --ls-wider: 0.08em;
  --ls-widest: 0.15em;

  /* ── Layout ───────────────────────────────────────────── */
  --container-max:  1200px;
  --container-pad:  1.5rem;
  --section-py:     5rem;
  --section-py-sm:  3rem;

  /* ── Espacements ──────────────────────────────────────── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ── Bordures & Rayons ────────────────────────────────── */
  --radius-sm:   4px;
  --radius-base: 6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Ombres ───────────────────────────────────────────── */
  --shadow-xs:  0 1px 3px rgba(17, 31, 51, 0.08);
  --shadow-sm:  0 2px 8px rgba(17, 31, 51, 0.10);
  --shadow-md:  0 8px 24px rgba(17, 31, 51, 0.12);
  --shadow-lg:  0 20px 48px rgba(17, 31, 51, 0.16);
  --shadow-xl:  0 32px 64px rgba(17, 31, 51, 0.20);
  --shadow-gold: 0 8px 32px rgba(201, 169, 110, 0.25);

  /* ── Transitions ──────────────────────────────────────── */
  --ease-base:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-slower: 600ms;

  --transition-base: var(--duration-base) var(--ease-base);
  --transition-slow: var(--duration-slow) var(--ease-base);

  /* ── Z-index ──────────────────────────────────────────── */
  --z-below:  -1;
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-nav:     300;
  --z-top:     400;
}

/* ============================================================
   2. MODERN CSS RESET
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Offset for fixed header (set via JS or hardcoded) */
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Skip to content (accessibilité) */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-weight: var(--fw-semi);
  border-radius: var(--radius-base);
  z-index: var(--z-top);
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: var(--space-4);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================================
   3. TYPOGRAPHIE DE BASE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-navy-dark);
}

h1 { font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl)); }
h2 { font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl)); }
h3 { font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-2xl)); }
h4 { font-size: clamp(var(--fs-lg), 2vw, var(--fs-xl)); }

p { line-height: var(--lh-relaxed); }

em {
  font-style: italic;
  color: var(--color-gold);
}

strong { font-weight: var(--fw-semi); }

/* Texte sélectionné */
::selection {
  background-color: var(--color-gold-muted);
  color: var(--color-navy-dark);
}

/* Focus visible pour accessibilité */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   4. UTILITAIRES GLOBAUX
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mt-2 { margin-top: var(--space-8); }
.mt-3 { margin-top: var(--space-12); }

.link-gold {
  color: var(--color-gold);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-base);
}

.link-gold:hover {
  text-decoration-color: var(--color-gold);
}
