/* Le Jardin — piste « Comptoir » (2026-11-28). Écrit pour ce site. */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --fond: #F3F5F4;
  --surface: #FFFFFF;
  --encre: #111111;
  --doux: #4A504D;
  --ligne: #CBD2CF;
  --accent: #6B1E3A;
  --accent-fonce: #521329;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* échelle des tailles (une seule) */
  --t-rep: 0.875rem;   /* 14 */
  --t-corps: 1.0625rem;/* 17 */
  --t-chapo: 1.3125rem;/* 21 */
  --t-h3: 1.75rem;     /* 28 */
  --t-h2: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);   /* 36 → 56 */
  --t-h1: clamp(3rem, 1.9rem + 4.8vw, 5.5rem);      /* 48 → 88 */

  /* espacements (une seule échelle) */
  --e1: 0.5rem; --e2: 1rem; --e3: 1.5rem; --e4: 2.5rem; --e5: 4rem; --e6: 6.5rem;
  --largeur: 76rem;
  --marge: clamp(1rem, 0.4rem + 3vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
/* garde-fou : rien ne doit jamais faire glisser la page de gauche à droite (clip, pas hidden : le menu collant continue de coller) */
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 400 var(--t-corps)/1.6 var(--sans); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
ul, ol { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }  /* sinon un display du CSS l emporte sur l attribut hidden */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saut { position: absolute; left: var(--marge); top: -4rem; z-index: 10; background: var(--encre); color: #fff; padding: var(--e1) var(--e2); }
.saut:focus { top: var(--e1); }

.rep { font: 500 var(--t-rep)/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--doux); }
.chapo { font-size: var(--t-chapo); line-height: 1.45; color: var(--doux); max-width: 34ch; }
.cadre { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge); }

/* Bandeau de démonstration */
.demo { margin: 0; padding: var(--e1) var(--marge); background: var(--encre); color: #fff; font-size: var(--t-rep); text-align: center; }

/* En-tête */
.haut {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: var(--e2);
  max-width: var(--largeur); margin-inline: auto; padding: var(--e2) var(--marge);
  background: color-mix(in srgb, var(--fond) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.logo { font: 400 1.75rem/1 var(--serif); text-decoration: none; }
.haut nav { display: flex; align-items: center; gap: var(--e3); }
.haut nav a:not(.bouton) { text-decoration: none; padding-block: var(--e1); }
.haut nav a[aria-current="page"]:not(.bouton) { text-decoration: underline; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: 0.75rem 1.5rem; border: 1px solid var(--accent); border-radius: 0;
  background: var(--accent); color: #fff; font: 500 var(--t-corps)/1 var(--sans);
  text-decoration: none; cursor: pointer; transition: background-color .2s;
}
.bouton:hover { background: var(--accent-fonce); color: #fff; }
.bouton-clair { background: transparent; color: var(--accent); }
.bouton-clair:hover { background: var(--accent); color: #fff; }
.bouton-petit { min-height: 2.75rem; padding: 0.5rem 1.125rem; font-size: 1rem; }
.lien-tel { color: var(--doux); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2) var(--e3); margin-top: var(--e4); }

/* Plats (ligne pointillée jusqu'au prix) */
.plats { display: grid; gap: var(--e3); }
.plat-tete { display: flex; align-items: baseline; gap: var(--e1); }
.plat-nom { font: 400 1.5rem/1.2 var(--serif); }
.plat-points { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--ligne); transform: translateY(-0.3em); }
.plat-prix { font-variant-numeric: tabular-nums; white-space: nowrap; }
.plat-desc { color: var(--doux); margin-top: 0.25rem; max-width: 46ch; }

/* ---------- Accueil : la scène (texte à gauche, betterave à droite) ---------- */
.scene { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e5); }
.scene-objet { position: relative; }
.betterave { position: sticky; top: 12vh; margin: 0; }
.betterave img, .betterave canvas { display: block; width: 100%; max-width: 40rem; margin-inline: auto; aspect-ratio: 1; }
.ouverture { min-height: calc(100svh - 7rem); display: flex; flex-direction: column; justify-content: center; padding-block: var(--e5); }
.ouverture h1 { margin-block: var(--e2) var(--e3); }
.moment { margin-top: var(--e4); padding-top: var(--e3); border-top: 1px solid var(--encre); max-width: 32rem; }
.moment .rep { margin-bottom: var(--e3); color: var(--accent); }

.principes { padding-block: var(--e5) var(--e6); }
.principes ol { display: grid; gap: var(--e5); }
.principes li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: var(--e2); align-items: baseline; max-width: 30rem; }
.principes .num { font: 400 var(--t-rep)/1 var(--sans); letter-spacing: 0.12em; color: var(--accent); grid-row: span 2; }
.principes p { color: var(--doux); margin-top: var(--e1); }

/* Formules */
.formules { background: var(--surface); padding-block: var(--e6); border-block: 1px solid var(--ligne); }
.formules-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e4); margin-top: var(--e4); }
.formules-liste li { border-top: 1px solid var(--encre); padding-top: var(--e3); display: flex; flex-direction: column; gap: var(--e1); }
.formules-liste p { color: var(--doux); }
.formules-liste .formule-prix { margin-top: auto; padding-top: var(--e2); color: var(--encre); font: 400 2rem/1 var(--serif); }
.suite { margin-top: var(--e4); }
.fleche { font-weight: 500; }
.fleche::after { content: " →"; }

/* Infos */
.infos { padding-block: var(--e6); }
.infos-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e5); align-items: start; }
.infos .chapo { margin-top: var(--e3); }
.infos-liste { margin: 0; display: grid; }
.infos-liste div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--e2); padding-block: var(--e2); border-bottom: 1px solid var(--ligne); }
.infos-liste div:first-child { border-top: 1px solid var(--encre); }
.infos-liste dt { font: 500 var(--t-rep)/1.6 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--doux); }
.infos-liste dd { margin: 0; }
/* Carte Google : chargée seulement après un clic */
.plan { margin-top: var(--e5); aspect-ratio: 16 / 7; display: grid; place-content: center; justify-items: center; gap: var(--e3); padding: var(--e4); background: var(--surface); border: 1px solid var(--ligne); text-align: center; }
.plan-texte { margin: 0; max-width: 32rem; color: var(--doux); }
.plan iframe { width: 100%; height: 100%; border: 0; display: block; }
.plan.ouverte { padding: 0; display: block; }

/* ---------- Pages intérieures ---------- */
.page-tete { padding-block: var(--e5) var(--e4); }
.page-tete h1 { margin-block: var(--e2) var(--e3); }
.carte-section { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--e5); align-items: start; padding-block: var(--e5); border-top: 1px solid var(--encre); }
.carte-section h2 { margin-bottom: var(--e4); }
.carte-image { margin: 0; background: #DCE5E0; }
.carte-image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.carte-formules { padding-block: var(--e5); border-top: 1px solid var(--encre); }
.note { color: var(--doux); font-size: 0.9375rem; margin-top: var(--e3); }

/* Formulaire */
.formulaire { max-width: 52rem; padding-bottom: var(--e6); }
.formulaire fieldset { border: 0; margin: 0 0 var(--e4); padding: var(--e3) 0 0; border-top: 1px solid var(--encre); min-width: 0; }
.formulaire legend { padding: 0 0 var(--e3); float: left; width: 100%; }
.champs-3, .champs-2 { clear: both; display: grid; gap: var(--e3); }
.champs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.champs-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.champ { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.champ label { font-weight: 500; }
.facultatif, .aide { color: var(--doux); font-weight: 400; font-size: 0.9375rem; }
.champ input, .champ select {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; min-height: 3rem; padding: 0.625rem 0.75rem; border: 1px solid #7C8581; border-radius: 0;
  background: var(--surface); color: var(--encre); font: inherit;
}
.champ select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--encre) 50%), linear-gradient(135deg, var(--encre) 50%, transparent 50%); background-position: right 1.1rem center, right 0.75rem center; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2rem; }
/* Champ date : sur iPhone, Safari lui donne une largeur propre (celle de « 29/11/2026 » en grand) qui dépasse la colonne
   et fait glisser toute la page. On la neutralise : même largeur que les autres champs, le contenu est rogné s'il est trop long. */
.champ input[type="date"] { -webkit-appearance: none; appearance: none; display: block; overflow: hidden; line-height: 1.5rem; text-align: left; }
.champ input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.champ input[type="date"]::-webkit-datetime-edit { padding: 0; }
.champ input:focus-visible, .champ select:focus-visible { outline-offset: 0; border-color: var(--accent); }
.champ [aria-invalid="true"] { border-color: #B3261E; border-width: 2px; }
.erreur { color: #B3261E; font-size: 0.9375rem; }
.piege { position: absolute; left: -9999px; }
.message:empty { display: none; }
.message { margin-top: var(--e3); padding: var(--e2) var(--e3); background: var(--surface); border-left: 3px solid var(--accent); }

/* Textes longs (légal) */
.texte-long { max-width: 46rem; padding-block: var(--e5) var(--e6); }
.texte-long h1 { margin-bottom: var(--e3); }
.texte-long h2 { font-size: var(--t-h3); margin: var(--e4) 0 var(--e2); }
.texte-long p + p { margin-top: var(--e2); }
.fiche { margin: 0; }
.fiche div { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--e2); padding-block: var(--e1); border-bottom: 1px solid var(--ligne); }
.fiche dt { color: var(--doux); }
.fiche dd { margin: 0; }

/* Pied de page */
.pied { background: var(--encre); color: #E9ECEB; padding: var(--e5) var(--marge) var(--e4); }
.pied a { color: #fff; }
.pied a:hover { color: #F2B8CB; }
.pied-grille { max-width: var(--largeur); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--e4); }
.pied-nom { font: 400 2.25rem/1 var(--serif); color: #fff; margin-bottom: var(--e1); }
.pied .rep { color: #B9C1BE; margin-bottom: var(--e2); }
.pied p + p { margin-top: var(--e1); }
.horaires li { display: flex; flex-direction: column; }
.horaires li + li { margin-top: var(--e1); }
.horaires li span:first-child { color: #B9C1BE; font-size: 0.9375rem; }
.pied-legal { max-width: var(--largeur); margin: var(--e5) auto 0; padding-top: var(--e3); border-top: 1px solid #3A3F3D; font-size: 0.9375rem; color: #B9C1BE; }

/* ---------- Tablette ---------- */
@media (max-width: 960px) {
  .pied-grille { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .formules-liste { grid-template-columns: minmax(0, 1fr); gap: var(--e3); }
  .carte-section { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--e4); }
}

/* ---------- Téléphone : la betterave passe au-dessus, plus petite ---------- */
@media (max-width: 760px) {
  .scene { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .scene-objet { order: -1; }
  .betterave { position: static; }
  .betterave img, .betterave canvas { width: min(72vw, 22rem); }
  .ouverture { min-height: 0; padding-block: var(--e2) var(--e4); }
  .principes { padding-block: var(--e4) var(--e5); }
  .principes ol { gap: var(--e4); }
  .infos-grille, .champs-2, .carte-section { grid-template-columns: minmax(0, 1fr); }
  .carte-image { max-width: 14rem; }
  .carte-section { gap: var(--e3); padding-block: var(--e4); }
  .fiche div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .formules, .infos { padding-block: var(--e5); }
}
@media (max-width: 560px) {
  /* petits écrans : « 2 personnes » doit rentrer dans sa colonne à côté de la flèche */
  .champ select { padding-left: 0.5rem; padding-right: 1.6rem; background-position: right 0.95rem center, right 0.6rem center; text-overflow: ellipsis; }
  .nav-infos { display: none; }
  .champs-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .champs-3 .champ:first-child { grid-column: 1 / -1; }
  .pied-grille { grid-template-columns: minmax(0, 1fr); }
  .infos-liste div { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .plan { aspect-ratio: 4 / 5; }
  .plat-nom { font-size: 1.375rem; }
}

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

/* fin de la page de la carte : de l'air avant le pied */
.note + .actions { margin-bottom: var(--e6); }

/* ---------- Téléphone : la betterave « compagnon » : tout est réglé par compagnon.js, au défilement ---------- */

/* ---------- Ouverture : première visite de l'accueil (intro.js pose html.intro) ---------- */
.rideau { display: none; }
@media (prefers-reduced-motion: no-preference) {
  html.intro .rideau {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 100;
    background: var(--fond); pointer-events: none;
    animation: lj-rideau .6s .8s cubic-bezier(.7, 0, .2, 1) both;
  }
  html.intro .rideau span { font: 400 clamp(3rem, 13vw, 7.5rem)/1 var(--serif); color: var(--encre); animation: lj-nom .7s cubic-bezier(.2, .7, .2, 1) both; }
  html.intro .rideau i { display: block; width: 2.5rem; height: 2px; margin: 1rem auto 0; background: var(--accent); animation: lj-trait .6s .2s cubic-bezier(.2, .7, .2, 1) both; }
  html.intro .betterave { animation: lj-chute .9s 1.1s cubic-bezier(.3, 1.35, .5, 1) both; }
  html.intro .ouverture > * { animation: lj-monte .6s cubic-bezier(.2, .7, .2, 1) both; }
  html.intro .ouverture > :nth-child(1) { animation-delay: 1.05s; }
  html.intro .ouverture > :nth-child(2) { animation-delay: 1.12s; }
  html.intro .ouverture > :nth-child(3) { animation-delay: 1.19s; }
  html.intro .ouverture > :nth-child(4) { animation-delay: 1.26s; }
  html.intro .ouverture > :nth-child(n+5) { animation-delay: 1.33s; }
}
@keyframes lj-rideau { to { transform: translateY(-100%); } }
@keyframes lj-nom { from { opacity: .1; transform: translateY(.35em); } }
@keyframes lj-trait { from { transform: scaleX(0); } }
@keyframes lj-chute { from { opacity: .1; transform: translateY(-3rem) scale(.92); } }
@keyframes lj-monte { from { opacity: .1; transform: translateY(1rem); } }
