/* ========================================
   BARRE DE PROGRESSION
   ======================================== */
.tca-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1001;
    pointer-events: none;
}

.tca-progress-bar__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #61B38A, #3a7b5b);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ========================================
   TEMPS DE LECTURE
   ======================================== */
.tca-reading-time {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: var(--tca-text-secondary, #626c71);
    background: rgba(0, 128, 116, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ========================================
   HIÉRARCHIE H2/H3 RENFORCÉE
   ======================================== */
.entry-content h2 {
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 128, 116, 0.2);
    margin-top: 2em;
}

.entry-content h3 {
    color: var(--tca-primary, #008074) !important;
    font-size: 20px;
}

/* ========================================
   TABLE DES MATIÈRES — BASE
   ======================================== */
.tca-toc {
    background: var(--tca-surface, #fff);
    border: 1px solid var(--tca-border, rgba(94, 82, 64, 0.15));
    border-radius: var(--tca-radius, 12px);
    overflow: hidden;
}

.tca-toc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.tca-toc__header:hover {
    background: rgba(0, 128, 116, 0.04);
}

.tca-toc__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tca-text, #13343b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tca-toc__chevron {
    transition: transform 0.3s ease;
    color: var(--tca-text-secondary, #626c71);
}

.tca-toc--open .tca-toc__chevron {
    transform: rotate(180deg);
}

.tca-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.tca-toc--open .tca-toc__list {
    max-height: 2000px;
    padding-bottom: 4px;
}

.tca-toc__item {
    margin: 0;
}

.tca-toc__link {
    display: block;
    padding: 8px 18px;
    font-size: 14px;
    color: var(--tca-text-secondary, #626c71);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
    text-transform: none;
    font-weight: 400;
}

.tca-toc__link:hover {
    color: var(--tca-primary, #008074);
    background: rgba(0, 128, 116, 0.04);
}

.tca-toc__link--active {
    color: var(--tca-primary, #008074);
    border-left-color: var(--tca-primary, #008074);
    font-weight: 500;
    background: rgba(0, 128, 116, 0.06);
}

.tca-toc__item--sub .tca-toc__link {
    padding-left: 34px;
    font-size: 13px;
}

/* ========================================
   TABLE DES MATIÈRES — ACCORDÉON (toutes tailles)
   ======================================== */
.tca-toc-inline {
    margin-bottom: 16px;
}

.tca-toc-inline .tca-toc__header {
    background: rgba(0, 128, 116, 0.04);
    padding: 10px 16px;
}

.tca-toc-inline .tca-toc__list {
    padding: 0;
}

.tca-toc-inline .tca-toc--open .tca-toc__list {
    padding-bottom: 6px;
}

.tca-toc-inline .tca-toc__link {
    padding: 5px 16px;
}

.tca-toc-inline .tca-toc__item--sub .tca-toc__link {
    padding-left: 30px;
}

/* ========================================
   AUTEUR + ENTRY-META OVERRIDE
   ======================================== */

/* Réduire les espaces entre meta et TOC */
.single-post .entry-header,
.single-tca_article .entry-header {
    margin-bottom: 12px !important;
    padding-bottom: 0 !important;
}

.single-post .entry-meta,
.single-tca_article .entry-meta {
    margin-bottom: 0 !important;
}

.entry-meta {
    align-items: center;
    gap: 6px 12px;
}

/* Auteur avec photo */
.entry-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--tca-text, #13343b);
    transition: opacity 0.2s;
}

.entry-author:hover {
    opacity: 0.75;
}

.entry-author__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--tca-primary, #008074);
}

.entry-author__name {
    font-weight: 500;
    font-size: 14px;
}

/* Séparateur · entre chaque élément meta */
.entry-meta > span::before {
    content: '·';
    font-weight: 700;
    font-size: 16px;
    color: var(--tca-text-secondary, #626c71);
    margin-right: 6px;
    display: inline;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

/* Pas de dot à l'intérieur du badge lecture */
.entry-meta .tca-reading-time::before {
    display: none;
}

/* ========================================
   OPTIMISATIONS MOBILE
   ======================================== */
@media (max-width: 768px) {
    .entry-content h2 {
        font-size: 22px;
        margin-top: 1.5em;
    }

    .entry-content h3 {
        font-size: 18px;
    }

    .entry-content p {
        font-size: 16px;
        line-height: 1.7;
    }

    body.single-post .content-area > article,
    body.single-tca-article .container > article {
        padding: 25px 20px;
    }

    .entry-content ul,
    .entry-content ol {
        padding-left: 20px;
    }

    .entry-content blockquote {
        font-size: 17px;
        padding-left: 18px;
        margin: 25px 0;
    }

    .entry-content img {
        margin: 1.5em -10px;
        max-width: calc(100% + 20px);
        border-radius: 4px;
    }

    /* Override style.css flex-direction: column */
    .entry-meta {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .entry-author__avatar {
        width: 24px;
        height: 24px;
    }

    .entry-author__name {
        font-size: 13px;
    }

    .tca-reading-time {
        font-size: 12px;
        padding: 3px 10px;
    }

    .tca-toc-inline {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .entry-content h2 {
        font-size: 20px;
    }

    .entry-content h3 {
        font-size: 17px;
    }

    body.single-post .content-area > article,
    body.single-tca-article .container > article {
        padding: 20px 15px;
    }
}
