@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

#custom-article {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FAFBFC;
    color: #111827;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

#custom-article .article-header,
#custom-article .article-content,
#custom-article .similar-articles-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

#custom-article .article-header {
    position: relative;
    width: 100vw;
    background: #000;
    overflow: hidden;
}

#custom-article .article-header__media {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    will-change: transform;
}

#custom-article .article-header__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.65;
    display: block;
    transform: scale(1.08);
    transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

#custom-article.is-loaded .article-header__image {
    transform: scale(1.02);
}

#custom-article .article-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.15) 0%, 
        rgba(0, 0, 0, 0.4) 40%, 
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

#custom-article .article-header__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 80px 0 72px;
    color: #FFFFFF;
    z-index: 2;
}

#custom-article .article-header__inner {
    max-width: 740px;
    margin: 0 auto;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#custom-article .article-breadcrumb {
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.2s both;
}

#custom-article .article-breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

#custom-article .article-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
}

#custom-article .article-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    transition: all 0.25s ease;
}

#custom-article .article-breadcrumb-link:hover {
    color: #FFFFFF;
    transform: none;
}

#custom-article .article-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
}

#custom-article .article-breadcrumb-item.active span {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    padding: 0;
    border-radius: 0;
}

#custom-article .article-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.35s both;
    width: fit-content;
}

#custom-article .accent-line {
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #DC2626;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 0;
}

#custom-article .article-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.25;
    margin: 0 0 16px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeIn 0.7s ease 0.45s both;
}

#custom-article .article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.55s both;
}

#custom-article .article-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.01em;
}

#custom-article .article-meta__item i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#custom-article .article-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    height: 3px;
    background: rgba(0, 0, 0, 0.04);
}

#custom-article .article-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #DC2626, #EF4444);
    width: 0%;
    transition: width 0.15s ease;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

#custom-article .article-content {
    padding: 80px 0 96px;
}

#custom-article .article-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 56px;
    align-items: start;
}

#custom-article .article-main {
    min-width: 0;
    justify-self: center;
    width: 100%;
    max-width: 720px;
    animation: contentReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

@keyframes contentReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#custom-article .article-body {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.8;
    color: #374151;
    letter-spacing: -0.003em;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    text-align: justify;
}

#custom-article .article-body p {
    margin-bottom: 20px;
    color: #374151;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: justify;
}

#custom-article .article-body a:not(.share-popover__item):not(.nav-links):not(.similar-card):not(.similar-articles-cta a) {
    color: #DC2626;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(220, 38, 38, 0.2);
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
    word-break: break-all;
    overflow-wrap: break-word;
}

#custom-article .article-body a:not(.share-popover__item):not(.nav-links):not(.similar-card):not(.similar-articles-cta a):hover {
    text-decoration-color: #DC2626;
    color: #B91C1C;
}

#custom-article .article-body iframe,
#custom-article .article-body video,
#custom-article .article-body embed,
#custom-article .article-body object {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 28px 0;
    display: block;
}

#custom-article .article-body .wp-block-embed__wrapper,
#custom-article .article-body .wp-embed-responsive {
    max-width: 100%;
    overflow: hidden;
}

#custom-article .article-body .wpdm-download-link,
#custom-article .article-body .download-button,
#custom-article .article-body a[href*="wpdmdl"],
#custom-article .article-body a[href$=".pdf"],
#custom-article .article-body a[href$=".doc"],
#custom-article .article-body a[href$=".docx"],
#custom-article .article-body a[href$=".xls"],
#custom-article .article-body a[href$=".xlsx"],
#custom-article .article-body a[href$=".ppt"],
#custom-article .article-body a[href$=".pptx"],
#custom-article .article-body a[href*="download"],
#custom-article .article-body a[href*="telecharger"],
#custom-article .article-body a[href*="télécharger"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    color: #DC2626;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    word-break: break-all;
    max-width: 100%;
}

/*
   Les articles importés de l'ancien site contiennent des
   blocs "WPDM" (WordPress Download Manager) — une carte Bootstrap complète
   avec icône 64px et titre en <h3> — qui héritait de la taille des titres
   normaux de l'article (margin 56px, grande police). Un simple lien de
   téléchargement prenait ainsi toute la largeur et une hauteur disproportionnée.
   Réduit ici à une puce compacte, cohérente avec les autres liens de
   téléchargement de la page (voir règle .wpdm-download-link ci-dessus).
*/
#custom-article .article-body .link-template-default {
    display: block;
    margin: 16px 0;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    background: #FAFAFA;
}

#custom-article .article-body .link-template-default .card-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px !important;
}

#custom-article .article-body .link-template-default .media {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

#custom-article .article-body .link-template-default .wpdm_icon {
    width: 28px !important;
    height: 28px !important;
}

#custom-article .article-body .link-template-default .package-title {
    margin: 0 !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

#custom-article .article-body .link-template-default .package-title::after {
    display: none;
}

#custom-article .article-body .link-template-default .package-title a {
    color: #DC2626;
    text-decoration: none;
}

#custom-article .article-body .link-template-default .package-title a:hover {
    text-decoration: underline;
}

#custom-article .article-body .link-template-default .text-muted.text-small {
    font-size: 0.76rem;
    color: #9CA3AF;
    margin-top: 2px;
}

/* Tweets et images du contenu : voir css/components/contenu-enrichi.css. */

#custom-article .article-body .wpdm-download-link:hover,
#custom-article .article-body .download-button:hover,
#custom-article .article-body a[href*="wpdmdl"]:hover,
#custom-article .article-body a[href$=".pdf"]:hover,
#custom-article .article-body a[href$=".doc"]:hover,
#custom-article .article-body a[href$=".docx"]:hover,
#custom-article .article-body a[href$=".xls"]:hover,
#custom-article .article-body a[href$=".xlsx"]:hover,
#custom-article .article-body a[href$=".ppt"]:hover,
#custom-article .article-body a[href$=".pptx"]:hover,
#custom-article .article-body a[href*="download"]:hover,
#custom-article .article-body a[href*="telecharger"]:hover,
#custom-article .article-body a[href*="télécharger"]:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
}

#custom-article .article-body p:first-of-type {
    font-size: 1.125rem;
    color: #4B5563;
    line-height: 1.8;
}

#custom-article .article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 72px 0 28px;
    line-height: 1.25;
    letter-spacing: -0.025em;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    position: relative;
    padding-bottom: 16px;
}

#custom-article .article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #DC2626, #EF4444);
    border-radius: 0;
}

#custom-article .article-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #111827;
    margin: 56px 0 22px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

#custom-article .article-body ul,
#custom-article .article-body ol {
    margin: 28px 0;
    padding-left: 32px;
}

#custom-article .article-body li {
    margin-bottom: 16px;
    line-height: 1.85;
    color: #374151;
    position: relative;
    overflow-wrap: break-word;
    word-break: break-word;
}

#custom-article .article-body li::marker {
    color: #DC2626;
    font-weight: 600;
}

#custom-article .article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 48px 0;
    display: block;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article .article-body figure {
    margin: 48px 0;
    max-width: 100%;
    overflow: hidden;
}

#custom-article .article-body table,
#custom-article .article-body pre,
#custom-article .article-body code {
    max-width: 100%;
    overflow-x: auto;
}

#custom-article .article-body figcaption {
    font-size: 0.82rem;
    color: #6B7280;
    font-style: italic;
    text-align: center;
    margin-top: 18px;
    font-weight: 400;
    letter-spacing: 0.01em;
    word-break: break-word;
}

#custom-article .article-summary {
    font-size: 1.125rem;
    font-weight: 400;
    color: #4B5563;
    line-height: 1.8;
    margin-bottom: 48px;
    padding: 32px 36px;
    background: #FFFFFF;
    border-left: 3px solid #DC2626;
    border-radius: 0 20px 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    position: relative;
    overflow: hidden;
    animation: summaryIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

@keyframes summaryIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#custom-article .article-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #DC2626, #EF4444);
    opacity: 0.15;
}

#custom-article .article-summary em {
    font-style: italic;
    color: #111827;
}

#custom-article .article-sidebar {
    position: sticky;
    top: 100px;
    justify-self: center;
    z-index: 1000;
    margin-right: 20px;
}

#custom-article .article-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 8px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

#custom-article .article-actions--bottom {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 40px;
    padding: 16px 24px;
}

#custom-article .article-actions--both {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 8px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

#custom-article .action-btn {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    animation: actionIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#custom-article .action-btn:nth-child(1) { animation-delay: 0.4s; }
#custom-article .action-btn:nth-child(2) { animation-delay: 0.5s; }
#custom-article .action-btn:nth-child(3) { animation-delay: 0.6s; }

@keyframes actionIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

#custom-article .action-btn:hover {
    background: #FFFFFF;
    color: #DC2626;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.15), 0 4px 12px rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.15);
}

#custom-article .action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

#custom-article .action-btn--like.is-liked {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
    color: #DC2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15);
}

#custom-article .action-btn--like.is-liked:hover {
    background: rgba(220, 38, 38, 0.12);
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.25);
    color: #B91C1C;
}

#custom-article .action-btn--like.just-liked {
    animation: heartPulse 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.25); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

#custom-article .action-btn__count {
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 3px;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

#custom-article .share-popover {
    display: none;
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 16px 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.06);
    z-index: 20;
    white-space: nowrap;
}

#custom-article .share-popover.is-open {
    display: block;
    animation: popoverIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes popoverIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-8px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

#custom-article .share-popover__title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #9CA3AF;
    margin: 0 0 12px;
    text-align: center;
    font-weight: 700;
}

#custom-article .share-popover__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#custom-article .share-popover__item {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #F9FAFB;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #DC2626;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 0.95rem;
    cursor: pointer;
}

#custom-article .share-popover__item:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
    transform: scale(1.12) translateX(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.25);
}

#custom-article .share-popover__item--copy:hover {
    background: rgba(220, 38, 38, 0.08);
    border-style: solid;
    transform: scale(1.05);
    box-shadow: none;
}

#custom-article .action-btn--copy.is-copied {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #DC2626;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.15);
}

#custom-article .copy-toast {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    background: #111827;
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.01em;
}

#custom-article .copy-toast.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

#custom-article .copy-toast::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #111827;
}

#custom-article .similar-articles-section {
    padding: 100px 0;
    background: #FFFFFF;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

#custom-article .similar-articles-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.2), transparent);
}

#custom-article .similar-articles-section__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.025em;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article .similar-articles-section.is-visible .similar-articles-section__title {
    opacity: 1;
    transform: translateY(0);
}

#custom-article .similar-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    justify-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

#custom-article .similar-card {
    background: #FAFBFC;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
    max-width: 360px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

#custom-article .similar-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#custom-article .similar-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 70%, rgba(220, 38, 38, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

#custom-article .similar-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 80px rgba(220, 38, 38, 0.12), 0 8px 24px rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.1);
    background: #FFFFFF;
}

#custom-article .similar-card:hover::before {
    opacity: 1;
}

#custom-article .similar-card__image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article .similar-card:hover .similar-card__image {
    transform: scale(1.04);
}

#custom-article .similar-card__category {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(220, 38, 38, 0.9);
    color: #FFFFFF;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#custom-article .similar-card__content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

#custom-article .similar-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.005em;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

#custom-article .similar-card__date {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 500;
    letter-spacing: 0.02em;
}

#custom-article .similar-articles-cta {
    text-align: center;
    margin-top: 48px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article .similar-articles-section.is-visible .similar-articles-cta {
    opacity: 1;
    transform: translateY(0);
}

#custom-article .similar-articles-cta a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #DC2626;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    position: relative;
}

#custom-article .similar-articles-cta a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #DC2626;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article .similar-articles-cta a:hover {
    color: #B91C1C;
    gap: 14px;
}

#custom-article .similar-articles-cta a:hover::after {
    width: 100%;
}

#custom-article .similar-articles-cta a i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

#custom-article .similar-articles-cta a:hover i {
    transform: translateX(3px);
}

#custom-article .facebook-links,
#custom-article .tweets {
    margin: 40px 0;
    padding: 28px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#custom-article .facebook-links p,
#custom-article .tweets p {
    margin-bottom: 10px;
}

#custom-article .facebook-links a,
#custom-article .tweets a {
    color: #DC2626;
    word-break: break-all;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(220, 38, 38, 0.2);
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
}

#custom-article .facebook-links a:hover,
#custom-article .tweets a:hover {
    text-decoration-color: #DC2626;
    color: #B91C1C;
}

@media (max-width: 1024px) {
    #custom-article .article-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    #custom-article .article-sidebar {
        position: static;
        justify-self: center;
    }

    #custom-article .article-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    #custom-article .share-popover {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        animation: none;
    }

    #custom-article .similar-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    #custom-article .article-header__media {
        height: 460px;
    }

    #custom-article .article-header__content .article-title {
        font-size: 2rem;
    }

    #custom-article .article-body {
        font-size: 1rem;
    }

    #custom-article .article-content {
        padding: 56px 0 72px;
    }
}

@media (max-width: 640px) {
    #custom-article .article-header__media {
        height: 400px;
    }

    #custom-article .article-header__content {
        padding: 48px 0 56px;
    }

    #custom-article .article-header__content .article-title {
        font-size: 1.65rem;
    }

    #custom-article .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #custom-article .similar-articles-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    #custom-article .article-sidebar {
        position: static;
        justify-self: center;
    }

    #custom-article .article-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    #custom-article .share-popover {
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(0, 0, 0, 0.05);
        background: rgba(255, 255, 255, 0.98);
        padding: 16px 14px;
        animation: popoverIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    #custom-article .copy-toast {
        position: absolute;
        left: calc(100% + 14px);
        top: 50%;
        transform: translateY(-50%) translateX(-8px);
    }
}

/* ==========================================================================
   Article Breadcrumb — sur l'image
   ========================================================================== */
#custom-article .article-breadcrumb {
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.2s both;
}

#custom-article .article-breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

#custom-article .article-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

#custom-article .article-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    transition: all 0.25s ease;
}

#custom-article .article-breadcrumb-link:hover {
    color: #FFFFFF;
    transform: none;
}

#custom-article .article-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
}

#custom-article .article-breadcrumb-item.active span {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    padding: 0;
    border-radius: 0;
}

/* ==========================================================================
   Soft Design Improvements
   ========================================================================== */
#custom-article .article-header__overlay {
    background: linear-gradient(180deg,
        rgba(16, 35, 63, 0.1) 0%,
        rgba(16, 35, 63, 0.35) 40%,
        rgba(16, 35, 63, 0.8) 100%
    );
}

#custom-article .article-header__media {
    height: 520px;
}

#custom-article .article-header__image {
    opacity: 0.75;
    transform: scale(1.05);
    transition: transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#custom-article.is-loaded .article-header__image {
    transform: scale(1.01);
}

#custom-article .article-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.35s both;
    width: fit-content;
}

#custom-article .accent-line {
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #DC2626;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 0;
}

#custom-article .article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 0 0 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    letter-spacing: -0.03em;
    opacity: 0;
    animation: fadeIn 0.7s ease 0.45s both;
}

#custom-article .article-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.55s both;
}

#custom-article .article-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.01em;
}

#custom-article .article-meta__item i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

#custom-article .article-content {
    padding: 64px 0 80px;
    overflow-x: hidden;
    background: linear-gradient(180deg, #FAFBFC 0%, #F5F7FA 100%);
}

#custom-article .article-layout {
    display: grid;
    grid-template-columns: 1fr 64px;
    gap: 48px;
    align-items: start;
    overflow-x: hidden;
}

#custom-article .article-main {
    min-width: 0;
    justify-self: center;
    width: 100%;
    max-width: 720px;
    animation: contentReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

#custom-article .article-summary {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.7;
    padding: 24px 28px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid rgba(16, 35, 63, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 32px;
}

#custom-article .article-body {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.9;
    color: #374151;
    letter-spacing: -0.003em;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    background: #FFFFFF;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(16, 35, 63, 0.05);
}

#custom-article .article-body p {
    margin-bottom: 24px;
    color: #374151;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    overflow-wrap: break-word;
    word-break: break-word;
}

#custom-article .article-body a:not(.share-popover__item):not(.nav-links):not(.similar-card):not(.similar-articles-cta a) {
    color: #1e5f8e;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(30, 95, 142, 0.2);
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
    word-break: break-all;
    overflow-wrap: break-word;
}

#custom-article .article-body a:not(.share-popover__item):not(.nav-links):not(.similar-card):not(.similar-articles-cta a):hover {
    text-decoration-color: #1e5f8e;
    color: #164c7a;
}

#custom-article .article-sidebar {
    position: sticky;
    top: 100px;
    justify-self: center;
}

#custom-article .article-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #FFFFFF;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(16, 35, 63, 0.06);
}

#custom-article .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(16, 35, 63, 0.08);
    background: #FFFFFF;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

#custom-article .action-btn:hover {
    background: #F9FAFB;
    border-color: rgba(16, 35, 63, 0.15);
    color: #374151;
    transform: translateY(-1px);
}

#custom-article .action-btn.is-liked {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.04);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    #custom-article .article-header__media {
        height: 420px;
    }

    #custom-article .article-title {
        font-size: 2rem;
    }

    #custom-article .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    #custom-article .article-sidebar {
        position: static;
        justify-self: start;
    }

    #custom-article .article-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    #custom-article .article-header__media {
        height: 340px;
    }

    #custom-article .article-title {
        font-size: 1.65rem;
    }

    #custom-article .article-content {
        padding: 40px 0 56px;
    }

    #custom-article .article-body {
        padding: 20px;
        border-radius: 16px;
    }

    #custom-article .article-summary {
        padding: 18px 20px;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #custom-article .article-header__image,
    #custom-article .reform-featured-image img,
    #custom-article .reform-small-card,
    #custom-article .publication-card,
    #custom-article .anim-card {
        transition: none !important;
        animation: none !important;
    }
}

/* Téléphone : texte aligné à gauche (le justifié creusait de grands blancs
   entre les mots sur une colonne étroite) et fil d'Ariane qui se termine
   proprement par « … » au lieu d'être coupé net au bord de l'écran. */
@media (max-width: 767.98px) {
    #custom-article .article-body,
    #custom-article .article-body p {
        text-align: left;
        -webkit-hyphens: auto;
        hyphens: auto;
        font-size: 1rem;
        line-height: 1.75;
    }

    #custom-article .article-breadcrumb-list {
        overflow: hidden;
    }

    #custom-article .article-breadcrumb-item.active {
        min-width: 0;
        overflow: hidden;
    }

    #custom-article .article-breadcrumb-item.active span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }
}
