/* style.css */

body {
    font-family: sans-serif; /* Police de caractères générale */
    margin: 0; /* Supprime les marges par défaut du body */
    padding: 0;
    background-color: #f4f4f4; /* Couleur de fond */
    color: #333; /* Couleur du texte */
}

h1 {
    text-align: center; /* Centre le titre h1 */
    margin-top: 20px;
    margin-bottom: 30px;
    color: #007bff; /* Couleur bleue pour le titre principal */
}

.articles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centre les articles horizontalement */
    padding: 20px;
    max-width: 1200px; /* Largeur maximale du conteneur */
    margin: 0 auto; /* Centre le conteneur */
}

.article {
    width: calc(33.33% - 20px); /* 3 articles par ligne avec des marges */
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Ombre légère */
    overflow: hidden; /* Empêche les images de dépasser */
    transition: transform 0.2s; /* Ajoute une transition pour l'effet de hover */
}

.article:hover {
    transform: translateY(-5px); /* Lève légèrement l'article au survol */
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.15); /* Ombre plus prononcée au survol */
}

.article img {
    width: 100%;
    height: 200px; /* Hauteur fixe pour les images (à ajuster) */
    object-fit: cover; /* Assure que l'image couvre tout l'espace */
    border-bottom: 1px solid #ddd; /* Bordure inférieure pour séparer l'image du texte */
}

.article h2 {
    font-size: 1.2em;
    margin: 10px;
    color: #0056b3; /* Bleu plus foncé pour les titres d'articles */
}

.article p {
    margin: 10px;
    font-size: 0.9em;
    line-height: 1.4; /* Améliore la lisibilité du texte */
}

.article a {
    display: block;
    margin: 10px;
    padding: 8px 15px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.article a:hover {
    background-color: #0056b3;
}

/* Styles pour la page d'administration */
form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

form input[type="text"],
form input[type="number"],
form input[type="email"],
form textarea,
form input[type="file"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

form textarea {
    height: 100px;
    resize: vertical; /* Permet le redimensionnement vertical */
}

form input[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

form input[type="submit"]:hover {
    background-color: #0056b3;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}