/* ============================================================
   SINGLE POST — article actualité
   ============================================================ */

/* ============================================================
   ARTICLE
   ============================================================ */

.single-article {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    padding: 24px;
}

/* Catégorie */
.single-article__category {
    margin-bottom: 6px;
}

.single-article__cat-label {
    display: inline-block;
    font-family: var(--font-block);
    font-size: 1.15rem;
    font-weight: 500;
    text-transform: uppercase; 
    text-decoration: none;
    transition: opacity 0.15s;
    border: 0;
}

.single-article__cat-label:hover {
    opacity: 0.75;
}

/* Titre H1 */
.single-article__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-dark);
    margin-bottom: 5px;
}

/* Date */
.single-article__meta {
    margin-bottom: 8px;
}

.single-article__date {
    font-family: var(--font-body);
    font-size: 0.825rem;
    color: #888;
}

/* Image à la une */
.single-article__figure {
    margin: 0 -24px 24px;
}

.single-article__img {
    width: 100%;
    height: auto;
    display: block;        
}

.single-article__caption {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-style: italic;
    color: #777;
    padding: 6px 24px 0;
    line-height: 1.4;
}

/* ============================================================
   CONTENU WYSIWYG (entry-content)
   ============================================================ */

.entry-content {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-dark);
    margin-bottom: 32px;
}

.entry-content p {
    margin-bottom: 1.1em;
}

.entry-content h2 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.6em 0 0.5em;
    color: var(--color-dark);
}

.entry-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.4em 0 0.4em;
    color: var(--color-dark);
}

.entry-content h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.2em 0 0.3em;
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}

.entry-content a:hover {
    color: var(--color-dark);
}

.entry-content strong, .entry-content b { font-weight: 700; }
.entry-content em, .entry-content i { font-style: italic; }

.entry-content ul,
.entry-content ol {
    margin: 0 0 1.1em 1.5em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content li {
    margin-bottom: 0.3em;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1.5em 0;
    padding: 0.8em 1.2em;
    background: #f7f7f5;
    font-style: italic;
    color: #444;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.entry-content blockquote p { margin-bottom: 0; }

.entry-content figure {
    margin: 0.5em 0 1.5em ;
    max-width: 100%;
    width: auto !important;
}

.entry-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.entry-content figcaption {
    font-size: 0.8rem;
    font-style: italic;
    color: #777;
    margin-top: 6px;
}

.entry-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.2em;
    font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.entry-content th {
    background: var(--color-dark);
    color: var(--color-white);
    font-weight: 600;
}

.entry-content tr:nth-child(even) td {
    background: #f7f7f5;
}

.entry-content hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2em 0;
}

/* ============================================================
   BOUTONS PARTAGE
   ============================================================ */

.single-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.single-share__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 0;
}

.single-share__btns {
    display: flex;
    gap: 10px;
}

.single-share__btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-white);
    font-size: 1rem;
    transition: transform 0.15s, filter 0.15s;
}

.single-share__btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.single-share__btn--linkedin {
    background: #0077B5;
}

.single-share__btn--twitter {
    background: #000000;
}

.single-share__btn--facebook {
    background: #1877F2;
}

/* ============================================================
   SIGNATURE AUTEUR
   ============================================================ */

.author-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f7f7f5;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px;
    margin-bottom: 32px;
}

.author-card__avatar {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.author-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.author-card__byline {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.author-card__name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
}

.author-card__bio {
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.author-card__socials {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.author-card__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-dark);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.15s;
}

.author-card__social-link:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

/* ============================================================
   COMMENTAIRES
   ============================================================ */

.comments-section {
    margin-bottom: 32px;
}

/* En-tête accordéon */
.comments-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.comments-section__count {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.comments-section__toggle {
    background: var(--color-primary);
    color: var(--color-dark);
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.comments-section__toggle:hover {
    background: var(--color-white);
}

.comments-section__toggle[aria-expanded="true"] {
    background: var(--color-white);
}

/* Liste des commentaires */
.comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Commentaire individuel */
.comment-item {
    padding: 16px;
    border-bottom: 1px solid #ebebeb;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item__wrap {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.comment-item__avatar-img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
}

.comment-item__body {
    flex: 1;
}

.comment-item__meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-item__author {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-dark);
}

.comment-item__date {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #999;
}

.comment-item__text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.65;
    color: #333;
}

.comment-item__text p { margin-bottom: 0.5em; }
.comment-item__text p:last-child { margin-bottom: 0; }

.comment-item__moderation {
    font-size: 0.8rem;
    color: #999;
    margin-top: 6px;
}

.comment-item__reply {
    margin-top: 8px;
}

.comment-item__reply a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.comment-item__reply a:hover {
    color: var(--color-dark);
}

/* Réponses imbriquées */
.comments-list .children {
    list-style: none;
    margin: 12px 0 0 48px;
    padding: 0;
    border-top: 1px solid #ebebeb;
    padding-top: 12px;
}

/* Pagination commentaires */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-white);
    border-top: 1px solid #ebebeb;
    font-size: 0.875rem;
}

.comment-navigation a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================================
   ACCORDÉON FORMULAIRE
   ============================================================ */

.comment-form-wrap {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s ease;
    background: #f4f4f2;
    border-radius: 0 0 var(--radius) var(--radius);
}

.comment-form-wrap.is-open {
    grid-template-rows: 1fr;
}

.comment-form-wrap__inner {
    min-height: 0;
    padding: 0 20px;
}

.comment-form-wrap.is-open .comment-form-wrap__inner {
    padding: 20px;
}

/* Masquer le titre généré par WP (géré par l'en-tête accordéon) */
.comment-form-wrap #reply-title {
    display: none;
}

.comment-form-wrap__form p {
    margin-bottom: 12px;
}

.comment-form-wrap__form label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.comment-form-wrap__form input[type="text"],
.comment-form-wrap__form input[type="email"],
.comment-form-wrap__form input[type="url"],
.comment-form-wrap__form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: var(--color-white);
    color: var(--color-dark);
    transition: border-color 0.15s;
}

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

.comment-form-wrap__form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form-wrap__submit {
    display: inline-flex;
    align-items: center;
    padding: 11px 24px;
    background: var(--color-primary);
    color: var(--color-dark);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.comment-form-wrap__submit:hover {
    background: var(--color-dark);
    color: var(--color-white);
}

/* Lien "Annuler la réponse" */
#cancel-comment-reply-link {
    font-size: 0.8rem;
    color: #999;
    text-decoration: none;
    margin-left: 10px;
}

/* Mentions légales RGPD */
.comment-legal {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-legal__required {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--color-primary);
    margin: 0;
    font-weight: 600;
}

.comment-legal__rgpd {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.comment-legal__rgpd a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comment-legal__rgpd a:hover {
    color: var(--color-dark);
}

/* ============================================================
   CAROUSEL "À LIRE AUSSI" — pleine largeur, hors grille
   ============================================================ */

.related-carousel {    
    padding-block: var(--space);
    margin-top: var(--space);
}

.related-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/*
.related-carousel__title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-dark);
    margin: 0;
}*/

.related-carousel__title {
    background: var(--color-dark);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius);
}

.related-carousel__controls {
    display: flex;
    gap: 8px;
}

.related-carousel__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--color-primary);
    color: var(--color-dark);
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.related-carousel__btn:hover:not(:disabled) {
    background: var(--color-dark);
    color: var(--color-white);
}

.related-carousel__btn:disabled {
    background: #ddd;
    color: #aaa;
    cursor: default;
}

/* Viewport — masque l'overflow pour la translation JS */
.related-carousel__viewport {
    overflow: hidden;
}

/* Track — flex horizontal, transition JS */
.related-carousel__track {
    display: flex;
    gap: 20px;
    transition: transform 0.35s ease;
    will-change: transform;
}

/* ── Cards ── */

/* Desktop : 4 visibles */
.related-card {
    flex: 0 0 calc((100% - 60px) / 4);
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid #ebebeb;
    border-radius: var(--radius);
    overflow: hidden;
}

.related-card__img-link {
    display: block;
    overflow: hidden;
    line-height: 0;
    flex-shrink: 0;
}

.related-card__img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.related-card__img--placeholder {
    width: 100%;
    height: 150px;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 2rem;
}

.related-card__img-link:hover .related-card__img {
    transform: scale(1.04);
}

.related-card__body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.related-card__category {
    font-family: var(--font-block);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.15s;
}

.related-card__category:hover {
    opacity: 0.75;
}

.related-card__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-dark);
    margin: 0;
}

.related-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.related-card__title a:hover {
    color: var(--color-primary);
}

.related-card__excerpt {
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #777;
    margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {
    .single-article {
        padding: 16px;
    }

    .single-article__figure {
        margin-left: -16px;
        margin-right: -16px;
    }

    .single-article__caption {
        padding-left: 16px;
        padding-right: 16px;
    }

    .single-share__btn {
        flex: none;
    }

    .author-card {
        flex-direction: column;
        gap: 14px;
    }

    /* Carousel mobile : 1 carte, scroll natif */
    .related-carousel__viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .related-carousel__track {
        transition: none;
    }

    .related-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
    }

    .related-carousel__controls {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet : 2 cartes visibles */
    .related-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
}
