/* ===================== FONTS ===================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Rozha+One&display=swap');
@import url('https://fonts.cdnfonts.com/css/laviossa');

@font-face {
  font-family: "Affigiere";
  src: url("../fonts/Affigere-Regular.otf") format('opentype');
}
@font-face {
  font-family: "Nyght-bold";
  src: url("../fonts/NyghtSerif-Bold.otf") format('opentype');
}

/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================== BODY ===================== */
body {
  font-family: 'Rozha One', serif;
  background-color: #212121;
  color: #ffffff;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}
body.album-page {
  background-color: #ffffff;
  color: #000000;
}
body:not(.homepage) {
  padding-top: 96px;
}
@media (max-width: 900px) {
  body:not(.homepage) {
    padding-top: 48px;
  }
}
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ===================== NAVBAR ===================== */
.navbar-topbar {
  width: 100vw;
  height: 10px;
  background: #191919;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100; 
}
nav {
  background-color: #191919;
  padding: 5px ;
  width: 100%;
  margin-top: 10px #191919 ;
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  margin-right: 20px;
}
nav ul li {
  margin-left: 20px;
}
nav ul li a {
  position: relative;
  text-decoration: none;
  color: white;
  font-size: clamp(1rem, 2vw, 1.5rem);
  padding: 10px 36px;
  display: inline-block;
  line-height: normal;
  transition: transform 0.2s ease-in-out;
}
nav ul li a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 100%;
  background-color: #fff;
  transform: scaleX(0);
  transition: transform 0.2s ease-in-out;
  transform-origin: bottom center;
}
nav ul li a:hover::before {
  transform: scaleX(1);
  transform-origin: bottom center;
}
nav ul li a.active::before {
  transform: scaleX(1);
  transform-origin: bottom left;
}
nav ul li a:hover {
  transform: translateY(-5px);
}

/* Navbar responsive (desktop) */
@media (min-width: 901px) {
  nav {
    justify-content: flex-start;
  }
  nav ul {
    justify-content: center; /* MODIF: était flex-end */
    margin-left: auto;
    margin-right: 40px;
    width: 100%;
  }
  .nav-logo {
    height: 6vh;
    width: auto;
    margin-left: 20px;
    margin-right: 0;
    display: block;

  }

  
  .mobile-nav-overlay {
    display: none !important;
  }
  .hamburger {
    display: none !important;
  }
  nav {
    transform: none !important;
    height: auto;
    max-width: none;
    box-shadow: none;
    padding-top: 0;
  }
  
}

/* Navbar responsive (mobile) */
@media (max-width: 900px) {
  nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 85vw;
    max-width: 320px;
    height: 100vh;
    background: #191919;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.77,0,.18,1);
    z-index: 2002;
    box-shadow: -2px 0 16px #000a;
    padding-top: 60px;
    justify-content: center;
    font-size: 1.2rem;
    padding: 16px 20px;
  }
  nav.open {
    transform: translateX(0);
  }
  

  nav ul {
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: flex-start;
    justify-content: center;
  }
  nav ul li {
    margin: 0;
    width: 100%;
  }
  nav ul li a {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.3rem;
    border-bottom: 1px solid #222;
    color: #fff;
    display: block;
    text-align: left;
    transition: none !important;
    letter-spacing: normal !important;
    position: relative;
    padding-left: 24px;
    padding-right: 24px;
    transition: transform 0.2s ease-in-out;
  }
  nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    transform: scaleY(0);
    transition: 0 !important;
    z-index: 2;
  }
  nav ul li a.active::before,
  nav ul li a:hover::before {
    transform: scaleY(1);
  }
  
  .nav-logo {
    display: none !important;
    z-index: 3001 !important;
    height: 5vh; 
  
     }
.nav-logo-mobile {
    display: flex !important;
    z-index: 3001 !important;
    height: 5vh; 
  
     }
  .mobile-nav-overlay.active {
    display: block;
    opacity: 1;
  }
  nav {
    justify-content: center;
  }
  nav ul {
    justify-content: center;
    width: 100%;
  }
  nav ul li a:hover {
  transform: translateX(-5px);
}
}

/* Hamburger button styles */
.hamburger {  display: flex;  
  position: fixed;  
  top: 18px;  right: 18px; 
   z-index: 3000; 
    width: 44px;  
    height: 44px;  
    background: none; 
     border: none;  
     flex-direction: column; 
      justify-content: center; 
       align-items: center;  
       gap: 7px;  
       cursor: pointer;  
       padding: 0;}
.hamburger span {
  display: block;
  width: 30px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  transition:
    transform 0.3s cubic-bezier(.77,0,.18,1),
    opacity 0.3s cubic-bezier(.77,0,.18,1);
  position: relative;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* Overlay for menu */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  transition: opacity 0.3s;
  opacity: 0;
}



/* Mobile topbar */
.mobile-topbar {
  display: none;
}
@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 56px;
    background: #191919;
    z-index: 2000;
    box-shadow: 0 2px 8px #0004;
    justify-content: center;
    align-items: center;
  }
  .hamburger {
    top: 8px;
    right: 18px;
  }
  
  
}

/* ===================== SLIDER ===================== */
.slider,
.slider-background {
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
}
.slider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}
.slider-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(0.4) blur(3px); /* MODIF: était 0.55 */
  transform: scale(1.1);
  z-index: 0;
  pointer-events: none;
}
@media (max-width: 600px) {
  .slider-background {
    height: 100% !important;
    min-height: 0;
    background-position: center top;
    transform: scale(1.1);
  }
  .slider {
    height: 85% !important;
    min-height: 0;
    position: relative;
    overflow: hidden;
  }
  .slider + .slider-blue-band {
    display: block;
    height: 25vh;
    min-height: 0;
    width: 100%;
    background: #212121;
  }
}
.slider-content {
  position: relative;
  z-index: 2;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: 100vh;
  padding-bottom: 0;
  margin-bottom: 0;
  color: #fff;
  text-align: center;
}
.slider-content h1,
.main-title {
  font-family: "fantome", 'Cinzel Decorative', serif !important;
  font-stretch: expanded;
  font-size: clamp(2rem, 6vw, 4rem) !important;
  padding: 0 4vw;
  text-align: center;
  word-break: break-word;
  margin-bottom: 0.7rem;
  text-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff, 0 0 15px #ffffff;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 2;
  letter-spacing: 0.04em;
  margin: 0 auto 0.7rem auto;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.slider-content p {
  font-size: clamp(1rem, 3vw, 1.5rem) !important;
  padding: 0 4vw;
  text-align: center;
  word-break: break-word;
  text-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff, 0 0 15px #ffffff;
  font-family: 'Rozha One';
  line-height: 1.5em;
  color: #ffffff;
}
@media (min-width: 901px) {
  .slider-content h1,
  .main-title {
    font-size: clamp(3rem, 7vw, 6rem) !important;
    padding: 0 4vw;
  }
  .slider-content p {
    font-size: clamp(1.5rem, 3vw, 2.5rem) !important;
    padding: 0 4vw;
  }
}
@media (max-width: 900px) {
  .slider {
    height: 60vh;
  }
  .slider-content h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    padding: 0 10px;
  }
  .slider-content p {
    font-size: 1rem;
  }
  .main-title {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    padding: 0 4vw;
  }
}
@media (max-width: 900px) {
  .slider {
    height: 50vh; /* Au lieu de 60vh */
    min-height: 240px;
  }
  .slider-content h1 {
    font-size: clamp(1.2rem, 6vw, 2rem) !important;
    padding: 0 15px;
    line-height: 1.2;
  }
  .slider-content p {
    font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    padding: 0 15px;
  }
}

/* ===================== SECTIONS & BOXES ===================== */
.section {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 0;
  padding-top: 10vh;
  position: relative;
  z-index: 2;
}
@media (min-width: 601px) {
  .section {
    padding: 100px 0 0 0;
    padding-top: 10vh;
  }
}
@media (max-width: 900px) {
  .section {
    max-height: 90%;
  }
}
.boxed {
  max-width: 1280px;
  margin: auto auto 20px;
  padding: 0 20px;
  position: relative;
}
.text-center {
  text-align: center;
}

/* Faire une boîte à images (on doit pouvoir slider les images ) */
/* .slider-box{

} */

/* ===================== FOOTER ===================== */
.bas-page {
  min-height: 10vh;
  position: relative;
  z-index: 999 !important;
  text-align: center;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: #fff;
  padding: 20px 10px;
  box-sizing: border-box;
  background: transparent;
}

.bas-page p {
  text-align: center;
  margin: 0;
}

.footer-copyright {
  display: block;
  margin-top: 8px;
  text-align: center;
}

@media (max-width: 600px) {
  .bas-page p {
    font-size: 0.95em;
    line-height: 1.6;
     max-width: 50%;
     margin-left: 25%;
     margin-right: 25%;
     text-align: center;
  }
  .footer-copyright {
    margin-top: 14px;
    font-size: 1em;
    text-align: center;
   
  }
}
.dark {
  background: #212121 !important;
  color: #fff !important;
}
.light {
  background: #ffffff !important;
  color: #000 !important;
}

/* ===================== CAROUSEL ===================== */
.carousel-container {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 12px 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  z-index: 2; /* above background so no background bleed shows through */
  /* height managed per-section below to ensure image fits entirely */
}

/* When section marked has-carousel, make the carousel take available space under title */
.section.has-carousel .carousel-container {
  /* available height = viewport minus header/title area.
     Ajuste les valeurs (260px / 200px / 160px) si nécessaire suivant ton layout */
  height: calc(100vh - 260px);
  max-height: calc(100vh - 120px);
  min-height: 240px;
}

/* responsive reductions */
@media (max-width: 900px) {
  .section.has-carousel .carousel-container {
    height: calc(100vh - 200px);
    min-height: 200px;
  }
}
@media (max-width: 600px) {
  .section.has-carousel .carousel-container {
    height: calc(100vh - 160px);
    min-height: 160px;
  }
}

/* viewport du carousel : limite la vue à une seule image */
.carousel {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* inner reste scrollable, avec scroll-snap pour snapper par image */
.carousel-inner {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  align-items: center; /* vertical centering of items */
  height: 100%;
  padding-bottom: 0; /* éviter espace en bas qui peut provoquer artefacts d'ombre */
}

/* chaque item prend 100% du viewport du carousel (une image visible) */
.carousel-item {
  scroll-snap-align: center;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden; /* garde arrondis, mais image doit être contenue */
  box-shadow: 0 6px 18px rgba(0,0,0,0.12); /* plus léger par défaut */
  background: transparent;
}

/* ensure <picture> / source images follow the same containment rules */
.carousel-item picture,
.carousel-item picture img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto;
  box-shadow: none !important;
  background: transparent !important;
}

/* For white sections remove/soften dark shadow that looks like a band under image */
.section.light .carousel-item {
  box-shadow: none;
}

/* Assurer que l'image tient entièrement dans le container quel que soit l'appareil */
.carousel-item img {
  display: block;
  width: auto;             /* keep aspect ratio */
  height: auto;
  max-width: 100%;         /* never overflow horizontally */
  max-height: 100%;        /* never overflow vertically */
  object-fit: contain;     /* ensure whole image visible (no crop) */
  object-position: center; /* center image in both axes */
  border-radius: 12px;
  margin: 0 auto;
  -webkit-user-drag: none;
  user-select: none;
  box-shadow: none;        /* image itself should not create extra shadow */
}

/* Flèches positionnées en absolu sur les côtés du carousel */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 40;
  transition: background 0.15s;
}
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }
.carousel-arrow:hover { background: rgba(0,0,0,0.85); }

/* Dots (sous la vue) - inchangés */
.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  padding: 6px 0;
  width: 100%;
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.carousel-dots button.active {
  background: #b3ecf0;
  box-shadow: 0 0 6px #b3ecf0;
}

/* Contraste des dots et flèches pour les sections claires (section Activités) */
.section.light .carousel-dots button {
  background: rgba(0,0,0,0.12); /* points inactifs plus visibles sur fond blanc */
}
.section.light .carousel-dots button.active {
  background: #191919; /* point actif foncé pour contraste */
  box-shadow: 0 0 6px rgba(25,25,25,0.35);
  transform: scale(1.05);
}

/* (optionnel) ajuster les flèches pour sections claires */
.section.light .carousel-arrow {
  background: rgba(255,255,255,0.95);
  color: #191919;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Desktop: flèches visibles; mobile: flèches masquées */
@media (min-width: 901px) {
  /* .carousel-item {  hauteur/largeur desktop si besoin  } */
  .carousel-arrow { display: flex; }
}
@media (max-width: 900px) {
  .carousel-arrow { display: none; }
  .carousel-item { width: 100%; }
  .carousel-dots { margin-top: 6px; }
}

/* ensure carousel doesn't overflow page layout */
.carousel-container { padding-left: calc(50vw - 55% + 12px); padding-right: calc(50vw - 55% + 12px); box-sizing: border-box; }
@media (max-width: 900px) {
  .carousel-container { padding-left: calc(50vw - 80% + 12px); padding-right: calc(50vw - 80% + 12px); box-sizing: border-box; }
}
/* ===================== ALBUM ===================== */
.album {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.album-column {
  flex: 1 1 30%;
  min-width: 250px;
  margin: 0 10px;
}
.album-column img {
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 5px;
  object-fit: contain;
  display: block;
}
@media (max-width: 900px) {
  .album-column {
    min-width: 180px;
  }
}
@media (max-width: 600px) {
  .album {
    flex-direction: column;
  }
  .album-column {
    min-width: 100%;
    margin: 0 0 20px 0;
  }
}
.multi-select-checkbox {
  accent-color: #b3ecf0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #fff;
  background: #fff;
  cursor: pointer;
  display: none;
  z-index: 1001;
}
#multi-download-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #191919;
  color: #fff;
  border-radius: 8px;
  padding: 12px 24px;
  z-index: 5000 !important; /* Mets une valeur supérieure à celle du footer et des sponsors */
  box-shadow: 0 2px 8px #000a;
  display: none; /* ou block selon ton besoin */
  align-items: center;
  gap: 18px;
  width: 90%;
  
}

  #download-selected {
     background:#fff; 
     color:#191919; 
     border:none; 
     border-radius:5px; 
     padding:8px 16px; 
     cursor:pointer;
  }

@media (max-width: 600px) {
  #multi-download-bar {
    width: 90%;
    min-width: 0;
    padding: 10px 4px;
    font-size: 0.95rem;
    bottom: 12px;
    gap: 10px;
    align-items: stretch;
  }
  #download-selected {
     width: 100%; 
     background:#fff; 
     color:#191919; 
     border:none; 
     border-radius:5px; 
     padding:8px 16px; 
     cursor:pointer;
  }
}


#toggle-select-mode {
    margin: 24px 0 32px 0;
    padding: 10px 22px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    border-radius: 6px;
    border: none;
    background: #191919;
    color: #fff;
    cursor: pointer;
    display: block;
    width: fit-content;
}



/* ===================== ALBUM OVERLAY & DOWNLOAD ===================== */
.album-img-wrapper {
  position: relative;
  display: block;
}
.album-img-overlay {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  font-size: 1.2rem;
  font-family: inherit;
  transition: opacity 0.3s, filter 0.3s, scale 0.3s;
  z-index: 2;
  pointer-events: none;
  text-align: left;
  padding: 18px 22px;
  border-radius: 5px;
}
.album-img-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: bold;
  margin-bottom: 0.5em;
  transform: translateX(60px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.77,0,.18,1), opacity 0.4s;
}
.album-img-desc {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: normal;
  transform: translateX(60px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.77,0,.18,1) 0.08s, opacity 0.5s 0.08s;
}
.album-img-wrapper:hover .album-img-title,
.album-img-wrapper:hover .album-img-desc {
  transform: translateX(0);
  opacity: 1;
}
.album-img-wrapper img {
  display: block;
  width: 100%;
  transition: filter 0.3s, scale 0.3s;
  position: relative;
  z-index: 1;
  border-radius: 5px;
}
.album-img-wrapper:hover img {
  filter: brightness(0.6);
  scale: 1.05;
}
.album-img-wrapper:hover .album-img-overlay {
  opacity: 1;
  scale: 1.05;
}
.album-img-wrapper.show-overlay .album-img-overlay,
.album-img-wrapper:active .album-img-overlay {
  opacity: 1 !important;
  pointer-events: auto;
}
.album-img-wrapper.show-overlay img,
.album-img-wrapper:active img {
  filter: brightness(0.6);
}
.album-overlay-close {
  display: none;
}
@media (pointer: coarse), (max-width: 800px) {
  .album-img-wrapper.show-overlay .album-overlay-close {
    display: block !important;
  }
}
.album-download-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 1.2rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  transition: background 0.2s;
}
.album-download-btn:hover {
  background: rgba(0,0,0,0.8);
  color: #b3ecf0;
}

/* ===================== HINTS ===================== */
.hint-fade {
  position: absolute;
  bottom: 0.5rem;
  font-size: 1rem;
  color: #fff;
  opacity: 1;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 0.03em;
  margin-bottom: 4rem;
  text-align: center;
  width: 100%;
}
@media (min-width: 901px) {
  .hint-fade {
    font-size: 2rem;
    width: 100%;
  }
}

/* ===================== ANIMATIONS ===================== */
.hiddenright, .hiddenleft, .hiddentop, .hiddenbottom {
  opacity: 0;
  transition: all 1.5s;
  filter: blur(5px);
}
.hiddenright { transform: translateX(+50%); }
.hiddenleft { transform: translateX(-50%); }
.hiddentop { transform: translateY(-50%); }
.hiddenbottom { transform: translateY(+50%); }
.show {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0);
}

/* ===================== CALENDRIER ===================== */
.calendrier-embed {
  width: 100%;
  height: 800px;
  border: none;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 20px #000a;
  position: center;
}
.agenda-responsive {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}
.agenda-responsive iframe {
  width: 100%;
  min-width: 0;
  height: 700px;
  display: block;
}
@media (max-width: 900px) {
  .agenda-responsive iframe {
    height: 70vw;
    min-height: 400px;
    max-height: 80vh;
    max-width: 600px;
  }
}

/* ===================== CONTACT ===================== */
.contact-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  flex-wrap: wrap;
  box-sizing: border-box;
}
.contact-links a {
  color: #fff;
  font-size: clamp(1rem, 2vw, 1.4rem);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}
.contact-links a:hover {
  color: #b3ecf0;
}
.contact-links i {
  font-size: clamp(1.2rem, 3vw, 2rem);
}
@media (max-width: 900px) {
  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 0 10px;
  }
  .contact-links a {
    justify-content: center;
    font-size: 1.2rem;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
}

/* ===================== LOGO ===================== */
.logo-complet {
  width: 50%;
  height: 50%;
  margin-top: 20vh;
  display: block;
}
@media (max-width: 900px) {
  .logo-complet {
    width: 100%;
    margin-bottom: 5vh;
    display: block;
  }
}

/* ===================== SPONSORS ===================== */
.section-sponsors {
  display: flex;
  flex-wrap: wrap;            /* wrap to next row when overflow */
  justify-content: center;    /* center logos horizontally */
  align-items: center;        /* center logos vertically within each row */
  align-content: center;      /* center the whole content block when multiple rows exist */
  gap: 24px;                  /* space between logos */
  box-sizing: border-box;
  z-index: 1000;
  padding: 32px 16px;
  position: relative;
  color: #fff;
  min-height: auto;           /* allow height to grow when new rows are added */
}
.section-sponsors > a {
  flex: 0 1 220px;            /* try to keep logos ~220px wide, shrink if needed */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
}
.logo-sponsors {
  max-height: 80px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0;
  z-index: 2000 !important;
}

@media (max-width: 600px) {
  .section-sponsors {
    gap: 8px;
    padding: 16px 8px;
  }
  .section-sponsors > a {
    flex: 0 1 140px;
  }
  .logo-sponsors {
    max-height: 56px;
    max-width: 140px;
  }
}

/* =========================
   SPONSORS: responsive sponsor-box + separator bar
   ========================= */
.sponsooor-box {
  display: flex !important;      /* force display */
  flex-direction: row;
  gap: 50px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 3.5rem 2rem;
  box-sizing: border-box;
  padding-left: 10rem;
  visibility: visible !important; /* force la visibilité */
  opacity: 1 !important;          /* force l'opacité */

  overflow: visible !important;   /* assure qu'elle ne soit pas recoupée */
}

.sponsooor-text {
  flex: 1 1 auto;
  margin: 0;
  padding-left: 0.75rem;
  color: inherit;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  opacity: 1 !important;
  visibility: visible !important;
}

.logo-sponsors-page,
.sponsor-box img {
  max-height: 160px;
  max-width: 440px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 1 !important;
  visibility: visible !important;
}

/* comportement responsive: sur mobile on empile */
@media (max-width: 900px) {
  .sponsooor-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 12px;
    padding-left: 1rem;  /* remove left padding on mobile */
  }
  .logo-sponsors-page,
  .sponsooor-box img { max-height: 64px; max-width: 160px; }
}

@media (max-width: 480px) {
  .sponsooor-box { padding: 12px 10px; gap: 10px; }
  .logo-sponsors-page, .sponsor-box img { max-height: 56px; max-width: 140px; }
  .sponsooor-text { font-size: 0.95rem; }
}

/* Separator */
.sponsor-separator {
  width: 60%;
  max-width: 960px;
  height: 1px;
  margin: 50px auto;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 3px rgba(0,0,0,0.12) inset;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 900px) {
  .sponsor-separator { height: 3px; margin: 18px auto; width: 75%; }
}

@media (max-width: 480px) {
  .sponsor-separator { width: 85%; height: 1px; margin: 12px auto; }
}

/* ===================== UTILS ===================== */
.text-center { text-align: center; }
.black { background: #000; color: #FFF; }
.black-text { color: #000; }
.light { background: #fff !important; color: #000 !important; }
.main-title, .toptitle h2 { margin-top: 20px; }
h2 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-family: 'Cinzel Decorative', serif;
  text-align: center;
}
.h3 {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-family: 'Cinzel Decorative', serif;
  text-align: left;
  margin-top: 5rem;
}
.toptitle { margin-bottom: 50px; }
@media (max-width: 900px) {
  .toptitle { margin-bottom: 20px; }
}
.content-text {
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-align: center;
}
@media (max-width: 900px) {
  .content-text {
    font-size: 1rem;
    padding: 0 10px;
  }
}

/* Sections contenant un carousel : faire en sorte que le carousel remplisse l'espace restant sous le titre */
.section.has-carousel {
  display: flex;
  flex-direction: column;
  padding-top: 10vh; /* conserve l'espacement existant */
  min-height: 100vh;
}
.section.has-carousel .boxed {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section.has-carousel .toptitle,
.section.has-carousel .content-text {
  flex: 0 0 auto;
}
.section.has-carousel .carousel-container {
  flex: 1 1 auto;    /* prend tout l'espace restant */
  height: auto;      /* laisse le flex gérer la hauteur */
  margin-bottom: 12px; /* mini marge en bas */
  align-self: stretch;
}

/* Fallback / alternative : utilise :has() si le navigateur le supporte */
.section:has(.carousel-container) {
  display: flex;
  flex-direction: column;
}
.section:has(.carousel-container) .boxed {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section:has(.carousel-container) .carousel-container {
  flex: 1 1 auto;
  height: auto;
  margin-bottom: 12px;
  align-self: stretch;
}

/* === Carousel improvements: unify mobile heights, allow reliable fast swipe === */
:root {
  --carousel-presentation-mobile-vh: 48vh; /* ajuste si besoin */
  --carousel-presentation-mobile-min: 200px;
}

/* Ensure both carousels use the same mobile height (presentation is the reference) */
@media (max-width: 900px) {
  .carousel-container[data-carousel="presentation"],
  .carousel-container[data-carousel="activites"] {
    height: var(--carousel-presentation-mobile-vh);
    max-height: var(--carousel-presentation-mobile-vh);
    min-height: var(--carousel-presentation-mobile-min);
  }
}

/* Force the activity carousel to use the exact same viewport height and item sizing as presentation on small screens */
@media (max-width: 900px) {
  /* ensure both containers have identical height */
  .carousel-container[data-carousel="presentation"],
  .carousel-container[data-carousel="activites"] {
    height: var(--carousel-presentation-mobile-vh);
    max-height: var(--carousel-presentation-mobile-vh);
    min-height: var(--carousel-presentation-mobile-min);
  }

  /* make inner stretch so items fill the full carousel height */
  .carousel-container[data-carousel="activites"] .carousel {
    height: 100%;
  }
  .carousel-container[data-carousel="activites"] .carousel-inner {
    align-items: stretch; /* stretch items to full height so images can use max-height:100% */
    padding-bottom: 0;
  }
  .carousel-container[data-carousel="activites"] .carousel-item {
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* images/picture must fill available height (but keep aspect ratio) */
  .carousel-container[data-carousel="activites"] .carousel-item img,
  .carousel-container[data-carousel="activites"] .carousel-item picture,
  .carousel-container[data-carousel="activites"] .carousel-item picture img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: 0 auto;
  }
}

/* safety: on very small screens keep same behaviour */
@media (max-width: 600px) {
  .carousel-container[data-carousel="presentation"],
  .carousel-container[data-carousel="activites"] {
    height: var(--carousel-presentation-mobile-vh);
    max-height: var(--carousel-presentation-mobile-vh);
  }
}

/* touch-action to make horizontal swipes immediate and avoid browser gesture delays */
.carousel-inner {
  touch-action: pan-y; /* allow horizontal gestures handled by the element */
}

/* Make sure images fit exactly inside container and remove shadow artefacts */
.carousel-item,
.carousel-item img {
  box-shadow: none !important;
  background: transparent !important;
}

/* Slight padding in viewport to avoid 1px bands on some browsers */
.carousel {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}