/*
Theme Name: sdna
Theme URI: 
Author: aw
Description: optimized seo theme
Version: 1.0
*/

/* ============================
   Variables couleurs (personnalisable dans "personnaliser")
============================ 
:root {
    --color-primary: #9AC1C6;
    --color-background: #ffffff;
    --color-text: #151516;
}
*/

/* ============================
   Reset de base
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.75;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================
   Boutons réutilisables
============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    border: 1px solid var(--color-primary);
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

/* ============================
   Accessibilité
============================ */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ============================
   Layout général (deux colonnes) - Article / Page
============================ */
.article-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.post-layout--single-col {
    grid-template-columns: 1fr;
    max-width: 852px;
    margin: 0 auto;
}

.post-main-col {
    min-width: 0;
}

/* ============================
   Image de couverture
============================ */
.post-thumbnail {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: color-mix(in srgb, var(--color-text) 4%, var(--color-background));
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================
   En-tête de l'article
============================ */
.post-header {
    margin-bottom: 24px;
}

.post-category {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-background);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.post-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--color-text);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--color-text);
    opacity: 0.6;
}

.post-meta span:not(:last-child)::after {
    content: "•";
    margin-left: 6px;
    opacity: 0.5;
}

.post-date-update {
    font-style: italic;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-author-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ============================
   Boutons de partage (icônes colorées)
============================ */
.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.post-share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.75;
    margin-right: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-share-item {
    display: inline-block;
    margin: 0;
}

.post-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 16px;
    background-color: transparent;
    border: 1px solid currentColor;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.post-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.post-share-text {
    display: none;
}

.post-share-facebook .post-share-btn { color: #1877F2; }
.post-share-twitter  .post-share-btn { color: #000000; }
.post-share-linkedin .post-share-btn { color: #0A66C2; }
.post-share-whatsapp .post-share-btn { color: #25D366; }
.post-share-email    .post-share-btn { color: var(--color-text); opacity: 0.7; }

/* ============================
   Corps de l'article / page
============================ */
.post-body {
    font-size: 1.05rem;
    color: var(--color-text);
}

.post-body p {
    margin-bottom: 1.5em;
}

.post-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2em 0 0.8em;
    color: var(--color-text);
}

.post-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.8em 0 0.6em;
    color: var(--color-text);
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.5em 1.25em;
}

.post-body li {
    margin-bottom: 0.5em;
}

.post-body blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: 20px;
    margin: 1.8em 0;
    font-style: italic;
    opacity: 0.85;
}

.post-body img,
.post-body figure {
    margin: 2em 0;
    border-radius: 10px;
}

.post-body strong {
    font-weight: 700;
}

.post-body a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* ============================
   Sommaire sticky
============================ */
.post-sidebar {
    position: sticky;
    top: 32px;
}

/*sidebar non sticky sur le template page*/
.page .post-sidebar 
{
    position: static;
}

.toc-widget {
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    border-radius: 12px;
    padding: 16px;
}

.toc-widget details {
    width: 100%;
}

.toc-widget summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
}

.toc-widget details[open] summary {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.toc-widget summary::-webkit-details-marker {
    display: none;
}

.toc-widget summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-text);
    border-bottom: 2px solid var(--color-text);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.toc-widget details[open] summary::after {
    transform: rotate(225deg);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 60vh;
    overflow-y: auto;
}

.toc-list li.toc-level-2 {
    counter-increment: toc-counter;
    counter-reset: toc-subcounter;
}

.toc-list li.toc-level-2 a::before {
    content: counter(toc-counter) ". ";
    font-weight: 600;
}

.toc-list li.toc-level-3 {
    counter-increment: toc-subcounter;
}

.toc-list li.toc-level-3 a::before {
    content: counter(toc-counter) "." counter(toc-subcounter) " ";
    font-weight: 600;
}

.toc-list a {
    display: block;
    font-size: 14px;
    color: var(--color-text);
    opacity: 0.65;
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 8px;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    opacity: 1;
}

.toc-list a.active {
    opacity: 1;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.toc-level-3 a {
    padding-left: 18px;
    font-size: 13px;
}


/* ============================
   Pagination interne (multi-pages)
============================ */
.post-pagination {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-pagination a {
    font-weight: 600;
}

/* ============================
   Bloc résumé
============================ */
.post-summary {
    background-color: color-mix(in srgb, var(--color-primary) 10%, var(--color-background));
    border-left: 4px solid var(--color-primary);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 0 0 32px;
}

.post-summary-head {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

.post-summary-content {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.85;
}

/* ============================
   FAQ
============================ */
.post-faq {
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    border-radius: 10px;
    margin: 32px 0;
    overflow: hidden;
}

.post-faq-head {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    padding: 16px 20px;
    background-color: color-mix(in srgb, var(--color-text) 4%, var(--color-background));
}

.post-faq-question {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    padding: 16px 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.post-faq-question:first-of-type {
    border-top: none;
}

.post-faq-question:hover {
    color: var(--color-primary);
    background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.post-faq-question::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: translateY(-65%) rotate(225deg);
    transition: transform 0.2s ease;
}

.post-faq-question.is-closed::after {
    transform: translateY(-35%) rotate(45deg);
}

.post-faq-answer {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.8;
    padding: 0 20px 18px;
}

.post-faq-answer.is-hidden {
    display: none;
}

.post-faq p {
    margin-bottom: 0;
}

/* ============================
   Encadrés éditoriaux
============================ */
.editorial-box-tip,
.editorial-box-advice,
.editorial-box-warning,
.editorial-box-example {
    border-radius: 10px;
    border-left: 4px solid;
    padding: 20px 24px;
    margin: 24px 0;
}

.editorial-box-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.editorial-box-content {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.85;
}

.editorial-box-content:last-child {
    margin-bottom: 0;
}

.editorial-box-tip {
    background-color: #eef6ee;
    border-left-color: #4a9e4a;
    border-left-width: 4px;
}

.editorial-box-tip .editorial-box-title {
    color: #2d6b2d;
}

.editorial-box-advice {
    background-color: #eef3fb;
    border-left-color: #3b6fb6;
}

.editorial-box-advice .editorial-box-title {
    color: #2d568f;
}

.editorial-box-warning {
    background-color: #fdf2ec;
    border-left-color: #e08e4f;
}

.editorial-box-warning .editorial-box-title {
    color: #b5642b;
}

.editorial-box-example {
    background-color: color-mix(in srgb, var(--color-text) 5%, var(--color-background));
    border-left-color: color-mix(in srgb, var(--color-text) 40%, transparent);
}

.editorial-box-example .editorial-box-title {
    color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

/* ============================
   Tableaux
============================ */
.post-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px 0;
    font-size: 14px;
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    border-radius: 10px;
    overflow: hidden;
}

.post-body th {
    background-color: var(--color-primary);
    color: var(--color-background);
    font-weight: 700;
    text-align: left;
    padding: 14px 18px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-right: 1px solid color-mix(in srgb, var(--color-background) 20%, transparent);
}

.post-body th:last-child {
    border-right: none;
}

.post-body tbody td {
    padding: 14px 18px;
    border-right: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
    color: var(--color-text);
    vertical-align: top;
}

.post-body tbody td:last-child {
    border-right: none;
}

.post-body tbody tr:last-child td {
    border-bottom: none;
}

.post-body tbody tr:hover {
    background-color: color-mix(in srgb, var(--color-primary) 6%, transparent);
}

.post-body tbody td strong {
    color: var(--color-text);
    font-weight: 700;
}


@media (max-width: 600px) {
    .post-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .post-body table thead,
    .post-body table tbody,
    .post-body table tr {
        display: revert;
    }

    .post-body table th,
    .post-body table td {
        white-space: nowrap;
    }
}

/* ============================
   Box auteur
============================ */
.post-author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: color-mix(in srgb, var(--color-text) 4%, var(--color-background));
    border-radius: 12px;
    padding: 24px;
    margin: 40px 0;
}

.post-author-box-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-author-box-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.post-author-box-name {
    margin: 0;
    font-size: 15px;
    color: var(--color-text);
}

.post-author-box-bio {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.75;
}

.post-author-box-photo-link {
    display: block;
    flex-shrink: 0;
}

.post-author-box-name-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-author-box-name-link:hover {
    color: var(--color-primary);
}

/* ============================
   Commentaires
============================ */
.post-comments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.post-comments-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

.post-comment-list,
.post-comment-list ul,
.post-comment-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-comment-list ul.children,
.post-comment-list ol.children {
    margin-left: 40px;
    margin-top: 16px;
}

.post-comment {
    margin-bottom: 20px;
}

.post-comment-inner {
    background-color: color-mix(in srgb, var(--color-text) 3%, var(--color-background));
    border-radius: 10px;
    padding: 18px 20px;
}

.post-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.post-comment-avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.post-comment-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-comment-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.post-comment-date {
    font-size: 12px;
    opacity: 0.6;
}

.post-comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.85;
}

.post-comment-content p {
    margin-bottom: 0.8em;
}

.post-comment-content p:last-child {
    margin-bottom: 0;
}

.post-comment-awaiting-moderation {
    font-size: 13px;
    font-style: italic;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.post-comment-reply {
    margin-top: 10px;
}

.post-comments-toggle {
    margin: 32px 0;
    text-align: center;
}

.post-comments .pagination,
.comments-pagination {
    display: flex;
    gap: 8px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.post-comments .pagination a,
.post-comments .pagination span,
.comments-pagination a,
.comments-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.post-comments .pagination a:hover,
.comments-pagination a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.post-comments .pagination .current,
.comments-pagination .current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.post-comment-form-section {
    margin-top: 24px;
}

.post-comment-form-section .comment-form-comment,
.post-comment-form-section .comment-form-author,
.post-comment-form-section .comment-form-email,
.post-comment-form-section .comment-form-url {
    margin-bottom: 16px;
}

.post-comment-form-section label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--color-text);
}

.post-comment-form-section input[type="text"],
.post-comment-form-section input[type="email"],
.post-comment-form-section input[type="url"],
.post-comment-form-section textarea {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: border-color 0.2s ease;
}

.post-comment-form-section input[type="text"]:focus,
.post-comment-form-section input[type="email"]:focus,
.post-comment-form-section input[type="url"]:focus,
.post-comment-form-section textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.post-comment-form-section .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.post-comment-form-section .comment-form-cookies-consent input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.post-comment-form-section .comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
}

.post-comments-closed {
    font-size: 14px;
    opacity: 0.6;
    margin: 24px 0;
}

.comment-reply-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}
/* ============================
   Listing d'articles (catégorie, auteur, accueil)
============================ */
.post-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 100px;
}

.post-listing-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}

.post-listing-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin: 0;
}

.post-listing-description {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
    opacity: 0.7;
    width: 100%;
}

.post-listing .post-author-box {
    margin: 0 0 48px;
}

/* ============================
   Grille d'articles (réutilisable)
============================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 28px;
}

.post-grid-card {
    position: relative;
}

.post-grid-card-thumbnail {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: color-mix(in srgb, var(--color-text) 5%, var(--color-background));
    margin-bottom: 16px;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text) 8%, transparent);
    transition: box-shadow 0.25s ease;
}

.post-grid-card:hover .post-grid-card-thumbnail {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--color-text) 14%, transparent);
}

.post-grid-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-grid-card:hover .post-grid-card-thumbnail img {
    transform: scale(1.05);
}

.post-grid-card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
}

.post-grid-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0;
}

.post-grid-card-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-grid-card-link:hover {
    color: var(--color-primary);
}

.post-grid-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post-grid-empty {
    font-size: 15px;
    opacity: 0.6;
    margin: 60px 0;
    text-align: center;
}

/* ============================
   Pagination des articles
============================ */
.post-listing .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    flex-wrap: wrap;
}

.post-listing .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.post-listing a.page-numbers:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.post-listing .page-numbers.current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.post-listing .page-numbers.dots {
    border: none;
    opacity: 0.5;
}

/* ============================
   Responsive
============================ */
@media (max-width: 900px) {

    html {
        scroll-padding-top: 60px;
    }

    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: sticky;
        top: 0;
        order: -1;
        z-index: 50;
        background-color: var(--color-background);
        width: calc(100% + 32px);
        margin-left: -16px;
        padding: 0 16px;
        /* Réserve la hauteur dès le rendu initial pour éviter le CLS */
        contain: layout;
    }

    .toc-list {
        max-height: none;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 20px;
    }
}

@media (max-width: 600px) {
    .article-wrapper {
        padding: 32px 16px 60px;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-thumbnail img {
        max-height: 280px;
    }

    .post-listing {
        padding: 40px 16px 70px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .post-listing-title {
        font-size: 1.6rem;
    }

    .post-listing-header {
        margin-bottom: 32px;
    }
}

/* ============================
   Formulaire de contact
============================ */
.contact-form-section {
    margin-top: 40px;
}

.contact-form-success {
    background-color: color-mix(in srgb, var(--color-primary) 12%, var(--color-background));
    border-left: 4px solid var(--color-primary);
    border-radius: 10px;
    padding: 20px 24px;
    font-size: 15px;
    color: var(--color-text);
}

.contact-form-errors {
    background-color: #fdf2ec;
    border-left: 4px solid #e08e4f;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 24px;
}

.contact-form-errors p {
    font-size: 14px;
    color: #b5642b;
    margin: 0 0 6px;
}

.contact-form-errors p:last-child {
    margin-bottom: 0;
}

.contact-form-field {
    margin-bottom: 20px;
}

.contact-form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--color-text);
}

.contact-form-field input,
.contact-form-field textarea {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-background);
    transition: border-color 0.2s ease;
}

.contact-form-field input:focus,
.contact-form-field textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.contact-form-submit {
    margin-top: 8px;
}

/* ============================
   Widgets de réassurance (sidebar contact)
============================ */
.reassurance-widget {
    border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.reassurance-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.reassurance-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reassurance-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text);
    opacity: 0.85;
}

.reassurance-list li svg {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: var(--color-primary);
    margin-top: 2px;
    font-size: 14px;
}

.reassurance-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.75;
    margin: 0;
}

/* Honeypot — invisible pour un humain, visible pour un robot non sophistiqué */
.contact-form-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

.contact-form-captcha input[type="text"] {
    max-width: 80px;
    text-align: center;
}

/* ============================
   Fil d'Ariane
============================ */
.breadcrumb {
    margin-bottom: 16px;
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    opacity: 0.55;
}

.breadcrumb-item::after {
    content: "/";
    opacity: 0.4;
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--color-primary);
    opacity: 1;
}

.breadcrumb-item--current span {
    opacity: 0.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: inline-block;
    vertical-align: middle;
}

/* ============================
   Articles similaires
============================ */
.related-posts {
    margin: 56px 0;
    padding-top: 40px;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
}

.related-posts-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 24px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-post-card {
    position: relative;
}

.related-post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-post-card-thumbnail {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: color-mix(in srgb, var(--color-text) 5%, var(--color-background));
    margin-bottom: 12px;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text) 8%, transparent);
    transition: box-shadow 0.25s ease;
}

.related-post-card:hover .related-post-card-thumbnail {
    box-shadow: 0 8px 20px color-mix(in srgb, var(--color-text) 14%, transparent);
}

.related-post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-post-card:hover .related-post-card-thumbnail img {
    transform: scale(1.05);
}

.related-post-card-thumbnail-placeholder {
    width: 100%;
    height: 100%;
}

.related-post-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin: 0;
    transition: color 0.2s ease;

    /* Troncature à 2 lignes maximum */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-post-card:hover .related-post-card-title {
    color: var(--color-primary);
}

/* ============================
   Responsive
============================ */
@media (max-width: 900px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-posts-title {
        font-size: 1.2rem;
    }
}

/* ============================
   Barre de progression de lecture
============================ */
.reading-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: color-mix(in srgb, var(--color-text) 10%, transparent);
    z-index: 400;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 60%, transparent);
    transition: width 0.1s ease-out;
}

/* ============================
   Bouton retour en haut
============================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-background);
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--color-text) 12%, transparent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
    z-index: 150;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
    border-color: var(--color-primary);
}

/* ============================
   date de mise à jour (dans post-meta)
============================ */
.post-date-update {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    
}

.post-date-update i {
    font-size: 12px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 600px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* ============================
   Sondage "article utile"
============================ */
.post-helpful {
    background-color: color-mix(in srgb, var(--color-primary) 10%, var(--color-background));
    border-left: 4px solid var(--color-primary);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 56px 0;
    text-align: center;
}

.post-helpful-question {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}

.post-helpful-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.post-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-helpful-btn:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.post-helpful-comment {
    margin-top: 16px;
    text-align: left;
}

.post-helpful-comment-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px;
}

.post-helpful-char-count-wrapper {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.4;
}

.post-helpful-textarea {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text);
    background-color: var(--color-background);
    resize: vertical;
    transition: border-color 0.2s ease;
    margin-bottom: 8px;
}

.post-helpful-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.post-helpful-char-count {
    font-size: 12px;
    opacity: 0.4;
    text-align: right;
    margin-bottom: 14px;
}

.post-helpful-comment-actions {
    display: flex;
    justify-content: center;
}

.post-helpful-thanks {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

/* ============================================================
   AJOUTS — classes générées nativement par WordPress
   (Classic Editor : alignement d'image, légendes [caption],
   galeries [gallery], pagination interne <!--nextpage-->)
   Scopées à .post-body pour ne pas interférer avec le reste du thème.
============================================================ */

.post-body .alignleft {
    float: left;
    margin: 0.3em 1.5em 1.5em 0;
}

.post-body .alignright {
    float: right;
    margin: 0.3em 0 1.5em 1.5em;
}

.post-body .aligncenter {
    display: block;
    clear: both;
    margin-left: auto;
    margin-right: auto;
}

/* Légendes d'image (shortcode [caption], encore généré par le Classic Editor) */
.post-body .wp-caption {
    max-width: 100%;
    margin: 2em 0;
}

.post-body .wp-caption img {
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.post-body .wp-caption.alignleft,
.post-body .wp-caption.alignright {
    max-width: 50%;
}

.post-body .wp-caption-text {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: var(--color-text);
    opacity: 0.65;
}

/* Galeries natives */
.post-body .gallery {
    display: grid;
    grid-gap: 12px;
    margin: 2em 0;
}

.post-body .gallery-item {
    margin: 0;
}

.post-body .gallery-item img {
    border-radius: 8px;
    width: 100%;
    height: auto;
}

.post-body .gallery-caption {
    font-size: 12px;
    opacity: 0.65;
    text-align: center;
    margin-top: 6px;
}

.post-body .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.post-body .gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.post-body .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.post-body .gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.post-body .gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 600px) {
    .post-body .gallery-columns-3,
    .post-body .gallery-columns-4,
    .post-body .gallery-columns-5,
    .post-body .gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-body .wp-caption.alignleft,
    .post-body .wp-caption.alignright {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Pagination interne d'article (<!--nextpage--> du Classic Editor) */
.post-body .page-links {
    clear: both;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
    font-size: 14px;
    font-weight: 600;
}

.post-body .page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
}

.post-body .page-links a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

/* Embeds (oEmbed YouTube, X, etc. collés directement dans le contenu) */
.post-body embed,
.post-body iframe,
.post-body object {
    max-width: 100%;
}

.post-body iframe {
    border: none;
    border-radius: 10px;
    margin: 2em 0;
}

/* sub / sup — utilisé concrètement dans le captcha de la page Contact */
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

/* Séparateur éditorial */
.post-body hr {
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--color-text) 15%, transparent);
    margin: 2.5em 0;
}

/* ============================================================
   AJOUTS — normalisation cross-navigateur
============================================================ */

/* Empêche Safari iOS de grossir automatiquement le texte en rotation
   d'écran (paysage), ce qui peut casser ta mise en page mobile */
html {
    -webkit-text-size-adjust: 100%;
}

/* Indicateur visuel cohérent pour les abréviations (<abbr title="...">),
   rendu différemment selon les navigateurs par défaut */
.post-body abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* ============================================================
   AJOUTS — corrections de manques réels repérés dans le PHP
============================================================ */

/* Texte auto-généré par comment_form() (comment-notes, logged-in-as)
   non couvert par .post-comment-form-section input/textarea/label */
.post-comment-form-section .comment-notes,
.post-comment-form-section .logged-in-as {
    font-size: 13px;
    color: var(--color-text);
    opacity: 0.6;
    margin-bottom: 16px;
}

.post-comment-form-section .logged-in-as a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Mise en valeur de la chaîne de vérification du captcha contact */
.captcha-string {
    letter-spacing: 0.15em;
    color: var(--color-primary);
}

/* ============================================================
   AJOUTS — accessibilité
============================================================ */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.post-helpful-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Si tu ajoutes un skip-link dans header.php
   (<a class="skip-link screen-reader-text" href="#primary">Aller au contenu</a>),
   ce style le rend visible au focus clavier. */
.skip-link.screen-reader-text:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    clip: auto;
    padding: 12px 20px;
    background-color: var(--color-background);
    color: var(--color-text);
    border-radius: 8px;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--color-text) 20%, transparent);
    z-index: 1000;
    white-space: normal;
}