/**
 * Article TOC + Article Meta styles
 * Sources:
 *   - <style id="commpagnie-article-toc-css">
 *   - <style id="commpagnie-article-meta-css">
 * Condition: is_singular('post')
 */

:root {
    --toc-blue: #2B4678;
    --toc-yellow: #F7CA39;
    --toc-text: #515151;
    --toc-white: #F8F8F8;
}

.article-toc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.article-toc {
    padding-left: 20px;
    border-left: 1px solid var(--toc-blue);
}

.article-toc__header {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.article-toc__title {
    color: var(--toc-blue);
    font-size: 20px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 26px;
}

.article-toc__icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-toc__icon-circle {
    width: 24px;
    height: 24px;
    background: var(--toc-yellow);
    border-radius: 9999px;
    display: inline-block;
}

.article-toc__icon-emoji {
    color: var(--toc-yellow);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 17.64px;
}

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

.article-toc__item {
    margin: 0;
    padding: 0;
}

.article-toc__item--level-2 {
    padding-left: 16px;
}

.article-toc__link {
    color: var(--toc-text);
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 22.4px;
    text-decoration: none;
    transition: text-decoration 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.article-toc__link:hover,
.article-toc__link:focus {
    text-decoration: underline;
    color: var(--toc-text);
}

.article-toc__link.is-active {
    text-decoration: underline;
}

/* Back link */
.article-toc-back {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding-left: 20px;
}

.article-toc-back__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toc-blue);
    transition: transform 0.2s ease;
}

.article-toc-back__text {
    color: var(--toc-blue);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    text-decoration: underline;
    line-height: 17.64px;
}

.article-toc-back:hover .article-toc-back__icon {
    transform: translateX(-3px);
}

.article-toc-back:hover .article-toc-back__text {
    color: var(--toc-blue);
}

/* Responsive */
@media (max-width: 767px) {
    .article-toc {
        padding-left: 16px;
    }

    .article-toc__title {
        font-size: 18px;
    }

    .article-toc__link {
        font-size: 15px;
    }

    .article-toc__list {
        gap: 12px;
    }

    .article-toc-back {
        padding-left: 16px;
    }
}

/* ===== Article Meta ===== */
:root {
    --article-meta-yellow: #F7CA39;
    --article-meta-text: #515151;
    --article-meta-blue: #2B4678;
    --article-meta-white: #F8F8F8;
}

.article-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

.article-meta__item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2px;
}

.article-meta__item--date {
    min-width: 105px;
}

.article-meta__item--categories {
    min-width: 139px;
}

.article-meta__item--author {
    min-width: 180px;
}

.article-meta__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--article-meta-yellow);
}

.article-meta__label {
    text-align: center;
    color: var(--article-meta-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.26;
}

.article-meta__value {
    color: var(--article-meta-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.article-meta__author-role {
    font-weight: 400;
    font-size: 14px;
}

.article-meta__separator {
    width: 1px;
    height: 47px;
    background: var(--article-meta-blue);
    opacity: 0.38;
    flex-shrink: 0;
}

.article-meta__badges {
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
}

.article-meta__badge {
    height: 24px;
    padding: 3px 12px;
    background: var(--article-meta-blue);
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    color: var(--article-meta-white);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.26;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.article-meta__badge:hover {
    background: #1e3459;
    color: var(--article-meta-white);
}

/* Responsive - Tablette */
@media (max-width: 991px) {
    .article-meta {
        gap: 24px;
    }

    .article-meta__separator {
        height: 40px;
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .article-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .article-meta__item {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .article-meta__item--date,
    .article-meta__item--categories,
    .article-meta__item--author {
        min-width: unset;
    }

    .article-meta__icon {
        flex-shrink: 0;
    }

    .article-meta__label {
        text-align: left;
    }

    .article-meta__value {
        text-align: left;
    }

    .article-meta__separator {
        width: 100%;
        height: 1px;
    }

    .article-meta__badges {
        justify-content: flex-start;
        padding-top: 0;
    }
}