/* =========================
   VARIABLES GLOBALES
   ========================= */
:root {
  --primary: #0f2a44;
  --accent: #e83e8c;
  --light: #f7f9fc;
}

/* =========================
   RESET & BASE
   ========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

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

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* =========================
   HEADER & NAVIGATION
   ========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo-area a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: bold;
}

.logo-area img {
  height: 50px;
}

.menu-toggle {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.main-nav > a {
  color: var(--primary);
}

.main-nav > a:hover,
.main-nav > a.active {
  color: var(--accent);
}

/* ===== SOUS-MENU ===== */

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.submenu-toggle {
  all: unset;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.submenu-toggle:hover {
  color: var(--accent);
}

.arrow {
  font-size: 12px;
  transition: transform .25s ease;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  background: #fff;
  min-width: 220px;
  padding: 10px 0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 999;
}

.nav-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 14px;
}

.nav-item:hover .submenu {
  opacity: 1;
  pointer-events: auto;
}

.submenu a {
  display: block;
  padding: 12px 22px;
  text-align: center;
  color: #222;
  font-weight: 500;
}

.submenu a:hover {
  background: rgba(232,62,140,.08);
  color: var(--accent);
}

/* =========================
   HERO SLIDER
   ========================= */

.hero-slider {
  position: relative;
  height: 420px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateX(100%);
  transition: transform .9s ease, opacity .9s ease;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.slide.prev {
  transform: translateX(-100%);
  opacity: 0;
}

.hero-overlay {
  background: rgba(0,0,0,.55);
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 6px 14px;
  border-radius: 6px;
}

.slider-arrow.left { left: 15px; }
.slider-arrow.right { right: 15px; }

/* =========================
   SECTIONS
   ========================= */

.soft-section {
  background: #f3f4f8;
  padding: 60px 0;
}

.soft-section h1,
.soft-section h2 {
  color: var(--accent);
}

.light-section {
  background: var(--light);
  padding: 40px 0;
}

/* =========================
   GRILLES
   ========================= */

.trainings,
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.training-layout,
.event-layout {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 30px;
  align-items: center;
}

.training-photo img,
.event-photo img {
  width: 100%;
  border-radius: 16px;
}

/* =========================
   FORMULAIRE
   ========================= */

.contact-box,
.results-box {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.contact-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.honeypot { display: none; }

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
  .training-layout,
  .event-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
  }
  .main-nav.open {
    display: flex;
  }
}

@media (max-width: 600px) {
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Calendrier
   ========================= */

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

.calendar-table th,
.calendar-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.calendar-table th {
  background: #f3f4f8;
  color: var(--primary);
}

.calendar-table tr.past {
  text-decoration: line-through;
  color: #999;
}

.calendar-table tr.next {
  background: rgba(232, 62, 140, 0.12);
  font-weight: bold;
}

.calendar-table a {
  color: var(--accent);
  font-weight: 600;
}

.calendar-table a:hover {
  text-decoration: underline;
}
.calendar {
  width: 100%;
  border-collapse: collapse;
}

.calendar th {
  background: #f3f4f8;
  text-align: left;
}

/* Courses passées */
.calendar tr.past {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Prochaine course */
.calendar tr.next {
  background: rgba(232, 62, 140, 0.12);
  font-weight: bold;
}
/* =========================
   GALERIE PHOTO ACCUEIL
   ========================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}
/* =========================
   GALERIE SLIDER ACCUEIL
   ========================= */

.gallery-wrapper {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
}

.gallery-slider {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.gallery-slide.active {
  opacity: 1;
  z-index: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* images jamais coupées */
  background: #000;
}

/* ===== FLÈCHES ===== */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;           /* 🔥 FIX IMPORTANT */
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 32px;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 50%;
}

.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }

.gallery-arrow:hover {
  background: rgba(0,0,0,0.8);
}

/* ===== DOTS ===== */
.gallery-dots {
  text-align: center;
  margin-top: 12px;
}

.gallery-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.gallery-dots .dot.active {
  background: var(--accent);
}
