/**
 * FEPRAFO — Header (style premium cohérent)
 *
 * Préfixes : .feprafo-header / .feprafo-header__XXX
 */

/* ================================================================== *
 *  CONTAINER HEADER
 * ================================================================== */
.feprafo-header {
    background: white;
    border-bottom: 1px solid #eef2f7;
    position: relative;
    z-index: 100;
    width: 100%;
}

.feprafo-header__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;              /* resserré (était 32px) */
}

/* ================================================================== *
 *  LOGO
 * ================================================================== */
.feprafo-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    flex: 0 0 auto;
}
.feprafo-header__logo:hover { text-decoration: none !important; }

.feprafo-header__logo img {
    max-height: 44px;
    width: auto;
    display: block;
}

.feprafo-header__logo-text {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: var(--fep-gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #2C5F8D;
}

/* ================================================================== *
 *  MENU CENTRAL
 * ================================================================== */
.feprafo-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.feprafo-header__menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 0;                 /* resserré : 8 libellés complets à caser */
    flex-wrap: nowrap;
}

.feprafo-header__menu-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.feprafo-header__menu-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 11px;      /* resserré */
    color: #4b5563 !important;
    font-size: 13.5px;      /* resserré */
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all .2s ease;
    white-space: nowrap;
}
.feprafo-header__menu-link:hover {
    color: #2C5F8D !important;
    background: #f1f5f9;
    text-decoration: none !important;
}

/* ================================================================== *
 *  ACTIONS DROITE
 * ================================================================== */
.feprafo-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Bouton "Espace membre" */
.feprafo-header__btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 22px;
    background: var(--fep-gradient-green);
    color: white !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 10px;
    box-shadow: var(--fep-shadow-green);
    transition: all .2s ease;
}
.feprafo-header__btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--fep-shadow-green-hover);
    color: white !important;
    text-decoration: none !important;
}

/* ================================================================== *
 *  ★ DROPDOWN UTILISATEUR — DESIGN PREMIUM ÉPURÉ
 * ================================================================== */
.feprafo-header__user {
    position: relative;
}

/* Trigger : fond blanc + bordure fine, très épuré */
/* !important nécessaire pour override Elementor Kit qui applique un bg bleu sur tous les <button> */
.feprafo-header__user-trigger,
.feprafo-header .feprafo-header__user-trigger,
.elementor .feprafo-header__user-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 6px !important;
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    border: 1.5px solid #eef2f7 !important;
    border-radius: 100px !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    font-family: inherit !important;
    color: #1c1e21 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
.feprafo-header__user-trigger:hover,
.feprafo-header .feprafo-header__user-trigger:hover,
.elementor .feprafo-header__user-trigger:hover {
    background: white !important;
    background-color: white !important;
    border-color: #4A8BC2 !important;
    box-shadow: 0 4px 14px rgba(74,139,194,.18) !important;
    transform: translateY(-1px) !important;
}

/* Avatar rond bleu avec initiale blanche */
.feprafo-header__user-avatar {
    width: 34px;
    height: 34px;
    background: var(--fep-gradient-blue, linear-gradient(135deg, #4A8BC2, #2C5F8D));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex: 0 0 auto;
    letter-spacing: 0;
    box-shadow: 0 2px 6px rgba(74,139,194,.25);
}

/* Nom d'utilisateur : MASQUÉ en permanence (demande : accès profil = avatar
   seul, sans le prénom, pour alléger le header). Le prénom reste dans le
   dropdown ouvert. */
.feprafo-header__user-name {
    display: none !important;
}

/* Chevron gris fin */
.feprafo-header__user-chevron {
    color: #94a3b8;
    transition: transform .2s ease;
    flex: 0 0 auto;
    margin-left: 2px;
}
.feprafo-header__user.is-open .feprafo-header__user-chevron {
    transform: rotate(180deg);
    color: #4A8BC2;
}

/* Le dropdown : plus large et plus premium */
.feprafo-header__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0,0,0,0.04);
    border: 1px solid #eef2f7;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .2s ease;
    z-index: 200;
}
.feprafo-header__user.is-open .feprafo-header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* En-tête du dropdown : identité utilisateur */
.feprafo-header__dropdown-header {
    padding: 16px 18px 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 6px;
}
.feprafo-header__dropdown-name {
    font-weight: 800;
    color: #1c1e21;
    font-size: 15px;
    letter-spacing: -0.01em;
}
.feprafo-header__dropdown-email {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
    word-break: break-word;
}
.feprafo-header__dropdown-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: #e8f0f7;
    color: #2C5F8D !important;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.feprafo-header__dropdown-link {
    display: block;
    padding: 11px 16px;
    color: #4b5563 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 10px;
    transition: all .15s ease;
}
.feprafo-header__dropdown-link:hover {
    background: #f1f5f9;
    color: #2C5F8D !important;
    text-decoration: none !important;
}
.feprafo-header__dropdown-link--logout {
    color: #ef4444 !important;
}
.feprafo-header__dropdown-link--logout:hover {
    background: #fef2f2;
    color: #b91c1c !important;
}

.feprafo-header__dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 8px;
}

/* ================================================================== *
 *  BURGER MOBILE
 * ================================================================== */
.feprafo-header__burger,
.feprafo-header .feprafo-header__burger,
.elementor .feprafo-header__burger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 36px;
    height: 36px;
    padding: 8px;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    margin-left: 8px;
    flex: 0 0 auto;
}
.feprafo-header__burger:hover,
.feprafo-header .feprafo-header__burger:hover,
.elementor .feprafo-header__burger:hover {
    background: transparent !important;
    background-color: transparent !important;
}
.feprafo-header__burger span,
.feprafo-header .feprafo-header__burger span,
.elementor .feprafo-header__burger span {
    display: block !important;
    width: 100% !important;
    height: 2.5px !important;
    background: #0F2A47 !important;   /* bleu marine : lisible sur le fond blanc du header */
    background-color: #0F2A47 !important;
    background-image: none !important;
    border-radius: 2px !important;
    transition: transform .3s ease, opacity .3s ease;
}
.feprafo-header__burger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.feprafo-header__burger.is-open span:nth-child(2) {
    opacity: 0;
}
.feprafo-header__burger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ================================================================== *
 *  MENU MOBILE — OVERLAY PLEIN ÉCRAN PREMIUM
 * ================================================================== */
/* Le panneau glisse depuis la droite et couvre l'écran. Fond blanc net,
   en-tête discret, liens généreux à chevron, zone d'actions soignée. */
.feprafo-header__mobile {
    display: block;                 /* toujours dans le flux, masqué par transform */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100%);
    background: #fff;
    border-top: none;
    padding: 0;
    z-index: 300;
    transform: translateX(105%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 60px rgba(15,42,71,.14);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.feprafo-header__mobile.is-open {
    transform: translateX(0);
}

/* Voile sombre derrière le panneau */
.feprafo-header__mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,42,71,.42);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .32s ease, visibility .32s ease;
    z-index: 299;
}
.feprafo-header__mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* En-tête du panneau : bandeau beige + bouton fermer */
.feprafo-header__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    background: #F5F1EA;
    border-bottom: 1px solid #e9e1d4;
    flex: 0 0 auto;
}
.feprafo-header__mobile-head-title {
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 800;
    color: #0F2A47;
}
.feprafo-header__mobile-close,
.elementor .feprafo-header__mobile-close {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1px solid #e9e1d4 !important;
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: #0F2A47 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all .18s ease !important;
    flex: 0 0 auto;
    box-shadow: none !important;
}
.feprafo-header__mobile-close:hover,
.elementor .feprafo-header__mobile-close:hover {
    background: #0F2A47 !important;
    background-color: #0F2A47 !important;
    color: #fff !important;
    border-color: #0F2A47 !important;
}

/* Liste des liens */
.feprafo-header__mobile-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    flex: 1 1 auto;
}
.feprafo-header__mobile-menu li {
    list-style: none !important;
    margin: 0 !important;
    border-bottom: none;
}
.feprafo-header__mobile-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    color: #16233a !important;
    font-size: 16.5px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 12px;
    transition: background .16s ease, color .16s ease;
}
.feprafo-header__mobile-menu > li > a::after {
    content: "›";
    color: #c3ccd8;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    transition: transform .16s ease, color .16s ease;
}
.feprafo-header__mobile-menu > li > a:hover {
    background: #f4f6f9;
    color: #0F2A47 !important;
}
.feprafo-header__mobile-menu > li > a:hover::after {
    transform: translateX(3px);
    color: #16C47F;
}

/* CTA connexion (visiteur) : mis en avant */
.feprafo-header__mobile-cta a,
.elementor .feprafo-header__mobile-cta a {
    background: #0F2A47 !important;
    background-color: #0F2A47 !important;
    background-image: none !important;
    color: #fff !important;
    border-radius: 12px !important;
    text-align: center;
    margin-top: 10px;
    padding: 16px !important;
    font-weight: 700 !important;
    justify-content: center !important;
}
.feprafo-header__mobile-cta a *,
.elementor .feprafo-header__mobile-cta a * {
    color: #fff !important;
}
.feprafo-header__mobile-cta a::after {
    color: rgba(255,255,255,.7) !important;
}
.feprafo-header__mobile-cta a:hover,
.elementor .feprafo-header__mobile-cta a:hover {
    background: #173D66 !important;
    background-color: #173D66 !important;
    color: #fff !important;
}
.feprafo-header__mobile-cta a:hover *,
.elementor .feprafo-header__mobile-cta a:hover * {
    color: #fff !important;
}

/* Zone actions bas de panneau : switcher de langue */
.feprafo-header__mobile-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 28px;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
    flex: 0 0 auto;
}

/* ================================================================== *
 *  RESPONSIVE
 * ================================================================== */

/* Garde-fou universel : le header ne doit JAMAIS forcer un scroll
   horizontal, quels que soient les libellés. Le menu peut se resserrer,
   mais jamais pousser le reste hors cadre. */
.feprafo-header__inner { min-width: 0; }
.feprafo-header__nav { min-width: 0; flex-shrink: 1; }
.feprafo-header__menu { flex-wrap: nowrap; }

/* --- Paliers de resserrement : on garde le menu horizontal le plus
       longtemps possible en réduisant progressivement espacement et
       taille du texte avant de basculer en burger. --- */

/* Léger resserrement juste avant la bascule burger. */
@media (max-width: 1300px) {
    .feprafo-header__inner { gap: 14px; padding: 16px 20px; }
    .feprafo-header__menu-link { padding: 8px 9px; font-size: 13px; }
}

/* --- Bascule en burger à 1260px (demande : 8 libellés complets ne
       tiennent pas confortablement au-delà). --- */
@media (max-width: 1260px) {
    .feprafo-header__nav { display: none; }
    /* Spécificité alignée sur la règle de base (.elementor …) pour
       bien rallumer le burger malgré le sélecteur dédoublé. */
    .feprafo-header__burger,
    .feprafo-header .feprafo-header__burger,
    .elementor .feprafo-header__burger { display: flex !important; }

    /* Switcher de langue + bouton Espace membre sortent de la barre du
       haut ; ils réapparaissent dans le panneau mobile premium. */
    .feprafo-header__actions > .feprafo-lang-switcher,
    .feprafo-header__actions > [class*="lang"],
    .feprafo-header__actions > .feprafo-header__btn {
        display: none !important;
    }
}

@media (max-width: 500px) {
    .feprafo-header__inner { padding: 14px 16px; gap: 10px; }
    .feprafo-header__logo img { max-height: 38px; }
    .feprafo-header__mobile { padding: 14px 16px 20px; }
}