/* ==========================================================
   ARTICLE DETAIL — CIM-ULT
   Disposition magazine : partage sticky + contenu + sidebar,
   texte justifié.
   ========================================================== */

#article-detail {
    padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

.article-page-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding-inline: clamp(1.2rem, 4vw, 4rem);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

/* ---------------- Barre de partage ---------------- */

.article-share {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--section-bg-alt, #f2f2f2);
    color: var(--text-muted, #555);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-facebook:hover { background: #1877f2; color: #fff; }
.share-twitter:hover  { background: #111; color: #fff; }
.share-linkedin:hover { background: #0a66c2; color: #fff; }
.share-whatsapp:hover { background: #25d366; color: #fff; }
.share-email:hover    { background: var(--accent, #0056b3); color: #fff; }
.share-copy:hover      { background: var(--text-strong, #333); color: #fff; }
.share-copy.is-copied {
    background: #28a745;
    color: #fff;
}

/* ---------------- Contenu principal ---------------- */

.article-main {
    min-width: 0;
}

.article-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent, #0056b3);
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.article-title {
    font-size: clamp(1.7rem, 2.6vw + 1rem, 2.6rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
    color: var(--text-strong, #111);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

.article-meta-dot {
    opacity: 0.5;
}

.article-media {
    position: relative;
    float: right;
    width: min(52%, 560px);
    margin: 0 0 1rem 1.8rem;
    border-radius: 6px;
    overflow: hidden;
    shape-outside: margin-box;
}

.article-media img {
    width: 100%;
    height: auto;
    display: block;
}

.article-media-love {
    position: absolute;
    bottom: 0.9rem;
    right: 0.9rem;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.88);
}

.article-inline-love {
    margin-bottom: 1.5rem;
}

.article-excerpt {
    clear: none;
    font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-strong, #2a2a2a);
    border-left: 3px solid var(--accent, #0056b3);
    padding-left: 1.1rem;
    margin: 0 0 clamp(1.5rem, 3vw, 2rem);
}

/* ---------------- Corps de l'article : justifié ---------------- */

.article-body {
    font-size: clamp(1rem, 0.3vw + 0.95rem, 1.1rem);
    line-height: 1.85;
    color: var(--text, #2c2c2c);
    text-align: justify;
}

.article-body p {
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: auto !important;
}

.article-body h2 {
    font-size: clamp(1.3rem, 1.4vw + 1rem, 1.7rem);
    margin: 1.8em 0 0.7em;
    font-weight: 700;
    color: var(--text-strong, #111);
}

.article-body h3 {
    font-size: clamp(1.1rem, 1vw + 1rem, 1.3rem);
    margin: 1.6em 0 0.6em;
    font-weight: 700;
    color: var(--text-strong, #111);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.4em 0;
    display: block;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.4em;
    padding-left: 1.4em;
    text-align: justify;
}

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

.article-body a {
    color: var(--accent, #0056b3);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body blockquote {
    margin: 1.6em 0;
    padding: 0.9em 1.3em;
    border-left: 3px solid var(--accent, #0056b3);
    background: var(--section-bg-alt, #f7f7f7);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted, #555);
    text-align: left;
}

.article-footer {
    clear: both;
    margin-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--border, #eaeaea);
    padding-top: 1.5rem;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--accent, #0056b3);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.article-back:hover {
    gap: 0.65rem;
}

/* ---------------- Sidebar : derniers articles ---------------- */
/* Réutilise le style existant du blog (hero-side-right / latest-list) ;
   on ajuste juste sa position dans cette grille en 2 colonnes. */

.article-sidebar {
    position: sticky;
    top: 6.5rem;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        border-top: 1px solid var(--border, #eaeaea);
        padding-top: 1.5rem;
        margin-top: 1rem;
    }

    .article-body p {
        text-align: left; /* meilleure lisibilité sur petit écran, évite les grands espaces blancs */
    }
}

@media (max-width: 700px) {
    .article-media {
        float: none;
        width: 100%;
        margin: 0 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .share-btn {
        width: 36px;
        height: 36px;
    }
}