/* ==========================================================================
   HODD GLOBAL — Gabarit article « classique »
   Structure : .tc > main.jr  (scope .tc évite les fuites sur style.css)
   Dépend des variables de style.css : --orange, --card, --card-2, --muted,
   --navy-line, --bg, --font, .btn, .eyebrow, .nav, .foot
   ========================================================================== */

:root {
  --w-line: var(--navy-line, rgba(255,255,255,.09));
  --w-text: #d5deee;
}

/* ---------- Accessibilité ------------------------------------------------ */
.skip-article {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-article:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--orange, #f58220);
  color: #1a0f02;
  font-weight: 700;
  border-radius: 10px;
}

/* ---------- Fil d'Ariane ------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.crumbs li { display: flex; min-width: 0; max-width: 100%; }
.crumbs li + li::before { content: "›"; margin-right: 0.6rem; opacity: 0.6; }
.crumbs a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--w-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(46ch, 100%);
}

/* ---------- Conteneur principal ----------------------------------------- */
.jr {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 3vw, 2.5rem) 3.5rem;
}

/* ---------- Zone supérieure (fil d'Ariane) ------------------------------- */
.jr-top {
  padding-bottom: 1.25rem;
  color: var(--muted, #93a2be);
  font-size: 0.8125rem;
}
.jr-top nav { min-width: 0; max-width: 100%; }

/* ---------- En-tête article ---------------------------------------------- */
.jr-head { max-width: none; } /* L8 2026-11-06 : titre pleine largeur du conteneur */

.jr h1 {
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
  margin: 0.9rem 0 1.1rem;
  overflow-wrap: anywhere;
  /* L8 2026-11-06 : lignes qui remplissent jusqu'au bord — écrase le
     text-wrap: balance global de style.css (h1..h6) sur la page article */
  text-wrap: wrap;
}
.jr-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted, #93a2be);
  margin: 0 0 1.4rem;
  max-width: none; /* L8 2026-11-06 : chapô aligné à la largeur du bandeau d'image */
}
.jr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}
.jr-tags li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--w-line);
  border-radius: 999px;
  background: var(--card, #0b1730);
  font-size: 0.78rem;
  font-weight: 600;
  color: #cfd9ee;
}
.jr-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  font-size: 0.875rem;
  color: var(--muted, #93a2be);
}
.jr-by .av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card-2, #0e1d3c);
  border: 1px solid var(--w-line);
  color: var(--orange-2, #ff9e4d);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.jr-by .by { color: #fff; font-weight: 700; }
/* SRSEP-1 : le separateur "·" est decoratif — rendu par un span .sep
   aria-hidden dans le markup, jamais annonce par les lecteurs d'ecran
  (le ::before sur .dot pouvait etre vocalise). */
.jr-by .sep::before { content: "·"; margin-right: 1.1rem; opacity: 0.6; }

/* ---------- Visuels (hero, wide, inline) --------------------------------- */
.vis { margin: 0; }

/* Conteneur avec rapport d'aspect (placeholder ou image réelle) */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--card-2, #0e1d3c), var(--card, #0b1730));
  border: 1px solid var(--w-line);
  aspect-ratio: var(--ar, 16/9);
}
/* Image réelle dans .ph */
.ph--img {
  display: block;
}
.ph--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vis figcaption {
  padding-top: 0.55rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted, #93a2be);
}
.vis--hero { margin-top: 2rem; }
/* HERO AMBIENT ADOUXCI (SOFBLUR-1, L8 2026-11-06 : reglage officiel
   « Intensité du flou 3 px / Assombrissement 90 % »).
   Banniere 21/9 (max 560px). Fond = la meme image en cover floutee douce,
   tres assombrie. Premier plan = image nette a sa taille NATIVE (contain),
   jamais etiree ni agrandie — le decor arrondit l'arriere-plan sans
   jamais rogner la photo principale. */
.vis--hero .ph { --ar: 21/9; max-height: 560px; }
.ph--img.is-ambient {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph--img.is-ambient .decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) brightness(0.9);
  transform: scale(1.25); /* deborde largement : les bords flous ne creusent pas */
  pointer-events: none;
}
.ph--img.is-ambient .front {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  object-fit: contain;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
}

/* ---------- Corps en deux colonnes -------------------------------------- */
.jr-body {
  display: grid;
  grid-template-columns: 11rem minmax(0, 46rem);
  gap: 3.5rem;
  justify-content: start;
  margin-top: 2.5rem;
  align-items: start;
}

/* ---------- Rail de partage --------------------------------------------- */
.jr-rail {
  position: sticky;
  top: 5.5rem;
  display: grid;
  gap: 0.9rem;
  font-size: 0.82rem;
  color: var(--muted, #93a2be);
}
.jr-rail h2 {
  margin: 0 0 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange, #f58220);
}
.jr-rail .b {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.9rem;
  border: 1px solid var(--w-line);
  border-radius: 10px;
  background: var(--card, #0b1730);
  color: #fff;
  font: 600 0.8rem/1 var(--font, "Plus Jakarta Sans", sans-serif);
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition: border-color 0.18s;
}
.jr-rail .b:hover { border-color: var(--orange, #f58220); }

.copy-status {
  font-size: 0.75rem;
  color: var(--orange, #f58220);
  min-height: 1.2em;
  display: block;
}

/* ---------- Corps du texte (output de news_prepare) --------------------- */
.cols {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--w-text, #d5deee);
  overflow-wrap: break-word;
}
.cols p {
  margin: 0 0 1.25rem;
  /* JUST-1 (L8 2026-11-06, option B de MAQ-COUV-1) : justification avec
     césures automatiques — bord droit net même sur mobile. lang="fr" présent
     sur <html> = hyphens actif. Les listes et citations restent alignées à
     gauche (justification de listes = espaces gappy). */
  text-align: justify;
  hyphens: auto;
  text-justify: inter-word;
}
.cols strong { color: #fff; font-weight: 700; }

/* Intertitres h2 marqués .sec (produits par news_prepare) */
.cols .sec,
.cols h2.sec {
  clear: both;
  margin: 2.75rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--orange, #f58220);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}
.cols ul { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.cols li { margin-bottom: 0.4rem; }
.cols li::marker { color: var(--orange, #f58220); }
.cols blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--w-line);
  border-left: 4px solid var(--orange, #f58220);
  border-radius: 14px;
  background: var(--card, #0b1730);
  color: #fff;
  font-weight: 600;
}
.cols blockquote p { margin: 0; }
.cols a {
  color: var(--orange-2, #ff9e4d);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

/* BLOCIMG-1 (L8 2026-11-06) : les images du corps restent DANS le bloc, au
   ratio NATIF — fin des recadrages imposés (16/9 en vis--wide, 4/3 en inline)
   qui zoomaient/croppaient les images ; jamais d'agrandissement au-delà de
   la résolution source (width: auto, max-width: 100%). */
.cols .vis--wide        { clear: both; margin: 1rem 0 1.5rem; }
.cols .vis--inline      { margin: 1rem 0 1.5rem; }
.cols .vis--inline-left { margin: 1rem 0 1.5rem; }
.cols .vis--wide .ph,
.cols .vis--inline .ph,
.cols .vis--inline-left .ph { aspect-ratio: auto; }
.cols .vis .ph img {
  width: auto;
  max-width: 100%;
  height: auto;
}
.cols::after { content: ""; display: block; clear: both; }

/* ---------- Lien Visiter ------------------------------------------------ */
.visit { margin: 1.5rem 0 0; }

/* ---------- CTA bas de page -------------------------------------------- */
.jr-cta {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.6rem;
  border: 1px solid var(--w-line);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--card-2, #0e1d3c), var(--card, #0b1730));
}
.jr-cta h2 { margin: 0 0 0.3rem; font-size: 1.25rem; color: #fff; }
.jr-cta p  { margin: 0; color: var(--muted, #93a2be); }

/* ---------- Paginateur -------------------------------------------------- */
.jr-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.jr-pager a {
  display: block;
  min-height: 44px;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--w-line);
  border-radius: 14px;
  background: var(--card, #0b1730);
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  transition: border-color 0.18s;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jr-pager a:hover { border-color: var(--orange, #f58220); }
.jr-pager a small {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange, #f58220);
}
.jr-pager a:last-child { text-align: right; }

.jr-all {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.88rem;
}
.jr-all a { color: var(--muted, #93a2be); text-decoration: underline; }
.jr-all a:hover { color: #fff; }

/* ---------- 404 --------------------------------------------------------- */
.jr-404 {
  max-width: 50rem;
  margin-inline: auto;
  text-align: center;
  padding-block: 2rem 3rem;
}
.jr-404 h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); color: #fff; margin: 0.6rem 0 1rem; }

/* ---------- Responsive -------------------------------------------------- */
@media (min-width: 900px) {
  .cols .vis--inline {
    float: right;
    width: 44%;
    margin: 0.35rem 0 1rem 1.75rem;
  }
  .cols .vis--inline-left {
    float: left;
    width: 44%;
    margin: 0.35rem 1.75rem 1rem 0;
  }
}

@media (max-width: 900px) {
  .jr-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .jr-rail {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--w-line);
  }
  .jr-rail h2    { grid-column: 1 / -1; }
  .copy-status   { grid-column: 1 / -1; }
  .jr-pager      { grid-template-columns: 1fr; }
  .jr-pager a:last-child { text-align: left; }
  .vis--hero .ph { max-height: 360px; }
}

@media (max-width: 600px) {
  .jr-cta { flex-direction: column; align-items: flex-start; }
}
