/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}
body {
  background-color: #ffffff;
  color: #1f2937;
  scroll-behavior: smooth;
  line-height: 1.6;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

/* ===========================================================
   NAVBAR PROFESSIONNELLE - LOGO / NAV / BOUTONS
   =========================================================== */

/* Container général */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 8%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Ajuste pour que le header soit au-dessus */
header.navbar {
  position: sticky;
  top: 0;
  z-index: 10; /* toujours visible par-dessus le hero */
}

/* --- Logo image --- */
.nav-logo {
  flex: 1; /* occupe l'espace à gauche */
  display: flex;
  align-items: center; /* centre verticalement */
}

.nav-logo img {
  height: 50px; /* taille du logo */
  width: auto; /* conserve les proportions */
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Petit effet au hover si tu veux */
.nav-logo img:hover {
  transform: scale(1.05);
}

/* --- Conteneur nav-left --- */
.nav-left {
  display: flex;
  justify-content: center;
  flex: 2;
  gap: 30px;
}

/* --- Chaque item avec dropdown --- */
.nav-item {
  position: relative;
}

.nav-item > a {
  font-weight: 500;
  color: #1e293b;
  padding: 4px 0;
  transition: color 0.3s ease;
  display: inline-block;
  position: relative;
}

/* Souligné animé */
.nav-item > a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #3b82f6);
  transition: width 0.3s ease;
}

.nav-item > a:hover::after {
  width: 100%;
}

.nav-item > a:hover {
  color: #3b82f6;
}

/* --- Dropdown amélioré --- */
.dropdown {
  position: absolute;
  top: 125%; /* juste en dessous du lien */
  left: 0;
  background: rgba(255, 255, 255, 0.95); /* fond semi-transparent */
  backdrop-filter: blur(10px); /* flou léger pour élégance */
  box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* ombre douce */
  border-radius: 12px; /* coins plus ronds */
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1); /* fluide */
  min-width: 140px; /* moins large */
  z-index: 50;
  display: flex;
  flex-direction: column;
}

/* --- Lien dans dropdown --- */
.dropdown a {
  padding: 8px 14px; /* plus compact */
  color: #1f2937;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent; /* effet subtil */
}

/* --- Hover lien --- */
.dropdown a:hover {
  background: linear-gradient(90deg, #4f46e5, #3b82f6);
  color: #fff;
  border-left: 3px solid #2563eb;
  transform: translateX(3px); /* léger mouvement */
}

/* --- Affichage au hover --- */
.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- Boutons à droite --- */
.nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  flex: 1;
}

/* Style des boutons */
.nav-right a {
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-right a:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
}

/* Boutons secondaires (Connexion / Inscription si besoin) */
.nav-right a.secondary {
  background: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.nav-right a.secondary:hover {
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .nav-left { gap: 20px; }
  .nav-right { gap: 12px; }
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 5%;
  }

  .nav-logo {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .nav-left {
    flex: 1 1 100%;
    justify-content: center;
    margin-bottom: 10px;
  }

  .nav-right {
    flex: 1 1 100%;
    justify-content: center;
    gap: 12px;
  }
}

/* --- Section Hero --- */
.hero {
  min-height: 100vh; /* prend toute la hauteur de l'écran */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 10%;
  padding-right: 10%;
  color: #ffffff;
  
/* --- Fond commun avec gradient overlay --- */
  background:
    linear-gradient(135deg, rgba(79,70,229,0.55), rgba(59,130,246,0.55)),
    var(--page-bg) center/cover no-repeat;
  background-attachment: fixed; /* effet parallax subtil */
  transition: background 0.8s ease-in-out;
  
  position: relative;
  z-index: 1;
  animation: fadeIn 1.2s ease forwards;
  overflow: hidden;
}

/* --- Vidéo placée à la place du background image --- */
.hero .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* --- Dégradé par-dessus la vidéo --- */
.hero .background-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,70,229,0.55), rgba(59,130,246,0.55));
  z-index: -1;
}

/* --- Effet fondu bas très doux --- */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15%; /* plus étendu pour un fondu plus naturel */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.4) 75%,
    rgba(255, 255, 255, 0.6) 90%,
    #ffffff 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Titres Hero */
.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.2;
  max-width: 800px;
}

/* Texte Hero */
.hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Bouton Principal */
.btn-primary {
  background-color: #ffffff;
  color: #2563eb;
  padding: 16px 36px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 16px rgba(255,255,255,0.2);
}

.btn-primary:hover {
  background-color: #e0e7ff;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(255,255,255,0.3);
}

/* --- Animations --- */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1.1rem; }
  .btn-primary { padding: 14px 28px; font-size: 0.95rem; }
}

@media (max-width: 768px) {
  .hero {
    padding-left: 5%;
    padding-right: 5%;
    text-align: center;
    align-items: center;
  }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1rem; }
}

/* --- Sections générales --- */
section {
  padding: 100px 10%;
}

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 45px;
  text-align: center;
}
.feature-card {
  background: #f8fafc;
  padding: 40px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}
.feature-card img {
  width: 64px;
  margin-bottom: 20px;
}
.feature-card h3 {
  color: #1e3a8a;
  margin-bottom: 10px;
  font-size: 1.25rem;
}
.feature-card p {
  color: #475569;
  font-size: 0.95rem;
}

/* --- Témoignages --- */
.testimonials {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 16px;
  padding: 100px 10%;
}
/* --- Effet fondu haut très subtil --- */
.testimonials::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5%; /* beaucoup plus petit et discret */
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 2;
}
/* --- Effet fondu bas très doux --- */
.testimonials::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5%; /* plus étendu pour un fondu plus naturel */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.4) 75%,
    rgba(255, 255, 255, 0.6) 90%,
    #ffffff 100%
  );
  pointer-events: none;
  z-index: 2;
}
.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}
.testimonial-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-8px);
}
.testimonial-card p {
  font-style: italic;
  margin-bottom: 15px;
  color: #374151;
}
.testimonial-card h4 {
  color: #2563eb;
  font-weight: 700;
}

/* --- Stats --- */
.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  text-align: center;
}
.stat {
  flex: 1 1 250px;
  margin: 20px;
  padding: 20px;
}
.stat h3 {
  font-size: 2.2rem;
  color: #2563eb;
}
.stat p {
  color: #475569;
}

/* --- Footer --- */
footer {
  background: #0f172a;
  color: #ffffff;
  padding: 60px 10%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
footer div {
  flex: 1;
  min-width: 200px;
}
footer h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #93c5fd;
}
footer a {
  color: #e2e8f0;
  display: block;
  margin-top: 8px;
  transition: color 0.3s ease;
}
footer a:hover {
  color: #60a5fa;
}

/* --- Animations --- */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ===========================================================
   BURGER MENU (Mobile)
   =========================================================== */

/* --- Burger icon --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: #1e293b;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- Burger transform en X --- */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===========================================================
   NAVIGATION MOBILE RESPONSIVE
   =========================================================== */
@media (max-width: 768px) {

  /* --- Burger icon --- */
  .nav-toggle {
    display: flex;
    order: 2; /* s'affiche après le logo */
  }

  /* --- Menus gauche et droite cachés par défaut --- */
  .nav-left,
  .nav-right {
    flex-basis: 100%;
    flex-direction: column;
    align-items: center;
    display: none;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  /* --- Affichage menu avec animation --- */
  .nav-left.open,
  .nav-right.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  /* ===========================================================
     Items du menu gauche
     =========================================================== */
  .nav-left .nav-item {
    margin-bottom: 12px;
    width: 100%;        /* occupe toute la largeur du menu */
    text-align: center; /* centre le texte pour uniformité */
    position: relative; /* nécessaire pour ::after barre bleue */
  }

  /* --- Lien principal (plus grand, titre) --- */
  .nav-left .nav-item > a {
    font-size: 1.1rem;       /* plus grand que les dropdowns */
    font-weight: 600;
    color: #1e293b;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
  }

  /* --- Barre bleue sous le lien principal --- */
  .nav-left .nav-item > a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 30%;
    width: 40%;
    height: 2px;
    background-color: #3b82f6;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-left .nav-item > a:hover {
    color: #3b82f6;
  }

  .nav-left .nav-item > a:hover::after {
    width: 100%;
    left: 0;
  }

  /* ===========================================================
     Dropdown mobile (liens secondaires)
     =========================================================== */
  .nav-left .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    margin: 4px 0 0 0; /* petit écart avec l’item principal */
    padding: 0;
    min-width: auto;
  }

  /* --- Liens dropdown (plus petits, subtils) --- */
  .nav-left .dropdown a {
    font-size: 0.85rem; /* plus petit que le lien principal */
    color: #475569; /* subtil */
    padding: 6px 0;
    text-align: center; /* centré */
    transition: color 0.25s ease, transform 0.25s ease;
  }

  .nav-left .dropdown a:hover {
    color: #3b82f6;
    transform: translateX(3px);
  }
}

/* --- Hero responsive ultime --- */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; line-height: 1.3; }
  .hero p { font-size: 0.95rem; max-width: 100%; }
  .btn-primary { padding: 12px 24px; font-size: 0.9rem; }
  .hero { padding: 0 5%; justify-content: center; }
}

/* --- Features & Testimonials --- */
@media (max-width: 768px) {
  .features, .testimonial-cards { grid-template-columns: 1fr; gap: 30px; }
}

/* --- Footer --- */
@media (max-width: 640px) {
  footer { flex-direction: column; align-items: center; gap: 25px; padding: 40px 5%; }
  footer div { text-align: center; min-width: auto; }
}

/* --- Dropdown responsive --- */
@media (max-width: 768px) {
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: transparent;
    flex-direction: column;
    padding: 0;
    min-width: 100%;
  }
  .dropdown a {
    padding: 10px 0;
    border-left: none;
    background: transparent;
  }
  .nav-item:hover .dropdown { transform: none; }
}