/* Gabarit « récit » (single-story.php, inc/story.php) : en-tête encre, chiffres clés, frise, score, galerie, citation. */

.st { background: var(--page); }

/* ---------- En-tête ---------- */
.st-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(96px, 11vw, 160px); }
.st-hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 2; pointer-events: none; }
.st-hero-in { position: relative; z-index: 1; max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: var(--col-gap); align-items: center; }
.st-hero .rank-math-breadcrumb { margin: 0 0 28px; font-size: 14px; color: rgba(255, 255, 255, .55); }
.st-hero .rank-math-breadcrumb a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.st-hero .rank-math-breadcrumb a:hover { color: #fff; }
.st-kicker { display: inline-block; margin: 0 0 24px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.st-title { margin: 0 0 28px; color: #fff; font-weight: 300; font-size: clamp(3rem, 1.6rem + 5vw, 6rem); line-height: .95; letter-spacing: -.035em; text-transform: none; }
.st-title .st-sub { display: block; margin-top: 18px; font-size: .38em; line-height: 1.2; letter-spacing: -.01em; color: var(--terre-300); }
.st-lead { max-width: 560px; margin: 0 0 32px; font-size: 1.25rem; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, .82); }
.st-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.st-meta li { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 14px; color: rgba(255, 255, 255, .9); }
.st-poster { justify-self: end; width: min(360px, 100%); margin: 0; border-radius: var(--radius-card); overflow: hidden; transform: rotate(2.5deg); box-shadow: 0 32px 64px rgba(0, 0, 0, .45); }
.st-poster img { display: block; width: 100%; height: auto; }

/* ---------- Corps ---------- */
.st-body { padding: 0 var(--gutter) var(--sec-pad); }
.st-body > * { max-width: 760px; margin-inline: auto; }
.st-body p { font-size: 1.125rem; line-height: 1.75; color: var(--graphite, #444); }

/* Chiffres clés : carte blanche qui chevauche l'en-tête */
.st-body > .st-facts { position: relative; z-index: 2; max-width: var(--content-max); margin: calc(-1 * clamp(56px, 7vw, 96px)) auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-radius: var(--radius-card); box-shadow: 0 24px 56px rgba(17, 17, 17, .08); }
.st-facts div { padding: 28px 20px; text-align: center; }
.st-facts div + div { border-left: 1px solid var(--sand); }
.st-facts b { display: block; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); font-weight: 600; line-height: 1; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.st-facts span { display: block; margin-top: 10px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }

/* Frise : un chapitre par moment du voyage */
.st-body > .st-chapter { position: relative; margin-top: clamp(64px, 8vw, 112px); padding-left: 56px; }
.st-chapter::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: -40px; width: 1px; background: var(--sand); }
.st-chapter .st-day { position: relative; margin: 0 0 12px; font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--terre-700); }
.st-chapter .st-day::before { content: ""; position: absolute; left: -56px; top: 1px; width: 23px; height: 23px; box-sizing: border-box; border-radius: 50%; background: var(--page); border: 6px solid var(--terre-600); }
.st-chapter h2 { margin: 0 0 16px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 400; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); text-transform: none; }
.st-chapter p:not(.st-day) { margin: 0 0 8px; }

/* Photos : à leur taille réelle, bords arrondis, jamais dans un cadre vide */
.st-body .wp-block-image { margin: 32px 0 0; }
.st-body .wp-block-image img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 14px; cursor: zoom-in; }
.st-body figcaption, .st-body .wp-element-caption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text-soft); text-align: left; }
.st-body .wp-block-gallery { margin-top: 32px; gap: 14px; }
.st-body .wp-block-gallery .wp-block-image img { border-radius: 14px; }
.st-body .wp-block-gallery .wp-block-image figcaption { position: static; margin: 10px 0 0; padding: 0; background: none; color: var(--text-soft); font-size: 14px; text-align: left; max-height: none; overflow: visible; }

/* Score : bandeau terre battue pleine largeur */
.st-body > .st-score { position: relative; overflow: hidden; width: 100vw; max-width: none; margin: clamp(72px, 9vw, 128px) 0 0 calc(50% - 50vw); padding: clamp(56px, 7vw, 96px) var(--gutter); background: var(--terre-600); color: #fff; text-align: center; box-sizing: border-box; }
.st-score svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 3; pointer-events: none; }
.st-score > * { position: relative; }
.st-score .st-score-k { margin: 0 0 28px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.st-score-row { display: flex; justify-content: center; align-items: center; gap: clamp(20px, 5vw, 72px); }
.st-team { min-width: 0; font-size: 14px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.st-team b { display: block; margin-bottom: 14px; font-size: clamp(5rem, 3rem + 8vw, 10rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; }
.st-team i { display: block; width: 48px; height: 6px; margin: 12px auto 0; border-radius: 3px; }
.st-team--fr i { background: linear-gradient(90deg, #1d3e8a 0 33.3%, #fff 33.3% 66.6%, #c8102e 66.6%); }
.st-team--it i { background: linear-gradient(90deg, #008c45 0 33.3%, #fff 33.3% 66.6%, #cd212a 66.6%); }
.st-dash { font-size: clamp(3rem, 2rem + 4vw, 6rem); font-weight: 200; line-height: 1; opacity: .6; padding-bottom: 32px; }
.st-score p.st-score-x { max-width: 560px; margin: 32px auto 0; font-size: 1.125rem; line-height: 1.6; color: rgba(255, 255, 255, .92); }
.st-score-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.st-score-steps li { padding: 8px 14px; border-radius: 999px; background: rgba(17, 17, 17, .18); font-size: 14px; }

/* Galerie des matchs : plus large que le texte */
.st-body > .st-gallery-head { margin-top: clamp(64px, 8vw, 112px); text-align: center; }
.st-gallery-head h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 400; letter-spacing: -.02em; color: var(--ink); text-transform: none; }
.st-gallery-head p { margin: 0; color: var(--text-soft); }
.st-body > .wp-block-gallery.st-gallery { max-width: 1120px; margin-top: 32px; }
.st-gallery .wp-block-image { overflow: hidden; border-radius: 14px; }
.st-gallery .wp-block-image img { transition: transform .5s var(--ease); }
.st-gallery .wp-block-image:hover img { transform: scale(1.04); }

/* Citation */
.st-body > .st-quote { max-width: 880px; margin: clamp(72px, 9vw, 128px) auto 0; padding: 0; border: 0; text-align: center; }
.st-quote::before { content: "“"; display: block; height: .55em; font-size: 7rem; line-height: 1; color: var(--terre-600); }
.st-quote p { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-weight: 300; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.st-quote cite { display: block; margin-top: 20px; font-size: 13px; font-style: normal; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--terre-700); }

/* Appel final */
.st-body > .st-cta { max-width: var(--content-max); margin: clamp(72px, 9vw, 128px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; padding: clamp(32px, 4vw, 56px); border-radius: var(--radius-card); background: var(--cream); }
.st-cta .st-cta-k { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--terre-700); }
.st-cta h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 400; letter-spacing: -.02em; color: var(--ink); text-transform: none; }
.st-cta p { margin: 0; }
.st-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Agrandissement des photos (story.js) */
.st-lb { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 56px 72px; background: rgba(17, 17, 17, .92); }
.st-lb[hidden] { display: none; }
.st-lb img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.st-lb button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.st-lb button:hover { background: rgba(255, 255, 255, .2); }
.st-lb-close { top: 16px; right: 16px; }
.st-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.st-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Lien des articles : soulignement du thème neutralisé sur les boutons */
.st-body .st-cta a.ccn-b { text-decoration: none; }

@media (max-width: 900px) {
	.st-hero-in { grid-template-columns: minmax(0, 1fr); }
	.st-poster { justify-self: start; width: min(260px, 70%); transform: rotate(2deg); }
	.st-body > .st-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.st-facts div:nth-child(3) { border-left: 0; }
	.st-facts div:nth-child(n+3) { border-top: 1px solid var(--sand); }
	.st-body > .st-chapter { padding-left: 40px; }
	.st-chapter .st-day::before { left: -40px; }
	.st-chapter::before { left: 11px; }
	.st-body > .st-cta { grid-template-columns: minmax(0, 1fr); }
	.st-lb { padding: 64px 12px; }
	.st-lb-prev, .st-lb-next { top: auto; bottom: 12px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.st-gallery .wp-block-image img { transition: none; }
}

/* ---------- Corrections : pleine largeur, titre, légendes, citation ---------- */
/* layout.css (chargé après) impose une marge aux articles : sélecteur avec l'identifiant #content pour passer devant. */
html body.single-post.ccn-story-page #content > .ast-container { max-width: none !important; padding: 0 !important; margin: 0 !important; }
html body.ccn-story-page #primary, html body.ccn-story-page .site-main { margin: 0 !important; padding: 0 !important; }
html body .st-hero h1.st-title { color: #fff; }
html body .st-hero h1.st-title .st-sub { color: var(--terre-300); }
/* Galeries : photo en 3:2, légende sous la photo (pas en surimpression) */
html body .st-body .wp-block-gallery.has-nested-images figure.wp-block-image { display: block; }
html body .st-body .wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
html body .st-body .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
html body .st-body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position: static; margin: 10px 0 0; padding: 0; background: none; color: var(--text-soft); font-size: 14px; text-align: left; text-shadow: none; max-height: none; overflow: visible; }
html body .st-body blockquote.st-quote { border: 0 !important; padding: 0 !important; background: none !important; font-style: normal; }
html body .st-body blockquote.st-quote::before { font-style: normal; font-family: Georgia, "Times New Roman", serif; }
html body .st-body blockquote.st-quote p { font-style: normal; }
/* base.css retire la marge des <article> sur les pages ccn-lot : marge latérale rétablie pour le récit. */
html body.ccn-lot article.st-body { padding: 0 var(--gutter) var(--sec-pad); }
