/* La Casa des Poseurs : lecture des articles du blog.
   Chargée après l'habillage d'Opsora Blogueur, sur les seuls articles (body.opsora-article).
   Charte : Montserrat, noir #000, rouge #D20910. */

body.opsora-article {
    --casa-rouge: var(--e-global-color-accent, #D20910);
    --casa-texte: #262626;
    --casa-doux: #6b6b6b;
    --casa-trait: #e7e7e7;
    --casa-fond: #f6f6f4;
}

/* Colonne de lecture : environ 70 caractères par ligne */
body.opsora-article .site-main { max-width: 780px; }
body.opsora-article .page-content { font-size: 18px; line-height: 1.75; color: var(--casa-texte); }
body.opsora-article .page-content p { margin-bottom: 0; }
body.opsora-article .page-content strong { color: #000; font-weight: 700; }

/* Titres (Hello ajoute 10 px de marge au titre sous 575 px : il serait décalé du texte) */
body.opsora-article .page-header .entry-title { padding-inline: 0; }
body.opsora-article .page-content h2 { font-size: clamp(25px, 2.6vw, 31px); line-height: 1.25; letter-spacing: -0.01em; margin: 2.3em 0 0; scroll-margin-top: 24px; }
body.opsora-article .page-content h2 + * { margin-top: 0.8em; }
body.opsora-article .page-content h3 { font-size: 21px; margin: 1.8em 0 0; }

/* Chapeau */
body.opsora-article .page-content .opsora-tldr { font-size: 20px; line-height: 1.6; font-weight: 500; color: #111; border-left: 4px solid var(--casa-rouge); padding: 2px 0 2px 22px; margin-top: 8px; }

/* Listes : puces carrées rouges, comme le reste de la charte */
body.opsora-article .page-content > ul { list-style: none; padding-left: 0; }
body.opsora-article .page-content > ul > li { position: relative; padding-left: 26px; }
body.opsora-article .page-content > ul > li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; background: var(--casa-rouge); }
body.opsora-article .page-content > ul > li + li { margin-top: 0.55em; }
body.opsora-article .page-content ol > li + li { margin-top: 0.55em; }

/* Liens dans le texte : rouge, soulignement fin */
body.opsora-article .page-content a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* En bref : noir, aéré, une idée par ligne, chiffre clé en évidence, date et source en retrait */
body.opsora-article .page-content .opsora-en-bref { padding: 28px 32px 22px; border-radius: 10px; margin: 32px 0 40px; }
body.opsora-article .opsora-en-bref h2 { font-size: 13px !important; letter-spacing: 0.16em; color: #fff !important; margin: 0 0 6px !important; }
body.opsora-article .opsora-en-bref h2::before { content: ""; display: inline-block; width: 18px; height: 3px; background: var(--casa-rouge); vertical-align: middle; margin: -2px 10px 0 0; }
body.opsora-article .opsora-en-bref ul { gap: 0; }
body.opsora-article .opsora-en-bref li { font-size: 16px; line-height: 1.6; color: #cfcfcf; padding: 14px 0 14px 24px; margin: 0; }
body.opsora-article .opsora-en-bref li + li { border-top: 1px solid rgba(255, 255, 255, 0.12); }
body.opsora-article .opsora-en-bref li::before { top: calc(14px + 0.62em); width: 8px; height: 8px; }
body.opsora-article .opsora-en-bref li strong { color: #fff; font-weight: 700; }
body.opsora-article .opsora-en-bref .opsora-as-of { font-size: 13px; color: #8f8f8f; margin-left: 4px; white-space: nowrap; }
body.opsora-article .page-content .opsora-en-bref a { font-size: 13px; font-weight: 500; color: #8f8f8f !important; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); margin-left: 4px; }
body.opsora-article .page-content .opsora-en-bref a:hover { color: #fff !important; }

/* Tableaux : sans quadrillage, en-tête noir, première colonne en gras */
body.opsora-article .page-content table { display: table; width: 100%; border-collapse: separate; border-spacing: 0; margin: 2em 0; font-size: 15.5px; line-height: 1.55; border: 1px solid var(--casa-trait); border-radius: 10px; overflow: hidden; }
body.opsora-article .page-content table th,
body.opsora-article .page-content table td { border: 0; padding: 15px 18px; text-align: left; vertical-align: top; background: #fff; }
body.opsora-article .page-content table thead th { background: #000; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 14px; padding-bottom: 14px; }
body.opsora-article .page-content table tbody tr:nth-child(n) td { background: #fff; }
body.opsora-article .page-content table tbody tr + tr td { border-top: 1px solid var(--casa-trait); }
body.opsora-article .page-content table tbody td:first-child { font-weight: 700; color: #000; width: 28%; }
body.opsora-article .page-content table tbody tr:hover td { background: var(--casa-fond); }

/* Définitions */
body.opsora-article .opsora-definitions { background: var(--casa-fond); border-radius: 10px; padding: 24px 28px 10px; margin-top: 2.2em; }
body.opsora-article .opsora-definitions dt { font-size: 17px; }
body.opsora-article .opsora-definitions dd { font-size: 16px; line-height: 1.65; color: #444; margin: 6px 0 16px; }

/* Questions fréquentes */
body.opsora-article .opsora-faq details { border-color: var(--casa-trait); border-radius: 10px; transition: border-color .2s ease; }
body.opsora-article .opsora-faq details[open] { border-color: #000; }
body.opsora-article .opsora-faq summary { font-size: 17px; line-height: 1.45; padding: 18px 54px 18px 22px; }
body.opsora-article .opsora-faq summary:hover { color: var(--casa-rouge); }
body.opsora-article .opsora-faq details p { font-size: 16.5px; line-height: 1.7; padding: 0 22px 20px; }

/* Sources : discrètes */
body.opsora-article .opsora-sources { border-top: 1px solid var(--casa-trait); padding-top: 22px; margin-top: 2.6em; }
body.opsora-article .opsora-sources h2 { font-size: 13px !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--casa-doux) !important; margin: 0 0 10px !important; }
body.opsora-article .opsora-sources ul { list-style: none; padding-left: 0; }
body.opsora-article .opsora-sources li { font-size: 14px; line-height: 1.5; }
body.opsora-article .opsora-sources li + li { margin-top: 6px; }
body.opsora-article .opsora-sources li::marker { content: none; }
body.opsora-article .opsora-sources li > span { color: #9a9a9a; margin-left: 4px; white-space: nowrap; }

/* Appel à l'action */
body.opsora-article .page-content .opsora-cta { border-radius: 10px; padding: 28px 32px; margin-top: 44px; }
body.opsora-article .page-content .opsora-cta strong { color: #fff; }

/* Étiquettes : petites pastilles sous l'article */
body.opsora-article .post-tags { margin-top: 28px; }
body.opsora-article .post-tags .tag-links { font-size: 0; display: flex; flex-wrap: wrap; gap: 8px; }
body.opsora-article .page-content .post-tags a { font-size: 13px; font-weight: 600; line-height: 1; color: #333; background: var(--casa-fond); border: 1px solid var(--casa-trait); border-radius: 999px; padding: 8px 14px; text-decoration: none; }
body.opsora-article .page-content .post-tags a:hover { color: #fff; background: #000; border-color: #000; }

/* Commentaires */
body.opsora-article .comments-area { border-top: 1px solid var(--casa-trait); margin-top: 48px; padding-top: 36px; }
body.opsora-article .comment-reply-title { font-size: 24px; font-weight: 700; color: #000; margin-bottom: 6px; }
body.opsora-article .comment-notes { font-size: 14px; color: var(--casa-doux); }
body.opsora-article .comment-form label { display: block; font-size: 14px; font-weight: 600; color: #000; margin-bottom: 6px; }
body.opsora-article .comment-form input[type="text"],
body.opsora-article .comment-form input[type="email"],
body.opsora-article .comment-form input[type="url"],
body.opsora-article .comment-form textarea { width: 100%; font: inherit; font-size: 16px; border: 1px solid #d4d4d4; border-radius: 8px; padding: 12px 14px; background: #fff; }
body.opsora-article .comment-form input:focus,
body.opsora-article .comment-form textarea:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
body.opsora-article .comment-form textarea { min-height: 150px; }
body.opsora-article .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--casa-doux); }
body.opsora-article .comment-form-cookies-consent label { font-weight: 400; color: var(--casa-doux); }
body.opsora-article .comment-form-cookies-consent input { margin-top: 4px; }
body.opsora-article .comment-form .submit { background: var(--casa-rouge); color: #fff; border: 0; border-radius: 4px; padding: 14px 24px; font-weight: 700; font-size: 15px; cursor: pointer; }
body.opsora-article .comment-form .submit:hover { background: #a8070d; }

/* Mobile */
@media (max-width: 640px) {
    body.opsora-article .page-content { font-size: 17px; line-height: 1.7; }
    body.opsora-article .page-content .opsora-tldr { font-size: 18px; padding-left: 16px; }
    body.opsora-article .page-content .opsora-en-bref { padding: 22px 20px 16px; }
    body.opsora-article .opsora-en-bref li { font-size: 15px; }
    body.opsora-article .page-content .opsora-cta { padding: 24px 22px; }

    /* Le tableau devient une pile de cartes (titre de colonne au-dessus de chaque valeur) */
    body.opsora-article .page-content table.casa-table,
    body.opsora-article .page-content table.casa-table tbody,
    body.opsora-article .page-content table.casa-table tr,
    body.opsora-article .page-content table.casa-table td { display: block; width: 100%; }
    body.opsora-article .page-content table.casa-table { border: 0; border-radius: 0; overflow: visible; }
    body.opsora-article .page-content table.casa-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body.opsora-article .page-content table.casa-table tr { border: 1px solid var(--casa-trait); border-left: 3px solid var(--casa-rouge); border-radius: 8px; overflow: hidden; }
    body.opsora-article .page-content table.casa-table tr + tr { margin-top: 12px; }
    body.opsora-article .page-content table.casa-table tbody tr + tr td { border-top: 0; }
    body.opsora-article .page-content table.casa-table td { padding: 2px 16px 12px; font-size: 15.5px; }
    body.opsora-article .page-content table.casa-table td:first-child { width: 100%; font-size: 16.5px; padding: 14px 16px 6px; }
    body.opsora-article .page-content table.casa-table td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8a8a; margin-bottom: 2px; }
    body.opsora-article .page-content table.casa-table tbody tr:hover td { background: #fff; }

    /* Sans le script, le tableau défile horizontalement au lieu de déborder */
    body.opsora-article .page-content table:not(.casa-table) { display: block; overflow-x: auto; }
}
