/* ============================================================
   SÉRÉNITÉ ET SOLUTIONS — Header custom
   Accueil : header fixe, transparent avant scroll.
   Autres pages : header sticky, fond blanc permanent.
============================================================ */

/* ===== RESET ===== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
body { padding-top: 0; }

/* ===== VARIABLES ===== */
:root {
    --sr-accent: #B3C5B3;
    --sr-accent-dark: #7E947E;
    --sr-text: #393C40;
    --sr-bg: #FFFFFF;
}

#srHeader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Accueil : transparent avant scroll */
body.home #srHeader {
    background-color: transparent;
    box-shadow: none;
}
body.home #srHeader.scrolled {
    background-color: var(--sr-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Autres pages : fond blanc permanent */
body:not(.home) #srHeader {
    background-color: var(--sr-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Compense le header fixe */
body { padding-top: 90px; }

.sr-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 90px;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ===== LOGO ===== */
.sr-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.sr-logo img { height: 60px; width: auto; }
.sr-logo span {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--sr-text);
}

/* ===== NAV ===== */
.sr-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}
.sr-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sr-item { position: relative; }
.sr-link {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--sr-text);
    transition: color 0.25s ease;
}
.sr-link:hover { color: var(--sr-accent-dark); }

/* Lien actif (posé en JS via .sr-active) */
.sr-item.sr-active > .sr-link {
    color: var(--sr-accent-dark);
    font-weight: 700;
}

/* ===== CTA "Contactez-nous" ===== */
.sr-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background-color: var(--sr-accent-dark);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.sr-cta:hover {
    background-color: var(--sr-text);
    transform: translateY(-1px);
}

/* ===== BURGER (mobile) ===== */
.sr-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
}
.sr-burger span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--sr-text);
    transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.sr-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sr-burger.open span:nth-child(2) { opacity: 0; }
.sr-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .sr-burger { display: flex; order: 3; }
    .sr-header-inner { flex-wrap: wrap; }

    .sr-nav {
        display: none;
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0 24px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        z-index: 9998;
    }
    .sr-nav.open { display: flex; }

    .sr-menu { flex-direction: column; gap: 0; align-items: stretch; width: 100%; }
    .sr-item { width: 100%; }
    .sr-link {
        color: var(--sr-text) !important;
        padding: 14px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .sr-cta {
        margin: 16px 24px 0;
        justify-content: center;
    }

    body { padding-top: 72px; }
    #srHeader { height: 72px; }
    .sr-header-inner { height: 72px; }
    .sr-logo img { height: 46px; }
}