/* ================================================================
   Come'L — Foundations (colors, type, spacing)
   Source de vérité des tokens. Liée depuis chaque page.
   ================================================================ */

/* -------- Fonts (self-hosted) -------- */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/CormorantGaramond-MediumItalic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/CormorantGaramond-SemiBoldItalic.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/CormorantGaramond-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
}
/* Google Fonts CDN backstops Inter weights 500–700 (Inter-Variable.woff2 ici
   ne couvre que le poids 400). Remplacer par le vrai variable woff2 en prod. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&display=swap");

/* -------- Tokens -------- */
:root {
  /* Color — base */
  --cream:      #FBF7F0;
  --sand:       #F1E9D9;
  --sand-rule:  #E8DFC9;
  --ink:        #1F1A17;
  --ink-muted:  #6B5E54;
  --gold:       #C8A96E;
  --gold-deep:  #A8884A;
  --gold-soft:  rgba(200, 169, 110, 0.18);  /* bandeau saisonnier */
  --bordeaux:   #8A1F2B;
  --white:      #FFFFFF;

  /* Color — semantic */
  --bg:           var(--cream);
  --bg-alt:       var(--sand);
  --fg:           var(--ink);
  --fg-muted:     var(--ink-muted);
  --accent:       var(--gold);
  --accent-deep:  var(--gold-deep);
  --alert:        var(--bordeaux);
  --rule:         var(--sand-rule);

  /* Type — families */
  --font-serif:  "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans:   "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Type — sizes (mobile-first; fluid) */
  --fs-display:  clamp(2.25rem, 4vw + 1rem, 4rem);     /* 36–64 */
  --fs-h1:       clamp(2rem,   3vw + 1rem, 3.25rem);   /* 32–52 */
  --fs-h2:       clamp(1.6rem, 2vw + 1rem, 2.25rem);   /* 26–36 */
  --fs-h3:       clamp(1.25rem, 1vw + 1rem, 1.5rem);   /* 20–24 */
  --fs-lede:     clamp(1.0625rem, 0.5vw + 0.875rem, 1.25rem); /* 17–20 */
  --fs-body:     1rem;          /* 16 */
  --fs-body-lg:  1.0625rem;     /* 17 */
  --fs-small:    0.875rem;      /* 14 */
  --fs-caption:  0.8125rem;     /* 13 */
  --fs-eyebrow:  0.75rem;       /* 12 */

  /* Type — leading */
  --lh-display: 1.05;
  --lh-heading: 1.15;
  --lh-body:    1.65;
  --lh-tight:   1.3;

  /* Type — tracking */
  --ls-display: -0.01em;
  --ls-eyebrow: 0.16em;

  /* Spacing scale (base 4) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* Radii */
  --r-1: 2px;
  --r-2: 6px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 6px 24px -10px rgba(31, 26, 23, 0.12);
  --shadow-lightbox: 0 24px 80px rgba(31, 26, 23, 0.45);

  /* Layout */
  --container-max: 1200px;
  --gutter:        24px;
  --gutter-lg:     48px;

  /* Motion */
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --dur-quick:     150ms;
  --dur-base:      200ms;
  --dur-slow:      400ms;
}

/* -------- Base -------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }

/* -------- Semantic type -------- */
h1, .h1, .display-1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
h2, .h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-display);
  margin: 0 0 var(--s-5);
  text-wrap: balance;
}
h3, .h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  margin: 0 0 var(--s-4);
}
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-3);
}
p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}
.lede {
  font-size: var(--fs-lede);
  line-height: var(--lh-body);
  color: var(--fg-muted);
}
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: var(--s-4);
}
.eyebrow--bordeaux { color: var(--bordeaux); }
.caption {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
}
small, .small { font-size: var(--fs-small); }

/* Mot-clé soulignage « marker » or */
.marker {
  background-image: linear-gradient(transparent 62%, rgba(200, 169, 110, 0.45) 62%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.05em;
}

/* Links */
a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-quick) var(--ease);
}
a:hover { color: var(--ink); }

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

/* Layout helpers */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 1024px) {
  .container { padding: 0 var(--gutter-lg); }
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-7) 0;
}

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