/* Variables de base */
:root {
    --bg-color: #fdfaf5;
    --text-color: #3a1b1b;
    --accent-color: #515151;
    --border-color: #f7dc8b;
    --card-bg: #fff8f6;
}

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

* { box-sizing: border-box; }

.page-wrapper { padding: 1rem; }

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

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

/* En-têtes et texte */
header h1, .page-header h1 {
    color: var(--text-color);
    font-size: clamp(1.9rem, 2.5vw, 2.4rem);
    margin: 0.5rem 0;
}

.page-header {
    text-align: center;
    padding: 32px 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    margin-bottom: 1.25rem;
}

.page-header p {
    color: var(--text-color);
    opacity: 0.9;
}

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

/* Galerie */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
}

.gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: 0.35rem;
    background: var(--card-bg);
    aspect-ratio: 4 / 3;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid a:hover { transform: translateY(-2px); box-shadow: 0 14px 24px rgba(0, 0, 0, 0.12); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none; align-items: center; justify-content: center;
    padding: 1rem; z-index: 1000;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 0.35rem; box-shadow: 0 0 30px rgba(0, 0, 0, 0.45); }

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; border: none; background: rgba(50, 50, 50, 0.65);
    color: #fff; padding: 0.5rem 0.8rem; cursor: pointer; border-radius: 0.35rem;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 600px) { .lightbox-prev, .lightbox-next { display: none; } }

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