/* Structure principale
-------------------------------------------------- */
main {
    flex: 1;
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem;
}

/* Section Articles - Structure de base
-------------------------------------------------- */
.articles-section {
    background-color: #FFF3E0;
    border-radius: 8px;
    width: 100%;
    margin: auto;
    padding: 0.5rem;
}

/* Titre de la section articles */
.articles-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

/* Ligne décorative sous le titre */
.articles-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: #FF5722;
    transform: translateX(-50%);
}

/* Grille d'articles
-------------------------------------------------- */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 0 0.3rem;
}

/* Carte d'article individuelle */
.article-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image de l'article */
.article-card img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
}

/* Titre de l'article */
.article-card h3 {
    font-size: 1.2rem;
    margin: 10px 0;
}

/* Zone de texte de l'article */
.article-text {
    flex-grow: 1;
    overflow: hidden;
    height: auto;
    max-height: 80px;
    padding: 0 0.3rem;
    margin: 0.5rem 0;
}

.article-text p {
    font-size: 1rem;
    color: #555;
    margin: 2px;
}

/* Animation au survol de la carte */
.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Bouton "Lire plus"
-------------------------------------------------- */
.read-more {
    display: inline-block;
    margin: 0.5rem auto;
    padding: 8px 15px;
    font-size: 1em;
    color: #fff !important;
    background-color: #C5A880;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    max-width: 150px;
    width: 100%;
}

.read-more:hover {
    background-color: #cc8500;
    transform: scale(1.05);
}

/* Section Quiz
-------------------------------------------------- */
#quiz-section {
    background: #C5A880;
    color: #002B5B;
    padding-bottom: 2%;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

#quiz-section h2 {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
}

/* Bouton d'appel à l'action du quiz */
#quiz-section .cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    color: #F5F5DC;
    background: #002B5B;
    border: 2px solid #F5F5DC;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

#quiz-section .cta-button:hover {
    background: #F5F5DC;
    color: #002B5B;
}

/* Titre des articles récents */
.article-recents {
    font-size: 1.3rem;
    font-weight: 600;
    color: #002B5B;
    text-align: center;
    margin: 0.8rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #C5A880;
}

/* Media Queries - Adaptations pour les écrans plus larges
-------------------------------------------------- */
@media (min-width: 768px) {
    /* Ajustements structure principale */
    main {
        width: 85%;
        padding: 2vw;
    }

    /* Ajustements grille d'articles */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 1rem;
    }

    /* Ajustements section articles */
    .articles-section {
        padding-bottom: 1rem;
    }

    .articles-section h2 {
        font-size: 28px;
    }

    /* Ajustements cartes d'articles */
    .article-card {
        margin: 0.5rem;
        min-height: 400px;
    }

    .article-text {
        padding: 0 1rem;
    }

    /* Ajustements section quiz */
    #quiz-section {
        padding: 2vw;
		margin-bottom:2%;
    }
    
    #quiz-section h2 {
        font-size: 1.8rem;
    }
    
    /* Ajustements titre articles récents */
    .article-recents {
        font-size: 1.5rem;
    }
}

/* Écrans plus larges */
@media (min-width: 1024px) {
    main {
        width: 65%;
    }
}