/* Hallmark · shape: Long Document (one article, a reading column, a quiet rail) · genre: modern-minimal · theme: brand (OptSolution), material from Coral as on the landing (DESIGN.md) · redesign: full (layout recomposed, content, sanitising and anti-spam kept)
 * paper: --color-paper · accent: --color-accent · display: Montserrat 700 · body: Inter 400/600 · hero: Stage as on the landing, the article head (title, standfirst, facts) on the left, the article picture on the right, in the first screen · nav: discreet banner over a retracting bar (shared) · footer: mast (shared) · job: read, comment, then request a demo
 * axes: light/geometric-sans/cool · posture: restrained · imagery: the article's picture and the pictures in its body · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E5 S4 R5 V4 · weakest: S, the reading column is plain by design; the rhythm comes from the head, the wide picture, the rail and the comment sheet */
/* Hallmark · dropped the author badge "Administrateur" · it is the publishing account, not a byline; the JSON-LD names OptSolution as author and publisher */
/* Hallmark · dropped the view counter under the title · a dashboard figure on a reading page; the comment count stays, as a link to the thread */
/* Hallmark · dropped the editor's inline colours and empty paragraphs · Quill wrote grey on dark-blue spans that vanish in the light theme and double the line gaps; the body is now sanitised to a whitelist, then set in the site's type */
/* Hallmark · added "À lire aussi" · the same cards as the news list, the three most recent other articles */
/* Hallmark · waive 44c · header.article-tete ends at 691px of the 900px screen · a Long Document: the article body starts right under the head, its first lines sit in the first screen */
/* Hallmark · waive 79 · 273px under header.article-tete to the fold · the space is the start of the reading column (div.prose), not an empty band */
/* Hallmark · waive 78 · section heads render at 39px under a 48px article title · the rank-modulated hierarchy of DESIGN.md (--text-article, --text-h2); a longer article title must not shout */
/* Hallmark · waive 77 · 4 sections, hero and footer included · one article page (the article, its comments, related articles), not a landing strip */
/* Hallmark · answered F4 · one primary: the comment submit; share buttons and the noscript link are the cotton card, the end-of-article demo invitation a text link */
/* Hallmark · answered F7 · the comment sheet is stock with the landing's edge and cast, its inputs paper with the muted rule, as the landing's contact form */

/* ════════════════════════════════════════════════
   DÉTAIL D'UNE ACTUALITÉ (news-detail.html) - même système que l'accueil
   Jetons : css/brand.css → css/vitrine-tokens.css ; chrome : css/vitrine-base.css ;
   fiches des articles liés : css/actualites-cartes.css.
   L'article et les commentaires viennent de la base (lang="fr").
   ════════════════════════════════════════════════ */

#main-content { display: block; padding-top: calc(var(--banniere-h) + var(--barre-h)); }
#main-content:focus { outline: none; }

.section { padding-block: var(--section-pad); }
.section--papier { background: var(--color-paper-2); border-top: 1px solid var(--color-rule); }
.section + .section:not(.section--papier) { border-top: 1px solid var(--color-rule); }

/* ─── Chargement, introuvable, sans JavaScript ─── */
.article-squelette { display: grid; gap: var(--space-md); padding-block: var(--space-2xl) var(--section-pad); }
.article-squelette .squelette-ligne--titre { height: 44px; max-width: 900px; }
.squelette-visuel { display: block; aspect-ratio: 21 / 9; margin-top: var(--space-xl); border-radius: var(--radius-card); background: var(--color-paper-3); }
.etat-article { display: grid; justify-items: start; gap: var(--space-md); padding-block: var(--space-xl) var(--section-pad); }
.etat-article h1 { max-width: 20ch; font-size: var(--text-article); line-height: 1.08; letter-spacing: -0.03em; }
.etat-article p { max-width: 56ch; color: var(--color-ink-2); }
.etat-article .btn { margin-top: var(--space-xs); }

/* ════════════════════════════════════════════════
   TÊTE DE L'ARTICLE (héros « Stage » de l'accueil) : le titre, le chapô et
   les faits à gauche, l'image de l'article à droite, dans le premier écran
   ════════════════════════════════════════════════ */
.article-tete {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap-columns); row-gap: var(--space-lg); align-items: center;
  padding-block: var(--space-lg) var(--space-2xl);
}
.article-tete .fil-ariane { grid-column: 1 / -1; }
.article-tete-texte { grid-column: 1 / span 6; display: grid; gap: var(--space-md); align-content: center; min-width: 0; }
.article-tete--sans-visuel .article-tete-texte { grid-column: 1 / span 9; }
.article-titre { max-width: 22ch; font-size: var(--text-article); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.article-chapo { max-width: 52ch; font-size: var(--text-lead); line-height: 1.5; color: var(--color-ink-2); }
.article-meta { margin-top: var(--space-xs); }
.article-meta-lien {
  border-radius: 2px; color: var(--color-ink-2);
  text-decoration: underline; text-decoration-color: var(--color-rule-2); text-underline-offset: 0.25em;
  transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out);
}
.article-meta-lien:hover { color: var(--color-accent-text); text-decoration-color: currentColor; }
.article-meta-lien:active { color: var(--color-accent-hover); }
.article-meta-lien:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.note-langue { font-size: var(--text-sm); color: var(--color-muted); }

/* L'image de l'article : ratio fixe, la lumière de la capture du héros de
   l'accueil. */
.article-visuel { grid-column: 7 / -1; margin: 0; min-width: 0; }
.article-visuel img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-card); background: var(--color-paper-2);
  box-shadow: var(--edge-stock), var(--cast-hero);
}

/* ════════════════════════════════════════════════
   CORPS : la colonne de lecture (alignée sur le titre), le rail de partage
   à droite
   ════════════════════════════════════════════════ */
.article-grille {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap-columns); align-items: start;
  padding-block: var(--space-xl) var(--section-pad);
}
.prose { grid-column: 1 / span 7; grid-row: 1; min-width: 0; max-width: var(--measure-lecture); }
.article-partage {
  grid-column: 10 / -1; grid-row: 1; position: sticky; top: calc(var(--barre-h) + var(--space-xl));
  display: grid; gap: var(--space-sm); justify-items: start;
}
.article-fin {
  grid-column: 1 / span 7; max-width: var(--measure-lecture);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-xl);
  margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule);
}
.article-fin-demo { color: var(--color-ink-2); }

/* ─── Typographie du corps (HTML assaini de l'éditeur) ─── */
.prose { font-size: var(--text-lg); line-height: 1.7; color: var(--color-ink); overflow-wrap: break-word; }
.prose > * { margin: 0; max-width: none; }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 { max-width: 34ch; text-wrap: balance; }
.prose h2 { margin-top: 2em; font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.02em; }
.prose h3, .prose h4 {
  margin-top: 1.8em; font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.35;
}
.prose h3 { font-size: var(--text-xl); }
.prose h4 { font-size: var(--text-lg); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose strong, .prose b { font-weight: 600; }
.prose a {
  border-radius: 2px; color: var(--color-accent-text);
  text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-micro) var(--ease-out);
}
.prose a:hover { text-decoration-color: currentColor; }
.prose a:active { color: var(--color-accent-hover); }
.prose a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--color-accent-text); }
.prose ol > li[data-liste="puce"] { list-style-type: disc; }
.prose blockquote {
  margin-block: 2em; padding-block: var(--space-lg);
  border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule);
  font-size: var(--text-xl); line-height: 1.5; color: var(--color-ink);
}
/* Citation sur plusieurs lignes : l'éditeur fait un <blockquote> par ligne,
   affichés ici comme un seul bloc (filets en haut du premier, en bas du dernier). */
.prose blockquote + blockquote { margin-top: 0; padding-top: 0; border-top: 0; }
.prose blockquote:has(+ blockquote) { margin-bottom: 0; padding-bottom: var(--space-2xs); border-bottom: 0; }
.prose figure { margin-block: 2em; }
.prose img { border-radius: var(--radius-input); margin-inline: auto; }
.prose figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.prose pre {
  padding: var(--space-md); overflow-x: auto; border-radius: var(--radius-input);
  background: var(--color-paper-2); font-family: var(--font-outlier); font-size: var(--text-sm); line-height: 1.6;
}
.prose code { font-family: var(--font-outlier); font-size: 0.9em; }
.prose hr { margin-block: 2.5em; border: 0; border-top: 1px solid var(--color-rule); }
.prose .aligne-centre { text-align: center; }
.prose .aligne-droite { text-align: right; }

/* ─── Images du corps : habillage, galerie, agrandissement ───
   Blocs de l'éditeur (contenuArticle) : figure.media-gauche / .media-droite
   habillée par le texte à partir de 40rem, figure.galerie en grille. */
.prose { display: flow-root; }
.prose h2, .prose h3, .prose h4, .prose hr, .prose blockquote, .prose pre, .prose .galerie { clear: both; }
.prose .media-zoom {
  display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 0;
  border: 0; border-radius: var(--radius-input); background: none; cursor: zoom-in;
}
.prose .media-zoom img { display: block; transition: opacity var(--dur-micro) var(--ease-out); }
.prose .media-zoom:hover img { opacity: 0.9; }
.prose .media-zoom:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.prose figure > figcaption { text-align: center; }
/* Image seule : une photo en hauteur ne dépasse pas l'écran. */
.prose figure:not(.galerie) > .media-zoom img { width: auto; height: auto; max-width: 100%; max-height: min(78vh, 40rem); }
.prose .galerie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.prose .galerie--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose .galerie > figure { margin: 0; min-width: 0; }
.prose .galerie .media-zoom { width: 100%; }
.prose .galerie img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .galerie figcaption { font-size: var(--text-xs); line-height: 1.4; }
@media (min-width: 40rem) {
  /* Habillage : au plus 46 % de la colonne, et 26rem de haut (une photo en
     hauteur rétrécit au lieu de pousser tout le texte). */
  .prose .media-gauche, .prose .media-droite { width: fit-content; max-width: 46%; margin-block: 0.4em var(--space-md); }
  .prose .media-gauche { float: left; margin-right: var(--space-lg); }
  .prose .media-droite { float: right; margin-left: var(--space-lg); }
  .prose .media-gauche .media-zoom, .prose .media-droite .media-zoom { margin-inline: 0; }
  .prose figure.media-gauche > .media-zoom img, .prose figure.media-droite > .media-zoom img { max-height: 26rem; }
  .prose .media-gauche figcaption, .prose .media-droite figcaption { text-align: left; }
}
@media (max-width: 40rem) {
  .prose .galerie--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Visionneuse (dialog) */
:root { --visionneuse-voile: color-mix(in oklab, var(--color-board) 92%, transparent); }
html.visionneuse-ouverte { overflow: hidden; scrollbar-gutter: stable; }
.visionneuse {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: var(--space-xl) var(--space-3xl); border: 0;
  background: transparent; color: var(--color-board-type); overflow: hidden;
}
.visionneuse::backdrop { background: var(--visionneuse-voile); }
.visionneuse[open] { display: grid; place-items: center; animation: visionneuse-fondu var(--dur-short) var(--ease-out); }
.visionneuse[open]::backdrop { animation: visionneuse-fondu var(--dur-short) var(--ease-out); }
@keyframes visionneuse-fondu { from { opacity: 0; } }
.visionneuse-figure {
  display: grid; justify-items: center; gap: var(--space-sm);
  width: 100%; height: 100%; min-height: 0; margin: 0; align-content: center;
}
.visionneuse-image {
  max-width: 100%; max-height: calc(100dvh - 2 * var(--space-xl) - 4.5rem);
  width: auto; height: auto; object-fit: contain; border-radius: var(--radius-input);
}
.visionneuse-legende {
  max-width: 60ch; font-size: var(--text-sm); line-height: 1.5; text-align: center; color: var(--color-board-type);
}
.visionneuse-compteur {
  position: absolute; top: var(--space-md); left: var(--space-md); margin: 0;
  font-size: var(--text-sm); color: var(--color-board-muted); font-variant-numeric: tabular-nums;
}
.visionneuse-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: var(--rule-hair) solid var(--color-board-rule); border-radius: 50%;
  background: var(--color-board-2); color: var(--color-board-type); cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.visionneuse-btn:hover { background: var(--color-board-rule); }
.visionneuse-btn:active { transform: scale(0.96); }
.visionneuse-btn:focus-visible { outline: 2px solid var(--color-board-signal); outline-offset: 2px; transition: none; }
.visionneuse-fermer { top: var(--space-md); right: var(--space-md); }
.visionneuse-prec, .visionneuse-suiv { top: 50%; transform: translateY(-50%); }
.visionneuse-prec:active, .visionneuse-suiv:active { transform: translateY(-50%) scale(0.96); }
.visionneuse-prec { left: var(--space-md); }
.visionneuse-suiv { right: var(--space-md); }
.visionneuse--seule .visionneuse-prec, .visionneuse--seule .visionneuse-suiv { display: none; }
@media (max-width: 40rem) {
  .visionneuse { padding: 72px var(--space-xs) 88px; }
  .visionneuse-image { max-height: calc(100dvh - 160px - 3rem); }
  .visionneuse-prec, .visionneuse-suiv { top: auto; bottom: var(--space-md); transform: none; }
  .visionneuse-prec:active, .visionneuse-suiv:active { transform: scale(0.96); }
  .visionneuse-prec { left: calc(50% - 56px); }
  .visionneuse-suiv { right: calc(50% - 56px); }
}

/* ─── Partage : quatre fiches carrées, sans aplat bleu ─── */
.article-partage .article-partage-titre {
  max-width: none; font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0; line-height: 1.4; color: var(--color-ink);
}
/* Sur grand écran, une colonne de fiches dans le rail ; en ligne sous le texte ailleurs. */
.partage-liste { display: flex; flex-direction: column; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.partage-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--radius-control);
  background: var(--color-stock); color: var(--color-ink-2); box-shadow: var(--edge-stock);
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.partage-btn:hover { color: var(--color-accent-text); box-shadow: var(--edge-stock), var(--cast-stock); }
.partage-btn:active { transform: translateY(1px); }
.partage-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.partage-btn.est-copie { color: var(--color-success); }

/* ════════════════════════════════════════════════
   COMMENTAIRES : le fil à gauche, la feuille du formulaire à droite
   ════════════════════════════════════════════════ */
.commentaires-grille {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap-columns); row-gap: var(--space-2xl); align-items: start;
}
.commentaires-fil { grid-column: 1 / span 5; min-width: 0; }
.commentaires h2 {
  display: flex; align-items: baseline; gap: var(--space-sm);
  font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.025em;
}
.commentaires-compte { font-size: var(--text-lg); color: var(--color-muted); letter-spacing: 0; }
.commentaires-liste { margin: var(--space-xl) 0 0; padding: 0; list-style: none; }
.commentaire {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-md);
  padding-block: var(--space-lg); border-top: 1px solid var(--color-rule);
}
.commentaire:last-child { border-bottom: 1px solid var(--color-rule); }
.commentaire-initiale {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-paper-3); color: var(--color-accent-text); font-weight: 600;
}
.commentaire-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-sm); }
.commentaire-auteur { font-weight: 600; color: var(--color-ink); overflow-wrap: anywhere; }
.commentaire-entete time { font-size: var(--text-sm); color: var(--color-muted); }
.commentaire-texte { margin-top: var(--space-2xs); color: var(--color-ink-2); overflow-wrap: anywhere; }
.commentaires-vide { margin-top: var(--space-xl); padding-block: var(--space-lg); border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); color: var(--color-ink-2); }

.commentaire-feuille {
  grid-column: 7 / -1; padding: var(--space-xl);
  background: var(--color-stock); border-radius: var(--radius-card); box-shadow: var(--edge-stock), var(--cast-stock);
}
.commentaire-feuille .commentaire-feuille-titre {
  max-width: none; font-family: var(--font-body); font-weight: 600; font-size: var(--text-xl); line-height: 1.3; letter-spacing: -0.01em;
}
.commentaire-feuille-note { margin: var(--space-xs) 0 var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }

/* Champs : la recette du formulaire de contact de l'accueil. */
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.form-group { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); min-width: 0; }
.form-group label { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.form-label-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); }
.compteur-car { font-size: var(--text-xs); color: var(--color-muted); }
.form-group input, .form-group textarea {
  width: 100%; min-height: 48px; padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-muted); border-radius: var(--radius-input);
  background: var(--color-paper); color: var(--color-ink); font-size: var(--text-md);
  transition: border-color var(--dur-micro) var(--ease-out);
}
.form-group textarea { min-height: 144px; resize: vertical; line-height: 1.5; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--color-muted); }
.form-group input:hover, .form-group textarea:hover { border-color: var(--color-ink-2); }
.form-group input:focus-visible, .form-group textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.form-group input:disabled, .form-group textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--color-error); }
.commentaire-envoi { width: 100%; margin-top: var(--space-xs); }
.form-retour { display: none; }
.form-retour.est-visible {
  display: flex; align-items: flex-start; gap: var(--space-xs);
  margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-input);
  font-size: var(--text-sm);
}
.form-retour svg { flex: none; margin-top: var(--space-3xs); }
.form-retour--error { color: var(--color-error); background: color-mix(in oklab, var(--color-error) 8%, transparent); }
.form-retour--success { color: var(--color-success); background: var(--color-success-bg); }
.pot-de-miel { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ─── À lire aussi ─── */
.lies-tete {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--space-sm) var(--space-xl); margin-bottom: var(--space-xl);
}
.lies-tete h2 { font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.025em; }

/* ════════════════════════════════════════════════
   ADAPTATION AUX ÉCRANS
   ════════════════════════════════════════════════ */
@media (max-width: 75rem) {
  .prose, .article-fin { grid-column: 1 / span 8; }
}
@media (max-width: 60rem) {
  .article-tete-texte, .article-tete--sans-visuel .article-tete-texte, .article-visuel, .prose, .article-fin { grid-column: 1 / -1; }
  .article-visuel img { aspect-ratio: 16 / 9; }
  /* Le rail de partage passe sous le texte, avant la fin de l'article. */
  .article-partage {
    grid-column: 1 / -1; grid-row: auto; position: static;
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md);
    margin-top: var(--space-2xl); max-width: var(--measure-lecture);
  }
  .article-fin { margin-top: var(--space-lg); }
  .partage-liste { flex-direction: row; flex-wrap: wrap; }
  .commentaires-fil, .commentaire-feuille { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .article-tete { padding-block: var(--space-lg) var(--space-xl); }
  .article-visuel img { aspect-ratio: 3 / 2; }
  .article-grille { padding-top: var(--space-xl); }
  .prose { font-size: var(--text-md); line-height: 1.7; }
  .prose blockquote { font-size: var(--text-lg); }
  .commentaire-feuille { padding: var(--space-lg) var(--space-md); }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .partage-btn, .article-meta-lien, .prose a, .form-group input, .form-group textarea { transition: none; }
  .prose .media-zoom img, .visionneuse-btn { transition: none; }
  .visionneuse[open], .visionneuse[open]::backdrop { animation: none; }
}
