/* Sections propres à l'accueil. L'ossature est celle des sites du club :
   surtitre à tiret, titre, texte court, lien ; l'image à côté. */

/* ---------- 1. Hero : le texte et le choix du bistrot, puis le diaporama ---------- */

.hero {
  display: grid;
  width: min(100%, var(--largeur));
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 3rem) var(--gouttiere) clamp(1.5rem, 4vw, 3rem);
  gap: 1.5rem;
}

.hero__texte {
  display: grid;
  align-content: center;
  justify-items: start;
  container: hero-texte / inline-size;
  gap: 1rem;
}

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

/* Téléphone : les trois villes tiennent sur une ligne, sans le trait. */
@media (width < 480px) {
  .hero .surtitre {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .hero .surtitre::before {
    content: none;
  }
}

/* Très petit écran : la légende de la photo garde la place, on allège les commandes. */
@media (width < 400px) {
  .hero .surtitre {
    letter-spacing: 0.04em;
  }

  .diapo__compte,
  .diapo__bouton[data-diapo-vers="-1"] {
    display: none;
  }
}

/* Le h1 porte la ligne des trois villes et le titre : un seul titre pour les moteurs. */
.hero__titre {
  display: grid;
  justify-items: start;
  font-size: inherit;
  font-weight: inherit;
  gap: 0.875rem;
}

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

/* Sur mobile, la barre du bas porte déjà Réserver : le bouton du hero attend les écrans larges. */
.hero__actions {
  display: none;
}

/* ---------- Le diaporama : les trois lieux, en fondu lent ---------- */

.diapo {
  position: relative;
  overflow: hidden;
  border-radius: var(--angle) 0 0;
  background: var(--fond-doux);
  aspect-ratio: 4 / 3;
}

.diapo__vues {
  position: absolute;
  inset: 0;
}

.diapo__vue {
  position: absolute;
  transition: opacity 1.4s var(--courbe);
  opacity: 0;
  inset: 0;
}

.diapo__vue[data-actif] {
  opacity: 1;
}

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

/* La vue active avance très lentement vers nous. */
.anime .diapo__vue[data-actif] .diapo__photo {
  animation: avancer 9s linear both;
}

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

  to {
    transform: scale(1.08);
  }
}

/* Un voile en bas : la légende et les commandes restent lisibles sur toute photo. */
.diapo::after {
  content: "";
  position: absolute;
  height: 38%;
  background: linear-gradient(transparent, var(--voile));
  inset: auto 0 0;
  pointer-events: none;
}

/* Sur la photo voilée, le texte et les commandes sont en crème. */
.diapo__legende,
.diapo__commandes {
  color: var(--fond);
}

.diapo__legende {
  position: absolute;
  z-index: 2;
  bottom: 1.125rem;
  left: 1.125rem;
  font-size: var(--taille-2);
  font-weight: 550;
}

.diapo__commandes {
  position: absolute;
  z-index: 2;
  right: 0.625rem;
  bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.diapo__compte {
  margin-right: 0.375rem;
  font-size: var(--taille-1);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.diapo__bouton {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  transition:
    background-color 0.2s,
    color 0.2s;
  border: 1px solid var(--filet-clair);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: var(--taille-3);
  cursor: pointer;
  place-items: center;
}

.diapo__bouton:hover {
  border-color: var(--fond);
  background: var(--fond);
  color: var(--encre);
}

/* Sans JavaScript : la première photo seule, sans commandes. */
.sans-js .diapo__commandes {
  display: none;
}

/* ---------- Entrée en scène du hero : le texte monte, ligne après ligne ---------- */

.hero .surtitre,
.hero .titre__serif,
.hero .titre__capitales,
.hero__chapo,
.hero .selecteur,
.hero__actions,
.diapo {
  animation: monter 0.9s var(--courbe) both;
}

.hero .titre__serif {
  animation-delay: 0.06s;
}

.hero .titre__capitales {
  animation-delay: 0.12s;
}

.hero .hero__chapo {
  animation-delay: 0.22s;
}

.hero .selecteur {
  animation-delay: 0.32s;
}

.hero__actions,
.diapo {
  animation-delay: 0.42s;
}

@keyframes monter {
  from {
    transform: translateY(1.25rem);
    opacity: 0;
  }
}

/* ---------- Sélecteur de bistrot : trois points, un par bistrot ---------- */

/* Le choix du bistrot : une ligne de trois noms. Le nom choisi se souligne en terre cuite. */
.selecteur {
  width: 100%;
  max-width: 30rem;
  container: selecteur / inline-size;
}

.selecteur__legende {
  margin-bottom: 0.125rem;
  padding: 0;
  color: var(--texte-doux);
  font-family: var(--police-serif);
  font-size: var(--taille-3);
  font-style: italic;
  line-height: 1.3;
}

.selecteur__choix {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(0.75rem, 5.5cqi, 1.75rem);
}

.selecteur__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
}

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

.selecteur__option:has(:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.selecteur__disque {
  position: relative;
  padding-block: 0.25rem;
  border-bottom: 1.5px solid var(--filet-fort);
}

/* Le soulignement terre cuite se déroule depuis la gauche. */
.selecteur__disque::before {
  content: "";
  position: absolute;
  height: 2.5px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--courbe);
  background: var(--accent);
  inset: auto 0 -2px;
}

.selecteur__nom {
  transition: opacity 0.2s;
  opacity: 0.72;
  font-family: var(--police-titres);
  font-size: clamp(0.875rem, 4.6cqi, 1.3125rem);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.1;
  white-space: nowrap;
}

.selecteur__option:hover .selecteur__nom {
  opacity: 1;
}

:root[data-resto="bordeaux"] .selecteur__option[data-club="bordeaux"] .selecteur__disque::before,
:root[data-resto="merignac"] .selecteur__option[data-club="merignac"] .selecteur__disque::before,
:root[data-resto="gradignan"] .selecteur__option[data-club="gradignan"] .selecteur__disque::before,
:root:not([data-resto]) .selecteur__option:has(:checked) .selecteur__disque::before {
  transform: none;
}

:root[data-resto="bordeaux"] .selecteur__option[data-club="bordeaux"] .selecteur__nom,
:root[data-resto="merignac"] .selecteur__option[data-club="merignac"] .selecteur__nom,
:root[data-resto="gradignan"] .selecteur__option[data-club="gradignan"] .selecteur__nom,
:root:not([data-resto]) .selecteur__option:has(:checked) .selecteur__nom {
  opacity: 1;
}

/* Sous les noms : les horaires, puis l'adresse du bistrot choisi. La hauteur est réservée, rien ne saute. */
.selecteur__detail {
  min-height: 1.5em;
  margin-top: 0.5rem;
  color: var(--texte-doux);
  font-size: var(--taille-1);
  line-height: 1.5;
}

.selecteur__detail span {
  display: none;
}

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

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

@media (width >= 900px) {
  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
    min-height: min(100svh - var(--entete) - 4.5rem, 46rem);
    gap: clamp(2rem, 4vw, 4rem);
  }

  .hero__texte {
    gap: 1.25rem;
  }

  .hero__actions {
    display: flex;
  }

  .diapo {
    min-height: 26rem;
    aspect-ratio: auto;
  }
}

/* ---------- Les repères pratiques : une ligne, sous le hero ---------- */

.faits {
  display: grid;
  width: min(100%, var(--largeur));
  margin-inline: auto;
  padding: 0 var(--gouttiere);
  color: var(--texte-doux);
  font-size: var(--taille-1);
}

.faits li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding-block: 0.75rem;
  border-top: 1px solid var(--filet);
  gap: 0.125rem 0.625rem;
}

.faits li:last-child {
  border-bottom: 1px solid var(--filet);
}

.faits__titre {
  color: var(--encre);
  font-weight: 650;
}

.faits__titre::before {
  content: "";
  display: inline-block;
  width: 0.4375rem;
  height: 0.4375rem;
  margin-right: 0.625rem;
  transform: translateY(-0.1em);
  border-radius: 50%;
  background: var(--accent);
}

@media (width >= 900px) {
  .faits {
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    border-block: 1px solid var(--filet);
  }

  .faits li,
  .faits li:last-child {
    padding-block: 1.125rem;
    border: 0;
  }
}

/* ---------- 2. Au tableau ---------- */

.pdj .section__tete {
  margin-bottom: 2rem;
}

/* ---------- Le bandeau jaune : les mots du bistrot, en continu ---------- */

.tin {
  overflow: hidden;
  background: var(--accent);
  color: var(--fond);
}

.tin__piste {
  display: flex;
  width: max-content;
  animation: defiler 42s linear infinite;
}

.tin__mots {
  display: flex;
  flex: none;
}

.tin__mots li {
  display: flex;
  align-items: center;
  padding-block: 0.875rem;
  font-family: var(--police-titres);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tin__mots li::after {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  margin-inline: 1.25rem;
  border-radius: 50%;
  background: var(--fond);
}

@keyframes defiler {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 3. La carte : trois plats en images, la carte complète derrière un lien ---------- */

.carte__tete {
  display: grid;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

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

/* La formule : un encart brun sur le papier. */
.formule {
  align-self: end;
  padding: 1.25rem 1.375rem;
  border-radius: var(--rayon);
  background: var(--encre);
  color: var(--fond);
}

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

.formule__ligne {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 0.5rem;
  border-top: 1px solid var(--filet);
  font-size: var(--taille-2);
  gap: 1rem;
}

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

.formule__note {
  margin-top: 0.25rem;
  color: var(--texte-doux);
  font-size: var(--taille-1);
}

.mets__photo {
  margin-bottom: 0.875rem;
  aspect-ratio: 4 / 3;
}

.mets__photo img {
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--courbe);
  object-fit: cover;
}

.mets:hover .mets__photo img {
  transform: scale(1.05);
}

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

.mets__nom {
  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;
}

.mets__prix {
  font-size: var(--taille-2);
  font-weight: 650;
  white-space: nowrap;
}

.mets__detail {
  margin-top: 0.25rem;
  font-size: var(--taille-2);
  line-height: 1.45;
}

/* La dernière carte : la porte vers la carte complète. */
.mets__tuile {
  display: grid;
  align-content: end;
  height: 100%;
  min-height: 14rem;
  padding: 1.375rem;
  transition:
    background-color 0.3s,
    color 0.3s;
  border-radius: 0 0 var(--angle);
  background: var(--encre);
  color: var(--fond);
  text-decoration: none;
}

.mets__tuile-serif {
  font-family: var(--police-serif);
  font-size: var(--taille-7);
  font-style: italic;
  line-height: 1;
}

.mets__tuile-titre {
  font-family: var(--police-titres);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 600;
  line-height: 0.9;
}

.mets__tuile-fleche {
  margin-top: 0.75rem;
  transition: transform 0.3s var(--courbe);
  color: var(--accent);
  font-size: var(--taille-7);
  line-height: 1;
}

.mets__tuile:hover .mets__tuile-fleche {
  transform: translateX(0.5rem);
}

.carte__liens {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  gap: 0 2.5rem;
}

.carte__liens .lien-fleche {
  font-size: var(--taille-1);
}

@media (width >= 900px) {
  .carte__tete {
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    align-items: end;
    gap: 3rem;
  }

  .carte__mets {
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    gap: 1.5rem;
  }
}

/* ---------- 4. La broche du vendredi : le seul aplat terre cuite de la page ---------- */

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

.match__contenu {
  display: grid;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  gap: 2rem;
}

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

/* La rôtissoire : une vidéo en hauteur, cadrée sur les broches. */
.match__film {
  --rideau: var(--accent);

  position: relative;
  overflow: hidden;
  border-radius: 0 var(--angle) 0 0;
  background: var(--fond);
  aspect-ratio: 1;
}

/* Le cadre descend sur les broches : le haut de la rôtissoire n'apporte rien. */
.match__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 82%;
}

.match .surtitre {
  color: var(--fond);
}

.titre--geant {
  font-size: clamp(3.75rem, 2rem + 9vw, 9rem);
}

.match__chapo {
  max-width: 36rem;
  font-size: var(--texte-grand);
  line-height: 1.45;
}

.match :focus-visible {
  outline-color: var(--fond);
}

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

.bouton--clair:hover {
  border-color: var(--fond);
  background: var(--fond);
  color: var(--encre);
}

@media (width >= 680px) {
  .match__contenu {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
  }

  .match__film {
    aspect-ratio: 4 / 5;
  }
}

/* ---------- 5. Côté bar ---------- */

.bar__grille {
  display: grid;
  gap: 2rem;
}

/* Une grande photo sur deux rangs, deux petites à côté. */
.bar__visuels {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
}

.bar__visuel {
  aspect-ratio: 4 / 3;
}

.bar__visuel--grand {
  grid-row: span 2;
  border-radius: var(--angle) 0 0;
  aspect-ratio: auto;
}

.bar__visuel:last-child {
  border-radius: 0 0 var(--angle);
}

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

.bar__texte .section__tete {
  margin-bottom: 1.5rem;
}

.bar__bloc {
  display: grid;
  padding-block: 0.875rem;
  border-top: 1px solid var(--filet);
  gap: 0.25rem;
}

.bar__bloc:last-child {
  border-bottom: 1px solid var(--filet);
}

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

.bar__bloc dd {
  margin: 0;
  color: var(--texte-doux);
  font-size: var(--taille-2);
  line-height: 1.5;
}

@media (width >= 900px) {
  .bar__grille {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  .bar__bloc {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    align-items: baseline;
    gap: 1.5rem;
  }
}

/* ---------- 6. Les trois bistrots : des fiches à faire glisser ----------
   Une photo, un nom, une adresse (qui ouvre l'itinéraire), un téléphone, un seul bouton. */

/* En position relative : le texte masqué des liens reste dans la fiche, donc dans la zone qui défile. */
.bistrot {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.25rem;
}

.bistrot__photo {
  position: relative;
  justify-self: stretch;
  overflow: hidden;
  margin: 0 0 1rem;
  border-radius: var(--rayon) var(--rayon) var(--angle) var(--rayon);
  aspect-ratio: 4 / 3;
}

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

.bistrot__nom {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  font-family: var(--police-titres);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  gap: 0.625rem;
}

.bistrot__adresse,
.bistrot__contact {
  font-size: var(--taille-2);
  font-style: normal;
}

.bistrot__adresse a,
.bistrot__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--texte-doux);
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.25em;
}

.bistrot__adresse a:hover,
.bistrot__contact a:hover {
  color: var(--encre);
  text-decoration-color: var(--accent);
}

.bistrot__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
  gap: 0.5rem 1.5rem;
}

@media (width >= 900px) {
  .bistrots {
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }
}

/* ---------- Cascades : les blocs voisins arrivent l'un après l'autre ---------- */

.anime .mets:nth-child(2),
.anime .bistrot:nth-child(2) {
  transition-delay: 0.08s;
}

.anime .mets:nth-child(3),
.anime .bistrot:nth-child(3) {
  transition-delay: 0.16s;
}

.anime .mets:nth-child(4) {
  transition-delay: 0.24s;
}

/* ---------- Le Bistrot du Carrelet : un bandeau discret sous les trois bistrots ---------- */

.voisin {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--filet);
  border-radius: var(--angle) 0 0;
  background: var(--fond-doux);
}

.voisin__titre {
  font-family: var(--police-titres);
  font-size: var(--taille-7);
  font-weight: 600;
  letter-spacing: var(--approche-serree);
  line-height: 1.1;
}

.voisin__texte p {
  margin-top: 0.35rem;
  color: var(--texte-doux);
}

@media (width >= 800px) {
  .voisin {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 2.5rem;
  }
}
