:root {
    /* Couleurs principales inversées */
    --primary: #9380af; 
    --primary-light: #b3a3ca;
    --accent: #020c45;
    --accent-light: #1a2a7a;
    
    /* Couleurs de statut */
    --bg-color: #f4f4f9;
    --card-bg: #ffffff;
    --text-main: #1c1e21;
    --text-muted: #50575e;
    
    --danger: #e41e3f;
    --safe: #2ecc71;
    --warning: #f39c12;
    
    /* Système de mesures */
    --radius: 16px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    background: var(--primary);
    color: white;
    padding: env(safe-area-inset-top, 0) 0 0 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
}

h1 { 
    font-size: 1.1rem; 
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#quick-exit {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 4px 0 #b31430;
    transition: var(--transition);
}

#quick-exit:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #b31430;
}

nav {
    display: flex;
    padding: 0 1rem;
    background: rgba(255,255,255,0.05);
}

nav button {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

nav button[aria-selected="true"] {
    color: white;
}

nav button[aria-selected="true"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 4px;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
}

/* Conteneur Principal */
main {
    padding: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 800;
}

.intro {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Cartes et Éléments UI */
.question-item {
    background: var(--card-bg);
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
}

.question-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.question-item label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-weight: 500;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
    border-radius: 6px;
}

/* Boutons */
.btn-secondary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.1rem;
    border-radius: var(--radius);
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 12, 69, 0.2);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-light);
    transform: scale(1.01);
}

/* Résultats du Violentomètre */
#v-meter-result {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.score-badge {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    margin: 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filtres de la carte */
.map-filters {
    margin-bottom: 1rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--primary);
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Carte */
#map-container {
    height: 350px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Liste d'urgence */
.emergency-list li {
    background: white;
    padding: 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.emergency-list strong {
    color: var(--danger);
    font-size: 1.2rem;
}

/* Helpers */
.hidden { display: none; }

/* Style pour l'icône de géolocalisation */
.user-location-icon div {
    background-color: #4285F4;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.6);
    position: relative;
}

/* Animation de pulsation optionnelle pour la position de l'utilisateur·rice */
.user-location-icon div::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #4285F4;
    animation: pulse 2s infinite;
    opacity: 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

[role="tabpanel"]:not(.hidden) {
    animation: fadeIn 0.4s ease-out;
}
