/* ==========================================================================
   Vinoko — feuille de style du site vitrine (vinoko.app)

   Direction « Cave de nuit » (PRD v2 §4.1) : dark-first premium. Le SOMBRE est
   le défaut et la référence de design — le clair n'est plus qu'une option que
   l'on sert aux visiteurs qui l'ont demandé au système.
   Site statique, sans dépendance externe.
   ========================================================================== */

:root {
  /* Palette « Cave de nuit » — source de vérité : PRD §4.1 */
  --bordeaux: #9e2b3e;        /* primary : actions, liens, éléments actifs */
  --bordeaux-dark: #5e1725;   /* primaryDeep : dégradés, états pressés */
  --bordeaux-light: #c0687a;
  --gold: #d9b45b;            /* accent : badges, chiffres clés */
  --gold-light: #edd9a3;

  /* Neutres — SOMBRE PAR DÉFAUT */
  --bg: #171114;              /* chocolat noir, pas un noir pur */
  --surface: #241a1e;         /* cartes */
  --surface-elevated: #1e1518;/* sections alternées */
  --text: #f5ede2;            /* ivoire */
  --text-muted: #b8a99c;
  --border: rgba(217, 180, 91, 0.25);  /* borderGold : bordure fine, pas d'ombre */
  --shadow: none;             /* §4.3 : bordures fines PLUTÔT que des ombres */

  /* Conservés : d'anciennes règles s'y réfèrent encore. */
  --champagne: #1e1518;
  --champagne-deep: #241a1e;

  --radius: 14px;             /* §4.3 : coins des cartes */
  --radius-sm: 10px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

/* Mode clair : option explicite du visiteur, pas la référence (§4.1). */
@media (prefers-color-scheme: light) {
  :root {
    --bordeaux: #8a2233;
    /* Ce bloc oubliait `--bordeaux-light`, qui gardait donc sa valeur « cave de
       nuit » (#c0687a) — un rose pâle pensé POUR du fond sombre. Or c'est la
       couleur des liens (`a`, plus bas), et le mode sombre la remplace par
       `--gold-light` : elle ne servait donc QU'en mode clair, sur du blanc, à
       3,82:1. Sous les 4,5:1 exigés — Lighthouse le signalait le 17/07/2026.
       Mesuré, pas estimé : #b53a55 rend 5,67:1 sur --surface et 5,31:1 sur --bg,
       tout en restant plus clair que --bordeaux (le dégradé de .btn-primary va
       de l'un à l'autre et doit rester visible). */
    --bordeaux-light: #b53a55;
    /* `--bordeaux-dark` et `--gold-light` ne sont volontairement PAS redéfinis :
       le premier ne sert qu'au dégradé du panneau CTA, sombre dans les deux
       thèmes ; le second à l'étiquette du héros, posée sur l'image sombre, et à
       `.card .ico` sous `prefers-color-scheme: dark`. Les redéfinir « pour
       symétrie » casserait ces trois-là. */
    --gold: #b8923d;
    --bg: #fbf7ef;
    --surface: #ffffff;
    --surface-elevated: #f3ecdd;
    --text: #241a1c;
    --text-muted: #6b5d5f;
    --border: #e7ddcb;
    --shadow: 0 10px 30px rgba(63, 14, 24, 0.10);
    --champagne: #f7edd8;
    --champagne-deep: #efe0bd;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 88% -6%, rgba(200, 162, 74, 0.12), transparent 60%),
    radial-gradient(760px 420px at -12% 34%, rgba(125, 38, 55, 0.07), transparent 60%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 0.6em; }
h3 { font-size: 1.25rem; margin: 0 0 0.4em; }

a { color: var(--bordeaux-light); text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: var(--gold-light); } }

p { margin: 0 0 1em; }

img { max-width: 100%; height: auto; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

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

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .glass { color: var(--bordeaux-light); }
@media (prefers-color-scheme: dark) { .brand .glass { color: var(--gold); } }
.nav a { color: var(--text-muted); margin-left: 22px; font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav a { margin-left: 14px; font-size: 0.85rem; } }

/* -------------------------------------------------------------------------- */
/* Boutons                                                                    */
/* -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--bordeaux), var(--bordeaux-light)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

/* Héro : photo de cave plein cadre, sous un voile dégradé (§4.4).
   La photo est posée en <img> et non en background-image : le navigateur peut
   ainsi choisir la bonne taille via srcset et la précharger. */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg);
  color: #fdf7ec;
}
.hero-photo {
  position: absolute; inset: 0; margin: 0;
  z-index: 0;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
  display: block;
}
/* Voile : #171114 à 85 % en bas, transparent en haut (§4.4) — le texte doit
   rester lisible quelle que soit la zone de la photo qui passe dessous. */
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(23,17,20,0.55) 0%, rgba(23,17,20,0.75) 45%, rgba(23,17,20,0.92) 100%),
    linear-gradient(90deg, rgba(23,17,20,0.85) 0%, rgba(23,17,20,0.35) 60%, transparent 100%);
}
.hero .container {
  position: relative; z-index: 1;
  padding-top: 96px; padding-bottom: 104px;
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: 36px; align-items: center;
  max-width: min(var(--maxw), 100%);
}
.hero .container > div { max-width: 62ch; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #f0dcc6; max-width: 52ch; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.eyebrow {
  display: inline-block; letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 0.78rem; font-weight: 700; color: var(--gold-light);
  border: 1px solid rgba(200,162,74,0.4); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}

@media (max-width: 760px) {
  .hero .container { gap: 20px; padding-top: 64px; padding-bottom: 72px; }
  /* En étroit la photo est cadrée serré : on assombrit franchement, sinon le
     titre passe sur les bouteilles éclairées du fond. */
  .hero-photo::after {
    background: linear-gradient(180deg, rgba(23,17,20,0.7) 0%, rgba(23,17,20,0.9) 100%);
  }
}

/* -------------------------------------------------------------------------- */
/* Sections & cartes                                                          */
/* -------------------------------------------------------------------------- */

section { padding: 72px 0; }
.section-head { text-align: center; max-width: 42ch; margin: 0 auto 44px; }
.section-head p { color: var(--text-muted); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
a.card:hover, .grid > .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(63, 14, 24, 0.16);
  text-decoration: none;
}
.card .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 14px;
  background: linear-gradient(150deg, var(--champagne), var(--champagne-deep));
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--bordeaux);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
@media (prefers-color-scheme: dark) {
  .card .ico { color: var(--gold-light); box-shadow: none; }
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }

.alt { background: var(--champagne); }
@media (prefers-color-scheme: dark) { .alt { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); } }

/* Section image + texte (la cave illustrée) */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px; align-items: center;
}
.split figure { margin: 0; }
.split img { display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { margin-top: 0; }
.split p { color: var(--text-muted); }
.split ul { color: var(--text-muted); padding-left: 1.2em; margin: 0 0 1em; }
.split li { margin-bottom: 0.5em; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Cartes d'articles (blog) */
.card-post { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-post img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-post .card-body { padding: 20px 22px 24px; }
.card-post h3 { font-size: 1.15rem; }
.card-post .card-body p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* Image d'en-tête d'article */
.article-hero { margin: 1.6em 0 2em; }
.article-hero img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* CTA final */
.cta { text-align: center; }
.cta .card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(560px 240px at 12% 118%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 65%),
    linear-gradient(160deg, var(--bordeaux-dark), var(--bordeaux));
  color: #fff; padding: 48px 28px; border: none;
}
.cta .card:hover { transform: none; box-shadow: var(--shadow); }
.cta .card h2 { color: #fff; }
.cta .card p { color: #f0dcc6; }
.cta .btn-primary { background: #fff; color: var(--bordeaux); margin-top: 10px; }
.cta .btn-primary:hover { color: var(--bordeaux); }

/* -------------------------------------------------------------------------- */
/* Pages légales (contenu long)                                               */
/* -------------------------------------------------------------------------- */

.legal { padding: 56px 0 80px; }
.legal .container { max-width: 780px; }
.legal h1 { margin-bottom: 0.2em; }
.legal .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2.4em; }
.legal h2 { margin-top: 1.8em; font-size: 1.5rem; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal ol { padding-left: 1.4em; }
/* Passerelles d'import (N1) : correspondance des colonnes */
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal th { color: var(--text-muted); font-weight: 600; }
.legal td:first-child { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; }
@media (max-width: 560px) { .legal td:first-child { white-space: normal; } }
.legal .callout {
  background: var(--champagne); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.4em 0;
}
@media (prefers-color-scheme: dark) { .legal .callout { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); } }

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border); padding: 40px 0; margin-top: 20px;
  color: var(--text-muted); font-size: 0.92rem;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer nav a { color: var(--text-muted); margin-right: 18px; }
.site-footer nav a:hover { color: var(--text); }
