:root {
    --bg-color: #f8f4e8;
    --text-color: #111111;
    --accent-color: #333333;
    --border-color: #dddddd;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#f5e9d3 0.5px, transparent 0.5px);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header, footer {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

footer {
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    margin-top: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

nav a:hover {
    color: var(--accent-color);
}

h1, h2, h3 {
    margin-bottom: 1rem;
}

.bio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.bio-content p {
    width: 100%;
    text-align: justify;
}

.bio-photo {
    max-width: 300px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ── Page index : grille des galeries ── */
.gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 2rem 1.5rem;
    margin: 2rem 0;
}

/* Wrapper vignette + label */
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Vignette cliquable */
.gallery-thumbnail {
    display: block;
    width: 200px;
    height: 150px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    text-decoration: none;
}

.gallery-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 3px solid #fff;
    box-sizing: border-box;
}

/* Nom centré sous la vignette */
.gallery-label {
    display: block;
    width: 200px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Page gallery : grille des photos ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-grid a {
    text-decoration: none;
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    width: 200px;
    height: 150px;
    margin: 0 auto;
}

.gallery-grid a:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 3px solid #fff;
    box-sizing: border-box;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: #ccc;
}

/* Texte d'introduction des galeries */
.gallery-intro {
    text-align: justify;
    margin: 1.5rem auto;
    line-height: 1.6;
    max-width: 800px;
}

/* Bouton retour */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.1s;
    margin: 2rem auto 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-back:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-back:active {
    transform: translateY(0);
}

/* Formulaire contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.contact-form button {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.contact-form button:hover {
    background-color: var(--accent-color);
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    nav ul { flex-direction: column; gap: 0.5rem; }
    .bio-content { flex-direction: column; }
}
