﻿/* ===== CDF NAVBAR (Bootstrap 5) ===== */
@font-face {
    font-family: 'armalite';
    src: url('open-iconic/font/fonts/armalite.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BlackOpsOne';
    src: url('open-iconic/font/fonts/BlackOpsOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Tokens */
:root {
    --cdf-camo-url: url('/css/camo.jpg');
    --cdf-navbar-height: 92px; /* hauteur réelle */
}

/* ===== NAVBAR "PATCH" CAMO ===== */
.cdf-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--cdf-navbar-height);
    display: flex;
    align-items: center;
    background-image: var(--cdf-camo-url);
    background-size: cover;
    background-position: center;
    background-color: rgba(0,0,0,.18);
    background-blend-mode: overlay;
    border-bottom: 3px solid #0e0e0e;
    border-top: 3px solid #2b2b2b;
    box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 0 0 18px rgba(0,0,0,.45);
    border-radius: 0 0 12px 12px;
    padding: 10px 18px;
    z-index: 1050;
    gap: 10px;
    outline: 3px dashed rgba(255,255,255,.10);
    outline-offset: -8px;
}

    .cdf-navbar::before, .cdf-navbar::after {
        content: "";
        position: absolute;
        top: 50%;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: linear-gradient(145deg,#292929,#656565);
        border: 2px solid #000;
        box-shadow: inset 1px 1px 4px rgba(0,0,0,.7),0 0 4px rgba(255,255,255,.25);
        transform: translateY(-50%);
    }

    .cdf-navbar::before {
        left: 10px;
    }

    .cdf-navbar::after {
        right: 10px;
    }

/* Conteneur interne borné */
.cdf-nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative; /* pour le z-index des sous-élements */
}

/* Groupes gauche/centre/droite */
.brand-group {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.cdf-nav-center {
    flex: 1 1 auto;
}

.cdf-nav-right {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Toggler */
.cdf-toggler {
    border: 1px solid #445631;
    color: #e6e6e6;
    font-size: 22px;
    line-height: 1;
    padding: .2rem .5rem;
    border-radius: 6px;
}

/* Liens */
.cdf-navbar .nav-link {
    font-family: 'BlackOpsOne',system-ui,sans-serif;
    color: #f2f2f2;
    font-size: 18px;
    padding: .45rem .75rem;
    white-space: nowrap;
}

    .cdf-navbar .nav-link.active,
    .cdf-navbar .nav-link:hover,
    .cdf-navbar .dropdown.show > .nav-link {
        color: #cfff96;
        background: rgba(255,255,255,.10);
        border-radius: 8px;
    }

/* Menu centre distribué et naturel (desktop) */
.cdf-navbar .navbar-collapse {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
}

.cdf-navbar .navbar-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: space-evenly;
    gap: clamp(.5rem,3vw,2.25rem);
}

    .cdf-navbar .navbar-nav > li.nav-item {
        flex: 0 0 auto;
    }

    .cdf-navbar .navbar-nav > li > .nav-link {
        width: auto;
        text-align: center;
    }

/* Dropdown – look militaire */
.cdf-dropdown {
    background: #10210d;
    border: 1px solid #31432a;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,.5);
    min-width: 220px;
    margin-top: .4rem;
}

    .cdf-dropdown .dropdown-item {
        color: #d6e8bf;
        font-family: 'BlackOpsOne',system-ui,sans-serif;
    }

        .cdf-dropdown .dropdown-item:hover {
            background: #244122;
            color: #cfff96;
            border-radius: 4px;
        }

/* Bouton Discord */
.btn-cdf {
    font-family: 'BlackOpsOne';
    background: #8fbf5a;
    border: 2px solid #394622;
    padding: 6px 14px;
    border-radius: 8px;
    color: #000;
}

    .btn-cdf:hover {
        background: #c7ff7c;
    }

/* ====== ÉTAT MOBILE ====== */
@media (max-width: 992px) {

    /* panneau plein écran qui COUVRE le contenu quand ouvert */
    .cdf-navbar .navbar-collapse {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--cdf-navbar-height);
        background: linear-gradient(rgba(6,10,6,.92), rgba(6,10,6,.92)), var(--cdf-camo-url);
        background-size: cover;
        background-position: center;
        padding: 16px 18px;
        overflow-y: auto;
        box-shadow: 0 8px 22px rgba(0,0,0,.65);
    }

        /* quand fermé, on cache complètement */
        .cdf-navbar .navbar-collapse.collapse:not(.show) {
            display: none;
        }

    /* menu vertical lisible */
    .cdf-navbar .navbar-nav {
        flex-direction: column;
        gap: .35rem;
        align-items: flex-start;
    }

        .cdf-navbar .navbar-nav .nav-link {
            font-size: 20px;
            padding: .65rem .5rem;
        }

    /* zone droite reste dans la barre, à DROITE */
    .cdf-nav-right {
        margin-left: auto;
    }

    /* le dropdown admin ne dépasse pas l’écran */
    .dropdown-menu-end {
        right: 0;
        left: auto;
    }
}

/* Petites finitions */
.cdf-login {
    z-index: 5000;
    pointer-events: auto;
}

.cdf-dropdown {
    z-index: 2000;
}

/* Décalage du contenu principal sous la navbar */
.main-container {
    padding-top: calc(var(--cdf-navbar-height) + 8px);
}

/* Anti scroll horizontal */
html, body {
    overflow-x: hidden;
}
/* Empêche toute marge parasite sur la barre et son conteneur */
.cdf-navbar, .cdf-nav-inner {
    margin: 0 !important;
}
    /* Collapse fermé = vraiment invisible sans hauteur */
