/**
 * ============================================================================
 * Header Uniforme - Barre de Navigation
 * ============================================================================
 *
 * @projet     Province de Zagora - Plateforme Territoriale Integree
 * @fichier    header-uniforme.css
 *
 * @description
 * Garantit un header identique sur toutes les pages :
 *   - Barre fixe en haut (sticky, 70px)
 *   - Logo + titre a gauche, navigation + user a droite
 *   - Fond degrade sombre (#1a1a2e → #16213e)
 *   - Specificite maximale (html body .class + !important)
 *     pour surcharger les styles inline des differentes pages
 *
 * @utilise_par  Toutes les pages sauf login.html et index.html
 * ============================================================================
 */

html body .main-header {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    padding: 0.75rem 2rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #334155 !important;
    z-index: 1001 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    height: 70px !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
}

/* Section Gauche - Identification */
html body .main-header .header-left {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

html body .main-header .province-identity {
    display: flex !important;
    flex-direction: column !important;
}

html body .main-header .province-name,
html body .main-header h1.province-name {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: white !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

html body .main-header .province-region,
html body .main-header span.province-region {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 0.8rem !important;
    color: rgba(255,255,255,0.6) !important;
    margin-top: 2px !important;
}

/* Section Centre - Statistiques */
html body .main-header .header-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
}

html body .main-header .header-stats {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
}

html body .main-header .header-stat {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    text-align: center !important;
    padding: 0.5rem 1rem !important;
    background: rgba(255,255,255,0.05) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: default !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 80px !important;
}

html body .main-header .header-stat::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent) !important;
    transition: left 0.5s ease !important;
}

html body .main-header .header-stat:hover::before {
    left: 100% !important;
}

html body .main-header .header-stat:hover {
    transform: translateY(-3px) scale(1.05) !important;
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(249,115,22,0.5) !important;
    box-shadow: 0 8px 25px rgba(249,115,22,0.2) !important;
}

html body .main-header .header-stat-value,
html body .main-header .header-stat .header-stat-value,
html body .main-header div.header-stat-value {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #f97316 !important;
    transition: transform 0.3s ease !important;
    line-height: 1.2 !important;
}

html body .main-header .header-stat:hover .header-stat-value {
    transform: scale(1.1) !important;
}

html body .main-header .header-stat-label,
html body .main-header .header-stat .header-stat-label,
html body .main-header div.header-stat-label {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-size: 0.7rem !important;
    color: rgba(255,255,255,0.7) !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease !important;
    line-height: 1.3 !important;
}

html body .main-header .header-stat:hover .header-stat-label {
    color: rgba(255,255,255,0.9) !important;
}

/* Section Droite - Navigation */
html body .main-header .header-nav {
    display: flex !important;
    gap: 0.5rem !important;
}

html body .main-header .nav-btn,
html body .main-header a.nav-btn,
html body .main-header .header-nav .nav-btn {
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    width: 180px !important;
    height: 48px !important;
    padding: 0 1rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none !important;
    background: rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.8) !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
}

html body .main-header .nav-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent) !important;
    transition: left 0.5s ease !important;
}

html body .main-header .nav-btn:hover::before {
    left: 100% !important;
}

html body .main-header .nav-btn i {
    transition: transform 0.3s ease !important;
}

html body .main-header .nav-btn:hover i {
    transform: scale(1.2) rotate(-5deg) !important;
}

html body .main-header .nav-btn:hover {
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4) !important;
}

/* Bouton Carte - Vert */
html body .main-header .nav-btn.btn-carte {
    background: #10b981 !important;
    color: white !important;
}
html body .main-header .nav-btn.btn-carte:hover {
    background: #059669 !important;
}
html body .main-header .nav-btn.btn-carte.active {
    background: #047857 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
}

/* Bouton Dashboard - Bleu */
html body .main-header .nav-btn.btn-dashboard {
    background: #3b82f6 !important;
    color: white !important;
}
html body .main-header .nav-btn.btn-dashboard:hover {
    background: #2563eb !important;
}
html body .main-header .nav-btn.btn-dashboard.active {
    background: #1d4ed8 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4) !important;
}

/* Bouton RGPH - Orange */
html body .main-header .nav-btn.btn-rgph {
    background: #f97316 !important;
    color: white !important;
}
html body .main-header .nav-btn.btn-rgph:hover {
    background: #ea580c !important;
}
html body .main-header .nav-btn.btn-rgph.active {
    background: #c2410c !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4) !important;
}

/* Bouton Presentation - Violet */
html body .main-header .nav-btn.btn-presentation {
    background: #8b5cf6 !important;
    color: white !important;
}
html body .main-header .nav-btn.btn-presentation:hover {
    background: #7c3aed !important;
}
html body .main-header .nav-btn.btn-presentation.active {
    background: #6d28d9 !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
}

/* Responsive */
@media (max-width: 768px) {
    html body .main-header .header-stats {
        display: none !important;
    }
    html body .main-header .province-name,
    html body .main-header h1.province-name {
        font-size: 1.1rem !important;
    }
    html body .main-header .nav-btn,
    html body .main-header a.nav-btn {
        width: auto !important;
        padding: 0 0.75rem !important;
        font-size: 0.8rem !important;
    }
}
