/* === CSS - projets-grid.css === */
.projets-filtres {
    text-align: center;
    margin-bottom: 2rem;
}
@media (max-width:415px) {
    .projets-filtres {
        text-align: left;
    }
    .projets-filtres .filtre-btn {
        margin: 4px 0;
    }
}

.filtre-btn {
    font-size: 14px;
    font-weight: 500;
    color: #010101;
    background: transparent;
    border: 1px solid #9f9f9f;
    margin: 0 0.5rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.6s ease-in-out;
}

.filtre-btn.active,
.filtre-btn:hover {
    background: #FCEA10;
    color: #000;
    border: 1px solid transparent;
}

.projets-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}
@media (min-width:415px) {
    .projets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:728px) {
    .projets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width:1280px) {
    .projets-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width:1441px) {
    .projets-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.projet-card {
    background: #ffffffb8;
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
    opacity: 0;
    transform: scale(1);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.projet-card.visible {
    opacity: 1;
    transform: scale(1);
}

.media-wrapper {
    background: #e9e9e9;
    border-radius: 6px;
}

.media-wrapper iframe,
.media-wrapper img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    height: 200px;
}

.projet-meta {
    margin-top: 2rem;
}

.projet-meta .categorie {
    font-size: 14px;
    background-color: #fff9b2;
    width: auto!important;
    padding: 2px 6px;
}

.projet-meta .categorie i {
    margin-right: 7px;
}

.projet-meta h3 {
    margin: 0.5rem 0;
    font-size: 18px ; 
}

.projet-meta p {
    font-size: 14px;
}

.projet-meta button {
    background:transparent;
    border: 1px solid #9f9f9f;
    font-size: 15px;
    padding: 8px 15px;
    color:#010101;
}
.projet-meta button:hover {
    background:#FCEA10;
    color: #000;
    transition: all 0.5s ease-in-out;
}

.projet-meta button a {
    color: #010101;
    text-decoration: none!important;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    max-width: 100%!important;
}
.webcup-container-flex {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.modal-box {
    background: #fff;
    max-width: 800px;
    width: 90%;
    padding: 1rem;
    position: relative;
}

.modal-inner {
    display: flex;
    justify-content: center;
    max-height: 80vh;
    overflow: scroll;
}

.modal-box iframe,
.modal-box img {
    max-width: 100%;
    width: 90%;
    height: 450px;
}
.modal-box img {
    height: fit-content;
}

.close-modal {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    background-color: #FCEA11;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
}

/* Pagination styles */
.pagination-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.pagination-btn {
    background: #f0f0f0;
    border: none;
    margin: 0 5px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.pagination-btn.active,
.pagination-btn:hover {
    background: #FCEA10;
    color: #000;
}

.projets-container {
    background: #fff5ef;
    margin-left: calc(-50vw + 50%)!important;
    margin-right: calc(-50vw + 50%)!important;
    max-width: 100vw!important;
    width: 100vw!important;
}

@media (min-width:1024px) {
    .projets-container {
        padding-bottom: 96px;
    }
}

.projets-container .projets-container-inner {
    max-width: 80vw;
    margin: auto;
    padding:30px 0;
}

@media (max-width:414px) {
    .projets-container .projets-container-inner {
        max-width: 100vw;
        padding: 30px 20px;
    }
}

/* Loader animé */
.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #FCEA10;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* Affichage central du loader */
  .loader-wrapper {
    text-align: center;
    padding: 1rem;
    display: none !important;
  }

  .loader-wrapper.show {
    display: block !important;
  }
  
 