/* Cantine du Vigneron — night-lit hero (the late-night craving), paper-cream pages, wine as the single accent */
:root {
  --nuit: #1f2f3d;        /* bleu marine du lettrage du logo : pied de page */
  --nuit-2: #2c3f50;
  --papier: #fbf4e2;      /* crème du fond du logo */
  --papier-2: #f2e6c9;
  --encre: #1f2f3d;       /* bleu marine du logo */
  --encre-doux: #56606a;
  --vin: #8c1d2b;         /* rouge de la coupe de vin */
  --vin-fonce: #6e1521;
  --sanglier: #743d19;    /* brun du sanglier */
  --lampion: #f6dfb3;     /* blé clair : focus et lien actif sur fond foncé */
  --trait: #e2d4b2;
  --sur-nuit: #fbf4e2;
  --sur-nuit-doux: #e4dccb;
  --ok: #2f6b45;
  --alerte: #8a5a00;

  --f-titre: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --f-texte: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-xs: 0.8125rem;
  --t-s: 0.9375rem;
  --t-m: 1.0625rem;
  --t-l: 1.375rem;
  --t-xl: 1.875rem;
  --t-xxl: clamp(2.25rem, 5.5vw, 3.75rem);

  --largeur: 72rem;
  --rayon: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #161e26; --papier-2: #1f2a34; --encre: #f1e9d6; --encre-doux: #b9b2a2;
    --vin: #d9707f; --vin-fonce: #e68a97; --sanglier: #d99a6c; --trait: #33414d;
    --nuit: #0f161d; --nuit-2: #1c2833; --ok: #6fbf8a; --alerte: #e0b04f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #161e26; --papier-2: #1f2a34; --encre: #f1e9d6; --encre-doux: #b9b2a2;
    --vin: #d9707f; --vin-fonce: #e68a97; --sanglier: #d99a6c; --trait: #33414d;
    --nuit: #0f161d; --nuit-2: #1c2833; --ok: #6fbf8a; --alerte: #e0b04f;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: var(--t-m);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vin); text-underline-offset: 3px; }
a:hover { color: var(--vin-fonce); }
:focus-visible { outline: 3px solid var(--sanglier); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-titre); line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: var(--t-xxl); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--t-xl); font-weight: 700; }
h3 { font-size: var(--t-l); font-weight: 600; }
p { margin: 0; }

.enveloppe {
  max-width: var(--largeur);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.lien-evitement { position: absolute; left: -999px; }
.lien-evitement:focus { left: 16px; top: 16px; background: var(--papier); padding: 8px 12px; z-index: 50; }

/* ---------- En-tête ---------- */
.entete { background: var(--papier); color: var(--encre); border-bottom: 1px solid var(--trait); }
.entete .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.marque { display: flex; align-items: center; gap: 12px; color: var(--encre); text-decoration: none; }
.marque img { width: 52px; height: 52px; border-radius: 50%; }
.marque span { font-family: var(--f-titre); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.marque:hover { color: var(--sanglier); }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--encre); text-decoration: none; padding: 8px 12px; border-radius: var(--rayon); font-weight: 500; }
.nav a:hover { background: var(--papier-2); color: var(--encre); }
.nav a[aria-current="page"] { color: var(--sanglier); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-bouton { display: none; background: none; border: 1.5px solid var(--encre); color: var(--encre); border-radius: var(--rayon); padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .nav-bouton { display: block; }
  .nav { position: relative; }
  .nav ul { display: none; position: absolute; right: 0; top: calc(100% + 10px); flex-direction: column; background: var(--papier); border: 1px solid var(--trait); padding: 8px; border-radius: var(--rayon); min-width: 200px; z-index: 20; box-shadow: 0 12px 30px rgba(31,47,61,.18); }
  .nav.ouvert ul { display: flex; }
}

/* ---------- Héros nocturne (le moment signature) ---------- */
.heros {
  color: var(--sur-nuit); position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(31, 47, 61, .82) 0%, rgba(31, 47, 61, .58) 45%, rgba(31, 47, 61, .08) 85%),
    url("vignoble-rangs.jpg") center 62% / cover no-repeat, #1f2f3d;
}
.heros .enveloppe { padding-block: 112px 104px; display: grid; gap: 0; }
.heros h1 { color: #fffaf0; max-width: 15ch; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.heros .chapeau { font-size: 1.1875rem; color: #fbf4e2; max-width: 46ch; margin-top: 20px; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.heros .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 760px) {
  .heros { background:
    linear-gradient(180deg, rgba(31, 47, 61, .45) 0%, rgba(31, 47, 61, .72) 100%),
    url("vignoble-rangs.jpg") 45% 100% / cover no-repeat, #1f2f3d; }
  .heros .enveloppe { padding-block: 72px 64px; }
  }

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: var(--rayon); font: 600 var(--t-m) var(--f-texte); text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.bouton-plein { background: var(--sanglier); color: #fffaf0; }
.bouton-plein:hover { background: var(--encre); color: #fffaf0; }
.heros .bouton-plein { background: #fbf4e2; color: #1f2f3d; }
.heros .bouton-plein:hover { background: #ffffff; color: #743d19; }
.bouton-contour { border-color: currentColor; color: inherit; background: transparent; }
.heros .bouton-contour { color: #fbf4e2; }
.heros .bouton-contour:hover { color: #fff; }
.bouton[disabled] { opacity: .6; cursor: progress; }

/* ---------- Sections ---------- */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--trait); }
.section-tete { max-width: 40rem; margin-bottom: 36px; display: grid; gap: 12px; }
.section-tete p { color: var(--encre-doux); }

/* Menu de fin de soirée : une liste façon ardoise, pas des cartes */
.ardoise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.plat { padding-block: 22px; border-bottom: 1px dashed var(--trait); display: grid; gap: 6px; }
.plat h3 { display: flex; align-items: baseline; gap: 12px; }
.plat h3 small { font-family: var(--f-texte); font-size: var(--t-xs); font-weight: 500; color: var(--encre-doux); }
.plat p { color: var(--encre-doux); max-width: 46ch; }
.plat.vedette h3 { color: var(--vin); }
.ardoise .plat.vedette { grid-column: 1 / -1; }
.ardoise .plat.vedette p { max-width: 60ch; }
@media (max-width: 760px) { .ardoise { grid-template-columns: 1fr; } }

/* Déroulement : vraie séquence, donc numérotée */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: etape; }
.etapes li { counter-increment: etape; display: grid; gap: 8px; align-content: start; }
.etapes li::before { content: counter(etape); font-family: var(--f-titre); font-weight: 700; font-size: 2.5rem; color: var(--sanglier); line-height: 1; }
.etapes h3 { font-size: 1.125rem; }
.etapes p { color: var(--encre-doux); font-size: var(--t-s); }
@media (max-width: 900px) { .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .etapes { grid-template-columns: 1fr; } }

.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.deux-col > div { display: grid; gap: 16px; }
.deux-col p { color: var(--encre-doux); }
@media (max-width: 760px) { .deux-col { grid-template-columns: 1fr; gap: 32px; } }

.encadre { background: var(--papier-2); border-radius: var(--rayon); padding: 28px; display: grid; gap: 14px; }
.titre-encadre { font-size: var(--t-l); }
.coordonnees { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.coordonnees strong { display: block; font-size: var(--t-xs); color: var(--encre-doux); font-weight: 600; }

/* ---------- Pages intérieures ---------- */
.bandeau {
  color: var(--sur-nuit);
  background:
    linear-gradient(90deg, rgba(31, 47, 61, .86) 0%, rgba(31, 47, 61, .66) 60%, rgba(31, 47, 61, .4) 100%),
    url("vignoble-rangs.jpg") center 62% / cover no-repeat, #1f2f3d;
}
.bandeau .enveloppe { padding-block: 56px 48px; display: grid; gap: 14px; }
.texte-bandeau { display: grid; gap: 14px; }
.bandeau h1 { color: #fffaf0; font-size: clamp(2rem, 4.5vw, 3rem); max-width: 20ch; }
.bandeau p { color: #fbf4e2; max-width: 56ch; font-size: 1.125rem; }

/* ---------- Formulaires ---------- */
.reservation { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .reservation { grid-template-columns: 1fr; } }
form fieldset { border: 0; padding: 0; margin: 0 0 36px; display: grid; gap: 18px; min-width: 0; }
form legend { font-family: var(--f-titre); font-size: var(--t-l); font-weight: 700; padding: 0; margin-bottom: 4px; }
.champ { display: grid; gap: 6px; min-width: 0; align-content: start; }
.champ label, .champ .etiquette { font-weight: 600; font-size: var(--t-s); }
.champ .aide { font-size: var(--t-xs); color: var(--encre-doux); }
.rangee { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .rangee { grid-template-columns: 1fr; } }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--encre); background: var(--papier);
  border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 11px 12px; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--vin); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--vin) 22%, transparent); }
.choix { display: flex; flex-wrap: wrap; gap: 10px; }
.choix label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--trait); border-radius: var(--rayon); padding: 10px 14px; cursor: pointer; font-weight: 500; }
.choix input { accent-color: var(--vin); width: 18px; height: 18px; }
.choix label:has(input:checked) { border-color: var(--vin); background: color-mix(in srgb, var(--vin) 8%, transparent); }
.consentement { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-s); }
.consentement input { accent-color: var(--vin); width: 20px; height: 20px; margin-top: 3px; flex: none; }
.cache-robot { position: absolute; left: -9999px; }

/* Lignes de quantités */
.quantites { display: grid; gap: 0; border-top: 1px solid var(--trait); }
.qte { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding-block: 16px; border-bottom: 1px solid var(--trait); }
.qte .nom { font-weight: 700; font-family: var(--f-titre); font-size: 1.1875rem; }
.qte .detail { font-size: var(--t-xs); color: var(--encre-doux); }
.compteur { display: flex; align-items: center; border: 1.5px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.compteur button { width: 44px; height: 46px; border: 0; background: var(--papier-2); color: var(--encre); font-size: 1.375rem; cursor: pointer; }
.compteur button:hover { background: var(--trait); }
.compteur input { width: 72px; border: 0; border-radius: 0; text-align: center; min-height: 46px; padding: 0; font-variant-numeric: tabular-nums; font-weight: 700; -moz-appearance: textfield; }
.compteur input::-webkit-outer-spin-button, .compteur input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.outils-qte { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lien-bouton { background: none; border: 0; color: var(--vin); font: 600 var(--t-s) var(--f-texte); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }

/* Estimation (le ticket) */
.ticket { position: sticky; top: 16px; background: var(--papier-2); border-radius: var(--rayon); padding: 24px; display: grid; gap: 14px; border-top: 6px solid var(--vin); }
.ticket h2 { font-size: var(--t-l); }
.ticket dl { margin: 0; display: grid; gap: 8px; font-variant-numeric: tabular-nums; }
.ticket .ligne { display: flex; justify-content: space-between; gap: 12px; }
.ticket dt { color: var(--encre-doux); }
.ticket dd { margin: 0; font-weight: 600; }
.ticket .total { border-top: 1.5px solid var(--encre); padding-top: 10px; font-size: 1.1875rem; }
.ticket .total dt, .ticket .total dd { color: var(--encre); font-weight: 700; }
.ticket .depot dd { color: var(--vin); }
.ticket .mention { font-size: var(--t-xs); color: var(--encre-doux); }
.ticket .vide { color: var(--encre-doux); font-size: var(--t-s); }
.avis { font-size: var(--t-s); padding: 10px 12px; border-radius: var(--rayon); border-left: 4px solid var(--alerte); background: color-mix(in srgb, var(--alerte) 10%, transparent); }
.avis[data-etat="ok"] { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }

.envoi { display: grid; gap: 14px; }
.message-formulaire { padding: 18px 20px; border-radius: var(--rayon); background: color-mix(in srgb, var(--ok) 12%, transparent); border-left: 4px solid var(--ok); display: grid; gap: 6px; }
.message-formulaire.erreur { background: color-mix(in srgb, var(--vin) 10%, transparent); border-left-color: var(--vin); }
.message-formulaire h3 { font-size: 1.1875rem; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--trait); max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--trait); padding-block: 16px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.0625rem; }
.faq details p { margin-top: 10px; color: var(--encre-doux); }

/* Texte long (confidentialité) */
.texte { max-width: 44rem; display: grid; gap: 16px; }
.texte h2 { font-size: var(--t-l); margin-top: 20px; }
.texte ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 6px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: var(--sur-nuit-doux); font-size: var(--t-s); }
.pied .enveloppe { padding-block: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.pied a { color: var(--sur-nuit); }
.pied strong { color: var(--sur-nuit); font-family: var(--f-titre); font-size: 1.125rem; display: block; margin-bottom: 4px; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Bandeau d'aperçu (seulement hors du vrai domaine) */
.apercu { background: var(--lampion); color: #1b1407; font-size: var(--t-xs); text-align: center; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Photos (v2) ---------- */
figure { margin: 0; }
.photo { display: grid; gap: 10px; align-content: start; }
.photo img { width: 100%; border-radius: var(--rayon); }
.photo figcaption { font-size: var(--t-xs); color: var(--encre-doux); }
.heros h1 { font-size: clamp(2.75rem, 7vw, 5rem); max-width: 12ch; }
.histoire { align-items: start; }
@media (min-width: 761px) { .histoire .photo { position: sticky; top: 24px; } }
.recit { display: grid; gap: 14px; max-width: 62ch; }
.recit h2 { margin-bottom: 6px; }
.recit h3 { font-size: 1.1875rem; color: var(--sanglier); margin-top: 10px; }
.recit p { color: var(--encre-doux); }
.recit .chute { font-family: var(--f-titre); font-size: var(--t-l); font-weight: 600; color: var(--encre); line-height: 1.3; margin-top: 10px; }
.recit .signature { color: var(--encre); font-weight: 600; }
.sous-etapes { margin-top: 36px; }

/* Bandeau avec photo (mariages) */
.bandeau-photo .enveloppe { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.bandeau-photo .photo { justify-self: end; width: min(100%, 402px); }
.bandeau-photo .photo img { box-shadow: 0 0 0 6px rgba(251, 244, 226, .9); }
.bandeau-photo figcaption { color: #fbf4e2; }
@media (max-width: 760px) {
  .bandeau-photo .enveloppe { grid-template-columns: 1fr; }
  .bandeau-photo .photo { justify-self: start; }
}

/* Encadré de suggestion (bien visible) */
.suggestion { background: color-mix(in srgb, var(--vin) 9%, var(--papier)); border: 1.5px solid color-mix(in srgb, var(--vin) 35%, transparent); border-radius: var(--rayon); padding: 18px 20px; display: grid; gap: 12px; }
.suggestion p { font-weight: 600; }
.suggestion .aide { font-weight: 400; }
.suggestion .bouton { justify-self: start; }

/* Option sauce végé sous la poutine classique */
.qte-option { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 10px 14px; background: var(--papier-2); border-radius: var(--rayon); }
.qte-option label { font-size: var(--t-s); font-weight: 600; }
.qte-option .compteur button { height: 38px; width: 38px; }
.qte-option .compteur input { min-height: 38px; width: 60px; }
.ticket .sous-ligne dt, .ticket .sous-ligne dd { font-size: var(--t-xs); padding-left: 12px; }

/* ---------- Assistant « Une question? » ---------- */
.assistant-bouton {
  position: fixed; z-index: 40;
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 20px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sanglier); color: #fffaf0; font: 700 var(--t-m) var(--f-texte);
  box-shadow: 0 8px 24px rgba(31, 47, 61, .28);
}
.assistant-bouton:hover { background: var(--encre); }
.assistant-bouton.ouvert { display: none; }
.assistant-panneau {
  position: fixed; z-index: 41;
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 16px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px));
  display: flex; flex-direction: column;
  background: var(--papier); color: var(--encre); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(31, 47, 61, .3); overflow: hidden;
}
.assistant-panneau[hidden] { display: none !important; }
.assistant-tete { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--nuit); color: #fbf4e2; }
.assistant-tete img { border-radius: 50%; flex: none; }
.assistant-tete div { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.assistant-tete strong { font-family: var(--f-titre); font-size: 1.0625rem; }
.assistant-tete span { font-size: var(--t-xs); opacity: .85; }
.assistant-fermer { background: none; border: 0; color: inherit; font-size: 1.75rem; line-height: 1; width: 40px; height: 40px; cursor: pointer; border-radius: 6px; }
.assistant-fermer:hover { background: rgba(255,255,255,.12); }
.assistant-fil { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.assistant-msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: var(--t-s); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-assistant { align-self: flex-start; background: var(--papier-2); border-bottom-left-radius: 4px; }
.assistant-client { align-self: flex-end; background: var(--encre); color: var(--papier); border-bottom-right-radius: 4px; }
.assistant-attente { color: var(--encre-doux); letter-spacing: .2em; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.assistant-suggestions[hidden] { display: none; }
.assistant-suggestions button { font: 500 var(--t-xs) var(--f-texte); color: var(--sanglier); background: transparent; border: 1.5px solid color-mix(in srgb, var(--sanglier) 45%, transparent); border-radius: 999px; padding: 6px 10px; cursor: pointer; text-align: left; }
.assistant-suggestions button:hover { background: color-mix(in srgb, var(--sanglier) 10%, transparent); }
.assistant-saisie { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--trait); align-items: flex-end; }
.assistant-saisie textarea { min-height: 44px; max-height: 120px; resize: none; padding: 10px 12px; font-size: var(--t-s); }
.assistant-saisie .bouton { min-height: 44px; padding: 10px 14px; font-size: var(--t-s); }
.assistant-avis { font-size: 0.75rem; color: var(--encre-doux); padding: 0 14px 10px; }
