/* ==========================================================================
   SINGLE ARTICLE (ActualitÃ©s & Ressources)
   Template conforme Ã  la maquette Figma
   ========================================================================== */

/* Variables */
:root {
    --article-container: 1500px;
    --article-gap: 30px;
}

/* ========================================
   BASE ARTICLE
   ======================================== */
.single-article {
    background: var(--color-bg-light, #ebf0f4);
}

.single-article__container {
    max-width: var(--article-container);
    width: 100%;
    margin: 0 auto;
    padding: 0 50px;
    box-sizing: border-box;
}

/* ========================================
   HERO SECTION
   ======================================== */
.single-article__hero {
    padding-top: 200px;
    padding-bottom: 90px;
    position: relative;
}

.single-article__hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 700px;
    background:
        radial-gradient(
            ellipse at 30% 0%,
            rgba(139, 205, 255, 0.35) 0%,
            transparent 55%
        ),
        radial-gradient(
            ellipse at 70% 0%,
            rgba(12, 94, 188, 0.15) 0%,
            transparent 55%
        ),
        linear-gradient(180deg, rgba(235, 240, 244, 0.5) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.single-article__hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 700px;
    background-image: url("../../images/gradient-hero.jpg");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.5;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 0;
}

.single-article__hero .single-article__container {
    position: relative;
    z-index: 1;
}

/* Bouton retour — même rollover que .btn--see-more home */
.single-article__back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 10px;
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-brand-dark, #0c5ebc);
    text-decoration: none;
    margin-bottom: 30px;
    background: transparent;
    border-radius: 400px;
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.single-article__back:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(12, 28, 41, 0.06);
    opacity: 1;
}

.single-article__back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.single-article__back-icon svg {
    width: 32px;
    height: 24px;
    color: var(--color-brand-dark, #0c5ebc);
    transition: color 0.3s ease;
}

/* Hover : cercle bleu + flèche blanche */
.single-article__back:hover .single-article__back-icon {
    background: var(--color-brand-dark, #0c5ebc);
}

.single-article__back:hover .single-article__back-icon svg {
    color: #ffffff;
}

/* Hero Grid */
.single-article__hero-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--article-gap);
}

/* Hero Info (gauche) — 5/12 col */
.single-article__hero-info {
    flex: 0 0 calc(41.6667% - 15px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tag */
.single-article__tag {
    display: inline-block;
    padding: 6px 10px 6px;
    background: rgba(12, 94, 188, 0.1);
    border-radius: 2px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-brand-dark, #0c5ebc);
    line-height: 1.35;
    width: fit-content;
}

/* Titre */
.single-article__title {
    font-family: "IBM Plex Serif", serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text-dark, #0c1c29);
    margin: 0;
}

/* Meta */
.single-article__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary, #84898c);
    line-height: 1.35;
}

.single-article__meta-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Extrait */
.single-article__excerpt {
    font-family: "IBM Plex Serif", serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text-dark, #0c1c29);
    margin: 38px 0 0;
    max-width: 480px;
}

/* Partage social */
.single-article__share {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.single-article__share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-brand-dark, #0c5ebc);
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.single-article__share-link:hover {
    opacity: 0.6;
}

.single-article__share-link svg {
    width: 24px;
    height: 24px;
}

.single-article__copy-link.copied {
    color: var(--color-brand-dark, #0c5ebc);
}

/* Hero Image (droite) — 7/12 col */
.single-article__hero-image {
    flex: 0 0 calc(58.3333% - 15px);
    height: 500px;
    border-radius: 0;
    overflow: hidden;
}

.single-article__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-article__hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8eef3 0%, #c5d1dc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-article__hero-placeholder::after {
    content: "";
    width: 80px;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2384898c' stroke-width='1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.5;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */
.single-article__toc {
    display: none;
    width: 60%;
    max-width: 800px;
    margin-left: auto;
    margin-top: 0;
    padding: 50px 0;
    border-top: 1px solid var(--color-grey-light, #b3babe);
    border-bottom: 1px solid var(--color-grey-light, #b3babe);
}

.single-article__toc.has-toc {
    display: block;
}

.single-article__toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.single-article__toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-dark, #0c1c29);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.single-article__toc-link:hover,
.single-article__toc-link.is-active {
    color: var(--color-brand-dark, #0c5ebc);
}

.single-article__toc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.single-article__toc-icon svg {
    width: 14px;
    height: 12px;
    transform: rotate(90deg);
}

/* ========================================
   ARTICLE CONTENT
   ======================================== */
.single-article__content {
    padding-bottom: 120px;
}

.single-article__body {
    display: flex;
    flex-direction: column;
    gap: 90px;
}

/* Style par défaut quand pas de sections (contenu simple) — 7/12 col droite */
.single-article__body:not(:has(.article-section)) {
    width: calc(58.3333% - 15px);
    margin-left: auto;
}

/* Message quand pas de contenu */
.single-article__body:empty::after {
    content: "Aucun contenu disponible pour cet article.";
    font-family: "IBM Plex Serif", serif;
    font-size: 18px;
    color: var(--color-text-secondary, #84898c);
    font-style: italic;
    padding: 40px 0;
}

/* Section de contenu : titre Ã  gauche, contenu Ã  droite */
.single-article__body .article-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--article-gap);
}

.single-article__body .article-section__title {
    flex: 0 0 calc(41.6667% - 15px);
}

.single-article__body .article-section__content {
    flex: 0 0 calc(58.3333% - 15px);
}

/* Titres H2 - Style section */
.single-article__body h2 {
    font-family: "General Sans", sans-serif;
    font-size: 35px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text-dark, #0c1c29);
    margin: 0 0 30px;
    max-width: 479px;
}

/* Titres H3 - Sous-section avec bordure */
.single-article__body h3 {
    font-family: "General Sans", sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text-dark, #0c1c29);
    margin: 0 0 56px;
    padding: 8px 0 8px 20px;
    border-left: 1px solid var(--color-text-secondary, #84898c);
}

/* Paragraphes */
.single-article__body p {
    font-family: "IBM Plex Serif", serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-dark, #0c1c29);
    margin: 0 0 15px;
}

.single-article__body p:last-child {
    margin-bottom: 0;
}

.single-article__body em,
.single-article__body i {
    font-style: italic;
}

.single-article__body strong,
.single-article__body b {
    font-weight: 600;
}

.single-article__body a {
    color: var(--color-brand-dark, #0c5ebc);
    text-decoration: underline;
}

/* Listes */
.single-article__body ul,
.single-article__body ol {
    font-family: "IBM Plex Serif", serif;
    font-size: 20px;
    line-height: 1.5;
    color: var(--color-text-dark, #0c1c29);
    margin: 0 0 20px;
    padding-left: 25px;
}

.single-article__body li {
    margin-bottom: 10px;
}

/* Images dans l'article */
.single-article__body img {
    max-width: 735px;
    width: 100%;
    height: auto;
    margin: 0;
    display: block;
}

.single-article__body figure {
    margin: 80px 0;
    max-width: 735px;
}

.single-article__body figcaption {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary, #84898c);
    margin-top: 20px;
    line-height: 1.4;
}

/* Titre de figure (lÃ©gende) */
.single-article__body .figure-title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-dark, #0c1c29);
    margin-bottom: 30px;
}

/* ========================================
   DISCLAIMER
   ======================================== */
.single-article__disclaimer {
    padding-bottom: 40px;
}

.single-article__disclaimer-content {
    width: calc(58.3333% - 15px);
    margin-left: auto;
    padding: 40px 0;
    border-top: 1px solid var(--color-text-secondary, #84898c);
}

.single-article__disclaimer-title {
    font-family: var(--font-primary) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--color-text-secondary, #84898c) !important;
    margin-bottom: 20px !important;
}

.single-article__disclaimer-content p {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-secondary, #84898c);
    margin: 0;
}

/* ========================================
   CTA BANDEAU (peach card "Envie d'approfondir le sujet ?")
   Maquette Figma node 1085:12320
   Aligné dans la colonne de droite (~60% comme l'avertissement)
   ======================================== */
.single-article__cta {
    padding-bottom: 120px;
}

.single-article__cta .actualites-cta__card {
    width: calc(58.3333% - 15px);
    margin-left: auto;
    background-color: #fde0b9;
    border-radius: 8px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.single-article__cta .actualites-cta__title {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
    color: #0c1c29;
    margin: 0;
    max-width: 566px;
}

.single-article__cta .btn--cta-contact {
    display: inline-flex;
    align-items: center;
    height: 50px;
    padding: 0 16px 0 10px;
    background: #0c1c29;
    border-radius: 400px;
    color: white;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.single-article__cta .btn--cta-contact .btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 35px;
    margin-right: 4px;
}

.single-article__cta .btn--cta-contact .btn__icon svg {
    width: auto;
    height: 35px;
    color: white;
}

.single-article__cta .btn--cta-contact:hover {
    background: #1a3040;
}

@media (max-width: 767px) {
    .single-article__cta {
        padding-bottom: 60px;
    }

    .single-article__cta .actualites-cta__card {
        width: 100%;
        max-width: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        gap: 30px;
    }

    .single-article__cta .actualites-cta__title {
        font-size: 24px;
    }
}

/* ========================================
   RESSOURCES SECTION (fond clair, layout maquette : header centré + grid 4x2)
   ======================================== */
.single-article__ressources {
    background: var(--color-bg-light, #ebf0f4);
    padding: 100px 0;
}

.single-article__ressources-container {
    max-width: var(--article-container);
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.single-article__ressources-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
    text-align: center;
}

.single-article__ressources-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-brand-dark, #0c5ebc);
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.single-article__ressources-label svg {
    color: var(--color-brand-dark, #0c5ebc);
}

.single-article__ressources-title {
    font-family: "General Sans", sans-serif;
    font-size: clamp(32px, 3.125vw, 50px);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-text-dark, #0c1c29);
    margin: 0;
}

/* Ressources Grid 4x2 */
.single-article__ressources-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

@media (max-width: 1200px) {
    .single-article__ressources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .single-article__ressources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .single-article__ressources-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer "Voir plus" */
.single-article__ressources-footer {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

/* Section Actualités sur single article : réutilise .news / .card--news de main.css */

/* ========================================
   PRODUCTS FOOTER
   ======================================== */
.related-products {
    background: var(--color-bg-dark, #0c1c29);
    padding: 70px 50px;
}

.related-products--dark {
    border-top: 1px solid var(--color-grey-dark, #323a40);
}

.related-products__container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.related-products__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-products__dot {
    width: 11px;
    height: 11px;
    background: var(--color-brand-light, #8bcdff);
    border-radius: 50%;
}

.related-products__label {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-brand-light, #8bcdff);
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.related-products__grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scrollbar-width: none;
}

.related-products__grid::-webkit-scrollbar {
    display: none;
}

.related-product-card {
    flex-shrink: 0;
    width: 350px;
    height: 180px;
    background: #04121d;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    gap: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-product-card:hover {
    background: #0a1f2e;
}

.related-product-card__image {
    width: 140px;
    height: 140px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-card__content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 10px;
    flex: 1;
}

.related-product-card__title {
    font-family: "General Sans", sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-primary, #ebf0f4);
    line-height: 1.3;
}

.related-product-card__desc {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted, #858c92);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Products responsive */
@media (max-width: 1200px) {
    .related-products {
        padding: 50px 30px;
    }

    .related-product-card {
        width: 300px;
    }
}

@media (max-width: 767px) {
    .related-products {
        padding: 40px 20px;
    }

    .related-products__grid {
        gap: 15px;
    }

    .related-product-card {
        width: 260px;
        height: auto;
        min-height: 140px;
        padding: 15px;
        gap: 15px;
    }

    .related-product-card__image {
        width: 100px;
        height: 100px;
    }
}

/* ========================================
   RESPONSIVE - MEDIUM SCREENS (max-width: 1400px)
   ======================================== */
@media (max-width: 1400px) {
    .single-article__container {
        padding: 0 40px;
    }

    .single-article__hero-info {
        flex: 0 0 40%;
    }

    .single-article__hero-image {
        height: 450px;
    }

    .single-article__title {
        font-size: 42px;
    }
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 1200px)
   ======================================== */
@media (max-width: 1200px) {
    .single-article__container {
        padding: 0 30px;
    }

    .single-article__hero-grid {
        flex-direction: column;
        gap: 40px;
    }

    .single-article__hero-info {
        flex: none;
        max-width: 100%;
    }

    .single-article__hero-image {
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 450px;
    }

    .single-article__title {
        font-size: 40px;
    }

    .single-article__toc {
        width: 100%;
    }

    .single-article__body .article-section {
        flex-direction: column;
        gap: 30px;
    }

    .single-article__body .article-section__title,
    .single-article__body .article-section__content {
        flex: none;
        max-width: 100%;
    }

    .single-article__body h2 {
        max-width: 100%;
    }

    .single-article__body img,
    .single-article__body figure {
        max-width: 100%;
    }

    .single-article__disclaimer-content {
        width: 100%;
    }

    /* Ressources tablet */
    .single-article__ressources-container {
        padding: 0 30px;
    }

}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 767px)
   ======================================== */
@media (max-width: 767px) {
    .single-article__container {
        padding: 0 20px;
    }

    .single-article__hero {
        padding-top: 140px;
        padding-bottom: 50px;
    }

    .single-article__back {
        font-size: 16px;
        padding: 10px 15px 10px 5px;
        margin-bottom: 20px;
    }

    .single-article__back-icon {
        width: 30px;
        height: 30px;
    }

    .single-article__hero-info {
        gap: 16px;
    }

    .single-article__title {
        font-size: 28px;
    }

    .single-article__meta {
        font-size: 14px;
    }

    .single-article__excerpt {
        font-size: 17px;
        margin-top: 15px;
    }

    .single-article__hero-image {
        height: 280px;
    }

    .single-article__toc {
        padding: 30px 0;
    }

    .single-article__toc-link {
        font-size: 16px;
    }

    .single-article__toc-icon {
        width: 24px;
        height: 24px;
    }

    .single-article__content {
        padding-bottom: 60px;
    }

    .single-article__body {
        gap: 50px;
    }

    .single-article__body h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .single-article__body h3 {
        font-size: 22px;
        margin-bottom: 30px;
        padding-left: 15px;
    }

    .single-article__body p,
    .single-article__body ul,
    .single-article__body ol {
        font-size: 17px;
    }

    .single-article__body figure {
        margin: 40px 0;
    }

    .single-article__cta {
        padding: 40px 0 80px;
    }

    .single-article__cta-container {
        padding: 0 20px;
    }

    .single-article__cta-button {
        font-size: 16px;
        padding: 15px 15px 15px 25px;
    }

    /* Ressources section mobile */
    .single-article__ressources {
        padding: 50px 0;
    }

    .single-article__ressources-container {
        padding: 0 20px;
    }

    .single-article__ressources-header {
        margin-bottom: 40px;
    }

    .single-article__ressources-footer {
        margin-top: 40px;
    }

}


/* ==========================================================================
   TÉLÉCHARGEMENT D'UNE RESSOURCE (ajout 2026-11-17)
   ========================================================================== */

.single-article__download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    height: 50px;
    padding: 0 20px 0 10px;
    margin-top: 6px;
    background: var(--color-brand-dark, #0c5ebc);
    border-radius: 400px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.single-article__download:hover,
.single-article__download:focus-visible {
    background: #0c1c29;
    color: #fff;
}

.single-article__download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.single-article__download-info {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.75;
}

.single-article__download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: calc(58.3333% - 15px);
    margin: 60px 0 0 auto;
    padding: 24px 30px;
    background: #ebf0f4;
    border-radius: 16px;
}

.single-article__download-box .single-article__download {
    margin-top: 0;
    flex-shrink: 0;
}

.single-article__download-box-title {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 17px;
    font-weight: 600;
    color: #0c1c29;
}

.single-article__download-box-meta {
    margin: 4px 0 0;
    font-size: 14px;
    color: #858c92;
}

@media (max-width: 767px) {
    .single-article__download-box {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        margin-top: 40px;
    }
}


/* P31 : auteur et informations réglementaires (ajout 2026-11-27) */
.single-article__auteur {
    margin: 0;
    font-size: 15px;
    color: var(--color-text-dark, #0c1c29);
}

.single-article__disclaimer-infos {
    font-weight: 600;
}
