@charset "UTF-8";

.header {
    width: 100%;
}

.nav {
    position: fixed; /* IMPORTANT */
    top: 0;
    left: 0;
    width: 100%;

    background: #fff;
    color: #0b1220;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);

    /* IMPORTANT: stabilise layout */
    height: 72px;

    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* état shadow (scroll up / interaction) */
.nav.nav--shadow {
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* léger effet de profondeur plus premium */
.nav.nav--shadow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/*.nav__container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}*/

.nav__container {
    position: relative;
    width: 100%;
    max-width: 100%;
    /*max-width: 1300px;*/
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px 24px;
    /* espace global contrôlé */
    gap: 32px;
}

/* LOGO */
.logo {
    margin-right: 20px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 40px;      /* taille desktop */
    width: auto;       /* garde les proportions */
    max-width: 180px;  /* sécurité */
}

/* MENU */

.nav__menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;

    /* important : force gauche */
    flex: 1;
    justify-content: flex-start;
    align-items: center;
}

/* ITEMS */

.nav__item {
    position: relative;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.85;
    transition: 0.25s;
}

a.nav__item,
.nav__item span {
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
}

.nav__item:hover {
    opacity: 1;
}


.nav__label {
    position: relative;
    cursor: pointer;
    color: #333466;

    font-size: clamp(12px, .9vw, 16px)!important;
}

.nav__label::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;

    width: 0%;
    height: 2px;

    background: currentColor;

    transition: 0.25s ease;
    opacity: 0.6;
}

.nav__item:hover .nav__label::after {
    width: 100%;
    color: #CD1719;
}

.mega {
    position: fixed;

    min-width: 280px;
    max-width: 1100px;
    width: max-content;

    background: #fff;
    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 14px;

    box-shadow: 0 30px 80px rgba(0,0,0,0.12);

    padding: 22px;

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);
    transition: 0.2s ease;

}


.mega a {
    position: relative;
    display: inline-block;

    text-decoration: none;
    color: inherit;
}

/* underline animé */
.mega a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;
    background: currentColor;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.25s ease;

    opacity: 0.6;
}

.mega a:hover::after {
    transform: scaleX(1);
}

.mega a:hover,
.mega a:hover::after {
    opacity: 1;
    color: #CD1719!important;
}


.nav__item:hover .mega,
.mega:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

    /* 🔥 permet de traverser le gap sans perdre hover */
    pointer-events: auto;
}

.nav__item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 12px;
}

/* show state */
.has-mega:hover .mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* GRID */
.mega__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* TITLES */
.mega__col h4 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(11,18,32,0.6);
    margin-bottom: 10px;
}

.mega__grid h4 > a {
    font-size: 18px!important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

/* LINKS */
.mega__col a {
    display: block;
    padding: 8px 0;

    font-size: 13px;
    color: #0b1220;
    text-decoration: none;
    text-transform: uppercase;

    opacity: 0.85;

    transition: 0.2s ease;
}

.mega__grid .material-symbols-outlined,
.mega__col .material-symbols-outlined {
    color: #CD1719;
    font-size: 20px!important;
    margin-right: 2px;
}

.mega__col a:hover {
    opacity: 1;
    transform: translateX(6px);
    color: #1d4ed8; /* accent académique bleu */
}

/* small variant */
.mega.small {
    width: 320px;
    left: 50%;
    transform: translateY(10px);
}


/* =========================
   Z-INDEX CLEAN SYSTEM
   ========================= */

.nav {
    z-index: 2000;
}

.mega {
    z-index: 1100;
}

.menu-overlay {
    z-index: 1100;
}

.mobile-menu {
    z-index: 2100;
}

.burger {
    z-index: 2101;
}


.burger {
    display: none;

    position: absolute;

    /* 👉 ALIGNÉ SUR HAUTEUR DU LOGO */
    top: 50%;
    transform: translateY(-50%);

    /* 👉 collé à droite du header */
    right: 24px;

    width: 48px;
    height: 48px;

    border: none;
    background: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.burger span {
    position: absolute;
    left: 12px;
    width: 24px;
    height: 2px;
    background: #111;
    transition: .3s;
}

.burger span:nth-child(1) { transform: translateY(-8px); }
.burger span:nth-child(2) { transform: translateY(0); }
.burger span:nth-child(3) { transform: translateY(8px); }

/* burger animation */
.burger.active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* OVERLAY */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);

    opacity: 0;
    visibility: hidden;
    transition: .3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* MOBILE MENU */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;

    width: min(420px, 92vw);
    height: 100dvh;

    background: #fff;
    overflow-y: auto;

    padding: 100px 30px 120px;

    transition: .35s ease;
}

.mobile-menu.active {
    right: 0;
}


/* lien simple */
.mobile-link {
    display: block;
    padding: 14px 0;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    color: #333466;
}

.mobile-link:hover {
    color: #CD1719;
    text-decoration: none;
}


/* LEVEL 1 GROUP */
.mobile-group {
    border-bottom: 1px solid #eee;
}

/* BUTTON */
.mobile-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 0;
    background: none;
    border: none;
    cursor: pointer;

    font-size: 15px;

    color: #333466;
}

/* INDICATOR */
.indicator {
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.7;
}

/* rotation active */
.mobile-toggle.active .indicator {
    transform: rotate(180deg) scale(1.15);
    opacity: 1;
    color: #CD1719;
}

/* LEVEL 2 */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    transition: max-height 0.35s ease;
    padding-left: 12px;
}

/* open state */
.mobile-group.open > .mobile-submenu {
    max-height: 600px;
}

/* LEVEL 2 indentation */
.mobile-group.sub {
    margin-left: 10px;
    /*border-left: 1px solid #eee;*/
    padding-left: 10px;
}

/* LEVEL 3 */
.sub-submenu {
    padding-left: 12px;
    /*border-left: 1px dashed #ddd;*/
}

/* LINKS */
.mobile-submenu a {
    padding: 10px 0;
    text-decoration: none;
    color: #333466;
    font-size: 14px;
    opacity: 0.85;
}

.mobile-submenu a:hover {
    opacity: 1;
    color: #CD1719;
}

/* RESPONSIVE RULE */
@media (max-width: 1290px) {

    .nav__menu {
        display: none !important;
    }

    .burger {
        display: flex;
    }

}

@media (min-width: 1291px) {

    .burger,
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }

}


.nav__actions {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-left: auto;   /* clé finale */
    flex-shrink: 0;
}

.nav__lang {
    font-size: 1.25rem!important;
    font-weight: 600!important;
    letter-spacing: .05em!important;
    text-transform: uppercase!important;
}

.lang-option{
    display:flex;
    align-items:center;
    gap:.6rem;
}

.check{
    font-size:18px;
    opacity:0;
    transition:.2s;
}

.lang-option.active .check{
    opacity:1;
}

.lang-option.active {
    font-weight: 600;
    color: #CD1719;
}


.nav__icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    transition: 0.2s ease;

    color: #333466;
}

.nav__icon:hover {
    background: rgba(255,255,255,0.08);
}

.nav__icon .material-symbols-outlined {
    font-size: 28px!important;
}

.avatar {
    width: 72px;
    height: 72px;

    border-radius: 50%;
    overflow: hidden;

    border: 3px solid #CD1719;

    margin-right: 15px;

    background-color: #fff;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.menu__perso {
    border-left: 1px solid red;
    border-bottom: 1px solid red;
    padding-left: 15px;
    padding-top: 15px;
    margin-top: -20px;
    margin-left: 33px;
}

.menu__perso_identification {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}


/* =========================
   FORM SEARCH
   ========================= */
.search-box{
    display:flex;
    align-items:center;

    width:50vw;
    min-width:220px;
    max-width:600px;
    height:64px;
    border-radius:32px;
    font-size:18px;

    background:#fff;
    border:1px solid #ddd;
    border-radius:35px;

    overflow:hidden;

    box-shadow:0 8px 20px rgba(0,0,0,.12);
    transition:.3s;
}

.search-box input{
    flex:1;
    height:100%;

    padding:0 24px;

    border:none;
    outline:none;

    background:transparent;
    color:#222;

    font-size:17px;
}

.search-box input::placeholder{
    color:#999;
}

.search-box button{
    width:64px;
    height:100%;

    border:none;
    border-left:1px solid #eee;

    background:#fff;

    display:flex;
    justify-content:center;
    align-items:center;

    cursor:pointer;
    transition:.25s;
}

.search-box button:hover{
    background:#323266;
}

.search-box .material-symbols-outlined{
    font-size:28px!important;
    color:#323266;
    transition:.25s;
}

.search-box button:hover .material-symbols-outlined{
    color:#fff;
}

