/* style.css */
:root {
    --primary: #0056b3;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

body { background-color: #f0f2f5; color: #333; padding-bottom: 20px; }

/* Navigation */
header { background-color: var(--dark); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 1.2rem; margin: 0; }
header a { color: white; text-decoration: none; margin-left: 15px; font-size: 0.9rem; padding: 5px 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; }

/* Containers */
.container { max-width: 600px; margin: 0 auto; padding: 20px; }

/* Bouton Central (Start/Stop) */
.action-area { display: flex; justify-content: center; margin: 30px 0; }
.btn-circle {
    width: 180px; height: 180px;
    border-radius: 50%; border: none;
    color: white; font-size: 1.5rem; font-weight: bold;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.btn-circle:active { transform: scale(0.95); }
.btn-start { background: linear-gradient(145deg, #28a745, #218838); }
.btn-stop { background: linear-gradient(145deg, #dc3545, #c82333); animation: pulse 2s infinite; }
.btn-circle span { font-size: 3rem; margin-bottom: 5px; }

/* Tuiles */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid .full-width { grid-column: span 2; }

.tile {
    background: white; padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center; cursor: pointer;
    transition: transform 0.2s;
    border: none; width: 100%; display: block;
    color: var(--dark); text-decoration: none;
}
.tile:active { transform: scale(0.98); background-color: #eef; }
.tile-icon { font-size: 2rem; display: block; margin-bottom: 10px; }

/* Formulaires & Login */
.form-card { background: white; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 400px; margin: 50px auto; }
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }
.btn { width: 100%; padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: bold; }
.btn-primary { background-color: var(--primary); color: white; }
.btn-danger { background-color: var(--danger); color: white; }

/* Modal (Popup) */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); z-index: 1000;
    align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-content { background: white; padding: 25px; border-radius: var(--radius); width: 90%; max-width: 500px; position: relative; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; background: none; border: none; }
.list-item { padding: 10px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.list-item small { color: #777; display: block; }

/* Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Utilitaires Admin */
.table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; background: #eee; }
.badge-admin { background: #ffeeba; color: #856404; }