.franck-modele-gallery-wrapper {
    width: 100%;
}

.franck-modele-gallery-wrapper--container .franck-modele-gallery {
    border-radius: 28px;
    overflow: hidden;
}

.franck-modele-gallery {
    width: 100%;
    position: relative;
}

.fmg-header {
    max-width: 1200px;
    margin: 0 auto 34px;
    padding: 0 42px;
    text-align: center;
}

.fmg-title {
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin: 0 0 12px;
}

.fmg-subtitle {
    line-height: 1.6;
    margin: 0;
}

/* --- Filtre Extérieur / Intérieur --- */
.fmg-filter {
    display: flex;
    width: fit-content;
    gap: 6px;
    margin: 20px auto 0;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 999px;
}

.fmg-filter-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: #475569;
    padding: 9px 22px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Work Sans', sans-serif;
    white-space: nowrap;
}

.fmg-filter-btn:hover {
    color: #0f172a;
}

.fmg-filter-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.10);
}

/* --- Panneaux de galerie (un seul visible à la fois) --- */
.fmg-panel {
    display: none;
}

.fmg-panel.active {
    display: block;
}

.fmg-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 42px;
}

.fmg-main {
    width: 100%;
    height: var(--fmg-main-height, 600px);
    border-radius: var(--fmg-main-radius, 28px);
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 18px;
}

.fmg-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fmg-main:hover .fmg-main-img {
    transform: scale(1.04);
}

.fmg-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    position: relative;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE / Edge */
}

.fmg-thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.fmg-thumb {
    flex: 0 0 auto;
    width: var(--fmg-thumb-width, 120px);
    height: var(--fmg-thumb-height, 80px);
    min-width: var(--fmg-thumb-width, 120px);
    border-radius: var(--fmg-thumb-radius, 14px);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.62;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    padding: 0;
    background: transparent;
}

.fmg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fmg-thumb.active {
    opacity: 1;
    border-color: var(--fmg-active-border, #0f172a);
}

.fmg-thumb:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .fmg-wrapper {
        padding: 0 16px;
    }

    .fmg-main {
        height: min(340px, 62vw);
        border-radius: 18px;
    }

    .fmg-title {
        font-size: 28px !important;
    }

    .fmg-subtitle {
        font-size: 15px !important;
    }

    .fmg-thumbs {
        gap: 8px;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .fmg-thumbs::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    .fmg-thumb {
        flex: 0 0 auto;
        width: 90px;
        min-width: 90px;
        height: 60px;
        border-radius: 10px;
        scroll-snap-align: center;
    }
}

@media (max-width: 991px) {
    .fmg-filter {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .fmg-filter::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    .fmg-thumbs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .fmg-thumbs::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
}

/* ===== RENAULT THEME (forké) ===== */
.franck-modele-gallery, .franck-modele-gallery .fmg-title, .franck-modele-gallery .fmg-subtitle, .franck-modele-gallery .fmg-filter-btn { font-family: var(--maurin-font-primary); }
.franck-modele-gallery-wrapper--container .franck-modele-gallery { border-radius: 0; }
.franck-modele-gallery .fmg-main { border-radius: 0; }
.franck-modele-gallery .fmg-thumb { border-radius: 0; }
.franck-modele-gallery .fmg-thumb.active { border-color: var(--renault-yellow); }
/* Filtres : onglets texte + trait jaune (style franck-gamme-neuve) */
.franck-modele-gallery .fmg-filter { background: transparent; border-radius: 0; padding: 0; gap: 32px; }
.franck-modele-gallery .fmg-filter-btn { border-radius: 0; padding: 8px 0; color: var(--renault-gray-mid); text-transform: uppercase; letter-spacing: .04em; border-bottom: 3px solid transparent; }
.franck-modele-gallery .fmg-filter-btn:hover { color: var(--renault-black); border-bottom-color: var(--renault-yellow); }
.franck-modele-gallery .fmg-filter-btn.active { background: transparent; box-shadow: none; color: var(--renault-black); border-bottom-color: var(--renault-yellow); }

/* RENAULT : titre de section en MAJUSCULES */
.franck-modele-gallery .fmg-title { text-transform: uppercase; }
