/* VARIABLES DE COULEURS */
:root {
    --coallia-blue: #0055a4; 
    --bg-color: #f2f2f7; 
    --card-color: #ffffff;
    --text-dark: #1c1c1e; 
    --text-gray: #8e8e93;
    --input-bg: #e5e5ea;
    --border-color: #f2f2f7;
    --footer-bg: #fafafa;
    --success: #34c759; 
    --warning: #ff9500; 
    --danger: #ff3b30;
}

body.dark-mode {
    --coallia-blue: #5fa8ff;
    --bg-color: #121212;
    --card-color: #1e1e1e;
    --text-dark: #f5f5f7;
    --text-gray: #a1a1a6;
    --input-bg: #2c2c2e;
    --border-color: #333333;
    --footer-bg: #252525;
}

/* ANTI-SÉLECTION */
button, a, h1, h2, h3, span, .pro-badge, .card-body {
    -webkit-user-select: none; user-select: none;
}
input, textarea, select { -webkit-user-select: auto !important; user-select: auto !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body, html { margin: 0; padding: 0; font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-dark); height: 100%; transition: background 0.3s; }
.view { height: 100vh; display: flex; flex-direction: column; padding: 20px; }
.hidden { display: none !important; }

/* LAYOUT & HEADER */
.content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; width: 100%; }
.top-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 20px; width: 100%; max-width: 600px; margin: 0 auto 20px auto; }
.pro-badge { justify-self: start; background: var(--card-color); padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.theme-toggle-btn { justify-self: center; background: var(--card-color); border: none; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.2s; }
.theme-toggle-btn:active { transform: scale(0.85); }
.logout-link { justify-self: end; background: var(--card-color); color: var(--danger); padding: 8px 15px; border-radius: 20px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* AUTH */
#login-screen { justify-content: center; align-items: center; }
.auth-card { width: 100%; max-width: 360px; background: var(--card-color); padding: 40px 25px; border-radius: 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center; }
h1 { font-size: 24px; margin: 10px 0 0 0; font-weight: 700; color: var(--coallia-blue); }
.subtitle { color: var(--text-gray); margin-bottom: 25px; font-size: 14px; }
#error-bubble { background-color: var(--danger); color: white; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 15px; }

/* INPUTS & BOUTONS */
input, select { width: 100%; border: 1px solid transparent; background: var(--input-bg); color: var(--text-dark); padding: 16px; border-radius: 14px; margin-bottom: 15px; font-size: 16px; outline: none; font-family: 'Inter', sans-serif; }
input:focus, select:focus { background: var(--card-color); border-color: var(--coallia-blue); }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-gray); margin-bottom: 8px; text-transform: uppercase; }

.btn-primary { width: 100%; background: var(--coallia-blue); color: white; border: none; padding: 16px; border-radius: 14px; font-weight: 600; font-size: 16px; cursor: pointer; transition: 0.2s; }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary { width: 100%; background: var(--input-bg); color: var(--text-dark); border: none; padding: 16px; border-radius: 14px; font-weight: 600; font-size: 16px; cursor: pointer; }

/* CARTES VÉHICULES */
.items-grid { display: flex; flex-direction: column; gap: 15px; }
.item-card { background: var(--card-color); border-radius: 20px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.04); display: flex; flex-direction: column; }
.status-line { height: 6px; width: 100%; }
.card-body { padding: 20px; text-align: center; }
.card-body h3 { margin: 0 0 5px 0; font-size: 22px; color: var(--text-dark); font-weight: 800; text-transform: uppercase; }
.card-footer { border-top: 1px solid var(--border-color); padding: 15px 20px; font-size: 13px; background: var(--footer-bg); display: flex; justify-content: space-between; color: var(--text-gray); }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 20px; }
.modal-card { background: var(--card-color); width: 100%; max-width: 320px; padding: 30px 20px; border-radius: 28px; text-align: center; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-buttons { display: flex; gap: 10px; margin-top: 25px; }

/* SPLASH SCREEN */
#splash-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s; }
.splash-content { text-align: center; animation: slideUp 1s ease-out; }
.splash-title { font-size: 16px; font-weight: 800; color: var(--text-gray); letter-spacing: 3px; }
.hidden-splash { opacity: 0; pointer-events: none; }