/* === Styles généraux === */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    color: #333;
    margin: 30px 0;
}

/* === Grille des articles === */
.articles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 20px;
}

/* === Carte de l'article === */
.article-card {
    width: 30%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.article-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* === Image de l'article === */
.article-card img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

/* === Contenu de l'article === */
.article-content {
    padding: 15px;
    text-align: center;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #333;
}

.article-content p {
    font-size: 1rem;
    color: #666;
    margin-top: 8px;
}

/* === Bouton "Lire plus" === */
.article-content .btn {
    display: inline-block;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: #007bff;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.article-content .btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* === Section Article Complet === */
#article {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: left;
}

/* === Titre de l'article === */
#article h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

/* === Informations sur la publication === */
#article p small {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 20px;
}

/* === Image de l'article === */
#article img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* === Contenu de l'article === */
#article-content {
    font-size: 1.2rem;
    color: #444;
    line-height: 1.6;
    text-align: justify;
}

/* === Bouton Retour au blog === */
.back-to-blog {
    display: block;
    width: fit-content;
    margin: 30px auto 0;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: #007bff;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
    text-align: center;
}

.back-to-blog:hover {
    background: #0056b3;
    transform: scale(1.05);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .article-card {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        flex-direction: column;
    }

    .article-card {
        width: 90%;
        margin: auto;
    }

    #article {
        padding: 15px;
    }

    #article h1 {
        font-size: 1.8rem;
    }

    #article-content {
        font-size: 1rem;
    }

    .back-to-blog {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}
