:root {
    --bg-color: #00252E;
    --card-bg: #003a47;
    --primary: #6FB965;
    --text-white: #FFFFFF;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-white);
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 24px;
}

.loading-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.brand {
    color: var(--primary);
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
}

.subtitle { opacity: 0.5; font-size: 12px; margin: 0; }

.profile-badge {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background-color: var(--primary);
    color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
}

.main-card {
    background-color: var(--card-bg);
    border-radius: 30px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(111, 185, 101, 0.2);
}

.score-value { font-size: 80px; font-weight: bold; margin: 10px 0; }

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-top: 25px;
    overflow: hidden;
}

.progress-fill { height: 100%; width: 0%; transition: width 0.5s ease; }

.stats-row { display: flex; gap: 15px; margin-top: 20px; }

.stat-box {
    background: var(--card-bg);
    flex: 1;
    border-radius: 25px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.refresh-btn {
    width: 100%;
    background: var(--primary);
    border: none;
    padding: 18px;
    border-radius: 20px;
    color: var(--bg-color);
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    cursor: pointer;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }








/* SECTION PROGRESSION */

.progression-body { background-color: #00252E; color: #FFF; font-family: sans-serif; margin: 0; padding: 20px; }
.header-row { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; margin-bottom: 25px; }
.title { font-size: 28px; font-weight: bold; margin: 0; }
.mini-refresh { background: rgba(111, 185, 101, 0.1); border: none; padding: 10px; border-radius: 12px; cursor: pointer; }
.icon-green { color: #6FB965; }

.level-card { 
    background: #003a47; padding: 20px; border-radius: 25px; display: flex; align-items: center; 
    border: 1px solid rgba(111, 185, 101, 0.2); margin-bottom: 20px;
}
.level-badge { background: #6FB965; padding: 10px; border-radius: 20px; display: flex; }
.level-info { flex: 1; margin-left: 15px; }
.level-label { color: #6FB965; font-size: 12px; font-weight: bold; margin: 0; }
.level-name { font-size: 20px; font-weight: 900; margin: 5px 0 0 0; }
.points-display { font-size: 18px; font-weight: bold; }

.privilege-wrapper { background: #003a47; border-radius: 25px; height: 380px; overflow-y: auto; border: 1px solid rgba(255, 255, 255, 0.05); }
.privilege-item { display: flex; align-items: center; padding: 18px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.privilege-item.locked { opacity: 0.15; }
.privilege-text-content { margin-left: 15px; }
.privilege-name { font-weight: bold; font-size: 15px; margin: 0; }
.privilege-desc { opacity: 0.6; font-size: 11px; margin-top: 4px; }

.leaderboard { background: #003a47; border-radius: 25px; padding: 20px; }
.user-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.my-rank-row { 
    display: flex; justify-content: space-between; padding: 12px; margin-top: 10px; 
    background: rgba(111, 185, 101, 0.15); border-radius: 15px; border: 1px solid #6FB965; 
}
.rank-text { color: #6FB965; font-weight: bold; width: 35px; }



/* SECTION PARAMÈTRES */
body.settings-page {
    background-color: #00252E;
    color: white;
    font-family: Arial, sans-serif;
    padding: 20px;
}

.title { font-size: 28px; font-weight: bold; margin-bottom: 30px; margin-top: 40px; }

.section-title {
    color: #6FB965;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
    margin-top: 10px;
    text-transform: uppercase;
}

.id-card {
    background-color: #003a47;
    padding: 25px;
    border-radius: 25px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid rgba(111, 185, 101, 0.2);
}

.badge-container { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }

.eco-id-text {
    color: #6FB965;
    font-size: 26px;
    font-weight: 900;
    margin-left: 12px;
    letter-spacing: 3px;
}

.user-name-text { color: #FFF; font-size: 20px; font-weight: 600; margin: 5px 0; }

.hint-text { color: rgba(255,255,255,0.4); font-size: 12px; margin-top: 15px; line-height: 18px; }

.menu-group { background-color: #003a47; border-radius: 20px; margin-bottom: 25px; overflow: hidden; }

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.menu-left { display: flex; align-items: center; }

.menu-text { color: #FFF; margin-left: 15px; font-size: 16px; }

.logout-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 68, 68, 0.08);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 68, 68, 0.2);
    cursor: pointer;
}

.logout-text { color: #FF4444; font-weight: bold; margin-left: 12px; font-size: 16px; }

.version { color: rgba(255,255,255,0.2); text-align: center; margin-top: 20px; font-size: 12px; }



/* Style de la barre de navigation basse */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #00252E; /* Couleur de ton TabLayout */
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* borderTopWidth: 0 mais léger pour voir */
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888; /* tabBarInactiveTintColor */
    font-size: 12px;
    transition: color 0.3s;
}

.tab-item i {
    margin-bottom: 4px;
}

/* État actif (quand on est sur la page) */
.tab-item.active {
    color: #6FB965; /* tabBarActiveTintColor */
}

/* Pour éviter que le contenu soit caché derrière la barre */
body {
    padding-bottom: 80px;
}



/* Overlay qui couvre tout l'écran avec un flou */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* La boîte de dialogue */
.modal-content {
    background: #003a47;
    width: 85%;
    max-width: 320px;
    padding: 30px;
    border-radius: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.modal-icon { margin-bottom: 15px; }
.modal-content h3 { color: white; margin-bottom: 10px; font-size: 20px; }
.modal-content p { color: rgba(255,255,255,0.6); margin-bottom: 25px; }

/* Boutons */
.modal-buttons { display: flex; gap: 10px; }

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel { background: rgba(255,255,255,0.1); color: white; }
.btn-confirm { background: #FF4444; color: white; }