/* ============================================================
   NAVBAR FIXE – Corentin Drone (COMPATIBLE iOS)
   ============================================================ */

:root {
    --navbar-height: 70px;
}

/* ------------------------------------------------------------
   NAVBAR
------------------------------------------------------------ */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1030;
    display: flex;
    align-items: center;
    background-color: #000000 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    padding: 0 1rem;
    -webkit-transform: translateZ(0);   /* ← AJOUTÉ POUR iOS */
    transform: translateZ(0);            /* ← AJOUTÉ POUR iOS */
}

.navbar-brand, 
.nav-link {
    color: #ffffff !important;
}

/* ------------------------------------------------------------
   BOUTON BURGER - CORRECTIONS iOS
------------------------------------------------------------ */
.navbar-toggler {
    position: relative;
    z-index: 1032;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;   /* ← AJOUTÉ POUR iOS */
    border: none;
    outline: none;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* ------------------------------------------------------------
   LOGO (Ajustements Taille et Position)
------------------------------------------------------------ */
.navbar-logo {
    height: 40px;
    width: auto;
    transform: scale(2.5); 
    transform-origin: left center;
    position: relative;
    left: -60px;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;   /* ← AJOUTÉ POUR iOS */
}

/* ------------------------------------------------------------
   LIENS - ZONE DE CLIC AGRANDIE POUR iOS
------------------------------------------------------------ */
.navbar-nav .nav-link {
    cursor: pointer;
    padding: 12px 16px;                    /* ← AJOUTÉ POUR iOS */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ------------------------------------------------------------
   MENU DÉROULANT - CORRECTIONS iOS
------------------------------------------------------------ */
.navbar-collapse {
    background: #000;
    z-index: 1031;
    -webkit-overflow-scrolling: touch;    /* ← AJOUTÉ POUR iOS */
}

/* ------------------------------------------------------------
   ADAPTATION MOBILE
------------------------------------------------------------ */
@media (max-width: 991px) {
    .navbar-logo {
        transform: scale(2.5) !important; 
        left: -35px !important;
    }

    .navbar-collapse {
        position: absolute;
        top: calc(var(--navbar-height) + env(safe-area-inset-top));  /* ← CORRIGÉ */
        left: 0;
        width: 100%;
        background: #000;
        padding: 10px 15px;
        z-index: 1029;
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
        max-height: calc(100dvh - var(--navbar-height) - env(safe-area-inset-top));   /* ← CORRIGÉ */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;   /* ← AJOUTER */
    }
    
    /* Zone de clic plus grande sur mobile */
    .navbar-nav .nav-link {
        padding: 14px 20px;
        -webkit-tap-highlight-color: transparent;   /* ← AJOUTER */
    }
    
    /* Assurer que le collapse s'affiche bien */
    .navbar-collapse.show {
        display: block !important;
    }
}

/* ------------------------------------------------------------
   CONTENU & ANIMATION
------------------------------------------------------------ */
body {
    padding-top: var(--navbar-height) !important;
}

html {
    scroll-behavior: smooth;
}

/* ------------------------------------------------------------
   CORRECTIONS SPÉCIFIQUES iOS
------------------------------------------------------------ */
@supports (-webkit-touch-callout: none) {
    /* iOS uniquement */
    .navbar {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Éviter le zoom automatique sur les inputs */
    input, 
    textarea, 
    select, 
    button,
    .nav-link {
        font-size: 16px;
    }
    
    /* Assurer que le menu est scrollable sur iOS */
    .navbar-collapse.show {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}