:root {
    --primary-color: #333;
    --secondary-color: #fff;
    --accent-color: #007bff;
    --background-color: #f4f4f4;
    --card-background: #fff;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--primary-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

header {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

header p {
    font-size: 1.2em;
    color: #666;
}

section {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

section h2 {
    font-size: 2em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5em;
    color: #444;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
    color: #555;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: start; /* Les boîtes s'alignent en haut */
}

.gallery-item {
    background-color: #eee;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex; /* Utilise Flexbox pour un alignement vertical */
    flex-direction: column;
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto; /* L'image conserve sa hauteur d'origine */
    display: block;
}

figcaption {
    padding: 15px;
    text-align: center;
    background-color: var(--card-background);
    border-top: 2px solid var(--accent-color); /* Ligne bleue */
    margin-top: auto; /* Pousse la légende vers le bas */
}

.book {
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    margin-bottom: 25px;
}

footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    color: #888;
    margin-top: auto;
    border-top: 1px solid #ddd;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

    section {
        padding: 20px;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

