/* Import de la police Bricolage Grotesque */
/*@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;600;700;800&display=swap');*/

.c31-header-wrapper {
    width: 100%;
    position: relative;
    font-family: 'Bricolage Grotesque', sans-serif;
}

.c31-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
}

/* ================== FIX DU LOGO ================== */
.c31-header-logo a,
.c31-overlay-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.c31-header-logo img,
.c31-header-logo svg,
.c31-header-logo i,
.c31-overlay-logo img,
.c31-overlay-logo svg,
.c31-overlay-logo i {
    display: block;
    height: 40px; /* Taille par défaut sécurisée */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0; /* Empêche l'écrasement */
    margin: 0;
}

/* SVG ICONS GLOBAL STYLE (pour les autres icônes) */
.c31-header-wrapper svg {
    display: inline-block;
    vertical-align: middle;
}

/* =========================================
   VERSION DESKTOP (> 1024px)
   ========================================= */
@media (min-width: 1025px) {
    .c31-mobile-trigger-btn, .c31-mobile-overlay { display: none !important; }

    .c31-desktop-nav { flex-grow: 1; display: flex; justify-content: center; }
    .c31-desktop-menu-list { display: flex; list-style: none; padding: 0; margin: 0; align-items: center; }

    .c31-desktop-menu-list li a {
        text-decoration: none;
        font-weight: 700; font-size: 18px;
        transition: color 0.3s;
        color: #1a1a1a;
    }
    .c31-desktop-menu-list li a:hover { color: #7B4717; }

    .c31-desktop-actions { display: flex; align-items: center; }

    .c31-action-phone {
        display: flex; align-items: center; gap: 8px;
        font-weight: 800; text-decoration: none; font-size: 20px;
        color: #1a1a1a;
    }

    .c31-action-link {
        font-weight: 700; font-size: 18px;
        color: #7B4717; border-bottom: 2px solid currentColor;
        padding-bottom: 2px;
        display: inline-flex; align-items: center; gap: 8px;
        text-decoration: none;
    }

    .c31-action-btn {
        text-decoration: none;
        font-weight: 700; font-size: 18px;
        display: inline-flex; align-items: center; gap: 8px;
        transition: transform 0.3s;
    }
    .c31-action-btn:hover { transform: translateY(-2px); }
}

/* =========================================
   VERSION MOBILE / TABLETTE (< 1025px)
   ========================================= */
@media (max-width: 1024px) {
    .c31-desktop-nav, .c31-desktop-actions { display: none !important; }

    /* --- 1. BOUTON BURGER --- */
    .c31-mobile-trigger-btn {
        display: flex; align-items: center; justify-content: center;
        border-style: solid;
        border-width: 2px;
        border-color: #7B4717;
        color: #7B4717;
        border-radius: 8px;
        cursor: pointer;
        background: transparent;
        transition: background 0.3s;
        position: relative;
        z-index: 10;
    }
    .c31-mobile-trigger-btn:active { background-color: rgba(123, 71, 23, 0.1); }

    .c31-mobile-trigger-btn svg {
        width: 1.3em;
        height: 1.3em;
        display: block;
    }

    /* --- 2. OVERLAY MOBILE --- */
    .c31-mobile-overlay {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;

        background-color: #7B4717 !important;
        z-index: 9999999;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        padding: 30px 25px;

        display: flex;
        flex-direction: column;

        transform-origin: top center;
        opacity: 0;
        visibility: hidden;
        transform: scaleY(0.8) translateY(-20px);
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .c31-mobile-overlay.is-open {
        opacity: 1;
        visibility: visible;
        transform: scaleY(1) translateY(0);
    }

    .c31-overlay-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .c31-overlay-header {
        display: flex; justify-content: space-between; align-items: flex-start;
        flex-shrink: 0;
    }

    .c31-overlay-logo {
        background: #ffffff !important;
        padding: 8px 10px;
        border-radius: 12px;
        display: inline-flex; align-items: center; justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .c31-close-btn {
        color: #ffffff !important;
        cursor: pointer;
        padding: 5px;
        opacity: 0.9;
        display: flex;
    }

    .c31-close-btn svg {
        width: 32px;
        height: 32px;
        display: block;
    }

    .c31-overlay-nav-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: auto;
        margin-bottom: 30px;
    }
    .c31-mobile-menu-list { list-style: none; padding: 0; margin: 0; text-align: center; width: 100%; }
    .c31-mobile-menu-list li { margin-bottom: 22px; }
    .c31-mobile-menu-list li a {
        color: #ffffff !important;
        font-size: 40px;
        font-weight: 700;
        text-decoration: none;
        font-family: 'Bricolage Grotesque', sans-serif;
        display: block;
    }

    .c31-overlay-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        width: 100%;
        margin-bottom: auto;
        padding-bottom: 20px;
    }

    .c31-overlay-divider { width: 270px; height: 2px; background: rgba(255,255,255,0.3); border-radius: 2px; }
    .c31-overlay-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }

    .c31-mobile-phone { color: #fff !important; font-size: 20px; font-weight: 800; text-decoration: none; display: flex; gap: 10px; align-items: center; }
    .c31-mobile-link { color: #fff !important; border-bottom: 1px solid rgba(255,255,255,0.7); text-decoration: none; padding-bottom: 4px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

    .c31-mobile-cta {
        background-color: #FAEFE5 !important;
        color: #7B4717 !important;
        width: 100%;
        padding: 18px;
        border-radius: 14px;
        text-align: center;
        font-weight: 800;
        font-size: 18px;
        text-decoration: none;
        display: flex; justify-content: center; align-items: center; gap: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        transition: transform 0.2s;
    }
    .c31-mobile-cta:active { transform: scale(0.98); }
}