/* styles.css */

/* Section héro */
.hero {
    position: relative;
    height: 40vh;
    width: 100%;
    background: url(../assets/img/networksecurity.jpg);
    background-position: top right;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu principal du héro */
.main-content h1 {
    font-size: var(--h1-font);
    font-weight: 700;
    margin: 20px ;
    line-height: 1.2;
    text-shadow: 3px 3px 20px grey;
}

/* Section à propos */
.ap {
    background: var(--bg-color);
    padding: 40px 10%; /* Réduit la marge pour plus d'espace */
}

.about {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    align-items: center;
    margin-top: 0.8rem;
}

.about-text h2 {
    font-size: var(--h3-font);
    line-height: 1.3;
    margin-bottom: 20px;
}

/* Section des certifications */
.certifications {
    background-color: var(--bg-color);
    padding: 40px 10%; /* Réduit la marge pour plus d'espace */
}

.center-text h2 {
    line-height: 1.3;
    margin-bottom: 20px;
    margin-left: 100px;
}

/* Corps de la page */
body {
    font-family: Arial, sans-serif;
}

/* Contenu des certifications */
.certifications-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Utilise une grille responsive */
    gap: 16px; /* Espace entre les éléments */
    padding: 20px;
}

.articles-container {
    display: flex;
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne si l'espace est insuffisant */
    justify-content: space-between; /* Espace entre les articles */
}

/* Boîtes d'articles */
.box {
    background-color: var(--bg-color);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(25% - 16px); /* 4 articles par ligne */
    margin: 8px; /* Espace entre les articles */
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s;
}

.box img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
}

.box-content {
    padding: 16px;
}

.box h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: black;
}

.box .date {
    color: #888;
    margin-bottom: 10px;
}

/* Évaluation */
.rating {
    direction: rtl;
    unicode-bidi: bidi-override;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.star{
    color: gold;
}


/* Liens */
.box a {
    display: inline-block;
    margin-top: 10px;
    color: #007BFF;
    text-decoration: none;
}

.box a:hover {
    text-decoration: underline;
}

/* Effets de survol */
.box:hover {
    transform: translateY(-10px);
}

/* Styles pour les sélections */
select[name="order"] {
    font-size: var(--p-font);
    background: var(--second-bg-color);
    color: var(--other-color);
    border: 2px solid var(--other-color);
    border-radius: 8px;
    padding: 7px 15px;
    cursor: pointer;
    transition: border 0.3s ease, color 0.3s ease;
    margin-left: 100px;
}

select[name="order"]:hover {
    border: 2px solid var(--main-color);
    color: var(--main-color);
}

select[name="order"] option {
    background: var(--second-bg-color);
    color: var(--other-color);
    font-size: var(--p-font);
    border: 1px solid var(--other-color);
    border-radius: 5px;
}

select[name="order"] option:checked {
    background: var(--main-color);
    color: var(--bg-color);
}

/* Footer */
.footer {
    background: var(--second-bg-color);
}

/* Media Queries */
@media (max-width: 1200px) {
    .box {
        flex: 1 1 calc(33.33% - 16px); /* 3 articles par ligne */
    }
}

@media (max-width: 800px) {
    .box {
        flex: 1 1 calc(50% - 16px); /* 2 articles par ligne */
    }
}

@media (max-width: 500px) {
    .box {
        flex: 1 1 calc(100% - 16px); /* 1 article par ligne */
    }
}

@media (max-width: 1380px) {
    .hero {
        height: 20vh;
        background-position: center;
    }

    .main-content h1 {
        font-size: var(--h2-font);
        font-weight: 600;
        margin: 20px 0;
        line-height: 1.2;
        text-shadow: 3px 3px 20px grey;
    }
}

@media (max-width: 1290px) {
    .box-content {
        padding: 40px 40px 20px;
    }

    .box img {
        padding: 0;
        width: 100%;
    }

    .box h3 {
        font-size: 21px;
    }

    .box p {
        font-size: 0.9rem;
        font-weight: 300;
        line-height: 23px;
    }
}

@media (max-width: 1240px) {
    .about {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .box p {
        font-size: 0.8rem;
        font-weight: 300;
        color: var(--other-color);
        line-height: 20px;
    }
}

@media (max-width: 653px) {
    .hide {
        display: none;
    }
}

@media (max-width: 572px) {
    .exp-area p {
        font-size: 16px;
        font-weight: 300;
        margin-left: 8px;
    }

    .center-text h2 {
        font-size: var(--h3-font);
    }
}

@media (max-width: 470px) {
    .exp-area p {
        font-size: 16px;
        font-weight: 300;
        margin-left: 8px;
    }

    .center-text h2 {
        font-size: var(--h3-font);
    }

    .box h3 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .certifications-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, auto));
    }
}

@media (max-width: 360px) {
    .certifications-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, auto)); /* Ajustement pour petits écrans */
    }
}
