/* ============================================================
   BASE.CSS — Variables · Reset · Typographie · Atomes
   Wild Valley Ouirgane
   ============================================================ */

/* ------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Palette — earthy luxury */
  --c-forest:       #1C3829;
  --c-forest-mid:   #2D5A40;
  --c-forest-lt:    #3D7A57;
  --c-gold:         #C9943A;
  --c-gold-lt:      #E8B96A;
  --c-gold-dim:     rgba(201,148,58,0.14);
  --c-cream:        #F7F2EA;
  --c-cream-dk:     #EDE5D4;
  --c-stone:        #8A7F72;
  --c-stone-lt:     #BDB5AA;
  --c-white:        #FFFFFF;
  --c-dark:         #0A1510;
  --c-text:         #2A2A2A;
  --c-text-lt:      #5E5A55;

  /* Typographie — distinctive pairing: Playfair + DM Sans */
  --f-serif:      'Playfair Display', Georgia, serif;
  --f-cormorant:  'Cormorant Garamond', Georgia, serif;
  --f-sans:       'DM Sans', system-ui, sans-serif;

  /* Espacement — système 8dp strict */
  --s-1:  4px;  --s-2:  8px;  --s-3:  12px;
  --s-4:  16px; --s-5:  20px; --s-6:  24px;
  --s-8:  32px; --s-10: 40px; --s-12: 48px;
  --s-16: 64px; --s-20: 80px; --s-24: 96px; --s-30: 120px;

  /* Border radius */
  --r-sm:   6px;
  --r-md:   14px;
  --r-lg:   24px;
  --r-xl:   40px;
  --r-pill: 999px;

  /* Ombres — cohérentes avec la palette */
  --sh-sm:   0 2px 12px rgba(28,56,41,0.08);
  --sh-md:   0 6px 30px rgba(28,56,41,0.14);
  --sh-lg:   0 14px 52px rgba(28,56,41,0.20);
  --sh-xl:   0 28px 80px rgba(28,56,41,0.28);
  --sh-gold: 0 8px 32px rgba(201,148,58,0.32);

  /* Easing — physics-based per skill */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:    1;
  --z-raised:  10;
  --z-overlay: 100;
  --z-nav:     500;
  --z-loader:  9999;
}

/* ------------------------------------------------------------
   2. RESET MODERNE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* scroll-behavior: smooth retiré — Lenis gère le scroll fluide */
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--c-cream-dk); }
::-webkit-scrollbar-thumb { background: var(--c-forest-mid); border-radius: 3px; }

/* Sélection */
::selection { background: var(--c-gold); color: var(--c-white); }

/* Elements */
img, video, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
p { max-width: 68ch; }

/* Focus visible — accessible */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Reduced motion — respecter la préférence */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------
   3. TYPOGRAPHIE SYSTÈME
   ------------------------------------------------------------ */

.t-display {
  font-family: var(--f-serif);
  font-size: clamp(3.4rem, 8.5vw, 7.2rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.t-h1 {
  font-family: var(--f-serif);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.t-h2 {
  font-family: var(--f-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.22;
}

.t-quote {
  font-family: var(--f-cormorant);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.72;
}

.t-body {
  font-size: 1.02rem;
  line-height: 1.80;
  color: var(--c-text-lt);
}

.t-label {
  font-family: var(--f-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.t-h1 em, .t-display em { font-style: italic; color: var(--c-gold); }

/* Utilitaires couleur */
.c-gold    { color: var(--c-gold); }
.c-gold-lt { color: var(--c-gold-lt); }
.c-forest  { color: var(--c-forest); }
.c-white   { color: var(--c-white); }

/* ------------------------------------------------------------
   4. COMPOSANTS ATOMIQUES
   ------------------------------------------------------------ */

/* Section label avec trait */
.sec-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--c-gold);
  margin-bottom: var(--s-3);
}
.sec-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}
.sec-label--light { color: var(--c-gold-lt); }
.sec-label--center { justify-content: center; }
.sec-label--center::before { display: none; }
.sec-label--center::after {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* Boutons — touch target min 48px (>44px WCAG) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 14px 36px;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 0.80rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-decoration: none;
  /* RULE: only transform + opacity — jamais width/height/top/left */
  transition:
    transform 0.3s var(--ease-out),
    background 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn--primary {
  background: var(--c-gold);
  color: var(--c-white);
  box-shadow: var(--sh-gold);
}
.btn--primary:hover {
  background: var(--c-gold-lt);
  box-shadow: 0 12px 40px rgba(201,148,58,0.45);
}

.btn--outline-light {
  color: var(--c-white);
  border: 1.5px solid rgba(255,255,255,0.38);
  backdrop-filter: blur(8px);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.65);
}

.btn--outline-dark {
  color: var(--c-forest);
  border: 1.5px solid var(--c-forest);
}
.btn--outline-dark:hover {
  background: var(--c-forest);
  color: var(--c-white);
}

.btn--lg { min-height: 56px; padding: 18px 52px; font-size: 0.88rem; }

/* Tag / pill */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag--gold   { background: var(--c-gold-dim); border: 1px solid rgba(201,148,58,0.28); color: var(--c-gold-lt); }
.tag--cream  { background: var(--c-cream-dk); color: var(--c-text-lt); }
.tag--forest { background: var(--c-forest); color: var(--c-white); }

/* Divider décoratif */
.divider {
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-lt));
  border-radius: 2px;
}
