@font-face {
    font-family: "Nohemi";
    src: url("../../src/fonts/Nohemi-VF.ttf") format("truetype-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html {
    height: 100%;
}
body {
    margin: 0;
    font-family: "Nohemi", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: #0a0a0a;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.principal-projets {
    flex-grow: 1;
    padding: 80px 20px;
}
.section-grille-projets {
    max-width: 1200px;
    margin: 40px auto;
}
.section-grille-projets h1 {
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.filtres-projets {
    margin-bottom: 50px;
    padding: 25px;
    background-color: #1c1c1c;
    border: 1px solid #333;
    border-radius: 8px;
}
.contenu-filtres {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(200px, 1fr)
    ); /* Optimisation pour 3+ filtres */
    gap: 30px;
}
.element-filtre {
    display: flex;
    flex-direction: column;
    gap: 8px; /* flex-grow: 1; */
}
.element-filtre label {
    font-weight: 500;
    color: #ccc;
    font-size: 0.9em;
}
.element-filtre select {
    background-color: #333;
    color: #eee;
    font-family: "Nohemi", Arial, sans-serif;
    font-size: 1em;
    border: 1px solid #555;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}
.element-filtre select:focus {
    outline: none;
    border-color: #bb86fc;
}
.element-filtre select[multiple] {
    padding: 10px;
}
.element-filtre small {
    font-size: 0.8em;
    color: #888;
    text-align: center;
}
.actions-filtres {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
.lien-reinitialiser {
    color: #888;
    font-size: 0.9em;
    text-decoration: underline;
    transition: color 0.3s;
}
.lien-reinitialiser:hover {
    color: #eee;
}
.bouton-filtrer {
    background-color: #bb86fc;
    color: #121212;
    font-weight: bold;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-family: "Nohemi", Arial, sans-serif;
    transition:
        background-color 0.3s,
        transform 0.2s;
}
.bouton-filtrer:hover {
    background-color: #a06bf9;
    transform: scale(1.02);
}

.grille-projets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.carte-projet {
    background-color: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border: 1px solid #333;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    position: relative;
}
.carte-projet:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}
.carte-projet img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.carte-projet:hover img {
    transform: scale(1.05);
}
.titre-carte {
    padding: 20px;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    background-color: #1c1c1c;
    position: relative;
    z-index: 1;
}
.superposition-carte {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
}
.badge-carte {
    background-color: rgba(187, 134, 252, 0.9);
    color: #121212;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}
.competences-carte {
    font-size: 0.8em;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    text-align: right;
    max-width: 60%;
}
.aucun-projet {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2em;
    color: #888;
    padding: 50px 0;
}

@media (max-width: 768px) {
    .contenu-filtres {
        grid-template-columns: 1fr; /* Force une seule colonne sur mobile */
    }
}
