/* ===== CONTROLS BAR ===== */
.oeuvres-controls {
    position: sticky;
    top: 80px;
    z-index: 20;
    padding: 1.5rem 0 0;
    backdrop-filter: blur(20px);
}

.oeuvres-controls .controls-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* ===== SUNROLL SEULEMENT TITRES ŒUVRES ===== */
.oeuvre-title {
    font-family: 'Sunroll', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif ;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 1rem;
    color: #fff;
}


/* ===== SWITCH NB / COULEUR - MODERN VERSION ===== */

.switch-color-btn {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.switch-color-btn:hover {
    transform: scale(1.05);
}

.switch-color-btn:active {
    transform: scale(0.98);
}

.switch-color-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8), rgba(30, 25, 45, 0.9));
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    gap: 4px;
}

.switch-color-knob {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8), rgba(30, 25, 45, 0.9));
    box-shadow: 
        0 4px 16px rgba(155, 93, 229, 0.5),
        0 0 20px rgba(241, 91, 181, 0.3),
        inset -1px -1px 3px rgba(0, 0, 0, 0.3),
        inset 1px 1px 3px rgba(255, 255, 255, 0.2);
    transform: translateX(0);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-color-knob::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.switch-color-label {
    font-family: 'Circular Std', system-ui, -apple-system, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    min-width: 24px;
    text-align: center;
}

.switch-color-label-nb {
    opacity: 1;
    color: rgba(255, 255, 255, 0.8);
}

.switch-color-label-color {
    opacity: 0.3;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== ÉTAT ACTIVÉ ===== */
.switch-color-btn.is-on .switch-color-pill {
    border-color: rgba(0, 245, 212, 0.4);
    box-shadow:
        0 12px 40px rgba(0, 245, 212, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(0, 245, 212, 0.2);
    background: linear-gradient(135deg, rgba(15, 35, 40, 0.8), rgba(20, 40, 45, 0.9));
}

.switch-color-btn.is-on .switch-color-knob {
    transform: translateX(28px);
    background: linear-gradient(135deg, #9B5DE5, #F15BB5, #FFBE0B, #00F5D4);
    box-shadow: 
        0 6px 20px rgba(0, 245, 212, 0.6),
        0 0 30px rgba(0, 245, 212, 0.4),
        inset -1px -1px 3px rgba(0, 0, 0, 0.2),
        inset 1px 1px 3px rgba(255, 255, 255, 0.3);
}

.switch-color-btn.is-on .switch-color-label-nb {
    opacity: 0.2;
    color: rgba(255, 255, 255, 0.2);
}

.switch-color-btn.is-on .switch-color-label-color {
    opacity: 1;
    color: rgba(255, 255, 255, 1);
}

/* ===== ANIMATIONS SUPPLÉMENTAIRES ===== */
.switch-color-btn.is-on .switch-color-knob::before {
    animation: shimmer 0.6s ease;
}

@keyframes shimmer {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.3;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .switch-color-pill {
        height: 44px;
        padding: 0 6px;
    }

    .switch-color-knob {
        width: 28px;
        height: 28px;
    }

    .switch-color-label {
        font-size: 0.6rem;
        min-width: 20px;
    }

    .switch-color-btn.is-on .switch-color-knob {
        transform: translateX(24px);
    }
}

@media (hover: none) {
    .switch-color-btn:hover {
        transform: none;
    }

    .switch-color-btn:active {
        transform: scale(0.95);
    }
}

/* ===== SWITCH VUE (GRILLE / LISTE) ===== */
.view-switch {
    display: inline-flex;
    padding: 0.15rem;
    border-radius: 999px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.9);
    position: relative;
}

.view-toggle-btn {
    position: relative;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: 'Circular Std', system-ui, sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    z-index: 2;
    transition: color 0.18s ease, transform 0.18s ease;
}

.view-toggle-btn .view-icon {
    font-size: 0.9rem;
}

.view-toggle-btn.is-active {
    color: #000;
    transform: translateY(-1px);
}

/* Fond mouvant sous le bouton actif */
.view-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    width: 50%;
    border-radius: 999px;
    background: linear-gradient(135deg, #9B5DE5, #F15BB5, #FFBE0B, #00F5D4);
    box-shadow:
        0 0 20px rgba(155,93,229,0.8),
        0 0 40px rgba(0,0,0,1);
    transform: translateX(0%);
    transition: transform 0.28s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.view-switch.is-list::before {
    transform: translateX(100%);
}

/* ===== GALLERY LAYOUT ===== */
.oeuvres-gallery {
    padding: 3rem 0 4rem;
}

.oeuvres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.75rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.oeuvres-grid.is-list {
    display: flex;
    flex-direction: column;
}

/* ===== OEUVRE CARDS ===== */
.oeuvre-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.06), rgba(0,0,0,0.9));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 18px 60px rgba(0,0,0,0.85),
        0 0 0 1px rgba(255,255,255,0.02);
    transform-origin: center center;
    transform: translateY(0) scale(1);
    transition:
        transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.35s ease;
}

.oeuvre-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.oeuvre-media {
    position: relative;
    padding: 1rem;
}

.oeuvre-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    transition:
        filter 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glow autour de l'image */
.oeuvre-glow {
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    background: radial-gradient(circle at top, rgba(155,93,229,0.0), rgba(0,0,0,0.9));
    box-shadow: 0 0 0 rgba(0,0,0,0);
    mix-blend-mode: screen;
    pointer-events: none;
    transition:
        box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Meta */
.oeuvre-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 0.3rem 0.2rem;
}

.oeuvre-year {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* ===== NB / COULEUR (PAR DÉFAUT NB) ===== */
.oeuvres-grid.is-desaturated .oeuvre-img {
    filter: grayscale(1) contrast(1.1) saturate(0.6);
}

.oeuvres-grid.is-colored .oeuvre-img {
    filter: grayscale(0) contrast(1.1) saturate(1.2);
}

/* ===== HOVER INTERACTIONS ===== */
.oeuvre-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 26px 80px rgba(0,0,0,0.95),
        0 0 0 1px rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.14);
}

.oeuvre-card:hover .oeuvre-img {
    transform: translateY(-4px) scale(1.03);
}

.oeuvres-grid.is-colored .oeuvre-card:hover .oeuvre-img {
    transform: translateY(-6px) scale(1.06);
}

/* Glow dynamique avec couleur ACF */
.oeuvres-grid.is-colored .oeuvre-card:hover .oeuvre-glow {
    background: radial-gradient(circle at top, color-mix(in srgb, var(--couleur-principale) 65%, transparent), rgba(0,0,0,0.9));
    box-shadow:
        0 0 40px color-mix(in srgb, var(--couleur-principale) 55%, transparent),
        0 0 120px color-mix(in srgb, var(--couleur-principale) 45%, transparent);
}

/* ===== VUE LISTE ===== */
.oeuvres-grid.is-list .oeuvre-card {
    display: flex;
    align-items: stretch;
}

.oeuvres-grid.is-list .oeuvre-media {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 1.25rem;
    align-items: center;
}

.oeuvres-grid.is-list .oeuvre-img {
    height: 200px;
}

.oeuvres-grid.is-list .oeuvre-meta {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .oeuvres-controls .controls-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .view-switch {
        align-self: flex-end;
    }

    .oeuvres-grid.is-list .oeuvre-media {
        grid-template-columns: 1fr;
    }

    .oeuvres-grid.is-list .oeuvre-img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .oeuvres-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}


/* Wrapper des filtres */
.oeuvres-filter {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

/* Boutons */
.oeuvres-filter .filter-btn {
    position: relative;
    font-family: 'Outfit';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: radial-gradient(circle at top left,
                rgba(255, 255, 255, 0.16),
                rgba(255, 255, 255, 0.02));
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Petit éclat interne */
.oeuvres-filter .filter-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%,
                rgba(255, 255, 255, 0.26),
                transparent 55%);
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
}

/* Hover */
.oeuvres-filter .filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Focus clavier */
.oeuvres-filter .filter-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(0, 245, 212, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.9);
}

/* État actif */
.oeuvres-filter .filter-btn.is-active {
    background: linear-gradient(135deg,
                rgba(0, 245, 212, 0.85),
                rgba(0, 187, 249, 0.85));
    color: #050816;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.55),
        0 0 22px rgba(0, 245, 212, 0.65);
}

.oeuvres-filter .filter-btn.is-active::before {
    opacity: 1;
}

/* Optionnel : légère anim au survol global */
.oeuvres-filter:hover {
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
    transition: box-shadow 220ms ease;
}
