/* ==========================================================
   Events By TML — site public
   ========================================================== */
:root {
  --orange: #ffaa1c;
  --orange-dark: #e08f00;
  --orange-glow: rgba(255, 170, 28, .35);
  --black: #000;
  --surface: #0d0d0d;
  --surface-2: #161616;
  --border: #262626;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --radius: 14px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--orange); }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bandeau d'avertissement quand le site est fermé (vu par l'administrateur connecté) */
.admin-preview {
  position: relative; z-index: 70; padding: 9px 16px; text-align: center;
  background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 12px, #111 12px, #111 24px);
  border-bottom: 1px solid var(--orange); color: var(--orange);
  font-size: .82rem; font-weight: 700;
}
.admin-preview a { color: var(--text); margin-left: 10px; }

/* ---------- Bandeau défilant (annulations / messages) ---------- */
.ticker {
  position: relative; z-index: 60; overflow: hidden;
  background: var(--orange); color: var(--black);
  font-size: .85rem; font-weight: 700; line-height: 1;
}
.ticker-track { display: flex; width: max-content; animation: ticker-scroll var(--ticker-duration, 30s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; flex-shrink: 0; }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; padding: 11px 0; white-space: nowrap; }
.ticker-tag {
  padding: 4px 8px; border-radius: 4px; background: var(--black); color: var(--orange);
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.ticker-sep { padding: 0 26px; font-size: .7rem; opacity: .55; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  /* Sans animation : messages affichés fixes, sur plusieurs lignes si besoin */
  .ticker-track { animation: none; width: auto; justify-content: center; }
  .ticker-group { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .ticker-group + .ticker-group { display: none; }
  .ticker-item { white-space: normal; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a1a1a;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 52px; width: auto; }
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .92rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 10px 16px; border-radius: 999px; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--orange); }
.main-nav a.active { color: var(--black); background: var(--orange); }

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

@media (max-width: 720px) {
  .header-inner { height: 64px; }
  .brand img { height: 42px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 20px 20px;
    background: rgba(0, 0, 0, .97); border-bottom: 1px solid #1a1a1a;
    display: none;
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 14px 16px; border-radius: 10px; }
}

/* ---------- Bannière (format imposé : 2460 x 924) ---------- */
.banner { overflow: hidden; } /* contient le léger zoom d'apparition */
.banner-inner, .banner-placeholder { position: relative; max-width: 2460px; margin: 0 auto; }
.banner-img, .banner-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 2460 / 924; object-fit: cover; }

/* Fondu vers le noir de la page. Le dégradé suit une courbe douce (nombreux paliers)
   pour éviter l'effet de « bandes », et finit sur exactement le noir du fond :
   la fin de l'image devient invisible. Léger voile en haut pour la lisibilité du menu. */
.banner-inner::after {
  content: ''; position: absolute; inset: 0 0 -1px; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 20%),
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 36%,
      rgba(0, 0, 0, .03) 42%,
      rgba(0, 0, 0, .08) 48%,
      rgba(0, 0, 0, .16) 54%,
      rgba(0, 0, 0, .27) 60%,
      rgba(0, 0, 0, .40) 66%,
      rgba(0, 0, 0, .54) 72%,
      rgba(0, 0, 0, .68) 78%,
      rgba(0, 0, 0, .81) 84%,
      rgba(0, 0, 0, .91) 90%,
      rgba(0, 0, 0, .97) 95%,
      #000 100%);
}
/* Écrans plus larges que la bannière : les côtés se fondent aussi dans le noir */
@media (min-width: 2461px) {
  .banner-inner::before {
    content: ''; position: absolute; inset: 0 -1px; z-index: 1; pointer-events: none;
    background: linear-gradient(to right, #000, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%, #000);
  }
}
.banner-placeholder {
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 70% 30%, rgba(255, 170, 28, .18), transparent 60%), #050505;
}
.banner-placeholder img { width: min(45%, 560px); height: auto; aspect-ratio: auto; }

/* Le texte de bienvenue remonte sur la partie fondue de la bannière */
.banner.has-image + .welcome { margin-top: calc(-1 * clamp(24px, 9vw, 240px)); }
.welcome h1, .welcome p { text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }

/* ---------- Bienvenue ---------- */
.welcome { position: relative; z-index: 1; text-align: center; padding: 64px 20px 24px; }
.agenda { position: relative; z-index: 1; }
.welcome h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); }
.welcome h1::after {
  content: ''; display: block; width: 72px; height: 4px; margin: 20px auto 0;
  background: var(--orange); border-radius: 4px; box-shadow: 0 0 18px var(--orange-glow);
}
.welcome p { max-width: 720px; margin: 22px auto 0; color: #cfcfcf; font-size: 1.08rem; }

/* ---------- Titres de sections ---------- */
.section-head { display: flex; align-items: center; gap: 20px; margin: 48px 0 28px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase; white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--orange), transparent); }

.page-hero { padding: 56px 20px 8px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
.page-hero h1::after { content: '.'; color: var(--orange); }
.page-hero p { color: var(--muted); margin: 10px 0 0; max-width: 720px; }

.empty {
  text-align: center; padding: 56px 20px; margin: 32px 0;
  border: 1px dashed #333; border-radius: var(--radius); background: var(--surface);
}
.empty p { margin: 4px 0; font-weight: 600; }
.empty .muted { font-weight: 400; }

/* ---------- Agenda ---------- */
.agenda { padding-bottom: 72px; }
.event-list { display: grid; gap: 16px; }
.event-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center; gap: 24px;
  padding: 18px 24px 18px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.event-card:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 10px 30px -12px var(--orange-glow); }
.event-card.has-image { grid-template-columns: 96px auto 1fr auto; }

.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 96px; height: 108px; border-radius: 12px;
  background: var(--orange); color: var(--black); text-transform: uppercase; line-height: 1;
}
.event-date .day-name { font-size: .72rem; font-weight: 700; letter-spacing: .1em; }
.event-date .day { font-size: 2.4rem; font-weight: 900; margin: 4px 0 2px; }
.event-date .month { font-size: .85rem; font-weight: 800; }
.event-date .year { font-size: .7rem; font-weight: 600; opacity: .7; margin-top: 3px; }

.event-image img { width: 160px; height: 112px; object-fit: cover; border-radius: 10px; }
.event-body { min-width: 0; } /* les adresses longues n'élargissent pas la carte */
.event-body h3 { font-size: 1.3rem; }

/* État de la billetterie : « Dernières places » pousse à réserver, « Complet » informe */
.event-status {
  display: inline-block; margin: 0 0 9px; padding: 4px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
}
.event-status.is-last { background: rgba(255, 170, 28, .14); color: var(--orange); border: 1px solid rgba(255, 170, 28, .5); }
.event-status.is-full { background: #1c1c1c; color: #c7c7c7; border: 1px solid #3c3c3c; }

/* Heure et lieu : picto orange, texte clair, retour à la ligne aligné sous le texte */
.event-meta {
  list-style: none; padding: 0; margin: 10px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px 24px;
  color: #dcdcdc; font-size: .92rem; font-weight: 600;
}
.event-meta li { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.event-meta svg { flex: none; margin-top: 2px; color: var(--orange); }
.event-meta span { overflow-wrap: anywhere; }

/* Description résumée : la carte reste compacte, le texte complet est sur la page de la soirée */
.event-desc {
  margin: 10px 0 0; color: #b3b3b3; font-size: .94rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; border: 0;
  background: var(--orange); color: var(--black);
  font: inherit; font-weight: 800; font-size: .88rem; text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.btn:hover { background: #ffbb4a; box-shadow: 0 0 24px var(--orange-glow); transform: translateY(-1px); }
/* Événement annulé : ruban en coin, contenu estompé */
.event-card.is-cancelled { position: relative; overflow: hidden; }
.event-card.is-cancelled:hover { border-color: #ff5a4f; box-shadow: 0 10px 30px -12px rgba(255, 90, 79, .35); }
.event-card.is-cancelled .event-date { background: #2a2a2a; color: #8a8a8a; }
.event-card.is-cancelled .event-image,
.event-card.is-cancelled .event-body { opacity: .5; }
.event-card.is-cancelled .event-image img { filter: grayscale(1); }
/* Boutons en bas, avec une marge sous le ruban (même quand deux boutons sont empilés) */
.event-card.is-cancelled .event-action { align-self: end; padding-top: 44px; }
.cancel-ribbon {
  position: absolute; top: 16px; right: -42px; z-index: 2;
  width: 150px; padding: 6px 0; transform: rotate(35deg);
  background: #ff5a4f; color: #fff; text-align: center;
  font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}
.btn-cancelled, .btn-cancelled:hover {
  background: transparent; color: #ff5a4f; border: 1px solid rgba(255, 90, 79, .5);
  box-shadow: none; transform: none; cursor: not-allowed; font-size: .78rem;
}
@media (max-width: 860px) {
  .cancel-ribbon { top: 14px; right: -44px; font-size: .7rem; }
  .event-card.is-cancelled:not(.has-image) .event-body h3 { padding-right: 64px; } /* le titre ne passe pas sous le ruban */
  .event-card.is-cancelled .event-action { padding-top: 0; } /* sur mobile, les boutons sont en bas de la carte */
}

/* Boutons empilés : billetterie puis événement Facebook */
.event-action { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.btn-facebook {
  gap: 8px; background: transparent; color: var(--text); border: 1px solid #3a3a3a;
  font-size: .76rem; padding: 10px 18px;
}
.btn-facebook svg { color: #1877f2; transition: color .2s; }
.btn-facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; box-shadow: 0 0 22px rgba(24, 119, 242, .35); }
.btn-facebook:hover svg { color: #fff; }

/* Lien vers les photos d'une soirée passée : contour orange, se remplit au survol */
.btn-photos {
  gap: 9px; padding: 11px 20px; font-size: .8rem;
  background: transparent; color: var(--orange); border: 1px solid var(--orange);
}
.btn-photos:hover { background: var(--orange); color: var(--black); }

/* Entrée gratuite sans lien : mention positive, non cliquable */
.btn-free, .btn-free:hover {
  background: transparent; color: var(--orange); border: 1px solid var(--orange);
  box-shadow: none; transform: none; cursor: default;
}
.btn-disabled, .btn-disabled:hover {
  background: transparent; color: #777; border: 1px solid #333;
  box-shadow: none; transform: none; cursor: not-allowed; font-size: .78rem;
}

/* Mobile : une seule colonne (visuel, date en pastille, texte pleine largeur, boutons) —
   le texte n'est plus coincé dans une colonne étroite à côté du bloc date */
@media (max-width: 860px) {
  .event-card, .event-card.has-image { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .event-image { order: -1; }
  .event-image img { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; }
  .event-date {
    flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px;
    justify-self: start; width: auto; height: auto;
    padding: 8px 15px; border-radius: 999px; letter-spacing: .04em;
  }
  .event-date .day-name { font-size: .78rem; }
  .event-date .day { font-size: 1.1rem; margin: 0; }
  .event-date .month { font-size: .88rem; }
  .event-date .year { font-size: .78rem; margin-top: 0; }
  .event-body h3 { font-size: 1.25rem; }
  .event-meta { flex-direction: column; gap: 9px; margin-top: 12px; font-size: .95rem; color: #e2e2e2; }
  .event-desc { -webkit-line-clamp: 4; line-clamp: 4; }
  .event-more { margin-top: 14px; }
  .event-action { margin-top: 2px; }
  .event-action .btn { width: 100%; }
}

/* ---------- Soirées passées ---------- */
.past { position: relative; z-index: 1; padding-bottom: 72px; }
.past .section-head { margin-top: 8px; }
.past-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.past-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.past-card[hidden] { display: none; }
.past-card:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 10px 30px -12px var(--orange-glow); }
.past-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.past-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.past-card:hover .past-cover img { transform: scale(1.04); }
/* Sans visuel ni photo : le logo, centré et discret */
.past-cover.is-empty { display: grid; place-items: center; }
.past-cover.is-empty img { width: 55%; height: auto; object-fit: contain; opacity: .35; }

.past-body { flex: 1; padding: 16px 18px 4px; }
.past-date { margin: 0; color: var(--orange); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.past-body h3 { margin: 7px 0 0; font-size: 1.1rem; }
.past-body h3 a { color: inherit; text-decoration: none; }
.past-body h3 a:hover { color: var(--orange); }
.past-place { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.past-card .btn-photos { margin: 16px 18px 18px; }
.past-link {
  margin: 16px 18px 18px; font-size: .85rem; font-weight: 600; text-decoration: none;
}
.past-link:hover { text-decoration: underline; }
.past-more { display: flex; justify-content: center; margin-top: 22px; }
.past-more:not(:has(button:not([hidden]))) { display: none; }

/* ---------- Galerie ---------- */
.gallery-page { padding-bottom: 72px; }
.album-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.album-nav a {
  text-decoration: none; color: var(--text); font-size: .85rem; font-weight: 600;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.album-nav a:hover { border-color: var(--orange); color: var(--orange); }

.album { padding-top: 48px; scroll-margin-top: 90px; }
.album-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.album-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; }
.album-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.album-head time { color: var(--orange); font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; }
.album-desc { color: #bdbdbd; margin: 12px 0 0; }

/* Téléchargement de toute la section (ZIP) */
.btn-download-all {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 18px; border-radius: 999px; text-decoration: none;
  border: 1px solid #3a3a3a; color: var(--text); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .05em; transition: .2s;
}
.btn-download-all svg { color: var(--orange); transition: color .2s; }
.btn-download-all .dl-meta { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); transition: color .2s; }
.btn-download-all:hover { background: var(--orange); border-color: var(--orange); color: var(--black); box-shadow: 0 0 22px var(--orange-glow); }
.btn-download-all:hover svg, .btn-download-all:hover .dl-meta { color: var(--black); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; }
.photo-item { position: relative; }
.photo-item[hidden] { display: none; }
.photo { display: block; overflow: hidden; border-radius: 10px; background: var(--surface-2); aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.photo:hover img { transform: scale(1.06); opacity: .85; }

/* Téléchargement d'une photo : icône au survol (toujours visible sur écran tactile) */
.photo-dl {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .65); color: #fff; border: 1px solid rgba(255, 255, 255, .15);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s, background .2s, color .2s;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.photo-item:hover .photo-dl, .photo-dl:focus-visible { opacity: 1; transform: none; }
.photo-dl:hover { background: var(--orange); color: var(--black); border-color: var(--orange); }
@media (hover: none) {
  .photo-dl { opacity: 1; transform: none; width: 34px; height: 34px; top: 6px; right: 6px; }
}

/* Section repliée : 2 rangées visibles, la dernière s'estompe pour suggérer la suite */
.album.is-collapsed .photo-grid {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, rgba(0, 0, 0, .2) 100%);
          mask-image: linear-gradient(to bottom, #000 55%, rgba(0, 0, 0, .2) 100%);
}
.album-toggle { display: flex; justify-content: center; margin-top: 18px; }
.album-toggle:not(:has(button:not([hidden]))) { display: none; }
.btn-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--orange); border: 1px solid var(--orange);
  font: inherit; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn-toggle:hover { background: var(--orange); color: var(--black); box-shadow: 0 0 22px var(--orange-glow); }
.btn-toggle[hidden] { display: none; }
.btn-toggle .toggle-count { font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .8; }
.btn-toggle svg { transition: transform .2s; }
.btn-toggle[data-expand]:hover svg { transform: translateY(2px); }
.btn-toggle[data-collapse]:hover svg { transform: translateY(-2px); }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .95);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 150px); border-radius: 6px; object-fit: contain; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .06); border: 1px solid #333; color: var(--text);
  width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; transition: .2s;
}
.lightbox button:hover { background: var(--orange); color: var(--black); border-color: var(--orange); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; white-space: nowrap;
}
.lb-count { color: var(--muted); font-size: .85rem; }
.lb-download {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
  background: var(--orange); color: var(--black); text-decoration: none;
  font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; transition: .2s;
}
.lb-download:hover { background: #ffbb4a; box-shadow: 0 0 22px var(--orange-glow); }
@media (max-width: 720px) {
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 170px); border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-bar { bottom: 28px; flex-direction: column; gap: 6px; }
  .lb-download { padding: 8px 14px; font-size: .72rem; }
}

/* ---------- Catalogue / visionneuse PDF ---------- */
.pdf-viewer { margin: 32px 0 72px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pdf-viewer .pdf-toolbar { border-radius: var(--radius) var(--radius) 0 0; }
.pdf-viewer .pdf-stage { border-radius: 0 0 var(--radius) var(--radius); }
.pdf-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: #080808;
  position: sticky; top: 76px; z-index: 5;
}
.pdf-group { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.pdf-group [data-zoom] { min-width: 48px; text-align: center; }
.pdf-toolbar button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid #333; background: transparent;
  color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: .2s;
}
.pdf-toolbar button:hover { background: var(--orange); border-color: var(--orange); color: var(--black); }
.pdf-toolbar button:disabled { opacity: .3; pointer-events: none; }
.pdf-download {
  text-decoration: none; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 16px; border-radius: 999px; background: var(--orange); color: var(--black);
}
.pdf-stage { position: relative; overflow: auto; padding: 24px; min-height: 60vh; max-height: 85vh; text-align: center; background: #111; }
.pdf-stage canvas { display: inline-block; max-width: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); background: #fff; }
.pdf-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--muted); }
.pdf-loading[hidden] { display: none; }
.pdf-viewer:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.pdf-viewer:fullscreen .pdf-toolbar { top: 0; }
.pdf-viewer:fullscreen .pdf-stage { flex: 1; max-height: none; }
@media (max-width: 720px) {
  .pdf-toolbar { top: 64px; padding: 10px; }
  .pdf-stage { padding: 10px; }
  .pdf-download { padding: 9px 12px; }
}

/* ---------- Contact ---------- */
.contact-page { padding: 32px 20px 80px; }
.contact-form, .contact-success {
  max-width: 820px; margin: 0 auto; padding: 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; color: #e6e6e6; }
.field .req { color: var(--orange); }
.field .opt { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: .78rem; }
.field input, .field textarea, .field select {
  display: block; width: 100%; padding: 14px 16px;
  background: #050505; color: var(--text); border: 1px solid #333; border-radius: 12px;
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 170px; line-height: 1.5; }
.field select { color-scheme: dark; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%), linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position: calc(100% - 22px) 24px, calc(100% - 16px) 24px; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 170, 28, .18); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #ff5a4f; }
.field.has-error input:focus, .field.has-error textarea:focus, .field.has-error select:focus { box-shadow: 0 0 0 3px rgba(255, 90, 79, .2); }
.field-error { margin: 6px 0 0; color: #ff5a4f; font-size: .82rem; font-weight: 600; }
.field-error[hidden] { display: none; }
.form-alert {
  margin-bottom: 22px; padding: 13px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem;
  color: #ff5a4f; background: rgba(255, 90, 79, .08); border: 1px solid rgba(255, 90, 79, .35);
}
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.form-footer .muted { margin: 0; font-size: .82rem; }
.form-footer .btn[disabled] { opacity: .6; pointer-events: none; }
/* Champ piège : hors écran pour les humains, visible pour les robots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-success { text-align: center; color: var(--text); }
.contact-success svg { color: var(--orange); margin: 0 auto 16px; filter: drop-shadow(0 0 14px var(--orange-glow)); }
.contact-success h2 { font-size: 1.5rem; margin-bottom: 12px; }
.contact-success p { color: #cfcfcf; margin: 0 0 26px; line-height: 1.7; }

@media (max-width: 720px) {
  .contact-form, .contact-success { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-footer .btn { width: 100%; }
}

/* ---------- Animations au chargement ---------- */
@keyframes fade-down { from { opacity: 0; transform: translateY(-12px); } }
@keyframes banner-in { from { opacity: 0; transform: scale(1.02); } }
.site-header { animation: fade-down .7s cubic-bezier(.2, .7, .2, 1) both; }
.banner-inner, .banner-placeholder { animation: banner-in 1.2s cubic-bezier(.2, .7, .2, 1) both; }

/* Éléments qui apparaissent en glissant légèrement vers le haut (déclenchés par main.js) */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-visible, .no-reveal .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .site-header, .banner-inner, .banner-placeholder { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid #1a1a1a; background: #050505; padding: 44px 0 28px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-logo { height: 60px; width: auto; }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #333; color: var(--text); transition: .2s;
}
.socials a:hover { background: var(--orange); border-color: var(--orange); color: var(--black); box-shadow: 0 0 20px var(--orange-glow); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--orange); }
.copyright { margin: 0; color: #666; font-size: .8rem; }
/* ---------- Page d'une soirée ---------- */
/* Le visuel garde ses proportions d'origine : rien n'est rogné. Sa largeur est limitée
   pour que sa hauteur ne dépasse jamais 74 % de l'écran, même pour une affiche verticale.
   (--cover-ratio = largeur / hauteur du fichier, calculé par evenement.php) */
.event-cover {
  max-width: min(1640px, calc(74vh * var(--cover-ratio, 1.78)));
  margin: 0 auto; position: relative;
}
/* Fondu court en bas (dernier dixième) : le bandeau se marie à la page sans effacer
   les informations imprimées en bas de l'affiche. */
.event-cover img { display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, rgba(0, 0, 0, .5) 97%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 90%, rgba(0, 0, 0, .5) 97%, transparent 100%); }
.event-cover.is-cancelled img { filter: grayscale(.85); }
/* Bloc d'informations centré sous le visuel (mise en page « affiche ») */
.event-detail { max-width: 820px; padding-bottom: 80px; text-align: center; }
.event-detail.no-cover { padding-top: 40px; }
.event-detail h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 18px; }
.event-detail .event-status { margin-bottom: 12px; font-size: .75rem; padding: 5px 14px; }
.back-link { margin: 0 0 20px; }
.back-link a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.back-link a:hover { color: var(--orange); }
.event-alert {
  margin: 0 0 20px; padding: 13px 16px; border-radius: 12px; font-size: .95rem;
  color: #ff5a4f; background: rgba(255, 90, 79, .08); border: 1px solid rgba(255, 90, 79, .35);
}
.event-alert.is-past { color: var(--muted); background: var(--surface); border-color: var(--border); }
.event-facts { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.event-facts li { display: flex; align-items: center; gap: 9px; color: var(--orange); font-weight: 600; font-size: .95rem; }
.event-facts a { color: inherit; }
.event-text { color: #cfcfcf; line-height: 1.8; max-width: 640px; margin: 0 auto 28px; }
.event-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 26px; }
.event-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; color: var(--muted); font-size: .88rem; }
.event-share a, .link-like {
  color: var(--text); background: none; border: 0; padding: 0; font: inherit; font-size: .88rem;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.event-share a:hover, .link-like:hover { color: var(--orange); }
.event-more { margin: 10px 0 0; }
.event-more a { font-size: .88rem; font-weight: 600; text-decoration: none; }
.event-more a:hover { text-decoration: underline; }
.event-body h3 a { color: inherit; text-decoration: none; }
.event-body h3 a:hover { color: var(--orange); }
@media (max-width: 720px) {
  .event-cta .btn { width: 100%; }
}

/* ---------- Bandeau cookies ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 120;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease;
}
.consent[hidden] { display: none; }
.consent.is-visible { opacity: 1; transform: none; }
.consent-inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px 26px; flex-wrap: wrap;
}
.consent p { margin: 0; color: #cfcfcf; font-size: .9rem; line-height: 1.6; max-width: 760px; }
.consent a { color: var(--orange); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { padding: 11px 24px; }
.btn-ghost-light, .btn-ghost-light:hover {
  background: transparent; color: var(--text); border: 1px solid #3a3a3a; box-shadow: none;
}
.btn-ghost-light:hover { border-color: var(--text); }
@media (max-width: 720px) {
  .consent { left: 10px; right: 10px; bottom: 10px; }
  .consent-inner { padding: 16px; gap: 14px; }
  .consent p { font-size: .85rem; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { transition: none; }
}

/* ---------- Pages de texte (politique de confidentialité) ---------- */
.legal {
  max-width: 820px; margin: 24px auto 80px; padding: 36px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  color: #cfcfcf; line-height: 1.75;
}
.legal h2 {
  font-size: 1.25rem; margin: 40px 0 14px; padding-top: 24px;
  border-top: 1px solid var(--border); color: var(--text);
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-size: 1.05rem; margin: 26px 0 10px; color: var(--text); }
.legal p { margin: 0 0 14px; }
.legal strong { color: var(--text); }
.legal a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.legal ul { margin: 0 0 18px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--orange); }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 480px; }
.legal th, .legal td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal th { background: #151515; color: var(--text); font-weight: 700; }
@media (max-width: 720px) {
  .legal { padding: 22px 18px; margin-bottom: 56px; }
  .legal h2 { font-size: 1.12rem; }
}
