/* ==========================================================================
   En-tete du site (reproduction du document Elementor 141).
   Cotes relevees sur l'ancien site (migration-theme/tests/elements.json) :
   bureau colonnes 15 / 70 / 15 % avec ecart de 20 px dans 1140 px ;
   tablette (768 a 1024) 33 / 15 / 33 %, recherche a la ligne ; mobile
   (767 et moins) 20 / 40 / 38 %. Comme Elementor : largeurs en pourcentage
   et retrecissement flexible, d'ou les memes cotes au dixieme de pixel.
   Boutons : au moins deux classes et toutes les proprietes redefinies
   (reset Hello et regle des boutons du kit, piege BOUTONS du CLAUDE.md).
   ========================================================================== */

.hpt-header {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF;
}

.admin-bar .hpt-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .hpt-header {
        top: 46px;
    }
}

@media (max-width: 600px) {
    .admin-bar .hpt-header {
        top: 0;
    }
}

.hpt-header .hpt-header__row {
    display: flex;
    position: relative;
}

.hpt-header .hpt-header__inner {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    gap: 20px;
}

.hpt-header .hpt-header__row--main .hpt-header__inner {
    justify-content: space-between;
}

.hpt-header .hpt-header__col {
    display: flex;
    position: relative;
    flex: 0 1 auto;
    padding: 10px;
}

/* Burger : masque au bureau (comme le conteneur Elementor). */
.hpt-header .hpt-header__col--burger {
    display: none;
    width: 15%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.hpt-header .hpt-header__burger {
    display: block;
    align-self: flex-start;
    width: auto;
    margin: 0;
    padding: 7px 8px 3px 8px;
    border: 6px solid #F4F7F4;
    border-radius: 100px;
    background-color: #2787C9;
    color: #333333;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    cursor: pointer;
    transition: none;
}

.hpt-header .hpt-header__burger:hover,
.hpt-header .hpt-header__burger:focus {
    background-color: #2787C9;
    color: #333333;
}

.hpt-header .hpt-header__burger svg {
    display: inline;
    vertical-align: baseline;
}

/* Logo */
.hpt-header .hpt-header__col--logo {
    width: 15%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.hpt-header .hpt-header__logo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.hpt-header .hpt-header__logo img {
    display: inline-block;
    width: 90%;
    max-width: 100%;
    height: auto;
}

/* Recherche */
.hpt-header .hpt-header__col--search {
    width: 70%;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

/* Compte et panier */
.hpt-header .hpt-header__col--icons {
    width: 15%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.hpt-header .hpt-header__account {
    align-self: flex-start;
    padding: 7px 8px 3px 8px;
    border: 6px solid #F4F7F4;
    border-radius: 100px;
    background-color: #2787C9;
}

/* Separateur pleine largeur */
.hpt-header .hpt-header__divider {
    display: flex;
    padding: 5px 0;
}

.hpt-header .hpt-header__divider-line {
    display: flex;
    width: 100%;
    border-top: 1px solid #E9E9E9;
}

/* Ligne 2 (bureau) : mega menu et menu */
.hpt-header .hpt-header__row--nav .hpt-header__inner {
    align-items: center;
    gap: 5px;
}

.hpt-header .hpt-header__mega {
    align-self: center;
}

.hpt-header .hpt-header__menu {
    padding: 0 0 0 10px;
}

.hpt-header .hpt-header__menu ul {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: normal;
}

.hpt-header .hpt-header__menu li {
    display: flex;
    position: relative;
    margin: 0;
    padding: 0;
}

.hpt-header .hpt-header__menu a {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
    padding: 13px 20px;
    color: var( --e-global-color-text );
    font-family: "Raleway", Sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2em;
    white-space: nowrap;
    transition: .4s;
}

.hpt-header .hpt-header__menu li:not(:last-child) > a {
    margin-inline-end: 7.5px;
}

.hpt-header .hpt-header__menu li:not(:first-child) > a {
    margin-inline-start: 7.5px;
}

.hpt-header .hpt-header__menu a:hover,
.hpt-header .hpt-header__menu a:focus,
.hpt-header .hpt-header__menu .current-menu-item > a {
    color: var( --e-global-color-accent );
}

/* Soulignement de l'element actif ou survole (pointeur "underline", fondu). */
.hpt-header .hpt-header__menu a::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 3px;
    background-color: var( --e-global-color-accent );
    transition: .3s;
    transition-timing-function: cubic-bezier( .58, .3, .005, 1 );
}

/* Element actif toujours souligne : exclu du masquage (une regle separee
   pour l'actif perdait contre ce masquage, plus specifique). */
.hpt-header .hpt-header__menu li:not(.current-menu-item) > a:not(:hover):not(:focus)::after {
    opacity: 0;
}

/* Tablette : burger visible, ligne 2 masquee, recherche a la ligne. */
@media (max-width: 1024px) {
    .hpt-header .hpt-header__inner {
        max-width: 1024px;
    }

    .hpt-header .hpt-header__row--main .hpt-header__inner {
        flex-wrap: wrap;
        gap: 0;
    }

    .hpt-header .hpt-header__col--burger {
        display: flex;
    }

    .hpt-header .hpt-header__logo img {
        width: 100%;
    }

    .hpt-header .hpt-header__col--search {
        order: 99999;
    }

    .hpt-header .hpt-header__row--nav {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hpt-header .hpt-header__col--burger {
        width: 33%;
    }

    .hpt-header .hpt-header__col--search {
        width: 100%;
    }

    .hpt-header .hpt-header__col--icons {
        width: 33%;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .hpt-header .hpt-header__inner {
        max-width: 767px;
    }

    .hpt-header .hpt-header__col--burger {
        width: 20%;
    }

    .hpt-header .hpt-header__col--logo {
        width: 40%;
    }

    .hpt-header .hpt-header__col--search {
        width: 100%;
    }

    .hpt-header .hpt-header__col--icons {
        width: 38%;
        gap: 8px;
    }
}
