/**
 * PILL NAVBAR - RESPONSIVE
 * Navbar unique centrée en forme de pill, fixed, identique sur tout le site
 * Desktop + Tablet + Mobile avec hamburger menu
 */

/* ============================================
   MASQUAGE DE L'ANCIENNE NAVBAR (TOUTES TAILLES)
   ============================================ */

/* Masquer l'ancienne navbar sur TOUTES les tailles d'écran */
header .wrapper .box {
  display: none !important;
}

/* Masquer le header traditionnel */
body > header {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: 0 !important;
  border: none !important;
  position: static !important;
}

/* Override pour la page d'accueil */
body.home header {
  position: static !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ============================================
   CONTENEUR PRINCIPAL DE LA PILL NAVBAR
   ============================================ */

.sf-pill-navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  padding: 12px 24px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  
  /* Mobile par défaut */
  width: calc(100% - 32px);
  max-width: 500px;
}

/* Tablet (768px - 1024px) : même que desktop */
@media (min-width: 768px) {
  .sf-pill-navbar {
    width: 33%;
    min-width: 600px;
    max-width: 800px;
  }
}

/* Desktop (≥1025px) */
@media (min-width: 1025px) {
  .sf-pill-navbar {
    width: 33%;
    min-width: 600px;
    max-width: 800px;
  }
}

/* Dark mode */
body.dark-mode .sf-pill-navbar {
  background: #1d283a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ============================================
   LOGO (ZONE GAUCHE)
   ============================================ */

.sf-pill-navbar-logo {
  display: flex;
  align-items: center;
  height: 40px;
}

.sf-pill-navbar-logo a {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.sf-pill-navbar-logo a:hover {
  transform: scale(1.05);
}

.sf-pill-navbar-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* ============================================
   ZONE CENTRALE (VIDE - ÉQUILIBRE VISUEL)
   ============================================ */

.sf-pill-navbar-center {
  flex: 1;
}

/* ============================================
   ZONE DROITE - LIENS
   ============================================ */

.sf-pill-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   LIEN "AIDE"
   ============================================ */

.sf-pill-navbar-help {
  font-weight: 600;
  font-size: 15px;
  color: #6b7280;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 50px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  display: none; /* Caché sur mobile */
}

/* Afficher sur tablet et desktop */
@media (min-width: 768px) {
  .sf-pill-navbar-help {
    display: inline-block;
  }
}

/* Hover: devient un bouton pill blanc */
.sf-pill-navbar-help:hover {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  text-decoration: none;
}

/* Dark mode */
body.dark-mode .sf-pill-navbar-help {
  color: #e5e7eb;
}

body.dark-mode .sf-pill-navbar-help:hover {
  background: #fff;
  color: #0f172a;
}

/* ============================================
   LIEN "SE CONNECTER" / "DÉCONNEXION"
   ============================================ */

.sf-pill-navbar-login {
  font-weight: 600;
  font-size: 15px;
  color: #6b7280;
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 50px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  display: none; /* Caché sur mobile */
}

/* Afficher sur tablet et desktop */
@media (min-width: 768px) {
  .sf-pill-navbar-login {
    display: inline-block;
  }
}

/* Hover: devient un bouton pill blanc */
.sf-pill-navbar-login:hover {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  text-decoration: none;
}

/* Dark mode */
body.dark-mode .sf-pill-navbar-login {
  color: #e5e7eb;
}

body.dark-mode .sf-pill-navbar-login:hover {
  background: #fff;
  color: #0f172a;
}

/* ============================================
   BOUTON "CRÉER UN COMPTE" / "MON COMPTE"
   ============================================ */

.sf-pill-navbar-register {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: #0593d1;
  text-decoration: none;
  padding: 8px 24px;
  border-radius: 60px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  display: inline-block;
  box-shadow: 
    0 4px 12px rgba(5, 147, 209, 0.35),
    0 0 0 rgba(5, 147, 209, 0);
}

/* Hover: légère augmentation de taille */
.sf-pill-navbar-register:hover {
  transform: scale(1.05);
  text-decoration: none;
  color: #fff;
}

/* Dark mode: couleur identique */
body.dark-mode .sf-pill-navbar-register {
  background: #0593d1;
  color: #fff;
}

body.dark-mode .sf-pill-navbar-register:hover {
  transform: scale(1.05);
  color: #fff;
}

/* ============================================
   HAMBURGER ICON (MOBILE UNIQUEMENT)
   ============================================ */

.sf-pill-navbar-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 8px;
  position: relative;
}

/* Masquer sur tablet et desktop */
@media (min-width: 768px) {
  .sf-pill-navbar-hamburger {
    display: none;
  }
}

.sf-pill-navbar-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
}

body.dark-mode .sf-pill-navbar-hamburger span {
  background: #fff;
}

.sf-pill-navbar-hamburger span:nth-child(1) {
  top: 10px;
}

.sf-pill-navbar-hamburger span:nth-child(2) {
  top: 15px;
}

.sf-pill-navbar-hamburger span:nth-child(3) {
  top: 20px;
}

/* État ouvert (croix) */
.sf-pill-navbar-hamburger.active span:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
}

.sf-pill-navbar-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.sf-pill-navbar-hamburger.active span:nth-child(3) {
  top: 15px;
  transform: rotate(-45deg);
}

/* ============================================
   MENU HAMBURGER FULLSCREEN (MOBILE UNIQUEMENT)
   ============================================ */

.sf-pill-navbar-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: 100px; /* Espace pour la pill navbar */
}

/* Dark mode */
body.dark-mode .sf-pill-navbar-menu {
  background: #0f172a;
}

/* État ouvert */
.sf-pill-navbar-menu.active {
  transform: translateY(0);
}

/* Masquer sur tablet et desktop */
@media (min-width: 768px) {
  .sf-pill-navbar-menu {
    display: none !important;
  }
}

/* Liens dans le menu */
.sf-pill-navbar-menu a {
  font-weight: 600;
  font-size: 20px;
  color: #0f172a;
  text-decoration: none;
  padding: 12px 24px;
  transition: color 0.2s ease;
}

body.dark-mode .sf-pill-navbar-menu a {
  color: #fff;
}

.sf-pill-navbar-menu a:hover {
  color: #0593d1;
}

/* ============================================
   AJUSTEMENT DU CONTENU PRINCIPAL
   ============================================ */

/* Ajouter un padding-top au contenu pour compenser la navbar fixed */

/* Mobile */
body {
  padding-top: 0 !important;
}

header + section,
header + .sf-hero-section {
  margin-top: 100px !important;
}

body.home .sf-hero-section {
  margin-top: 100px !important;
}

body:not(.home) section:first-of-type {
  padding-top: 120px !important;
}

/* Tablet et Desktop */
@media (min-width: 768px) {
  header + section,
  header + .sf-hero-section {
    margin-top: 100px !important;
  }
  
  body.home .sf-hero-section {
    margin-top: 100px !important;
  }
  
  body:not(.home) section:first-of-type {
    padding-top: 120px !important;
  }
}
