/* ==========================================================================
   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 #FFD500;
}

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(255, 213, 0, 0.12) 0%, rgba(251, 191, 36, 0.06) 100%);
    border-radius: 12px;
    margin: 0.5rem;
    padding: 0.5rem;
    border-left: 3px solid #FFD500;
    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(255, 213, 0, 0.18) 0%, rgba(251, 191, 36, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(255, 213, 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: linear-gradient(180deg,
        rgba(255, 251, 235, 0.3) 0%,
        rgba(254, 249, 195, 0.1) 50%,
        transparent 100%
    );
}

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

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

/* 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, #FFD500 0%, #F59E0B 50%, #FFD500 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 #0d9488;
}

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

/* Sidebar - Section Ressources mise en évidence */
/* Mise en évidence permanente de la section Tech */
.modern-sidebar .nav-section-tech {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(20, 184, 166, 0.05) 100%);
    border-radius: 12px;
    margin: 0.5rem;
    padding: 0.5rem;
    border-left: 3px solid #0d9488;
    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(13, 148, 136, 0.15) 0%, rgba(20, 184, 166, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 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: linear-gradient(180deg,
        rgba(240, 253, 250, 0.5) 0%,
        rgba(204, 251, 241, 0.15) 30%,
        transparent 100%
    );
}

/* 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(13, 148, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 148, 136, 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(13, 148, 136, 0.4);
}

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

/* Badge de section Tech */
body[data-section="tech"]::after {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 50%, #0d9488 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(255, 213, 0, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
    border-left: 3px solid #FFD500;
    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(13, 148, 136, 0.15) 0%, rgba(20, 184, 166, 0.1) 100%);
    border-left: 3px solid #0d9488;
    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: #0d9488 !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 #0d9488 !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, #FFD500 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(255, 213, 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, #0d9488 0%, #14b8a6 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(13, 148, 136, 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 {
    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, #FFD500 0%, #F59E0B 100%);
    box-shadow: 0 0 0 2px rgba(255, 213, 0, 0.2);
}

/* Indicateur Tech - Turquoise */
.section-indicator-tech {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 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: #FFD500; } /* 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;
    }
}
