:root {
    --brand: #0b3d91;
    --brand-2: #0b5ed7;
    --accent: #f7b500;
    --bg: #f3f6fb;
}

body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: #1d2433; }
.bg-brand { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.text-brand { color: var(--brand) !important; }
.btn-brand { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-brand:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Cartes */
.card { border: 0; border-radius: 14px; box-shadow: 0 2px 12px rgba(15, 35, 80, .06); }
.card-header { background: #fff; border-bottom: 1px solid #eef1f6; border-radius: 14px 14px 0 0 !important; font-weight: 600; }
.stat-card .stat-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.page-title { font-weight: 700; font-size: 1.5rem; }

/* Formulaires */
.form-label { font-weight: 500; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-2); color: #fff; font-size: .85rem;
            display: inline-grid; place-items: center; margin-right: .5rem; font-weight: 600; flex-shrink: 0; }
.access-option { cursor: pointer; border: 2px solid #dfe5ee; border-radius: 12px; padding: 1rem; transition: .15s; height: 100%; }
.access-option:hover { border-color: var(--brand-2); }
.btn-check:checked + .access-option { border-color: var(--brand-2); background: #eef4ff; }

/* QR */
.qr-box { background: #fff; padding: 14px; border-radius: 12px; display: inline-block; border: 1px solid #e4e9f2; }
.qr-box img, .qr-box canvas { display: block; }

/* Vérification */
#qr-reader { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 0 !important; }
#qr-reader video { border-radius: 12px; }
.verify-tabs .nav-link { font-weight: 500; }
.checkin-row { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Pages publiques */
.public-main { min-height: 100vh; padding: 24px 16px 48px; background:
    radial-gradient(1200px 500px at 50% -10%, #cfe0ff 0%, transparent 60%), var(--bg); }
.public-card { max-width: 640px; margin: 0 auto; }
.conf-hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 16px; padding: 24px; }
.conf-hero .badge { font-size: .8rem; }

/* Ticket */
.ticket { max-width: 420px; margin: 0 auto; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 30px rgba(15,35,80,.12); }
.ticket-head { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 20px; }
.ticket-body { padding: 20px; }
.ticket-cut { border-top: 2px dashed #d6dce8; margin: 0 16px; position: relative; }
.ticket-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: 2px; color: var(--brand); }

/* Toasts */
.app-toast { border: 0; border-radius: 12px; overflow: hidden; min-width: 300px; box-shadow: 0 8px 24px rgba(0,0,0,.15); background: #fff; }
.app-toast .toast-icon { font-size: 1.35rem; }
.toast-success .toast-icon { color: #198754; } .toast-success .toast-progress { background: #198754; }
.toast-error .toast-icon   { color: #dc3545; } .toast-error .toast-progress   { background: #dc3545; }
.toast-warning .toast-icon { color: #f0a500; } .toast-warning .toast-progress { background: #f0a500; }
.toast-info .toast-icon    { color: #0b5ed7; } .toast-info .toast-progress    { background: #0b5ed7; }
.toast-progress { height: 3px; width: 100%; animation: toastBar linear forwards; transform-origin: left; }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.login-card { width: 100%; max-width: 400px; }

.table > :not(caption) > * > * { vertical-align: middle; }
.text-mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

@media print {
    .no-print, .navbar, .toast-container { display: none !important; }
    .public-main { background: #fff; }
    .ticket { box-shadow: none; border: 1px solid #ccc; }
}
