/* Mégadanse v2 : habillage du contenu rendu par main.js (classes d'origine conservées). */

.intro-card {
  background: var(--blanc); border-radius: var(--r); padding: clamp(22px, 3.5vw, 40px);
  box-shadow: var(--ombre); margin: 0 0 clamp(20px, 3vw, 32px);
}
.intro-card h2 { margin: 0 0 14px; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1; }
.intro-card a, .welcome-text a, .pour-plus-infos a, #contact-info a { color: var(--rouge); font-weight: 600; text-underline-offset: 3px; }
.page-lead { max-width: 70ch; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); }
.page-lead:empty { display: none; }
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.badge-new {
  display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px; vertical-align: middle;
  background: var(--rouge); color: var(--blanc); font-family: var(--f-texte); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.date-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--encre); color: var(--blanc); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em;
}
.date-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge-vif); box-shadow: 0 0 0 4px rgb(255 42 56 / 0.25); }

/* Cartes génériques (partenaires, galerie, historique, événements) */
.card-item {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card-item:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.card-item .photo { position: relative; overflow: hidden; background: var(--encre-2); }
.card-item .photo img { width: 100%; height: 100%; transition: transform 0.9s var(--ease); }
.card-item:hover .photo img { transform: scale(1.06); }
.card-item .body { padding: 18px 20px 22px; }
.card-item h3 { margin: 0 0 6px; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1.05; }
.card-item .body p { margin: 0 0 6px; }
.card-item > .date-badge { position: absolute; z-index: 2; top: 14px; left: 14px; }

/* ---------- Accueil ---------- */
.next-event {
  display: grid; gap: 0; overflow: hidden; margin-bottom: clamp(48px, 8vw, 110px);
  background: var(--encre); color: var(--blanc); border-radius: var(--r-grand); box-shadow: var(--ombre-forte);
}
.next-event > a { display: block; background: radial-gradient(circle at 30% 30%, #2a1e1e, var(--encre)); padding: clamp(18px, 3vw, 36px); perspective: 900px; }
.next-event > a img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8); transform-style: preserve-3d; }
.next-event .txt { display: grid; align-content: center; gap: 14px; padding: clamp(24px, 4vw, 60px); }
.next-event .tag {
  justify-self: start; padding: 7px 14px; border-radius: 999px; background: var(--rouge);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
}
.next-event h3 { margin: 0; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 1.5rem + 3.4vw, 4.6rem); line-height: 0.95; }
.next-event p { margin: 0; color: rgb(255 255 255 / 0.82); font-size: 1.08rem; }
@media (min-width: 860px) { .next-event { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.decompte { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.decompte div { min-width: 74px; padding: 10px 12px 8px; border-radius: 14px; background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.12); text-align: center; }
.decompte b { display: block; font-family: var(--f-titre); font-style: italic; font-weight: 800; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.decompte span { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgb(255 255 255 / 0.6); }

.welcome-text { display: grid; gap: 0 clamp(28px, 5vw, 80px); align-items: start; }
.welcome-text h2 {
  grid-column: 1 / -1; margin: 0 0 clamp(20px, 3vw, 40px); max-width: 12ch;
  font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; color: var(--encre);
  font-size: clamp(3rem, 1.6rem + 7vw, 8.4rem); line-height: 0.9;
}
.welcome-text p { margin: 0 0 1.1em; max-width: 62ch; font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem); color: #2b2523; }
.welcome-text h2 + p, .welcome-text .affiche-img + h2 + p { font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); line-height: 1.3; font-weight: 600; color: var(--encre); }
.welcome-text .affiche-img {
  width: 100%; max-width: 460px; justify-self: center; margin: 0 0 28px; border-radius: 16px;
  box-shadow: var(--ombre-forte); transform: rotate(-2deg);
}
@media (min-width: 980px) {
  .welcome-text { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .welcome-text .affiche-img { grid-column: 2; grid-row: 2 / span 6; position: sticky; top: 110px; margin: 0; }
  .welcome-text p { grid-column: 1; }
}

.disciplines { overflow: hidden; }
.disc-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgb(255 255 255 / 0.14); }
.disc-liste li { border-bottom: 1px solid rgb(255 255 255 / 0.14); }
.disc-liste a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0.06em var(--gout);
  font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  font-size: clamp(2.6rem, 1rem + 8vw, 9rem); line-height: 1.04;
  color: transparent; -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.85);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.4s var(--ease), -webkit-text-stroke-color 0.4s;
}
.disc-liste a::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--rouge);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease);
}
.disc-liste a:hover, .disc-liste a:focus-visible { color: var(--blanc); -webkit-text-stroke-color: transparent; }
.disc-liste a:hover::before, .disc-liste a:focus-visible::before { transform: scaleY(1); }
.disc-liste .disc-num { font-family: var(--f-texte); font-size: 0.9rem; font-weight: 700; -webkit-text-stroke: 0; color: var(--rouge-vif); }
.disc-liste a:hover .disc-num { color: var(--blanc); }
.disc-mot { display: inline-block; will-change: transform; }

.infos-grille { display: grid; gap: clamp(20px, 3vw, 36px); }
@media (min-width: 900px) { .infos-grille { grid-template-columns: 1.2fr 0.8fr; } }
.pour-plus-infos { background: var(--blanc); border-radius: var(--r-grand); padding: clamp(26px, 4vw, 52px); box-shadow: var(--ombre); }
.pour-plus-infos h2 { margin: 0 0 18px; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 0.95; }
.pour-plus-infos .socials { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pour-plus-infos .socials a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px;
  background: var(--encre); color: var(--blanc); text-decoration: none; transition: background 0.25s;
}
.pour-plus-infos .socials a:hover { background: var(--rouge); }
.appel {
  display: grid; align-content: space-between; gap: 22px; padding: clamp(26px, 4vw, 52px); border-radius: var(--r-grand);
  color: var(--blanc); background: linear-gradient(135deg, var(--rouge), var(--rouge-sombre)); box-shadow: var(--ombre-forte);
  position: relative; overflow: hidden;
}
.appel::after { content: ''; position: absolute; right: -40px; bottom: -30px; width: 220px; height: 320px; background: url('../media/couple-320.webp') center / contain no-repeat; opacity: 0.18; transform: rotate(-8deg); }
.appel h2 { margin: 0; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem); line-height: 0.95; }
.appel .surtitre { color: var(--blanc); }
.appel-boutons { position: relative; z-index: 1; display: grid; gap: 10px; }
.appel .btn { --bg: var(--blanc); --fg: var(--encre); }
.appel .btn-ligne { --bg: transparent; --fg: var(--blanc); border-color: rgb(255 255 255 / 0.7); }

/* ---------- Planning : tuiles et filtres dans planning-v1.css (chargé sur cette page seulement) ---------- */
/* Le contenu arrive après chargement des JSON : le pied reste sous la ligne de flottaison (pas de CLS). */
.page .panneau { min-height: 75svh; }

/* ---------- Tableaux (tarifs, calendrier, inscription) ---------- */
.table-defile { overflow-x: auto; border-radius: var(--r); box-shadow: var(--ombre); margin: 0 0 clamp(20px, 3vw, 32px); }
table.planning { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--blanc); font-size: 0.98rem; border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); }
.intro-card table.planning { box-shadow: none; border-radius: 12px; overflow: hidden; outline: 1px solid #e6e6e6; }
table.planning th { padding: 14px 16px; text-align: left; background: var(--encre); color: var(--blanc); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; }
table.planning td { padding: 14px 16px; border-bottom: 1px solid #e6e6e6; vertical-align: middle; }
table.planning tbody tr { transition: background 0.2s; }
/* Survol (choix d'Alex) : fond noir, texte blanc, liseré rouge à gauche ; tout le texte de la ligne passe en blanc. */
table.planning tbody tr:hover { background: var(--encre); }
table.planning tbody tr:hover td, table.planning tbody tr:hover td :not(.prix-badge) { color: var(--blanc); }
table.planning tbody tr:hover td:first-child { box-shadow: inset 5px 0 0 var(--rouge); }
table.planning td:first-child { font-weight: 700; }
.tarif-adhesion td:first-child { color: var(--rouge); }
.tarif-reduction td { color: var(--gris); }
.prix-badge { display: inline-block; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--rouge); color: var(--blanc); font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { table.planning th, table.planning td { padding: 11px 10px; font-size: 0.9rem; } }

.document-buttons { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.document-btn {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 20px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--encre); color: var(--blanc); font-weight: 700; text-decoration: none; text-align: left; line-height: 1.25;
  transition: transform 0.35s var(--ease), background 0.25s;
}
.document-btn:hover { background: var(--rouge); transform: translateY(-3px); }
.document-btn svg { width: 26px; height: 26px; flex: none; padding: 4px; border-radius: 8px; background: rgb(255 255 255 / 0.12); }
#tarifs-documents h2 { font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem) !important; }

/* ---------- Inscription ---------- */
.inscription-form { display: grid; gap: 0; }
.field-group { display: grid; gap: 6px; margin-bottom: 16px; }
.field-label { font-weight: 700; font-size: 0.92rem; }
.field-group input:not([type='checkbox']):not([type='radio']) {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 2px solid #dcdcdc; background: #fafafa;
  font: inherit; color: var(--encre); transition: border-color 0.2s, box-shadow 0.2s;
}
.field-group input:focus { outline: 0; border-color: var(--rouge); box-shadow: 0 0 0 4px rgb(208 17 31 / 0.14); }
.checkbox-line, .radio-line { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; }
.checkbox-line input, .radio-line input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--rouge); cursor: pointer; }
.radio-row { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.cours-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.cours-jour { padding: 16px 18px; border-radius: 14px; background: #f6f6f6; }
.cours-jour h3 { margin: 0 0 6px; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.5rem; color: var(--rouge); }
.cours-line { border-top: 1px solid #e6e6e6; }
.mention-adhesion { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--blanc); border-left: 4px solid var(--rouge); }
.mention-legale { color: var(--gris); font-size: 0.9rem; }
.inscription-form > .document-btn { justify-self: start; min-height: 60px; padding: 0 30px; font-size: 1rem; background: var(--rouge); }
.inscription-form > .document-btn:hover { background: var(--encre); }

/* ---------- Équipe ---------- */
.team-grid { display: grid; gap: clamp(18px, 2.6vw, 30px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.team-card { overflow: hidden; background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); transition: transform 0.5s var(--ease), box-shadow 0.5s; }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.team-card .photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, var(--rouge), var(--encre)); }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(0.25) contrast(1.05); transition: transform 1s var(--ease), filter 0.6s; }
.team-card:hover .photo img { transform: scale(1.05); filter: none; }
.team-card .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgb(13 11 11 / 0.75)); pointer-events: none; }
.team-card .photo.placeholder { display: grid; place-items: center; color: var(--blanc); font-weight: 700; }
.team-card .info { padding: 18px 20px 22px; }
.team-card h3 { margin: -54px 0 14px; position: relative; z-index: 2; color: var(--blanc); font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 2.2rem; line-height: 1; text-shadow: 0 4px 18px rgb(0 0 0 / 0.5); }
.team-card .info > p:first-of-type strong { color: var(--rouge); }
.lieu-jour { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--gris-clair); font-size: 0.95rem; }
.flyer-thumb { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border-radius: 12px; background: #f6f6f6; }
.flyer-thumb img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; }
.flyer-txt p { margin: 4px 0 0; font-size: 0.88rem; }

/* ---------- Événements : frise ---------- */
.events-timeline { position: relative; display: grid; gap: clamp(26px, 5vw, 64px); }
.timeline-card { display: grid; }
.timeline-card .photo { padding: clamp(14px, 2.4vw, 28px); background: radial-gradient(circle at 30% 30%, #2a1e1e, var(--encre)); }
.timeline-card .photo img { width: 100%; max-height: 640px; object-fit: contain; border-radius: 10px; }
.timeline-card .body { display: grid; align-content: center; padding: clamp(22px, 3.5vw, 48px); }
.timeline-card h3 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.6rem); }
@media (min-width: 900px) {
  .events-timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--rouge), transparent); }
  .timeline-card { grid-template-columns: 1fr 1fr; }
  .timeline-item:nth-child(even) .timeline-card .photo { order: 2; }
}

.events-timeline .photo img { object-fit: contain; }

/* ---------- Galerie & partenaires ---------- */
.album-card { cursor: pointer; }
.album-card .photo { aspect-ratio: 4 / 3; }
.album-card .photo img { object-fit: cover; }
.album-card .photo::after {
  content: 'Ouvrir'; position: absolute; right: 14px; bottom: 14px; padding: 7px 14px; border-radius: 999px;
  background: var(--rouge); color: var(--blanc); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.4s var(--ease);
}
.album-card:hover .photo::after { opacity: 1; transform: none; }
.album-empty { display: grid; place-items: center; height: 100%; color: rgb(255 255 255 / 0.7); }
#partners-grid .photo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 22px; background: var(--blanc); border-bottom: 1px solid #e6e6e6; font-family: var(--f-titre); font-style: italic; font-weight: 800; font-size: 1.6rem; text-transform: uppercase; }
#partners-grid .photo img { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); object-fit: contain; filter: grayscale(1); opacity: 0.85; transition: filter 0.4s, opacity 0.4s, transform 0.9s var(--ease); }
#partners-grid .card-item:hover .photo img { filter: none; opacity: 1; }
/* Logo caché tant que sa découpe (partenaires-logos.js) n'est pas prête : il apparaît en fondu, sans saut. */
#partners-grid .card-item .photo img[data-logo-attente] { opacity: 0; }

.lightbox {
  position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 70px 16px 24px; overflow-y: auto;
  background: rgb(13 11 11 / 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.lightbox.open { opacity: 1; }
.lightbox-content { display: grid; justify-items: center; gap: 12px; width: min(100%, 1100px); color: var(--blanc); text-align: center; }
.lightbox-title { margin: 0; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); }
.lightbox-media { max-height: 72vh; width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.6); }
.lightbox-caption { margin: 0; color: rgb(255 255 255 / 0.75); }
.lightbox-videos { display: grid; gap: 16px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.lightbox-video-item video { width: 100%; border-radius: 12px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / 0.1); color: var(--blanc); font-size: 2rem; line-height: 1; transition: background 0.2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--rouge); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
body.lightbox-locked { overflow: hidden; }

/* ---------- Contact & mentions ---------- */
#contact-info { font-size: 1.08rem; }
#contact-info ul { padding-left: 1.1em; }
#contact-info li::marker { color: var(--rouge); }
#contact-info h2 { font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem) !important; }
.page-mentions .intro-card { max-width: 820px; }
.page-mentions .intro-card h2 { font-size: 1.6rem !important; }

/* ---------- Apparitions (initialisées par motion.js, jamais bloquantes sans JS) ---------- */
html.attente .bandeau-vivant .lettre, html.attente .heros-accroche, html.attente .heros-cta { opacity: 0; }

/* Carton « Flyer à venir » (événement saisi sans image) */
.flyer-a-venir {
  display: grid; place-content: center; gap: 6px; min-height: 260px; height: 100%; padding: 24px; text-align: center;
  color: var(--blanc); border-radius: 10px;
  background: radial-gradient(circle at 30% 20%, rgb(255 42 56 / 0.35), transparent 60%), linear-gradient(150deg, var(--rouge-sombre), var(--encre) 70%);
}
.flyer-a-venir span { font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1; }
.flyer-a-venir b { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgb(255 255 255 / 0.7); }
.next-event > .flyer-a-venir { margin: clamp(18px, 3vw, 36px); }
