/* --- 1. BASE LIGHT (Par défaut) --- */
:root,
.theme-light {
    --bg-color: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-color: #374151;
    --text-title: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --border-radius: 12px;
    --split-bg: #ffffff;
    --split-title: #1a1a1a;
    --split-text: #4a4a4a;
    --split-shadow: rgba(0, 0, 0, 0.08);
}

/* --- 2. BASE DARK (Activé uniquement par la classe) --- */
.theme-dark {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #cbd5e1;
    --text-title: #ffffff;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.9);
    --split-bg: var(--bg-color);
    --split-title: var(--text-title);
    --split-text: var(--text-color);
    --split-shadow: rgba(0, 0, 0, 0.3);
}

/* --- CONFIGURATION & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT GLOBAL --- */

/* Version classique (Articles, Pages standards) */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* Version Full-Width (Home page) */
main.main-wide {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* Le conteneur utilitaire pour les blocs internes de main-wide */
.container-1200 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    main,
    .container-1200 {
        padding: 0 20px;
    }
}

.site-header,
.site-footer {
    width: 100%;
    padding-left: 0px;
    padding-right: 0px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

@media (min-width: 768px) {
    .site-header,
    .site-footer {
        padding-left: 0px;
        padding-right: 0px;
    }
}

/* --- HEADER & NAVIGATION --- */
.site-header {
    background: var(--header-bg);
    height: 60px;
    /* On retire display: flex ici pour le mettre sur le conteneur interne */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Valeur de référence */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 20px; /* Aligné sur ton padding desktop */
    }
}

/* Sur l'image directement pour contrôler son espacement */
.logo-img {
    max-height: 50px;
    width: auto;
    display: block;
    padding-top: 8px; /* Ajuste la valeur selon tes besoins */
    padding-bottom: 8px;
}

/* Ou sur le conteneur du lien pour centrer verticalement */
.site-logo-image {
    display: flex;
    align-items: center;
    padding: 0.5rem 0; /* Équivalent à 8px haut/bas */
}

.site-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.theme-switch-wrapper {
    display: flex;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 0.9rem;
    filter: grayscale(1);
    opacity: 0.5;
}

.theme-btn.active {
    background: var(--bg-color);
    filter: grayscale(0);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
}

.main-nav.open {
    right: 0;
}

@media (min-width: 768px) {
    .main-nav {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        background: transparent;
        display: flex;
        gap: 2rem;
    }
    .nav-item {
        font-size: 0.95rem;
        text-decoration: none;
        font-weight: 600;
        color: var(--text-color);
    }
    .nav-item:hover {
        color: var(--primary-color);
    }
}

/* --- STRUCTURE ARTICLE --- */
.single-article {
    max-width: 720px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-title);
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.8rem;
        line-height: 1.1;
    }
}

/* --- FIL D'ARIANE --- */

/* Conteneur parent : gère le positionnement du fondu */
.breadcrumb {
    margin: 0.5rem 0 1rem;
    position: relative;
    overflow: hidden; /* Empêche le contenu de déborder du bloc parent */
}

/* Masque de fondu à droite pour indiquer le scroll sur mobile */
.breadcrumb::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60px; /* On l'élargit un peu pour plus de douceur */
    height: 100%;
    /* On part du transparent vers la couleur du fond */
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0),
        var(--bg-color)
    );
    pointer-events: none;
    z-index: 2;
}

/* Liste scrollable */
.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;

    /* Configuration du scroll horizontal */
    overflow-x: auto;
    white-space: nowrap; /* Empêche le retour à la ligne des éléments */
    scrollbar-width: none; /* Cache la barre sur Firefox */
    -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */

    /* Espace de sécurité pour le fondu et la fin du scroll */
    padding-right: 40px;
}

/* Cache la barre de défilement sur Chrome, Safari et Edge */
.breadcrumb-list::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Empêche les éléments de s'écraser */
}

.breadcrumb-item a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-block;
}

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

/* Le séparateur (chevron) */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    margin: 0 8px;
    color: var(--text-muted); /* Utilise la couleur du texte moins vive */
    opacity: 0.5; /* On baisse l'intensité */
    font-weight: 400;
}

/* --- SOMMAIRE (TOC) --- */
.toc-sidebar {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.toc-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.toc-sidebar-title {
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-title);
    letter-spacing: 0.05em;
}
.toc-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}
.toc-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    /* On retire padding/margin pour que la hauteur soit strictement 0 quand fermé */
    margin-top: 0;
    padding-top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-sidebar:not(.collapsed) .toc-content {
    max-height: 1000px; /* Une valeur assez grande */
    opacity: 1;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color); /* La bordure n'apparaît que si ouvert */
}

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

.toc-sidebar a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.toc-sidebar a:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    transform: translateX(6px);
}

/* --- LOGIQUE DES COLONNES & DESKTOP --- */
@media (min-width: 1024px) {
    .single-article {
        max-width: 1200px !important;
    }
    .article-layout-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 800px) 300px;
        gap: 60px;
        align-items: start;
    }

    /* On supprime le bloc .toc-content qui était ici ! */

    .toc-sidebar {
        grid-column: 2;
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        margin-bottom: 0;
    }

    .sidebar-container {
        grid-column: 2;
        position: sticky;
        top: 80px;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .article-content-area {
        grid-column: 1;
        grid-row: 1;
    }
}

/* --- CONTENU ÉDITORIAL --- */
.article-body {
    font-size: 1.05rem;
    line-height: 1.6;
}
.article-body p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}
.article-body h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1.25rem;
    font-weight: 800;
    color: var(--text-title);
    /* On retire la bordure complète pour une bordure partielle */
    border-bottom: 4px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block; /* Permet à la bordure de s'arrêter après le texte */
    min-width: 150px; /* Évite que ce soit trop court sur un mot unique */
    scroll-margin-top: 80px;
}
.article-body h3 {
    font-size: 1.35rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
    color: var(--text-title);
}
.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.article-body li {
    margin-bottom: 0.5rem;
}
/* --- LIENS MODERNES (COULEUR PRIMAIRE PAR DÉFAUT) --- */
.article-body a {
    color: var(--primary-color); /* Couleur principale dès le départ */
    text-decoration: none;
    font-weight: 700;
    background-image: linear-gradient(
        var(--primary-color),
        var(--primary-color)
    );
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px; /* La barre est invisible au début */
    transition:
        background-size 0.3s ease,
        filter 0.3s ease;
}

.article-body a:hover {
    background-size: 100% 2px; /* La barre se déploie sur toute la largeur */
    /* On ajoute un petit effet de brillance ou de décalage si nécessaire */
    filter: brightness(1.2);
}

.theme-dark .article-body a {
    /* On peut éclaircir légèrement la couleur si la couleur primaire est trop sombre */
    filter: brightness(1.1);
}

.theme-dark .article-body a:hover {
    background-color: rgba(
        255,
        255,
        255,
        0.05
    ); /* Surlignage discret en dark */
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.article-body th {
    background-color: var(--bg-secondary);
    padding: 12px 15px;
    text-align: left;
    color: var(--text-title);
}
.article-body td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary-color);
    background-color: var(--bg-secondary);
    font-style: italic;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

/* --- AUTHOR BOX (DÉTAILLÉ) --- */
.author-box {
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-left: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.author-info {
    text-align: center;
}

.author-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.author-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-title);
}

.author-job {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.author-bio {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

@media (min-width: 640px) {
    .author-box {
        flex-direction: row;
        align-items: flex-start;
    }
    .author-info {
        text-align: left;
    }
}

/* --- FOOTER (DÉTAILLÉ) --- */
.site-footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .footer-grid {
        /* On définit 3 colonnes : 
           - La marque prend un peu plus de place (1.5fr)
           - Le sélecteur de thème au milieu (1fr)
           - Les informations à droite (1fr)
        */
        grid-template-columns: 1.5fr 1fr 1fr;
        align-items: start;
    }
}

.footer-brand h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-nav-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
    color: var(--text-title);
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
}

.footer-nav-list a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-nav-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- CATEGORIES & CARDS --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}
.article-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.card-image {
    position: relative; /* Indispensable pour que le badge se place par rapport à l'image */
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    background-color: var(--bg-secondary);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background-color: var(--secondary-color); /* Ta couleur principale */
    color: #ffffff;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    pointer-events: none; /* Le clic traverse le badge pour activer le lien de la carte */
}

/* On ajuste la méta (date) qui reste seule dans le contenu */
.card-top {
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end; /* Aligne la date à droite puisque la catégorie est sur l'image */
}

.card-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 500;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}
.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}
.article-card:hover .card-title {
    color: var(--secondary-color);
}

/* --- HERO & META --- */
.article-hero-header {
    max-width: 900px;
    margin: 0 0 1.5rem;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

@media (min-width: 1024px) {
    .article-meta {
        margin-bottom: 0rem;
    }
}

.meta-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.meta-info {
    display: flex;
    flex-direction: column;
}
.meta-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-title);
}
.meta-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-banner {
    width: 100%;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.article-banner img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

@media (min-width: 1024px) {
    .article-banner img {
        aspect-ratio: 21 / 9;
        max-height: 500px;
    }

    .article-banner {
        margin-bottom: 2rem;
    }
}

/* --- SELECTEUR DE THÈME ÉLÉGANT --- */
/* --- AJUSTEMENT DU SÉLECTEUR POUR LE MILIEU --- */
.footer-theme-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* On le centre horizontalement sur PC pour l'équilibre */
}

@media (min-width: 768px) {
    .footer-theme-selector {
        align-items: center; /* Centre le label et les boutons sur Desktop */
    }

    .footer-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Aligne les liens à droite sur Desktop */
        text-align: right;
    }
}

.selector-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* --- STYLE DU GROUPE DE BOUTONS --- */
.theme-switch-group {
    display: inline-flex; /* S'adapte à son contenu */
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 10px;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap; /* Évite que le texte "Sombre" passe à la ligne */
}

.theme-btn.active {
    background: var(--bg-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.theme-btn .icon {
    font-size: 0.9rem;
}

.theme-btn:hover:not(.active) {
    color: var(--text-title);
    background: rgba(0, 0, 0, 0.03);
}

/* Ajustement pour le mode sombre */
body.theme-dark .theme-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
    .footer-theme-selector {
        max-width: 100%; /* S'adapte sur mobile */
        align-items: center;
    }
}

/* --- PAGE AUTEUR --- */
.author-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Doit être IDENTIQUE au header-container */
}

main .author-page {
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 768px) {
    .author-page {
        padding: 0 40px; /* On aligne sur les paddings du header et de main */
    }
}

/* On ajuste aussi le hero de l'auteur pour qu'il ne flotte pas */
.author-hero {
    width: 100%;
    padding: 3rem 0;
    /* On peut ajouter une bordure basse discrète pour marquer la séparation */
}

.author-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .author-hero-content {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
}

.author-hero-avatar img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow-md);
}

.author-hero-text {
    flex: 1;
}

.author-page-title {
    font-size: 2.5rem;
    color: var(--text-title);
    margin-bottom: 0.5rem;
}

.author-bio-large {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-top: 1.5rem;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-title);
    margin-bottom: 2rem;
}

/* On réutilise tes styles de cards pour les articles de l'auteur */
.card-date {
    display: block;
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* --- STYLE DES LIENS AUTEUR AVEC SOULIGNEMENT AU SURVOL --- */

/* On cible les liens dans la meta et dans la box auteur */
.meta-author a,
.author-name a {
    text-decoration: none;
    color: var(--text-title);
    font-weight: 700;
    transition: color 0.2s ease;
    /* On prépare une bordure transparente pour éviter les sauts de pixels au survol */
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
}

.meta-author a:hover,
.author-name a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Optionnel : On peut aussi ajouter un curseur spécifique sur l'avatar */
.author-avatar a,
.meta-avatar-link {
    display: inline-block;
    cursor: pointer;
}

/* --- NAVIGATION ITEMS (Desktop) --- */
@media (min-width: 768px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 2rem; /* Espace entre chaque lien */
    }

    .nav-item {
        font-size: 0.95rem;
        text-decoration: none;
        font-weight: 600;
        color: var(--text-color);
        transition: color 0.3s ease;
        padding: 5px 0;
        position: relative;
    }

    /* État au survol */
    .nav-item:hover {
        color: var(--primary-color);
    }

    /* Optionnel : Petit indicateur de page active ou soulignement au survol */
    .nav-item::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: width 0.3s ease;
    }

    .nav-item:hover::after {
        width: 100%;
    }
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 767px) {
    .nav-item {
        font-size: 1.5rem; /* Plus gros sur mobile */
        font-weight: 700;
        color: var(--text-title);
        text-decoration: none;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.pagination-wrapper {
    margin-top: 60px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-link {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
/* --- CONFIGURATION DES SECTIONS (STRUCTURE) --- */

/* Conteneur standard pour aligner avec le header */
.container-1200 {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px; /* Padding mobile */
}

@media (min-width: 1025px) {
    .container-1200 {
        padding: 0 20px; /* Alignement parfait avec ton header iPad/Desktop */
    }
}

/* Espacement vertical entre les blocs de la home */
.split-section,
.recent-section {
    padding: 20px 0;
}

@media (max-width: 768px) {
    /* On réduit l'espacement vertical pour le mobile */
    .split-section,
    .recent-section {
        padding: 20px 0; /* Plus serré pour éviter les grands vides */
    }
}

/* --- BLOC HERO (PLEINE LARGEUR) --- */
.hero-block {
    position: relative;
    width: 100%;
    min-height: 500px;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

/* Remplacement du ::before par la vraie balise img */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Object-fit simule le background-size: cover */
    object-fit: cover;
    object-position: center;

    /* On garde ton effet de flou */
    filter: blur(2px);
    /* On garde le scale pour éviter les bords blancs du flou */
    transform: scale(1.05);

    z-index: 0;
    pointer-events: none; /* L'image ne doit pas intercepter les clics */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 40px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-text {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 2.8rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background-color: var(--primary-color);
    color: #ffffff !important;
    padding: 18px 38px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: none;
    cursor: pointer;
}

.btn-hero:hover {
    filter: brightness(0.85);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.btn-hero svg {
    stroke: #ffffff;
    transition: transform 0.3s ease;
}

.btn-hero:hover svg {
    transform: translateX(6px);
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .hero-block {
        padding: 80px 0;
        min-height: 500px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .btn-hero {
        width: 100%;
        justify-content: center;
    }
}
/* --- SECTION SPLIT OPTIMISÉE --- */
.split-section {
    width: 100%;
    padding: 80px 0;
    background-color: var(--split-bg); /* Utilise la variable */
    transition: background-color 0.3s ease;
}

.split-grid {
    display: flex;
    align-items: center;
    gap: 80px; /* Plus d'espace entre image et texte sur desktop */
}

/* Gestion de l'image */
.split-column-image img {
    display: block;
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px var(--split-shadow);
    /* En mode dark, on peut légèrement baisser la luminosité de l'image 
       pour qu'elle n'agresse pas les yeux */
    filter: brightness(0.9);
}

@media (prefers-color-scheme: dark) {
    .split-column-image img {
        filter: brightness(0.8); /* Un peu plus sombre en dark mode */
    }
}

.split-column-image img {
    width: 100%;
    height: 450px; /* Hauteur fixe pour cohérence si plusieurs blocs */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* Ombre douce */
    display: block;
}

.split-column-image {
    flex: 1; /* L'image prend un peu moins de 50% */
}

.split-column-text {
    flex: 1; /* Le texte prend plus de place (environ 60%) */
}

.split-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--split-title); /* Utilise la variable */
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Petit détail pro : une barre d'accentuation */
.split-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 15px;
}

.split-grid.is-reversed .split-title::after {
    /* Aligne la barre si besoin, ici on reste à gauche par défaut */
}

.split-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--split-text); /* Utilise la variable */
}

.split-description p {
    margin-bottom: 1.2rem;
}

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
    .split-grid {
        gap: 40px;
    }
    .split-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .split-section {
        padding: 20px 0; /* On réduit le padding comme convenu */
    }

    .split-grid,
    .split-grid.is-reversed {
        flex-direction: column !important;
        gap: 30px;
    }

    .split-column-image {
        width: 100%;
        margin-bottom: 20px; /* Espace avec le texte qui suit */
    }

    /* 2. On force l'image à 100% de son conteneur */
    .split-column-image img {
        width: 100% !important;
        height: 250px; /* Hauteur fixe pour éviter que l'image ne soit trop haute */
        object-fit: cover;
        border-radius: 8px; /* On garde tes arrondis cohérents */
        display: block;
    }

    .split-text-content {
        text-align: center;
    }

    .split-title {
        font-size: 1.6rem;
    }

    .split-title::after {
        margin: 15px auto 0; /* Centre la barre d'accent sur mobile */
    }
}

/* Sur très petit écran, on garde l'image mais on la simplifie */
@media (max-width: 480px) {
    .split-column-image img {
        height: 200px;
    }
}

/* --- BLOC RECENT (GRILLE) --- */
/* --- TITRE DE SECTION RÉPROPRIÉ --- */
.recent-section .section-title {
    /* Utilisation de clamp pour une transition douce entre mobile et desktop */
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .recent-section .section-title {
        /* On réduit l'espace sous le titre car 3rem (48px) c'est trop sur mobile */
        margin-bottom: 1.5rem;
        padding: 0 10px; /* Évite que le texte ne touche les bords si le titre est long */
    }
}

/* On s'assure que la grille d'articles est bien aérée */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* --- TITRE DE SECTION (RECENT) --- */
.recent-section .recent-title {
    font-size: clamp(1.8rem, 5vw, 2.2rem); /* Taille fluide */
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.2;
    margin-bottom: 3rem; /* On garde un peu d'espace pour la grille */
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre la barre d'accent */
}

/* La barre d'accentuation identique au split */
.recent-section .recent-title::after {
    content: "";
    display: block;
    width: 60px; /* Légèrement plus large car le titre est centré */
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 15px;
}

/* --- AJUSTEMENT MOBILE --- */
@media (max-width: 768px) {
    .recent-section .recent-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
        padding: 0 15px;
    }

    .recent-section .recent-title::after {
        width: 50px; /* On réduit un peu la barre sur mobile */
        margin-top: 12px;
    }
}

/* Navigation des sous-catégories */
.sub-nav-container {
    margin-top: 20px; /* Plus d'espace entre le titre/description et les boutons */
    margin-bottom: 20px;
}

.sub-nav-label {
    display: block;
    font-size: 0.85rem;
    color: #9ca3af; /* Gris doux pour ne pas voler la vedette aux boutons */
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sub-nav-grid {
    display: flex;
    gap: 15px; /* Plus d'espace entre les boutons */
    flex-wrap: wrap;
}

.sub-nav-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: transparent; /* Fond transparent */
    color: var(--primary-color); /* Couleur principale */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid var(--primary-color); /* Bordure couleur principale */
    border-radius: 6px; /* Rectangle légèrement arrondi */
    transition: all 0.25s ease;
}

.sub-nav-button:hover {
    background-color: var(--primary-color); /* Inversion au survol */
    color: #ffffff; /* Texte devient blanc */
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

/* Optimisations Mobile */
@media (max-width: 768px) {
    .sub-nav-container {
        margin-top: 30px; /* On réduit un peu l'espace supérieur */
        margin-bottom: 25px;
    }

    .sub-nav-grid {
        gap: 10px; /* Boutons plus serrés */
    }

    .sub-nav-button {
        padding: 8px 16px; /* Padding réduit pour gagner de la place */
        font-size: 0.85rem; /* Texte légèrement plus petit */
        border-width: 1.5px; /* Bordure un peu plus fine pour la finesse visuelle */
    }

    .sub-nav-label {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
}

.related-articles-section {
    margin-top: 0rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, #eee);
}
.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

/* ==========================================================================
   PAGES STANDARDS - MODERN BALANCED (Entre-deux)
   ========================================================================== */
/* ==========================================================================
   PAGES STANDARDS - MODERN BALANCED (Cleaned & Optimized)
   ========================================================================== */

.standard-page {
    max-width: 1200px;
    margin: 40px auto 80px;
    background-color: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px var(--split-shadow);
    overflow: hidden;
}

/* --- HEADER MODERNE --- */
.page-header {
    padding: 80px 40px;
    background: radial-gradient(
        circle at top left,
        var(--bg-secondary) 0%,
        var(--card-bg) 100%
    );
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}

/* Petit badge de catégorie au-dessus du titre pour le look "SaaS" */

.page-title {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 950; /* Ultra-black pour le contraste moderne */
    color: var(--text-title);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 auto;
    max-width: 900px;
}

/* --- OPTIMISATION DE LA LISIBILITÉ --- */
.page-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    font-size: 1.15rem;
    line-height: 1.85; /* Un chouïa plus d'espace */
    color: var(--text-color);
    letter-spacing: -0.01em;
    word-spacing: 0.02em;
}

/* Typographie & Titres */
.page-body h2 {
    font-size: 2rem;
    margin: 4.5rem 0 1.5rem;
    color: var(--text-title);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-body h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-title);
    font-weight: 700;
}

.page-body p {
    margin-bottom: 2rem;
}

.page-body strong {
    color: var(--text-title);
    font-weight: 800;
}

/* --- LISTES MODERNES --- */
.page-body ul,
.page-body ol {
    margin: 2.5rem 0;
    padding-left: 0;
    list-style: none;
}

.page-body li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
    display: block;
}

/* Puce Losange (Style Brico) */
.page-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transform: rotate(45deg);
}

/* Liste Ordonnée Numérotée */
.page-body ol {
    counter-reset: brico-counter;
}
.page-body ol li {
    counter-increment: brico-counter;
}
.page-body ol li::before {
    content: counter(brico-counter);
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 900;
    font-size: 0.85rem;
    background: rgba(230, 57, 70, 0.1);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    top: 0.2rem;
}

/* --- BLOCS & LIENS --- */
.page-body a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    padding: 0 4px;
    box-shadow: inset 0 -2px 0 var(--primary-color); /* Soulignement moderne */
    transition: all 0.2s ease;
}

.page-body a:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: inset 0 -20px 0 var(--primary-color);
}

.page-body blockquote {
    margin: 3.5rem 0;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    border-left: 8px solid var(--primary-color);
    font-style: italic;
    color: var(--text-title);
    font-size: 1.2rem;
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .standard-page {
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .page-header {
        padding: 60px 20px;
    }
    .page-body {
        padding: 40px 20px;
        font-size: 1.05rem;
    }
    .page-body h2 {
        font-size: 1.6rem;
        margin: 3rem 0 1.2rem;
    }
}

/* --- DARK MODE --- */
.theme-dark .page-header {
    background: radial-gradient(
        circle at top left,
        var(--bg-secondary) 0%,
        var(--bg-color) 100%
    );
}

.theme-dark .page-body {
    color: #cbd5e1;
}

.theme-dark .page-body strong {
    color: #ffffff;
}

.theme-dark .page-body blockquote {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Container de section */
.team-section {
    margin: 4rem auto;
    width: 100%;
}

.team-section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-title);
}

/* Grille forcée à 3 colonnes sur desktop */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 colonnes */
    gap: 30px; /* Plus d'espace entre les cartes pour aérer */
}

/* Tablette : 2 colonnes */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile : 1 colonne */
@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Container de section */
.team-section {
    margin: 3rem auto;
    width: 100%;
}

.team-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-title);
}

/* Grille forcée à 3 colonnes */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Espace modéré entre les cartes */
}

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

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Container de section */
.team-section {
    margin: 2.5rem auto;
    width: 100%;
}

.team-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 1.5rem 0; /* Uniquement de la marge en bas */
    text-align: center;
    color: var(--text-title);
}

/* Grille 3 colonnes desktop */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

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

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte resserrée */
.team-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 18px; /* Padding interne maîtrisé */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

/* Avatar */
.team-avatar {
    margin: 0 0 10px 0; /* Juste un peu d'espace sous l'image */
}

.team-avatar img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-secondary);
}

/* RESET TOTAL ET MARGES CHIRURGICALES */
.team-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-title);
    margin: 10px 0 !important; /* Suppression marge navigateur */
    line-height: 1.1;
}

.team-job {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 2px 0 10px 0 !important; /* Collé au nom */
    line-height: 1;
}

.team-bio {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.4;
    margin: 20px 0 20px 0 !important; /* Marge précise au dessus et dessous */
    flex-grow: 1;
}

/* Bouton Hero compact */
.team-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #ffffff !important;
    padding: 14px 15px; /* Plus compact verticalement */
    width: 100%;
    border-radius: 4px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin: 0 !important;
}
/* --- Bloc de Partage Social (Titre à gauche) --- */
.share-box {
    display: flex;
    align-items: center; /* Aligne verticalement le texte et les boutons */
    gap: 20px;
    padding: 25px 0;
    margin: 40px 0 0 0;
    border-top: 0px solid var(--border-color, #eee);
}

.theme-dark .share-box {
    border-color: rgba(255, 255, 255, 0.1);
}

.share-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color);
    opacity: 0.9;
    white-space: nowrap; /* Empêche le texte de sauter à la ligne */
}

.share-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Base des boutons colorés */
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-facebook {
    background-color: #0d65d9;
}
.btn-x {
    background-color: #000000;
}
.btn-linkedin {
    background-color: #08529c;
}

/* Animation au survol */
.btn-share:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.15);
}

.btn-share svg {
    display: block;
}

/* Responsive : on empile sur mobile pour éviter l'écrasement */
@media (max-width: 600px) {
    .share-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.author-socials {
    margin-top: 30px;
}

.ql-editor img {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ql-editor img:hover {
    outline: 4px solid #4f46e5; /* Contour indigo au survol */
    outline-offset: -4px;
    opacity: 0.9;
}

/* --- MENU BURGER --- */

/* --- 1. HEADER & NAVIGATION DESKTOP --- */
.site-header {
    width: 100%;
    background: var(--bg-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.desktop-nav {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
        gap: 1.5rem;
    }
    .nav-item {
        text-decoration: none !important;
        color: var(--text-color);
        font-weight: 600;
        font-size: 0.9rem;
    }
}

/* --- 2. BOUTON "MENU" + BURGER (CORRIGÉ) --- */
.menu-toggle {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    align-items: center !important;
    gap: 12px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0;
    margin: 0;
    text-decoration: none !important;
}

/* Suppression du trait rouge parasite */
.menu-toggle::before,
.menu-toggle::after,
.menu-label::before,
.menu-label::after {
    display: none !important;
    content: none !important;
}

.menu-label {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none !important;
    border: none !important;
    line-height: 1; /* Centre verticalement par rapport aux barres */
}

.burger-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 24px;
    /* On s'assure que l'icône ne chevauche rien */
    flex-shrink: 0;
}

.burger-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation Burger vers X */
.menu-toggle.active .burger-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle.active .burger-icon span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .burger-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- 3. LE DRAWER (TIROIR) --- */
.menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 2000;
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 2rem;
    overflow-y: auto;
}

.menu-drawer.is-active {
    right: 0;
}

@media (min-width: 1024px) {
    .menu-drawer {
        width: 450px;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.1);
    }
}

/* --- 4. LA GROSSE CROIX --- */
.drawer-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.close-cross-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cross-btn span {
    position: absolute;
    width: 32px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 4px;
}

.close-cross-btn span:nth-child(1) {
    transform: rotate(45deg);
}
.close-cross-btn span:nth-child(2) {
    transform: rotate(-45deg);
}

/* --- 5. ITEMS DU MENU --- */
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drawer-item {
    text-decoration: none !important;
    color: var(--text-color);
}

.drawer-item.parent {
    font-size: 1.7rem;
    font-weight: 900;
}

.drawer-children {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-left: 1.2rem;
    border-left: 3px solid var(--primary-color);
}

.drawer-item.child {
    font-size: 1.1rem;
    opacity: 0.7;
}
