:root {
  --ink: #1a1714;
  --ink-soft: #4a443d;
  --paper: #f4efe6;
  --paper-card: #fbf8f1;
  --rule: #d8cfbf;
  --rule-strong: #2a2520;
  --accent: #8a1c1c; /* rouge sourd de presse */

  /* Surfaces dérivées, variabilisées pour permettre le mode nuit. */
  --glow: rgba(255, 255, 255, 0.6); /* halo doux en haut de page */
  --frame-bg: #fffdf8;              /* fond des cadres (dessin, songe) */
  --sk-base: #e9e2d4;               /* squelettes de chargement */
  --sk-shine: #f1ebdd;
  --field-bg: var(--paper-card);

  /* La tribune : un bloc inversé, qui garde son contraste dans les deux thèmes. */
  --tribune-bg: #1a1714;
  --tribune-fg: #f4efe6;
  --tribune-accent: #e6b3b3;
  --tribune-rule: #4a443d;
  --tribune-soft: #d8cfc2;
  --tribune-mute: #c9bfb0;

  --serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-body: "Spectral", Georgia, serif;
  --sans: "Libre Franklin", system-ui, -apple-system, sans-serif;
  --maxw: 1240px;
}

/* ---------- Mode nuit : lecture à la lampe ----------
   Un noir chaud, jamais pur, pour rester dans l'esprit du papier. */
:root[data-theme="dark"] {
  --ink: #ece3d3;
  --ink-soft: #a59a86;
  --paper: #14120d;
  --paper-card: #1d1a13;
  --rule: #38322a;
  --rule-strong: #57503f;
  --accent: #d8745b; /* le rouge de presse, réchauffé pour le fond sombre */

  --glow: rgba(216, 116, 91, 0.07);
  --frame-bg: #211d15;
  --sk-base: #221f17;
  --sk-shine: #2c2820;
  --field-bg: #221e16;

  --tribune-bg: #0b0a06;
  --tribune-fg: #ece3d3;
  --tribune-accent: #e6b3b3;
  --tribune-rule: #322c24;
  --tribune-soft: #c7bdac;
  --tribune-mute: #9b9176;
}

* { box-sizing: border-box; }

/* L'attribut « hidden » doit toujours l'emporter : certaines sections (la une,
   par exemple) ont un display explicite — display:grid — qui, à spécificité
   égale, gagne sur la règle [hidden]{display:none} du navigateur. Sans ce
   garde-fou, la une resterait visible en basculant d'onglet et les autres
   sections s'empileraient en dessous, donnant l'impression que les onglets
   ne répondent pas. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 50% -10%, var(--glow), transparent 60%);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---------- Bandeau / manchette ---------- */
.masthead {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px 0;
}

.masthead__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.masthead__center { text-align: center; }

.masthead__brand {
  font-family: var(--serif-display);
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 0.92;
  margin: 0;
}

.masthead__tagline {
  font-family: var(--serif-body);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  margin: 6px 0 0;
}

.masthead__lang {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.lang__label {
  font-family: var(--sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.lang__select {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 5px 8px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  max-width: 9rem;
}

.iconbtn {
  justify-self: start;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  background: var(--paper-card);
  color: var(--ink);
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.2s;
}
.iconbtn:hover { background: #fff; transform: rotate(180deg); }

.masthead__rule {
  margin-top: 16px;
  border-top: 3px double var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 7px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.masthead__motto { font-style: normal; letter-spacing: 0.08em; }
@media (max-width: 620px) {
  .masthead__motto { display: none; }
}

/* ---------- Onglets de navigation ---------- */
.tabs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px 0;
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--rule);
}

.tab {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 2px 12px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Les plumes à venir ---------- */
.plumes {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 64px;
  animation: fade 0.5s ease both;
}
.plumes__head { max-width: 70ch; margin-bottom: 28px; }
.plumes__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0 0 10px;
}
.plumes__intro {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

.plumes__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.plume {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plume__name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.15;
  color: var(--ink);
}
.plume__note {
  font-family: var(--serif-body);
  font-size: 0.96rem;
  color: var(--ink-soft);
}

/* ---------- Les numéros ---------- */
.numero .plume__name {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.numero .plume__note { text-transform: capitalize; }
.numero .plume__note em { text-transform: none; color: var(--accent); font-weight: 600; }
.numero--next {
  background: var(--paper-card);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* ---------- Grille du journal ---------- */
.paper {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px 34px;
}

/* Filets de séparation entre colonnes, à la une */
.article {
  position: relative;
  grid-column: span 4;
  padding-bottom: 6px;
  animation: fade 0.6s ease both;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.article + .article { }

/* L'éditorial : pleine largeur, la « une » */
.article--lead { grid-column: 1 / -1; }
.article--wide { grid-column: span 6; }

@media (max-width: 900px) {
  .article, .article--wide { grid-column: span 6; }
}
@media (max-width: 640px) {
  .paper { gap: 26px; }
  .article, .article--wide, .article--lead { grid-column: 1 / -1; }
}

.kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.headline {
  font-family: var(--serif-display);
  font-weight: 700;
  line-height: 1.04;
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.article--lead .headline { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 900; }
.article--wide .headline { font-size: 1.9rem; }

.byline {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}
.byline strong { color: var(--ink); font-weight: 600; }
.byline em { font-style: italic; }

.standfirst {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.article--lead .standfirst { font-size: 1.3rem; }

.body { font-size: 1rem; }
.article--lead .body, .article--wide .body {
  columns: 2;
  column-gap: 32px;
}
.article--lead .body { font-size: 1.06rem; }
@media (max-width: 760px) {
  .article--lead .body, .article--wide .body { columns: 1; }
}

.body p { margin: 0 0 0.9em; text-align: justify; hyphens: auto; }

/* Lettrine sur le premier paragraphe */
.body p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-weight: 900;
  float: left;
  font-size: 3.4em;
  line-height: 0.72;
  padding: 6px 10px 0 0;
  color: var(--accent);
}
[dir="rtl"] .body p:first-of-type::first-letter { float: right; padding: 6px 0 0 10px; }

.pullquote {
  break-inside: avoid;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 18px 0;
}
[dir="rtl"] .pullquote { border-left: 0; border-right: 3px solid var(--accent); padding: 4px 16px 4px 0; }

/* Bouton lire la suite */
.more {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 6px 0;
}
.more:hover { text-decoration: underline; }

.body.clamped { max-height: 16em; overflow: hidden; position: relative; }
.body.clamped::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 4em;
  background: linear-gradient(transparent, var(--paper));
}

/* ---------- Le dessin du jour ---------- */
.cartoon {
  grid-column: span 4;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 16px;
  align-self: start;
}
@media (max-width: 900px) { .cartoon { grid-column: span 6; } }
@media (max-width: 640px) { .cartoon { grid-column: 1 / -1; } }

.cartoon__frame {
  background: var(--frame-bg);
  border: 1px solid var(--rule);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cartoon__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cartoon__placeholder {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 24px;
  text-align: center;
}
.cartoon__caption {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.98rem;
  margin: 12px 2px 4px;
}
.cartoon__sign {
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

/* ---------- Le songe du jour (Little Nemo in Slumberland) ---------- */
.dream {
  grid-column: 1 / -1;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 20px clamp(16px, 4vw, 40px) 24px;
  align-self: start;
}
.dream__frame {
  background: var(--frame-bg);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 6px var(--frame-bg), inset 0 0 0 7px var(--rule);
  aspect-ratio: 21 / 9;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dream__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dream__caption {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1.15rem;
  text-align: center;
  max-width: 60ch;
  margin: 16px auto 6px;
}
.dream .cartoon__sign { text-align: center; }
@media (max-width: 640px) {
  .dream__frame { aspect-ratio: 4 / 3; }
}

/* ---------- La tribune ---------- */
.article--tribune {
  grid-column: 1 / -1;
  background: var(--tribune-bg);
  color: var(--tribune-fg);
  padding: 30px clamp(20px, 4vw, 48px);
}
.article--tribune .kicker { color: var(--tribune-accent); }
.article--tribune .kicker::before { background: var(--tribune-accent); }
.article--tribune .headline { color: #fff; }
.article--tribune .standfirst { color: var(--tribune-soft); }
.article--tribune .byline { color: var(--tribune-mute); border-color: var(--tribune-rule); }
.article--tribune .byline strong { color: #fff; }
.article--tribune .body { columns: 2; column-gap: 34px; }
.article--tribune .body p:first-of-type::first-letter { color: var(--tribune-accent); }
.article--tribune .pullquote { color: #fff; border-color: var(--tribune-accent); }
@media (max-width: 760px) { .article--tribune .body { columns: 1; } }

/* ---------- Le billet d'humeur (Pierre Desproges) ---------- */
/* Bande pleine largeur, brève et enlevée : un trait d'esprit pour clore le numéro. */
.billet {
  grid-column: 1 / -1;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 22px clamp(18px, 4vw, 44px) 24px;
  align-self: start;
}
[dir="rtl"] .billet { border-left: 1px solid var(--rule); border-right: 4px solid var(--accent); }
.billet .headline {
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.billet .body {
  max-width: 68ch;
  font-size: 1.05rem;
}
/* Le billet reste léger : ni colonnes ni lettrine, le clin d'œil prime sur l'apparat. */
.billet .body p:first-of-type::first-letter {
  font-family: inherit;
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
  font-weight: inherit;
}

/* ---------- Partage social ---------- */
.share {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.share__label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.share__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper-card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.share__btn svg { width: 15px; height: 15px; fill: currentColor; }
.share__btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-1px);
}
.share__btn--copy.is-copied {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* Sur fond sombre (tribune), le filet et les pictogrammes s'éclaircissent. */
.article--tribune .share { border-top-color: var(--tribune-rule); }
.article--tribune .share__label { color: var(--tribune-mute); }
.article--tribune .share__btn {
  border-color: var(--tribune-rule);
  background: transparent;
  color: var(--tribune-soft);
}
.article--tribune .share__btn:hover {
  color: var(--tribune-bg);
  background: var(--tribune-accent);
  border-color: var(--tribune-accent);
}

/* ---------- États de chargement ---------- */
.skeleton .sk {
  background: linear-gradient(90deg, var(--sk-base) 25%, var(--sk-shine) 37%, var(--sk-base) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 2px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-line { height: 13px; margin: 9px 0; }
.sk-title { height: 26px; margin: 12px 0; width: 80%; }
.sk-kicker { height: 10px; width: 35%; margin-bottom: 14px; }

.article__error {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px dashed var(--rule);
  padding: 14px;
}
.article__error button {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 0.75rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 2px;
}

/* ---------- Pied ---------- */
.colophon {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 60px;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.colophon__homage {
  margin-top: 14px;
  font-style: italic;
  color: var(--ink-soft);
}
.colophon__credit {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.colophon__corpen {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.colophon__corpen:hover {
  opacity: 1;
}
.colophon__logo {
  display: block;
  height: 34px;
  width: auto;
  mix-blend-mode: multiply;
}
.colophon__coffee {
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.colophon__coffee:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Abonnement gratuit & lien automatique du jour ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.subscribe {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px;
}
.subscribe__inner {
  border: 1px solid var(--rule);
  border-top: 3px double var(--rule-strong);
  background: var(--paper-card);
  padding: 28px 26px 30px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.subscribe__kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.subscribe__free {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
}
.subscribe__title {
  font-family: var(--serif-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--ink);
}
.subscribe__text {
  font-family: var(--serif-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto 22px;
  max-width: 52ch;
}
.subscribe__form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.subscribe__hp {
  position: absolute;
  left: -9999px;
}
.subscribe__field {
  flex: 1 1 280px;
  max-width: 360px;
}
.subscribe__field input {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.subscribe__field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.subscribe__cta {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-card);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 12px 22px;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.subscribe__cta:hover {
  filter: brightness(1.08);
}
.subscribe__cta:disabled {
  opacity: 0.55;
  cursor: progress;
}
.subscribe__daily {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.subscribe__daily--featured {
  border-top-color: var(--accent);
}
.subscribe__daily-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.subscribe__daily-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.subscribe__daily-link {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  word-break: break-all;
}
.subscribe__daily-link:hover {
  border-bottom-color: var(--accent);
}
.subscribe__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  background: var(--paper-card);
  color: var(--ink-soft);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.subscribe__copy svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.subscribe__copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.subscribe__copy.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}
.subscribe__daily-hint {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin: 10px 0 0;
}
.subscribe__thanks {
  font-family: var(--serif-body);
  font-size: 1rem;
  color: var(--ink);
  margin: 18px 0 0;
}

/* ====================================================================
   AMÉLIORATIONS — lecture mobile, mode nuit, finitions contemporaines
   ==================================================================== */

/* ---------- Groupes de commandes de la manchette ---------- */
.masthead__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.masthead__controls--left { justify-self: start; }

/* Le bouton thème réutilise .iconbtn mais ne pivote pas au survol. */
.iconbtn:hover { background: var(--paper-card); }
#themeBtn:hover { transform: none; }
#themeBtn { font-size: 1rem; }

/* ---------- Barre de progression de lecture ---------- */
.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none;
}
.reading-progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  background: var(--accent);
  transition: transform 0.1s linear;
}
[dir="rtl"] .reading-progress__bar { transform-origin: right; }

/* ---------- Onglets collants ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
body.is-scrolled .tabs {
  box-shadow: 0 6px 20px -16px rgba(0, 0, 0, 0.55);
  border-bottom-color: var(--rule-strong);
}

/* ---------- Retour en haut ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 4vw, 28px);
  bottom: clamp(14px, 4vw, 28px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 40;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
@media (hover: hover) {
  .to-top:hover { background: var(--paper); color: var(--accent); }
}

/* ---------- Mode nuit : ajustements fins ---------- */
/* Le logo (tracé sombre sur fond clair) est inversé pour rester lisible. */
:root[data-theme="dark"] .colophon__logo {
  mix-blend-mode: screen;
  filter: invert(1) brightness(1.4);
}

/* ---------- Confort tactile ---------- */
/* Pictogrammes de partage : cibles un peu plus généreuses au doigt. */
@media (max-width: 640px) {
  .share__btn { width: 40px; height: 40px; }
  .share__btn svg { width: 17px; height: 17px; }
  .iconbtn { width: 42px; height: 42px; }
  .lang__select { min-height: 40px; }
}

/* Onglets : défilement horizontal plutôt que retour à la ligne sur petit écran. */
@media (max-width: 560px) {
  .tabs {
    gap: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-top: 12px;
    padding-bottom: 16px;
    scroll-snap-align: start;
  }
}

/* Lecture mobile : fer à gauche (la justification crée des « rivières »
   disgracieuses sur une colonne étroite), lettrine adoucie. */
@media (max-width: 640px) {
  .masthead { padding-top: 16px; }
  .body p { text-align: left; hyphens: none; }
  .body p:first-of-type::first-letter { font-size: 2.9em; padding-right: 8px; }
  .article--lead .standfirst { font-size: 1.18rem; }
}

/* Manchette : sur très petit écran, les commandes passent au-dessus du titre,
   ce qui laisse toute la largeur à la marque. */
@media (max-width: 460px) {
  .masthead__top {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "ctl lang"
      "center center";
    row-gap: 12px;
  }
  .masthead__controls--left { grid-area: ctl; }
  .masthead__lang { grid-area: lang; }
  .masthead__center { grid-area: center; }
  .masthead__lang { align-items: flex-end; }
}

/* ---------- Respect des préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .iconbtn:hover { transform: none !important; }
}

/* ====================================================================
   PRÉSENTATION — le mot des Immortels (Victor Hugo)
   Un frontispice en tête de la une : la revue, ses valeurs, ses plumes.
   ==================================================================== */
.presentation {
  grid-column: 1 / -1;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-top: 3px double var(--rule-strong);
  border-bottom: 3px double var(--rule-strong);
  padding: clamp(26px, 4vw, 52px) clamp(20px, 4vw, 56px);
  animation: fade 0.6s ease both;
}
.presentation__inner { max-width: 80ch; margin: 0 auto; }
.presentation .kicker { justify-content: center; }
.presentation__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 14px;
}
.presentation__standfirst {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 24px;
}
.presentation__body {
  font-family: var(--serif-body);
  font-size: calc(1.04rem * var(--reading-scale));
  columns: 2;
  column-gap: 38px;
}
.presentation__body p { margin: 0 0 0.95em; text-align: justify; hyphens: auto; }
.presentation__body p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-weight: 900;
  float: left;
  font-size: 3.4em;
  line-height: 0.72;
  padding: 6px 10px 0 0;
  color: var(--accent);
}
[dir="rtl"] .presentation__body p:first-of-type::first-letter { float: right; padding: 6px 0 0 10px; }
.presentation__sign {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.2rem;
  text-align: right;
  margin: 20px 0 0;
  color: var(--ink);
}
.presentation__sign span { color: var(--ink-soft); font-size: 0.95rem; font-style: normal; }
[dir="rtl"] .presentation__sign { text-align: left; }

@media (max-width: 760px) {
  .presentation__body { columns: 1; }
}
@media (max-width: 640px) {
  .presentation__body p { text-align: left; hyphens: none; }
  .presentation__body p:first-of-type::first-letter { font-size: 2.9em; padding-right: 8px; }
}

/* ====================================================================
   TAILLE DU TEXTE — trois paliers pour le confort de lecture
   ==================================================================== */
:root { --reading-scale: 1; }
:root[data-textsize="s"] { --reading-scale: 0.92; }
:root[data-textsize="l"] { --reading-scale: 1.16; }

.body { font-size: calc(1rem * var(--reading-scale)); }
.article--lead .body { font-size: calc(1.06rem * var(--reading-scale)); }
.standfirst { font-size: calc(1.05rem * var(--reading-scale)); }
.article--lead .standfirst { font-size: calc(1.3rem * var(--reading-scale)); }

/* Le bouton « A » reflète le palier courant par sa propre taille. */
.iconbtn--text {
  font-family: var(--serif-display);
  font-weight: 700;
  line-height: 1;
}
.iconbtn--text[data-size="s"] { font-size: 0.82rem; }
.iconbtn--text[data-size="m"] { font-size: 1.02rem; }
.iconbtn--text[data-size="l"] { font-size: 1.24rem; }
#textSizeBtn:hover { transform: none; }

/* ====================================================================
   BANDEAU D'ARCHIVE — signale la consultation d'un ancien numéro
   ==================================================================== */
.archive-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 11px 24px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-card);
}
.archive-bar__back {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.archive-bar__back:hover { border-bottom-color: var(--accent); }

/* ====================================================================
   LES NUMÉROS — chaque numéro de la collection est cliquable
   ==================================================================== */
.numero { padding: 0; }
.numero__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 20px 18px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.numero__link:hover { background: var(--paper-card); }
.numero__link:hover .plume__name { color: var(--accent); }
.numero--viewing .numero__link {
  background: var(--paper-card);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Le partage natif (Web Share API) : un bouton mis en avant quand il est proposé. */
.share__btn--native { color: var(--accent); border-color: var(--accent); }
.article--tribune .share__btn--native {
  color: var(--tribune-accent);
  border-color: var(--tribune-accent);
}

/* ====================================================================
   LECTURE IMMERSIVE — un voile plein écran pour lire un article entier
   ==================================================================== */
.headline--reader { cursor: pointer; }
.headline--reader:hover { color: var(--accent); }
.headline--reader:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.reader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.reader.is-open { opacity: 1; }
.reader__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.reader__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: clamp(18px, 6vh, 80px) 16px;
  padding: clamp(24px, 5vw, 56px);
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.6);
  align-self: flex-start;
  transform: translateY(14px);
  transition: transform 0.28s ease;
}
.reader.is-open .reader__panel { transform: none; }
.reader__panel .headline { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 900; }
.reader__panel .body { columns: auto; font-size: calc(1.12rem * var(--reading-scale)); }
.reader__panel .body p { text-align: left; hyphens: none; }

body.reader-open { overflow: hidden; }

.reader__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper-card);
  color: var(--ink);
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}
.reader__close:hover { color: var(--accent); }

/* ====================================================================
   NUMÉROS SPÉCIAUX — un dossier au long cours, hors du cycle quotidien
   ==================================================================== */
.special { max-width: 920px; }

/* Plusieurs numéros peuvent être empilés (du plus récent au plus ancien) :
   on aère et on sépare nettement un dossier du suivant. */
.special__issue + .special__issue { margin-top: clamp(48px, 9vw, 96px); }

/* La couverture du numéro : titre ample, chapô, sur une bande encadrée. */
.special__cover {
  border-top: 3px double var(--rule-strong);
  border-bottom: 3px double var(--rule-strong);
  padding: clamp(26px, 5vw, 48px) 0;
  margin-bottom: 36px;
  text-align: center;
}
.special__cover .kicker { justify-content: center; }
.special__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.special__standfirst {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(1.08rem, 2.6vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 auto;
}

/* Le sommaire : une entrée par article, cliquable vers son ancre. */
.special__toc {
  margin-bottom: 48px;
}
.special__toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--rule);
}
.special__toc-item {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.special__toc-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 20px 18px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.special__toc-link:hover { background: var(--paper-card); }
.special__toc-kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.special__toc-title {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.15;
}
.special__toc-author {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-soft);
}

/* Les articles du dossier : pleine longueur, en une seule colonne aérée. */
.special__articles {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.special__article {
  scroll-margin-top: 90px;
  max-width: 68ch;
  margin: 0 auto;
  width: 100%;
}
.special__article + .special__article {
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}
.special__article .headline {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.special__article--lead .headline {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
}
.special__article .body p { text-align: justify; hyphens: auto; }
.special__article .body p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-weight: 900;
  float: left;
  font-size: 3.2em;
  line-height: 0.72;
  padding: 6px 10px 0 0;
  color: var(--accent);
}
[dir="rtl"] .special__article .body p:first-of-type::first-letter {
  float: right;
  padding: 6px 0 0 10px;
}

/* Le renvoi vers un lien externe : un bouton-bloc soigné, en clôture d'article. */
.special__link { margin: 24px 0 0; }
.special__link a {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-left: 4px solid var(--accent);
  padding: 14px 22px;
  color: var(--ink);
  background: var(--paper-card);
  transition: background 0.2s ease, transform 0.2s ease;
}
[dir="rtl"] .special__link a { border-left: 1px solid var(--rule-strong); border-right: 4px solid var(--accent); }
.special__link a:hover { background: #fff; transform: translateY(-1px); }
:root[data-theme="dark"] .special__link a:hover { background: var(--frame-bg); }
.special__link-note {
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.special__link-url {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

@media (max-width: 640px) {
  .special__article .body p { text-align: left; hyphens: none; }
  .special__article .body p:first-of-type::first-letter { font-size: 2.9em; padding-right: 8px; }
}

/* La tribune garde son bloc inversé, même en lecture immersive. */
.reader__panel--tribune {
  background: var(--tribune-bg);
  color: var(--tribune-fg);
}
.reader__panel--tribune .headline { color: #fff; }
.reader__panel--tribune .standfirst { color: var(--tribune-soft); }
.reader__panel--tribune .byline { color: var(--tribune-mute); border-color: var(--tribune-rule); }
.reader__panel--tribune .byline strong { color: #fff; }
.reader__panel--tribune .kicker { color: var(--tribune-accent); }
.reader__panel--tribune .kicker::before { background: var(--tribune-accent); }
.reader__panel--tribune .pullquote { color: #fff; border-color: var(--tribune-accent); }
.reader__panel--tribune .body p:first-of-type::first-letter { color: var(--tribune-accent); }
.reader__panel--tribune .share { border-top-color: var(--tribune-rule); }
.reader__panel--tribune .share__label { color: var(--tribune-mute); }
