/* En-tête du site (composants/entete.php) : barre d'infos indigo + barre principale blanche collante.
   Les sélecteurs sont préfixés par .en-header pour ne pas hériter des règles "header nav ul li a"
   des anciennes feuilles (main.css, main_admin.css). */
.en-header {
    --en-indigo-900: #16123a;
    --en-indigo-600: #3b2f8f;
    --en-bleu-500: #1f6fd6;
    --en-marron-500: #9a6434;
    --en-marron-300: #d9a877;
    --en-texte: #2b2750;
    --en-haut: 40px;

    position: sticky;
    top: calc(-1 * var(--en-haut)); /* la barre d'infos défile, la barre principale reste collée */
    z-index: 1000;
    display: block;
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: 'Open Sans', 'Roboto', sans-serif;
}

.en-header *,
.en-header *::before,
.en-header *::after {
    box-sizing: border-box;
}

.en-header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.en-header a {
    text-decoration: none;
}

.en-conteneur {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Barre d'infos ---------- */
.en-barre-haut {
    height: var(--en-haut);
    background: linear-gradient(90deg, var(--en-indigo-900), #221c55);
    color: #cfcbe8;
    font-size: 13px;
}

.en-slogan {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--en-marron-300);
    font-weight: 600;
    letter-spacing: .5px;
}

.en-coordonnees {
    display: flex;
    align-items: center;
    gap: 22px;
}

.en-header .en-coordonnees a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #cfcbe8;
    transition: color .2s;
}

.en-header .en-coordonnees a:hover {
    color: #fff;
}

.en-coordonnees i {
    font-size: 16px;
}

.en-reseaux {
    display: flex;
    gap: 12px;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, .15);
}

/* ---------- Barre principale ---------- */
.en-barre-principale {
    height: 76px;
    border-bottom: 1px solid #eeecf6;
    background: #fff;
    transition: box-shadow .3s, height .3s;
}

.en-defile .en-barre-principale {
    height: 66px;
    box-shadow: 0 8px 24px rgba(22, 18, 58, .10);
}

.en-header .en-logo {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    color: var(--en-indigo-900);
}

.en-logo img {
    display: block;
    width: auto;
    height: 58px;
    transition: height .3s;
}

.en-defile .en-logo img {
    height: 50px;
}

.en-logo span {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
}

.en-logo b {
    color: var(--en-marron-500);
    font-weight: 800;
}

.en-logo .mention-legale {
    font-size: .45em;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    vertical-align: middle;
    opacity: .85;
}

.en-logo .en-logo-activite {
    display: block;
    font-size: .5em;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--en-marron-500);
}

/* Navigation (ordinateur) */
.en-header .en-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    background: none;
}

.en-header .en-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
}

.en-header .en-nav li {
    margin: 0;
}

.en-header .en-lien {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--en-texte);
    font-size: 15px;
    font-weight: 600;
    transition: color .2s, background-color .2s;
}

.en-header .en-lien i {
    display: none;
}

.en-header .en-lien:hover {
    background: #f3f1fb;
    color: var(--en-indigo-600);
}

/* Soulignement marron sous la page courante */
.en-header .en-lien.en-actif {
    color: var(--en-indigo-600);
}

.en-header .en-lien.en-actif::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 3px;
    border-radius: 2px;
    background: var(--en-marron-500);
}

.en-header .en-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--en-indigo-600), var(--en-bleu-500));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(31, 111, 214, .28);
    transition: transform .2s, box-shadow .2s;
}

.en-header .en-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(31, 111, 214, .38);
}

.en-header .en-cta i {
    font-size: 19px;
}

.en-header a:focus-visible,
.en-header button:focus-visible {
    outline: 3px solid var(--en-bleu-500);
    outline-offset: 2px;
}

/* Éléments réservés au menu mobile */
.en-nav-entete,
.en-header .en-nav-tel,
.en-burger,
.en-voile {
    display: none;
}

/* ---------- Tablette et mobile : menu latéral ---------- */
@media (max-width: 992px) {
    .en-barre-principale {
        height: 68px;
    }

    .en-logo img {
        height: 50px;
    }

    .en-burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        padding: 0 11px;
        border: 1px solid #e3e0f2;
        border-radius: 12px;
        background: #fff;
        cursor: pointer;
    }

    .en-burger span {
        display: block;
        height: 2.5px;
        border-radius: 2px;
        background: var(--en-indigo-900);
    }

    .en-burger span:nth-child(2) {
        width: 70%;
        background: var(--en-marron-500);
    }

    .en-header .en-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1002;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        width: min(330px, 86vw);
        padding: 20px;
        overflow-y: auto;
        background: #fff;
        box-shadow: -20px 0 50px rgba(22, 18, 58, .25);
        transform: translateX(105%);
        transition: transform .35s ease;
    }

    .en-header .en-nav.en-ouvert {
        transform: none;
    }

    .en-nav-entete {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        border-bottom: 1px solid #eeecf6;
        color: var(--en-indigo-900);
        font-size: 18px;
        font-weight: 800;
    }

    .en-fermer {
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 10px;
        background: #f3f1fb;
        color: var(--en-indigo-900);
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
    }

    .en-header .en-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .en-header .en-lien {
        display: flex;
        padding: 13px 14px;
        font-size: 16px;
    }

    .en-header .en-lien i {
        display: inline;
        color: var(--en-marron-500);
        font-size: 20px;
    }

    .en-header .en-lien.en-actif {
        background: #f3f1fb;
    }

    .en-header .en-lien.en-actif::after {
        top: 10px;
        bottom: 10px;
        left: 0;
        right: auto;
        width: 3px;
        height: auto;
    }

    .en-header .en-cta {
        justify-content: center;
        padding: 14px;
    }

    .en-header .en-nav-tel {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px;
        border: 2px solid var(--en-marron-500);
        border-radius: 12px;
        color: var(--en-marron-500);
        font-weight: 700;
    }

    .en-voile:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(22, 18, 58, .5);
    }

    body.en-menu-ouvert {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .en-slogan {
        display: none;
    }

    .en-barre-haut .en-conteneur {
        justify-content: center;
    }

    /* L'email est long : sur petit écran on garde le téléphone et les réseaux */
    .en-header .en-coordonnees a[href^="mailto:"] {
        display: none;
    }
}

@media (max-width: 400px) {
    .en-logo span {
        display: none;
    }
}
