/*
 * En-tête commun à toutes les pages (publiques, espace porteur, back-office).
 * Tailles en px : identiques sur les pages publiques (base 14 px) et le back-office (base 16 px).
 * Classes préfixées « sh- » et sélecteurs qualifiés par header.sh-header pour résister à Bulma.
 * Référence visuelle : maquettes/menus.html.
 */
/* Pages publiques et espace porteur : en-tête fixe comme l'ancien menu, les pages gardent leur marge haute.
   Back-office (body.bo-page) : en-tête collant, dans le flux. */
header.sh-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    background: #fff; border-bottom: 1px solid #e3e6ef;
    font-family: Roboto, sans-serif;
}
body.bo-page header.sh-header { position: sticky; }
header.sh-header *, header.sh-header *::before, header.sh-header *::after { box-sizing: border-box; }
header.sh-header .sh-inner { display: flex; align-items: center; gap: 32px; width: min(1320px, calc(100% - 48px)); height: 68px; margin: 0 auto; }
header.sh-header .sh-brand { flex: none; }
header.sh-header .sh-brand img { display: block; height: 34px; width: auto; max-width: none; }
header.sh-header .sh-nav { display: flex; gap: 6px; flex: 1; }
header.sh-header .sh-nav a {
    padding: 9px 14px; border-radius: 6px; color: #424861;
    font-family: Montserrat, sans-serif; font-size: 13.76px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
header.sh-header .sh-nav a:hover { color: #24213f; background: #fafbfe; }
header.sh-header .sh-nav a.is-active { background: #f0e9fb; color: #671cc9; }
header.sh-header .sh-user { display: flex; align-items: center; gap: 12px; font-size: 13.76px; }
header.sh-header .sh-who { color: #30344d; line-height: 1.25; text-align: right; text-decoration: none; white-space: nowrap; }
header.sh-header .sh-who small { display: block; color: #68708a; }
header.sh-header .sh-avatar {
    display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
    background: #f0e9fb; color: #671cc9; font-weight: 800; text-decoration: none;
}
header.sh-header form { margin: 0; }
header.sh-header .sh-button {
    display: inline-flex; align-items: center; width: auto; min-width: 0; height: 36px; padding: 0 14px; margin: 0;
    border: 1px solid #dfe3ee; border-radius: 6px; background: #fff; color: #24213f;
    font-family: Montserrat, sans-serif; font-size: 12.8px; font-weight: 700; line-height: 1;
    text-decoration: none; white-space: nowrap; cursor: pointer;
}
header.sh-header .sh-button:hover { border-color: #cfd5e2; background: #fafbfe; }
header.sh-header .sh-button.is-primary { border-color: #671cc9; background: #671cc9; color: #fff; }
header.sh-header .sh-button.is-primary:hover { background: #5b18b4; }
header.sh-header .sh-burger {
    display: none; width: 38px; min-width: 0; height: 38px; padding: 0; border: 1px solid #e3e6ef; border-radius: 6px;
    background: #fff; color: #24213f; font-size: 17.6px; cursor: pointer;
}
header.sh-header .sh-drawer { display: none; }

/* Téléphone : visiteur et client porteur uniquement (les agents travaillent sur ordinateur). */
@media (max-width: 1100px) {
    header.sh-header.has-mobile .sh-inner { width: calc(100% - 32px); justify-content: space-between; gap: 12px; }
    header.sh-header.has-mobile .sh-nav,
    header.sh-header.has-mobile .sh-who,
    header.sh-header.has-mobile .sh-user > form,
    header.sh-header.has-mobile .sh-user > .sh-button:not(.is-primary) { display: none; }
    header.sh-header.has-mobile .sh-burger { display: block; }
    header.sh-header.has-mobile .sh-brand img { height: 28px; }
    header.sh-header.has-mobile.is-open .sh-drawer {
        display: block; padding: 8px 16px 14px; border-top: 1px solid #e3e6ef; background: #fff;
    }
    header.sh-header .sh-drawer a, header.sh-header .sh-drawer button {
        display: block; width: 100%; min-width: 0; padding: 11px 12px; border: 0; border-radius: 6px; background: none;
        color: #424861; font-family: Montserrat, sans-serif; font-size: 14px; font-weight: 700;
        text-align: left; text-decoration: none; cursor: pointer;
    }
    header.sh-header .sh-drawer a.is-active { background: #f0e9fb; color: #671cc9; }
    header.sh-header .sh-drawer hr { margin: 8px 0; border: 0; border-top: 1px solid #e3e6ef; background: none; height: 0; }
    header.sh-header .sh-drawer-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px; font-size: 14px; color: #30344d; }
    header.sh-header .sh-drawer-user small { display: block; color: #68708a; }
}
