/* 1. Reinitialisation complete des marges globales */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Empêche tout défilement horizontal */
}

/* 2. Annulation des marges Bootstrap automatiques */
.container, .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

/* 3. Conteneur Hero plein écran */
.hero-video-container {
    position: relative;
    width: 100vw; /* Prends exactement 100% de la largeur de l'écran */
    height: 100vh; /* Prends exactement 100% de la hauteur de l'écran */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* 4. Cadrage et étirement de la vidéo */
#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit tout l'écran sans déformer */
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* 5. Voile sombre superposé */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* 6. Contenu texte et boutons */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

    /* 7. Style personnalisé pour le titre principal avec Italianno */
    .hero-content h1 {
        font-family: 'Italianno', cursive !important;
        font-size: 5rem;
        font-weight: 400;
        letter-spacing: 2px;
        text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
    }

.navbar-brand {
    font-family: 'Italianno', cursive !important;
    font-size: 2.5rem !important; /* Taille augmentée pour bien mettre en valeur la police cursive */
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* --- Animations séquentielles pour le contenu Hero --- */

/* 1. Le titre apparaît immédiatement au début */
.animate-title {
    opacity: 0;
    animation: fadeInDown 1.2s ease-out 0.5s forwards;
}

/* 2. Le texte descriptif apparaît un peu plus tard (pendant la vidéo) */
.animate-text {
    opacity: 0;
    animation: fadeIn 5s ease-out 2s forwards;
}

/* 3. Les boutons apparaissent à la fin (lorsque la vue de drone se stabilise) */
.animate-buttons {
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 10s forwards;
}

/* Keyframes des animations */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Barre de navigation --- */

/* Barre de navigation initialement cachée, prête à apparaître à la fin de la vidéo */
.navbar-delayed-fade {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

    /* Classe activée par le script quand la vidéo se termine */
    .navbar-delayed-fade.show-nav {
        opacity: 1;
        visibility: visible;
    }

/* Ajustement global pour que la navbar occupe tout le haut et s'étire */
.navbar-full-top {
    display: flex;
    align-items: stretch !important;
    padding: 0 !important;
}

    .navbar-full-top .container-fluid {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .navbar-full-top .navbar-collapse {
        height: 100%;
    }

    .navbar-full-top .navbar-nav {
        display: flex;
        width: 100%;
        height: 100%;
        justify-content: flex-end;
        align-items: stretch;
    }

/* Répartition des rubriques sur toute la largeur restante sans traits verticaux */
@media (min-width: 576px) {
    .navbar-full-top .navbar-nav .nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
    }
}
