/* ═══════════════════════════════════════════════════════════
   web.css — Styles communs à toutes les pages web du site
   ─────────────────────────────────────────────────────────
   SECTION 1 : Variables unifiées (--w-*) + échelle typo
   SECTION 2 : Composants partagés (hp-*) : header, card,
               grid, section, footer, boutons
   SECTION 3 : Responsive composants partagés
   SECTION 4 : Narrative-web (--nw-*) : sidenav, hero, map…
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   SECTION 1 — VARIABLES COMMUNES
───────────────────────────────────────────────────────── */
:root {
  /* Palette vitrine */
  --w-bg        : #ffe6d6;
  --w-accent    : #5D28E6;
  --w-accent-dk : #361192;
  --w-ink       : #1a1a18;
  --w-ink-soft  : #3d3d38;
  --w-ink-muted : #7a7a72;
  --w-rule      : #e2ddd7;
  --w-paper     : #f8f5f4;
  --w-border    : 0.15rem;
  --w-radius    : 2px;
  --w-gutter    : 3rem;
  --w-max-w     : 1360px;
  --w-trans     : 0.22s ease;
  --w-font      : 'AM Dehors', 'DM Sans', sans-serif;

  /* Échelle typographique */
  --fs-2xs : 0.68rem;    /* méta, tags */
  --fs-xs  : 0.75rem;    /* labels secondaires */
  --fs-sm  : 0.875rem;   /* boutons, petits UI */
  --fs-md  : 1.125rem;   /* corps, nav, cartes */
  --fs-lg  : 1.5rem;     /* marque/brand */
  --fs-xl  : 2.5rem;     /* titres de section */
  --fs-2xl : 3rem;       /* gros titres */
  --fs-hero: clamp(2rem, 4.5vw, 4rem); /* héros projet */

  /* Narrative-web (alias → w-*) */
  --nw-ink           : var(--w-ink);
  --nw-ink-soft      : var(--w-ink-soft);
  --nw-ink-muted     : var(--w-ink-muted);
  --nw-paper         : var(--w-paper);
  --nw-paper-warm    : #f4f1eb;
  --nw-rule          : #d8d4cc;
  --nw-accent        : var(--w-accent);
  --nw-accent-dark   : var(--w-accent-dk);
  --nw-tag-bg        : #e9e5dc;
  --nw-max-w         : var(--w-max-w);
  --nw-narrow        : 840px;
  --nw-sidenav-w     : 220px;
  --nw-transition    : var(--w-trans);
}

/* ─────────────────────────────────────────────────────────
   SECTION 2 — COMPOSANTS PARTAGÉS (pages vitrine)
───────────────────────────────────────────────────────── */

/* Body vitrine */
body[data-template='home'],
body[data-template='projects'],
body[data-template='about'],
body[data-template='tutos'],
body[data-template='actus'],
body[data-template='actu'],
body[data-template='tuto'] {
  background: var(--w-bg);
}

/* Wrapper */
.hp-wrapper {
  font-family: var(--w-font);
  color: var(--w-accent);
  background: var(--w-bg);
  min-height: 100vh;
  margin-left: var(--w-gutter);
  margin-right: var(--w-gutter);
  display: flex;
  flex-direction: column;
}

.hp-wrapper p {
  font-size: var(--fs-md);
  color: var(--w-accent);
  letter-spacing: 0.01rem;
  line-height: 1.4;
}

/* ── Header / Navigation ── */
.hp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  margin-left: var(--w-gutter);
  margin-right: var(--w-gutter);
  background: var(--w-bg);
  border-bottom: var(--w-border) solid var(--w-accent);
}

.hp-header__brand {
  font-size: var(--fs-lg);
  font-weight: bold;
  letter-spacing: 0.01em;
  color: var(--w-accent);
  text-decoration: none;
  text-transform: uppercase;
}

.hp-header__brand:hover {
  opacity: 0.6;
}

.hp-header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hp-nav__link {
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--w-accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--w-trans), border-color var(--w-trans);
}

.hp-nav__link:hover,
.hp-nav__link.is-active {
  color: var(--w-ink);
  border-bottom-color: var(--w-accent);
}

.hp-nav__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--w-accent);
  color: #fff;
  opacity: 0.75;
  transition: opacity var(--w-trans), transform var(--w-trans);
}

.hp-nav__panel:hover {
  opacity: 1;
  transform: scale(1.06);
}

/* ── Container / Section ── */
.hp-container {
  /*max-width: var(--w-max-w);*/
  margin: 0 auto;
}

.hp-section {
  padding: 2rem 0;
  /*border-top: var(--w-border) solid var(--w-accent);*/
}

.hp-section__header {
  margin-bottom: 3rem;
  border-bottom: var(--w-border) solid var(--w-accent);
}

.hp-section-title {
  font-size: var(--fs-xl);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--w-accent);
  margin: 0;
  padding-bottom: 2rem;
}

/* ── Eyebrow / Empty ── */
.hp-eyebrow {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-accent);
  margin-bottom: 1rem;
}

.hp-empty {
  color: var(--w-ink-muted);
  font-style: italic;
  font-size: var(--fs-sm);
}

/* ── Boutons ── */
.hp-btn {
  display: inline-block;
  text-decoration: none;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  padding: 0.65rem 1.4rem;
  border-radius: var(--w-radius);
  transition: all var(--w-trans);
}

.hp-btn--primary {
  background: var(--w-accent);
  color: #fff;
  margin: 1rem 0;
}

.hp-btn--primary:hover {
  background: var(--w-accent-dk);
}

/* ── Grille ── */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

/* 3 colonnes (home actualités, sections à 4 items) */
.hp-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Carte (hp-card) ── */
.hp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-bottom: var(--w-border) solid var(--w-accent);
}

body[data-template="tutos"] .{
  border-top: var(--w-border) solid var(--w-accent);
}

.hp-card__cover-link {
  display: block;
  overflow: hidden;
}

.hp-card__cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: var(--w-border) solid var(--w-accent);
}

.hp-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88) grayscale(8%);
  transition: transform 0.5s ease, filter 0.4s ease;
}

.hp-card:hover .hp-card__cover img {
  transform: scale(1.04);
  filter: brightness(1) grayscale(0%);
}

.hp-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--w-accent);
}

.hp-card__cover-placeholder span {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.hp-card__body {
  padding: 1.25rem 0;
  flex: 1;
}

.hp-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.4rem;
}

.hp-card__title a {
  color: var(--w-accent);
  text-decoration: none;
  transition: opacity var(--w-trans);
}

.hp-card__title a:hover {
  opacity: 0.75;
}

.hp-card__subtitle {
  font-size: var(--fs-md);
  color: var(--w-ink-soft);
  line-height: 1.45;
  margin: 0 0 0.5rem;
}

/*.hp-card__meta {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--w-ink-muted);
  margin: 0;
}*/

.hp-wrapper .hp-card__meta {
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--w-ink-muted);
  text-transform: uppercase;
  margin: auto 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--w-rule);
}

.hp-card__link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 0;
  color: var(--w-ink-muted);
  text-decoration: none;
  font-size: 1rem;
}

/* ── Footer partagé ── */
.hp-footer {
  border-top: var(--w-border) solid var(--w-accent);
  padding: 2rem 0;
  margin-top: auto;
}

.hp-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hp-footer__brand {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--w-ink-muted);
  margin: 0;
}

.hp-footer__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hp-footer__copy {
  font-size: var(--fs-2xs);
  color: var(--w-ink-muted);
  margin: 0;
}

.hp-footer__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--w-accent);
  color: #fff;
  opacity: 0.55;
  transition: opacity var(--w-trans);
}

.hp-footer__panel:hover {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────
   SECTION 3 — RESPONSIVE COMPOSANTS PARTAGÉS
───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hp-grid,
  .hp-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hp-header,
  .hp-wrapper { margin-left: 1.25rem; margin-right: 1.25rem; }
  .hp-header__nav { gap: 1.2rem; }
  .hp-section { padding: 3rem 0; }
  .hp-grid,
  .hp-grid--3 { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────
   SECTION 3.5 — GREEN AUDIO PLAYER
   Surcharge des couleurs par défaut (#566574 → variables --w-*)
───────────────────────────────────────────────────────── */

/* Conteneur figure */
figure.green-audio-player {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding: 1rem 1.25rem 0.8rem;
  border: var(--w-border) solid var(--w-accent);
  background: transparent;
  margin: 1.5rem 0 3rem !important;
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
  background: #FFF;
}

/* Spinner de chargement */
figure.green-audio-player .loading__spinner {
  border-top-color: var(--w-accent) !important;
}

/* ── Bouton play/pause ── */
figure.green-audio-player .play-pause-btn {
  flex-shrink: 0;
}

figure.green-audio-player .play-pause-btn svg .play-pause-btn__icon,
figure.green-audio-player .play-pause-btn svg path {
  fill: var(--w-accent) !important;
}

/* ── Timeline / Contrôles ── */
figure.green-audio-player .controls {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

figure.green-audio-player .controls__current-time,
figure.green-audio-player .controls__total-time {
  font-family: var(--w-font);
  font-size: var(--fs-2xs);
  color: var(--w-ink-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}


/* Piste (track) */
figure.green-audio-player .controls__slider.slider {
  background-color: var(--w-rule) !important;
  border-radius: 0 !important;
}

/* Progression */
figure.green-audio-player .controls__progress.gap-progress {
  background-color: var(--w-accent) !important;
  border-radius: 0 !important;
}

/* Pin de scrub */
figure.green-audio-player .progress__pin.pin {
  background: var(--w-accent) !important;
  box-shadow: none !important;
/*  border-radius: 0 !important;
  width: 10px !important;
  height: 10px !important;
  margin-top: -4px !important;
  margin-left: -5px !important;*/
}

/* ── Volume ── */
figure.green-audio-player .volume__speaker {
  fill: var(--w-accent) !important;
}

figure.green-audio-player .volume__controls {
  background: var(--w-bg) !important;
  border: var(--w-border) solid var(--w-accent) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

figure.green-audio-player .volume__slider.slider {
  background-color: var(--w-rule) !important;
  border-radius: 0 !important;
}

figure.green-audio-player .volume__progress.gap-progress {
  background-color: var(--w-accent) !important;
  border-radius: 0 !important;
}

figure.green-audio-player .volume__pin.pin {
  background: var(--w-accent-dk) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 10px !important;
  height: 10px !important;
}

/* ── Téléchargement ── */
figure.green-audio-player .download__link svg path {
  fill: var(--w-accent) !important;
}

figure.green-audio-player .download__link:hover svg path {
  fill: var(--w-accent-dk) !important;
}

/* ── Légende ── */
figure.green-audio-player figcaption {
  flex-basis: 100%;
  order: 10;
  font-family: var(--w-font);
  margin-top: 1rem;
  padding-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────
   SECTION 3.6 — BLOC VIDÉO
───────────────────────────────────────────────────────── */

.block-type-video {
  margin: 1.5rem 0;
}

.block-type-video figure {
  margin: 0;
  width: 100%;
}

/* Vidéo responsive */
.block-type-video video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: var(--w-border) solid var(--w-accent);
  background: var(--w-ink);
}

/* Légende */
.block-type-video figcaption {
  font-family: var(--w-font);
  font-size: var(--fs-2xs);
  color: var(--w-ink-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────
   SECTION 4 — NARRATIVE-WEB (--nw-*)
───────────────────────────────────────────────────────── */

.btn-connect{
  position: fixed;
  top: 20px;
  right: 30px;
  background: var(--nw-accent);
  padding: 5px 5px 4px 10px;
  border-radius: 100%;
  opacity: 0.7;
  transition: all 0.2s linear;
}

.btn-connect:hover{
  opacity: 1;
  transform: scale(1.04);
}

body[data-template="home"] .btn-connect,
body[data-template="projects"] .btn-connect,
body[data-template="about"] .btn-connect,
body[data-template="tutos"] .btn-connect,
body[data-template="tuto"] .btn-connect,
body[data-template="actus"] .btn-connect,
body[data-template="actu"] .btn-connect{
  position: relative;
  top: -3px;
  right: 0;
}


/* ───────────────────────────────────────────
   NAVIGATION LATÉRALE
─────────────────────────────────────────── */
.nw-sidenav {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  z-index: 100;
  pointer-events: none;
}

.nw-sidenav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nw-sidenav__item {
  pointer-events: all;
}

.nw-sidenav__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--nw-ink-muted);
  transition: color var(--nw-transition);
  justify-content: flex-end;
}

.nw-sidenav__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  transition: opacity var(--nw-transition), background var(--nw-transition), transform var(--nw-transition);
  flex-shrink: 0;
  order: 2;
}

.nw-sidenav__label {
  font-size: 0.89rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--nw-transition), transform var(--nw-transition);
  white-space: nowrap;
  order: 1;
  width: 200px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: right;
}

.nw-sidenav__link:hover .nw-sidenav__label,
.nw-sidenav__link.is-active .nw-sidenav__label {
  opacity: 1;
  transform: translateX(0);
}

.nw-sidenav__link:hover .nw-sidenav__dot,
.nw-sidenav__link.is-active .nw-sidenav__dot {
  opacity: 1;
  background: var(--nw-accent);
  transform: scale(1.4);
}

.nw-sidenav__item--map    .nw-sidenav__dot { background: #2980b9; }
.nw-sidenav__item--geoformat .nw-sidenav__dot { background: var(--nw-accent); }

/* ── Sous-items sidenav (marqueurs) ── */
.nw-sidenav__sub {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0;
}

.nw-sidenav__sub-item {
  pointer-events: all;
}

.nw-sidenav__sub-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--nw-ink-muted);
  transition: color var(--nw-transition);
  justify-content: flex-end;
  opacity: 0.75;
}

.nw-sidenav__sub-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2980b9;
  opacity: 0.4;
  flex-shrink: 0;
  order: 2;
  transition: opacity var(--nw-transition), transform var(--nw-transition);
}

.nw-sidenav__sub-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  white-space: nowrap;
  order: 1;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--nw-transition), transform var(--nw-transition);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nw-sidenav__sub-link:hover .nw-sidenav__sub-label,
.nw-sidenav__sub-link.is-active .nw-sidenav__sub-label {
  /*opacity: 1 !important;*/
  transform: translateX(0);
}

.nw-sidenav__sub-link:hover .nw-sidenav__sub-label{
  opacity: 1 !important;
}

.nw-sidenav__sub-link:hover .nw-sidenav__sub-dot,
.nw-sidenav__sub-link.is-active .nw-sidenav__sub-dot {
  opacity: 1 !important;
  transform: scale(1.5);
  background: var(--nw-accent);
}

/* Afficher les labels sub quand le parent est actif */
.nw-sidenav__item.is-parent-active .nw-sidenav__sub-label {
  opacity: 0.7;
  transform: translateX(0);
}

@media (max-width: 900px) {
  .nw-sidenav { display: none; }
}

/* ───────────────────────────────────────────
   HERO NARRATIVE
─────────────────────────────────────────── */
.nw-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--nw-ink);
}

.nw-prev-btn{
  position: absolute;
  top: 20px;
  left: 20px;
  transition: transform 0.2s linear;
  z-index: 10;
}

.nw-prev-btn a{
  text-decoration: none;
  color: #FFF;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  font-size: 1rem;
}

.nw-prev-btn svg{
  position: relative;
  top: 2px;
}

.nw-prev-btn:hover{
  transform: scale(1.04);

}

.nw-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(20%);
  transform: scale(1.04);
  transition: transform 8s ease-out;
}

.nw-hero:hover .nw-hero__bg {
  transform: scale(1);
}

.nw-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,26,24,0.1) 0%,
    rgba(26,26,24,0.4) 50%,
    rgba(26,26,24,0.88) 100%
  );
}

.nw-hero__content {
  position: relative;
  z-index: 2;
  padding: 6rem 3rem 4rem;
  max-width: var(--nw-max-w);
  /*max-width: var(--nw-narrow);*/
  margin: 0 auto;
  width: 100%;
}

.nw-hero__title {
  font-family: var(--nw-font-display);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nw-hero__author {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.nw-hero__author span {
  color: #fff;
  font-weight: 600;
}

/* Hero sans image de couverture */
.nw-hero:not(:has(.nw-hero__bg)) {
  background: var(--nw-ink);
  min-height: 55vh;
}

/* ───────────────────────────────────────────
   INTRODUCTION
─────────────────────────────────────────── */
.nw-introduction__body {
  font-family: var(--nw-font-display);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1.4;
  margin: 2rem 0 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  font-weight: 300;
  font-style: italic;
}

.nw-introduction__body p{
  margin-bottom: 0;
}

/* ───────────────────────────────────────────
   DIVIDER
─────────────────────────────────────────── */
.nw-divider {
  text-align: center;
  padding: 1rem 0;
  overflow: hidden;
}

.nw-divider span {
  display: inline-block;
  position: relative;
  width: 4rem;
  height: 2px;
  background: var(--nw-accent);
}

.nw-divider span::before,
.nw-divider span::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40vw;
  height: 1px;
  background: var(--nw-rule);
}

.nw-divider span::before { right: calc(100% + 1rem); }
.nw-divider span::after  { left:  calc(100% + 1rem); }

/* ───────────────────────────────────────────
   CONTAINERS
─────────────────────────────────────────── */
.nw-container {
  max-width: var(--nw-max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.nw-container--narrow {
  max-width: var(--nw-narrow);
}

/* ───────────────────────────────────────────
   SECTIONS GÉNÉRIQUES
─────────────────────────────────────────── */
.nw-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--nw-rule);
}

.nw-section:last-child {
  border-bottom: none;
}

.nw-section__header {
  margin-bottom: 2.5rem;
  max-width: var(--nw-narrow);
}

.nw-section__title {
  font-family: var(--nw-font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--nw-ink);
  line-height: 1.2;
  margin: 0 0 1rem;
}

/* ───────────────────────────────────────────
   TAGS
─────────────────────────────────────────── */
.nw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.nw-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--nw-tag-bg);
  color: var(--nw-ink-soft);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
}

/* ───────────────────────────────────────────
   PROSE (writer fields)
─────────────────────────────────────────── */
.nw-prose {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--nw-ink-soft);
  margin-bottom: 2rem;
  max-width: var(--nw-narrow);
}

.nw-prose p { margin: 0 0 1.25em; }

.nw-chapeau {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--nw-ink-soft);
  font-weight: 400;
  padding: 2rem 0;
  border-bottom: 1px solid var(--nw-rule);
  margin-bottom: 2rem;
}

/* ───────────────────────────────────────────
   SECTION MAP — split-screen scrollytelling
   Gauche : carte sticky | Droite : contenu scrollable
─────────────────────────────────────────── */

.nw-section--map {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  background: var(--nw-paper-warm);
  position: relative;
  padding: 0 !important;
  border-bottom: none !important;
}

/* Côté gauche : carte sticky */
.nw-map-sticky {
  width: 50%;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Côté droit : contenu scrollable */
.nw-map-scroll {
  width: 50%;
  min-height: 100vh;
  padding: 4rem 3rem 8rem;
  box-sizing: border-box;
}

/* Map wrap : pleine hauteur dans le contexte sticky */
.nw-map-sticky .nw-map-wrap {
  height: 100%;
  border: none;
}

.nw-map-wrap {
  position: relative;
  height: clamp(400px, 55vh, 700px);
  border: 1px solid var(--nw-rule);
  overflow: hidden;
}

.nw-map {
  width: 100%;
  height: 100%;
}

/* Fichiers en overlay bas de la carte */
.nw-map-files-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Popup MapLibre */
.maplibregl-popup-content {
  font-family: var(--nw-font-body) !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: var(--nw-ink) !important;
  padding: 0 !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18) !important;
  overflow: hidden;
  max-width: 280px;
}

.maplibregl-popup-close-button {
  color: #fff !important;
  font-size: 1.1rem !important;
  padding: 0.25rem 0.5rem !important;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Image cover dans la popup */
.nw-popup-cover {
  width: 100%;
  /*height: 140px;*/
  overflow: hidden;
  position: relative;
}

.nw-popup-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.92);
  transition: filter 0.3s ease;
}

.nw-popup-cover:hover img {
  filter: brightness(1);
}

.nw-popup-body {
  padding: 0.85rem 1rem 1rem;
}

.nw-popup-title {
  display: block;
  font-family: var(--nw-font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--nw-ink);
  line-height: 1.3;
}

/* Lien ancre vers le texte du marqueur */
.nw-popup-anchor {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nw-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--nw-transition);
  padding-bottom: 1px;
}

.nw-popup-anchor:hover {
  border-bottom-color: var(--nw-accent);
}

.nw-popup-anchor:focus{
  border: none;
  outline: none;
}

/* Icône marqueur custom */
.nw-marker-icon {
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
}

/* ───────────────────────────────────────────
   LISTE DES MARQUEURS (colonne droite scrollable)
─────────────────────────────────────────── */
.nw-map-marker-list {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.nw-map-marker {
  display: flex;
  flex-direction: column;
  padding: 3rem 0;
  border-bottom: 1px solid var(--nw-rule);
  position: relative;
  scroll-margin-top: 3rem;
  transition: background 0.35s ease, padding 0.35s ease;
  border-radius: 4px;
}

.nw-map-marker:last-child {
  border-bottom: none;
}

/* ── État actif déclenché au scroll (scrollytelling) ── */
/*.nw-map-marker.is-active {
  background: rgba(93, 40, 230, 0.04);
  padding-left: 1rem;
  padding-right: 0.5rem;
  margin-left: -1rem;
}*/

.nw-map-marker.is-active .nw-map-marker__title {
  color: var(--nw-accent);
  border-bottom-color: var(--nw-accent);
}

/* ── Marqueur MapLibre actif ── */
.maplibregl-marker.nw-marker-active { z-index: 10 !important; }
.maplibregl-marker.nw-marker-active svg path { fill: #e74c3c !important; }

/* ── Icône marqueur custom active ── */
.nw-marker-icon.nw-marker-active {
  box-shadow: 0 0 0 4px rgba(93,40,230,0.5), 0 0 0 10px rgba(93,40,230,0.12) !important;
  transform: scale(1.2) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Cover du marqueur */
.nw-map-marker__cover {
  position: relative;
  overflow: hidden;
  background: var(--nw-ink);
  max-height: 260px;
}

.nw-map-marker__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88) grayscale(10%);
  transition: filter 0.5s ease, transform 0.6s ease;
}

.nw-map-marker:hover .nw-map-marker__cover img {
  filter: brightness(1) grayscale(0%);
  transform: scale(1.02);
}

/* Cover vidéo */
.nw-map-marker__cover--video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Lecteur audio dans la fiche marqueur */
.nw-map-marker__audio {
  margin: 0 0 1.25rem;
}

/* Popup : vidéo */
.nw-popup-cover--video {
  width: 100%;
  overflow: hidden;
  background: var(--nw-ink);
}

.nw-popup-cover--video video {
  width: 100%;
  display: block;
}

/* Popup : audio */
.nw-popup-audio {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--nw-rule);
}

.nw-popup-audio audio {
  width: 100%;
  display: block;
}

/* Numéro sur la cover */
.nw-map-marker__num {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  font-family: var(--nw-font-display);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  z-index: 2;
  pointer-events: none;
}

/* Numéro sans cover */
.nw-map-marker__num--no-cover {
  position: static;
  display: block;
  font-family: var(--nw-font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--nw-rule);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Corps texte du marqueur */
.nw-map-marker__body {
  padding: 1.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.nw-map-marker__title {
  font-family: var(--nw-font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--nw-ink);
  line-height: 1.2;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--nw-ink);
}

/* Ligne décorative avant le titre (numéro + trait) */
.nw-map-marker__title::before {
  content: attr(data-num);
}

/* Contenu blocks */
.nw-map-marker__content {
  font-size: 1.4rem;
  line-height: 1.85;
  color: var(--nw-ink-soft);
}

.nw-map-marker__content a { color: var(--nw-accent); }
.nw-map-marker__content p { margin: 0 0 1.1em; }

.nw-map-marker__content h2,
.nw-map-marker__content h3 {
  font-family: var(--nw-font-display);
  color: var(--nw-ink);
  margin: 1.75rem 0 0.5rem;
}

.nw-map-marker__content h2 { font-size: 1.3rem; }
.nw-map-marker__content h3 { font-size: 1.1rem; }

.nw-map-marker__content ul,
.nw-map-marker__content ol {
  padding-left: 1.4rem;
  margin-bottom: 1.1em;
}

.nw-map-marker__content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--nw-accent);
  background: var(--nw-paper-warm);
  font-style: italic;
  font-size: 1.05rem;
}

.nw-map-marker__content figure {
  margin: 1.5rem 0;
}

.nw-map-marker__content figure img {
  width: 100%;
  height: auto;
  display: block;
}

.nw-map-marker__content figcaption {
  font-size: 0.78rem;
  color: var(--nw-ink-muted);
  font-style: italic;
  padding-top: 0.4rem;
}

/* Responsive split-screen → empilement vertical */
@media (max-width: 900px) {
  .nw-section--map {
    flex-direction: column;
  }
  .nw-map-sticky {
    width: 100%;
    position: relative;
    height: clamp(300px, 50vh, 480px);
  }
  .nw-map-scroll {
    width: 100%;
    padding: 2rem 1.25rem 4rem;
  }
  .nw-map-marker__cover { max-height: 220px; }
  .nw-map-marker__body  { padding: 1.5rem 0 0.75rem; }
  .nw-map-marker.is-active { padding-left: 0.75rem; margin-left: -0.75rem; }
}

/* ───────────────────────────────────────────
   FICHIERS
─────────────────────────────────────────── */
.nw-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
}

.nw-file {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nw-ink-soft);
  border: 1px solid var(--nw-rule);
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  border-radius: 2px;
  transition: border-color var(--nw-transition), color var(--nw-transition);
}

.nw-file:hover {
  border-color: var(--nw-accent);
  color: var(--nw-accent);
}

.nw-file__icon {
  font-size: 0.9rem;
}

/* ───────────────────────────────────────────
   SECTION GÉOFORMAT
─────────────────────────────────────────── */
.nw-section--geoformat {
  padding: 0 0 5rem;
}

.nw-geoformat-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #2c2c28;
  margin-bottom: 3rem;
}

.nw-geoformat-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(30%) brightness(0.7);
}

.nw-geoformat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(26,26,24,0.82) 100%);
}

.nw-geoformat-hero__content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem;
}

.nw-geoformat-hero__title {
  font-family: var(--nw-font-display);
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.nw-geoformat-hero__subtitle {
  font-family: var(--nw-font-body);
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin: 0 0 0.75rem;
}

/* Géoformat sans cover */
.nw-geoformat-hero:not(:has(.nw-geoformat-hero__bg)) {
  min-height: 20vh;
  background: var(--nw-ink);
}

/* ───────────────────────────────────────────
   NAVIGATION CHAPITRES
─────────────────────────────────────────── */
.nw-chap-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 2px solid var(--nw-ink);
  border-bottom: 1px solid var(--nw-rule);
  margin-bottom: 3rem;
}

.nw-chap-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--nw-ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--nw-transition);
  padding: 0.25rem 0;
}

.nw-chap-nav__link:hover {
  color: var(--nw-accent);
}

.nw-chap-nav__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--nw-ink);
  color: var(--nw-paper);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--nw-transition);
}

.nw-chap-nav__link:hover .nw-chap-nav__num {
  background: var(--nw-accent);
}

/* ───────────────────────────────────────────
   CHAPITRES
─────────────────────────────────────────── */
.nw-chapitre {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--nw-rule);
}

.nw-chapitre:last-child {
  border-bottom: none;
}

.nw-chapitre__header {
  margin-bottom: 2rem;
}

.nw-chapitre__num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nw-accent);
  display: block;
  margin-bottom: 0.5rem;
}

.nw-chapitre__title {
  font-family: var(--nw-font-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--nw-ink);
  line-height: 1.25;
  margin: 0;
}

/* Corps des chapitres (blocks Kirby) */
.nw-chapitre__body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--nw-ink-soft);
}

.nw-chapitre__body h2,
.nw-chapitre__body h3 {
  font-family: var(--nw-font-display);
  color: var(--nw-ink);
  margin: 2.5rem 0 0.75rem;
  line-height: 1.25;
}

.nw-chapitre__body h2 { font-size: 1.5rem; }
.nw-chapitre__body h3 { font-size: 1.2rem; }

.nw-chapitre__body p {
  margin: 0 0 1.25em;
}

.nw-chapitre__body ul,
.nw-chapitre__body ol {
  padding-left: 1.5rem;
  margin: 0 0 1.25em;
}

.nw-chapitre__body li { margin-bottom: 0.4em; }

.nw-chapitre__body blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--nw-accent);
  background: var(--nw-paper-warm);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--nw-ink);
}

.nw-chapitre__body blockquote p { margin: 0; }

.nw-chapitre__body figure {
  margin: 2.5rem -1rem;
}

.nw-chapitre__body figure img {
  width: 100%;
  height: auto;
  display: block;
}

.nw-chapitre__body figcaption {
  font-size: 0.8rem;
  color: var(--nw-ink-muted);
  padding: 0.5rem 1rem 0;
  font-style: italic;
}

.nw-chapitre__body .video-block,
.nw-chapitre__body .map-block {
  margin: 2.5rem 0;
}

/* Block map dans un chapitre */
.nw-chapitre__body .map-block iframe,
.nw-chapitre__body .map-block > div {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}

/* ───────────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nw-hero__content { padding: 4rem 1.25rem 2.5rem; }
  .nw-container     { padding: 0 1.25rem; }
  .nw-section__header__wrapper {width: 100%;}
  .nw-map-part      {width: 100%;}
  .nw-map-wrap      { height: 320px; }
  .nw-chapitre__body figure { margin: 1.5rem 0; }
  .nw-geoformat-hero { min-height: 35vh; }
  .nw-geoformat-hero__content { padding: 2rem 1.25rem; }
  .nw-chap-nav { flex-direction: column; }
  .nw-section--map__wrapper { flex-wrap: wrap;}
}

@media (max-width: 480px) {
  .nw-introduction__body { font-size: 1rem; }
  .nw-section { padding: 3rem 0; }
}

