/* Socle commun aux 4 maquettes : remise à zéro, mécanique (en-tête, hero, galerie), accessibilité.
   Tout ce qui relève de la DA (couleurs, typos, agencement) est dans a.css … d.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 1.0625rem/1.6 var(--f-texte);
  -webkit-font-smoothing: antialiased;
  --marge: clamp(1.25rem, 5vw, 4rem);
  --bord: max(var(--marge), calc((100vw - 1320px) / 2));
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul, figure, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
sup { font-size: .6em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
section[id], footer[id] { scroll-margin-top: 4.5rem; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.evitement { position: fixed; top: -4rem; left: 1rem; z-index: 60; padding: .6rem 1rem; background: var(--texte); color: var(--fond); }
.evitement:focus { top: 1rem; }

/* Logo : le PNG blanc sert de masque, il prend la couleur du texte */
.logo {
  display: block;
  aspect-ratio: 2299 / 1007;
  background: currentColor;
  -webkit-mask: url(/img/logo-blanc.png) center / contain no-repeat;
  mask: url(/img/logo-blanc.png) center / contain no-repeat;
}

/* En-tête */
.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--bord);
  transition: background-color .3s, border-color .3s;
}
.marque { display: block; flex: none; }
.marque .logo { width: 8.5rem; }
.nav { display: flex; gap: 2rem; margin-left: auto; }
.nav a, .langue { text-decoration: none; }
.entete-actions { display: flex; align-items: center; gap: 1.25rem; }
.burger { display: none; background: none; border: 0; color: inherit; padding: .4rem; cursor: pointer; }
.btn { display: inline-block; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }

/* Hero : fondu entre photos, flou piloté par commun.js */
.accueil { position: relative; }
.accueil-photo { overflow: hidden; }
.accueil-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 2.4s ease; will-change: filter, transform;
}
.accueil-photo img.is-active { opacity: 1; }

.bloc { padding: clamp(4rem, 9vw, 8rem) var(--bord); }
.piste, .pistes, .num { display: none; }

/* Réservation */
.reserver-cadre { background: #fff; }
.reserver-cadre iframe { display: block; width: 100%; height: 640px; border: 0; }
.secours { margin-top: 1rem; font-size: .9rem; }

/* Carte */
.plats li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .75rem; }
.plat-filet { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--filet); transform: translateY(-.3em); }
.plat-prix::after { content: "\00a0€"; }
.plat-prix.sans-prix::after { content: none; }
.plat-desc { flex-basis: 100%; }
.carte-photo img, .chef-photo img, .philo-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Galerie : défilement automatique (commun.js), flèches fines sans fond */
.galerie-cadre { position: relative; }
.galerie-piste { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.galerie-piste::-webkit-scrollbar { display: none; }
.galerie-piste { gap: var(--g-galerie, 6px); }
.galerie-piste li { flex: 0 0 auto; scroll-snap-align: center; height: var(--h-galerie, 88vh); }
.galerie-piste img { height: 100%; width: auto; max-width: none; }
.fleche {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: .75rem; color: #fff; opacity: .7; cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, .5)); transition: opacity .2s;
}
.fleche:hover, .fleche:focus-visible { opacity: 1; }
.fleche-prec { left: .5rem; }
.fleche-suiv { right: .5rem; }

/* Pied de page */
.pied { padding: clamp(3rem, 7vw, 6rem) var(--bord) 6rem; }
.pied-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; text-underline-offset: 3px; }
.horaires div { display: flex; justify-content: space-between; gap: 1rem; max-width: 20rem; }
.pied-bas { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 4rem; font-size: .85rem; }
.pied-bas .logo { width: 6rem; }

/* Outils de maquette (ne font pas partie du site final) */
.bascule {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 70;
  display: flex; gap: .25rem; padding: .3rem;
  background: #111; border-radius: 999px;
  font: 500 13px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}
.bascule a { padding: .55rem .8rem; border-radius: 999px; color: #ddd; text-decoration: none; }
.bascule a:hover { color: #fff; }
.bascule a[aria-current] { background: #fff; color: #111; }
.options {
  padding: 2rem var(--bord) 6rem; background: #f6f5f2; color: #1a1a1a;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
.options h2 { font: 600 1rem/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; font-stretch: 100%; text-transform: none; letter-spacing: 0; margin-bottom: .5rem; }
.options ul { list-style: disc; padding-left: 1.2rem; margin-bottom: .75rem; }

@media (max-width: 820px) {
  .burger { display: block; }
  .btn-entete { display: none; }
  .nav {
    display: none; position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; gap: 0; padding: .5rem var(--bord) 1.5rem;
    background: var(--fond-menu, var(--fond)); color: var(--texte);
  }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--filet); }
  .entete.is-open .nav { display: flex; }
  .entete-actions { margin-left: auto; }
  .pied-grille { grid-template-columns: 1fr; gap: 2rem; }
  .reserver-cadre iframe { height: 720px; }
  .galerie-piste li { height: var(--h-galerie-mobile, 70vh); }
  .fleche svg { width: 32px; height: 32px; }
}

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

/* Agencement commun aux maquettes E et H : sombre, tamisé, photos plein cadre.
   Références : Sugaar (plein écran, serif grasse, flou au défilement), Mishmish (une photo par écran,
   barre d'infos en bas), Le Mary Celeste (bouton en simple filet), Brûlant (noir et rouge). */

body { background: var(--fond); }

/* Grain léger sur toute la page, comme une photo argentique */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* En-tête */
.entete { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.entete.is-solid { background: color-mix(in srgb, var(--fond) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.marque .logo { width: 9rem; }
.marque { transition: opacity .3s; }
.nav a, .langue { font-size: .9rem; color: var(--texte); opacity: .8; transition: opacity .2s; }
.nav a:hover, .langue:hover { opacity: 1; }

/* Bouton : un simple filet à angles droits, petites capitales espacées */
.btn {
  border: 1px solid var(--trait-btn); border-radius: 0;
  padding: .75rem 1.5rem; font: 500 .74rem/1 var(--f-texte); letter-spacing: .18em; text-transform: uppercase; color: var(--texte);
}
.btn:hover { background: var(--texte); border-color: var(--texte); color: var(--fond); }
.btn-principal { padding: 1rem 2rem; font-size: .78rem; }

/* Titres : serif en minuscules */
h2, .accroche, .citation, .plat-nom { font-family: var(--f-titre); font-weight: 400; }
h2 { font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.1; }
.meta, .role, .chapo, .carte-groupe h3, .pied h2, .accueil-bas {
  font: 400 .76rem/1.5 var(--f-texte); letter-spacing: .12em; text-transform: uppercase; color: var(--doux);
}

/* Accueil : une vraie photo plein écran, qui se floute au défilement */
.accueil { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 7rem var(--bord) 0; overflow: hidden; }
.accueil-photo { position: absolute; inset: 0; }
.accueil-photo img { object-position: 50% 44%; }
.accueil::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(color-mix(in srgb, var(--fond) 55%, transparent), transparent 30%, color-mix(in srgb, var(--fond) 45%, transparent) 62%, var(--fond));
}
.accueil-texte, .accueil-bas { position: relative; z-index: 1; }
.logo-hero { display: none; }
.accueil-bas { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0 1.4rem; border-top: 1px solid var(--filet); color: var(--texte); }
.accueil-bas a { text-decoration: none; }
.accueil-bas a:hover { text-decoration: underline; text-underline-offset: 4px; }

.bloc { padding-top: clamp(4.5rem, 8vw, 7rem); padding-bottom: clamp(4.5rem, 8vw, 7rem); }

/* Réservation : le titre à gauche, le module à droite */
.reserver { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.reserver .chapo { margin-top: 1.25rem; max-width: 24rem; font-size: 1rem; text-transform: none; letter-spacing: 0; }
.reserver-cadre { background: var(--surface); border: 1px solid var(--filet); }
.secours { grid-column: 2; color: var(--doux); }

/* Philosophie : une photo plein écran, la phrase posée dessus à mi-hauteur */
.philo { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.philo-photo { position: absolute; inset: 0; }
.philo-photo img { filter: brightness(.7) saturate(.9); }
.philo-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--fond) 92%, transparent) 15%, color-mix(in srgb, var(--fond) 35%, transparent)), linear-gradient(var(--fond), transparent 18%, transparent 82%, var(--fond)); }
.philo-texte { position: relative; max-width: 35rem; }
.citation { font-size: clamp(1.4rem, 2.2vw, 1.95rem); line-height: 1.38; }
.suite { margin-top: 1.75rem; color: var(--doux); }

/* Chef */
.chef { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.chef-photo { aspect-ratio: 4 / 5; max-height: 76vh; overflow: hidden; }
.chef-photo img { filter: brightness(.88) saturate(.92); }
.role { margin: .6rem 0 2rem; }
.chef-texte p + p { margin-top: 1.1rem; }
.chef-texte p:not(.role) { color: var(--doux); max-width: 32rem; }

/* Carte : toute la carte tient dans un seul écran, sur trois colonnes */
.carte { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 5.5rem; padding-bottom: 2.5rem; }
.carte .bloc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding-bottom: 1.1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--filet); }
.carte-photo { display: none; }
.carte-listes { display: grid; grid-template-columns: 2fr 1fr; gap: 0 clamp(2rem, 4vw, 4rem); align-items: start; }
.carte-groupe:first-child .plats { columns: 2; column-gap: clamp(2rem, 4vw, 4rem); }
.carte-groupe h3 { margin-bottom: .5rem; }
.plats li { break-inside: avoid; padding: .62rem 0; border-bottom: 1px solid var(--filet); }
.plat-filet { border: 0; }
.plat-nom { font-size: 1.08rem; line-height: 1.25; }
.plat-prix { font-size: .9rem; color: var(--doux); }
.plat-desc { color: var(--doux); font-size: .86rem; line-height: 1.4; }
.carte-note { margin-top: 1.25rem; color: var(--doux); font-size: .86rem; }

/* Galerie : une bande de photos au format naturel */
.galerie { --h-galerie: 84vh; --g-galerie: 10px; }
.fleche { z-index: 1; opacity: .6; }

/* Pied de page */
.pied h2 { margin-bottom: .9rem; }
.pied p + p { margin-top: .3rem; }
.pied-bas { padding-top: 1.5rem; border-top: 1px solid var(--filet); color: var(--doux); }

/* Apparition douce des blocs au défilement (classe posée par commun.js) */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 1.1s ease, transform 1.1s ease; }
.rv.vu { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .reserver, .chef, .carte-listes { grid-template-columns: 1fr; }
  .secours { grid-column: auto; }
  .accueil-bas { flex-direction: column; gap: .3rem; }
  .carte { min-height: 0; }
  .carte-groupe:first-child .plats { columns: 1; }
  .carte-groupe + .carte-groupe { margin-top: 2rem; }
  .philo-photo::after { background: color-mix(in srgb, var(--fond) 78%, transparent); }
}

/* H · ENSEIGNE — noir chaud et crème, aucune couleur.
   Accueil : le logo en très grand au centre de la photo, comme une enseigne, et presque rien d'autre. */
:root {
  --fond: #0D0B0A;
  --surface: #171412;
  --texte: #EAE2D3;
  --doux: #A69C8B;
  --accent: #EAE2D3;
  --filet: rgba(234, 226, 211, .15);
  --trait-btn: rgba(234, 226, 211, .55);
  --f-titre: "Gloock", Georgia, serif;
  --f-texte: "Switzer", "Helvetica Neue", sans-serif;
}

/* Sur l'accueil, le logo de l'en-tête s'efface : c'est celui du centre qui fait l'enseigne */
.entete:not(.is-solid) .marque { opacity: 0; }

.accueil { justify-content: center; align-items: center; text-align: center; padding-bottom: 0; }
.accueil-texte { margin: auto 0; display: flex; flex-direction: column; align-items: center; }
.logo-hero { display: block; width: min(62vw, 44rem); margin-bottom: 1.75rem; }
.accroche { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.3; }
.meta { margin: .9rem 0 2.25rem; color: var(--texte); }
.accueil-bas { align-self: stretch; }
.accueil-bas span:nth-child(2) { display: none; }

/* Fonds plein écran : photo ou vidéo */
.accueil-photo video, .ecran-fond video, .ecran-fond img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Écrans (La maison, La cave) : une image plein écran, un titre, une phrase. Rien d'autre. */
.ecran { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.ecran-fond { position: absolute; inset: 0; }
.ecran-fond img, .ecran-fond video { filter: brightness(.75) saturate(.9); }
.ecran-fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--fond), rgba(13, 11, 10, .62) 22%, rgba(13, 11, 10, .62) 78%, var(--fond)); }
.ecran-texte { position: relative; max-width: 40rem; }
/* Un seul niveau de texte : pas de titre visible, la phrase entière en serif */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ecran-texte p { font-family: var(--f-titre); font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.4; text-wrap: balance; }

/* Galerie : une photo à la fois, en plein écran */
.galerie { --h-galerie: 100svh; --g-galerie: 0px; }
.galerie-piste li { flex: 0 0 100%; }
.galerie-piste img { width: 100%; object-fit: cover; }
/* Photos verticales recadrées : on garde le plat dans le cadre sur les écrans larges */
.galerie-piste img[src*="p186"] { object-position: 50% 78%; }
.galerie-piste img[src*="p193"] { object-position: 50% 62%; }
.galerie-piste img[src*="p190"] { object-position: 50% 55%; }

/* Groupes et privatisation : une ligne et un formulaire */
.groupes { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.groupes-texte p { margin-top: 1.25rem; max-width: 26rem; font-size: 1.1rem; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.formulaire label { display: flex; flex-direction: column; gap: .35rem; font: 400 .76rem/1.5 var(--f-texte); letter-spacing: .12em; text-transform: uppercase; color: var(--doux); }
.formulaire .large { grid-column: 1 / -1; }
.formulaire input, .formulaire textarea {
  background: none; border: 0; border-bottom: 1px solid var(--trait-btn); border-radius: 0; padding: .45rem 0;
  color: var(--texte); font: 400 1.05rem/1.4 var(--f-texte); letter-spacing: 0; text-transform: none; color-scheme: dark; resize: vertical;
}
.formulaire input:focus, .formulaire textarea:focus { border-bottom-color: var(--texte); }
.formulaire button { grid-column: 1 / -1; justify-self: start; }
.formulaire-merci { font-family: var(--f-titre); font-size: 1.3rem; line-height: 1.4; }
button.btn { background: none; cursor: pointer; }

/* Réservation en panneau : glisse depuis la droite quand on clique sur Réserver */
.panneau {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(34rem, 100vw); height: 100dvh; max-width: none; max-height: none;
  padding: 0; border: 0; border-left: 1px solid var(--filet); background: var(--surface); color: var(--texte); flex-direction: column;
}
.panneau[open] { display: flex; animation: glisse .35s ease; }
.panneau::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes glisse { from { transform: translateX(100%); } }
.panneau-tete { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 1.75rem 0; }
.panneau-tete h2 { font-size: 1.8rem; }
.panneau-fermer { background: none; border: 0; padding: .25rem; color: inherit; cursor: pointer; }
.panneau-note { padding: .5rem 1.75rem 1.25rem; color: var(--doux); font-size: .95rem; }
.panneau iframe { flex: 1; width: 100%; border: 0; }

@media (max-width: 820px) {
  .groupes, .formulaire { grid-template-columns: 1fr; }
  .galerie { --h-galerie-mobile: 70svh; }
  /* Zones de toucher plus hautes pour le doigt */
  .langue { padding: .7rem .5rem; }
  .pied a, .accueil-bas a { display: inline-block; padding: .45rem 0; }
}
@media (prefers-reduced-motion: reduce) { .panneau[open] { animation: none; } }

/* Pages dédiées (carte, privatisation, infos) et liens de pied de page */
.ecran-court { min-height: 58svh; padding-top: 7rem; }
.ecran-court .ecran-texte h1 { font-family: var(--f-titre); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.1; }
.ecran-court .ecran-texte p { margin-top: 1.25rem; font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
.page .carte { min-height: 0; padding-top: clamp(3rem, 6vw, 5rem); }
.prose { max-width: 46rem; margin: 0 auto; }
.prose h2 { margin-bottom: 1.1rem; }
.prose h2:not(:first-child) { margin-top: 3rem; }
.prose p, .prose li { color: var(--doux); font-size: 1.08rem; line-height: 1.65; }
.prose p + p { margin-top: .9rem; }
.prose ul { list-style: none; padding: 0; }
.prose li { padding: .55rem 0; border-bottom: 1px solid var(--filet); }
.prose a { color: var(--texte); text-underline-offset: 4px; }
.prose .horaires div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--filet); color: var(--doux); font-size: 1.08rem; }
.prose .btn { display: inline-block; margin-top: 2rem; text-decoration: none; }
.suite-lien { margin-top: 1.5rem; }
.suite-lien a { color: var(--texte); text-underline-offset: 4px; font-size: .95rem; }
.pied-liens { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin-bottom: 1.5rem; font: 400 .76rem/1.5 var(--f-texte); letter-spacing: .12em; text-transform: uppercase; }
.pied-liens a { text-decoration: none; color: var(--texte); opacity: .8; }
.pied-liens a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 820px) { .pied-liens a { padding: .45rem 0; } }

/* Vidéo d'accueil : invisible tant qu'elle ne tourne pas, l'image fixe reste dessous */
.accueil-photo video { opacity: 0; transition: opacity 1.2s ease; }
.accueil-photo video.joue { opacity: 1; }
.accueil-photo video::-webkit-media-controls, .accueil-photo video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
/* Safari iOS souligne en pointillé ce qu'il prend pour une adresse : on garde le texte tel quel */
a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; }
@media (max-width: 820px) {
  .accueil-bas { align-items: center; text-align: center; }
  .accueil-bas a { display: none; }
}

/* Note de la carte : sous toute la carte, pas sous les desserts */
.carte > .carte-note { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--filet); max-width: none; font-size: .92rem; line-height: 1.55; }
