/* Le codemod couleur du 2026-07-28 a mappe du CHROME NEUTRE sur des jetons
   SEMANTIQUES. Invisible tant que --warn et --err etaient des gris ; le retour
   des couleurs marketing a fait ressortir les cartes en rouge pale et l'en-tete
   en peche. Une bordure de carte n'est pas une erreur, un bouton de connexion
   n'est pas un avertissement. */
/* ===== CASE STUDY PAGE + INDEX ===== */
.case-study-page {
    margin: 0;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    line-height: 1.6;
}

.cs-main { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.cs-back { color: var(--text-tertiary); text-decoration: none; font-size: 0.9rem; }
.cs-back:hover { color: var(--accent); }
.cs-category {
    display: inline-block; margin: 1rem 0 0.5rem; font-size: 0.72rem; font-weight: var(--graisse-forte);
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--marque-fonce, var(--accent));
    background: var(--marque-pale, var(--info-tint)); padding: 0.2rem 0.6rem; border-radius: 999px;
}
.cs-title { font-size: 2.3rem; line-height: 1.2; font-weight: var(--graisse-forte); color: var(--text-primary); margin: 0.4rem 0 0.6rem; }
.cs-subtitle { font-size: 1.2rem; color: var(--text-secondary); margin: 0 0 1.75rem; }

.cs-media { margin: 1.75rem 0; }
.cs-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px var(--shadow-tint-12); }
.cs-video iframe, .cs-video > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-hero-img { width: 100%; border-radius: 14px; box-shadow: 0 8px 30px var(--shadow-tint-12); display: block; }

/* Body prose (renders the hand-finished bodyHtml) */
.cs-body { font-size: 1.05rem; color: var(--text-secondary); }
.cs-body h2 { font-size: 1.6rem; font-weight: var(--graisse-forte); color: var(--text-primary); margin: 2.25rem 0 0.75rem; }
.cs-body h3 { font-size: 1.25rem; font-weight: var(--graisse-forte); color: var(--text-primary); margin: 1.75rem 0 0.5rem; }
.cs-body p { margin: 0 0 1.1rem; }
.cs-body ul, .cs-body ol { margin: 0 0 1.1rem 1.25rem; padding: 0; }
.cs-body li { margin-bottom: 0.4rem; }
.cs-body a { color: var(--accent); }
.cs-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.25rem 0; box-shadow: 0 4px 18px var(--shadow-tint-12); }
.cs-body figure { margin: 1.5rem 0; }
.cs-body figcaption { font-size: 0.85rem; color: var(--text-tertiary); text-align: center; margin-top: 0.4rem; }
.cs-body blockquote { border-left: 3px solid var(--accent); margin: 1.25rem 0; padding: 0.25rem 0 0.25rem 1rem; color: var(--text-secondary); }
.cs-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.cs-body th, .cs-body td { border: 1px solid var(--border-subtle); padding: 0.5rem 0.75rem; text-align: left; }

/* PDF download */
.cs-pdf { margin: 2rem 0; }
.cs-pdf-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--bg-secondary); border: 1.5px solid var(--accent); color: var(--accent);
    padding: 0.7rem 1.25rem; border-radius: 10px; font-weight: var(--graisse-forte); text-decoration: none;
}
.cs-pdf-btn::before { content: "⬇"; }
.cs-pdf-btn:hover { background: var(--accent); color: var(--text-primary); }

.cs-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.cs-tag { font-size: 0.8rem; color: var(--text-secondary); background: var(--bg-primary); padding: 0.2rem 0.6rem; border-radius: 6px; }

/* CTA */
.cs-cta {
    margin-top: 3rem; padding: 2.25rem; text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--border-subtle); border-radius: 16px;
}
.cs-cta h2 { font-size: 1.5rem; color: var(--text-primary); margin: 0 0 0.5rem; }
.cs-cta p { color: var(--text-secondary); margin: 0 0 1.25rem; }
.cs-cta-btn { display: inline-block; background: var(--accent); color: var(--text-primary); padding: 0.8rem 1.75rem; border-radius: 10px; font-weight: var(--graisse-forte); text-decoration: none; }
.cs-cta-btn:hover { background: var(--accent); }

/* Footer */

/* Responsive */
@media (max-width: 768px) {
    .cs-title { font-size: 1.8rem; }
}

/* Readable article layout, shared verbatim with the sandboxed admin preview. */
.case-study-page { background: var(--bg-primary); }
.cs-cta-btn, .cs-pdf-btn:hover { color: var(--text-inverse) !important; }
.cs-main { width: 100%; max-width: 960px; padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem; }
.cs-article { min-width: 0; }
.cs-back { display: inline-block; margin-bottom: .5rem; }
.cs-title { font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.cs-subtitle { max-width: 65ch; line-height: 1.65; }
.cs-category { margin-top: .75rem; }
.cs-video > img { object-fit: cover; }
.cs-hero-img { max-height: 540px; object-fit: contain; background: var(--bg-secondary); border: 1px solid var(--border-subtle); box-shadow: none; }
.cs-body { line-height: 1.8; overflow-wrap: anywhere; }
.cs-body h2, .cs-body h3, .cs-body h4 { line-height: 1.3; text-wrap: balance; }
.cs-body h2 { padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.cs-body > :first-child { margin-top: 0; }
.cs-body img { display: inline-block; max-width: 100%; height: auto; object-fit: contain; box-shadow: none; border: 1px solid var(--border-subtle); }
.cs-body li > p { margin: 0; }
.cs-body table { display: block; max-width: 100%; overflow-x: auto; border-spacing: 0; line-height: 1.5; }
.cs-body th { background: var(--bg-tertiary); color: var(--text-primary); font-weight: var(--graisse-forte); }
.cs-body td, .cs-body th { min-width: 5rem; vertical-align: top; }
.cs-body pre { max-width: 100%; overflow-x: auto; padding: 1rem; background: var(--bg-tertiary); border-radius: 8px; white-space: pre; }
.cs-body code { font-size: .9em; }
.cs-body .ql-align-center { text-align: center; }
.cs-body .ql-align-right { text-align: right; }
.cs-body .ql-align-justify { text-align: justify; }
.cs-body .ql-direction-rtl { direction: rtl; }
.cs-body [data-list="bullet"] { list-style-type: disc; }
.cs-body .ql-indent-1 { margin-left: 2em; }
.cs-body .ql-indent-2 { margin-left: 4em; }
.cs-body .ql-indent-3 { margin-left: 6em; }
.cs-body .ql-indent-4, .cs-body .ql-indent-5, .cs-body .ql-indent-6,
.cs-body .ql-indent-7, .cs-body .ql-indent-8 { margin-left: 8em; }
/* Fiches d'étude converties (`services/publications/corps-fiche-html.js`) : une colonne, tableaux à filets,
   nombres alignés, figures légendées. Couleurs : les rôles du thème du site, aucune valeur en dur. */
.cs-body table { font-variant-numeric: tabular-nums; font-size: .92rem; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); -webkit-overflow-scrolling: touch; }
.cs-body th, .cs-body td { border: 0; border-bottom: 1px solid var(--border-subtle); padding: .45rem .75rem; }
.cs-body table { border-collapse: collapse; }
/* .cs-body casse partout (anywhere) : dans un tableau, une cellule garde ses mots entiers et le tableau défile. */
.cs-body table, .cs-body th, .cs-body td { overflow-wrap: normal; }
.cs-body th { font-size: .82rem; vertical-align: bottom; }
.cs-body tbody tr:last-child td { border-bottom: 0; }
.cs-body td.ql-align-right, .cs-body th.ql-align-right { text-align: right; white-space: nowrap; }
.cs-body tr.etude-surligne td { background: var(--marque-pale); color: var(--text-primary); }
.cs-body .etude-ok { color: var(--accent); font-weight: var(--graisse-forte); }
.cs-body .etude-ko { color: var(--text-primary); font-weight: var(--graisse-forte); text-decoration: underline; text-underline-offset: 3px; }
.cs-body .etude-legende { font-size: .85rem; line-height: 1.55; color: var(--text-tertiary); margin-top: -.6rem; }
.cs-body figure { margin: 1.75rem 0; }
.cs-body figure img { display: block; margin: 0 auto; background: var(--n-surface); }
.cs-body figcaption { text-align: left; line-height: 1.5; max-width: 70ch; margin: .6rem auto 0; }
.cs-body figure.etude-serie { display: inline-block; vertical-align: top; width: calc(50% - .6rem); margin: .75rem .3rem; }
.cs-body figure.etude-serie img { margin: 0 auto; }
.cs-body figure.etude-serie figcaption { text-align: center; font-size: .8rem; }
.cs-body h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.cs-body ul li > strong:first-child { color: var(--text-primary); }
@media (min-width: 900px) { .cs-body figure.etude-serie { width: calc(33.333% - .7rem); } }
@media (max-width: 560px) {
        .cs-body figure.etude-serie { width: 100%; margin: 1rem 0; }
        .cs-body table { font-size: .85rem; }
        .cs-body th, .cs-body td { padding: .4rem .55rem; min-width: 4rem; }
        .cs-cta { padding: 1.5rem 1rem; }
}
/* Le site remet à zéro les marges des titres et paragraphes avec `html[data-site] h1, h2, h3, p` (_mise-en-page.css,
   spécificité 0,1,2), plus fort que `.cs-body h3` : le corps d'une étude repose ses espacements au même niveau. */
html[data-site] .cs-body h2 { margin: 2.25rem 0 0.75rem; }
html[data-site] .cs-body h3 { margin: 1.75rem 0 0.5rem; }
html[data-site] .cs-body p { margin: 0 0 1.1rem; }
html[data-site] .cs-body > :first-child { margin-top: 0; }
