/* ============================================================
   Erlandsen — feuille de style modernisée (prototype)
   Palette héritée : gris / blanc / bleu — affinée.
   Sans dépendance externe (polices système), 100% statique.
   ============================================================ */

:root {
    --bg:          #ececeb;   /* gris clair de fond (hérité du gris #999, éclairci) */
    --surface:     #ffffff;   /* cartes / contenu (blanc d'origine) */
    --ink:         #1c1c1e;   /* texte principal */
    --ink-soft:    #55565a;   /* texte secondaire */
    --line:        #d9d9d7;   /* filets / bordures */
    --accent:      #26467a;   /* bleu (hérité de #000099, adouci) */
    --accent-soft: #4a6ea5;
    --dark:        #101012;   /* fond sombre (galeries photo, hérité du noir) */

    --serif: Georgia, "Times New Roman", Times, serif;
    --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

    --wrap: 1080px;
    --gap: clamp(1.2rem, 3vw, 2.4rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: .01em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }

/* ---------- En-tête ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(236, 236, 235, .88);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 64px; gap: 1rem;
}
.brand { display: flex; align-items: baseline; gap: .55rem; }
.brand .name {
    font-family: var(--serif); font-size: 1.35rem; letter-spacing: .18em;
    text-transform: uppercase; color: var(--ink);
}
.brand .tag { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.brand:hover { text-decoration: none; }

.nav { display: flex; gap: 1.6rem; }
.nav a {
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-soft);
}
.nav a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 620px) {
    .nav { gap: 1rem; }
    .nav a { font-size: .68rem; letter-spacing: .1em; }
    .brand .tag { display: none; }
}

/* Barre de langue */
.langbar {
    display: flex; gap: .35rem; justify-content: flex-end;
    padding-bottom: .5rem; margin-top: -.3rem;
}
.langbar a {
    font-size: .68rem; letter-spacing: .08em; font-weight: 600;
    color: var(--ink-soft); padding: .12rem .45rem; border-radius: 5px;
    line-height: 1.4;
}
.langbar a:hover { color: var(--accent); background: rgba(38,70,122,.08); text-decoration: none; }
.langbar a.active { color: #fff; background: var(--accent); }
@media (max-width: 620px) { .langbar { justify-content: center; } }

/* ---------- Hero (typographique, indépendant de la résolution) ---------- */
.hero {
    position: relative; min-height: min(62vh, 520px);
    display: flex; align-items: flex-end;
    color: #fff; overflow: hidden;
    background:
        radial-gradient(120% 90% at 15% 0%, #26262b 0%, rgba(38,38,43,0) 55%),
        linear-gradient(180deg, #17171a 0%, #0d0d0f 100%);
}
.hero::before {
    /* fine trame en points, évoque le grain photographique */
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 4px 4px;
}
.hero .hero-inner { position: relative; z-index: 2; padding-block: clamp(2.4rem, 7vw, 5rem); }
.hero .hero-inner::before {
    content: ""; display: block; width: 54px; height: 2px;
    background: var(--accent-soft); margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); margin: 0 0 .4rem; }
.hero .kicker { font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.82); margin-bottom: 1rem; }
.hero .lede { max-width: 42ch; font-size: clamp(1rem, 2.4vw, 1.2rem); color: rgba(255,255,255,.9); }
.hero .url { margin-top: 1rem; font-family: var(--serif); font-style: italic; color: rgba(255,255,255,.7); }

/* ---------- Sections ---------- */
section { padding-block: clamp(2.6rem, 7vw, 5rem); }
.section-label {
    font-size: .74rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--accent); margin-bottom: .9rem;
}
.prose { max-width: 62ch; font-size: 1.06rem; }
.prose p { margin-block: 0 1.1rem; }
.prose .big { font-size: 1.2rem; }

.rule { border: 0; border-top: 1px solid var(--line); margin-block: clamp(2rem,5vw,3.5rem); }

/* ---------- Mémorial ---------- */
.memorial {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.6rem, 5vw, 3rem);
    max-width: 62ch;
    box-shadow: 0 14px 40px -28px rgba(16,16,18,.4);
}
.memorial h2 { font-size: 1.7rem; margin: 0 0 1rem; }
.memorial .dates { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }
.memorial .family { margin-top: 1.2rem; font-size: .95rem; color: var(--ink-soft); }
.memorial .family strong { color: var(--ink); font-weight: 600; }

/* ---------- Grille de la collection ---------- */
.grid {
    display: grid; gap: 1.1rem;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    margin-top: 1.6rem;
}
.card {
    display: block; background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden; color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
    transform: translateY(-3px); text-decoration: none;
    box-shadow: 0 18px 42px -26px rgba(16,16,18,.45); border-color: var(--accent-soft);
}
.card .thumb { aspect-ratio: 4 / 3; background: #cfcfcd; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: .9rem 1.05rem 1.1rem; }
.card .body h3 { font-size: 1.15rem; margin: 0 0 .25rem; }
.card .body p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.card .region { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

/* ---------- Pied de page ---------- */
.site-footer {
    background: var(--dark); color: rgba(255,255,255,.72);
    padding-block: clamp(2.4rem, 6vw, 3.6rem); margin-top: 2rem;
}
.site-footer a { color: #fff; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; justify-content: space-between; }
.site-footer h4 { font-family: var(--serif); color: #fff; font-weight: 400; margin: 0 0 .5rem; font-size: 1.05rem; }
.site-footer .small { font-size: .82rem; line-height: 1.9; }
.site-footer .memo { max-width: 40ch; font-size: .85rem; }
.site-footer .copyright { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .78rem; color: rgba(255,255,255,.5); }

/* ============================================================
   Galerie + lightbox
   ============================================================ */
.breadcrumb { padding-top: 1.5rem; font-size: .8rem; color: var(--ink-soft); display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .here { color: var(--ink); }

.gallery-head { padding-top: 1rem; padding-bottom: .5rem; }
.gallery-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .2rem 0 .7rem; }
.gallery-intro { max-width: 60ch; color: var(--ink-soft); font-size: 1.06rem; }

.gallery-section { padding-block: 1.2rem; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 1.4rem 0 1.1rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); }

.prints { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.print { margin: 0; }
.thumb {
    display: block; width: 100%; padding: 8px; cursor: zoom-in;
    background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
    box-shadow: 0 8px 22px -18px rgba(0,0,0,.45);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.thumb:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(0,0,0,.55); border-color: var(--accent-soft); }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 3px; background: #111; }
.print figcaption { font-size: .82rem; color: var(--ink-soft); font-style: italic; margin-top: .45rem; text-align: center; }

.gallery-back { padding-block: 2.2rem 1rem; }
.gallery-back a { font-size: .9rem; letter-spacing: .04em; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(9,9,11,.95); }
.lb.open { display: flex; }
.lb-figure { margin: 0; max-width: 92vw; text-align: center; }
.lb-img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; background: #000; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.lb-cap { color: rgba(255,255,255,.82); font-family: var(--serif); font-style: italic; font-size: 1.02rem; margin-top: 1.1rem; min-height: 1.2em; }
.lb-btn { position: fixed; background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer; line-height: 1; user-select: none; transition: color .15s ease; }
.lb-btn:hover { color: #fff; }
.lb-close { top: 14px; right: 22px; font-size: 2.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: clamp(2.6rem, 6vw, 3.6rem); padding: .6rem 1rem; }
.lb-prev { left: .5vw; } .lb-next { right: .5vw; }
.lb-count { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: .82rem; letter-spacing: .12em; }
@media (max-width: 620px) {
    .lb-prev, .lb-next { font-size: 2.4rem; padding: .4rem .5rem; }
    .lb-cap { font-size: .92rem; }
}

/* ============================================================
   Réflexions (essais de Tom + livres)
   ============================================================ */
.prose-page { max-width: 68ch; }
.prose-page h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: .3rem 0 1.3rem; }
.essay p { margin: 0 0 1.15rem; font-size: 1.05rem; line-height: 1.78; }
.essay-langs { display: flex; gap: .4rem; margin-bottom: 1.4rem; }
.essay-langs a { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .22rem .65rem; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); }
.essay-langs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.essay-langs a:hover { text-decoration: none; border-color: var(--accent-soft); }
.books { list-style: none; padding: 0; margin: 1.1rem 0 0; column-count: 2; column-gap: 2.6rem; }
.books li { break-inside: avoid; margin-bottom: .55rem; font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 640px) { .books { column-count: 1; } }
