/* ============================================================
   Club Photo Saint-Cézaire — feuille de style v0
   Design : sombre, élégant, photo en plein écran, accent doré.
   ============================================================ */

:root {
  --bg: #0d0e10;
  --bg-alt: #131519;
  --bg-card: #17191e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ece9e2;
  --muted: #a09c92;
  --accent: #d2a24c;
  --accent-soft: rgba(210, 162, 76, 0.14);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
  --header-h: 76px;
  --radius: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 420;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

::selection { background: var(--accent); color: #14100a; }

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section { padding: clamp(64px, 9vw, 110px) 0; }
.section.alt { background: var(--bg-alt); }

/* Étiquette de section : petites capitales dorées + filet */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section-head { margin-bottom: clamp(30px, 5vw, 54px); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-head .sub { color: var(--muted); max-width: 640px; }

.section-head.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Boutons ---------- */
/* .btn a d'abord été écrit pour des liens <a>, qui n'ont pas de fond. Sur un
   vrai <button>, le navigateur impose son fond gris clair et sa police : le
   texte clair de .ghost devenait alors illisible (blanc sur blanc). On remet
   donc les boutons à plat. Placé AVANT .btn.solid, dont le fond doré doit
   continuer à gagner (2 classes l'emportent sur élément + classe). */
button.btn,
input[type="submit"].btn {
  background: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn {
  display: inline-block;
  padding: 13px 30px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.btn:hover { background: var(--accent); color: #14100a; transform: translateY(-2px); }

.btn.solid { background: var(--accent); color: #14100a; }
.btn.solid:hover { background: #e2b563; border-color: #e2b563; }

.btn.ghost { border-color: rgba(255, 255, 255, 0.35); color: var(--text); }
.btn.ghost:hover { background: var(--text); color: #14100a; border-color: var(--text); }

.link-more {
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.link-more:hover { border-color: var(--accent); }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(13, 14, 16, 0.88);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  height: 46px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
}
.brand .brand-name em { font-style: italic; color: var(--accent); }
.brand .brand-city {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Seuil du menu burger : à réajuster si le nombre d'entrées de NAV change
   (7 entrées depuis le retrait de « Membres » le 06/08/2026). */
@media (max-width: 1150px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(13, 14, 16, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 10px 0 24px;
    transform: translateY(-130%);
    transition: transform 0.35s ease;
  }
  body.nav-open .main-nav { transform: translateY(0); }
  .main-nav a { padding: 14px 0; font-size: 0.9rem; }
}

/* ---------- Héros plein écran (accueil) ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-slides { position: absolute; inset: 0; }
.hero-slides .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}
.hero-slides .slide.on { opacity: 1; }
.hero-slides img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 9s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,14,16,0.55) 0%, rgba(13,14,16,0.25) 40%, rgba(13,14,16,0.82) 100%);
}

.hero-content { position: relative; z-index: 2; padding: 0 6vw; }
.hero-content .eyebrow { justify-content: center; }
.hero-content .eyebrow::after {
  content: "";
  width: 42px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 380;
  margin-bottom: 0.35em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.hero-content h1 em { font-style: italic; color: var(--accent); }
/* Le sur-titre du héros vit à l'intérieur du h1 (pour que le titre principal de
   la page nomme le club) : on lui rend la police et la graisse du corps de
   texte, que le h1 lui imposerait sinon. Rendu strictement identique. */
.hero-content h1 .eyebrow {
  display: flex;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 300;
  /* Le h1 porte une ombre portée, réservée au grand titre dans le dessin
     d'origine : on ne la laisse pas déborder sur le sur-titre. */
  text-shadow: none;
}
.hero-content .tagline {
  color: rgba(236, 233, 226, 0.85);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 560px;
  margin: 0 auto 2.2em;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-credit {
  position: absolute;
  right: 22px; bottom: 18px;
  z-index: 2;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236, 233, 226, 0.55);
}

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1px solid rgba(236, 233, 226, 0.5);
  border-radius: 999px;
}
.scroll-cue::before {
  content: "";
  position: absolute;
  left: 50%; top: 8px;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--accent);
  animation: cue 1.8s infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Bandeau de titre (pages intérieures) ---------- */
.page-head {
  padding: calc(var(--header-h) + clamp(46px, 8vw, 90px)) 0 clamp(40px, 6vw, 70px);
  background:
    radial-gradient(900px 400px at 15% -10%, var(--accent-soft), transparent 60%),
    var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 0.2em; }
.page-head .sub { color: var(--muted); max-width: 660px; margin: 0; }

/* Chapeau avec un bouton à droite (accès à l'espace membres depuis Adhérents) */
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 30px;
}
.page-head-row .sub { flex: 1 1 380px; }
.btn-connexion { white-space: nowrap; }

/* ---------- Chiffres clés ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.stat {
  background: var(--bg-card);
  padding: 26px 20px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  display: block;
}
.stat .lab {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Cartes sorties / agenda ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.card-sortie {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s, border-color 0.25s;
}
.card-sortie:hover { transform: translateY(-5px); border-color: rgba(210, 162, 76, 0.45); }

.card-sortie .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 8px 12px;
  border: 1px solid rgba(210, 162, 76, 0.5);
  border-radius: 8px;
  background: var(--accent-soft);
  line-height: 1.1;
}
.date-badge .d { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); }
.date-badge .m { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.tag {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

.card-sortie h3 { font-size: 1.3rem; margin: 0; }
.card-sortie .infos-sortie { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.card-sortie .lieu,
.card-sortie .heure { color: var(--accent); font-size: 0.82rem; letter-spacing: 0.06em; }
.card-sortie .desc { color: var(--muted); font-size: 0.94rem; margin: 0; }

.card-sortie .liens { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.card-sortie .liens .link-more { font-size: 0.72rem; align-self: flex-start; }

.voir-plus { text-align: center; margin-top: 34px; }
.voir-plus .btn {
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* Agenda : liste des événements passés */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}
.timeline-item:first-child { border-top: 1px solid var(--line); }
.timeline-item .quand {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 4px;
}
.timeline-item .quand .heure {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.timeline-item h3 { font-size: 1.25rem; margin-bottom: 4px; }
.timeline-item .desc { color: var(--muted); font-size: 0.94rem; margin: 0; }
.timeline-item .liens { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.timeline-item .liens .link-more { font-size: 0.72rem; }

/* Événement passé dont les photos sont en ligne : la ligne entière est cliquable */
.timeline-item.has-galerie { cursor: pointer; transition: background 0.2s; }
.timeline-item.has-galerie:hover { background: rgba(255, 255, 255, 0.028); }
.timeline-item h3 a { transition: color 0.2s; }
.timeline-item.has-galerie:hover h3 a { color: var(--accent); }
.timeline-item .voir-photos { border-bottom-color: var(--line); }
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- « Ajouter à mon agenda » ---------- */
/* Le bouton de chaque carte de sortie, et le menu qu'il déplie : Google
   Agenda d'un côté, le fichier .ics de l'autre. */

.ajout-agenda { position: relative; align-self: flex-start; }

.ajout-agenda-btn {
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: none;
  border: 1px solid rgba(210, 162, 76, 0.45);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s, border-color 0.2s;
}
.ajout-agenda-btn:hover,
.ajout-agenda-btn[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ajout-agenda-btn svg { width: 13px; height: 13px; flex: none; }

.ajout-agenda-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 10px);
  min-width: 250px;
  background: var(--bg-alt);
  border: 1px solid rgba(210, 162, 76, 0.35);
  border-radius: 9px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.ajout-agenda-menu[hidden] { display: none; }
.ajout-agenda-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}
.ajout-agenda-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.ajout-agenda-menu svg { width: 17px; height: 17px; flex: none; color: var(--accent); }
.ajout-agenda-menu .sous {
  display: block;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Le menu s'ouvre depuis le bord gauche du bouton, lui-même aligné sur le
   texte de la carte : 250 px y tiennent, jusque sur un écran de téléphone
   et jusque dans la dernière colonne. Rien à corriger en petit écran. */

/* ---------- Abonnement à l'agenda (page Agenda) ---------- */

.abo-agenda {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 26px;
  margin-bottom: 30px;
}
.abo-agenda h3 {
  font-size: 1.12rem;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.abo-agenda h3 svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.abo-agenda p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 62ch; }
.abo-agenda .btn { flex: none; }
.abo-agenda-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.abo-agenda-actions .link-more { font-size: 0.7rem; }

/* ---------- Photo du mois (accueil) ---------- */
.pdm-spot {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.pdm-spot .frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.pdm-spot .frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.pdm-spot .frame:hover img { transform: scale(1.04); }
.pdm-spot .frame figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 22px 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236, 233, 226, 0.9);
}
@media (max-width: 860px) { .pdm-spot { grid-template-columns: 1fr; } }

/* ---------- Grilles de photos ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.photo-grid .ph {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.photo-grid .ph img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}
.photo-grid .ph:hover img { transform: scale(1.06); }
.photo-grid .ph .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
}
.photo-grid .ph:hover .cap { opacity: 1; transform: translateY(0); }
.photo-grid .ph .cap .aut { color: var(--accent); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; }

/* Mosaïque d'aperçu (accueil) : première tuile en vedette */
.mosaic { grid-auto-rows: 200px; }
.mosaic .ph { aspect-ratio: auto; }
.mosaic .ph:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 640px) { .mosaic .ph:first-child { grid-column: span 1; grid-row: span 1; } }

/* Vue « proportions réelles » — présentation PAR DÉFAUT de toutes les galeries
   (classe posée par main.js ; ?vue=cadre dans l'URL redonne l'ancienne grille
   recadrée en 4/3). Chaque tuile reprend le cadrage d'origine : les portraits
   s'affichent en portrait, les paysages comme avant. Mise en page en colonnes,
   façon accrochage mural. La hauteur de chaque tuile vient du ratio écrit dans
   data/*.js (style inline posé par main.js), donc la page ne saute pas pendant
   le chargement ; sans ratio connu, la tuile garde le 4/3 de base. */
.photo-grid.libre {
  display: block;
  columns: 260px;
  column-gap: 14px;
}
.photo-grid.libre .ph {
  break-inside: avoid;
  margin: 0 0 14px;
}

/* ---------- Galeries à thèmes ---------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.theme-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform 0.25s, border-color 0.25s;
}
.theme-card:hover { transform: translateY(-5px); border-color: rgba(210, 162, 76, 0.45); }
.theme-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s;
}
.theme-card:hover img { transform: scale(1.05); }
.theme-card .body { padding: 18px 20px 20px; }
.theme-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.theme-card p { color: var(--muted); font-size: 0.88rem; margin: 0 0 10px; }
.theme-card .gal-meta { font-size: 0.78rem; letter-spacing: 0.04em; }
.theme-card .gal-meta .tag { margin-right: 4px; }
.theme-card .count {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Bouton « Haut de page » ----------
   Apparaît dès qu'on a descendu dans la page, s'efface tout seul quelques
   secondes après le dernier défilement. Sous la visionneuse (z-index 200). */
.haut-de-page {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(13, 14, 16, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s, transform 0.35s, visibility 0.35s,
              background 0.25s, color 0.25s, border-color 0.25s;
}
.haut-de-page.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.haut-de-page:hover, .haut-de-page:focus-visible {
  background: var(--accent);
  color: #14100a;
  border-color: var(--accent);
}
@media (max-width: 640px) { .haut-de-page { right: 14px; bottom: 14px; } }

/* ---------- Visionneuse (lightbox) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 9, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.lightbox .lb-caption {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(236, 233, 226, 0.9);
  letter-spacing: 0.04em;
  max-width: 80vw;
}
.lightbox .lb-caption .aut {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 3px;
}
.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  width: 48px; height: 48px;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.lightbox button:hover { background: var(--accent); border-color: var(--accent); color: #14100a; }
.lightbox .lb-close { top: 22px; right: 22px; }
.lightbox .lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count {
  position: absolute;
  top: 34px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

/* Blocs titrés dans une galerie (ex. FestiFoto : expo / coulisses) */
.bloc-titre {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin: 44px 0 18px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}
#galerie-theme-grid > .bloc-titre:first-child { margin-top: 0; }
#galerie-theme-grid > .photo-grid + .photo-grid { margin-top: 14px; }

/* Navigation entre mois (page galerie mensuelle) */
.mois-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* ---------- Page FestiFoto : affiche de l'édition en cours ---------- */
.affiche-spot {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.affiche {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.affiche img { width: 100%; height: auto; display: block; }
@media (max-width: 860px) {
  .affiche-spot { grid-template-columns: 1fr; }
  .affiche { max-width: 380px; margin-inline: auto; }
}

/* ---------- Page Le club ---------- */
.quote {
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 28px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-style: italic;
  color: var(--text);
  max-width: 760px;
  margin: 0;
}
.quote footer {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.info-card h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.info-card h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.info-card p, .info-card li { color: var(--muted); font-size: 0.94rem; }
.info-card ul { margin: 0; padding-left: 20px; }
.info-card li { margin-bottom: 6px; }
.info-card strong { color: var(--text); font-weight: 500; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-note { color: var(--muted); font-size: 0.8rem; margin-top: 14px; }

/* Champ piège du formulaire de contact : les robots à spam remplissent tout
   ce qu'ils trouvent, un visiteur ne peut ni le voir ni l'atteindre au
   clavier. Volontairement sorti de l'écran plutôt que « display: none » :
   les robots les plus avancés ignorent les champs franchement masqués. */
.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Adhérents : trombinoscope & pages membres ---------- */
.adherents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}
.adherent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 18px 24px;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s;
}
.adherent-card:hover { transform: translateY(-5px); border-color: rgba(210, 162, 76, 0.45); }
.adherent-card h3 { font-size: 1.18rem; margin: 0; }
.adherent-card .compte {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.adherent-card .socials { margin-top: 4px; gap: 8px; }
.adherent-card .socials a { padding: 8px 11px; }

.avatar {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(210, 162, 76, 0.5);
  background: var(--accent-soft);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initiales {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.avatar-grand { width: 124px; height: 124px; }
.avatar-grand.avatar-initiales { font-size: 2.5rem; }

.membre-entete { display: flex; align-items: center; gap: clamp(18px, 4vw, 34px); flex-wrap: wrap; }
.socials-inline { display: inline-flex; gap: 8px; margin-left: 12px; vertical-align: middle; }
.socials-inline a {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.socials-inline a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Espace membres : que dépose-t-on ? ---------- */
/* La question précède la zone de dépôt parce qu'elle décide du dossier où
   les fichiers atterrissent. Posée au moment du dépôt, elle coûte deux
   secondes au membre ; devinée après coup, elle coûte un email. */
.depot-choix {
  max-width: 640px;
  margin: 0 auto clamp(18px, 3vw, 28px);
}
.depot-choix .form-field { margin-bottom: 16px; }
.depot-choix .form-message { margin-bottom: 0; }
/* « (facultatif) » suit un intitulé en petites capitales espacées : sans
   cette remise à zéro, la parenthèse s'y perdrait. */
#depot-precision-etat { text-transform: none; letter-spacing: 0.04em; }

/* ---------- Espace membres : Chat IA (bureau) ---------- */
/* Même largeur que la question du dépôt, plus haut sur la page : les deux
   zones de saisie de l'espace membres se répondent au lieu de s'étaler sur
   toute la largeur de l'écran. */
.chat-ia { max-width: 640px; margin: 0 auto; }
.chat-ia .form-note { margin-top: 10px; }
/* Ici le libellé est une phrase entière, pas un mot-clé : les petites
   capitales espacées des autres formulaires la rendraient pénible à lire. */
.chat-ia .form-field label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 10px;
}

/* ---------- Espace membres : zone de dépôt ---------- */
.depot-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: clamp(36px, 6vw, 60px) 24px;
  border: 2px dashed rgba(210, 162, 76, 0.45);
  border-radius: var(--radius);
  background: var(--accent-soft);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.depot-zone:hover {
  border-color: var(--accent);
  background: rgba(210, 162, 76, 0.2);
  transform: translateY(-3px);
}
.depot-icone { font-size: 2.6rem; color: var(--accent); line-height: 1; }
.depot-titre { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); }
.depot-texte { color: var(--muted); max-width: 560px; font-size: 0.95rem; }
.depot-zone .btn { margin-top: 6px; }
.depot-note {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Espace membres : liste de documents ---------- */
.doc-liste {
  border-top: 1px solid var(--line);
  margin-bottom: clamp(30px, 5vw, 50px);
}
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.doc-item:hover { background: var(--bg-card); }
.doc-item .doc-nom { font-size: 1.02rem; }
.doc-item:hover .doc-nom { color: var(--accent); }
.doc-item .doc-meta {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.doc-item .doc-fleche { color: var(--accent); font-size: 1rem; }

/* Fichiers trop lourds pour le site : hébergés sur Dropbox, ou en attente de lien */
.doc-item.doc-attente { opacity: 0.55; cursor: default; }
.doc-item.doc-attente:hover { background: none; }
.doc-item .doc-note {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 560px) {
  .doc-item { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Bande d'appel à l'action ---------- */
.cta-band {
  text-align: center;
  padding: clamp(70px, 10vw, 120px) 0;
  background:
    radial-gradient(800px 300px at 50% 120%, var(--accent-soft), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--line);
}
.cta-band h2 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); max-width: 720px; margin-inline: auto; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 2em; }

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #0a0b0d;
  padding: 60px 0 30px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Les rubriques du pied de page sont des h2 (voir buildFooter dans main.js) :
   le sélecteur leur redonne ici la taille discrète d'un intertitre. */
.site-footer h2 {
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 16px;
}
.site-footer p, .site-footer li { color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a:hover { color: var(--text); }
.site-footer .brand-name { font-size: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-logo { height: 52px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-bottom a { border-bottom: 1px solid var(--line); }
.footer-bottom a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Apparition au défilement ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .haut-de-page { transform: none; transition: opacity 0.2s, visibility 0.2s; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slides img { animation: none; transform: none; }
  .scroll-cue::before { animation: none; }
}

/* ============================================================
   Espace membres : connexion et création du mot de passe
   ============================================================ */
.carte-auth {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 42px);
}
.carte-auth .auth-titre {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 10px;
}
.carte-auth .auth-intro {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.auth-lien {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.auth-lien a { color: var(--accent); border-bottom: 1px solid transparent; }
.auth-lien a:hover { border-bottom-color: var(--accent); }
.auth-aide {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.auth-aide a { color: var(--accent); }
.auth-attente { color: var(--muted); text-align: center; padding: 26px 0; }

.btn.pleine-largeur {
  display: block;
  width: 100%;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Champ de mot de passe avec le bouton « Afficher » à l'intérieur */
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 92px; }
.champ-mdp .oeil {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 10px;
}
.champ-mdp .oeil:hover { color: var(--accent); }

/* Messages sous les formulaires */
.form-message {
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text);
}
.form-message.erreur {
  border-color: rgba(219, 106, 92, 0.5);
  background: rgba(219, 106, 92, 0.12);
}
.form-message.succes {
  border-color: rgba(210, 162, 76, 0.5);
  background: var(--accent-soft);
}

/* Bandeau « Bonjour Prénom » de l'espace membres */
.bandeau-membre {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.bandeau-membre #bonjour {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

/* Dépôt de photos : survol et suivi des envois */
.depot-zone { cursor: pointer; }
.depot-zone.survol {
  border-color: var(--accent);
  background: rgba(210, 162, 76, 0.24);
  transform: scale(1.01);
}
.depot-zone:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.depot-suivi {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.depot-entete {
  padding: 13px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.depot-entete.succes { color: var(--accent); }
.depot-entete.partiel { color: #e0a08a; }
.depot-ligne {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.depot-ligne:last-child { border-bottom: none; }
.depot-fichier { color: var(--text); word-break: break-all; }
.depot-etat { color: var(--muted); white-space: nowrap; font-size: 0.8rem; }
.depot-ligne.attente { opacity: 0.5; }
.depot-ligne.encours .depot-etat { color: var(--accent); }
.depot-ligne.ok .depot-etat { color: var(--accent); }
.depot-ligne.echec .depot-etat { color: #db6a5c; white-space: normal; text-align: right; }

@media (max-width: 560px) {
  .depot-ligne { flex-direction: column; align-items: flex-start; gap: 4px; }
  .depot-ligne.echec .depot-etat { text-align: left; }
}

/* Fiche « Mon compte » : dire clairement ce qui sera publié et ce qui reste
   entre les mains des responsables — c'est la première question que se pose
   quelqu'un à qui on demande son numéro de téléphone. */
.form-note.champ-public,
.form-note.champ-prive {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.form-note.champ-public::before,
.form-note.champ-prive::before {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  flex: none;
}
.form-note.champ-public::before {
  content: "Public";
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(210, 162, 76, 0.4);
}
.form-note.champ-prive::before {
  content: "Privé";
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

/* ---------- Pages légales (mentions, confidentialité) ----------
   Colonne de texte étroite : au-delà d'environ 80 signes par ligne,
   l'œil perd le début de la ligne suivante — et ces pages se lisent. */
.legal { max-width: 760px; }
.legal h3 {
  font-size: 1.12rem;
  margin: 2.2em 0 0.5em;
}
.legal h3:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0 0 1.2em; padding-left: 22px; }
.legal li { margin-bottom: 9px; }
.legal strong { color: var(--text); font-weight: 500; }
.legal a {
  color: var(--accent);
  border-bottom: 1px solid rgba(210, 162, 76, 0.35);
}
.legal a:hover { border-bottom-color: var(--accent); }
.legal code {
  font-size: 0.9em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.legal-maj {
  margin-top: 2.4em;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

/* Le tableau des cookies défile seul sur mobile plutôt que d'élargir la page */
.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
}
.legal-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.legal-table thead th {
  color: var(--text);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom-color: rgba(210, 162, 76, 0.4);
}
.legal-table td { color: var(--muted); }
.legal-table tbody tr:last-child td { border-bottom: none; }
