/* assets/style.css – Style global Billettage v2 */

:root {
    --bg-main: #f4f5f7;
    --bg-card: #ffffff;
    --primary: #1976d2;
    --primary-dark: #0d47a1;
    --danger: #d32f2f;
    --text-main: #263238;
    --text-muted: #607d8b;
    --border-radius: 8px;
    --shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.08);

    /* Spécifique sorties */
    --sortie-main: #6a1b9a;
    --sortie-soft: #f3e5f5;
}

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

body {
    background: var(--bg-main);
    color: var(--text-main);
}

/* Barre supérieure */

.topbar {
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.topbar-user {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Conteneur principal */

.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

/* Cartes */

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Boutons */

.btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn:active {
    transform: translateY(1px);
}

/* Tableaux */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    text-align: left;
    background: #fafafa;
    font-weight: 600;
}

/* Formulaires */

.form-group {
    margin-bottom: 12px;
}

.form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #cfd8dc;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Badge Entrée / Sortie */

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-entree {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-sortie {
    background: var(--sortie-soft);
    color: var(--sortie-main);
}

/* Bloc d'information sortie */

.sortie-info {
    border-left: 4px solid var(--sortie-main);
    background: var(--sortie-soft);
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Footer */

.footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 16px 0 24px;
}
.reste {
    width: 60px;
    text-align: center;
    font-weight: 700;
}

.reste-ok {
    color: #2e7d32; /* vert */
}

.reste-neg {
    color: #c62828; /* rouge */
}
