/* ============================================================ */
/* === HYDROMUR — Header blanc → bleu foncé au scroll      === */
/* ============================================================ */

/* ===== PADDING-TOP POUR COMPENSER LE HEADER FIXE ===== */
body.single #content {
    padding-top: 150px !important;
}

body {
    padding-top: 0 !important;
    overflow-x: clip !important;
    max-width: 100% !important;
}

/* ===== HEADER ===== */
#hm-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

/* ===== INNER ===== */
.hm-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 0 16px;
    height: 130px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== LOGO ===== */
.hm-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 4px 10px;
    margin-left: 0;
    height: 122px;
    overflow: hidden;
}
.hm-logo-img {
    height: 128px !important;
    width: auto;
}

/* ===== NAV DESKTOP ===== */
.hm-nav { flex: 1; display: flex; justify-content: center; }
.hm-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hm-item { position: relative; }
.hm-link {
    display: block;
    padding: 8px 14px;
    color: #0d2461;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: color 0.2s;
    white-space: nowrap;
}
.hm-link::after {
    content: '';
    display: block;
    height: 2px;
    background: #0d2461;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s;
    margin-top: 2px;
}
.hm-link:hover::after,
.hm-item.active .hm-link::after { transform: scaleX(1); }
.hm-link:hover { color: #a6c5d5; }

/* Nav scrollée → texte blanc */
#hm-header.scrolled .hm-link { color: #ffffff !important; }
#hm-header.scrolled .hm-link:hover { color: rgba(255,255,255,0.75) !important; }
#hm-header.scrolled .hm-link::after { background: #ffffff; }

/* ===== FLÈCHE DROPDOWN ===== */
.hm-arrow {
    font-size: 0.6rem;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.25s;
    vertical-align: middle;
}
.hm-has-dropdown:hover .hm-arrow { transform: rotate(180deg); }

/* ===== DROPDOWN DESKTOP ===== */
.hm-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #0d2461;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(166,197,213,0.3);
    padding: 8px 0;
    z-index: 10000;
    list-style: none;
    margin: 0;
}

.hm-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.hm-has-dropdown:hover .hm-dropdown { display: block; }
.hm-dropdown li { margin: 0; }
.hm-dropdown a {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s, background 0.2s;
    white-space: nowrap;
}
.hm-dropdown a:hover {
    color: #ffffff;
    background: rgba(166,197,213,0.15);
    padding-left: 24px;
}
.hm-dropdown li + li a { border-top: 1px solid rgba(255,255,255,0.06); }

/* ===== ACTIONS DROITE ===== */
.hm-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ===== TÉLÉPHONE ===== */
.hm-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    background: #0d2461;
    border: 2px solid #0d2461;
    border-radius: 6px;
    padding: 10px 18px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.hm-phone .material-icons { font-size: 18px !important; color: #ffffff; }
.hm-phone:hover { background: #1a3580; border-color: #1a3580; }

#hm-header.scrolled .hm-phone {
    background: #ffffff !important;
    color: #0d2461 !important;
    border-color: #ffffff !important;
}
#hm-header.scrolled .hm-phone .material-icons { color: #0d2461 !important; }
#hm-header.scrolled .hm-phone:hover { background: #f0f4f8 !important; }

/* ===== DEVIS GRATUIT ===== */
.hm-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #a6c5d5;
    border: 2px solid #a6c5d5;
    color: #0d2461 !important;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.hm-cta .material-icons { font-size: 16px !important; color: #0d2461; }
.hm-cta:hover {
    background: #0d2461;
    border-color: #0d2461;
    color: #ffffff !important;
    transform: translateY(-1px);
}
.hm-cta:hover .material-icons { color: #ffffff; }

#hm-header.scrolled .hm-cta {
    background: #a6c5d5 !important;
    border-color: #a6c5d5 !important;
    color: #0d2461 !important;
}
#hm-header.scrolled .hm-cta .material-icons { color: #0d2461 !important; }
#hm-header.scrolled .hm-cta:hover {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #0d2461 !important;
}

/* ===== BURGER ===== */
.hm-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 6px;
    -webkit-tap-highlight-color: transparent;
}
.hm-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0d2461;
    border-radius: 2px;
    transition: background 0.35s, transform 0.3s, opacity 0.3s;
}
#hm-header.scrolled .hm-burger span { background: #ffffff; }

.hm-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hm-burger.open span:nth-child(2) { opacity: 0; }
.hm-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .hm-phone-number { display: none; }
}

@media (max-width: 860px) {
    .hm-burger { display: flex; }

    html body #hm-header .hm-actions .hm-phone,
    html body #hm-header .hm-actions .hm-cta {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
    }

    .hm-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d2461;
        padding: 16px 0 24px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.3);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }
    .hm-nav.open { display: flex; }
    .hm-menu { flex-direction: column; gap: 0; align-items: stretch; }
    .hm-link {
        color: #ffffff !important;
        padding: 14px 28px;
        border-radius: 0;
        font-size: 0.88rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .hm-link:hover { color: #a6c5d5 !important; background: rgba(255,255,255,0.06); }
    .hm-link::after { display: none; }

    .hm-dropdown {
        position: static !important;
        display: none;
        background: rgba(255,255,255,0.08) !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .hm-dropdown::before { display: none; }

    .hm-has-dropdown.open .hm-dropdown { display: block !important; }
    .hm-dropdown a {
        padding: 12px 28px 12px 40px !important;
        font-size: 0.82rem !important;
        color: rgba(255,255,255,0.9) !important;
        border-top: 1px solid rgba(255,255,255,0.06) !important;
    }
    .hm-dropdown a:hover {
        padding-left: 48px !important;
        background: rgba(255,255,255,0.1) !important;
        color: #ffffff !important;
    }
    .hm-has-dropdown.open .hm-arrow { transform: rotate(180deg); }

    #hm-header.scrolled .hm-nav { display: none; }
    #hm-header.scrolled .hm-nav.open { display: flex; }
}

@media (max-width: 480px) {
    .hm-header-inner { padding: 0 16px; gap: 12px; }
}

/* ===== MOBILE : header toujours bleu foncé ===== */
@media (max-width: 860px) {
    #hm-header {
        background-color: #0d2461 !important;
    }
    #hm-header .hm-link {
        color: #ffffff !important;
    }
    #hm-header .hm-burger span {
        background: #ffffff !important;
    }
    #hm-header .hm-logo {
        background: #ffffff;
    }
}