.filtres-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
}

.btn-open-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 18px;
    color: #0C0C0C;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 1;
}

.btn-open-filters:hover {
    background: none;
    border: none;
    color: #0C0C0C;
    opacity: 0.8;
}

/* Popup overlay FULLPAGE */
.filtres-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.filtres-popup-overlay.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

/* Popup content FULLPAGE avec animation */
.filtres-popup {
    background: #1a1a1a;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    color: white;
    position: relative;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.filtres-popup-overlay.active .filtres-popup {
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.filtres-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px;
    max-width: 1300px;
    margin: 0 auto;
}

.filtres-popup-header h2 {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 400;
}

.btn-back, .btn-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
    opacity: 0.6;
}

.btn-back:hover, .btn-close:hover {
    opacity: 1;
    background: none;
}

.filtres-popup-content {
    padding: 40px 30px;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    min-height: calc(100% - 88px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.filtres-popup-content h3 {
    font-size:50px;
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.2;
}

.filter-subtitle {
    color: #888;
    margin-bottom: 15px;
    font-size: 18px;
}

.filtres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.filtre-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 20px 15px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 160px;
}

.filtre-btn:hover {
    background: #1a1a1a;
}
.filtre-btn:active, .filtre-btn:focus {
    background: #1a1a1a;
}
.filtre-btn .btn-check {
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 10px 21px;
    background: transparent;
    transition: all 0.3s ease;
}
.filtre-btn.active .btn-check {
    background: #fff;
    color: #000;
}
.btn-check .btnChecked, .btn-check .retour,
.filtre-btn.active .filter-action {
    display: none;
    transition: all 0.6s;
}
.filtre-btn.show-hover:hover .retour {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    transition: width 1.6s;
}
.filtre-btn.active .btnChecked {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: #141414;
    transition: width 1.6s;
}
.filtre-btn.show-hover:hover .btnChecked {
    display: none;
}
.filtre-btn.active .btnChecked .checked-text {
    display: block;
    width: 0;
    margin-right: 7px;
    opacity: 0;
    overflow: hidden;
    transition: width 1.6s ease, opacity 1.6s ease;
}
.filtre-btn.active .btnChecked .checked-text.show-text {
    width: 100%;
    margin-left: 0;
    opacity: 1;
    transition: width 1.6s ease, opacity 1.6s ease;
}
.filtre-btn.active .btn-check:hover .btnChecked {
    display: none;
}
.filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-bg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #333;
}

.term-icon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.no-icon {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.filter-name {
    font-weight: 500;
    font-size: 22px;
    text-align: center;
    color: #ECECEC;
}

.filtres-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.effacer-filtres,
.voir-projets {
    padding: 10px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1em;
}

.effacer-filtres {
    background: transparent;
    color: #fff;
    border:none;
    color: #929292;
    font-size: 16px;
    font-weight: 500;
}

.effacer-filtres:hover {
    border-color: #fff;
    background: var(--secondary-color);
}

.voir-projets {
    background: #fff;
    color: #0C0C0C;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    min-width: 280px;
}

.voir-projets:hover {
    background: var(--secondary-color);
    color: #fff;
}

.projets-loader {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(406px, 1fr));
    gap: 40px;
}

.projet-item {
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.projet-item:hover {
    transform: translateY(-5px);
}

.projet-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 126.6%; /* Ratio 406:514 = 126.6% */
    overflow: hidden;
}

.projet-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.projet-content {
    display: flex;
    padding: 10px 0 0;
    justify-content: space-between;
    align-items: center;
}

.projet-marque {
    font-size: 30px;
    font-weight: 600;
    color: #0C0C0C;
    margin: 0;
}

.projet-type {
    font-size: 18px;
    font-weight: 500;
    color: #0C0C0C;
    margin: 0;
}

.projet-item.hidden {
    display: none;
}

.no-projets {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}
.filtre-btn .icon-bg {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 0;
    overflow: initial;
    background: none;
}

/* Responsive */
@media (max-width: 768px) {
    .filtres-popup {
        /* Animation légèrement plus rapide sur mobile */
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .filtres-popup-overlay.active .filtres-popup {
        transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .filtres-grid {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
        gap: 10px;
    }

    .filtres-actions {
        flex-direction: column-reverse;
        align-items: center;
        margin-top: 0;
    }

    .projets-grid {
        grid-template-columns: 1fr;
    }

    .filtres-popup-content h3 {
        font-size: 1.8em;
    }

    .filtres-popup-content {
        padding: 30px 20px;
    }
    .filtre-btn{
        display: flex;
        flex-direction: row;
        padding: 0;
        min-height: inherit;
        gap: 10px;
    }
    .filter-icon{
        max-width: 30px;
        flex: 0 0 30px;
    }
    .btn-check{
        margin-left: auto;
    }
}


/* Variantes d'animation (optionnel) */
.projet-item.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
}

.projet-item.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.projet-item.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.projet-item.scale-in {
    opacity: 0;
    transform: scale(0.9);
}

/* Animation d'entrée des projets */
.projet-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.projet-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

