body {
    font-family: Arial, sans-serif;
    background-color: white;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    padding: 60px;
    background-color: white;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#header-image {
    width: 80px;
    height: auto;
    border-radius: 60%;
    margin-right: 0px;
}

h1 {
    margin: 0;
    color: rgb(37, 37, 37);
    font-size: 34px;
    text-align: center;
}

.filters-section {
    padding: 20px;
    background-color: white;
}

h2 {
    margin: 0 0 10px 0;
    color: rgb(90, 89, 89);
    font-size: 20px;
    margin-left: 20px;
}

.filters {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap; 
    margin-left: 10px;
}

.filter-btn {
    margin: 5px;
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #c2c2c2;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.filter-btn.active {
    background-color: #d8d8d8;
    color: #000000;
}

.filter-btn:hover {
    background-color: #d8d8d8;
}

#cards-container {
    display: flex;
    justify-content: space-around;
    margin: 20px;
    flex-wrap: wrap; 
}

.card {
    background-color: white;
    padding: 40px;
    width: 250px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #c2c2c2;
    display: none; 
    margin-bottom: 20px;
}

.card h3 {
    margin-top: 0;
}

.download-btn {
    flex: 1; 
    padding: 10px;
    background-color: black;
    border-radius: 8px;
    color: white;
    text-decoration: none; 
    border: none;
    text-align: center;
    cursor: pointer;
}

.competences-btn {
    flex: 1; 
    padding: 10px;
    background-color: #d8d8d8;
    border-radius: 8px;
    color: black;
    border: none;
    text-align: center;
    cursor: pointer;
}

.download-btn:hover, .competences-btn:hover {
    opacity: 0.8;
}

.competences-btn:hover {
    background-color: #d8d8d8 ;
}

.diplome-icon {
    width: 20px; 
    height: auto;
    margin-right: 8px; 
    vertical-align: middle; 
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.788);
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;  
    background-color: white;
    padding: 20px;
    width: 1000px;
    height: 500px;
    border-radius: 8px;
    overflow-y: auto; 
    max-height: 100%;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    color: rgb(90, 89, 89);
    cursor: pointer;
    background: none;
    border: none;
}

.close-btn:hover {
    opacity: 0.8;  
}

ul {
    list-style-type: none;
    padding: 0;
}

ul li {
    padding: 5px 0;
}






/* ------------------ Responsive ------------------ */

/* Tablette (max-width: 768px) */
@media (max-width: 768px) {
    /* Header */
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #header-image {
        width: 80px;
        margin-top: 10px;
    }

    h1 {
        font-size: 20px;
        text-align: center;
    }

    /* Section des filtres */
    .filters-section {
        text-align: center;
        padding: 10px;
    }

    h2 {
        font-size: 18px;
        text-align: center;
    }

    .filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .filter-btn {
        margin: 8px;
        padding: 12px 15px;
        font-size: 14px;
        text-align: center;
    }

    #cards-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .card {
        width: 80%;
        margin: 10px auto;
        text-align: center;
    }

    .popup-content {
        width: 90%;
        height: auto;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .popup-content h2 {
        margin-top: 20px;
        text-align: center; /* Centre spécifiquement le titre */
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    /* Header */
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #header-image {
        width: 60px;
    }

    h1 {
        font-size: 18px;
        text-align: center;
    }

    h2 {
        font-size: 16px;
        text-align: center;
    }

    .filters {
        display: flex;
        flex-wrap: wrap; /* Permet d'aller à la ligne si nécessaire */
        justify-content: center; /* Centre horizontalement les filtres */
        gap: 6px; /* Ajoute de l'espacement entre les filtres */
    }

    .filter-btn {
        margin: 0; /* Supprime les marges */
        padding: 8px 12px; /* Ajuste la taille des boutons */
        font-size: 12px; /* Réduit légèrement la taille du texte */
        text-align: center;
    }

    #cards-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .card {
        width: 80%;
        padding: 0px;
        margin: 10px auto;
        text-align: center;
        padding: 20px; 
    }

    .popup-content {
        width: 95%; /* Presque plein écran, mais avec marges */
        max-width: 90%; /* Largeur maximale ajustée */
        max-height: 75vh; /* Réduit la hauteur pour mobile */
        padding: 10px; /* Réduit le padding */
    }

}
