/* Variables pour gérer plus facilement les couleurs */
:root {
    --bg-color: #fdfaf5;
    --main-text: #3a1b1b;
    --accent: #515151;
    --border-color: #d7ccc8;
}

/* Prise en compte automatique du mode sombre (Bleu des Abysses) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #02225D;
        --main-text: #e6e6e6;
        --accent: #ebeff2;
        --border-color: #1a428a;
    }
}

* { box-sizing: border-box; }

.page-wrapper { padding: 1rem; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-color);
    color: var(--main-text);
    transition: background-color 0.3s, color 0.3s;
}

/* Liens */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* En-têtes (Header & Page-header regroupés) */
header, .page-header { text-align: center; }

header h1, .page-header h1 {
    font-size: clamp(1.9rem, 2.5vw, 2.4rem);
    color: var(--main-text);
    margin: 0 0 0.5rem;
}

header p, .page-header p {
    margin: 0 auto;
    line-height: 1.5;
    color: var(--main-text);
    opacity: 0.9;
    max-width: 720px;
}

/* Boutons */
.nav-button {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(128, 0, 0, 0.25);
}
.nav-button:hover, .nav-button:focus { background: #a00000; }

/* Galerie et mises en page */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 0.35rem;
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-note {
    text-align: center;
    margin: 2rem 0;
    color: var(--main-text);
    opacity: 0.8;
    font-size: 0.95rem;
    display: block;
    width: 100%;
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--main-text);
    margin-top: 1rem;
}
.footer-separator {
    display: block; 
    width: 100%; 
    height: 2px; 
    background: var(--border-color); 
    border: none; 
    margin-top: 1rem;
}

/* Lightbox simplifiée */
.lightbox {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.85); z-index: 1000;
}
.lightbox.visible, .lightbox.active { display: flex; }