/* style.css */
:root {
    --primary-color: #1c74cd; /* Bleu foncé Grand-Sud */
    --secondary-color: #d32f2f; /* Rouge pour les accents */
    --light-gray: #f4f4f4;
    --dark-gray: #333;
    --font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Assure que le body prend au moins toute la hauteur de la fenêtre */
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

header p {
    margin: 0.5rem 0 0;
    font-style: italic;
    opacity: 0.9;
}

main {
    padding: 2rem;
    width: 100%; /* Nécessaire pour le centrage avec max-width dans un flex container */
    max-width: 1200px;
    margin: 0 auto; /* Centre le contenu horizontalement */
    flex-grow: 1; /* Fait en sorte que le contenu principal grandisse pour pousser le footer en bas */
}

.controls {
    margin-bottom: 2rem;
    text-align: center;
}

.cta-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #30723e; /* Un rouge un peu plus foncé */
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Styles pour la Lightbox (l'affichage en grand) --- */
.lightbox {
    display: none; /* Cachée par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.5s;
}

.lightbox.active {
    display: flex; /* Affichée quand active */
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    animation: zoom 0.6s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoom {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
}

.caption {
    margin-top: 15px;
    color: #ccc;
    text-align: center;
    font-size: 1.2rem;
    padding: 0 1rem;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

.prev {
    left: 10px;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 10px;
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background-color: rgba(211, 47, 47, 0.8); /* Rouge accent */
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--dark-gray);
    color: var(--light-gray);
    margin-top: 2rem;
}
