:root {

    --color-primary: #a855f7;
    --color-primary-light: #c084fc;
    --color-primary-dark: #7c3aed;

    --accent-web-1: rgb(168, 85, 247);
    --accent-web-2: rgb(192, 132, 252);
    --accent-web-3: rgb(240, 171, 252);
    --glow-web-1: rgba(168, 85, 247, 0.15);
    --glow-web-2: rgba(124, 58, 237, 0.12);
    --glow-web-3: rgba(88, 28, 135, 0.08);

    --accent-event-1: rgb(124, 58, 237);
    --accent-event-2: rgb(79, 70, 229);
    --accent-event-3: rgb(37, 99, 235);
    --glow-event-1: rgba(124, 58, 237, 0.35);
    --glow-event-2: rgba(79, 70, 229, 0.30);
    --glow-event-3: rgba(37, 99, 235, 0.25);
}

.archive-projets-container {
    padding: 3rem 5vw 5rem;
}

.archive-projets-container h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: transparent;
    background-clip: text;
    background-image: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-primary-dark));
}

.filtres-projets {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filtre-projet {
    font-size: .55rem;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
    color: #f6f6f6;
    opacity: .9;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    font-family: 'Archivo', sans-serif !important
}



.filtre-projet:hover,
.filtre-projet.active,
.filtre-projet:focus {
    background: rgba(255, 255, 255, .12) !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* .filtre-projet:hover {
    background: rgba(255, 255, 255, .12);
    color: var(--violet-2);
    scale: 1.1;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
} */

/* .filtre-projet.active {
    background: rgba(255, 255, 255, .12) !important;
    color: var(--violet-2) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
} */

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
    position: relative;
    /* min-height: 50vh; */
}

.projet-card-default {
    position: relative;
    background-color: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-primary-dark));
    border-radius: 10px;
    /* overflow: hidden; */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* CRITICAL FLIP BUGFIX: NO CSS TRANSITIONS ON THE BASE ELEMENT! */
    transition: none !important;
}

.projet-card-default::before {
    content: "";
    opacity: 0;
    position: absolute;
    transform: translate(0px, 0px);
    z-index: -1;
    filter: blur(10px);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-default:hover::before {
    opacity: 1;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-default:hover {
    transform: scale(1.02);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.projet-card-default .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

@media (min-width: 1024px) {
    .projet-card-default .overlay {
        backdrop-filter: blur(3px);
    }
}

.projet-card-default:hover .overlay {
    backdrop-filter: blur(2px) !important;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-default img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    padding: 0.2rem;
    border-radius: 12px;
    filter: brightness(0.3);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-default:hover img {
    filter: brightness(0.7);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


.projet-card-default h2 {
    position: absolute;
    height: 100%;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f6f6f6;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.projet-card-web .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgb(168, 85, 247, 0.3), rgb(192, 132, 252, 0.3), rgb(240, 171, 252, 0.3));
}

.projet-card-web::before {
    inset: 2px;
    background: conic-gradient(from 90deg at 40% -25%, rgb(168, 85, 247), rgb(192, 132, 252), rgb(240, 171, 252));
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-event {
    background: linear-gradient(90deg, rgb(124, 58, 237, 0.5), rgb(79, 70, 229, 0.5), rgb(37, 99, 235, 0.5));
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.projet-card-event .overlay {
    background: linear-gradient(90deg, rgb(124, 58, 237, 0.3), rgb(79, 70, 229, 0.3), rgb(37, 99, 235, 0.3));
}

.projet-card-event::before {
    inset: 2px;
    background: linear-gradient(90deg, rgb(124, 58, 237), rgb(79, 70, 229), rgb(37, 99, 235));
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-event:hover::before {
    opacity: 1;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-event:hover {
    transform: scale(1.02);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projet-card-event h2 {
    /* color: transparent;
    background-clip: text;
    background-image: linear-gradient(90deg, var(--accent-event-1), var(--accent-event-2), var(--accent-event-3)); */

}

/* ======================================================
   RESPONSIVE DESIGN - ARCHIVE PROJETS
   ====================================================== */

/* --- Grand Écran --- */
@media screen and (min-width: 1440px) {
    .projets-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 1.5rem;
    }
}

/* --- Desktop --- */
@media screen and (min-width: 1025px) and (max-width: 1439px) {
    .projets-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.2rem;
    }
}


/* --- Tablette --- */
@media screen and (max-width: 1024px) {
    .archive-projets-container {
        padding: 4rem 5vw;
    }

    .archive-projets-container h1 {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
        margin-bottom: 2rem;
    }

    .projets-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .filtres-projets {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
}

/* --- Mobile --- */
@media screen and (max-width: 768px) {
    .archive-projets-container {
        padding: 3rem 5vw;
    }

    .archive-projets-container h1 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .filtres-projets {
        gap: 0.6rem;
        margin-bottom: 2rem;
    }

    .filtre-projet {
        font-size: 0.5rem;
        padding: 0.4rem 0.8rem;
    }

    .projets-grid {
        /* 1 colonne pleine largeur sur mobile */
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projet-card-default h2 {
        font-size: 1.3rem;
        padding: 0.8rem;
    }
}