/**
 * Styles du Menu Oliquide V2
 * Externalisé pour optimisation des performances (Cache & TTFB)
 */

/* ============================================================
   1. VARIABLES ET RESET
   ============================================================ */
.BgColor5 { background-color: #383f43; }
.tooltip { z-index: 10000 !important; }

/* ============================================================
   2. LAYOUT GLOBAL & NAVBAR
   ============================================================ */
.navbar { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); }
.nav-link { transition: color 0.2s; }
.nav-link:hover { color: #dc3545; }
.nav-link-responsive { color: #333 !important; }

/* ============================================================
   3. MEGA MENU DESKTOP
   ============================================================ */
.mega-menu { background: none; box-shadow: none; }
#primary-menu { max-height: 75vh; }
.menu-heading {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: block;
    letter-spacing: 0.5px;
}
@media (min-width: 992px) {
    .mega-menu {
        margin-top: 0;
        border-top: 3px solid #dc3545;
        border-radius: 0 0 8px 8px;
        padding: 30px;
    }
}
@media (min-width: 1200px) {
    .dropdown-menu > div > .row {
        max-width: 90% !important;
        width: 1200px;
        margin: 0 auto;
    }
}

/* ============================================================
   4. ÉLÉMENTS ILLUSTRÉS (PROFILS & TYPES)
   ============================================================ */
.menu-item-illustrated {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    transition: transform 0.2s;
}
.menu-item-illustrated:hover {
    transform: translateY(-5px);
    color: #dc3545;
}
.menu-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background-color: transparent;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease, border-radius 0.3s ease;
}
.menu-icon-wrapper img {
    width: auto;
    max-width: 120%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.menu-item-illustrated:hover .menu-icon-wrapper {
    border-radius: 45% 55% 70% 30% / 45% 55% 60% 40%;
}
.menu-item-illustrated:hover .menu-icon-wrapper img {
    transform: translateY(-8px) scale(1.05);
}
.menu-icon-tall {
    height: 90px;
    width: 90px;
    object-fit: contain;
}
.menu-label {
    font-size: 0.85rem;
    text-align: center;
}

/* ============================================================
   5. LIENS & TEXTES
   ============================================================ */
.menu-link-hover { transition: all 0.2s ease; }
.menu-link-hover:hover {
    color: #dc3545 !important;
    transform: translateX(5px);
}

/* ============================================================
   6. GRILLE DE MARQUES
   ============================================================ */
.badge { --bs-badge-padding-x: 0.5em; }
.brands-nav .badge { --bs-badge-padding-x: 0.5em; }
.hover-bg-primary:hover {
    background-color: #0d6efd !important;
    color: white !important;
    cursor: pointer;
}
.brands-grid-container {
    height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 10px;
    width: 100%;
    padding: 5px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    position: relative;
    mask-image: linear-gradient(to bottom, black calc(100% - 30px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 30px), transparent 100%);
}
.brands-grid-container::-webkit-scrollbar { height: 6px; }
.brands-grid-container::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.brands-grid-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.brands-grid-container::-webkit-scrollbar-thumb:hover { background: #aaa; }
.brands-invite {
    font-size: 0.8rem;
    animation: bounce 2s infinite, opacity 450ms ease-in-out;
    pointer-events: none;
    width: 100%;
    opacity: 0.8;
}
@keyframes bounce {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(0) translateY(5px); }
}
.brands-grid-container:hover ~ .brands-invite,
.brands-grid-container.scrolled ~ .brands-invite {
    opacity: 0.1;
    transition: opacity 0.3s ease;
}
.logo-item {
    display: block;
    width: 120px;
    height: 60px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.logo-item:hover {
    border-color: #dc3545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}
.brand-item.logo-item:last-child { margin-right: auto; }
.brand-item.letter-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 900;
    font-size: 1.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: default;
}
.fallback-name { display: none; }

/* ============================================================
   7. RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 991px) {
    #navbarMain { width: 100vw; }
    .nav-item { font-size: 1.5rem !important; }
    .menu-item-illustrated {
        flex-direction: row;
        align-items: center;
        margin-bottom: 0;
    }
    .menu-icon-wrapper,
    .menu-icon-tall {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        margin-right: 15px;
        padding: 0;
        background: none !important;
        border-radius: 0;
        display: block;
    }
    .menu-icon-wrapper img {
        max-height: 100%;
        max-width: 100%;
        height: 100%;
        width: 100%;
        transform: none !important;
        object-fit: contain;
    }
    .menu-label {
        font-size: 1.25rem;
        text-transform: none;
        text-align: left;
    }
    .root-icon-wrapper { width: 50px; height: 50px; }
    .root-menu-icon { width: 50px; height: 50px; object-fit: contain; }
    #help { background-color: rgba(var(--bs-light-rgb)) !important; }
    .imgHelp img { position: initial !important; }
    .button_container.end a {
        font-weight: 700;
        font-style: italic;
        font-size: 1.2rem;
    }
    .d-flex.d-lg-none .align-items-center { white-space: nowrap; }
    .d-flex.d-lg-none img[alt="Top 3"] { filter: drop-shadow(0px 0px 4px rgba(255, 215, 0, 0.3)); }
}

/* ============================================================
   8. MEDIA QUERIES SPÉCIFIQUES
   ============================================================ */
@media (min-width: 992px) {
    .nav-link-responsive { color: white !important; }
    .imgHelp { margin-left: -4rem; }
    .imgHelp img {
        max-height: 110%;
        width: auto;
        max-width: none !important;
        margin-left: -1rem;
        min-height: 100%;
    }
    .help-bg { background-image: none !important; }
}

@media (min-width: 992px) and (max-width: 1400px) {
    .brands-grid-container { height: 19vh; }
    .menu-icon-wrapper, .menu-icon-tall { width: 60px; height: 60px; }
    .menu-heading { font-size: 1.1rem; }
    h4, .h4 { font-size: calc(1.2rem + 0.1vw); }
    .imgHelp { margin-left: -10rem; }
}

@media (max-height: 900px){
    #primary-menu {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
}

.menu-icon-wrapper.round {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.menu-icon-tall { max-width: 60%; max-height: 60%; }
.award-centered-link {
    transition: transform 0.3s ease;
    display: block;
    line-height: 0;
}
.award-centered-link:hover { transform: scale(1.1); filter: brightness(1.2); }
.logo { min-width: fit-content; }