/* Composants partagés par toutes les pages. */

/* ---------- Logotype ----------
   Le logo est un fichier vectoriel (site/images/logo.svg, produit par outils/logo.py) :
   le monogramme BS dans son assiette, la ligne du terrain, la balle. Ses couleurs suivent
   les variables --logo-lettres, --logo-accent et --logo-fond. */

.logotype {
  --logo-lettres: var(--encre);
  --logo-accent: var(--accent);
  --logo-fond: var(--fond);

  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.logotype svg {
  display: block;
  width: auto;
  height: 2.75rem;
}

.logotype .logotype__court {
  display: none;
}

/* Dans le pied de page : la version avec la pastille, sur le fond du pied. */
.logotype--grand {
  --logo-fond: var(--fond-doux);
}

.logotype--grand svg {
  width: min(100%, clamp(17rem, 12rem + 16vw, 24rem));
  height: auto;
}

/* L'écusson du club est dessiné en blanc : il se pose sur une pastille brune. */
img[src$="squashbad33.svg"] {
  border-radius: 50%;
  background: var(--encre);
}

/* ---------- En-tête ----------
   Le logo à gauche, la navigation en pilule au centre, le bistrot choisi et Réserver à droite.
   La même disposition que sur les autres sites du club. */

.entete {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--entete);

  /* Au-delà de la largeur du contenu, le logo et Réserver restent à son aplomb. */
  padding: 0.5rem max(var(--gouttiere), calc((100% - var(--largeur)) / 2 + var(--gouttiere)));
  border-bottom: 1px solid var(--filet);
  background: var(--fond);
  gap: 0.5rem 0.625rem;
}

.entete__menu,
.actif {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  transition:
    border-color 0.2s,
    background-color 0.2s;
  border: 1px solid var(--filet-fort);
  border-radius: var(--pilule);
  background: transparent;
  font-size: var(--taille-1);
  font-weight: 600;
  cursor: pointer;
  gap: 0.5rem;
}

.entete__menu:hover,
.actif:hover {
  border-color: var(--encre);
}

/* Le bistrot choisi reste sur la ligne du logo, même sur un écran de 320 px. */
.actif {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
}

.actif .point {
  flex: none;
}

.actif__nom {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actif__long,
.actif__changer {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

:root:not([data-resto]) .actif__nom[data-pour="aucun"],
:root[data-resto="bordeaux"] .actif__nom[data-pour="bordeaux"],
:root[data-resto="merignac"] .actif__nom[data-pour="merignac"],
:root[data-resto="gradignan"] .actif__nom[data-pour="gradignan"] {
  display: inline;
}

:root[data-resto] .actif .point {
  border-color: var(--accent);
  background: var(--accent);
}

.entete__reserver {
  display: none;
}

/* Le bouton Menu passe à droite, après le bistrot choisi. */
.entete__menu {
  order: 2;
}

/* Le volet : la navigation. Fermé sur mobile, ouvert au bouton Menu. */
.entete__volet {
  display: none;
  grid-column: 1 / -1;
  order: 3;
  flex-direction: column;
  padding: 0.75rem 0 1.25rem;
  gap: 1.25rem;
}

.entete__volet[data-ouvert] {
  display: flex;
}

/* Le rappel en bas du menu : n'existe que dans le menu plein écran. */
.volet__pied {
  display: none;
}

/* Téléphone et tablette : au clic, le menu prend tout l'écran. L'en-tête reste en haut avec
   le bouton Fermer, la barre Appeler / Réserver reste en bas : ce sont le haut et le pied du menu.
   Le contenu se répartit sur toute la hauteur, sans vide ; s'il dépasse, il défile. */
@media (width < 1100px) {
  .js .entete__volet[data-ouvert] {
    position: fixed;
    z-index: 49;
    overflow-y: auto;
    padding: 0.25rem var(--gouttiere) 1.25rem;
    background: var(--fond);
    animation: menu-entree 0.35s var(--courbe);
    gap: 1.5rem;
    inset: var(--entete) 0 var(--barre);
    overscroll-behavior: contain;
  }

  /* La page ne défile plus derrière le menu. */
  .menu-ouvert,
  .menu-ouvert body {
    overflow: hidden;
  }

  /* Le bouton devient « Fermer », bien visible. */
  .entete__menu[aria-expanded="true"] {
    border-color: var(--encre);
    background: var(--encre);
    color: var(--fond);
  }

  /* Le pied du menu : les horaires à gauche, l'écusson du club à droite, posés tout en bas. */
  .js .entete__volet[data-ouvert] .volet__pied {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--filet);
    animation-delay: 0.25s;
    gap: 1rem;
  }

  .volet__infos {
    display: grid;
    color: var(--texte-doux);
    font-size: var(--taille-1);
    gap: 0.125rem;
  }

  .volet__horaires {
    color: var(--encre);
    font-weight: 600;
  }

  .volet__club {
    display: grid;
    justify-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    color: var(--texte-doux);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--approche);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    gap: 0.375rem;
  }

  .volet__club img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .js .entete__volet[data-ouvert] .navigation__liste > li,
  .js .entete__volet[data-ouvert] .volet__pied {
    animation: ligne-entree 0.5s var(--courbe) both;
  }

  .js .entete__volet[data-ouvert] .navigation__liste > li:nth-child(2) {
    animation-delay: 0.05s;
  }

  .js .entete__volet[data-ouvert] .navigation__liste > li:nth-child(3) {
    animation-delay: 0.1s;
  }

  .js .entete__volet[data-ouvert] .navigation__liste > li:nth-child(4) {
    animation-delay: 0.15s;
  }
}

/* Tablette en largeur : pas de barre en bas, le menu descend jusqu'au bord. */
@media (width >= 900px) and (width < 1100px) {
  .js .entete__volet[data-ouvert] {
    bottom: 0;
  }
}

/* Petit téléphone ou téléphone couché : on resserre pour tout garder à l'écran. */
@media (width < 1100px) and (height < 44rem) {
  .navigation__liste > li > a,
  .sous-menu__bouton {
    min-height: 3.25rem;
    font-size: var(--taille-7);
  }
}

@keyframes menu-entree {
  from {
    opacity: 0;
  }
}

@keyframes ligne-entree {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
}

.navigation__liste > li > a,
.sous-menu__bouton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
  border-bottom: 1px solid var(--filet);
  font-family: var(--police-titres);
  font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1;
  text-decoration: none;
}

.navigation__liste > li > a::after {
  content: "→";
  transition: transform 0.25s var(--courbe);
  color: var(--accent);
  font-family: var(--police-texte);
  font-size: var(--taille-4);
  font-weight: 400;
}

.navigation__liste > li > a:hover,
.sous-menu__bouton:hover {
  color: var(--accent);
}

.navigation__liste > li > a:hover::after {
  transform: translateX(0.35rem);
}

/* « Les bistrots » : un sous-menu natif (<details>), ouvert au toucher, au clavier ou au survol. */
.sous-menu__bouton {
  list-style: none;
  cursor: pointer;
}

.sous-menu__bouton::-webkit-details-marker {
  display: none;
}

/* Un chevron qui se retourne à l'ouverture. */
.sous-menu__bouton::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.25rem;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.25s var(--courbe);
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.sous-menu[open] .sous-menu__bouton::after {
  transform: translateY(15%) rotate(-135deg);
}

/* Le sous-menu : une liste sobre. Le nom du bistrot, son adresse en petit. */

/* Sur téléphone comme sur ordinateur, même écriture : le nom en bas de casse, l'adresse en petit.
   Un filet à gauche relie les trois bistrots à « Les bistrots ». */
.sous-menu__panneau {
  margin: 0.75rem 0 0.5rem 0.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--filet-fort);
}

.sous-menu__lien {
  display: grid;
  align-content: center;
  min-height: 3.25rem;
  padding-block: 0.375rem;
  text-decoration: none;
  gap: 0.0625rem;
}

.sous-menu__nom {
  transition: color 0.2s;
  font-size: var(--taille-4);
  font-weight: 600;
  line-height: 1.3;
}

.sous-menu__adresse {
  color: var(--texte-doux);
  font-size: var(--taille-1);
}

.sous-menu__lien:hover .sous-menu__nom,
.sous-menu__lien[aria-current="page"] .sous-menu__nom {
  color: var(--accent);
}

.sous-menu__tous {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--texte-doux);
  font-size: var(--taille-1);
  font-weight: 550;
  text-underline-offset: 0.35em;
}

.sous-menu__tous:hover {
  color: var(--encre);
}

/* Sans JavaScript : pas de bouton inutile, la navigation reste visible. */
.sans-js .entete__menu,
.sans-js .actif {
  display: none;
}

.sans-js .entete__volet {
  display: flex;
}

@media (width >= 480px) {
  .actif__long {
    position: static;
    overflow: visible;
    width: auto;
    height: auto;
    clip-path: none;
  }
}

@media (width < 400px) {
  .entete {
    column-gap: 0.375rem;
  }

  .entete__menu,
  .actif {
    padding-inline: 0.75rem;
  }
}

/* Petit écran : le monogramme seul, le bistrot choisi garde sa place. */
@media (width < 480px) {
  .logotype .logotype__complet {
    display: none;
  }

  .logotype .logotype__court {
    display: block;
  }
}

@media (width >= 900px) {
  .entete {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .entete__reserver {
    display: inline-flex;
    order: 2;
  }

  .entete__menu {
    order: 3;
  }
}

/* Grand écran : la navigation s'installe au centre, dans sa pilule. */
@media (width >= 1100px) {
  .entete {
    display: flex;
    gap: 0.75rem;
  }

  .entete__menu {
    display: none;
  }

  .entete__volet,
  .entete__volet[data-ouvert] {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    order: 0;
    padding: 0;
    gap: 0.75rem;
  }

  .navigation__liste {
    /* Un menu classique : des mots, rien autour. Ni contour ni fond, le filet de l'en-tête suffit. */
    display: flex;
    gap: 0.25rem;
  }

  .navigation__liste > li > a,
  .sous-menu__bouton {
    min-height: 2.75rem;

    /* L'écart entre les mots se resserre sur les écrans justes, pour laisser respirer le logo. */
    padding-inline: clamp(0.5rem, -1.5rem + 2.4vw, 0.875rem);
    transition: text-decoration-color 0.2s;
    border-bottom: 0;
    font-family: var(--police-texte);
    font-size: var(--taille-2);
    font-weight: 550;
    letter-spacing: 0;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1.5px;
    text-transform: none;
    text-underline-offset: 0.5em;
  }

  .navigation__liste > li > a::after {
    content: none;
  }

  /* Au survol, et quand la liste des bistrots est ouverte : un trait terre battue sous le mot. */
  .navigation__liste > li > a:hover,
  .sous-menu__bouton:hover,
  .sous-menu[open] .sous-menu__bouton {
    color: var(--encre);
    text-decoration-color: var(--accent);
  }

  .navigation__groupe {
    position: relative;
  }

  .sous-menu__bouton {
    gap: 0.5rem;
  }

  .sous-menu__bouton::after {
    width: 0.375rem;
    height: 0.375rem;
    margin-right: 0;
    border-color: currentcolor;
    border-width: 1.5px;
  }

  /* Le panneau : une petite liste discrète, sous le bouton. La zone transparente au-dessus
     fait le pont : la souris passe du bouton au panneau sans qu'il se referme. */
  .sous-menu__panneau {
    position: absolute;
    z-index: 5;
    top: 100%;
    left: 50%;
    width: 15.5rem;
    margin: 0;
    padding: 0.75rem 0 0;
    transform: translateX(-50%);
    border-left: 0;
  }

  .sous-menu__liste {
    padding: 0.375rem 0.375rem 0;
    border: 1px solid var(--filet);
    border-bottom: 0;
    border-radius: var(--rayon) var(--rayon) 0 0;
    background: var(--fond-doux);
    animation: panneau-entree 0.25s var(--courbe);
  }

  .sous-menu__lien {
    min-height: 3rem;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s;
    border-bottom: 0;
    border-radius: 0.5rem;
  }

  .sous-menu__lien:hover {
    background: rgb(41 27 18 / 6%);
  }

  .sous-menu__nom {
    font-size: var(--taille-2);
  }

  .sous-menu__lien:hover .sous-menu__nom {
    color: var(--encre);
  }

  .sous-menu__lien[aria-current="page"] .sous-menu__nom {
    color: var(--accent);
  }

  .sous-menu__adresse {
    font-size: 0.75rem;
  }

  .sous-menu__tous {
    display: flex;
    min-height: 2.75rem;
    padding: 0 1.125rem;
    border: 1px solid var(--filet);
    border-radius: 0 0 var(--rayon) var(--rayon);
    background: var(--fond-doux);
    font-size: 0.75rem;
    text-decoration: none;
    animation: panneau-entree 0.25s var(--courbe);
  }
}

@keyframes panneau-entree {
  from {
    transform: translateY(-0.5rem);
    opacity: 0;
  }
}

/* ---------- Barre fixe du mobile : Appeler + Réserver ---------- */

.barre {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  height: var(--barre);
  padding: 0.5rem var(--gouttiere);
  border-top: 1px solid var(--filet);
  background: var(--fond);
  gap: 0.5rem;
}

.barre__lien {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--filet-fort);
  border-radius: var(--pilule);
  font-size: var(--taille-2);
  font-weight: 600;
  text-decoration: none;
}

/* Une fois le bistrot choisi, son nom s'écrit sous le mot : on sait où l'on appelle, où l'on réserve. */
.barre__lien[data-bistrot] {
  flex-direction: column;
  line-height: 1.15;
}

.barre__lien[data-bistrot]::after {
  content: attr(data-bistrot);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--approche-serree);
}

.barre__lien--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--fond);
}

.barre__lien:focus-visible {
  outline-offset: 2px;
}

@media (width >= 900px) {
  .barre {
    display: none;
  }
}

/* ---------- Confirmation du bistrot choisi ---------- */

/* Le liseré clair détache le message quand il passe sur un bloc foncé (aplat rouge, ticket, photo). */

.annonce {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.75rem);
  left: 50%;
  max-width: calc(100% - 2 * var(--gouttiere));
  padding: 0.6rem 1.1rem;
  transform: translate(-50%, -0.5rem);
  transition:
    opacity 0.25s,
    transform 0.25s var(--courbe),
    visibility 0.25s;
  border: 1px solid var(--fond);
  border-radius: var(--pilule);
  opacity: 0;
  background: var(--encre);
  color: var(--fond);
  font-size: var(--taille-2);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}

.annonce--visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .annonce {
    transition: none;
  }
}

/* ---------- Panneau « Quel bistrot ? » ---------- */

.panneau {
  width: min(100% - 1.5rem, 36rem);
  max-height: calc(100dvh - 1.5rem);
  margin: auto auto 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--filet-fort);
  background: var(--fond-doux);
  color: var(--encre);
}

.panneau[open] {
  animation: panneau-entree 0.35s var(--courbe);
}

.panneau::backdrop {
  background: var(--voile);
}

.panneau__tete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panneau__fermer {
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--filet-fort);
  background: transparent;
  font-family: var(--police-titres);
  font-size: var(--taille-2);
  font-weight: 600;
  letter-spacing: var(--approche);
  text-transform: uppercase;
  cursor: pointer;
}

.panneau__fermer:hover {
  border-color: var(--encre);
}

.panneau__aide {
  margin-block: 0.75rem 1rem;
  color: var(--encre);
  font-size: var(--texte-petit);
}

.panneau__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-block: 0.75rem;
  border-top: 1px solid var(--filet);
  gap: 0.5rem 1rem;
}

.panneau__choisir {
  display: grid;
  flex: 1 1 14rem;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.25rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  gap: 0 0.75rem;
}

.panneau__choisir .point {
  grid-row: span 2;
}

.panneau__nom {
  font-family: var(--police-titres);
  font-size: var(--taille-7);
  font-weight: 600;
  line-height: 1.1;
}

.panneau__choisir:hover .panneau__nom {
  color: var(--accent);
}

.panneau__adresse {
  color: var(--encre);
  font-size: var(--texte-petit);
}

/* Sous l'adresse : « Votre bistrot » pour celui qui est choisi, « Choisir ce bistrot » pour les autres. */
.panneau__etat {
  grid-column: 2;
  margin-top: 0.3rem;
  font-size: var(--taille-1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.2em;
}

.panneau__etat--choisi {
  display: none;
  color: var(--accent);
  text-decoration: none;
}

:root[data-resto="bordeaux"] .panneau__ligne[data-club="bordeaux"] .panneau__etat--choisi,
:root[data-resto="merignac"] .panneau__ligne[data-club="merignac"] .panneau__etat--choisi,
:root[data-resto="gradignan"] .panneau__ligne[data-club="gradignan"] .panneau__etat--choisi {
  display: block;
}

:root[data-resto="bordeaux"] .panneau__ligne[data-club="bordeaux"] .panneau__etat--autre,
:root[data-resto="merignac"] .panneau__ligne[data-club="merignac"] .panneau__etat--autre,
:root[data-resto="gradignan"] .panneau__ligne[data-club="gradignan"] .panneau__etat--autre {
  display: none;
}

.panneau__ligne .bouton {
  flex: 1 1 auto;
}

@keyframes panneau-entree {
  from {
    transform: translateY(1.5rem);
    opacity: 0;
  }
}

@media (width >= 600px) {
  .panneau {
    margin: auto;
    padding: 2rem;
  }

  .panneau__ligne .bouton {
    flex: none;
  }
}

/* ---------- Au tableau : les plats du jour ---------- */

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

.tableau__barre {
  display: grid;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

/* Les onglets : un par bistrot, en pilules. Des boutons radio, donc sans JavaScript. */
.onglets {
  display: flex;
  padding: 0.25rem;
  border: 1px solid var(--filet);
  border-radius: var(--pilule);
  gap: 0.125rem;
}

.onglets__choix {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.onglets__radio {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

.onglets__nom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  transition:
    background-color 0.25s,
    color 0.25s;
  border-radius: var(--pilule);
  font-size: var(--taille-1);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.onglets__radio:checked + .onglets__nom {
  background: var(--accent);
  color: var(--fond);
}

.onglets__choix:has(:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--pilule);
}

/* Petit écran : une carte par club. */
.tableau__cadre {
  container: tableau / inline-size;
}

.tableau {
  display: grid;
  gap: 1rem;
}

.tableau__jours {
  display: none;
}

.tableau__club {
  padding: 1.25rem;
  border-radius: var(--rayon);
  background: var(--fond-doux);
}

.tableau__nom {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  font-family: var(--police-titres);
  font-size: var(--taille-6);
  font-weight: 600;
  line-height: 1;
  gap: 0.6rem;
}

.tableau__plat {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: baseline;
  padding-block: 0.7rem;
  border-top: 1px solid var(--filet);
  gap: 0.75rem;
}

.tableau__jour {
  color: var(--encre);
  font-family: var(--police-titres);
  font-size: var(--taille-2);
  font-weight: 600;
  letter-spacing: var(--approche);
  line-height: 1.3;
  text-transform: uppercase;
}

.tableau__plat--broche .tableau__intitule {
  justify-self: start;
  padding: 0.1rem 0.75rem;
  border-radius: var(--pilule);
  background: var(--accent);
  color: var(--fond);
  font-family: var(--police-titres);
  font-size: var(--taille-2);
  font-weight: 600;
  letter-spacing: var(--approche);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Très petit écran (320 px) : la colonne des jours et la pastille se resserrent pour tenir dans la carte. */
@container tableau (width < 19rem) {
  .tableau__club {
    padding-inline: 1rem;
  }

  .tableau__plat {
    grid-template-columns: 5.75rem minmax(0, 1fr);
    gap: 0.5rem;
  }

  .tableau__plat--broche .tableau__intitule {
    padding-inline: 0.6rem;
    font-size: var(--taille-1);
    letter-spacing: var(--approche-serree);
  }
}

/* Les lignes du tableau s'affichent l'une après l'autre. */
.anime .tableau__club {
  transform: translateY(1.25rem);
  opacity: 0;
  transition:
    transform var(--duree) var(--courbe),
    opacity var(--duree) var(--courbe);
}

.anime .vu .tableau__club {
  transform: none;
  opacity: 1;
}

.anime .vu .tableau__club:nth-of-type(2) {
  transition-delay: 0.1s;
}

.anime .vu .tableau__club:nth-of-type(3) {
  transition-delay: 0.2s;
}

/* Le bistrot choisi passe en tête, marqué de jaune. */
:root[data-resto="bordeaux"] .tableau__club[data-club="bordeaux"],
:root[data-resto="merignac"] .tableau__club[data-club="merignac"],
:root[data-resto="gradignan"] .tableau__club[data-club="gradignan"] {
  order: -1;
  border-top-color: var(--accent);
}

/* Petit et moyen écran : seule la carte du bistrot de l'onglet coché s'affiche.
   Sans :has(), les trois cartes restent empilées : tout est lisible. */
@container tableau (width < 54rem) {
  @supports selector(:has(a)) {
    .tableau__cadre:has(.onglets) .tableau__club {
      display: none;
    }

    .tableau__cadre:has([value="bordeaux"]:checked) .tableau__club[data-club="bordeaux"],
    .tableau__cadre:has([value="merignac"]:checked) .tableau__club[data-club="merignac"],
    .tableau__cadre:has([value="gradignan"]:checked) .tableau__club[data-club="gradignan"] {
      display: block;
    }
  }
}

/* Écran large : un vrai tableau de score, jours en colonnes, clubs en lignes. */
@container tableau (width >= 54rem) {
  .onglets {
    display: none;
  }

  .tableau {
    grid-template-columns: minmax(9rem, 0.9fr) repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  .tableau__jours,
  .tableau__club,
  .tableau__plats {
    display: grid;
    grid-template-columns: subgrid;
  }

  .tableau__jours {
    grid-column: 2 / -1;
    color: var(--encre);
    font-family: var(--police-titres);
    font-weight: 600;
    letter-spacing: var(--approche-large);
    text-transform: uppercase;
  }

  .tableau__jours li {
    padding: 0 1rem 0.75rem;
  }

  .tableau__club {
    grid-column: 1 / -1;
    padding: 0;
    border-top: 1px solid var(--filet-fort);
    background: none;
  }

  .tableau__nom {
    align-self: center;
    margin: 0;
    padding: 1.25rem 1rem 1.25rem 0;
    font-size: clamp(1.25rem, 2.1cqi, 1.75rem);
  }

  .tableau__plats {
    grid-column: 2 / -1;
  }

  .tableau__plat {
    display: flex;
    align-items: center;
    min-height: 6.5rem;
    padding: 1rem;
    border-top: 0;
    border-left: 1px solid var(--filet);
    line-height: 1.3;
  }

  .tableau__plat--2j {
    grid-column: span 2;
  }

  .tableau__jour {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .tableau__plat--broche {
    background: var(--accent);
  }

  .tableau__plat--broche .tableau__intitule {
    padding: 0;
    font-size: clamp(0.9375rem, 1.35cqi, 1.125rem);
    line-height: 1;
  }

  :root[data-resto="bordeaux"] .tableau__club[data-club="bordeaux"],
  :root[data-resto="merignac"] .tableau__club[data-club="merignac"],
  :root[data-resto="gradignan"] .tableau__club[data-club="gradignan"] {
    order: 0;
    border-top-color: var(--accent);
    background: var(--fond-doux);
  }

  :root[data-resto] .tableau__club .tableau__nom {
    padding-left: 1rem;
  }
}

/* Une seule ligne : la page d'un bistrot. */
.tableau--seul .tableau__club {
  border-top-color: var(--accent);
}

/* ---------- La carte ---------- */

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

.carte__titre {
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--filet-fort);
  font-family: var(--police-serif);
  font-size: var(--taille-8);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}

.carte__note {
  margin-top: 1.25rem;
  color: var(--encre);
  font-size: var(--texte-petit);
}

@media (width >= 600px) {
  .carte {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 2.5rem;
  }
}

.moderation {
  margin-top: 2.5rem;
  color: var(--encre);
  font-size: var(--texte-petit);
}

.plat + .plat {
  margin-top: 1.1rem;
}

.plat__ligne {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.plat__nom {
  font-family: var(--police-titres);
  font-size: var(--taille-3);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.15;
  text-transform: uppercase;
}

/* Pointillés entre le plat et son prix */
.plat__ligne::after {
  content: "";
  flex: 1;
  order: 1;
  min-width: 1rem;
  border-bottom: 2px dotted var(--filet-fort);
}

.plat__prix {
  order: 2;
  font-weight: 600;
  white-space: nowrap;
}

.plat__detail {
  max-width: 34rem;
  color: var(--encre);
  font-size: var(--texte-petit);
}

/* Ticket « En formule » : aplat brun, bords crantés. */
.ticket {
  --cran: 0.5rem;

  margin-top: 2rem;
  padding: 1.25rem calc(1.25rem + var(--cran));
  background: var(--encre);
  color: var(--fond);
  mask:
    radial-gradient(circle at 0 50%, transparent var(--cran), #000 calc(var(--cran) + 0.5px)) 0 0 / 51% 1.5rem repeat-y,
    radial-gradient(circle at 100% 50%, transparent var(--cran), #000 calc(var(--cran) + 0.5px)) 100% 0 / 51% 1.5rem
      repeat-y;
}

.ticket__titre {
  margin-bottom: 0.5rem;
  font-family: var(--police-titres);
  font-size: var(--taille-7);
  font-weight: 600;
  line-height: 1;
}

.ticket__ligne {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 0.4rem;
  border-top: 1px dashed currentcolor;
  font-size: var(--texte-petit);
  gap: 1rem;
}

.ticket__ligne strong {
  font-family: var(--police-titres);
  font-size: var(--taille-5);
  white-space: nowrap;
  font-weight: 600;
}

.ticket__note {
  margin-top: 0.25rem;
  font-family: var(--police-serif);
  font-size: var(--taille-4);
  font-style: italic;
}

/* ---------- Pied de page : la marque et Réserver, trois colonnes, la ligne légale ---------- */

.pied {
  border-top: 1px solid var(--filet);
  background: var(--fond-doux);
}

/* Un seul conteneur : les filets s'arrêtent à l'aplomb du texte. */
.pied__contenu {
  width: min(100%, var(--largeur));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gouttiere) 1.5rem;
}

.pied__marque {
  display: grid;
  justify-items: start;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  gap: 0.75rem;
}

.pied__accroche {
  max-width: 28rem;
  margin-top: 0.25rem;
  color: var(--texte-doux);
  font-size: var(--taille-2);
}

.pied__colonnes {
  display: grid;
  padding-block: 2rem;
  border-top: 1px solid var(--filet);
  gap: 1.75rem;
}

.pied__titre {
  margin-bottom: 0.5rem;
  font-family: var(--police-titres);
  font-size: var(--taille-3);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.1;
  text-transform: uppercase;
}

/* Les liens : en ligne sur mobile (le pied reste court), en colonne sur grand écran. */
.pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.pied__colonne li,
.pied__colonne p {
  color: var(--texte-doux);
  font-size: var(--taille-2);
}

.pied__colonne a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.pied__colonne a:hover,
.pied__haut:hover {
  color: var(--accent);
}

.pied__adresses {
  display: grid;
  gap: 1rem;
}

/* Chaque bistrot : le nom et le téléphone sur une ligne, l'adresse dessous. */
.pied__adresses li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
}

.pied__adresses li > :nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Lien ou non, chaque nom occupe la même hauteur : les trois colonnes restent alignées. */
.pied__adresses .pied__nom {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.pied__adresses .pied__nom,
.pied__adresses .pied__nom a {
  color: var(--encre);
  font-weight: 650;
}

/* Téléphone : on va à l'essentiel, le pied tient en un écran. */
@media (width < 600px) {
  .pied__accroche,
  .pied__colonne:first-child .pied__titre,
  .pied__colonne:last-child .pied__titre {
    display: none;
  }

  .pied__liens {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pied__colonnes {
    padding-block: 1.25rem;
    gap: 1.25rem;
  }

  .pied__adresses {
    gap: 0.5rem;
  }

  .pied__bas {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .pied__bas > :first-child,
  .pied__bas > :nth-child(2) {
    grid-column: 1 / -1;
  }
}

/* La signature du club, comme sur leurs cartes : « by SquashBad33 ». */
.pied__club {
  color: var(--texte-doux);
  font-size: var(--taille-2);
  font-weight: 550;
  gap: 0.875rem;
}

.pied__club img {
  width: 4rem;
  height: 4rem;
}

/* Le Bistrot du Carrelet, l'autre bistrot de la maison : une ligne sous le logo du club. */
.pied__voisin {
  display: grid;
  margin-top: 1.25rem;
  color: var(--texte-doux);
  font-size: var(--taille-2);
}

.pied__voisin span {
  font-size: var(--taille-1);
  letter-spacing: var(--approche);
  text-transform: uppercase;
}

.pied__voisin a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--encre);
  text-decoration: underline;
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.2em;
}

.pied__bas {
  display: grid;
  padding-top: 1.25rem;
  border-top: 1px solid var(--filet);
  color: var(--texte-doux);
  font-size: var(--taille-1);
  gap: 0.25rem;
}

/* La signature du studio : un lien discret, mais une vraie cible au doigt. */
.pied__signature {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--encre);
  text-underline-offset: 0.3em;
}

.pied__signature:hover {
  color: var(--accent);
}

.pied__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

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

.pied__legal a:hover {
  color: var(--accent);
}

.pied__haut {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 2.75rem;
  gap: 0.375rem;
}

@media (width >= 600px) {
  .pied__adresses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .pied__adresses li {
    grid-template-columns: minmax(0, 1fr);
  }

  .pied__adresses li > :nth-child(2) {
    grid-row: auto;
  }
}

@media (width >= 900px) {
  .pied__colonnes {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 2.2fr) minmax(0, 0.8fr);
    gap: 3rem;
  }

  .pied__liens {
    flex-direction: column;
  }

  .pied__bas {
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 2rem;
  }
}

/* ---------- Le papier : une section sable, pour la carte ---------- */

.papier {
  background: var(--sable);
}

.papier .carte__titre {
  border-bottom-color: var(--encre);
}

/* ---------- Défilement latéral : des cartes à faire glisser, sur petit écran ----------
   Le défilement est celui du navigateur, avec accroche. Rien n'est détourné. */

.defile {
  display: grid;
  grid-auto-columns: min(78vw, 21rem);
  grid-auto-flow: column;
  overflow-x: auto;
  margin-inline: calc(var(--gouttiere) * -1);
  padding: 0.25rem var(--gouttiere) 1rem;
  scroll-padding-inline: var(--gouttiere);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 1rem;
}

.defile > * {
  scroll-snap-align: start;
}

/* ---------- Les photos : un rideau se lève, puis elles glissent dans leur cadre ---------- */

[data-rideau] {
  position: relative;
  overflow: hidden;
}

.anime [data-rideau]::after {
  content: "";
  position: absolute;
  z-index: 1;
  transform-origin: top;
  transition: transform 1s var(--courbe);
  background: var(--rideau, var(--fond));
  inset: 0;
}

.anime [data-rideau].vu::after,
.anime .vu [data-rideau]::after {
  transform: scaleY(0);
}

.papier [data-rideau] {
  --rideau: var(--sable);
}

.profondeur [data-parallaxe] {
  transform: translate3d(0, var(--py, 0), 0) scale(1.14);
}

/* ---------- Avis Google ---------- */

.etoiles {
  display: block;
  width: 7.5rem;
  height: 1.5rem;
}

.etoiles__fond {
  fill: var(--filet-fort);
}

.etoiles__pleines {
  fill: var(--accent);
}

.avis {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--filet);
  border-radius: var(--angle) 0 0;
  background: var(--fond-doux);
}

.avis__note {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
}

.avis__chiffre {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  line-height: 0.85;
}

.avis__valeur {
  font-family: var(--police-titres);
  font-size: var(--titre);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
}

.avis__sur {
  font-family: var(--police-serif);
  font-size: var(--taille-8);
  font-style: italic;
}

.avis__nombre {
  font-weight: 600;
}

.avis__texte {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 0.5rem;
}

.avis__source {
  max-width: 26rem;
  font-size: var(--texte-grand);
  line-height: 1.4;
}

.avis__releve {
  color: var(--texte-doux);
  font-size: var(--texte-petit);
}

.avis__citations {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--filet-fort);
}

.citation__texte {
  font-family: var(--police-serif);
  font-size: var(--taille-5);
  font-style: italic;
  line-height: 1.35;
}

.citation__auteur {
  margin-top: 0.75rem;
  font-weight: 600;
}

.citation__auteur span {
  color: var(--texte-doux);
  font-weight: 400;
}

@media (width >= 700px) {
  .avis {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2.5rem 4rem;
    padding: 2.5rem 3rem;
  }

  .avis__citations {
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 2.5rem;
  }
}

/* Accueil : la note du club, dans la fiche de son bistrot. */
.bistrot__avis a {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.625rem;
  min-height: 2.75rem;
  font-size: var(--taille-2);
  text-decoration: none;
}

.bistrot__avis .etoiles {
  width: 5.625rem;
  height: 1.125rem;
}

.bistrot__avis span {
  text-decoration: underline;
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.2em;
}

/* ---------- La réservation RUNEUR : le module, dans la page ou dans la fenêtre ---------- */

.module__cadre {
  display: block;
  width: 100%;
  height: 40rem;
  border: 0;
  border-radius: var(--rayon);
  background: transparent;
  color-scheme: normal;
}

[data-etat="chargement"] > .module__cadre {
  opacity: 0;
}

.module__attente,
.module__secours {
  position: absolute;
  z-index: 1;
  padding: 1.5rem;
  inset: 0 0 auto;
  color: var(--texte-doux);
}

.module__secours:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.module__secours p {
  flex-basis: 100%;
  color: var(--encre);
}

.fenetre {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--fond);
  color: var(--encre);
}

.fenetre[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: panneau-entree 0.35s var(--courbe);
}

.fenetre::backdrop {
  background: var(--voile);
}

.fenetre__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gouttiere) 0.375rem;
  border-bottom: 1px solid var(--filet);
  gap: 1rem;
}

.fenetre__titre {
  font-family: var(--police-titres);
  font-size: var(--taille-5);
  font-weight: 600;
  line-height: 1.15;
}

.fenetre__changer {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--texte-doux);
  font-size: var(--texte-petit);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.fenetre__changer:hover {
  color: var(--encre);
}

.fenetre__fermer {
  flex: none;
}

.fenetre__corps {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem clamp(0.25rem, 2vw, 1.5rem);
}

.fenetre__module {
  position: relative;
}

.fenetre__pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0.25rem var(--gouttiere);
  border-top: 1px solid var(--filet);
  gap: 0 1.5rem;
}

.fenetre__pied .lien-fleche {
  font-size: var(--texte-petit);
}

html:has(.fenetre[open]) {
  overflow: hidden;
}

@media (width >= 700px) and (height >= 500px) {
  .fenetre {
    width: min(100% - 3rem, 52rem);
    height: min(100dvh - 3rem, 50rem);
    margin: auto;
    border-radius: var(--angle) 0 0;
  }

  .fenetre__tete,
  .fenetre__pied {
    padding-inline: 2rem;
  }

  .fenetre__tete {
    padding-block: 1.25rem 0.5rem;
  }
}

/* ---------- La réservation en ligne (module RUNEUR) ---------- */

.sans-js .reserver {
  display: none;
}

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

.reserver__choix {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  gap: 0.5rem;
}

.reserver__option {
  position: relative;
  cursor: pointer;
}

.reserver__radio {
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
}

.reserver__nom {
  display: flex;
  align-items: center;
  min-height: 2.875rem;
  padding-inline: 1.25rem;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
  border: 1.5px solid var(--filet-fort);
  border-radius: var(--pilule);
  font-size: var(--taille-2);
  font-weight: 600;
}

.reserver__option:hover .reserver__nom {
  border-color: var(--encre);
}

.reserver__radio:checked + .reserver__nom {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--fond);
}

.reserver__option:has(:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--pilule);
}

.reserver__module {
  position: relative;
  min-width: 0;
  scroll-margin-top: calc(var(--entete) + 1rem);
}

.reserver__attente {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 9rem;
  padding: 1.5rem;
  border: 1px solid var(--filet);
  border-radius: var(--angle) 0 0;
  background: var(--fond-doux);
  color: var(--texte-doux);
  text-align: center;
  text-wrap: balance;
  gap: 1.25rem;
}

/* Le « p » du titre descend : un peu d'air avant le texte. */
.reserver .section__chapo {
  margin-top: 0.5rem;
}

@media (width < 480px) {
  .reserver__choix {
    gap: 0.375rem;
  }

  .reserver__nom {
    padding-inline: 0.8rem;
    font-size: var(--taille-1);
  }
}

@media (width >= 900px) {
  .reserver__tete {
    position: sticky;
    top: calc(var(--entete) + 2rem);
  }

  .reserver__grille {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 5rem);
  }

  .reserver__attente {
    min-height: 24rem;
  }

  /* La page d'un bistrot sans réservation en ligne : le cadre ne contient qu'un bouton. */
  .reserver:not([data-reservation=""]) .reserver__attente:has(.bouton) {
    min-height: 14rem;
  }
}
