/* ── Header sticky — toutes les pages ── */

.wp-block-template-part[class*="header"],
header.wp-block-template-part {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var( --wp--preset--color--background, #fff );
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

/* Box-shadow au scroll — toutes les pages */

.wp-block-template-part[class*="header"].is-scrolled,
header.wp-block-template-part.is-scrolled {
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

/* ── Header fixe transparent — modèle header transparent ── */

.page-template-page-header-transparent .wp-block-template-part[class*="header"],
.page-template-page-header-transparent header.wp-block-template-part {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent !important;
    box-shadow: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* État opaque au scroll */

.page-template-page-header-transparent .wp-block-template-part[class*="header"].is-scrolled,
.page-template-page-header-transparent header.wp-block-template-part.is-scrolled {
    background-color: var( --wp--preset--color--background, #fff ) !important;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

/* ── Barre d'administration ── */

.admin-bar .wp-block-template-part[class*="header"],
.admin-bar header.wp-block-template-part {
    top: 32px;
}

@media screen and ( max-width: 782px ) {
    .admin-bar .wp-block-template-part[class*="header"],
    .admin-bar header.wp-block-template-part {
        top: 46px;
    }
}

/* ── Compense la hauteur du header fixe sur le contenu ── */

.page-template-page-header-transparent .wp-site-blocks > :first-child {
    margin-top: 0 !important;
}