/* ========================================
   ORTHOSCAPHE - STYLES DE LA NAVIGATION
   ======================================== */

/* ========================================
   4. NAVIGATION PRINCIPALE - OPTIMISÉE
   ======================================== */

/* Container principal de la navigation */
.main-navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--navigation-background);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--navigation-border);
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.navigation-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========================================
   4.1 LOGO/MARQUE
   ======================================== */

.navigation-brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 12px);
  justify-self: start;
  height: clamp(36px, 6vh, 42px);
  min-height: clamp(36px, 6vh, 42px);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--navigation-text);
  text-decoration: none;
}

.navigation-brand img,
.brand-logo {
  width: clamp(32px, 5vh, 42px);
  height: clamp(32px, 5vh, 42px);
  object-fit: contain;
  flex-shrink: 0;
}

.navigation-brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  color: var(--navigation-text);
  font-size: var(--font-size-lg);
  font-weight: 300;
  font-family: var(--font-family-primary);
  letter-spacing: clamp(0.5px, 0.1vw, 0.8px);
  transition: color 0.6s ease;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

/* ========================================
   4.2 MENU DE NAVIGATION
   ======================================== */

.navigation-menu {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  justify-self: center;
  height: auto;
  margin-left: clamp(1rem, 3vw, 2rem);
  margin-right: clamp(1rem, 3vw, 2rem);
}

/* Navigation desktop - masquer les liens directs des opérations */
.navigation-link.mobile-ops {
  display: none !important;
}

.navigation-link {
  color: var(--navigation-text);
  text-decoration: none;
  font-size: var(--font-size-nav);
  font-weight: 400;
  font-family: var(--font-family-primary);
  padding: clamp(0.3rem, 1vh, 0.5rem) 0;
  position: relative;
  letter-spacing: clamp(0.2px, 0.05vw, 0.3px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: clamp(36px, 6vh, 42px);
}

.navigation-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--navigation-text);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navigation-link:hover::after {
  width: 100%;
}

.navigation-link:hover {
  color: var(--accent-color);
  transform: translateY(-1px);
}

/* ========================================
   4.3 CONTRÔLES DE NAVIGATION
   ======================================== */

.navigation-controls {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  justify-self: end;
  height: 100%;
  min-height: clamp(36px, 6vh, 42px);
  margin-right: clamp(1rem, 2vw, 2rem);
}

/* Styles communs pour tous les boutons circulaires */
.mobile-menu-button,
.language-switcher {
  width: clamp(36px, 6vh, 42px);
  height: clamp(36px, 6vh, 42px);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.mobile-menu-button:hover,
.language-switcher:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* ========================================
   4.4 MENU BURGER (MOBILE SEULEMENT)
   ======================================== */

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: clamp(3px, 0.5vw, 4px);
}

.burger-line {
  width: clamp(18px, 4vw, 20px);
  height: 2px;
  background: var(--navigation-text);
  border-radius: 1px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.mobile-menu-button.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-button.active .burger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   4.5 BOUTONS SPÉCIALISÉS
   ======================================== */



/* Bouton langue */
.language-text {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--navigation-text);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.language-switcher:hover .language-text {
  transform: scale(1.1) rotate(-5deg);
  color: var(--accent-color);
  font-weight: 700;
}

/* Bouton CTA navbar */
.appointment-button {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-hover) 100%);
  color: #ffffff;
  font-size: var(--font-size-button);
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  height: clamp(36px, 6vh, 42px);
  padding: 0 clamp(20px, 3.5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  margin: 0;
  vertical-align: middle;
  font-family: inherit;
  align-self: center;
}

.appointment-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.8s ease;
  z-index: 1;
}

.appointment-button:hover::before {
  left: 100%;
}

.appointment-button:hover {
  background: linear-gradient(135deg, var(--accent-color-hover) 0%, var(--accent-color) 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.4);
  color: #ffffff;
}

/* ========================================
   4.6 MENU DÉROULANT DES OPÉRATIONS
   ======================================== */
/* 
   Les styles du dropdown ont été déplacés dans dropdown.css
   pour éviter les conflits avec Bootstrap et faciliter la maintenance.
   Voir Assets/css/dropdown.css pour les styles complets.
*/

/* ========================================
   4.7 BOUTON DE FERMETURE MOBILE
   ======================================== */

.mobile-close-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) rotate(-90deg);
}

/* Affichage du bouton quand le menu est actif */
.navigation-menu.active .mobile-close-button {
  opacity: 1;
  visibility: visible;
  transform: scale(1) rotate(0deg);
}

.mobile-close-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05) rotate(90deg);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Icône X du bouton de fermeture */
.mobile-close-button::before,
.mobile-close-button::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-close-button::before {
  transform: rotate(45deg);
}

.mobile-close-button::after {
  transform: rotate(-45deg);
}

/* Animation au survol */
.mobile-close-button:hover::before {
  transform: rotate(45deg) scale(1.1);
}

.mobile-close-button:hover::after {
  transform: rotate(-45deg) scale(1.1);
}

/* ========================================
   5. RESPONSIVE DESIGN
   ======================================== */

/* ========================================
   5.1 RESPONSIVE DU MENU DÉROULANT
   ======================================== */

/* 
   Les styles mobiles du dropdown ont été déplacés dans dropdown.css
   pour éviter les conflits avec Bootstrap et faciliter la maintenance.
*/

/* ========================================
   5.2 RESPONSIVE PRINCIPAL
   ======================================== */

/* MOBILE (jusqu'à 768px) */
@media (max-width: 480px) {
  .main-navigation {
    padding: 0.8rem 1rem;
    min-height: 56px;
  }
  
  .navigation-brand img {
    width: 28px;
    height: 28px;
  }
  
  .brand-text {
    font-size: 1rem;
  }
  
  .navigation-controls {
    gap: 0.5rem;
  }
  
  .language-switcher,
  .mobile-menu-button {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 768px) {
  .main-navigation {
    display: flex;
    justify-content: space-between;
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1rem, 3vw, 1.5rem);
    min-height: clamp(56px, 10vh, 65px);
    gap: 0;
  }
  
  .navigation-brand {
    gap: clamp(6px, 2vw, 10px);
    justify-self: auto;
    height: clamp(32px, 8vh, 36px);
    min-height: clamp(32px, 8vh, 36px);
  }
  
  .navigation-menu {
    margin-left: 0;
    margin-right: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 4vh, 2.5rem);
    padding: 4rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    justify-self: auto;
  }
  
  .navigation-menu.active {
    transform: translateY(0);
  }
  
  .navigation-link {
    font-size: var(--font-size-lg);
    padding: clamp(0.8rem, 2vh, 1.2rem) clamp(1.5rem, 4vw, 2rem);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-align: center;
    min-width: clamp(180px, 40vw, 220px);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    height: auto;
  }
  
  .mobile-menu-button {
    display: flex !important;
    order: 3;
  }
  
  .navigation-controls {
    gap: clamp(0.5rem, 1.5vw, 0.8rem);
    justify-self: auto;
    height: clamp(32px, 8vh, 36px);
    min-height: clamp(32px, 8vh, 36px);
    margin-right: clamp(0.5rem, 1.5vw, 1rem);
  }
  
  .appointment-button {
    display: none;
  }
}

/* TABLETTE ET DESKTOP */
@media (min-width: 769px) {
  .mobile-menu-button {
    display: none !important;
  }
  
  .main-navigation {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  
  .navigation-menu {
    justify-self: center;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    height: auto;
    width: auto;
    background: none;
    backdrop-filter: none;
    padding: 0;
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .navigation-link {
    color: var(--navigation-text);
    font-size: var(--font-size-nav);
    font-weight: 400;
    padding: clamp(0.3rem, 1vh, 0.5rem) 0;
    background: none;
    border: none;
    min-width: auto;
    text-align: left;
    opacity: 1;
    transform: none;
  }
  
/* 
   Les styles de persistance du dropdown ont été déplacés dans dropdown.css
   pour éviter les conflits avec Bootstrap et faciliter la maintenance.
*/
}

/* TABLETTE SPÉCIFIQUE */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-navigation {
    padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.5rem, 3vw, 2rem);
  }
  
  .navigation-menu {
    gap: clamp(1.8rem, 2.5vw, 2.2rem);
  }
  
  .navigation-link {
    font-size: var(--font-size-nav);
  }
  
  .appointment-button {
    font-size: var(--font-size-button);
    padding: 0 clamp(18px, 2.8vw, 24px);
    height: clamp(36px, 6vh, 40px);
  }
}

/* DESKTOP STANDARD */
@media (min-width: 1025px) and (max-width: 1440px) {
  .main-navigation {
    padding: 1rem clamp(2rem, 4vw, 3rem);
  }
  
  .navigation-menu {
    gap: clamp(2rem, 2.8vw, 2.5rem);
  }
}

/* GRAND ÉCRAN */
@media (min-width: 1441px) {
  .main-navigation {
    padding: 1.2rem clamp(3rem, 5vw, 4rem);
    width: 100%;
    max-width: none;
    margin: 0;
    left: 0;
    transform: none;
  }
  
  .navigation-menu {
    gap: 2.8rem;
  }
  
  .navigation-link {
    font-size: var(--font-size-nav);
  }
}

/* ========================================
   6. ANIMATIONS ET EFFETS
   ======================================== */

/* Animation de glissement pour la navigation cachée */
.main-navigation.navbar-hidden {
  transform: translateY(-100%);
  opacity: 0.9;
}

/* Effet de flou sur les contrôles au survol */
.navigation-controls:hover .language-switcher:not(:hover),
.navigation-controls:hover .mobile-menu-button:not(:hover) {
  opacity: 0.7;
  filter: blur(1px);
}

/* Effet de lueur sur le burger actif */
.mobile-menu-button.active {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

/* ========================================
   7. CORRECTIONS MENU MOBILE
   ======================================== */

/* Quand le menu mobile est actif, forcer l'affichage de la navbar */
.navigation-menu.active ~ .main-navigation,
.main-navigation:has(.navigation-menu.active) {
  transform: none !important;
  opacity: 1 !important;
}

/* Alternative plus directe */
.navigation-menu.active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  z-index: 9999 !important;
  transform: translateY(0) !important;
}

/* Solution radicale : désactiver navbar-hidden quand menu mobile est ouvert */
.navigation-menu.active ~ *,
.navigation-menu.active + * {
  transform: none !important;
}

/* Forcer l'affichage du menu mobile même si parent est caché */
@media (max-width: 768px) {
  .navigation-menu.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    z-index: 99999 !important;
    transform: translateY(0) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2rem !important;
  }
  
  /* Navigation mobile - adaptation automatique */
  .navigation-menu .navigation-link {
    display: block !important;
    margin: 0 !important;
    padding: 1.5rem 2rem !important;
    text-align: center !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: 500 !important;
    color: white !important;
    text-decoration: none !important;
  }
  
  .navigation-menu .navigation-link:last-child {
    border-bottom: none !important;
  }
  
  /* Masquer le dropdown sur mobile */
  .nav-dropdown {
    display: none !important;
  }
  
  /* Afficher les liens directs des opérations sur mobile */
  .navigation-link.mobile-ops {
    display: block !important;
  }
  
  /* S'assurer que tous les liens de navigation sont visibles sur mobile */
  .navigation-menu a[href^="#"],
  .navigation-menu a[href^="operations/"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Hover effects pour la navigation mobile */
  .navigation-menu .navigation-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--accent-color) !important;
    transform: translateX(8px) !important;
    transition: all 0.3s ease !important;
  }
  
  /* Styling pour le bouton d'appel à l'action sur mobile */
  .navigation-menu .appointment-button {
    display: block !important;
    margin: 1rem auto !important;
    padding: 1rem 2rem !important;
    text-align: center !important;
    width: fit-content !important;
    border-radius: 25px !important;
    background: var(--accent-color) !important;
    color: white !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: none !important;
  }
}

/* ========================================
   8. ANIMATIONS MOBILE
   ======================================== */

/* Animation décalée des liens quand le menu s'ouvre */
@media (max-width: 768px) {
  .navigation-menu.active .navigation-link:nth-child(2) { animation: slideInLink 0.4s 0.1s forwards; }
  .navigation-menu.active .navigation-link:nth-child(3) { animation: slideInLink 0.4s 0.2s forwards; }
  .navigation-menu.active .navigation-link:nth-child(4) { animation: slideInLink 0.4s 0.3s forwards; }
  .navigation-menu.active .navigation-link:nth-child(5) { animation: slideInLink 0.4s 0.4s forwards; }
  

}

@keyframes slideInLink {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Effet de ripple pour les liens sur mobile */
@media (max-width: 768px) {
  .navigation-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
  }
  

}
