/* ============================================
   VigiFeu - Premium Forest Fire Monitoring
   Styles CSS Modernes avec Glassmorphism Amélioré
   ============================================ */

/* ===== Variables CSS ===== */
:root {
    --bg-primary: #080b12;
    --bg-sidebar: #0d121c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --color-red: #ff3344;
    --color-orange: #ff9f00;
    --color-green: #20d86c;
    --color-blue: #3b82f6;
    --color-purple: #b065f5;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.45);
    
    --border-radius: 24px;
    --header-height: 72px;
    --sidebar-width: 340px;
    
    --glass-blur: blur(24px);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 24px rgba(102, 126, 234, 0.4);
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: var(--header-height);
    position: relative;
}

/* Ambiance d'arrière-plan */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    animation: drift 20s infinite alternate linear;
}
.glow-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--color-blue);
}
.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--color-red);
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 24px;
    background: rgba(8, 11, 18, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--header-height);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.8rem;
    animation: flame-pulse 2s ease-in-out infinite;
}

@keyframes flame-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(255, 77, 79, 0.5)); }
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 51, 68, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 51, 68, 0.3);
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.2);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--color-red);
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px var(--color-red);
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-normal);
}

.search-container:focus-within {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.search-trigger {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
    transition: var(--transition-fast);
}

.search-trigger:hover {
    color: var(--text-primary);
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.header-btn:active {
    transform: translateY(0);
}

.header-btn.spinning svg {
    animation: header-btn-spin 0.8s linear infinite;
}

@keyframes header-btn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-btn {
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
    border: none;
    color: white;
}

.clock {
    padding: 10px 18px;
    background: var(--bg-card);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 80px 24px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

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

.hero-text {
    max-width: 650px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff3344, #ff9f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, #ff3344, #ff6b6b);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 51, 68, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 51, 68, 0.45);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ===== Content Sections ===== */
.content-section {
    padding: 80px 28px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.content-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-soft);
}

.content-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.content-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.content-list li {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    align-items: center;
}
.content-list li::before {
    content: "•";
    color: var(--color-blue);
    font-size: 1.5rem;
    margin-right: 12px;
}

.content-list li:last-child { border-bottom: none; }
.content-list li strong { color: var(--color-blue); font-weight: 700; }

.content-text {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.stat-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px;
    background: var(--bg-gradient);
    border-radius: 20px;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -2px;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 12px;
}

.alert-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-level {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: var(--transition-normal);
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-level:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.alert-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.alert-dot.green { background: var(--color-green); color: var(--color-green); }
.alert-dot.orange { background: var(--color-orange); color: var(--color-orange); }
.alert-dot.red { background: var(--color-red); color: var(--color-red); }
.alert-dot.purple { background: var(--color-purple); color: var(--color-purple); }

.weather-tips {
    padding: 20px;
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--color-blue);
    border-radius: 12px;
    margin-top: 20px;
}

.weather-tips p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 500;
}

/* ===== Community Section ===== */
.community-section {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.community-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feed-post {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-soft);
}

.feed-post:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feed-post.alert-post {
    border-color: rgba(255, 51, 68, 0.3);
    background: rgba(255, 51, 68, 0.08);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.post-info { flex: 1; }

.post-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.post-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
    line-height: 1;
}

.post-delete:hover {
    color: var(--color-red);
    background: rgba(255, 51, 68, 0.12);
}

/* Composer de publication */
.community-composer {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-soft);
    margin-bottom: 28px;
}

.composer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.composer-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.composer-input {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-fast);
}

.composer-input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.composer-input::placeholder { color: var(--text-muted); }

.composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.composer-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-primary-sm {
    background: linear-gradient(135deg, #ff3344, #ff6b6b);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(255, 51, 68, 0.25);
}

.btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 51, 68, 0.35);
}

/* Invite à se connecter */
.community-login-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 28px;
    color: var(--text-secondary);
}

/* ===== Stats Grid Section ===== */
.stats-grid-section {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.stat-grid-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-soft);
}

.stat-grid-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255,255,255,0.15);
}

.stat-grid-icon {
    font-size: 2.8rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

.stat-grid-content { flex: 1; }

.stat-grid-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.stat-grid-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-grid-active .stat-grid-value { color: var(--color-red); }
.stat-grid-surveillance .stat-grid-value { color: var(--color-orange); }
.stat-grid-controlled .stat-grid-value { color: var(--color-green); }
.stat-grid-surface .stat-grid-value { color: var(--color-blue); }

/* ===== Map Section & Sidebar avec Catégories intégrées ===== */
.map-section, .map-section-full {
    padding: 60px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.map-controls {
    display: flex;
    gap: 16px;
}

.map-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 600px;
    box-shadow: var(--shadow-hover);
}

.map-wrapper #map {
    width: 100%;
    height: 100%;
}

/* Bouton hamburger — intégré au header, toujours visible en haut à gauche */
.sidebar-toggle {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.sidebar-toggle::before,
.sidebar-toggle::after,
.sidebar-toggle span {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.sidebar-toggle span {
    width: 13px;
}

.sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--color-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.sidebar-toggle:hover span {
    width: 18px;
}

.map-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: rgba(13, 18, 28, 0.98);
    backdrop-filter: var(--glass-blur);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.map-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.close-sidebar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.close-sidebar:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.map-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Styles pour les catégories dans la sidebar */
.sidebar-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.sidebar-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.sidebar-cat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-blue);
    transform: translateX(4px);
}

.sidebar-cat-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-cat-item.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--color-blue);
}

.sidebar-cat-item.active .sidebar-cat-icon {
    background: rgba(59, 130, 246, 0.25);
}

/* Bannière de titre pour les pages dédiées (Carte / Prévention / Informations) */
.page-banner {
    padding: 48px 24px 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-banner .section-title {
    margin-bottom: 6px;
}

.page-banner-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.sidebar-cat-item strong {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
}

.sidebar-cat-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.sidebar-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 24px 0;
}

.map-sidebar .filter-group {
    margin-bottom: 20px;
}

.map-sidebar .filter-select,
.map-sidebar .filter-input {
    width: 100%;
    background: #0d121c !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--text-primary) !important;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition-normal);
}

.map-sidebar .filter-select option {
    background: #0d121c !important;
    color: #ffffff !important;
    padding: 12px;
}

.map-sidebar .filter-select:focus,
.map-sidebar .filter-input:focus {
    border-color: var(--color-blue);
    background: rgba(255,255,255,0.05);
}

.map-sidebar .filter-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.map-sidebar .events-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
}

/* Éléments masqués de compatibilité */
.sidebar { display: none; }
.map-container { display: none; }
.floating-buttons { display: none; }
.floating-stats { display: none; }
.timeline { display: none; }
.weather-widget { display: none; }

/* ===== Leaflet Custom Styles ===== */
.leaflet-container {
    background: var(--bg-primary);
    font-family: 'Inter', sans-serif;
}

.leaflet-popup-content-wrapper {
    background: rgba(13, 18, 28, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.leaflet-popup-tip { background: rgba(13, 18, 28, 0.95); }
.leaflet-popup-content { margin: 20px 24px; font-size: 0.95rem; }

/* Contrôle de calques (thème sombre cohérent avec le reste de l'UI) */
.leaflet-control-layers {
    background: rgba(13, 18, 28, 0.95) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    color: var(--text-primary);
}

.leaflet-control-layers-toggle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
}

.leaflet-control-layers-expanded {
    padding: 12px 16px !important;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.leaflet-control-layers-expanded label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}

.leaflet-control-layers-separator {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 8px 0 !important;
}

.leaflet-control-zoom a {
    background: rgba(13, 18, 28, 0.95) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(59, 130, 246, 0.2) !important;
}

.popup-header {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.popup-label { color: var(--text-secondary); font-weight: 500; }
.popup-value { font-weight: 700; color: var(--text-primary); text-align: right; }

.popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--color-blue);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: 'Inter', sans-serif;
}

.popup-btn:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.4); }
.popup-btn.secondary { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.popup-btn.secondary:hover { background: rgba(255,255,255,0.15); box-shadow: none; }

.fire-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-normal);
}

.fire-marker.actif {
    background: var(--color-red);
    box-shadow: 0 0 25px rgba(255, 51, 68, 0.7);
    animation: marker-pulse 2s ease-in-out infinite;
}

.fire-marker.surveillance {
    background: var(--color-orange);
    box-shadow: 0 0 20px rgba(255, 159, 0, 0.6);
}

.fire-marker.maitrise {
    background: var(--color-green);
    box-shadow: 0 0 20px rgba(32, 216, 108, 0.6);
}

@keyframes marker-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.marker-cluster {
    background: rgba(59, 130, 246, 0.35);
    border-radius: 50%;
    border: 2px solid var(--color-blue);
}

.marker-cluster div {
    background: var(--color-blue);
    color: white;
    font-weight: 800;
    border-radius: 50%;
    font-family: 'Inter', sans-serif;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 32px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
}

.toast {
    background: rgba(13, 18, 28, 0.98);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 18px 28px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    pointer-events: auto;
    animation: toast-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 320px;
}

.toast.error { border-left: 4px solid var(--color-red); }
.toast.success { border-left: 4px solid var(--color-green); }
.toast.warning { border-left: 4px solid var(--color-orange); }
.toast-icon { font-size: 1.4rem; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Authentication System ===== */
.auth-buttons { display: flex; gap: 16px; align-items: center; }

.auth-btn {
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.auth-btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.auth-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.user-menu {
    display: none;
    align-items: center;
    gap: 16px;
}

.user-menu.active { display: flex; }

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
}

.user-info { display: flex; flex-direction: column; gap: 2px; }
.user-name { font-weight: 700; font-size: 0.95rem; }
.user-status { font-size: 0.8rem; color: var(--color-green); font-weight: 600; }

.user-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.user-menu-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar-clickable {
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-avatar-clickable:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* Sélecteur de couleur d'avatar (modale de profil) */
.avatar-color-picker {
    display: flex;
    gap: 12px;
    margin: 8px 0 4px;
}

.avatar-color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.avatar-color-option[data-color="blue"] { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.avatar-color-option[data-color="red"] { background: linear-gradient(135deg, #ff3344, #ff6b6b); }
.avatar-color-option[data-color="green"] { background: linear-gradient(135deg, #22c55e, #10b981); }
.avatar-color-option[data-color="orange"] { background: linear-gradient(135deg, #f97316, #f59e0b); }
.avatar-color-option[data-color="purple"] { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

.avatar-color-option:hover {
    transform: scale(1.15);
}

.avatar-color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.auth-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: var(--transition-normal);
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    background: rgba(13, 18, 28, 0.98);
    backdrop-filter: var(--glass-blur);
    border-radius: 32px;
    padding: 48px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: scale(0.95) translateY(20px);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.auth-modal.active .auth-modal-content {
    transform: scale(1) translateY(0);
}

.auth-modal-header { text-align: center; margin-bottom: 36px; }
.auth-modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-modal-subtitle { color: var(--text-secondary); font-size: 1rem; font-weight: 500; }

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px;
    border-radius: 16px;
}

.auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.auth-tab.active {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(255,255,255,0.05);
}

.form-submit {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 14px;
    background: var(--bg-gradient);
    color: white;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 12px;
    box-shadow: var(--shadow-glow);
    font-family: 'Inter', sans-serif;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span { padding: 0 16px; }

.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.social-btn {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.auth-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
}

.form-footer a:hover {
    text-decoration: underline;
    color: #60a5fa;
}

/* ===== Accessibilité & Responsive ===== */
:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }