/* =========================================
   1. IMPORTATION DES POLICES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================================
   2. VARIABLES CSS (DESIGN SYSTEM)
   ========================================= */
:root {
  /* Couleurs de base */
  --background: hsl(220, 18%, 6%);
  --foreground: hsl(0, 0%, 96%);
  --card: hsl(222, 16%, 9%);
  --card-foreground: hsl(0, 0%, 96%);
  
  /* Accents */
  --primary: hsl(260, 78%, 66%);
  --muted: hsl(220, 14%, 20%);
  --muted-foreground: hsl(0, 0%, 75%);
  --border: hsl(220, 14%, 16%);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(260, 78%, 66%), hsl(240, 80%, 58%));
  
  /* Effets de Verre (Glassmorphism) */
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 40px hsl(260, 78%, 66%, 0.3);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.6);
  
  /* Divers */
  --radius: 0.75rem;
}

/* =========================================
   3. RESET & BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #070708 0%, #0d0d0e 100%);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typographie Titres */
h1, h2, h3, h4, .logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Background flou global */
.background-blur {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("arriereplan.jpeg"); /* Vérifie bien ce nom de fichier */
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.05);
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--background);
  opacity: 0.9;
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(15, 15, 16, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
}

.logo-box {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
}

/* Navigation Links */
nav {
  display: none; /* Caché sur mobile par défaut */
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}

nav a:hover {
  color: var(--foreground);
}

/* Hamburger (Mobile) */
.hamburger {
  display: block;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   5. DROPDOWN "NOUS SUIVRE" (CORRIGÉ & ANIMÉ)
   ========================================= */
.dropdown {
  position: relative;
  display: flex; /* Flexbox assure l'alignement vertical */
  align-items: center;
  height: 100%;
}

/* Animation des couleurs du bouton */
@keyframes socialCarousel {
  0%, 45% {
      background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
      box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
  }
  50%, 95% {
      background: linear-gradient(90deg, #000000, #202020); 
      box-shadow: -3px 0 0 #25F4EE, 3px 0 0 #FE2C55, 0 4px 15px rgba(0,0,0,0.5); 
  }
  100% {
      background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
      box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
  }
}

.btn-social-dropdown {
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  
  /* Lancement de l'animation */
  animation: socialCarousel 8s infinite alternate;
  background-size: 200% 200%;
  
  margin: 0;
  line-height: 1.2;
}

.btn-social-dropdown:hover {
  transform: scale(1.05);
}

/* Le contenu du menu */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; /* Collé juste sous le header */
  right: 0;
  min-width: 180px;
  background: rgba(20, 15, 25, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 0.5rem 0;
  
  margin-top: 15px; /* Espace visuel */
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
  overflow: hidden;
}

/* LE PONT INVISIBLE (Correction pour que le menu ne disparaisse pas) */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -30px; /* Remonte pour combler le margin-top */
  left: 0;
  width: 100%;
  height: 35px; 
  background: transparent; /* Reste invisible */
}

/* Affichage au survol */
.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeInUp 0.3s ease forwards;
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

/* =========================================
   6. SECTIONS & HERO
   ========================================= */
.section, .hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  padding: 0.875rem 1.5rem;
  border-radius: 0.625rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease;
}

.btn-primary:hover {
  transform: scale(1.05);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: white;
  text-decoration: none;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

/* Slider Hero (CORRIGÉ : PLUS DE ZOOM) */
.hero-image {
  position: relative;
  /* Hauteur réduite sur mobile pour éviter trop de vide */
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  /* Fond noir pour combler les bandes si l'image ne remplit pas tout */
  background-color: #070708; 
}

.hero-image-slider {
  display: flex;
  width: 300%;
  animation: slide 15s ease-in-out 2s infinite;
}

.hero-image-slider img {
  width: 33.333%;
  height: 100%;
  
  /* CORRECTION ZOOM : On affiche l'image entière */
  object-fit: contain; 
  object-position: center;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
  pointer-events: none; /* Laisse passer les clics si besoin */
}

@keyframes slide {
  0% { transform: translateX(0); }
  30% { transform: translateX(0); }
  35% { transform: translateX(-33.333%); }
  65% { transform: translateX(-33.333%); }
  70% { transform: translateX(-66.666%); }
  100% { transform: translateX(-66.666%); }
}

/* =========================================
   7. PRÉSENTATION
   ========================================= */
.presentation-center .card {
  background: rgba(30, 30, 40, 0.7);
  border-radius: 16px;
  padding: 2rem;
  color: var(--muted-foreground);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

.presentation-center p {
  margin-bottom: 1rem;
}

.presentation-center strong {
  color: var(--foreground);
}

/* =========================================
   8. CARROUSELS AVIS / COURS (CORRIGÉ POUR ZOOM)
   ========================================= */
.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.course-card {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 350px; /* Taille fixe pour le cadre */
  position: relative;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.course-image-wrapper {
  width: 100%;
  height: 100%; 
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  width: 200%; /* 2 images */
  height: 100%;
  animation: slideImages 10s infinite ease-in-out;
}

.course-card:hover .carousel-track {
  animation-play-state: paused;
}

/* Style de l'image (Background) pour qu'elle soit entière */
.carousel-slide {
  width: 50%; 
  height: 100%;
  /* Contain = Image entière visible, quitte à avoir des bords vides */
  background-size: contain; 
  background-position: center;
  background-repeat: no-repeat;
}

@keyframes slideImages {
  0%, 45% { transform: translateX(0); }
  50%, 95% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Classes spécifiques pour tes images (Ajuste les noms si besoin) */
.slide-1-1 { background-image: url('cap1.png'); }
.slide-1-2 { background-image: url('cap2.png'); }
.slide-2-1 { background-image: url('cap3.png'); }
.slide-2-2 { background-image: url('cap4.png'); }
.slide-3-1 { background-image: url('cap5.png'); }
.slide-3-2 { background-image: url('cap6.png'); }

/* =========================================
   9. FOOTER & RESPONSIVE
   ========================================= */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-foreground);
  border-top: 1px solid rgba(255,255,255,0.05);
}

@media (min-width: 768px) {
  nav {
    display: flex; /* Nav visible sur PC */
  }
  .hamburger {
    display: none;
  }
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-image {
    /* Sur grand écran, on remet une hauteur plus grande */
    height: 500px;
  }
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}