/* Feuille publique concaténée, dans l'ordre des sources. Pas d'étape de build :
   modifier la source, puis reporter le même ordre ici. */

/* --- combined-fixes.css --- */
/* 
 * FICHIER CSS COMBINÉ - Optimisations Watts Else?
 * Combine: mobile-text-fix.css + word-wrap-fix.css + image-optimizations.css
 * Objectif: Réduire les requêtes HTTP de 7 à 5 fichiers CSS
 */

/* ========================================
 * MOBILE TEXT FIXES
 * ======================================== */

/* Styles pour corriger l'affichage du texte sur mobile */

/* Styles globaux pour les extraits */
.excerpt-text {
    height: auto !important;
    min-height: 3em !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    -webkit-hyphens: auto !important;
    -moz-hyphens: auto !important;
    -ms-hyphens: auto !important;
    hyphens: auto !important;
}

/* Styles spécifiques pour les extraits de BD sur mobile - CORRIGÉ */
@media (max-width: 767px) {
    /* On permet le line-clamp tout en assurant que le texte n'est pas coupé bizarrement */
    .excerpt-text {
        white-space: normal !important;
        /* Rétablissement du comportement standard pour permettre le line-clamp si appliqué via une autre classe */
        word-wrap: break-word !important;
        word-break: break-word !important;
        -webkit-hyphens: auto !important;
        -moz-hyphens: auto !important;
        -ms-hyphens: auto !important;
        hyphens: auto !important;
    }
    
    /* Assurer que les conteneurs ont une hauteur suffisante */
    .comic-item .p-4,
    .comic-slide .p-4 {
        height: auto !important;
        min-height: 0 !important;
        padding-bottom: 15px !important;
    }
    
    /* Styles pour le contenu des BD */
    .post-content.prose,
    .prose.prose-lg.prose-turquoise {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.5rem !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        text-align: left !important;
    }
}

/* ========================================
 * WORD WRAP FIXES
 * ======================================== */

/* Solution pour éviter que les mots soient coupés en fin de ligne */

/* Appliquer à tous les extraits de texte */
.excerpt-text,
.full-text,
.text-gray,
.comic-item .text-gray,
.comic-slide .text-gray {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: normal !important; /* Empêche de couper les mots au milieu */
    white-space: normal !important;
    -webkit-hyphens: none !important;
    -moz-hyphens: none !important;
    -ms-hyphens: none !important;
    hyphens: none !important; /* Désactive les césures automatiques */
}

/* Styles spécifiques pour mobile */
@media (max-width: 767px) {
    /* Assurer que le texte s'affiche correctement sur mobile */
    .excerpt-text,
    .full-text,
    .text-gray,
    .comic-item .text-gray,
    .comic-slide .text-gray {
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: normal !important;
        white-space: normal !important;
        -webkit-hyphens: none !important;
        -moz-hyphens: none !important;
        -ms-hyphens: none !important;
        hyphens: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
    
    /* Assurer que les conteneurs ont une hauteur suffisante */
    .comic-item,
    .comic-slide,
    .comic-item .p-4,
    .comic-slide .p-4 {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* ========================================
 * IMAGE OPTIMIZATIONS
 * ======================================== */

/* 
 * Optimisations CSS pour les images - Watts Else?
 * Inclut:
 * - Chargement progressif (lazy loading)
 * - Placeholders pendant le chargement
 * - Transitions fluides
 * - Support pour les images responsives
 */

/* Conteneur d'image avec effet de chargement progressif */
.lazy-image-container {
    position: relative;
    overflow: hidden;
    background-color: var(--panel);
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 par défaut */
}

/* Pour les images carrées (logos, avatars) */
.lazy-image-container.square {
    padding-bottom: 100%; /* Ratio 1:1 */
}

/* Pour les images de portrait */
.lazy-image-container.portrait {
    padding-bottom: 150%; /* Ratio 2:3 */
}

/* Image avec chargement progressif */
.lazy-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Couvre tout le conteneur */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
    filter: blur(5px);
}

/* Image chargée */
.lazy-image.loaded {
    opacity: 1;
    filter: blur(0);
}

/* Placeholder pendant le chargement */
.lazy-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0E8C84;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animation de rotation pour le placeholder */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Optimisations pour les images de BD */
.comic-container img,
.comic-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Corrections spécifiques pour le blog */
.blog-post-image,
.post-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive images */
@media (max-width: 768px) {
    .lazy-image-container {
        padding-bottom: 60%; /* Ratio légèrement différent sur mobile */
    }
    
    .comic-container img,
    .comic-image {
        border-radius: 4px;
    }
}

/* Optimisations pour les performances */
img {
    loading: lazy; /* Lazy loading natif */
    decoding: async; /* Décodage asynchrone */
}

/* Support pour les images WebP avec fallback */
.webp .lazy-image {
    background-image: var(--webp-image);
}

.no-webp .lazy-image {
    background-image: var(--fallback-image);
}

/* --- line-clamp-fix.css --- */
/* 
 * LINE CLAMP FIX - Watts Else?
 * Fixes text overlap issues on desktop and mobile
 * Ensures proper text truncation with ellipsis
 */

/* Global line-clamp utilities */
.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* Fix for blog cards */
.comic-container .line-clamp-2,
.comic-container .line-clamp-3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
}

/* Fix for podcast cards */
.podcast-card .line-clamp-1,
.podcast-card .line-clamp-3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
}

/* Ensure parent containers have proper height */
.comic-container .p-6,
.podcast-card .p-6 {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Ensure flex-grow elements don't cause overflow */
.comic-container .flex-grow,
.podcast-card .flex-grow {
    min-height: 0;
    overflow: hidden;
}

/* Desktop specific fixes */
@media (min-width: 768px) {
    /* Blog page cards */
    .comic-container h3.line-clamp-2 {
        max-height: 3.6em; /* 2 lines * 1.8em line-height */
        line-height: 1.8;
    }
    
    .comic-container p.line-clamp-3 {
        max-height: 4.5em; /* 3 lines * 1.5em line-height */
        line-height: 1.5;
    }
    
    /* Podcast page cards */
    .podcast-card h3.line-clamp-1 {
        max-height: 1.8em;
        line-height: 1.8;
    }
    
    .podcast-card p.line-clamp-3 {
        max-height: 4.2em; /* 3 lines * 1.4em line-height */
        line-height: 1.4;
    }
}

/* Mobile specific fixes */
@media (max-width: 767px) {
    /* Maintain line-clamp on mobile but with proper constraints */
    .line-clamp-1,
    .line-clamp-2,
    .line-clamp-3 {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Fix for episode items in podcast player */
.episode-item h5 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Fix for current episode excerpt */
#current-episode-excerpt.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 3em;
    line-height: 1.5;
}

/* --- featured-snippets.css --- */
/* 
 * Styles pour les featured snippets et les balises meta optimisées - Watts Else?
 */

/* Styles de base pour tous les featured snippets */
.featured-snippet {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.featured-snippet::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #0E8C84; /* Turquoise foncé */
}

.featured-snippet h2,
.featured-snippet h3 {
    margin-top: 0;
    color: var(--teal); /* Turquoise foncé */
    font-weight: 600;
}

/* Styles spécifiques pour les snippets de définition */
.definition-snippet {
    background-color: var(--bg);
}

.definition-snippet::before {
    background-color: #0E8C84; /* Turquoise foncé */
}

.definition-snippet p {
    font-size: 1.1em;
    line-height: 1.6;
}

.definition-snippet p:first-of-type {
    font-weight: 500;
}

/* Styles spécifiques pour les snippets de liste */
.list-snippet {
    background-color: var(--bg);
}

.list-snippet::before {
    background-color: #00A878; /* Vert */
}

.featured-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.featured-list li {
    margin-bottom: 0.75rem;
    position: relative;
}

.featured-list li::marker {
    color: var(--teal); /* Vert */
    font-weight: bold;
}

/* Styles spécifiques pour les snippets d'étapes */
.steps-snippet {
    background-color: var(--bg);
}

.steps-snippet::before {
    background-color: #FFC857; /* Jaune électrique */
}

.featured-steps {
    counter-reset: step-counter;
    list-style-type: none;
    margin: 1rem 0;
    padding-left: 0;
}

.featured-steps li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
}

.featured-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background-color: #FFC857; /* Jaune électrique */
    color: var(--ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Styles spécifiques pour les snippets de tableau */
.table-snippet {
    background-color: var(--bg);
}

.table-snippet::before {
    background-color: #6C63FF; /* Violet */
}

.featured-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.featured-table th {
    background-color: #6C63FF; /* Violet */
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
}

.featured-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--line2);
}

.featured-table tr:nth-child(even) {
    background-color: var(--bg);
}

/* Styles spécifiques pour les snippets de FAQ */
.faq-snippet {
    background-color: var(--bg);
}

.faq-snippet::before {
    background-color: #9C27B0; /* Violet foncé */
}

.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line2);
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.faq-question {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
    font-weight: 600;
    position: relative;
    padding-left: 1.75rem;
}

.faq-question::before {
    content: "Q:";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--teal); /* Violet foncé */
    font-weight: bold;
}

.faq-answer {
    position: relative;
    padding-left: 1.75rem;
}

.faq-answer::before {
    content: "R:";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--teal); /* Vert */
    font-weight: bold;
}

/* Styles responsifs */
@media (max-width: 768px) {
    .featured-snippet {
        padding: 1.25rem;
    }
    
    .featured-steps li {
        padding-left: 2rem;
    }
    
    .featured-steps li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.9rem;
    }
    
    .faq-question,
    .faq-answer {
        padding-left: 1.5rem;
    }
}

/* Animation pour attirer l'attention sur les featured snippets */
@keyframes highlight-snippet {
    0% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    50% {
        box-shadow: 0 4px 12px rgba(14, 140, 132, 0.2);
    }
    100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
}

.featured-snippet:hover {
    animation: highlight-snippet 2s ease-in-out;
}

/* Styles pour les balises meta dans la console */
.meta-tags-debug {
    background-color: var(--bg);
    border: 1px solid var(--line2);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-x: auto;
}

.meta-tag-item {
    margin-bottom: 0.5rem;
    display: flex;
}

.meta-tag-name {
    font-weight: bold;
    color: var(--teal); /* Turquoise foncé */
    min-width: 150px;
}

.meta-tag-value {
    color: var(--ink);
}

/* --- menu-hot-badge.css --- */
/* Styles pour le badge HOT et les effets BD dans le menu */

.nav-link.relative {
    overflow: visible !important;
}

/* Animation du badge HOT */
@keyframes hot-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(12deg) translateY(0);
    }
    40% {
        transform: rotate(12deg) translateY(-3px);
    }
    60% {
        transform: rotate(12deg) translateY(-2px);
    }
}

.nav-link:hover .animate-pulse {
    animation: hot-bounce 1s ease-in-out infinite;
}

/* Effet bulle BD supprimé pour éviter les bugs */

/* Badge English plus visible */
.nav-link .w-6.h-4 {
    transition: all 0.2s ease;
}

.nav-link:hover .w-6.h-4 {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}

/* --- language-switch.css --- */
/* Styles pour le switch de langue FR/EN */

.language-switch {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.language-switch:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Animation pour les drapeaux */
.language-switch .flag-emoji {
    transition: transform 0.2s ease;
}

.language-switch:hover .flag-emoji {
    transform: scale(1.1);
}

/* Effet de pulsation pour "Coming soon" */
@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.coming-soon-text {
    animation: gentle-pulse 2s ease-in-out infinite;
}

/* Style pour les phrases d'humour */
.humor-text {
    font-family: 'Georgia', serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Effet hover pour le bouton EN */
.en-button:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Effet hover pour le bouton FR */
.fr-button:hover {
    background: linear-gradient(135deg, #0B6E68 0%, #0E8C84 100%);
}

/* --- section-themes.css --- */
/* ==========================================================================
   SECTION THEMES - Watts Else?
   Distinction visuelle entre Fun/BD et Outils/Tech
   ========================================================================== */

/* --------------------------------------------------------------------------
   THÈME FUN/BD - Couleurs chaudes, ambiance créative
   Sections: BD, Podcasts, Tomes, À propos, Personnages
   -------------------------------------------------------------------------- */

/* Indicateur de section dans la sidebar */
body[data-section="fun"] .modern-sidebar {
    border-right: 3px solid #F2C300;
}

body[data-section="fun"] .modern-sidebar .nav-section-title {
    color: #78716c;
    font-weight: 600;
}

/* Sidebar - Section Découvrir mise en évidence */
/* Mise en évidence permanente de la section Fun (bandeau jaune) */
.modern-sidebar .nav-section-fun {
    background: linear-gradient(135deg, rgba(242, 195, 0, 0.12) 0%, rgba(251, 191, 36, 0.06) 100%);
    border-radius: 12px;
    margin: 0.5rem;
    padding: 0.5rem;
    border-left: 3px solid #F2C300;
    transition: all 0.3s ease;
}

/* Renforcement quand on est dans une page Fun */
body[data-section="fun"] .modern-sidebar .nav-section-fun {
    background: linear-gradient(135deg, rgba(242, 195, 0, 0.18) 0%, rgba(251, 191, 36, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(242, 195, 0, 0.15);
}

/* Header glow renforcé pour Fun */
body[data-section="fun"] .unified-header .glow {
    opacity: 0.4;
}

/* Fond principal avec touche artistique subtile */
body[data-section="fun"] main {
    background: transparent;
}

/* Accent de couleur pour les éléments interactifs */
body[data-section="fun"] .floating-stat:hover {
    border-color: rgba(242, 195, 0, 0.4);
}

body[data-section="fun"] a:not(.nav-link):hover {
    color: var(--sig);
}

/* Badge de section Fun - DÉSACTIVÉ (trop visible)
body[data-section="fun"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F2C300 0%, #F59E0B 50%, #F2C300 100%);
    z-index: 1000;
    animation: funGlow 3s ease-in-out infinite;
}

@keyframes funGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

Mobile: pas de barre sur le bord gauche
@media (max-width: 768px) {
    body[data-section="fun"]::before {
        left: 0;
    }
}
*/

/* --------------------------------------------------------------------------
   THÈME TECH/OUTILS - Couleurs froides, ambiance professionnelle
   Sections: Tirelire Verte, Technothèque, Réglementation, CEE, Veille, Entreprises
   -------------------------------------------------------------------------- */

/* Indicateur de section dans la sidebar */
body[data-section="tech"] .modern-sidebar {
    border-right: 3px solid #0E8C84;
}

body[data-section="tech"] .modern-sidebar .nav-section-title {
    color: #159D91;
}

/* Sidebar - Section Ressources mise en évidence */
/* Mise en évidence permanente de la section Tech */
.modern-sidebar .nav-section-tech {
    background: linear-gradient(135deg, rgba(14, 140, 132, 0.1) 0%, rgba(21, 157, 145, 0.05) 100%);
    border-radius: 12px;
    margin: 0.5rem;
    padding: 0.5rem;
    border-left: 3px solid #0E8C84;
    transition: all 0.3s ease;
}

/* Renforcement quand on est dans une page Tech */
body[data-section="tech"] .modern-sidebar .nav-section-tech {
    background: linear-gradient(135deg, rgba(14, 140, 132, 0.15) 0%, rgba(21, 157, 145, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(14, 140, 132, 0.15);
}

/* Sidebar - Section Espace Pro mise en évidence */
/* Mise en évidence permanente de la section Pro */
.modern-sidebar .nav-section-tech-pro {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
    border-radius: 12px;
    margin: 0.5rem;
    padding: 0.5rem;
    border-left: 3px solid #8B5CF6;
    transition: all 0.3s ease;
}

/* Renforcement quand on est dans une page Tech */
body[data-section="tech"] .modern-sidebar .nav-section-tech-pro {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

/* Fond principal avec touche data/professionnelle */
body[data-section="tech"] main {
    background: transparent;
}

/* Header glow subtil pour Tech */
body[data-section="tech"] .unified-header .glow {
    opacity: 0.35;
}

/* Pattern de grille subtil pour les pages Tech */
body[data-section="tech"] main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(14, 140, 132, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 140, 132, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Accent de couleur pour les éléments interactifs */
body[data-section="tech"] .floating-stat:hover {
    border-color: rgba(14, 140, 132, 0.4);
}

body[data-section="tech"] a:not(.nav-link):hover {
    color: var(--teal);
}

/* Badge de section Tech */
body[data-section="tech"]::after {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0E8C84 0%, #159D91 50%, #0E8C84 100%);
    z-index: 1000;
}

/* Mobile: ajustement */
@media (max-width: 768px) {
    body[data-section="tech"]::after {
        left: 0;
    }

    body[data-section="tech"] main::before {
        left: 0;
    }
}

/* --------------------------------------------------------------------------
   INDICATEURS DE SECTION DANS LA SIDEBAR
   -------------------------------------------------------------------------- */

/* Indicateur visuel actif pour la section Fun */
body[data-section="fun"] .nav-link.active {
    background: linear-gradient(135deg, rgba(242, 195, 0, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-left: 3px solid #F2C300;
    color: #92400e !important; /* Texte marron foncé pour contraste sur fond jaune clair */
}

body[data-section="fun"] .nav-link.active .nav-icon-ph,
body[data-section="fun"] .nav-link.active .nav-icon-ph-small {
    color: #b45309 !important; /* Ambre foncé pour bon contraste sur fond jaune clair */
}

body[data-section="fun"] .nav-link.active .nav-text {
    color: #92400e !important; /* Texte marron foncé */
}

/* Indicateur visuel actif pour la section Tech */
body[data-section="tech"] .nav-link.active {
    background: linear-gradient(135deg, rgba(14, 140, 132, 0.15) 0%, rgba(21, 157, 145, 0.1) 100%);
    border-left: 3px solid #0E8C84;
    color: #134e4a !important; /* Texte turquoise très foncé pour contraste sur fond turquoise clair */
}

body[data-section="tech"] .nav-link.active .nav-icon-ph,
body[data-section="tech"] .nav-link.active .nav-icon-ph-small {
    color: #0E8C84 !important; /* Teal pour bon contraste sur fond teal clair */
}

body[data-section="tech"] .nav-link.active .nav-text {
    color: #134e4a !important; /* Texte turquoise très foncé */
}

/* Focus states pour les sections avec fond clair */
body[data-section="fun"] .nav-link.active:focus {
    outline: 2px solid #b45309 !important; /* Outline ambre pour contraste sur fond jaune */
    outline-offset: 2px;
}

body[data-section="tech"] .nav-link.active:focus {
    outline: 2px solid #0E8C84 !important; /* Outline teal pour contraste sur fond teal clair */
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   BADGES DE SECTION FLOTTANTS (optionnel)
   -------------------------------------------------------------------------- */

/* Badge Fun en haut à droite de la page */
body[data-section="fun"] .section-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #F2C300 0%, #F59E0B 100%);
    color: #1e293b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(242, 195, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
}

body[data-section="fun"] .section-badge::before {
    content: '⚡';
}

/* Badge Tech en haut à droite de la page */
body[data-section="tech"] .section-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #0E8C84 0%, #159D91 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(14, 140, 132, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
}

body[data-section="tech"] .section-badge::before {
    content: '🔧';
}

/* Cacher les badges sur mobile */
@media (max-width: 1024px) {
    body[data-section="fun"] .section-badge,
    body[data-section="tech"] .section-badge {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   TRANSITIONS DOUCES
   -------------------------------------------------------------------------- */

.modern-sidebar,
.modern-sidebar .nav-section,
.modern-sidebar .nav-link,
main,
.site-main {
    transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   ÉTATS SPÉCIAUX
   -------------------------------------------------------------------------- */

/* Page d'accueil - Neutre, pas de thème */
body[data-section="home"] .modern-sidebar {
    border-right: none;
}

body[data-section="home"]::before,
body[data-section="home"]::after {
    display: none;
}

/* --------------------------------------------------------------------------
   INDICATEURS DE SECTION DANS LES TITRES DE SIDEBAR
   -------------------------------------------------------------------------- */

/* Indicateur de base (petit point coloré) */
.section-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Indicateur Fun - Jaune/Orange */
.section-indicator-fun {
    background: linear-gradient(135deg, #F2C300 0%, #F59E0B 100%);
    box-shadow: 0 0 0 2px rgba(242, 195, 0, 0.2);
}

/* Indicateur Tech - Turquoise */
.section-indicator-tech {
    background: linear-gradient(135deg, #0E8C84 0%, #159D91 100%);
    box-shadow: 0 0 0 2px rgba(14, 140, 132, 0.2);
}

/* Indicateur Pro - Violet */
.section-indicator-pro {
    background: linear-gradient(135deg, #8B5CF6 0%, #a78bfa 100%);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Animation des indicateurs quand la section est active */
body[data-section="fun"] .section-indicator-fun {
    opacity: 1;
    animation: pulseIndicator 2s ease-in-out infinite;
}

body[data-section="tech"] .section-indicator-tech,
body[data-section="tech"] .section-indicator-pro {
    opacity: 1;
    animation: pulseIndicator 2s ease-in-out infinite;
}

@keyframes pulseIndicator {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    }
}

/* --------------------------------------------------------------------------
   COULEURS DE SECTION PAR GLOW (rappel des couleurs disponibles)
   -------------------------------------------------------------------------- */

/* Fun/BD */
.section-fun .glow { background: #F2C300; } /* Jaune */

/* Tech/Outils - par sous-section */
.section-tech-finance .glow { background: #10B981; } /* Vert - Tirelire */
.section-tech-regulation .glow { background: #F59E0B; } /* Orange - Réglementation */
.section-tech-directory .glow { background: #06B6D4; } /* Cyan - Annuaire */
.section-tech-cee .glow { background: #8B5CF6; } /* Violet - CEE */
.section-tech-guides .glow { background: #3B82F6; } /* Bleu - Technothèque */
.section-tech-veille .glow { background: #EC4899; } /* Rose - Veille */

/* --------------------------------------------------------------------------
   RESPONSIVE - AJUSTEMENTS MOBILES
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    /* Pas de barre fixe sur le bord supérieur sur mobile */
    body[data-section="fun"]::before,
    body[data-section="tech"]::after {
        height: 2px;
    }

    /* Pattern de grille plus subtil sur mobile */
    body[data-section="tech"] main::before {
        background-size: 30px 30px;
        opacity: 0.5;
    }

    /* Indicateurs de section plus petits sur mobile */
    .section-indicator {
        width: 6px;
        height: 6px;
        margin-right: 6px;
    }
}
