/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-hover: #3b82f6;
    --secondary: #059669;
    --secondary-dark: #047857;
    --secondary-light: #ecfdf5;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --gray-50: #f8f9fc;
    --gray-100: #f0f2f5;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7a8a;
    --gray-600: #5a6a7a;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #1a2744;
    --bg: #eef1f5;
    --bg-card: #fff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --transition: all 0.2s ease;
    --nav-height: 68px;
    --bottom-nav-height: 64px;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: #2c3e50;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { height: -webkit-fill-available; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pullDown {
    from { transform: translateY(-60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== HEADER / NAVBAR ===== */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid #e8ecf0;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    height: var(--nav-height);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }

.nav-logo-svg { width: 38px; height: 38px; }

.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.nav-brand-academy {
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: #8895a7;
    text-transform: uppercase;
}

.nav-brand-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #1a2744;
    letter-spacing: 0.3px;
}

.nav-brand-title span { color: var(--primary); }

.nav-brand-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.6em;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    margin-left: 8px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* ===== HAMBURGER TOGGLE ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    position: relative;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover { background: var(--gray-100); }

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--gray-900);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-toggle span + span { margin-top: 5px; }

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== NAV LINKS ===== */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    min-height: 36px;
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.nav-links a.active { color: var(--primary); background: var(--primary-light); }

.nav-user {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8em;
    padding: 6px 14px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.btn-login {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85em;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.3) !important;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary)) !important;
    color: #fff !important;
}

.btn-logout {
    border: 1px solid #d0d5dd;
    color: var(--gray-600) !important;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85em;
}

.btn-logout:hover {
    background: var(--danger-light) !important;
    border-color: #fca5a5 !important;
    color: var(--danger) !important;
}

/* ===== BOTTOM NAV (mobile) ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    border-top: 1px solid #e8ecf0;
    z-index: 999;
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 0.6em;
    font-weight: 500;
    gap: 2px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    min-height: 48px;
    min-width: 56px;
    position: relative;
}

.bottom-nav a svg {
    width: 22px;
    height: 22px;
    transition: var(--transition);
}

.bottom-nav a span { margin-top: 1px; }

.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a.active svg { color: var(--primary); }

.bottom-nav a .badge-dot {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(16px);
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - var(--nav-height));
    animation: fadeIn 0.3s ease;
}

.container > * {
    animation: fadeInUp 0.4s ease both;
}

.container > *:nth-child(1) { animation-delay: 0.05s; }
.container > *:nth-child(2) { animation-delay: 0.1s; }
.container > *:nth-child(3) { animation-delay: 0.15s; }
.container > *:nth-child(4) { animation-delay: 0.2s; }
.container > *:nth-child(5) { animation-delay: 0.25s; }

/* ===== HERO ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 64px 40px;
    margin-bottom: 36px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fe, #eef0f7);
    border: 1px solid #e8ecf0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 50% 50%, rgba(5,150,105,0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(5,150,105,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
    font-size: 2.4em;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--gray-900);
}

.hero p {
    font-size: 1.1em;
    color: #6b7a8a;
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.2px;
    min-height: 44px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,99,235,0.25);
}

.btn-green, .btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(5,150,105,0.15);
}

.btn-green:hover, .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(5,150,105,0.25);
}

.btn-secondary {
    background: var(--gray-100);
    color: #2c3e50;
    border: 1px solid #d0d5dd;
}

.btn-secondary:hover {
    background: var(--secondary);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,0.15);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220,38,38,0.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #b45309);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217,119,6,0.15);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(217,119,6,0.25);
}

.btn-sm { padding: 6px 14px; font-size: 0.8em; border-radius: 7px; min-height: 36px; }
.btn-lg { padding: 14px 32px; font-size: 1em; min-height: 52px; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm), 0 1px 2px rgba(0,0,0,0.02);
    border: 1px solid #eef1f5;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-md); }

.card h2 {
    margin-bottom: 18px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: 0.2px;
}

.card p { color: var(--gray-600); line-height: 1.7; }

.card-flat { box-shadow: none; border-color: transparent; }
.card-flat:hover { box-shadow: none; }

/* ===== STAT CARDS ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.stat-card:active { transform: translateY(-2px) scale(0.98); }

.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2em; font-weight: 700;
    margin-bottom: 14px;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-5deg); }

.stat-card h3 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.stat-card p {
    font-size: 0.78em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.stat-card::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.stat-card-blue { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.stat-card-blue .stat-icon { background: rgba(255,255,255,0.18); color: #fff; }
.stat-card-blue::after { content: ''; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.06); }

.stat-card-green { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: #fff; }
.stat-card-green .stat-icon { background: rgba(255,255,255,0.18); color: #fff; }
.stat-card-green::after { content: ''; position: absolute; bottom: -30px; right: -10px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.06); }

.stat-card-purple { background: linear-gradient(135deg, var(--purple), #6d28d9); color: #fff; }
.stat-card-purple .stat-icon { background: rgba(255,255,255,0.18); color: #fff; }
.stat-card-purple::after { content: ''; position: absolute; top: -10px; left: 40%; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,0.07); }

.stat-card-amber { background: linear-gradient(135deg, var(--warning), #b45309); color: #fff; }
.stat-card-amber .stat-icon { background: rgba(255,255,255,0.18); color: #fff; }
.stat-card-amber::after { content: ''; position: absolute; top: 50%; left: -30px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.06); }

/* ===== FORMULAIRE ===== */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.85em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 0.93em;
    color: #1f2937;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.form-group input::placeholder { color: #9ca3af; }

.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.form-group select option { background: #fff; color: #1f2937; }

.form-group textarea { resize: vertical; min-height: 90px; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ===== TABLEAUX ===== */
.table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #eef1f5;
    -webkit-overflow-scrolling: touch;
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
}

th {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6b7a8a;
    background: var(--gray-50);
}

td { font-size: 0.9em; color: #374151; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }

.actions { display: flex; gap: 6px; }

/* ===== ALERTES ===== */
.alert {
    padding: 13px 18px;
    border-radius: 9px;
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--secondary-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== CARTE ===== */
#map {
    height: 520px !important;
    min-height: 400px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid #e8ecf0;
    z-index: 1;
}

.leaflet-control-zoom a { background: #fff !important; color: #333 !important; }

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
}

.site-popup { font-size: 0.9em; }
.site-popup h3 { color: var(--gray-900); margin-bottom: 6px; font-weight: 600; }
.site-popup p { color: var(--gray-600); }

/* ===== CALENDRIER ===== */
#calendar {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid #eef1f5;
}

.fc { color: #374151; }
.fc-toolbar-title { color: var(--gray-900) !important; font-weight: 600 !important; font-size: 1.3em !important; }
.fc-button-primary {
    background: var(--gray-100) !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
}
.fc-button-primary:hover { background: var(--gray-200) !important; }
.fc-button-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.fc-day-today { background: #fffbeb !important; }
.fc-theme-standard td, .fc-theme-standard th { border-color: #e5e7eb !important; }
.fc-col-header-cell { background: var(--gray-50); }
.fc-event {
    border-radius: 6px !important;
    border: none !important;
    padding: 2px 6px !important;
    font-size: 0.8em !important;
}

/* ===== CONNEXION ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg), #e4e8ee);
}

.login-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border: 1px solid #eef1f5;
    animation: scaleIn 0.3s ease;
}

.login-card .login-header { text-align: center; margin-bottom: 32px; }

.login-card .login-header svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.login-card .login-header h1 {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--gray-900);
}

.login-card .login-header p { color: #8895a7; font-size: 0.85em; margin-top: 4px; }

.login-card .btn { width: 100%; padding: 13px; justify-content: center; font-size: 0.95em; }

.login-card .login-footer { text-align: center; margin-top: 20px; }

.login-card .login-footer a {
    color: #8895a7;
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s;
}

.login-card .login-footer a:hover { color: var(--primary); }

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--gray-900);
}

.page-header .user-badge {
    color: var(--gray-500);
    font-size: 0.85em;
}

.page-header .user-badge strong { color: var(--gray-900); }

/* ===== NAV ADMIN ===== */
.admin-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid #eef1f5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.admin-nav a {
    padding: 10px 22px;
    background: transparent;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 9px;
    font-weight: 500;
    font-size: 0.85em;
    transition: var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.admin-nav a:hover { color: var(--gray-900); background: var(--gray-100); }
.admin-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ===== ADMIN HEADER GRAPHIC ===== */
.admin-header-graphic {
    position: relative;
    background: linear-gradient(135deg, #1a2744 0%, #1e3a5f 30%, var(--primary) 70%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 28px;
    overflow: hidden;
    color: #fff;
}
.admin-header-graphic::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
                      radial-gradient(circle at 85% 40%, rgba(5,150,105,0.2) 0%, transparent 50%),
                      radial-gradient(circle at 50% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.admin-header-graphic::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(5,150,105,0.12);
    pointer-events: none;
}
.admin-header-content { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.admin-header-content h1 { font-size: 1.6em; font-weight: 600; margin: 0; }
.admin-header-content h1 small { display: block; font-size: 0.45em; font-weight: 400; opacity: 0.7; margin-top: 4px; letter-spacing: 0.5px; }
.admin-header-content .admin-user-badge {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    padding: 8px 18px 8px 8px;
    border-radius: 40px;
    font-size: 0.85em;
    border: 1px solid rgba(255,255,255,0.1);
}
.admin-header-content .admin-user-badge .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85em;
    color: #fff;
}

/* ===== SIDEBAR ADMIN ===== */
.admin-layout { display: flex; gap: 28px; align-items: flex-start; }
.admin-sidebar {
    width: 220px; flex-shrink: 0;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid #eef1f5;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: sticky; top: 100px;
}
.admin-sidebar-header {
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, #f8f9fe, #eef0f7);
    border-bottom: 1px solid #eef1f5;
    font-size: 0.75em; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: #8895a7;
}
.admin-sidebar a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    text-decoration: none; color: var(--gray-600); font-size: 0.85em; font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
    min-height: 44px;
}
.admin-sidebar a:hover { background: #f8f9fc; color: var(--gray-900); }
.admin-table-header { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; margin-bottom:1rem; }
.admin-table-filters .filter-form { display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }
.admin-sidebar a.active {
    background: var(--primary-light); color: var(--primary); font-weight: 600;
    border-left-color: var(--primary);
}
.admin-sidebar a .nav-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: 0.6; flex-shrink: 0; }
.admin-sidebar a.active .nav-icon { opacity: 1; }
.admin-sidebar a .nav-badge {
    margin-left: auto;
    background: var(--gray-100); color: var(--gray-500);
    font-size: 0.75em; font-weight: 600;
    padding: 1px 8px; border-radius: 12px;
}
.admin-main { flex: 1; min-width: 0; }

/* ===== DASHBOARD WIDGETS ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-grid .card { margin-bottom: 0; }

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid #eef1f5;
    background: #fff;
    color: var(--gray-900);
    gap: 10px;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    transition: height 0.25s ease;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.quick-action-btn:active { transform: translateY(-1px) scale(0.98); }

.quick-action-btn .q-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    transition: transform 0.25s ease;
}
.quick-action-btn:hover .q-icon { transform: scale(1.1); }

.quick-action-btn .q-label { display: block; line-height: 1.3; }
.quick-action-btn .q-desc {
    display: block; font-weight: 400;
    color: #8895a7; font-size: 0.78em; margin-top: 2px;
}

.qa-blue::before { background: linear-gradient(90deg, var(--primary), var(--primary-hover)); }
.qa-blue .q-icon { background: var(--primary-light); color: var(--primary); }
.qa-blue:hover { border-color: #93c5fd; }

.qa-green::before { background: linear-gradient(90deg, var(--secondary), #10b981); }
.qa-green .q-icon { background: var(--secondary-light); color: var(--secondary); }
.qa-green:hover { border-color: #6ee7b7; }

.qa-purple::before { background: linear-gradient(90deg, var(--purple), #8b5cf6); }
.qa-purple .q-icon { background: var(--purple-light); color: var(--purple); }
.qa-purple:hover { border-color: #c4b5fd; }

.qa-amber::before { background: linear-gradient(90deg, var(--warning), #f59e0b); }
.qa-amber .q-icon { background: var(--warning-light); color: var(--warning); }
.qa-amber:hover { border-color: #fcd34d; }

/* ===== RECENT EVENTS LIST ===== */
.event-list { display: flex; flex-direction: column; gap: 2px; }
.event-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.event-item:hover { background: var(--gray-50); }
.event-item:active { background: var(--gray-100); }
.event-item .event-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.event-item .event-info { flex: 1; min-width: 0; }
.event-item .event-title { font-size: 0.88em; font-weight: 600; color: var(--gray-900); display: block; }
.event-item .event-type { font-size: 0.75em; color: #8895a7; display: block; margin-top: 1px; }
.event-item .event-date { font-size: 0.75em; color: var(--gray-500); font-weight: 500; white-space: nowrap; }

/* ===== SITE CARDS ===== */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.site-card {
    background: #fafbfc;
    border: 1px solid #eef1f5;
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.25s ease;
}

.site-card:hover {
    border-color: #d0d5dd;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.site-card h3 { color: var(--gray-900); font-weight: 600; margin-bottom: 6px; font-size: 1em; }
.site-card p { color: var(--gray-500); font-size: 0.85em; margin-bottom: 4px; }

.site-card .site-date {
    color: var(--secondary);
    font-size: 0.8em;
    font-weight: 500;
}

/* ===== FILTRE ===== */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar label { color: var(--gray-600); font-size: 0.85em; font-weight: 500; }

.filter-bar select {
    padding: 8px 36px 8px 14px;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius-sm);
    color: #1f2937;
    font-size: 0.85em;
    cursor: pointer;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state p { font-size: 1em; }

/* ===== PATTERN UTILITIES ===== */
.bg-dots {
    background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 16px 16px;
}
.bg-dots-dark {
    background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 16px 16px;
}
.bg-grid-subtle {
    background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--gray-900);
    color: #fff;
    font-size: 0.88em;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
    pointer-events: auto;
    max-width: 400px;
    backdrop-filter: blur(8px);
}

.toast.toast-hide { animation: toastOut 0.25s ease both; }

.toast-success { background: linear-gradient(135deg, var(--secondary), #047857); }
.toast-error { background: linear-gradient(135deg, var(--danger), #b91c1c); }
.toast-info { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }

.toast svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(0,0,0,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-white { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

/* ===== PWA INSTALL BANNER ===== */
.pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid #e8ecf0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 998;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    animation: slideUp 0.3s ease;
}

.pwa-install-banner.show { display: block; }

.pwa-install-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 500px;
    margin: 0 auto;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.pwa-install-text { flex: 1; }
.pwa-install-text strong { display: block; font-size: 0.9em; color: var(--gray-900); }
.pwa-install-text span { display: block; font-size: 0.78em; color: var(--gray-500); }

.pwa-install-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
    transition: var(--transition);
}

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

.pwa-install-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 8px;
    font-size: 1.2em;
    line-height: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* ===== PULL-TO-REFRESH ===== */
.ptr-indicator {
    display: none;
    text-align: center;
    padding: 16px;
    color: var(--gray-400);
    font-size: 0.85em;
    animation: fadeIn 0.3s ease;
}

.ptr-indicator .spinner { margin-right: 8px; vertical-align: middle; }

/* ===== IMPROVED CHAT ===== */
#chat-box {
    height: 300px !important;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 10px;
    margin-bottom: 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#chat-box > * {
    animation: fadeInUp 0.2s ease both;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eef1f5;
    align-self: flex-start;
}
.chat-msg-self {
    align-self: flex-end;
    background: var(--primary-light);
    border-color: #bfdbfe;
}
.chat-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    gap: 12px;
}
.chat-msg-author {
    font-weight: 600;
    font-size: 0.78em;
    color: var(--primary);
}
.chat-msg-time {
    font-size: 0.7em;
    color: var(--gray-400);
}
.chat-msg-text {
    font-size: 0.88em;
    color: #374151;
    line-height: 1.5;
}
#chat-box::-webkit-scrollbar { width: 4px; }
#chat-box::-webkit-scrollbar-track { background: transparent; }
#chat-box::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

#chat-form {
    display: flex;
    gap: 8px;
}

#chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.9em;
    min-height: 44px;
    transition: var(--transition);
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

/* ===== MAP MARKERS ===== */
.marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.2s;
}
.marker-icon svg {
    transform: rotate(45deg);
    width: 18px;
    height: 18px;
}
.marker-icon:hover {
    transform: rotate(-45deg) scale(1.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 0; }
    .admin-sidebar-header { display: none; }
    .admin-sidebar a { flex: 1; min-width: 100px; justify-content: center; border-left: none; border-bottom: 2px solid transparent; padding: 10px 12px; font-size: 0.78em; }
    .admin-sidebar a.active { border-left: none; border-bottom-color: var(--primary); }
    .admin-sidebar a .nav-icon { display: none; }
    .admin-sidebar a .nav-badge { display: none; }
}

/* ===== MOBILE-FIRST: TABLETS & PHONES ===== */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 0 16px; }
    .nav-container { position: relative; }
    .nav-toggle { display: flex; }
    .nav-brand-academy { display: none; }
    .nav-brand-title { font-size: 0.9em; }
    .nav-logo-svg { width: 32px; height: 32px; }

    /* Mobile Nav Drawer */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid #e8ecf0;
        padding: 8px 16px 20px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        transform: translateY(-110%);
        opacity: 0;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        gap: 2px;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links a,
    .nav-links .btn-login,
    .nav-links .btn-logout {
        padding: 12px 16px;
        font-size: 0.95em;
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-sm);
        min-height: 48px;
    }

    .nav-links .btn-login,
    .nav-links .btn-logout {
        margin-top: 4px;
        justify-content: center;
    }

    .nav-links .nav-user {
        width: 100%;
        text-align: center;
        padding: 10px;
        margin-top: 4px;
    }

    /* Bottom Navigation */
    .bottom-nav { display: block; }

    /* Adjust container padding for bottom nav */
    .container {
        padding: 24px 16px;
        padding-bottom: calc(var(--bottom-nav-height) + 24px + env(safe-area-inset-bottom));
    }

    /* Hero */
    .hero { padding: 36px 20px; margin-bottom: 24px; }
    .hero h1 { font-size: 1.7em; }

    /* Stat grid */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px 18px; }
    .stat-card h3 { font-size: 1.6em; }

    /* Quick actions */
    .quick-actions-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .quick-action-btn { padding: 16px 12px; }
    .quick-action-btn .q-icon { width: 40px; height: 40px; font-size: 1.1em; }

    /* Form */
    .form-row { flex-direction: column; gap: 0; }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start; }

    /* Admin nav */
    .admin-nav { gap: 2px; }
    .admin-nav a { padding: 8px 12px; font-size: 0.78em; }

    /* Login */
    .login-card { padding: 28px 20px; margin: 0; }
    .login-page { padding: 16px; }

    /* Map */
    #map { height: 350px !important; min-height: 300px; }

    /* Calendar */
    #calendar { padding: 12px; }
    .fc-toolbar-title { font-size: 1em !important; }
    .fc-toolbar { flex-wrap: wrap; gap: 8px; }
    .fc-button { padding: 6px 10px !important; font-size: 0.78em !important; }

    /* Table */
    th, td { padding: 10px 12px; }

    /* Admin header */
    .admin-header-graphic { padding: 24px 20px; }
    .admin-header-content { flex-direction: column; align-items: flex-start; }
    .admin-header-content h1 { font-size: 1.3em; }

    /* Toast on mobile */
    .toast-container {
        right: 12px;
        left: 12px;
        top: calc(var(--nav-height) + 12px);
    }
    .toast { max-width: 100%; }

    /* Filter bar */
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar form { width: 100%; }
    .filter-bar select { width: 100%; }

    /* Site list */
    .site-grid { grid-template-columns: 1fr; }
}

/* ===== SMALL PHONES ===== */
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .nav-brand-title { font-size: 0.85em; }
    .nav-brand-badge { font-size: 0.55em; padding: 1px 8px; }
    .hero h1 { font-size: 1.3em; }
    .hero p { font-size: 0.95em; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .quick-actions-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 18px 16px; }
    .stat-card h3 { font-size: 1.4em; }
    .card { padding: 20px 16px; }
    .admin-nav a { padding: 6px 10px; font-size: 0.72em; }
    #map { height: 280px !important; min-height: 250px; }
    .bottom-nav a { font-size: 0.55em; }
    .bottom-nav a svg { width: 20px; height: 20px; }
}

/* ===== SAFE AREA FOR NOTCHED DEVICES ===== */
@supports (padding: env(safe-area-inset-top)) {
    .navbar { padding-top: env(safe-area-inset-top); padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
    .container { padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
    .login-page { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

    @media (max-width: 768px) {
        .navbar { padding-top: env(safe-area-inset-top); padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
        .container { padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
    }
}

/* ===== PRINT ===== */
.support-card { text-align:center; padding:1rem 0; }
.support-card-icon { width:56px; height:56px; background:#eef1f5; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; }
.support-card-actions { display:flex; gap:0.75rem; justify-content:center; flex-wrap:wrap; margin-top:1rem; }

.qrcode-card { text-align:center; padding:1rem 0; }
.qrcode-card-icon { width:56px; height:56px; background:#eef1f5; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 1rem; }
.qrcode-image-wrapper { max-width:200px; margin:1rem auto 0; border-radius:12px; overflow:hidden; box-shadow:0 2px 12px rgba(0,0,0,0.1); }
.qrcode-image { width:100%; height:auto; display:block; }

.ticket-list { display:flex; flex-direction:column; gap:1rem; }
.ticket-item { background:#f8f9fb; border-radius:10px; padding:1rem; border:1px solid #eef1f5; }
.ticket-resolu { opacity:0.75; }
.ticket-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.5rem; gap:0.5rem; }
.ticket-header strong { font-size:0.95rem; }
.ticket-message { font-size:0.9rem; color:#555; margin-bottom:0.5rem; }
.ticket-reponse { background:#eef1f5; padding:0.75rem 1rem; border-radius:8px; margin-top:0.5rem; }
.ticket-reponse strong { display:block; margin-bottom:0.25rem; font-size:0.85rem; color:#2563eb; }
.ticket-date { color:#999; font-size:0.8rem; }
.ticket-statut { display:inline-block; padding:2px 10px; border-radius:12px; font-size:0.75rem; font-weight:600; text-transform:uppercase; white-space:nowrap; }
.ticket-ouvert { background:#fef3c7; color:#92400e; }
.ticket-en_cours { background:#dbeafe; color:#1e40af; }
.ticket-resolu { background:#d1fae5; color:#065f46; }
.ticket-ferme { background:#f3f4f6; color:#374151; }

.page-header { margin-bottom:2rem; }
.page-header h1 { margin:0 0 0.25rem; font-size:1.5rem; }
.page-header p { margin:0; color:#666; }

@media print {
    .navbar, .bottom-nav, .toast-container, .pwa-install-banner { display: none !important; }
    .container { padding: 0; min-height: auto; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
