/**
 * ============================================================================
 * MAISONS CTL - Style de la page Article Blog (détail)
 * ============================================================================
 *
 * Fichier : assets/css/article.css
 * Version : 2.0.0
 * Date : 26/03/2026
 *
 * Sections :
 * 1. Variables & Font Import
 * 2. Hero Section
 * 3. Fil d'Ariane (Breadcrumb)
 * 4. Barre de Progression de Lecture
 * 5. Layout Article (wrapper 2 colonnes)
 * 6. Sommaire (Table of Contents)
 * 7. Contenu Article (intro, sections, images)
 * 8. CTA Section
 * 9. Bouton Retour en Haut
 * 10. Animations
 * 11. Responsive
 */

/* ============================================================================
   SECTION 1 : VARIABLES & FONT IMPORT
   ============================================================================ */

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

:root {
    --red: #B22222;
    --red-dark: #8B1A1A;
    --green: #2D5A3D;
    --green-dark: #1E3D29;
    --green-light: #3A7A52;
    --gold: #C8A55A;
    --gold-light: #E8D5A0;

    --cream: #FAF7F2;
    --warm-white: #FEFCF9;
    --warm-gray: #F5F0EA;
    --text: #2A2A2A;
    --text-light: #6B6560;
    --text-muted: #9A938C;
    --border: #E8E2DA;

    --shadow-sm: 0 1px 3px rgba(42, 42, 42, 0.06);
    --shadow-md: 0 4px 20px rgba(42, 42, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(42, 42, 42, 0.12);

    --radius: 12px;
    --radius-lg: 20px;
}

.page-article {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    color: var(--text);
}

.page-article h1,
.page-article h2,
.page-article h3 {
    font-family: 'DM Serif Display', serif;
}

/* ============================================================================
   SECTION 2 : HERO SECTION
   ============================================================================ */

.hero {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #3D7A56 100%);
    padding: 120px 20px 80px;
    overflow: hidden;
}

/* Texture subtile en overlay (dots) */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content.hero-single-col {
    grid-template-columns: 1fr;
    max-width: 760px;
    text-align: center;
}

/* Colonne gauche : texte */
.hero-text {
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold-light);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}

.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 520px;
}

.hero-single-col .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta-separator {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

/* Colonne droite : image */
.hero-image-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: rotate(1deg);
    transition: transform 0.4s ease;
}

.hero-image-wrapper:hover {
    transform: rotate(0deg);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius-lg) - 8px);
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* ============================================================================
   SECTION 3 : FIL D'ARIANE (Breadcrumb)
   ============================================================================ */

.breadcrumb {
    background: var(--warm-white);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
}

.breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--green);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* ============================================================================
   SECTION 4 : BARRE DE PROGRESSION DE LECTURE
   ============================================================================ */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--gold));
    z-index: 100001;
    transition: width 0.1s linear;
}

/* ============================================================================
   SECTION 5 : LAYOUT ARTICLE (wrapper 2 colonnes)
   ============================================================================ */

.article-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 20px 5rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
}

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

/* ============================================================================
   SECTION 6 : SOMMAIRE (Table of Contents)
   ============================================================================ */

.toc {
    position: sticky;
    top: 100px;
    align-self: start;
}

.toc-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 2px;
}

.toc-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
}

.toc-list a:hover {
    background: var(--warm-gray);
    color: var(--text);
}

.toc-list a.active {
    background: rgba(45, 90, 61, 0.08);
    color: var(--green);
    border-left-color: var(--green);
    font-weight: 500;
}

.toc-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 20px;
    padding-top: 1px;
}

.toc-list a.active .toc-number {
    color: var(--green);
}

/* ============================================================================
   SECTION 7 : CONTENU ARTICLE (intro, sections, images)
   ============================================================================ */

/* Introduction */
.article-intro {
    font-size: 1.18rem;
    color: var(--text-light);
    line-height: 1.85;
    border-left: 3px solid var(--gold);
    padding-left: 1.5rem;
    margin-bottom: 3rem;
}

/* Titre de section (H2) avec icône */
.section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 3rem 0 1.5rem;
    scroll-margin-top: 100px;
}

.section-heading:first-of-type {
    margin-top: 0;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: var(--radius);
    font-size: 1.3rem;
    line-height: 1;
}

.icon-green {
    background: rgba(45, 90, 61, 0.1);
    color: var(--green);
}

.icon-red {
    background: rgba(178, 34, 34, 0.1);
    color: var(--red);
}

.icon-gold {
    background: rgba(200, 165, 90, 0.15);
    color: var(--gold);
}

.section-heading h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
}

/* Texte de section */
.section-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

/* Image de section (figure) */
.article-image {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

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

.article-image figcaption {
    background: var(--cream);
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* ============================================================================
   SECTION 8 : CTA SECTION
   ============================================================================ */

.cta-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 20px;
}

.cta-box {
    background: var(--cream);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}

.cta-box h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--text);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.cta-box p {
    font-size: 1.02rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(178, 34, 34, 0.3);
}

.cta-btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(178, 34, 34, 0.4);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.cta-btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(45, 90, 61, 0.04);
}

/* ============================================================================
   SECTION 9 : BOUTON RETOUR EN HAUT
   ============================================================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ============================================================================
   SECTION 10 : ANIMATIONS
   ============================================================================ */

.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   SECTION 11 : RESPONSIVE
   ============================================================================ */

/* Tablette & petit desktop (<= 1024px) */
@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 2rem 20px 4rem;
    }

    .toc {
        display: none;
    }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
    .hero {
        padding: 100px 16px 50px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hero-image-wrapper {
        padding: 1rem;
        transform: rotate(0deg);
        max-width: 500px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .breadcrumb-current {
        max-width: 200px;
    }

    .article-wrapper {
        padding: 1.5rem 16px 3rem;
    }

    .article-intro {
        font-size: 1.05rem;
        padding-left: 1rem;
    }

    .section-heading {
        gap: 12px;
        margin: 2.5rem 0 1rem;
    }

    .section-heading h2 {
        font-size: 1.4rem;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }

    .section-text {
        font-size: 1rem;
    }

    .cta-section {
        margin: 2.5rem auto;
        padding: 0 16px;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }

    .cta-actions {
        flex-direction: column;
        gap: 12px;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

/* Mobile petit (<= 480px) */
@media (max-width: 480px) {
    .hero {
        padding: 90px 14px 40px;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 5px 14px;
    }

    .breadcrumb-inner {
        font-size: 0.8rem;
    }
}
