/* =====================================================================
   VIB — Design System
   Valeurs extraites de la maquette https://vib-site.vercel.app/
   (via Playwright getComputedStyle, voir scripts/capture-ref.mjs)
   ===================================================================== */

:root {
  /* === Couleurs === */
  --color-bg:           #FEFEFE;
  --color-bg-alt:       #FBF8F4;     /* cream — sections alternées */
  --color-text:         #2D2D2D;     /* body */
  --color-text-strong:  #0F0F0F;     /* titres + footer */
  --color-text-muted:   #6B7280;
  --color-accent:       #AC2C26;     /* rouge basque — eyebrows, CTA, VIB highlight */
  --color-accent-hover: #8A231F;
  --color-on-dark:      #FFFFFF;
  --color-border:       #E5E2DC;
  --color-overlay:      rgba(0, 0, 0, 0.4);

  /* États */
  --color-success:      #16A34A;     /* badge "Disponible" / "Ouvert" */
  --color-warning:      #C97A2D;     /* badge "Fermé" */

  /* === Typographies === */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* === Tailles (desktop par défaut, mobile via media query) === */
  --fs-hero:       96px;
  --fs-h2:         48px;
  --fs-h2-cta:     60px;     /* CTA final */
  --fs-h3:         18px;
  --fs-lead:       18px;     /* sous-titre hero */
  --fs-body:       16px;
  --fs-small:      14px;
  --fs-xs:         12px;
  --fs-eyebrow:    14px;
  --fs-scroll:     10px;

  /* line-heights */
  --lh-hero:       1.05;
  --lh-h2:         1.0;
  --lh-h2-loose:   1.25;     /* H1 hero a un line-height 1.05, le H2 annuaire 1.25 */
  --lh-h3:         1.55;
  --lh-body:       1.5;
  --lh-lead:       1.625;
  --lh-small:      1.625;

  /* letter-spacings */
  --ls-hero:       -2.4px;
  --ls-h2:         -1.2px;
  --ls-h2-cta:     -1.5px;
  --ls-eyebrow:    2.8px;    /* 0.2em sur 14px */
  --ls-scroll:     3px;
  --ls-normal:     0;

  /* weights */
  --fw-regular:    400;
  --fw-medium:     500;
  --fw-semibold:   600;
  --fw-bold:       700;
  --fw-black:      800;

  /* === Spacings === */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;
  --space-11: 160px;

  /* Section padding (vertical) */
  --section-py:        128px;
  --section-py-cta:    160px;

  /* Container */
  --container-max:     1280px;
  --container-px:      24px;

  /* === Radius === */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-card:  16px;       /* rounded-2xl maquette */
  --radius-xl:    24px;
  --radius-full:  9999px;

  /* === Ombres === */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.12);

  /* === Transitions === */
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* === Header === */
  --header-h: 72px;
}

/* Breakpoint mobile : tailles plus petites */
@media (max-width: 767px) {
  :root {
    --fs-hero:    48px;
    --fs-h2:      36px;
    --fs-h2-cta:  36px;
    --fs-lead:    16px;

    --ls-hero:    -1.2px;
    --ls-h2:      -0.9px;
    --ls-h2-cta:  -0.9px;

    --section-py:     96px;
    --section-py-cta: 128px;

    --container-px: 16px;
  }
}

/* =====================================================================
   Reset & base
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link accessibilité */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-text-strong);
  color: var(--color-on-dark);
  padding: var(--space-3) var(--space-5);
  z-index: 100;
  font-weight: var(--fw-semibold);
}
.skip-link:focus { top: 0; }

/* =====================================================================
   Container & layout helpers
   ===================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
}
.section--cream { background: var(--color-bg-alt); }
.section--white { background: var(--color-bg); }

/* Eyebrow réutilisable */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

/* Titres de section (h2) */
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--color-text-strong);
  margin-bottom: var(--space-5);
}

.section-lead {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-lead);
  color: var(--color-text-muted);
  max-width: 640px;
  margin-bottom: var(--space-8);
}

/* =====================================================================
   Buttons
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-base);
  text-align: center;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary — rouge plein */
.btn--primary {
  background: var(--color-accent);
  color: var(--color-on-dark);
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Outline blanc sur fond sombre (hero, CTA final) */
.btn--outline-light {
  background: transparent;
  color: var(--color-on-dark);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-on-dark);
}

/* Outline foncé sur fond clair */
.btn--outline-dark {
  background: transparent;
  color: var(--color-text-strong);
  border-color: var(--color-text-strong);
}
.btn--outline-dark:hover {
  background: var(--color-text-strong);
  color: var(--color-on-dark);
}

/* Ghost (lien rouge avec flèche) */
.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: transparent;
  padding: var(--space-2) var(--space-3);
}
.btn--ghost:hover {
  color: var(--color-accent-hover);
}

/* =====================================================================
   Badges
   ===================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: var(--radius-full);
}
.badge--category {
  background: var(--color-accent);
  color: var(--color-on-dark);
}
.badge--open {
  background: var(--color-success);
  color: var(--color-on-dark);
}
.badge--closed {
  background: var(--color-warning);
  color: var(--color-on-dark);
}
.badge--available {
  background: var(--color-success);
  color: var(--color-on-dark);
}

/* Petit point de statut */
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
