.ed-page {
  --ed-bg: #0a0a0c;
  --ed-fg: #f5f2ee;
  --ed-line: rgba(245, 242, 238, 0.09);
  --ed-mono: 'IBM Plex Mono', monospace;
  background: var(--ed-bg);
  color: var(--ed-fg);
  font-family: 'Space Grotesk', Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Le thème global impose h1–h6 en serif par un sélecteur d'élément, qui bat
   l'héritage de .ed-page. */
.ed-page h1, .ed-page h2, .ed-page h3,
.ed-page h4, .ed-page h5, .ed-page h6 { font-family: inherit; }
.ed-page a { color: var(--ed-fg); text-decoration: none; }
.ed-page a:hover { color: rgba(245, 242, 238, 0.7); }
.ed-page ::selection { background: var(--ed-fg); color: var(--ed-bg); }

.ed-header {
  position: sticky;
  /* roue centrée en absolu ; retour à gauche, langue à droite */
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ed-line);
}
.ed-header { position: sticky; }
.ed-header .ed-wheel { position: absolute; left: 50%; transform: translateX(-50%); }
.ed-header > .lang-switch { margin-left: auto; }
@media (max-width: 640px){
  .ed-header .ed-wheel { position: static; transform: none; }
  .ed-header > .lang-switch { font-size: 13px; }
  .ed-header > .lang-switch .lang-earth { display: none; }
}
.ed-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(245, 242, 238, 0.2);
  border-radius: 999px;
}
.ed-back:hover { border-color: var(--ed-fg); color: var(--ed-fg); }

/* Largeur de .ed-wheel, largeur d'un cran et padding de .ed-wheel-scroll sont
   liés : le padding vaut (fenêtre - cran) / 2, sans quoi le premier et le
   dernier cran ne peuvent pas atteindre le centre. */
.ed-wheel {
  position: relative;
  flex: none;
  width: 190px;
  height: 34px;
  font-family: 'Oswald', 'Arial Narrow', var(--ed-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
}
.ed-wheel-scroll {
  display: flex;
  height: 100%;
  padding: 0 64px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 74%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 74%, transparent 100%);
}
.ed-wheel-scroll::-webkit-scrollbar { display: none; }
.ed-wheel-track { display: flex; margin: 0; padding: 0; list-style: none; }
.ed-wheel-track li {
  flex: none;
  width: 62px;
  scroll-snap-align: center;
}
.ed-wheel-track a,
.ed-wheel-track span {
  display: block;
  line-height: 34px;
  text-align: center;
  color: rgba(245, 242, 238, 0.4);
  transition: color 0.18s ease;
}
.ed-wheel-track a:hover { color: var(--ed-fg); }
.ed-wheel-track .is-current span { color: var(--ed-fg); font-weight: 700; }
.ed-wheel-lens {
  position: absolute;
  top: 0;
  left: 50%;
  width: 62px;
  height: 100%;
  transform: translateX(-50%);
  border: 1px solid var(--ed-line);
  border-radius: 6px;
  background: rgba(245, 242, 238, 0.05);
  pointer-events: none;
}

.ed-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--ed-line); }
.ed-hero > img {
  position: absolute;
  max-width: none !important;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: grayscale(1);
  width: 100% !important;
  height: 100% !important;
}
.ed-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.55) 0%, rgba(10, 10, 12, 0.86) 55%, var(--ed-bg) 100%);
}
.ed-hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 132px 40px 108px; }
.ed-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ed-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-fg);
}
.ed-kicker i { width: 24px; height: 1px; background: rgba(245, 242, 238, 0.3); }
.ed-muted { color: rgba(245, 242, 238, 0.6); }
.ed-hero h1 {
  margin: 18px 0 0;
  font-family: 'earthnormal', Georgia, 'Times New Roman', Times, serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ed-fg);
}
.ed-hero p { margin: 20px 0 0; max-width: 560px; font-size: 17px; line-height: 1.6; color: rgba(245, 242, 238, 0.68); }
.ed-stats { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.ed-stats div { display: flex; flex-direction: column; gap: 4px; }
.ed-stats b { font-family: var(--ed-mono); font-size: 28px; font-weight: 400; }
.ed-stats span { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(245, 242, 238, 0.5); }

/* #inkA est un filtre SVG déclaré dans _edition.html. */
.ed-stamp {
  position: absolute;
  right: 56px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 30px;
  border: 4px double #c81f33;
  border-radius: 4px;
  color: #d63042;
  transform: rotate(-9.4deg) skewX(-1.6deg);
  opacity: 0.82;
  filter: url(#inkA);
  -webkit-mask-image: radial-gradient(130% 210% at 26% 82%, rgba(0,0,0,1) 26%, rgba(0,0,0,0.74) 52%, rgba(0,0,0,0.34) 74%, rgba(0,0,0,0.66) 100%);
  mask-image: radial-gradient(130% 210% at 26% 82%, rgba(0,0,0,1) 26%, rgba(0,0,0,0.74) 52%, rgba(0,0,0,0.34) 74%, rgba(0,0,0,0.66) 100%);
  pointer-events: none;
}
.ed-stamp b { font-family: 'Oswald', Impact, sans-serif; font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; }
.ed-stamp span { font-family: 'JetBrains Mono', var(--ed-mono); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; }

.ed-main { max-width: 1180px; margin: 0 auto; padding: 56px 40px 96px; }

.ed-content { font-size: 16px; line-height: 1.65; color: rgba(245, 242, 238, 0.8); }
.ed-content:not(:empty) {
  margin-bottom: 72px;
  padding: 30px 34px;
  background: rgba(10, 10, 12, 0.55);
  border: 1px solid var(--ed-line);
  border-radius: 6px;
}
/* Neutralise la grille Foundation héritée de l'ancien gabarit (offset/largeur)
   pour que le contenu s'aligne à gauche, pleine largeur, dans le panneau. */
.ed-content .row, .ed-content .columns { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; float: none !important; }
.ed-content [class*="medium-offset"] { margin-left: 0 !important; }
.ed-content, .ed-content [itemprop="articleSection"], .ed-content article { text-align: left; }
.ed-content [itemprop="articleSection"] > :first-child,
.ed-content [itemprop="name"] + * { margin-top: 0; }
.ed-content article > header { display: none; }
.ed-content .row { max-width: none; margin-top: 0; }
.ed-content .columns { padding: 0; }
.ed-content h1, .ed-content h2, .ed-content h3, .ed-content h4 { color: var(--ed-fg); font-family: 'Space Grotesk', Helvetica, sans-serif; letter-spacing: -0.01em; }
.ed-content h2 { font-size: 28px; margin: 40px 0 12px; }
.ed-content h3 { font-size: 22px; margin: 32px 0 10px; }
.ed-content a { color: var(--ed-fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245, 242, 238, 0.4); }
.ed-content a:hover { text-decoration-color: var(--ed-fg); }
.ed-content hr { border: 0; border-top: 1px solid var(--ed-line); margin: 32px 0; }
.ed-content img { max-width: 100%; height: auto; }
.ed-content table { width: 100%; max-width: 100%; border-collapse: collapse; background: transparent; color: inherit; }
.ed-content th, .ed-content td { padding: 10px 12px; border-bottom: 1px solid var(--ed-line); text-align: left; vertical-align: top; }
.ed-content blockquote { margin: 0; padding-left: 16px; border-left: 2px solid rgba(245, 242, 238, 0.4); color: rgba(245, 242, 238, 0.6); }

.ed-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
/* Sous-pages : la grille de sections précède « Explorer l'édition » ; même espacement que .ed-content. */
.ed-grid + .ed-toolbar { margin-top: 72px; }
.ed-toolbar h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245, 242, 238, 0.55); }

.ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: rgba(245, 242, 238, 0.11);
  border: 1px solid rgba(245, 242, 238, 0.11);
  border-radius: 6px;
  overflow: hidden;
}
.ed-card { display: flex; flex-direction: column; min-height: 172px; background: var(--ed-bg); color: var(--ed-fg); }
.ed-card:hover { background: #121216; color: var(--ed-fg); }
.ed-card.is-active { background: #121216; }
.ed-card.is-active .ed-card-top span:first-child { color: var(--ed-fg); }
.ed-card-img { height: 104px; opacity: 0.72; background-size: cover; background-position: center; filter: grayscale(1); transition: filter 0.35s ease, opacity 0.35s ease; }
.ed-card:hover .ed-card-img { opacity: 1; filter: grayscale(0); }
.ed-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 26px 24px; }
.ed-card-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--ed-mono); font-size: 12px; color: rgba(245, 242, 238, 0.4); }
.ed-arrow { flex: none; color: rgba(245, 242, 238, 0.4); transition: transform 0.3s ease, color 0.3s ease; }
.ed-card:hover .ed-arrow { color: var(--ed-fg); transform: translate(3px, -3px); }
.ed-card h3 { margin: 6px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: inherit; }
.ed-card p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(245, 242, 238, 0.6); }
.ed-card-meta { margin-top: auto; font-family: var(--ed-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(245, 242, 238, 0.35); }

.ed-block { margin-top: 56px; }
/* Cartes séparées (pas de fond gris de grille) : aucune cellule vide visible quelle que soit le nombre de cartes. */
/* Site / photos / vidéos côte à côte ; largeur de section = nombre de cartes (--n) × largeur de carte. */
.ed-media-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 32px; margin-top: 56px; }
.ed-media-row .ed-media-section { margin-top: 0; margin-bottom: 40px; flex: 0 1 calc(var(--n, 1) * 260px + (var(--n, 1) - 1) * 12px); max-width: 100%; min-width: 0; }
.ed-media { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.ed-media .ed-card { min-height: 0; border: 1px solid rgba(245, 242, 238, 0.11); border-radius: 6px; overflow: hidden; }
.ed-media-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #121216; }
.ed-media-img img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.78; filter: grayscale(0.6); transition: opacity 0.35s ease, filter 0.35s ease, transform 0.5s ease; }
.ed-media-card:hover .ed-media-img img { opacity: 1; filter: grayscale(0); transform: scale(1.03); }
.ed-media-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(8, 8, 10, 0.7); color: var(--ed-fg); padding-left: 3px; }
.ed-media-kind { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.ed-media-kind i { font-style: normal; opacity: 0.6; }
.ed-card-extra h3 { font-size: 18px; }
.ed-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.ed-plans a { display: block; padding: 12px; border: 1px solid rgba(245, 242, 238, 0.11); border-radius: 6px; background: #0d0d10; }
.ed-plans img { display: block; width: 100%; height: auto; }
.ed-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ed-gallery a { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #0d0d10; }
.ed-gallery img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: opacity 0.3s ease; }
.ed-gallery a:hover img { opacity: 1; }

.ed-footer { border-top: 1px solid var(--ed-line); background: #08080a; }
.ed-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 40px;
}
.ed-footer-grid div { display: flex; flex-direction: column; gap: 10px; }
.ed-footer-grid p { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(245, 242, 238, 0.6); }
.ed-footer-grid a { font-size: 14px; color: rgba(245, 242, 238, 0.75); }
.ed-footer-grid a:hover { color: var(--ed-fg); }
.ed-label { font-family: var(--ed-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ed-fg); }
.ed-copy { max-width: 1180px; margin: 0 auto; padding: 0 40px 40px; font-family: var(--ed-mono); font-size: 11px; color: rgba(245, 242, 238, 0.32); }

@media (max-width: 640px) {
  .ed-header { padding: 12px 20px; }
  /* (140 - 56) / 2 = 42. */
  .ed-wheel { width: 140px; }
  .ed-wheel-scroll { padding: 0 42px; }
  .ed-wheel-track li { width: 56px; }
  .ed-wheel-lens { width: 56px; }
  .ed-hero-inner, .ed-main, .ed-footer-grid { padding-left: 20px; padding-right: 20px; }
  .ed-hero-inner { padding-top: 80px; }
  .ed-copy { padding-left: 20px; padding-right: 20px; }
  .ed-grid { grid-template-columns: 1fr; }
  .ed-plans { grid-template-columns: 1fr; }
  .ed-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* En absolu le tampon chevaucherait le titre à cette largeur. */
  .ed-stamp { position: static; margin-top: 32px; padding: 8px 20px; }
  .ed-stamp b { font-size: 30px; }
  .ed-stamp span { font-size: 9px; letter-spacing: 0.26em; }
}

/* Image disparue des sauvegardes : placeholder « IMAGE LOST » (voir archives.css). */
.img-lost{ display: inline-flex; align-items: center; justify-content: center; min-width: 180px; min-height: 120px; max-width: 100%; margin: 2px 0; padding: 22px 26px; background: rgba(0,0,0,0.4); border: 1px dashed rgba(230,144,42,0.4); border-radius: 4px; vertical-align: middle; }
.img-lost-stamp{ display: inline-flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 18px; border: 3px double #e6902a; border-radius: 4px; color: #f0a63a; transform: rotate(-5deg) skewX(-1.4deg); opacity: 0.9; }
.img-lost-stamp b{ font-family: 'Oswald', Impact, sans-serif; font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; color: #f0a63a; }
.img-lost-stamp span{ font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(240,166,58,0.75); }
.lang-switch{ display: flex; align-items: center; gap: 4px; font-family: 'Oswald', 'Arial Narrow', monospace; font-size: 15px; letter-spacing: 0.08em; }
.lang-switch .lang-earth{ display: inline-flex; align-items: center; margin-right: 4px; color: rgba(245,242,238,0.6); }
.lang-switch a, .lang-switch span:not(.lang-earth){ padding: 4px 10px; border: 1px solid transparent; border-radius: 6px; color: rgba(245,242,238,0.4); text-decoration: none; transition: color 0.18s ease, border-color 0.18s ease; }
.lang-switch span[aria-current]{ color: #f5f2ee; font-weight: 700; border-color: rgba(245,242,238,0.16); background: rgba(245,242,238,0.05); }
.lang-switch a:hover{ color: #f5f2ee; }
