/* Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a23 0%, #222 100%);
  color: #fff;
  line-height: 1.6;
}

a {
  color: #0cf;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Hero avec overlay */
.hero {
  position: relative;
  background-image: url('assets/image-fond-site.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  padding: 5rem 1rem;
  background-attachment: scroll; /* compatible iPhone */
  text-align: center;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
}
.hero .logo {
  position: relative;
  width: 300px;
  margin-bottom: 1rem;
  z-index: 1;
}
.hero h1,
.hero .tagline,
.hero .btn {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.hero .tagline {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}
.hero .btn {
  display: inline-block;
  background: #0cf;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
}

/* Navigation */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(34,34,34,0.98);
  box-shadow: 0 2px 8px #0002;
  transition: background 0.3s;
}
.main-nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  list-style: none;
}
.main-nav li a {
  position: relative;
  transition: color 0.3s;
}
.main-nav li a::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #0cf;
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}
.main-nav li a:hover::after {
  width: 100%;
}

/* Burger classique sur desktop (caché) */
.burger {
  display: none;
}

/* Burger animé avec 3 lignes */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}
.burger span {
  display: block;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.open {
  background: transparent !important; /* fond transparent pour la croix */
  box-shadow: none;
}
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Masquer la navigation sur mobile et afficher burger */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0px;
    right: -270px;
    left: auto;
    width: 250px;
    height: auto;
    max-height: calc(100vh - 48px);
    background: rgba(30, 34, 44, 0.65);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
    backdrop-filter: blur(18px) saturate(160%);
    border-radius: 22px;
    transition: right 0.35s cubic-bezier(.77,0,.18,1), background 0.3s;
    z-index: 1000;
    padding: 40px 0 32px 0;
    display: block;
    overflow-y: auto;
  }
  .main-nav.open {
    right: 0px;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 1.5em;
    padding: 0 2em;
    align-items: stretch;
  }
  .main-nav li {
    margin: 0.2em 0;
    width: 100%;
  }
  .main-nav li a {
    display: block;
    padding: 1.1em 0.8em;
    font-size: 1.22em;
    color: #fff;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 2px 12px 0 rgba(12,200,255,0.06);
    margin-bottom: 0.2em;
    transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.03em;
    backdrop-filter: blur(2px);
  }
  .main-nav li a:hover,
  .main-nav li a:focus {
    background: rgba(12, 200, 255, 0.22);
    color: #181818;
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 4px 24px #0cf3;
    text-decoration: none;
  }
  @media (max-width: 768px) {
    .burger {
        display: flex
;
        position: fixed;
        top: 0px;
        right: 0px;
        z-index: 2002;
        background: #0cf !important;
        color: #fff !important;
        border: none;
        font-size: 2em;
        cursor: pointer;
        border-radius: 14px;
        width: 52px;
        height: 52px;
        align-items: center;
        justify-content: center;
        transition: box-shadow 0.2s, background 0.2s, color 0.2s;
        box-shadow: 0 4px 24px #0cf2;
        backdrop-filter: blur(2px);
    }
}
}

/* Sur desktop, cacher le burger */
@media (min-width: 769px) {
  .burger {
    display: none;
  }
  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    padding-top: 0;
    display: block;
  }
  .main-nav ul {
    flex-direction: row;
    gap: 2em;
  }
}

/* Sections */
.section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem 1rem;
  background: rgba(20,20,30,0.85);
  border-radius: 12px;
  box-shadow: 0 2px 16px #0002;
}
.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}
.equipe-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.activites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5em;
}
.card {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card img {
  width: 100%;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 24px #0cf4;
}

/* Contact */
.contact-list {
  list-style: none;
  max-width: 400px;
  margin: auto;
  padding: 0;
}
.contact-list li {
  margin-bottom: 0.75rem;
}

/* Call-to-action */
.cta {
  background: rgba(12, 255, 10, 0.06);
  text-align: center;
  padding: 2rem 1rem;
}
.cta .btn {
  margin-top: 1rem;
}

/* Footer */
.footer {
  background: #000;
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #222;
}
.footer a {
  color: #0cf;
}

/* Grille responsive pour les galeries photos et vidéos */
.gallerie-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: center;
}
.gallerie-item {
  flex: 1 1 300px;
  max-width: 320px;
  background: #181818;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0002;
  text-align: center;
  padding: 0.5em;
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallerie-item img,
.gallerie-item video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.gallerie-item figcaption {
  margin-top: 0.5em;
  font-size: 0.95em;
  color: #ccc;
}
.gallerie-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 24px #0cf4;
}

/* Grid responsive galerie */
@media (max-width: 900px) {
  .activites-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #galerie .gallerie-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .activites-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation scroll pour sections, cartes et galerie */
.section, .card, .gallerie-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s, transform 0.7s;
}
.section.visible, .card.visible, .gallerie-item.visible {
  opacity: 1;
  transform: none;
}

/* Retour en haut */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0cf;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px #0004;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 200;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Thème clair */
#theme-toggle {
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 300;
  background: #222;
  color: #0cf;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px #0004;
  transition: background 0.3s, color 0.3s;
}
#theme-toggle.light {
  background: #fff;
  color: #222;
}
body.light {
  background: linear-gradient(135deg, #e6f2fa 0%, #cfd8e6 100%);
  color: #181818;
}
body.light .section {
  background: #fff;
  color: #181818;
  box-shadow: 0 2px 16px #b0c4de80;
}
body.light .card,
body.light .gallerie-item {
  background: #f4f8fb;
  color: #181818;
  box-shadow: 0 2px 8px #b0c4de80;
}
body.light .main-nav {
  background: #f8fafc;
  color: #181818;
}
body.light .main-nav li a {
  color: #181818;
}
body.light .main-nav li a::after {
  background: #0cf;
}
body.light .footer {
  background: #e6f2fa;
  color: #181818;
}
body.light .btn, body.light button, body.light input[type="submit"] {
  background: linear-gradient(90deg, #0cf 30%, #0af 100%);
  color: #181818;
}
body.light .btn:hover, body.light button:hover, body.light input[type="submit"]:hover {
  background: linear-gradient(90deg, #0af 30%, #0cf 100%);
  color: #111;
}

/* Logo animé */
.animate-logo {
  transition: transform 0.5s ease;
}

/* Bouton hover */
.hover-animated {
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.hover-animated:hover {
  transform: scale(1.1);
  background-color: #0ff;
  color: #000;
}

/* Garder le titre et tagline en blanc même en mode clair */
body.light .hero h1,
body.light .hero .tagline {
  color: #fff;
}
