/* ==========================================================================
   1. VARIABLES & CONFIGURATION GLOBALE
   ========================================================================== */
:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --accent-color: #fe2c55; /* Rouge TikTok */
    --success-color: #25d366; /* Vert WhatsApp / Réussite */
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --input-bg: #2d2d2d;
    --input-border: #444444;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
ul li {
    list-style-type: none;
}

/* ==========================================================================
   2. MISE EN PAGE & CONTENEURS (CARTES)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 400px;
}

.dashboard-container {
    width: 100%;
    max-width: 600px;
    margin-top: 40px;
    align-self: flex-start; /* Aligne le dashboard vers le haut */
}

.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.card p{
    font-size:14px
}


/* ==========================================================================
   3. ÉLÉMENTS TEXTUELS & EN-TÊTE
   ========================================================================== */
#brand{
    color:#2c9dfe;
    font-size: 12px;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header .logo {
    margin-bottom: 0;
    line-height: 15px;
    /* text-align: center; */
    font-size: 25px;
}

.logo {
    text-align: left;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    color: var(--text-color);
}
.logo span { 
    color: var(--accent-color); 
}

h2 { 
    font-size: 20px; 
    margin-bottom: 20px; 
    text-align: center; 
    font-weight: 500; 
}

h3 { 
    margin-top: 0; 
    font-weight: 500; 
    font-size: 18px; 
}

/* ==========================================================================
   4. FORMULAIRES, ENTRÉES & BOUTONS
   ========================================================================== */
.form-group { 
    margin-bottom: 18px; 
}

label { 
    display: block; 
    margin-bottom: 6px; 
    font-size: 14px; 
    color: var(--text-muted); 
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 15px;
    transition: border-color 0.2s;
}

input:focus { 
    outline: none; 
    border-color: var(--accent-color); 
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn:hover { 
    opacity: 0.9; 
}

.btn-logout {
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #444;
    color: var(--text-muted);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-logout:hover {
    border-color: var(--accent-color);
    color: white;
}

.links { 
    margin-top: 20px; 
    text-align: center; 
    font-size: 14px; 
}
.links a { 
    color: var(--accent-color); 
    text-decoration: none; 
}
.links a:hover { 
    text-decoration: underline; 
}

/* Option afficher/masquer mot de passe */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 40px; 
}

.toggle-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #6b7280;
}
.toggle-password-btn:hover { 
    color: #374151; 
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   5. BADGES, ALERTES & BOUTON GLISSIÈRE (TOGGLE)
   ========================================================================== */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(37, 211, 102, 0.1);
    color: var(--success-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}
.alert-error {
    background-color: rgba(254, 44, 85, 0.1);
    border: 1px solid var(--accent-color);
    color: #ff5e7e;
}
.alert-success {
    background-color: rgba(37, 211, 102, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Conteneur global de la glissière */
.switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.switch-label {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-muted);
}

/* Conteneur externe de la glissière */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Cache la case à cocher native */
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

/* Le fond de la glissière */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--accent-color); /* Rouge quand OFF */
    transition: .4s;
    border-radius: 34px;
}

/* Le rond blanc mobile */
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Vert quand coché (ON) */
input:checked + .slider {
    background-color: var(--success-color); 
}

/* Animation du rond blanc vers la droite */
input:checked + .slider:before {
    transform: translateX(26px);
}

/* Design si le bouton est désactivé (Hors ligne) */
input:disabled + .slider {
    background-color: #555555;
    cursor: not-allowed;
}
/* Styles pour les options (Checkboxes de configuration) */
        .config-group {
            margin-top: 15px;
            text-align: left;
        }
        .config-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }
        .config-item:last-child {
            border-bottom: none;
        }
        .config-label {
            font-size: 14px;
            color: var(--text-muted, #ccc);
        }

        .switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #2196F3; }
input:checked + .slider:before { transform: translateX(26px); }

#passenger_statut li {
    text-align: right;
    padding-bottom: 15px;
    font-size: 14px;
}

.alert-success { color: green; }
        .alert-error { color: red; }
        .form-group { margin-bottom: 15px; }
        /* Style optionnel pour masquer/afficher la div pub */
        #pub_affichage { transition: opacity 0.3s ease; }

#bienvenue {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 1;
}

#bienvenue.cache {
    max-height: 0;
    opacity: 0;
}

#live_data {
display: inline-block; font-size: 12px; margin-top: 5px; padding: 5px 30px; background: #1a1a1a; border-radius: 4px; 
}