/* ============================================
   NAVBAR PREMIUM - CONFIGURATION DE BASE
   ============================================ */

.navbar-premium {
  background: linear-gradient(to right, #0a2463 0%, #1e40af 50%, #3b82f6 100%);
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(14, 102, 217, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.navbar-premium .container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   LOGO & BRAND
   ============================================ */

.navbar-brand {
  position: relative;
  z-index: 10;
}

.navbar-brand img {
  max-height: 45px;
  filter: brightness(1.1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
  filter: brightness(1.15) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
}

/* ============================================
   NAVIGATION LINKS - STYLE ÉPURÉ
   ============================================ */

.navbar-premium .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.9rem;
  margin: 0 0.1rem;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.2px;
}

.navbar-premium .nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #60a5fa;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-premium .nav-link:hover {
  color: #ffffff !important;
  background: rgba(96, 165, 250, 0.15);
}

.navbar-premium .nav-link:hover::after {
  width: 60%;
}

.navbar-premium .nav-link.active {
  color: #ffffff !important;
  background: rgba(96, 165, 250, 0.25);
  box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

/* ============================================
   DROPDOWN - MENU ÉLÉGANT ET STABLE
   ============================================ */

/* Zone tampon invisible pour faciliter la transition */
@media (min-width: 992px) {
  .navbar-premium .nav-item.dropdown {
    position: relative;
  }

  .navbar-premium .nav-item.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
    z-index: 999;
    pointer-events: auto;
  }

  /* Affichage du dropdown au survol */
  .navbar-premium .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* État initial du dropdown */
  .navbar-premium .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
  }

  /* Garder le dropdown ouvert lors du survol */
  .navbar-premium .dropdown-menu:hover {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.navbar-premium .dropdown-menu {
  background: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(14, 102, 217, 0.2);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 220px;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-premium .dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  border-radius: 10px 10px 0 0;
}

.navbar-premium .dropdown-item {
  color: #1e40af;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.6rem 1.2rem;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
  margin: 0.15rem 0.4rem;
  border-radius: 6px;
}

.navbar-premium .dropdown-item:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(96, 165, 250, 0.05));
  color: #1e40af;
  border-left-color: #3b82f6;
  padding-left: 1.5rem;
  transform: translateX(3px);
}

.navbar-premium .dropdown-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.1));
  color: #1e40af;
  border-left-color: #3b82f6;
  font-weight: 600;
}

/* ============================================
   BOUTON D'INSCRIPTION - EFFET SUBTIL
   ============================================ */

.btn-register {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.3rem;
  border-radius: 20px;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-register:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  color: #ffffff;
}

.btn-register:active {
  transform: translateY(0);
}

/* ============================================
   SÉLECTEUR DE LANGUE - DRAPEAUX
   ============================================ */

.language-dropdown .language-toggle {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 45px;
}

.language-dropdown .language-toggle:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.flag-icon {
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: block;
}

.language-dropdown .dropdown-menu {
  min-width: 160px;
}

.language-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ============================================
   TOGGLER MOBILE
   ============================================ */

.navbar-toggler {
  border: 1px solid rgba(96, 165, 250, 0.4);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.1);
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.6);
  transform: scale(1.05);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.25);
  outline: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 22px;
  height: 22px;
}

/* ============================================
   RESPONSIVE - VERSION MOBILE
   ============================================ */

@media (max-width: 991.98px) {
  .navbar-premium {
    padding: 0.5rem 0;
  }

  .navbar-premium .container-fluid {
    padding: 0 1rem;
  }

  .navbar-collapse {
    background: #ffffff;
    margin-top: 0.8rem;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(14, 102, 217, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.15);
  }

  .navbar-premium .nav-link {
    color: #1e40af !important;
    margin: 0.2rem 0;
    border-radius: 6px;
  }

  .navbar-premium .nav-link:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), rgba(96, 165, 250, 0.05));
    color: #1e40af !important;
  }

  .navbar-premium .nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.1));
    color: #1e40af !important;
  }

  .navbar-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-register {
    width: 100%;
    justify-content: center;
    margin-right: 0 !important;
  }

  .language-dropdown {
    width: 100%;
  }

  .language-dropdown .language-toggle {
    width: 100%;
    justify-content: center;
  }

  .navbar-premium .dropdown-menu {
    border: 1px solid rgba(59, 130, 246, 0.15);
    animation: dropdownFade 0.3s ease;
  }

  /* Désactiver le hover sur mobile */
  .navbar-premium .nav-item.dropdown::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand img {
    max-height: 38px;
  }

  .navbar-premium .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }

  .btn-register {
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
  }
}

/* ============================================
   ANIMATIONS SUBTILES
   ============================================ */

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  }
}

.btn-register:focus {
  animation: buttonPulse 2s ease-in-out infinite;
}

/* Animation subtile sur la navbar */
.navbar-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(96, 165, 250, 0.05), 
    transparent
  );
  background-size: 200% 100%;
  animation: navShimmer 6s infinite;
  pointer-events: none;
}

@keyframes navShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ============================================
   BANNIÈRE VIDÉO - RESPONSIVE
   ============================================ */

#bannerVideo {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  object-position: center;
}

.position-relative.overflow-hidden {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

/* Conteneur du texte sur la vidéo */
.position-relative .position-absolute {
  padding: 1.5rem;
  max-width: 90%;
}

.position-relative .position-absolute h1 {
  font-size: 2.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.position-relative .position-absolute p.lead {
  font-size: 1.1rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.position-relative .position-absolute .btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.position-relative .position-absolute .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ============================================
   SECTION POURQUOI PARTICIPER
   ============================================ */

.container.my-5 h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #1e40af;
}

.container.my-5 .col-md-3 img {
  max-height: 100px;
  width: auto;
  margin: 0 auto;
  display: block;
}

.container.my-5 .col-md-3 h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e40af;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.container.my-5 .col-md-3 p {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
}

/* ============================================
   SECTION STATS
   ============================================ */

.bg-light.py-5 .position-relative {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.bg-light.py-5 .position-relative:hover {
  transform: translateY(-5px);
}

.bg-light.py-5 .position-relative img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.bg-light.py-5 .position-absolute {
  background: rgba(0, 0, 0, 0.7) !important;
  padding: 1rem !important;
}

.bg-light.py-5 h3 {
  font-size: 2rem;
  font-weight: bold;
}

.bg-light.py-5 p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================
   RESPONSIVE TABLETTES (max-width: 991px)
   ============================================ */

@media (max-width: 991px) {
  #bannerVideo {
    height: 60vh;
  }

  .position-relative .position-absolute h1 {
    font-size: 2rem;
  }

  .position-relative .position-absolute p.lead {
    font-size: 1rem;
  }

  .position-relative .position-absolute .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  .container.my-5 h2 {
    font-size: 1.75rem;
  }

  .bg-light.py-5 .position-relative img {
    height: 220px;
  }
}

/* ============================================
   RESPONSIVE MOBILE (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
  #bannerVideo {
    height: 50vh;
    min-height: 350px;
  }

  .position-relative.overflow-hidden {
    min-height: 350px;
  }

  .position-relative .position-absolute {
    padding: 1rem;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .position-relative .position-absolute h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .position-relative .position-absolute p.lead {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .position-relative .position-absolute .btn {
    padding: 0.6rem 1.3rem;
    font-size: 0.85rem;
  }

  /* Section Pourquoi Participer */
  .container.my-5 {
    padding: 0 1rem;
  }

  .container.my-5 h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem !important;
  }

  .container.my-5 .col-md-3 {
    margin-bottom: 2rem;
  }

  .container.my-5 .col-md-3 img {
    max-height: 80px;
  }

  .container.my-5 .col-md-3 h5 {
    font-size: 1rem;
  }

  .container.my-5 .col-md-3 p {
    font-size: 0.9rem;
  }

  /* Section Stats */
  .bg-light.py-5 .col-md-4 {
    margin-bottom: 1.5rem;
  }

  .bg-light.py-5 .position-relative img {
    height: 200px;
  }

  .bg-light.py-5 h3 {
    font-size: 1.75rem;
  }

  .bg-light.py-5 p {
    font-size: 0.85rem;
  }
}

/* ============================================
   RESPONSIVE PETIT MOBILE (max-width: 576px)
   ============================================ */

@media (max-width: 576px) {
  #bannerVideo {
    height: 45vh;
    min-height: 300px;
  }

  .position-relative.overflow-hidden {
    min-height: 300px;
  }

  .position-relative .position-absolute {
    padding: 0.75rem;
    width: 95% !important;
  }

  .position-relative .position-absolute h1 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .position-relative .position-absolute p.lead {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }

  .position-relative .position-absolute .btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
    width: 100%;
    max-width: 250px;
  }

  /* Section Pourquoi Participer */
  .container.my-5 h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem !important;
  }

  .container.my-5 .col-md-3 img {
    max-height: 70px;
  }

  .container.my-5 .col-md-3 h5 {
    font-size: 0.95rem;
  }

  .container.my-5 .col-md-3 p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* Section Stats */
  .bg-light.py-5 .position-relative img {
    height: 180px;
  }

  .bg-light.py-5 .position-absolute {
    padding: 0.75rem !important;
  }

  .bg-light.py-5 h3 {
    font-size: 1.5rem;
  }

  .bg-light.py-5 p {
    font-size: 0.8rem;
  }
}

/* ============================================
   RESPONSIVE TRÈS PETIT MOBILE (max-width: 400px)
   ============================================ */

@media (max-width: 400px) {
  #bannerVideo {
    height: 40vh;
    min-height: 280px;
  }

  .position-relative.overflow-hidden {
    min-height: 280px;
  }

  .position-relative .position-absolute h1 {
    font-size: 1.1rem;
  }

  .position-relative .position-absolute p.lead {
    font-size: 0.75rem;
  }

  .position-relative .position-absolute .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .container.my-5 h2 {
    font-size: 1.2rem;
  }

  .bg-light.py-5 .position-relative img {
    height: 160px;
  }
}

/* ============================================
   OPTIMISATIONS GÉNÉRALES
   ============================================ */

/* Empêcher le débordement horizontal */
/*body {
  overflow-x: hidden;
}*/

/* Améliorer la lisibilité du texte sur mobile */
/*@media (max-width: 768px) {
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}*/

/* Éviter que le texte soit trop collé sur les bords en mobile */
/*@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}*/