/* Page d'un bistrot, et page 404. */

/* Le haut de page : le texte et la fiche d'un côté, la photo du lieu de l'autre. */
.resto {
  display: grid;
  width: min(100%, var(--largeur));
  margin-inline: auto;
  padding: 0.25rem var(--gouttiere) clamp(2rem, 5vw, 4rem);
  gap: 1.25rem;
}

/* La grille interne s'efface : le fil d'Ariane, le texte, la photo et la fiche
   se placent directement, dans l'ordre voulu à chaque largeur. */
.resto__grille {
  display: contents;
}

.resto .ariane {
  order: 1;
}

.ariane ol {
  display: flex;
  flex-wrap: wrap;
  color: var(--texte-doux);
  font-size: var(--taille-1);
}

.ariane li {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.ariane li + li::before {
  content: "/";
  margin-inline: 0.6rem;
}

.ariane a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.resto__texte {
  display: grid;
  order: 2;
  align-content: start;
  justify-items: start;
  container: resto-texte / inline-size;
  gap: 1rem;
}

/* Le titre se règle sur la largeur de sa colonne : il ne touche jamais la photo. */
.resto .titre--hero {
  font-size: clamp(3.25rem, 20.5cqi, 7.75rem);
}

/* Un nom long (Bordeaux Nord) passe sur deux lignes plutôt que de sortir de l'écran. */
.resto .titre--hero .titre__capitales {
  white-space: normal;
}

.resto__chapo {
  max-width: 32rem;
  color: var(--texte-doux);
  font-size: var(--texte-grand);
  line-height: 1.45;
}

/* La photo du lieu : le grand angle arrondi, comme sur l'accueil. */
.hero__fond {
  position: relative;
  order: 3;
  overflow: hidden;
  border-radius: var(--angle) 0 0;
  aspect-ratio: 4 / 3;
}

.hero__cadre {
  height: 100%;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anime .hero__photo {
  animation: avancer 12s linear both;
}

@keyframes avancer {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

.resto__fiche {
  order: 4;
  padding: 1.375rem 1.25rem;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: var(--fond-doux);
}

.resto__sous-titre {
  margin-bottom: 1rem;
  font-family: var(--police-serif);
  font-size: var(--taille-7);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}

.fiche {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.fiche__adresse {
  font-size: var(--texte-grand);
  line-height: 1.3;
}

.fiche__horaires {
  color: var(--texte-doux);
}

.fiche__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  overflow-wrap: anywhere;
}

.fiche__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.apres-tableau {
  margin-top: 1.5rem;
}

/* ---------- Carte complète ---------- */

.carte__famille {
  scroll-margin-top: calc(var(--entete) + 5rem);
}

.carte__chapitre {
  display: flex;
  flex-direction: column;
  margin-block: clamp(3.5rem, 8vw, 6rem) 2rem;
  font-size: clamp(2.75rem, 2rem + 5vw, 5.5rem);
  font-weight: 400;
  line-height: 0.86;
  scroll-margin-top: calc(var(--entete) + 5rem);
}

.ticket {
  scroll-margin-top: calc(var(--entete) + 5rem);
}

.tarif {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--filet);
  gap: 1rem;
}

.tarif__nom small {
  margin-left: 0.4rem;
  color: var(--encre);
  font-size: var(--texte-petit);
}

.tarif__prix {
  font-weight: 600;
  white-space: nowrap;
}

.pressions {
  width: 100%;
  margin-bottom: 0.5rem;
  border-collapse: collapse;
}

.pressions caption {
  padding-bottom: 0.5rem;
  color: var(--encre);
  font-family: var(--police-titres);
  font-weight: 600;
  letter-spacing: var(--approche-large);
  text-align: left;
  text-transform: uppercase;
}

.pressions th,
.pressions td {
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--filet);
  text-align: right;
  white-space: nowrap;
}

.pressions thead th {
  color: var(--encre);
  font-family: var(--police-titres);
  letter-spacing: var(--approche);
  font-weight: 600;
}

.pressions tbody th {
  padding-left: 0;
  font-weight: 400;
  text-align: left;
  white-space: normal;
}

.pressions td {
  font-weight: 600;
}

.autres {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

@media (width >= 900px) {
  .resto {
    grid-template: auto auto 1fr / minmax(0, 0.95fr) minmax(0, 1.05fr);
    column-gap: clamp(2rem, 4vw, 4rem);
  }

  .resto .ariane {
    grid-column: 1 / -1;
  }

  .resto__texte {
    grid-column: 1;
    grid-row: 2;
  }

  .resto__fiche {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }

  .hero__fond {
    grid-column: 2;
    grid-row: 2 / 4;
    min-height: 30rem;
    aspect-ratio: auto;
  }
}

.papier .tarif,
.papier .pressions th,
.papier .pressions td {
  border-bottom-color: var(--filet);
}

.papier .tarif__nom small,
.papier .pressions caption,
.papier .pressions thead th,
.papier .moderation {
  color: var(--encre);
}

/* ---------- La carte éditoriale ----------
   Trois colonnes de même hauteur, sans trou : sous une famille courte, une photo ou la
   formule prend la place qui reste. Sur téléphone, une famille à la fois, par onglets. */

/* L'en-tête : le titre d'un côté, une photo de l'autre. */
.carte__entete {
  display: grid;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.carte__entete .section__tete {
  margin-bottom: 0;
}

.carte__photo {
  border-radius: var(--angle) 0 0;
  aspect-ratio: 16 / 10;
}

.carte__photo img,
.menu__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu__colonnes {
  display: grid;
  gap: 2.5rem;
}

/* Sans photo pour combler, les familles se répartissent sur toute la hauteur : les bas s'alignent. */
.menu__colonne {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 2.5rem;
}

/* La photo de remplissage : elle prend toute la hauteur libre de sa colonne. */
.menu__photo {
  position: relative;
  flex: 1;
  min-height: 11rem;
  border-radius: 0 0 var(--angle);
}

.menu__photo picture,
.menu__photo img {
  position: absolute;
  inset: 0;
}

/* La rôtissoire est filmée en hauteur : on cadre sur les broches. */
.menu__photo--broche img {
  object-position: 50% 66%;
}

/* Chaque photo de remplissage ne sert qu'à une largeur d'écran. */
.menu__photo--tablette,
.menu__photo--bureau {
  display: none;
}

.menu__colonne > .ticket {
  margin-top: 0;
}

/* Un plat signature : un point noir devant son nom. */
.plat--signature .plat__nom::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.4em;
  transform: translateY(-0.1em);
  border-radius: 50%;
  background: currentcolor;
}

/* Les onglets de la carte, sur téléphone : une ligne de mots, discrète. Pas de cadre, pas de pilule :
   la famille ouverte est en noir, soulignée d'un trait fin ; les autres sont en retrait.
   La ligne reste sous l'en-tête pendant la lecture et se fait glisser du doigt. */
.menu__onglets {
  position: sticky;
  z-index: 4;
  top: var(--entete);
  overflow-x: auto;
  margin: 0 calc(var(--gouttiere) * -1) 1.25rem;
  padding: 0 var(--gouttiere);
  border: 0;
  border-bottom: 1px solid var(--filet);
  border-radius: 0;
  background: var(--sable);
  scroll-padding-inline: var(--gouttiere);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  gap: 1.25rem;
}

.menu__onglets .onglets__choix {
  flex: none;
  scroll-snap-align: center;
}

.menu__onglets .onglets__nom {
  min-height: 2.75rem;
  padding-inline: 0;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--texte-doux);
  font-size: var(--taille-2);
  font-weight: 550;
}

.menu__onglets .onglets__radio:checked + .onglets__nom {
  border-bottom-color: var(--encre);
  background: none;
  color: var(--encre);
  font-weight: 650;
}

.menu__onglets .onglets__choix:has(:focus-visible) {
  outline-color: var(--encre);
  outline-offset: -2px;
  border-radius: 0.25rem;
}

/* Téléphone : une famille à la fois. Sans :has(), tout reste empilé et lisible. */
@media (width < 600px) {
  .menu__photo {
    display: none;
  }

  @supports selector(:has(a)) {
    .menu:has(.onglets) .carte__famille {
      display: none;
    }

    .menu:has([value="entree"]:checked) #entree,
    .menu:has([value="plats"]:checked) #plats,
    .menu:has([value="broches"]:checked) #broches,
    .menu:has([value="gourmandises"]:checked) #gourmandises,
    .menu:has([value="bieres"]:checked) #bieres,
    .menu:has([value="apero"]:checked) #apero,
    .menu:has([value="cidres"]:checked) #cidres,
    .menu:has([value="digestifs"]:checked) #digestifs,
    .menu:has([value="softs"]:checked) #softs,
    .menu:has([value="eaux"]:checked) #eaux,
    .menu:has([value="chaud"]:checked) #chaud {
      display: block;
    }

    /* Les colonnes vidées de leur famille ne laissent pas d'espace. */
    .menu__colonnes,
    .menu__colonne {
      gap: 0;
    }

    .menu__colonne > .ticket {
      margin-top: 2rem;
    }
  }
}

@media (width >= 600px) {
  .menu__onglets {
    display: none;
  }

  /* Tablette : deux colonnes. Les deux blocs courts s'empilent d'un côté, le long de l'autre ;
     la photo de remplissage rattrape l'écart. */
  .menu__colonnes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .menu--plats .menu__colonne:first-child {
    grid-row: 1 / span 2;
  }

  .menu--verres .menu__colonne:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .menu__photo--tablette {
    display: block;
  }
}

@media (width >= 900px) {
  .carte__entete {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: end;
    gap: clamp(2rem, 4vw, 4rem);
  }
}

@media (width >= 1000px) {
  .menu__colonnes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu--plats .menu__colonne:first-child,
  .menu--verres .menu__colonne:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .menu__photo--tablette {
    display: none;
  }

  .menu__photo--bureau {
    display: block;
  }
}

/* ---------- Page 404 ---------- */

.introuvable {
  display: grid;
  align-content: center;
  justify-items: start;
  width: min(100%, var(--largeur));
  min-height: 100svh;
  margin-inline: auto;
  padding: 2rem var(--gouttiere);
  gap: 1.5rem;
}

/* Téléphone : « Réserver par téléphone » tient sur une ligne. */
@media (width < 400px) {
  .fiche__actions .bouton--grand {
    padding-inline: 1rem;
    font-size: var(--taille-3);
  }
}

/* Sous le titre de la carte : la carte entière, les boissons, le PDF. */
.carte__suite {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin-top: 0.5rem;
}

/* ---------- Venir : la note Google et la carte dans une même section ---------- */

.venir__grille {
  display: grid;
  gap: 1.5rem;
}

.venir__grille .avis,
.venir__grille .plan {
  margin-top: 0;
}

.avis__titre {
  color: var(--texte-doux);
  font-size: var(--taille-1);
  font-weight: 600;
  letter-spacing: var(--approche-large);
  text-transform: uppercase;
}

/* Grand écran : la note en colonne étroite, la carte prend le reste, à la même hauteur. */
@media (width >= 1000px) {
  .venir__grille {
    grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
    gap: 2rem;
  }

  .venir__avis {
    display: grid;
  }

  .venir__grille .avis {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 1.5rem;
    padding: 2rem;
  }

  .venir__grille .plan {
    display: grid;
    grid-template-rows: 1fr auto;
  }

  .venir__grille .plan__cadre {
    aspect-ratio: auto;
    min-height: 24rem;
  }
}

/* ---------- La carte Google du bistrot ---------- */

.plan {
  margin-top: 2rem;
}

.plan__cadre {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--filet);
  border-radius: var(--angle) 0 0;
  background: var(--fond-doux);
}

/* Avant le clic : un quadrillage de rues, discret, et l'adresse au centre. */
.plan__attente {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
  background:
    repeating-linear-gradient(28deg, transparent 0 3.4rem, var(--filet) 3.4rem calc(3.4rem + 1px)),
    repeating-linear-gradient(118deg, transparent 0 5.2rem, var(--filet) 5.2rem calc(5.2rem + 1px));
}

.plan__carton {
  display: grid;
  justify-items: center;
  gap: 0.875rem;
  max-width: 100%;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: var(--fond);
  text-align: center;
}

.plan__repere {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.4rem color-mix(in srgb, var(--accent) 18%, transparent);
}

.plan__adresse {
  font-family: var(--police-titres);
  font-size: var(--taille-5);
  font-style: normal;
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.15;
}

.plan__mention {
  max-width: 17rem;
  color: var(--texte-doux);
  font-size: var(--texte-petit);
}

/* La carte de Google, ramenée aux tons du site : grise, puis réchauffée, posée sur le fond crème. */
.plan__carte {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) sepia(0.2) contrast(0.94);
  mix-blend-mode: multiply;
}

.plan--ouvert .plan__cadre {
  background: var(--fond);
}

.plan__legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-top: 0.75rem;
  color: var(--texte-doux);
}

@media (width >= 600px) {
  .plan__cadre {
    aspect-ratio: 16 / 9;
  }
}

@media (width >= 1100px) {
  .plan__cadre {
    aspect-ratio: 21 / 9;
  }
}

/* ---------- Pages de texte : événements, mentions légales, confidentialité ---------- */

.article {
  width: min(100%, 46rem);
  margin-inline: auto;
  padding: 0.25rem var(--gouttiere) var(--espace-section);
}

.article > * + * {
  margin-top: 1rem;
}

.article h1 {
  margin-block: 1rem 2rem;
}

.article h2 {
  margin-top: 2.5rem;
  font-family: var(--police-titres);
  font-size: var(--taille-7);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.1;
}

.article p,
.article li {
  color: var(--texte-doux);
}

.article__chapo {
  color: var(--encre);
  font-size: var(--texte-grand);
  line-height: 1.45;
}

.article a {
  display: inline-block;
  padding-block: 0.6rem;
  color: var(--encre);
}

.article__photo {
  display: block;
  margin-block: 2rem 0.5rem;
}

.article__photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--angle) 0 0;
  object-fit: cover;
}

.article__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.article .article__actions .bouton {
  display: inline-flex;
  padding-block: 0;
}

.article .article__actions .bouton--accent {
  color: var(--fond);
}

/* Page de la carte : chaque carte en entier, famille après famille. */
.article__carte {
  margin-top: 3.5rem;
  scroll-margin-top: 6rem;
}

.article__carte h2 {
  margin-top: 0;
}

.article__carte .carte__titre {
  margin-top: 2.25rem;
}

.article .plat__ligne,
.article .plat__detail,
.article .carte__note {
  color: var(--encre);
}

/* Le renvoi vers les plats du jour : une ligne entière, haute comme un doigt. */
.article .plat__detail a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0;
}

.article__suite {
  margin-top: 2rem;
}

.article > .ticket {
  margin-top: 2.5rem;
}

.article .ticket p {
  color: inherit;
}

/* Une puce dont la ligne est un lien : le lien a sa zone de toucher, la puce descend d'autant. */
.article .puces li:has(> a)::before {
  top: calc(0.6rem + 0.6em);
}
