/**
 * HEADER PREMIUM - RAUCIMS & PARTNERS
 * Fichier CSS dédié exclusivement au header
 * Charte : Orange principal / Bleu marine secondaire / Blanc & Noir
 * Style : Corporate Premium - Moderne & Élégant
 */

/* ========================================================================
   VARIABLES & RESET HEADER
   ======================================================================== */

:root {
    --raucims-orange: #FF6B35;
    --raucims-orange-hover: #FF8555;
    --raucims-orange-dark: #E65A2E;
    --raucims-blue-marine: #1A2E4A;
    --raucims-blue-dark: #0F1A2E;
    --raucims-blue-light: #2C4A6F;
    --raucims-white: #FFFFFF;
    --raucims-black: #0A0A0A;
    --raucims-gray-light: #F8F9FA;
    --raucims-gray-medium: #E0E4E8;
    --raucims-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container header indépendant */
.boxed-header {
    position: relative;
    z-index: 9999;
    background: var(--raucims-white);
    box-shadow: 0 2px 12px rgba(26, 46, 74, 0.08);
}

/* ========================================================================
   TOP BAR - Barre supérieure contacts + réseaux sociaux
   ======================================================================== */

.boxed-header .top {
    background: linear-gradient(135deg, var(--raucims-blue-marine) 0%, var(--raucims-blue-dark) 100%);
    padding: 12px 0;
    border-bottom: 2px solid var(--raucims-orange);
    transition: var(--raucims-transition);
}

/* Informations de contact */
.boxed-header .flat-information {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.boxed-header .flat-information li {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.boxed-header .flat-information li i {
    color: var(--raucims-orange);
    margin-right: 10px;
    font-size: 16px;
    transition: var(--raucims-transition);
}

.boxed-header .flat-information li a {
    color: var(--raucims-white);
    text-decoration: none;
    transition: var(--raucims-transition);
    /* font-family définie dans typography.css */
}

.boxed-header .flat-information li a:hover {
    color: var(--raucims-orange);
    transform: translateX(2px);
}

.boxed-header .flat-information li:hover i {
    transform: scale(1.15);
    color: var(--raucims-orange-hover);
}

/* Réseaux sociaux top bar */
.boxed-header .social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.boxed-header .social-links li {
    margin: 0;
}

.boxed-header .social-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    color: var(--raucims-white);
    font-size: 15px;
    text-decoration: none;
    transition: var(--raucims-transition);
    backdrop-filter: blur(10px);
}

.boxed-header .social-links li a:hover {
    background: var(--raucims-orange);
    border-color: var(--raucims-orange);
    color: var(--raucims-white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* ========================================================================
   HEADER PRINCIPAL - Logo + Navigation
   ======================================================================== */

.flat-header-wrap {
    position: relative;
    background: var(--raucims-white);
}

.boxed-header #header {
    padding: 14px 0;
    background: var(--raucims-white);
    box-shadow: none;
    border-bottom: 1px solid var(--raucims-gray-medium);
    transition: var(--raucims-transition);
}

.boxed-header #header .row {
    align-items: center;
}

.boxed-header .flat-wrap-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.boxed-header .nav-wrap {
    display: flex;
    align-items: center;
    width: 100%;
}

/* ========================================================================
   LOGO
   ======================================================================== */

.boxed-header #logo {
    display: flex;
    align-items: center;
    padding: 0;
}

.boxed-header #logo a {
    display: inline-block;
    transition: var(--raucims-transition);
}

.boxed-header #logo img {
    max-height: 50px;
    width: auto;
    transition: var(--raucims-transition);
    filter: drop-shadow(0 2px 8px rgba(26, 46, 74, 0.12));
}

.boxed-header #logo a:hover img {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 12px rgba(255, 107, 53, 0.25));
}

/* ========================================================================
   MENU PRINCIPAL - Navigation
   ======================================================================== */

.boxed-header #mainnav {
    display: flex;
    align-items: center;
    flex: 1;
}

.boxed-header #mainnav .menu {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.boxed-header #mainnav .menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.boxed-header #mainnav .menu > li > a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--raucims-blue-marine);
    font-size: 14px;
    font-weight: 600;
    /* font-family définie dans typography.css (Poppins pour navigation) */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--raucims-transition);
    position: relative;
    border-radius: 6px;
}

/* Effet underline premium */
.boxed-header #mainnav .menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--raucims-orange);
    transition: var(--raucims-transition);
    border-radius: 2px;
}

.boxed-header #mainnav .menu > li > a:hover {
    color: var(--raucims-orange);
    background: rgba(255, 107, 53, 0.05);
}

.boxed-header #mainnav .menu > li > a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* État actif (page courante) */
.boxed-header #mainnav .menu > li.active > a {
    color: var(--raucims-white);
    background: linear-gradient(135deg, var(--raucims-orange) 0%, var(--raucims-orange-dark) 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.boxed-header #mainnav .menu > li.active > a::after {
    display: none;
}

/* Sous-menu (dropdown) */
.boxed-header #mainnav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--raucims-white);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(26, 46, 74, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--raucims-transition);
    padding: 12px 0;
    margin-top: 8px;
    border-top: 3px solid var(--raucims-orange);
    z-index: 1000;
}

.boxed-header #mainnav .menu > li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.boxed-header #mainnav .submenu li {
    margin: 0;
    padding: 0;
}

.boxed-header #mainnav .submenu li a {
    display: block;
    padding: 12px 24px;
    color: var(--raucims-blue-marine);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--raucims-transition);
    border-left: 3px solid transparent;
}

.boxed-header #mainnav .submenu li a:hover {
    color: var(--raucims-orange);
    background: var(--raucims-gray-light);
    border-left-color: var(--raucims-orange);
    padding-left: 28px;
}

/* ========================================================================
   BARRE DE RECHERCHE
   ======================================================================== */

.boxed-header .menu-extra {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-left: 18px;
}

.boxed-header .top-search {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--raucims-white);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(26, 46, 74, 0.15);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--raucims-transition);
    z-index: 1001;
    border-top: 3px solid var(--raucims-orange);
    margin-top: 8px;
}

.boxed-header .top-search.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.boxed-header .top-search input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--raucims-gray-medium);
    border-radius: 6px;
    font-size: 14px;
    color: var(--raucims-blue-marine);
    transition: var(--raucims-transition);
    /* font-family définie dans typography.css (Roboto pour inputs) */
}

.boxed-header .top-search input[type="text"]:focus {
    outline: none;
    border-color: var(--raucims-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.boxed-header .top-search input[type="submit"] {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--raucims-orange);
    border: none;
    border-radius: 6px;
    color: var(--raucims-white);
    cursor: pointer;
    transition: var(--raucims-transition);
}

.boxed-header .top-search input[type="submit"]:hover {
    background: var(--raucims-orange-dark);
    transform: translateY(-50%) scale(1.05);
}

/* Icône de recherche - Placée après le menu CONTACT */
.boxed-header .show-search {
    position: relative;
}

.boxed-header .show-search a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid var(--raucims-orange);
    border-radius: 8px;
    color: var(--raucims-orange);
    font-size: 15px;
    text-decoration: none;
    transition: var(--raucims-transition);
}

.boxed-header .show-search a:hover {
    background: var(--raucims-orange);
    color: var(--raucims-white);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ========================================================================
   BOUTON MENU MOBILE
   ======================================================================== */

.boxed-header .btn-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 42px;
    height: 42px;
    background: var(--raucims-orange);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--raucims-transition);
    padding: 12px;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.boxed-header .btn-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--raucims-white);
    border-radius: 2px;
    transition: var(--raucims-transition);
}

.boxed-header .btn-menu span:nth-child(2) {
    width: 75%;
}

.boxed-header .btn-menu span:nth-child(3) {
    width: 50%;
}

.boxed-header .btn-menu:hover {
    background: var(--raucims-orange-dark);
    transform: scale(1.05);
}

.boxed-header .btn-menu:hover span {
    width: 100%;
}

/* ========================================================================
   HEADER STICKY (au scroll)
   ======================================================================== */

body.header_sticky .boxed-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(26, 46, 74, 0.12);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.header_sticky .boxed-header.sticky .top {
    display: none;
}

body.header_sticky .boxed-header.sticky #header {
    padding: 10px 0;
}

body.header_sticky .boxed-header.sticky #logo img {
    max-height: 42px;
}

body.header_sticky .boxed-header.sticky #mainnav .menu > li > a {
    padding: 8px 14px;
    font-size: 13px;
}

body.header_sticky .boxed-header.sticky .show-search a {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

/* ========================================================================
   RESPONSIVE - TABLETTE (max-width: 991px)
   ======================================================================== */

@media (max-width: 991px) {
    .boxed-header .top {
        padding: 10px 0;
    }

    .boxed-header .flat-information {
        gap: 16px;
    }

    .boxed-header .flat-information li {
        font-size: 13px;
    }

    .boxed-header .social-links li a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .boxed-header #header {
        padding: 12px 0;
    }

    .boxed-header #logo img {
        max-height: 45px;
    }

    .boxed-header #mainnav .menu > li > a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .boxed-header .menu-extra {
        margin-left: 12px;
    }

    .boxed-header .show-search a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .boxed-header .btn-menu {
        display: flex;
        margin-left: 8px;
    }

    /* Menu mobile - à implémenter selon vos besoins */
}

/* ========================================================================
   RESPONSIVE - MOBILE (max-width: 767px)
   ======================================================================== */

@media (max-width: 767px) {
    .boxed-header .top {
        padding: 8px 0;
    }

    .boxed-header .flat-information {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .boxed-header .flat-information li {
        font-size: 12px;
    }

    .boxed-header .social-links {
        gap: 8px;
    }

    .boxed-header .social-links li a {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .boxed-header #header {
        padding: 10px 0;
    }

    .boxed-header #logo img {
        max-height: 40px;
    }

    .boxed-header .reponsive-none {
        display: none !important;
    }

    .boxed-header #mainnav {
        display: none;
    }

    .boxed-header .menu-extra {
        margin-left: auto;
        margin-right: 8px;
    }

    .boxed-header .show-search a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .boxed-header .top-search {
        width: 280px;
    }
}

/* ========================================================================
   RESPONSIVE - PETIT MOBILE (max-width: 480px)
   ======================================================================== */

@media (max-width: 480px) {
    .boxed-header .top {
        text-align: center;
    }

    .boxed-header .flat-information {
        width: 100%;
    }

    .boxed-header .social-links {
        justify-content: center;
        margin-top: 8px;
    }

    .boxed-header #logo img {
        max-height: 36px;
    }

    .boxed-header .show-search a {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .boxed-header .top-search {
        width: 100%;
        right: 0;
        left: 0;
        border-radius: 0 0 8px 8px;
    }

    .boxed-header .btn-menu {
        width: 38px;
        height: 38px;
    }
}

/* ========================================================================
   AMÉLIORATIONS ACCESSIBILITÉ
   ======================================================================== */

.boxed-header a:focus-visible {
    outline: 3px solid var(--raucims-orange);
    outline-offset: 2px;
    border-radius: 4px;
}

.boxed-header button:focus-visible {
    outline: 3px solid var(--raucims-orange);
    outline-offset: 2px;
}

/* Réduction des animations pour préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    .boxed-header *,
    .boxed-header *::before,
    .boxed-header *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
