/* ═══════════════════════════════════════════════════════════════
   Lens, de la mine au musée — feuille de style commune
   Charbon, brique des cités, or du « Sang et Or », bleu de la Manche
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink: #1d1b19;          /* charbon */
  --ink-2: #2b2825;
  --paper: #f6f1e8;        /* papier */
  --paper-2: #ece4d6;
  --card: #fffdf9;
  --brick: #9c3d27;        /* brique des cités */
  --brick-dark: #7a2e1d;
  --gold: #d4a12a;         /* or */
  --sea: #3f7d95;          /* Manche */
  --text: #2a2622;
  --muted: #6b645c;
  --line: #d9cfbf;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(29,27,25,.06), 0 6px 18px rgba(29,27,25,.07);
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brick); text-underline-offset: 3px; }
a:hover { color: var(--brick-dark); }
strong { font-weight: 600; }

.container { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29,27,25,.96);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--gold);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-brand {
  font-family: var(--display); font-weight: 800; font-size: 1.45rem;
  letter-spacing: .06em; text-transform: uppercase;
  color: #fff; text-decoration: none;
}
.nav-brand span { color: var(--gold); }
.nav-brand:hover { color: #fff; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-family: var(--sans); font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.78); text-decoration: none;
  padding: 8px 12px; border-radius: 4px;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a[aria-current="page"] { color: var(--gold); }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: .25s; }

@media (max-width: 900px) {
  .nav-burger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 63px; left: 0; right: 0;
    flex-direction: column; background: var(--ink); padding: 8px 12px 16px;
    border-bottom: 3px solid var(--gold);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: .95rem; padding: 12px; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Hero d'accueil ─────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1d1b19 0%, #2e2a26 52%, #4a5a62 78%, #8fb3bf 100%);
  color: #fff;
  padding: 88px 0 0;
}
.hero-text { position: relative; z-index: 2; text-align: center; padding: 0 20px; }
.eyebrow {
  display: inline-block;
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: .95; letter-spacing: .01em; text-transform: uppercase;
  margin: 14px 0 18px;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub {
  max-width: 620px; margin: 0 auto;
  font-size: 1.15rem; color: rgba(255,255,255,.82);
}
.hero-skyline { display: block; width: 100%; height: auto; margin-top: 40px; }
.hero-legend {
  position: absolute; z-index: 2; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
  font-family: var(--sans); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
@media (max-width: 640px) { .hero-legend span:nth-child(2), .hero-legend span:nth-child(4) { display: none; } }

/* ── En-tête des pages intérieures ──────────────────────────── */
.page-head {
  background: var(--ink); color: #fff;
  padding: 64px 0 56px;
  position: relative; overflow: hidden;
}
.page-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--brick) 0 40px, var(--brick-dark) 40px 42px);
}
.page-head h1 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; margin: 12px 0 16px;
}
.page-head p { max-width: 680px; color: rgba(255,255,255,.8); font-size: 1.12rem; }
.page-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px;
}
.page-toc a {
  font-family: var(--sans); font-size: .8rem; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 5px 13px;
}
.page-toc a:hover { border-color: var(--gold); color: var(--gold); }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.dark { background: var(--ink); color: rgba(255,255,255,.86); border-top: 0; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark a { color: var(--gold); }
.section.tint { background: var(--paper-2); border-top: 0; }
.section.sea { background: linear-gradient(180deg, #e7f0f2, #f6f1e8); }

.label {
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--brick);
}
.section.dark .label { color: var(--gold); }
h2 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.02; letter-spacing: .01em;
  color: var(--ink); margin: 8px 0 18px;
}
h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.55rem;
  line-height: 1.15; color: var(--ink); margin-bottom: 8px; letter-spacing: .01em;
}
h4 { font-family: var(--sans); font-size: .95rem; font-weight: 600; margin: 18px 0 4px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; margin-bottom: 36px; }
.section.dark .lead { color: rgba(255,255,255,.7); }
p + p, ul + p, ol + p { margin-top: .9em; }
.prose ul, .card ul { margin: .6em 0 0 1.2em; }
.prose li + li, .card li + li { margin-top: .25em; }

/* ── Grilles et cartes ──────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: start; }
.split.reverse { grid-template-columns: .85fr 1.15fr; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; gap: 28px; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px; box-shadow: var(--shadow);
}
.section.dark .card { background: var(--ink-2); border-color: #3a3631; box-shadow: none; }
.card .meta {
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
  margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
}
.section.dark .card .meta { color: rgba(255,255,255,.55); }
.card .more { font-family: var(--sans); font-size: .85rem; margin-top: 14px; }

.badge {
  font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 3px;
  background: var(--paper-2); color: var(--ink);
}
.badge.unesco { background: var(--ink); color: var(--gold); }
.badge.free { background: #e3efe0; color: #2f5a2a; }
.badge.closed { background: #f6dcd5; color: var(--brick-dark); }

/* Cartes-liens de l'accueil */
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 230px; padding: 22px; border-radius: var(--radius);
  color: #fff; text-decoration: none; position: relative; overflow: hidden;
  background: var(--ink) center / cover no-repeat;
  transition: transform .2s;
}
.tile::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,27,25,.1) 20%, rgba(29,27,25,.88) 100%);
}
.tile > * { position: relative; }
.tile:hover { transform: translateY(-3px); color: #fff; }
.tile .num { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--gold); letter-spacing: .1em; }
.tile h3 { color: #fff; font-size: 1.75rem; text-transform: uppercase; margin: 2px 0 6px; }
.tile p { font-size: .95rem; color: rgba(255,255,255,.82); line-height: 1.5; }

/* Chiffres clés */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin-top: 10px; }
.stat { padding: 18px 20px; border-left: 3px solid var(--gold); }
.stat b { display: block; font-family: var(--display); font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--ink); }
.section.dark .stat b { color: #fff; }
.stat span { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.section.dark .stat span { color: rgba(255,255,255,.6); }

/* ── Figures ────────────────────────────────────────────────── */
figure { margin: 0; }
figure img { border-radius: var(--radius); width: 100%; background: var(--paper-2); }
figcaption {
  font-family: var(--sans); font-size: .78rem; color: var(--muted);
  margin-top: 8px; line-height: 1.45;
}
.section.dark figcaption { color: rgba(255,255,255,.55); }
figcaption .credit { opacity: .8; font-style: italic; }
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 26px; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.gallery.tall img { aspect-ratio: 3 / 4; }
.figure-stack { display: grid; gap: 18px; }

/* Visionneuse */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(15,14,13,.94); align-items: center; justify-content: center; padding: 24px;
  flex-direction: column; gap: 12px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 4px; }
.lightbox p { font-family: var(--sans); font-size: .85rem; color: rgba(255,255,255,.8); text-align: center; max-width: 640px; }
.lightbox button {
  position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff;
  font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ── Encadrés ───────────────────────────────────────────────── */
.note {
  border-left: 4px solid var(--gold); background: #fbf5e4;
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .98rem; margin: 22px 0;
}
.note.warn { border-color: var(--brick); background: #f9e9e4; }
.note.sea { border-color: var(--sea); background: #e6f0f3; }
.note strong:first-child { font-family: var(--sans); font-size: .82rem; letter-spacing: .04em; }
.section.dark .note { background: var(--ink-2); color: rgba(255,255,255,.85); }

blockquote {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2; color: var(--ink); border-left: 4px solid var(--brick);
  padding: 4px 0 4px 22px; margin: 28px 0;
}
blockquote cite {
  display: block; font-family: var(--sans); font-size: .8rem; font-style: normal;
  font-weight: 400; color: var(--muted); margin-top: 10px;
}
.section.dark blockquote { color: #fff; border-color: var(--gold); }

/* ── Frise chronologique ────────────────────────────────────── */
.timeline { position: relative; margin-top: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 98px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--gold), var(--brick));
}
.tl-item { display: grid; grid-template-columns: 86px 1fr; gap: 36px; padding: 0 0 34px; position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: 92px; top: 8px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--brick);
}
.section.dark .tl-item::before { background: var(--ink); border-color: var(--gold); }
.tl-date {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1.15;
  text-align: right; color: var(--brick);
}
.section.dark .tl-date { color: var(--gold); }
.tl-date small { display: block; font-family: var(--sans); font-weight: 500; font-size: .72rem; color: var(--muted); }
.tl-body h3 { font-size: 1.4rem; }
.tl-body figure { margin-top: 16px; max-width: 520px; }
.tl-body figure.wide { max-width: none; }
.tl-body .gallery { margin-top: 16px; }
@media (max-width: 640px) {
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .tl-item::before { left: 1px; }
  .tl-date { text-align: left; }
}

/* ── Tableaux ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; background: var(--card); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); }
td:first-child { font-weight: 600; white-space: nowrap; }

/* ── Itinéraire suggéré ─────────────────────────────────────── */
.route { counter-reset: step; display: grid; gap: 14px; margin-top: 18px; }
.route li { list-style: none; position: relative; padding-left: 52px; }
.route li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  background: var(--brick); color: #fff;
}
.section.dark .route li::before { background: var(--gold); color: var(--ink); }

/* ── Pied de page ───────────────────────────────────────────── */
footer { background: var(--ink); color: rgba(255,255,255,.65); padding: 56px 0 30px; font-family: var(--sans); font-size: .86rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
footer h4 { color: #fff; font-family: var(--display); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
footer a { color: rgba(255,255,255,.8); text-decoration: none; }
footer a:hover { color: var(--gold); }
footer ul { list-style: none; }
footer li + li { margin-top: 6px; }
.footer-bottom { border-top: 1px solid #3a3631; margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .78rem; color: rgba(255,255,255,.45); }

/* ── Divers ─────────────────────────────────────────────────── */
.updated { font-family: var(--sans); font-size: .78rem; color: var(--muted); margin-top: 26px; }
.sources { font-family: var(--sans); font-size: .82rem; columns: 2 300px; column-gap: 36px; }
.sources li { break-inside: avoid; margin: 0 0 6px 1em; }
.btn {
  display: inline-block; font-family: var(--sans); font-size: .88rem; font-weight: 600;
  padding: 11px 20px; border-radius: 4px; text-decoration: none;
  background: var(--gold); color: var(--ink);
}
.btn:hover { background: #e2b443; color: var(--ink); }
.btn.ghost { background: none; border: 1px solid currentColor; color: inherit; }
.mt { margin-top: 28px; }
.center { text-align: center; }

/* Photo commentée : étiquettes posées sur l'image */
.paysage-img { position: relative; }
.paysage-img img { border-radius: var(--radius); }
.pin {
  position: absolute; transform: translate(-50%, -100%);
  font-family: var(--sans); font-size: .74rem; font-weight: 600; line-height: 1.2;
  background: rgba(29,27,25,.88); color: #fff; padding: 5px 9px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; margin-top: -8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.pin::after {
  content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(29,27,25,.88);
}
.pin-gold { background: var(--gold); color: var(--ink); }
.pin-gold::after { border-top-color: var(--gold); }
@media (max-width: 640px) { .pin { font-size: .62rem; padding: 3px 6px; } }
