/**
 * MOBILE FIXES V5.1
 * Corrections pour mobile et iPad
 */

/* ============================================
   BADGE ET HERO MOBILE
   ============================================ */

@media (max-width: 768px) {
  .hero-modern {
    padding-top: 150px !important; /* Espace pour le badge */
    min-height: 100svh;
  }
}

@media (min-width: 769px) {
  .hero-modern {
    padding-top: 160px !important; /* Plus d'espace desktop */
  }
  
  .hero-badge {
    margin-top: 20px;
    font-size: 11px;
    padding: 8px 16px;
  }
  
  /* Désactiver vidéo sur mobile (performance) */
  .hero-video {
    display: none !important;
  }
  
  .hero-video-overlay {
    background: linear-gradient(135deg, #001f3f 0%, #003d5c 100%) !important;
  }
  
  /* Désactiver particles sur mobile */
  .hero-particles {
    display: none !important;
  }
}

/* ============================================
   HEADER MOBILE
   ============================================ */

@media (max-width: 768px) {
  .site-header-pro {
    padding: 12px 15px !important;
  }
  
  .header-container-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo-section-pro {
    flex: 1;
  }
  
  .logo-link-pro {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .logo-wrapper-pro {
    width: 35px !important;
    height: 35px !important;
  }
  
  .logo-text-pro {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }
  
  .company-name-pro {
    font-size: 15px !important;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
  }
  
  .company-tagline-pro {
    font-size: 9px !important;
    font-weight: 600;
    color: #d4af37;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
  }
  
  /* Navigation principale cachée sur mobile */
  .main-nav-pro {
    display: none !important;
  }
  
  /* Actions header */
  .header-actions-pro {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* Langue plus compacte */
  .language-button {
    padding: 6px 8px !important;
    font-size: 11px !important;
    min-width: auto !important;
  }
  
  .language-icon {
    width: 14px !important;
    height: 14px !important;
  }
  
  .current-language {
    font-size: 11px !important;
  }
  
  .dropdown-arrow {
    width: 10px !important;
    height: 10px !important;
  }
}

/* ============================================
   MENU MOBILE BURGER MÉTAL
   ============================================ */

@media (max-width: 768px) {
  /* Burger button */
  .mobile-menu-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
  }
  
  /* Barres métalliques */
  .hamburger-line {
    width: 22px;
    height: 2.5px;
    background: linear-gradient(90deg, #c0c0c0, #a0a0a0, #c0c0c0);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: block;
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
  
  /* Menu mobile overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 15, 30, 0.98);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Menu content */
  .mobile-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #001f3f 0%, #003d5c 100%);
    z-index: 9999;
    padding: 80px 25px 30px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mobile-menu-content.active {
    transform: translateX(0);
  }
  
  /* Close button */
  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
  }
  
  .mobile-menu-close svg {
    stroke: #ffffff;
    stroke-width: 2;
  }
  
  /* Navigation list */
  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-nav-list li {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mobile-menu-content.active .mobile-nav-list li {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Animation briques */
  .mobile-menu-content.active .mobile-nav-list li:nth-child(1) { transition-delay: 0.1s; }
  .mobile-menu-content.active .mobile-nav-list li:nth-child(2) { transition-delay: 0.15s; }
  .mobile-menu-content.active .mobile-nav-list li:nth-child(3) { transition-delay: 0.2s; }
  .mobile-menu-content.active .mobile-nav-list li:nth-child(4) { transition-delay: 0.25s; }
  .mobile-menu-content.active .mobile-nav-list li:nth-child(5) { transition-delay: 0.3s; }
  .mobile-menu-content.active .mobile-nav-list li:nth-child(6) { transition-delay: 0.35s; }
  
  /* Links */
  .mobile-nav-link {
    display: block;
    padding: 18px 20px;
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.05), rgba(160, 160, 160, 0.05));
    border-left: 4px solid #d4af37;
    border-radius: 8px;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }
  
  .mobile-nav-link:hover,
  .mobile-nav-link:active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.1));
    border-left-width: 8px;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  }
}

/* ============================================
   SCROLL DÉSACTIVÉ SUR MOBILE
   ============================================ */

@media (max-width: 1024px) {
  /* Désactiver le scroll automatique */
  body.disable-auto-scroll {
    scroll-behavior: auto !important;
  }
  
  section, .hero-modern {
    min-height: auto !important;
    scroll-snap-align: none !important;
  }
}

/* ============================================
   OPTIMISATIONS PERFORMANCES
   ============================================ */

@media (max-width: 768px) {
  /* Désactiver animations lourdes */
  * {
    animation-duration: 0.3s !important;
  }
  
  /* Images optimisées */
  img {
    image-rendering: -webkit-optimize-contrast;
    content-visibility: auto;
  }
  
  /* Lazy loading natif */
  img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  img[loading="lazy"].loaded {
    opacity: 1;
  }
  
  /* Désactiver box-shadows complexes */
  .btn-primary-hero,
  .btn-secondary-hero {
    box-shadow: none !important;
  }
  
  .btn-primary-hero:hover,
  .btn-secondary-hero:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
  }
  
  /* Réduire transitions */
  .expertise-card,
  .client-logo,
  .section-separator {
    transition-duration: 0.2s !important;
  }
  
  /* Désactiver parallaxe sur mobile */
  [data-parallax] {
    transform: none !important;
  }
}
