/*
 * Vitrine_Header.css - menu mobile de l'en-tête commun aux pages vitrine (_VitrineHeader).
 *
 * Sous 1080 px, la feuille de chaque page masque les onglets (a[data-navlink]) faute de
 * place. Sans ce menu, le Journal et les Tarifs n'étaient plus atteignables depuis un
 * téléphone. Le bouton « Menu » prend alors le relais et ouvre un panneau qui reprend
 * TOUS les liens de l'en-tête, connexion et appel à l'action compris.
 *
 * Aucun site.css n'est chargé ici (Layout = null) : le filet global `[hidden]` n'existe
 * pas, d'où la règle explicite sur le panneau.
 */

.vt-menu-toggle {
    display: none;
    align-items: center;
    gap: 9px;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #1c7099;
    background: rgba(255,255,255,0.72);
    border: 1px solid #dceaf4;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px -10px rgba(13,52,82,0.22);
    transition: background .25s;
}
.vt-menu-toggle:hover { background: #eaf5fb; }
.vt-menu-toggle:focus-visible { outline: 2px solid #2388be; outline-offset: 2px; }

.vt-menu-bars {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 13px;
}
.vt-menu-bars > span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .3s cubic-bezier(.2,.9,.25,1), opacity .2s;
}
.vt-menu-toggle[aria-expanded="true"] .vt-menu-bars > span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.vt-menu-toggle[aria-expanded="true"] .vt-menu-bars > span:nth-child(2) { opacity: 0; }
.vt-menu-toggle[aria-expanded="true"] .vt-menu-bars > span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.vt-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 20px 20px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: saturate(170%) blur(16px);
    border-bottom: 1px solid #e6eef5;
    box-shadow: 0 24px 40px -24px rgba(13,52,82,0.3);
    max-height: calc(100vh - 80px);
    /* Hauteur RÉELLE de la fenêtre d'un téléphone (barre d'adresse déduite) : sans elle, le
       bas du panneau passait sous la barre du navigateur. */
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
}
.vt-menu-panel[hidden] { display: none !important; }

.vt-menu-link {
    display: block;
    padding: 13px 12px;
    border-radius: 11px;
    text-decoration: none;
    color: #48586a;
    font-weight: 500;
    font-size: 16px;
    transition: background .2s, color .2s;
}
.vt-menu-link:hover { background: #eaf5fb; color: #2388be; }
.vt-menu-link.is-active { color: #2388be; font-weight: 600; }

.vt-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid #e6eef5;
}
.vt-menu-login,
.vt-menu-cta {
    display: block;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 13px 18px;
    border-radius: 12px;
}
.vt-menu-login { color: #1c7099; background: #eaf5fb; border: 1px solid #dceaf4; }
.vt-menu-cta {
    color: #fff;
    background: linear-gradient(135deg,#2ba0d2,#1d77a8);
    box-shadow: 0 8px 18px -6px rgba(35,136,190,0.5);
}

@media (max-width:1080px) {
    .vt-menu-toggle { display: inline-flex; }
}

/* Téléphone : la connexion et l'appel à l'action passent dans le panneau, sinon
   l'en-tête déborde de l'écran. */
@media (max-width:640px) {
    .vt-header-inner { padding: 10px 16px !important; gap: 12px !important; }
    .vt-header-logo img { height: 40px !important; }
    .vt-header-actions { display: none !important; }
}

/* Au-delà de 1080 px le panneau n'a plus de raison d'être, même resté ouvert. */
@media (min-width:1081px) {
    .vt-menu-panel { display: none !important; }
}
