/* /css/base.css */
/* ============================================================
   BASE — Variables · Reset · Typographie · Boutons
   ============================================================ */

/* --- Variables & Design Tokens --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors in OKLCH */
  --red: oklch(52.79% 0.2312 28.53);
  --placeholder: oklch(44% 0.01 250);
  --red-dark: oklch(43.5% 0.193 28.53);
  --red-light: oklch(96.5% 0.015 28.53);
  --red-bright: oklch(63% 0.24 28.53);
  --white: oklch(100% 0 0);
  --grey-50: oklch(98.2% 0.002 250);
  --grey-100: oklch(96% 0.002 250);
  --grey-200: oklch(91.2% 0.002 250);
  --grey-400: oklch(74.5% 0.005 250);
  --grey-600: oklch(51.8% 0.008 250);
  --grey-800: oklch(27.4% 0.01 250);
  --black: oklch(14.5% 0.01 250);

  /* Accentuation Or Champagne */
  --champagne-gold: oklch(83.5% 0.088 81.3);
  /* Champagne-gold light using relative colors */
  --champagne-gold-light: oklch(from var(--champagne-gold) l c h / 0.4);
  --champagne-cream: oklch(98.5% 0.012 81.3);

  /* Typography Design Tokens */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --font: var(--font-body);
  /* compatibility */

  --fs-display: clamp(38px, 5.5vw, 68px);
  --fs-headline: clamp(24px, 3.5vw, 38px);
  --fs-title: 17px;
  --fs-body: 16px;
  --fs-label: 12px;

  --fw-bold: 700;
  --fw-semibold: 600;
  --fw-regular: 400;

  /* Spacing Design Tokens (8px Grid) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;

  /* Elevation & Border Radius Tokens */
  --max-w: 1180px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius: var(--radius-md);
  /* compatibility */

  /* Modern relative color shadow tokens */
  --shadow-sm: 0 1px 4px oklch(from var(--black) l c h / 0.07);
  --shadow-md: 0 4px 20px oklch(from var(--black) l c h / 0.10);
  --shadow-lg: 0 8px 40px oklch(from var(--black) l c h / 0.13);

  --header-h: 100px;

  /* Animations — exponential ease (Impeccable) */
  --ease-impeccable: cubic-bezier(0.19, 1, 0.22, 1);
}

/* --- Reset & Base --- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Fallback */
  overflow-x: clip;
  /* Empêche le défilement horizontal sans casser le sticky header */
}

section[id] {
  scroll-margin-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--grey-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Fallback pour les anciens navigateurs */
  overflow-x: clip;
  /* Empêche le défilement horizontal sans bloquer la position sticky du header */
}

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

img,
svg {
  display: block;
}

input,
select,
textarea,
button {
  font-family: var(--font-body);
}

/* --- Accessibility Focus --- */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.btn:focus-visible {
  outline-color: var(--black);
}

.nav a:focus-visible {
  outline-offset: 8px;
}

/* --- Hidden attribute --- */
[hidden] {
  display: none !important;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 calc(var(--space-md) + env(safe-area-inset-right, 0px)) 0 calc(var(--space-md) + env(safe-area-inset-left, 0px));
}

/* --- Typography utilities --- */
.text-red {
  color: var(--red);
}

.section-eyebrow {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-headline);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 14px;
  text-wrap: balance;
}

.section-sub {
  font-size: var(--fs-title);
  color: var(--grey-600);
  max-width: 560px;
  margin: 0 auto;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s var(--ease-impeccable), border-color .2s var(--ease-impeccable), box-shadow .2s var(--ease-impeccable), transform .15s var(--ease-impeccable);
  white-space: nowrap;
}

.btn--red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn--red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(from var(--red) l c h / 0.30);
}

.btn--outline-red {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.btn--outline-red:hover {
  background: var(--red);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--grey-800);
  border-color: var(--grey-200);
}

.btn--ghost:hover {
  background: var(--grey-100);
  border-color: var(--grey-400);
}

.btn--full {
  width: 100%;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--black);
  color: var(--white);
  padding: 10px 20px;
  z-index: 999;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease-out;
}

.skip-link:focus {
  top: 0;
}

/* --- Reduced Motion --- */
@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;
  }
}