/* ============================================================
   MIELANCE MÉDIA — single.css
   Styles de la page article individuel
   ============================================================ */

/* ============================================================
   EN-TÊTE ARTICLE
   ============================================================ */
.single-header {
    background: var(--color-blanc);
    padding: var(--space-2xl) 0 var(--space-xl);
    border-bottom: 1px solid var(--color-gris-leger);
}

.breadcrumb {
    margin-bottom: var(--space-lg);
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb__link {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-gris-chaud);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
    color: var(--color-or);
}

.breadcrumb__sep {
    font-size: var(--text-xs);
    color: var(--color-gris-chaud);
    opacity: 0.5;
}

.breadcrumb__item--current {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    color: var(--color-gris-chaud);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.single-header__cat {
    margin-bottom: var(--space-md);
    display: inline-block;
}

.single-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--color-brun);
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

/* Meta */
.single-header__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    color: var(--color-gris-chaud);
    margin-bottom: var(--space-lg);
}

.single-header__author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.single-header__author:hover {
    color: var(--color-or);
}

.single-header__author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-or-pale);
}

.single-header__author-name {
    font-weight: 700;
    color: var(--color-brun-moyen);
}

.single-header__sep {
    opacity: 0.3;
}

.single-header__date,
.single-header__read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   IMAGE MISE EN AVANT
   ============================================================ */
.single-hero-image {
    padding: var(--space-lg) 0 0;
    background: var(--color-blanc);
}

.single-hero-image__img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: block;
}

/* ============================================================
   LAYOUT : CONTENU + SIDEBAR
   ============================================================ */
.single-body {
    padding: var(--space-3xl) var(--space-xl);
}

.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: var(--space-3xl);
    align-items: start;
}

/* ============================================================
   CONTENU ARTICLE
   ============================================================ */
.entry-content {
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: 1.8;
    color: var(--color-brun);
}

.entry-content h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-brun);
    margin: var(--space-2xl) 0 var(--space-md);
    padding-top: var(--space-md);
    border-top: 2px solid var(--color-gris-leger);
    line-height: 1.25;
}

.entry-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-brun-moyen);
    margin: var(--space-xl) 0 var(--space-md);
    line-height: 1.3;
}

.entry-content h4 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-brun);
    margin: var(--space-lg) 0 var(--space-sm);
}

.entry-content p {
    margin-bottom: var(--space-lg);
}

.entry-content a {
    color: var(--color-or);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color var(--transition-fast);
}

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

.entry-content ul,
.entry-content ol {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content ul li {
    padding-left: var(--space-xl);
    position: relative;
    margin-bottom: var(--space-sm);
}

.entry-content ul li::before {
    content: '🍯';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.85em;
}

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

.entry-content ol li {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-sm);
}

.entry-content ol li::marker {
    color: var(--color-or);
    font-weight: 700;
    font-family: var(--font-display);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: var(--space-lg) 0;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-or);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    background: var(--color-beige-clair);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-brun-moyen);
    font-size: var(--text-lg);
    line-height: 1.6;
}

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

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-content table th {
    background: var(--color-brun);
    color: var(--color-or-clair);
    font-family: var(--font-display);
    font-weight: 700;
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    letter-spacing: 0.03em;
}

.entry-content table td {
    padding: var(--space-sm) var(--space-lg);
    border-bottom: 1px solid var(--color-gris-leger);
    vertical-align: top;
}

.entry-content table tr:nth-child(even) td {
    background: var(--color-beige-clair);
}

.entry-content table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   TABLE DES MATIÈRES (TOC)
   ============================================================ */
.toc {
    background: var(--color-beige-clair);
    border: 1px solid var(--color-beige-moyen);
    border-left: 4px solid var(--color-or);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-lg);
    margin-bottom: var(--space-2xl);
    font-family: var(--font-ui);
}

.toc__header {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-brun);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc__item {
    counter-increment: toc-counter;
    padding-left: var(--space-md);
    position: relative;
}

.toc__item::before {
    content: counter(toc-counter) '.';
    position: absolute;
    left: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-or);
    line-height: 1.6;
}

.toc__item--sub {
    padding-left: calc(var(--space-xl) + var(--space-md));
    counter-increment: none;
}

.toc__item--sub::before {
    content: '—';
    color: var(--color-gris-chaud);
    font-weight: 400;
}

.toc__item a {
    font-size: var(--text-sm);
    color: var(--color-brun-moyen);
    text-decoration: none;
    line-height: 1.5;
    transition: color var(--transition-fast);
    display: block;
}

.toc__item a:hover,
.toc__item a.is-active {
    color: var(--color-or);
}

/* TOC dans la sidebar */
.sidebar-toc .toc {
    position: sticky;
    top: calc(72px + var(--space-lg));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--color-blanc);
    border: 1px solid var(--color-gris-leger);
    border-left: 3px solid var(--color-or);
    box-shadow: var(--shadow-sm);
    font-size: var(--text-sm);
    padding: var(--space-md);
    scrollbar-width: thin;
    scrollbar-color: var(--color-or-pale) transparent;
}

.sidebar-toc .toc__header {
    font-size: var(--text-sm);
}

/* ============================================================
   PARTAGE SOCIAL
   ============================================================ */
.social-share--top {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-share--bottom {
    background: var(--color-beige-clair);
    border: 1px solid var(--color-beige-moyen);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.social-share__label {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 600;
    font-style: italic;
    color: var(--color-brun-moyen);
    white-space: nowrap;
}

.social-share__buttons {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.social-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    white-space: nowrap;
    color: var(--color-blanc);
}

.social-share__btn-label {
    display: none;
}

.social-share--bottom .social-share__btn-label {
    display: inline;
}

/* Couleurs réseaux */
.social-share__btn--facebook  { background: #1877F2; }
.social-share__btn--x         { background: #000000; }
.social-share__btn--threads   { background: #000000; }
.social-share__btn--whatsapp  { background: #25D366; }
.social-share__btn--linkedin  { background: #0A66C2; }
.social-share__btn--pinterest { background: #E60023; }

.social-share__btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--color-blanc);
}

/* ============================================================
   TAGS
   ============================================================ */
.single-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-gris-leger);
    margin-top: var(--space-xl);
}

.single-tags__label {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-gris-chaud);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.single-tags__tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background: var(--color-beige-clair);
    border: 1px solid var(--color-beige-moyen);
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-brun-moyen);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.single-tags__tag:hover {
    background: var(--color-or);
    border-color: var(--color-or);
    color: var(--color-blanc);
}

/* ============================================================
   AUTHOR BOX
   ============================================================ */
.author-box {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
    background: var(--color-beige-clair);
    border: 1px solid var(--color-beige-moyen);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    margin-top: var(--space-2xl);
}

.author-box__avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.author-box__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    border: 3px solid var(--color-blanc);
    box-shadow: var(--shadow-md);
}

.author-box__avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-or) 0deg,
        var(--color-or-clair) 90deg,
        var(--color-or-pale) 180deg,
        var(--color-or) 360deg
    );
    z-index: 0;
    opacity: 0.6;
}

.author-box__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.author-box__eyebrow {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-or);
    margin: 0;
}

.author-box__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-brun);
    margin: 0;
}

.author-box__name a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.author-box__name a:hover {
    color: var(--color-or);
}

.author-box__bio {
    font-size: var(--text-sm);
    color: var(--color-gris-chaud);
    line-height: 1.6;
    margin: 0;
}

.author-box__link {
    align-self: flex-start;
    margin-top: var(--space-sm);
    font-size: var(--text-sm);
}

/* ============================================================
   SIDEBAR DE L'ARTICLE
   ============================================================ */
.single-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    position: sticky;
    top: calc(72px + var(--space-md));
}

.sidebar-share {
    background: var(--color-blanc);
    border: 1px solid var(--color-gris-leger);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.sidebar-share__label {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gris-chaud);
    margin-bottom: var(--space-md);
    display: block;
}

.sidebar-share__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sidebar-share__btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem var(--space-md);
    border-radius: var(--radius-md);
}

/* ============================================================
   COMMENTAIRES
   ============================================================ */
.single-comments {
    padding: var(--space-3xl) var(--space-xl);
    border-top: 1px solid var(--color-gris-leger);
    margin-top: var(--space-2xl);
}

.single-comments .comments-title,
.single-comments .comment-reply-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-brun);
    margin-bottom: var(--space-xl);
}

.single-comments .comment {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-gris-leger);
}

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

.single-comments .comment-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.single-comments .comment-author img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid var(--color-or-pale);
}

.single-comments .fn {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-brun);
}

.single-comments .comment-date {
    font-size: var(--text-xs);
    color: var(--color-gris-chaud);
    font-family: var(--font-ui);
}

.single-comments .comment-content p {
    font-size: var(--text-sm);
    color: var(--color-brun);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.single-comments .reply a {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-or);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color var(--transition-fast);
}

.single-comments .reply a:hover {
    color: var(--color-or-clair);
}

/* Formulaire commentaire */
.single-comments .comment-form label {
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-brun);
    display: block;
    margin-bottom: var(--space-xs);
}

.single-comments .comment-form input[type="text"],
.single-comments .comment-form input[type="email"],
.single-comments .comment-form input[type="url"],
.single-comments .comment-form textarea {
    width: 100%;
    padding: 0.75rem var(--space-md);
    border: 2px solid var(--color-beige-moyen);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-brun);
    background: var(--color-blanc);
    transition: border-color var(--transition-fast);
    outline: none;
}

.single-comments .comment-form input:focus,
.single-comments .comment-form textarea:focus {
    border-color: var(--color-or);
}

.single-comments .comment-form textarea {
    min-height: 140px;
    resize: vertical;
}

.single-comments .comment-form .submit {
    background: var(--color-or);
    color: var(--color-blanc);
    border: none;
    padding: 0.75rem var(--space-2xl);
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-base);
}

.single-comments .comment-form .submit:hover {
    background: var(--color-or-clair);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   SECTION ARTICLES SIMILAIRES
   ============================================================ */
.section--related {
    padding: var(--space-4xl) 0;
}

/* ============================================================
   BOUTON RETOUR EN HAUT
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-or);
    color: var(--color-blanc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    z-index: 500;
}

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

.back-to-top:hover {
    background: var(--color-or-clair);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ============================================================
   RESPONSIVE SINGLE
   ============================================================ */
@media (max-width: 1100px) {
    .single-layout {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }

    .sidebar-toc {
        display: none; /* TOC dans le contenu uniquement sur mobile */
    }
}

@media (max-width: 768px) {
    .single-body {
        padding: var(--space-xl) var(--space-md);
    }

    .single-sidebar {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-box__link {
        align-self: center;
    }

    .social-share--top {
        flex-direction: column;
        align-items: flex-start;
    }

    .single-header__title {
        font-size: var(--text-2xl);
    }

    .single-hero-image__img {
        border-radius: 0;
    }

    .back-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 42px;
        height: 42px;
    }
}
