:root {
  --red: #d0111f;
  --red-dark: #7a0a12;
  --black: #121212;
  --white: #ffffff;
  --grey-light: #f6f6f6;
  --grey-mid: #8a8a8a;
  --max-w: 1180px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Work Sans', Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
}

h1, h2, h3, .brand-font {
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- fond anime au scroll ---------- */
#scroll-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--black);
}
#scroll-bg video {
  position: absolute;
  inset: -5% -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  object-position: center;
  filter: blur(7px) saturate(1.05);
}
#scroll-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 6, 0.4);
}

/* ---------- header / bandeau ---------- */
header.site-header {
  position: relative;
}
.bandeau-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}
.bandeau-wrap img.bandeau-img {
  width: 100%;
  height: auto;
  display: block;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,6,6,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: box-shadow 0.2s ease;
}
.menu-toggle.floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 60;
  background: rgba(10,6,6,0.85);
  box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

/* desktop : nav inline, dans la barre logo/reseaux */
nav.main-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
}
nav.main-nav a {
  display: block;
  white-space: nowrap;
  color: rgba(255,255,255,0.82);
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
  padding: 11px 7px;
  border-radius: 6px;
}
nav.main-nav a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
nav.main-nav a.current { color: var(--white); background: var(--red); }

/* le bouton hamburger doit fonctionner a toutes les largeurs, meme quand la nav
   est deja affichee en ligne (desktop) : cliquer dessus bascule vers ce panneau,
   qui prend le dessus sur l'affichage inline le temps qu'il est ouvert. */
nav.main-nav.open {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 86vw;
  height: 100%;
  background: var(--black);
  padding: 80px 24px 24px;
  z-index: 50;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}
nav.main-nav.open a {
  padding: 12px 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
nav.main-nav.open a.current { background: none; color: var(--red); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 40;
  display: none;
}
.nav-backdrop.open { display: block; }

/* mobile : nav en panneau hors-champ, derriere le hamburger */
@media (max-width: 1500px) {
  nav.main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--black);
    padding: 80px 24px 24px;
    transition: right 0.3s ease;
    z-index: 50;
    flex-wrap: nowrap;
    flex-direction: column;
    justify-content: flex-start;
  }
  nav.main-nav.open { right: 0; }
  nav.main-nav a {
    padding: 12px 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  nav.main-nav a.current { background: none; color: var(--red); }
}

/* ---------- bandeau deroulant des disciplines (pleine largeur) ---------- */
.ticker-wrap {
  position: relative;
}
.ticker-clip {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(15,2,3,0.78), rgba(140,12,20,0.5), rgba(15,2,3,0.78));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ticker-clip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.14) 45%, transparent 60%);
  animation: ticker-shine 6s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- barre logo + nav + reseaux, entre le bandeau et le ticker ---------- */
.brand-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
  padding: 0 20px;
  background: rgba(8,5,5,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
nav.main-nav { margin-left: 230px; }
.logo-plate {
  width: 175px;
  height: 175px;
  position: absolute;
  left: 55px;
  top: -18px;
  z-index: 30;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.logo-plate:hover {
  transform: perspective(700px) rotateY(180deg);
}
.logo-plate .logo-badge {
  width: 84px;
  display: block;
  backface-visibility: hidden;
}
.logo-plate::after {
  content: "Mégadanse\A Martignas-sur-Jalle";
  white-space: pre-line;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.3px;
  backface-visibility: hidden;
  transform: rotateY(180deg);
}
.right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,6,6,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.social-icon svg { width: 17px; height: 17px; }
@media (max-width: 1500px) {
  .brand-bar { height: 56px; padding: 0 14px; justify-content: flex-end; }
  .logo-plate { width: 66px; height: 66px; left: 14px; top: -5px; }
  .logo-plate .logo-badge { width: 32px; }
  .logo-plate::after { font-size: 5.5px; padding: 3px; line-height: 1.2; letter-spacing: 0; }
  nav.main-nav { margin-left: 0; }
}
@media (max-width: 640px) {
  .right-controls { gap: 8px; }
  .social-icon { width: 34px; height: 34px; }
  .social-icon svg { width: 15px; height: 15px; }
}
@keyframes ticker-shine {
  0%, 100% { transform: translateX(-30%); opacity: 0.5; }
  50% { transform: translateX(30%); opacity: 0.9; }
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: ticker-scroll 22s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-16.6667%); }
}
.discipline-pill {
  background: var(--red);
  color: var(--white);
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.15);
  animation: pill-pulse 3.4s ease-in-out infinite;
}
.discipline-pill:nth-child(3n+2) { background: var(--black); }
.discipline-pill:nth-child(3n+3) { background: var(--red-dark); }
.discipline-pill:nth-child(2n) { animation-delay: 0.7s; }
.discipline-pill:nth-child(3n) { animation-delay: 1.4s; }
@keyframes pill-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
  50% { transform: scale(1.07); box-shadow: 0 10px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.3); }
}

/* ---------- sections generales ---------- */
main { position: relative; z-index: 1; }

.section {
  padding: 60px 0;
}
.section.card {
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  border: 1px solid rgba(0,0,0,0.06);
}
.intro-card {
  display: inline-block;
  max-width: 640px;
  background: rgba(255,255,255,0.94);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0,0,0,0.3);
  padding: 30px 34px;
  margin: 0 0 40px;
}
.intro-card h1 { margin-bottom: 0.4em; }
.intro-card p:last-child, .intro-card ul:last-child { margin-bottom: 0; }
.intro-card ul { padding-left: 1.2em; }

.welcome-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.08rem;
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px rgba(0,0,0,0.75), 0 14px 30px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.08);
  border: 2px solid rgba(0,0,0,0.28);
  padding: 40px 44px;
}
.welcome-text h2 { font-size: 2.4rem; color: var(--red); }
.welcome-text p { margin: 0 0 1.1em; }
.welcome-text .affiche-img {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  margin: 0 0 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

/* ---------- prochain evenement ---------- */
.next-event {
  max-width: 720px;
  margin: 40px auto;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0,0,0,0.75), 0 14px 30px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.08);
  border: 2px solid rgba(0,0,0,0.28);
  display: grid;
  grid-template-columns: 160px 1fr;
}
.next-event img { width: 100%; height: 100%; object-fit: contain; background: var(--grey-light); }
.next-event .txt { padding: 20px 24px; }
.next-event .tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
@media (max-width: 560px) {
  .next-event { grid-template-columns: 1fr; }
}

/* ---------- pour plus d'infos (accueil) ---------- */
.pour-plus-infos {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px rgba(0,0,0,0.75), 0 14px 30px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.08);
  border: 2px solid rgba(0,0,0,0.28);
  padding: 34px 38px;
}
.pour-plus-infos h2 { font-size: 1.9rem; color: var(--red); margin-bottom: 0.5em; }
.pour-plus-infos .socials { display: flex; justify-content: center; gap: 18px; margin: 14px 0 18px; font-weight: 600; }
.pour-plus-infos .socials a { color: var(--black); }
.pour-plus-infos p { margin: 0 0 1em; }
.pour-plus-infos .contact-line { font-weight: 600; }

/* ---------- boutons de telechargement (documents) ---------- */
.document-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.document-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.document-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.document-btn:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.45); }

/* ---------- grilles ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
#partners-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
#partners-grid .card-item .photo { aspect-ratio: 4/3; }
@media (max-width: 700px) {
  #partners-grid { grid-template-columns: 1fr; }
}
.card-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(0,0,0,0.32);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.card-item .photo {
  aspect-ratio: 3/4;
  background: var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 13px;
}
.card-item .photo img { width: 100%; height: 100%; object-fit: contain; }
.card-item .body { padding: 16px 18px; }
.card-item h3 { font-size: 1.15rem; margin-bottom: 4px; }
.badge-new {
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
}

/* ---------- evenements : timeline verticale ---------- */
.events-timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 0;
}
.events-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(var(--red), var(--red-dark));
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding-bottom: 40px;
}
.timeline-item:nth-child(odd) { padding-right: 40px; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 40px; }
.timeline-item::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--red-dark);
}
.timeline-item:nth-child(odd)::after { right: -8px; }
.timeline-item:nth-child(even)::after { left: -8px; }
.timeline-card { position: relative; }
.timeline-card .date-badge {
  display: block;
  width: fit-content;
  background: var(--red-dark);
  color: var(--white);
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.8rem;
  padding: 6px 14px;
  margin: 14px 0 0 18px;
  border-radius: 999px;
}
@media (max-width: 700px) {
  .events-timeline::before { left: 18px; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 40px;
    padding-right: 0;
  }
  .timeline-item::after,
  .timeline-item:nth-child(odd)::after {
    left: 10px;
    right: auto;
  }
}

/* ---------- equipe des profs (2 par ligne) ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-card {
  display: flex;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(0,0,0,0.32);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 22px;
}
.team-card .photo {
  width: 110px;
  height: 110px;
  min-width: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 11px;
  text-align: center;
  border: 3px solid var(--grey-light);
}
.team-card .photo.placeholder {
  border-style: dashed;
  border-color: rgba(0,0,0,0.18);
  background: transparent;
  font-style: italic;
  padding: 10px;
}
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card .info { flex: 1; min-width: 0; }
.team-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.team-card .lieu-jour { color: #5c5c5c; font-size: 0.85rem; margin-top: 4px; }
.team-card .flyer-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--grey-light);
}
.team-card .flyer-thumb img {
  width: 56px;
  height: 78px;
  object-fit: contain;
  background: var(--grey-light);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.team-card .flyer-thumb .flyer-txt { font-size: 0.85rem; }
.team-card .flyer-thumb a { font-weight: 600; }

/* ---------- planning en cartes par jour ---------- */
.planning-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) {
  .planning-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .planning-grid { grid-template-columns: 1fr; }
}
.day-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(0,0,0,0.32);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.day-card h3 {
  background: linear-gradient(120deg, var(--black), var(--red-dark));
  color: var(--white);
  margin: 0;
  padding: 17px 18px 15px;
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.day-card .session {
  padding: 14px 18px;
  border-bottom: 1px solid var(--grey-light);
}
.day-card .session:last-child { border-bottom: none; }
.session .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.session .mini-pill {
  background: var(--red);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: 'Work Sans', Arial, sans-serif;
}
.session .mini-pill:nth-child(3n+2) { background: var(--black); }
.session .mini-pill:nth-child(3n+3) { background: var(--red-dark); }
.session .prof { font-weight: 600; margin-bottom: 2px; }
.session .heure {
  display: inline-block;
  background: var(--red-dark);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Work Sans', Arial, sans-serif;
  letter-spacing: 0.2px;
  padding: 5px 13px;
  border-radius: 999px;
  margin: 6px 0 4px;
}
.session .lieu { color: #5c5c5c; font-size: 0.85rem; margin-top: 4px; }

/* Couleur d'accent par salle : repere visuel rapide du lieu */
.day-card .session { border-left: 5px solid var(--grey-light); }
.day-card .session.salle-pays-des-graves { border-left-color: var(--red); }
.day-card .session.salle-aime-cesaire { border-left-color: var(--black); }
.day-card .session.salle-bernard-ceret { border-left-color: var(--red-dark); }
.day-card .session.salle-gerard-philipe { border-left-color: #8a6d3b; }

.day-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-card .today-badge {
  background: var(--white);
  color: var(--red-dark);
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

table.planning {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(0,0,0,0.32);
  border: 1px solid rgba(0,0,0,0.06);
}
table.planning th, table.planning td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-light);
  text-align: left;
  font-size: 0.94rem;
}
table.planning th {
  background: linear-gradient(120deg, var(--black), var(--red-dark));
  color: var(--white);
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 1px;
  padding: 14px 16px;
}
table.planning tbody tr:nth-child(even) td { background: var(--grey-light); }
table.planning tbody tr td:first-child { border-left: 5px solid var(--grey-light); }
table.planning tbody tr.tarif-cours td:first-child { border-left-color: var(--red); }
table.planning tbody tr.tarif-adhesion td:first-child { border-left-color: #8a6d3b; }
table.planning tbody tr.tarif-reduction td:first-child { border-left-color: var(--black); }
.prix-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 5px 13px;
  border-radius: 999px;
  white-space: nowrap;
}

footer.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
  font-size: 0.9rem;
}
footer.site-footer a { color: var(--white); }
footer.site-footer p { margin: 0; }
footer.site-footer .footer-credit { margin-top: 8px; font-size: 0.75rem; opacity: 0.5; }

.construction-badge {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  pointer-events: none;
}

@media (max-width: 600px) {
  .construction-badge {
    font-size: 0.65rem;
    padding: 5px 10px;
    top: 8px;
    left: 8px;
  }
}
