/* =================================================================
   Meerlenz — Feuille de style
   Palette sobre type galerie d'art. Pas de framework — CSS pur.
   ================================================================= */

:root {
    --ink:    #3a2f26;            /* brun foncé chaud — texte */
    --bone:   #f4ede0;            /* crème sable — fond */
    --sand:   #e7ddc9;            /* sable doux — vignettes & médias */
    --muted:  #7a6748;            /* taupe chaud — texte secondaire */
    --accent: #a8503c;            /* terre cuite */
    --hairline: rgba(58, 47, 38, .14);
    --radius: 6px;                /* arrondi doux */
    --font: 'Inter', system-ui, sans-serif;
    --container: 1120px;
}

/* ---- Reset & bases ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bone);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s ease; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
header { border-bottom: 1px solid var(--hairline); }
.top {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.brand h1 { font-size: 28px; font-weight: 500; letter-spacing: -.01em; }
.brand p { font-family: var(--font); font-size: 12px; color: var(--muted); margin-top: 4px; }
.lang { display: flex; gap: 14px; font-family: var(--font); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; }
.lang a { color: var(--muted); }
.lang a.active { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 4px; }

nav ul {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    list-style: none;
    font-family: var(--font);
    font-size: 14px;
}
nav a { color: var(--muted); }
nav a:hover, nav a.active { color: var(--ink); }
nav a.active { font-weight: 500; }

/* ---- Main ---- */
main { padding: 40px 0 80px; min-height: 60vh; }

/* ---- Home hero ---- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
}
.hero h2 { font-size: 56px; font-weight: 400; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 16px; }
.hero .sub { font-family: var(--font); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.hero .lead { font-size: 20px; margin-bottom: 30px; }
.hero-img {
    aspect-ratio: 4 / 5;
    background: var(--sand);
    overflow: hidden;
    border-radius: var(--radius);
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Boutons ---- */
.btn {
    display: inline-block;
    font-family: var(--font);
    font-size: 12px;
    letter-spacing: .15em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
}
.btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Sections cards ---- */
.cards-section h2, .cards-section h3, .year-section h3 {
    font-family: var(--font);
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 28px;
}
.year-section { margin-bottom: 64px; }
.year-section .year-label {
    font-family: var(--font);
    font-weight: 400;
    letter-spacing: .15em;
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none;
}
.card { display: block; }
.card-img {
    aspect-ratio: 4 / 3;
    background: var(--sand);
    overflow: hidden;
    margin-bottom: 14px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(58, 47, 38, .06);
    transition: box-shadow .3s ease;
}
.card-img.placeholder { background: rgba(58, 47, 38, .05); }
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.card:hover .card-img img { transform: scale(1.04); }
.card:hover .card-img { box-shadow: 0 12px 28px rgba(58, 47, 38, .15); }
.card-img-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.card-img-text span {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    transition: color .2s ease;
}
.card:hover .card-img-text span { color: var(--accent); }
.card-date { font-family: var(--font); font-size: 12px; color: var(--muted); }
.card-title { font-size: 18px; font-weight: 500; margin-top: 4px; }
.card:hover .card-title { color: var(--accent); }

/* ---- Article (curriculum, post) ---- */
article h2 { font-size: 36px; font-weight: 500; margin-bottom: 8px; }
article h2.centered { text-align: center; margin-bottom: 40px; }
.page-sub {
    font-family: var(--font);
    font-size: 12px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 40px;
}
.prose-narrow { max-width: 68ch; margin: 0 auto; }
.back-link {
    display: inline-block;
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.back-link:hover { color: var(--ink); }
.post-header { text-align: center; margin: 40px 0; }
.post-header .post-date { font-family: var(--font); font-size: 13px; color: var(--muted); }
.post-header h2 { font-size: 36px; margin-top: 8px; }

/* ---- Blocs de contenu (prose) ---- */
.prose {
    max-width: 68ch;
    margin: 0 auto;
}
.prose p {
    margin-bottom: 1.2em;
    font-size: 18px;
    line-height: 1.7;
}
.prose h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 1.8em;
    margin-bottom: .5em;
    color: var(--ink);
}
.prose figure {
    margin: 2.5em -24px;
}
.prose figure img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: var(--radius);
}
.prose figcaption {
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 8px;
}

/* ---- Page galerie (gallery.php) — la prose contient surtout des images ---- */
.gallery-grid .prose figure {
    margin: 0;
}

/* ---- Contact ---- */
.contact {
    max-width: 50ch;
    margin: 0 auto;
    text-align: center;
}
.contact h2 { margin-bottom: 40px; }
.contact-name { font-size: 22px; margin-bottom: 4px; }
.contact-line { font-size: 18px; color: var(--ink); }
.contact-line.muted { color: var(--muted); margin-bottom: 24px; }
.contact-label {
    font-family: var(--font);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 16px;
}
.contact-value { font-size: 18px; }
.contact-value a:hover { color: var(--accent); }
.contact-block + .contact-block { margin-top: 22px; }
.contact-line a { color: var(--accent); }
.contact-line a:hover { color: var(--ink); }

/* ---- Error pages ---- */
.error { text-align: center; padding: 40px 0; }
.error h2 { font-size: 72px; margin-bottom: 20px; }
.error p { font-size: 18px; margin-bottom: 16px; }

/* ---- Footer ---- */
footer { margin-top: 64px; border-top: 1px solid var(--hairline); }
footer .container {
    padding: 28px 24px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
footer a:hover { color: var(--ink); }

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(40, 32, 25, .96);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox figure {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
}
.lightbox figcaption {
    color: rgba(244, 237, 224, .85);
    font-family: var(--font);
    font-size: 13px;
    margin-top: 16px;
    text-align: center;
}
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--bone);
}
.lb-close { top: 20px; right: 28px; font-size: 32px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 48px; padding: 16px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; }
    .hero h2 { font-size: 42px; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    nav ul { gap: 16px; font-size: 13px; }
    article h2 { font-size: 28px; }
    .post-header h2 { font-size: 28px; }
}
@media (max-width: 500px) {
    .cards { grid-template-columns: 1fr; }
    .top { flex-direction: column; align-items: flex-start; }
}
