/* Base : polices, remise à zéro, typographie, boutons, utilitaires. */

/* Fraunces : la police du logo. Le 600 pour les titres, l'italique 400 pour les accents. */
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/polices/fraunces-600.woff2") format("woff2");
}

@font-face {
  font-family: Fraunces;
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/polices/fraunces-400-italique.woff2") format("woff2");
}

/* Police variable : toutes les graisses de 400 à 700 dans un seul fichier. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/polices/instrument-sans.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--fond);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete) + 1rem);
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  margin: 0;
  padding-bottom: var(--barre);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: var(--texte);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
fieldset,
address {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  min-width: 0;
  border: 0;
}

address {
  font-style: normal;
}

/* <picture> ne sert qu'à choisir le format : la mise en page ne voit que l'image. */
picture {
  display: contents;
}

main {
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- Utilitaires ---------- */

.evitement {
  position: fixed;
  z-index: 200;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--fond);
  font-weight: 600;
}

.evitement:focus {
  transform: none;
}

/* Lu par les lecteurs d'écran, invisible à l'écran. */
.masque {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Le surtitre : petites capitales espacées, précédées d'un trait. Le même sur tous les sites du club. */
.surtitre {
  display: flex;
  align-items: center;
  color: var(--texte-doux);
  font-size: var(--taille-1);
  font-weight: 650;
  letter-spacing: var(--approche-large);
  line-height: 1.4;
  text-transform: uppercase;
  gap: 0.875rem;
}

.surtitre::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 1px;
  background: currentcolor;
}

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

/* Le point jaune : un anneau, plein quand le bistrot est choisi. */
.point {
  display: inline-block;
  flex: none;
  width: var(--point);
  height: var(--point);
  border: 2px solid var(--encre);
  border-radius: 50%;
}

:root[data-resto="bordeaux"] [data-club="bordeaux"] .point,
:root[data-resto="merignac"] [data-club="merignac"] .point,
:root[data-resto="gradignan"] [data-club="gradignan"] .point {
  border-color: var(--accent);
  background: var(--accent);
}

/* ---------- Titres en duo : serif italique + capitales ---------- */

.titre {
  display: flex;
  flex-direction: column;
  font-size: var(--titre);
  font-weight: 400;
  line-height: 0.88;
  text-wrap: balance;
}

.titre__serif {
  font-family: var(--police-serif);
  font-size: 0.46em;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.titre__capitales {
  font-family: var(--police-titres);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.titre--hero {
  font-size: var(--titre-hero);
}

.titre--hero .titre__capitales {
  white-space: nowrap;
}

.titre--petit {
  font-size: var(--titre-petit);
}

.titre--sombre {
  color: var(--fond);
}

/* ---------- Boutons et liens ---------- */

/* Tout ce qui se touche est une pilule. Texte en bas de casse, comme une phrase. */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.25rem 1.375rem;
  transition:
    transform 0.2s var(--courbe),
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
  border: 1.5px solid var(--filet-fort);
  border-radius: var(--pilule);
  background: transparent;
  color: var(--encre);
  font-size: var(--taille-2);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  gap: 0.5rem;
}

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

.bouton:active {
  transform: scale(0.97);
}

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

.bouton--grand {
  min-height: 3.25rem;
  padding-inline: 1.75rem;
  font-size: var(--taille-3);
}

.lien-fleche {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  gap: 0.5em;
  font-size: var(--taille-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}

.lien-fleche::after {
  content: "→";
  transition: transform 0.25s var(--courbe);
}

.lien-fleche:hover::after {
  transform: translateX(0.3em);
}

/* La légende d'une photo : une pastille sombre dans son angle. */
.etiquette {
  position: absolute;
  z-index: 2;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--pilule);
  background: var(--voile);
  color: var(--fond);
  font-size: 0.75rem;
  font-weight: 550;
  line-height: 1.2;
}

.etiquette--ligne {
  position: static;
  display: inline-block;
}

.puces li {
  position: relative;
  padding-left: 1.5rem;
}

.puces li + li {
  margin-top: 0.5rem;
}

.puces li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Sections ---------- */

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

.section__tete {
  display: grid;
  justify-items: start;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
  gap: 1rem;
}

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

/* ---------- Apparitions au défilement ---------- */

.anime [data-entree] {
  transform: translateY(1.75rem);
  opacity: 0;
  transition:
    transform var(--duree) var(--courbe),
    opacity var(--duree) var(--courbe);
}

.anime [data-entree].vu {
  transform: none;
  opacity: 1;
}

/* Les titres de section : le surtitre, puis chaque ligne du titre, puis le texte. */
.anime .section__tete[data-entree] {
  transform: none;
  opacity: 1;
}

.anime .section__tete > *,
.anime .section__tete .titre > * {
  transform: translateY(1.25rem);
  opacity: 0;
  transition:
    transform var(--duree) var(--courbe),
    opacity var(--duree) var(--courbe);
}

.anime .section__tete .titre {
  transform: none;
  opacity: 1;
}

.anime .section__tete.vu > *,
.anime .section__tete.vu .titre > * {
  transform: none;
  opacity: 1;
}

.anime .section__tete .titre > :nth-child(1) {
  transition-delay: 0.08s;
}

.anime .section__tete .titre > :nth-child(2) {
  transition-delay: 0.16s;
}

.anime .section__tete > .section__chapo {
  transition-delay: 0.26s;
}

/* ---------- Pause et mouvement réduit : tout reste lisible, rien ne bouge ---------- */

.en-pause *,
.en-pause *::before,
.en-pause *::after {
  transition: none !important;
  animation: none !important;
}

.en-pause {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (width >= 900px) {
  body {
    padding-bottom: 0;
  }

  /* En deux colonnes, le grand titre suit la largeur de sa colonne. */
  .titre--hero {
    font-size: clamp(3.75rem, 11.8vw, 10.5rem);
  }
}
