:root {
    --sidebar-bg: #111827;
    --sidebar-hover: #1f2937;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --danger: #dc2626;
    --success: #059669;
    --radius: 8px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 18px 20px;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius);
    color: var(--sidebar-text); font-size: 14px;
}
.sidebar-nav a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav a.active { background: var(--accent); color: #fff; }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius); font-size: 14px; }
.sidebar-footer a:hover { background: var(--sidebar-hover); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: var(--card-bg); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.topbar h1 { font-size: 18px; margin: 0; }
.content { padding: 24px; flex: 1; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius); border: 1px solid transparent;
    font-size: 14px; font-weight: 500; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: #f9fafb; }
.btn-danger-outline { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger-outline:hover { background: #fef2f2; }

/* Cards / table */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 16px; background: #f9fafb; color: var(--text-muted); font-size: 12px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }

.badge { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-muted { background: #f3f4f6; color: #6b7280; }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(17,24,39,.5);
    align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 640px;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,.2);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: #fff;
}
.modal-header h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 20px; line-height: 1; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; gap: 10px; padding-top: 8px; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar-bg); padding: 16px; }
.auth-card { background: #fff; border-radius: 12px; width: 100%; max-width: 400px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.3); }
.auth-card-header { padding: 20px 24px; background: #1f2937; color: #fff; font-weight: 600; }
.auth-card-body { padding: 24px; }
.alert { padding: 10px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }

/* Auth page v2 - style carte sombre pleine page */
.auth-wrap-v2 {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #0f172a; padding: 16px;
}
.auth-card-v2 {
    width: 100%; max-width: 420px; background: #1e293b; border: 1px solid #334155;
    border-radius: 16px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.auth-icon {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex; align-items: center; justify-content: center;
}
.auth-title { text-align: center; color: #fff; font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.auth-subtitle { text-align: center; color: #94a3b8; font-size: 13px; margin: 0 0 24px; }
.auth-alert {
    background: #422006; border: 1px solid #92400e; color: #fdba74;
    padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.auth-alert.error { background: #450a0a; border-color: #991b1b; color: #fca5a5; }
.field-v2 { margin-bottom: 18px; }
.field-v2 label { display: block; color: #cbd5e1; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #64748b; width: 16px; height: 16px; }
.input-icon-wrap input {
    width: 100%; padding: 10px 12px 10px 38px; background: #0f172a; border: 1px solid #334155;
    border-radius: 8px; color: #fff; font-size: 14px;
}
.input-icon-wrap input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.toggle-pw { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #64748b; cursor: pointer; padding: 4px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-box {
    background: #0f172a; border: 1px solid #334155; border-radius: 8px;
    padding: 10px 16px; font-weight: 700; font-size: 18px; letter-spacing: 4px; user-select: none;
}
.captcha-refresh { background: none; border: none; color: #64748b; cursor: pointer; padding: 6px; }
.captcha-refresh:hover { color: #cbd5e1; }
.captcha-input { flex: 1; }
.remember-line { display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 13px; margin-bottom: 20px; }
.remember-line input { width: 16px; height: 16px; }
.btn-full {
    width: 100%; padding: 11px; background: #2563eb; color: #fff; border: none;
    border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-full:hover { background: #1d4ed8; }
.auth-footer { text-align: center; color: #475569; font-size: 12px; margin-top: 20px; }

/* Liste en cartes aérées */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; max-width: 360px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 16px; height: 16px; }
.search-box input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.list-card {
    display: flex; align-items: center; gap: 16px; padding: 16px 20px;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 10px;
}
.list-card:hover { border-color: #cbd5e1; }
.avatar-circle {
    width: 44px; height: 44px; border-radius: 50%; background: #dbeafe; color: #1d4ed8;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.list-card-body { flex: 1; min-width: 0; }
.list-card-title { font-weight: 600; font-size: 15px; color: var(--text); }
.list-card-title a { color: inherit; }
.list-card-title a:hover { color: var(--accent); }
.list-card-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.list-card-code { font-family: monospace; font-size: 12px; color: var(--text-muted); }
.list-card-meta { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.list-card-arrow { color: #cbd5e1; }
.pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; }
.pagination a, .pagination span {
    padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); font-size: 13px; color: var(--text);
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Sous-menu sidebar (details/summary natif, zéro JS) */
.sidebar-group summary {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; font-size: 14px;
    color: var(--sidebar-text); cursor: pointer; list-style: none;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-group summary .chevron { margin-left: auto; transition: transform .15s; width: 14px; height: 14px; }
.sidebar-group[open] summary .chevron { transform: rotate(90deg); }
.sidebar-group[open] summary { color: var(--accent); }
.sidebar-subnav { padding-left: 32px; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.sidebar-subnav a { padding: 7px 12px; font-size: 13px; border-radius: 6px; color: var(--sidebar-text); }
.sidebar-subnav a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-subnav a.active { background: var(--accent); color: #fff; }

/* Responsive sidebar (mobile/tablette) */
.mobile-toggle {
    display: none;
    position: fixed; top: 14px; left: 14px; z-index: 60;
    width: 40px; height: 40px; border-radius: 8px;
    background: var(--sidebar-bg); color: #fff; border: none;
    align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 45;
}
.sidebar-backdrop.open { display: block; }

@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .mobile-toggle { display: flex; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; width: 260px;
        transform: translateX(-100%); transition: transform .2s ease; z-index: 50;
    }
    .sidebar.open { transform: translateX(0); }
    .main { width: 100%; }
    .topbar { padding-left: 64px; }
    .content { padding: 16px; }
    .list-card { flex-wrap: wrap; }
    .list-card-meta { flex-wrap: wrap; gap: 8px; margin-top: 4px; }
    .grid-2 { grid-template-columns: 1fr; }
    .modal { max-width: 100%; margin: 0 8px; }
}

/* Grilles de fiches détail, responsives partout */
.detail-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.detail-grid.balanced { grid-template-columns: 1fr 1fr; }
.box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.detail-actions {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; gap: 10px; flex-wrap: wrap;
}
.detail-actions-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
    .detail-grid, .detail-grid.balanced { grid-template-columns: 1fr; }
    .box { padding: 16px; }
}
@media (max-width: 480px) {
    .btn { padding: 8px 12px; font-size: 13px; }
    .avatar-circle { width: 38px; height: 38px; font-size: 14px; }
    .list-card { padding: 12px 14px; gap: 12px; }
    .topbar h1 { font-size: 16px; }
}

.sidebar-close-btn { display: none; background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; }
@media (max-width: 900px) {
    .sidebar-close-btn { display: flex; }
}

/* Statistiques en haut de page */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: 1fr; } }

/* Grille de pays */
.pays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pays-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.pays-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pays-flag { font-size: 22px; line-height: 1; }
.pays-name { font-weight: 600; font-size: 14px; flex: 1; }
.pays-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pays-chip { background: #f1f5f9; color: var(--text-muted); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.pays-devise { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.pays-badge-authorized { position: absolute; top: 10px; right: 10px; }

/* Statistiques en haut de page */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: 1fr; } }

/* Grille de pays */
.pays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pays-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.pays-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pays-flag { font-size: 22px; line-height: 1; }
.pays-name { font-weight: 600; font-size: 14px; flex: 1; }
.pays-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pays-chip { background: #f1f5f9; color: var(--text-muted); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.pays-devise { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.pays-badge-authorized { position: absolute; top: 10px; right: 10px; }

/* Statistiques en haut de page */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: 1fr; } }

/* Grille de pays */
.pays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pays-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.pays-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pays-flag { font-size: 22px; line-height: 1; }
.pays-name { font-weight: 600; font-size: 14px; flex: 1; }
.pays-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pays-chip { background: #f1f5f9; color: var(--text-muted); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.pays-devise { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.pays-badge-authorized { position: absolute; top: 10px; right: 10px; }

/* Centre d'appel */
.big-search { position: relative; margin-bottom: 20px; }
.big-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-muted); }
.big-search input {
    width: 100%; padding: 16px 16px 16px 48px; font-size: 16px;
    border: 2px solid var(--border); border-radius: 12px;
}
.big-search input:focus { outline: none; border-color: var(--accent); }
.result-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 10px; flex-wrap: wrap;
}
.result-breadcrumb { font-size: 13px; color: var(--text-muted); }
.result-breadcrumb strong { color: var(--text); }

/* Hover / actif enrichis pour la navigation (icônes Font Awesome) */
.sidebar-nav a i,
.sidebar-subnav a i {
    color: #64748b;
    transition: color .15s ease;
}
.sidebar-nav a:hover,
.sidebar-subnav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar-nav a:hover i,
.sidebar-subnav a:hover i {
    color: var(--accent);
}
.sidebar-nav a.active,
.sidebar-subnav a.active {
    background: var(--accent);
    color: #fff;
    box-shadow: inset 3px 0 0 #fff;
}
.sidebar-nav a.active i,
.sidebar-subnav a.active i {
    color: #fff;
}
.sidebar-group summary:hover i:first-child {
    color: var(--accent);
}
.sidebar-group[open] summary i:first-child {
    color: var(--accent);
}
.sidebar-close-btn:hover,
.mobile-toggle:hover {
    color: var(--accent);
}
.sidebar-footer a:hover i {
    color: #f87171;
}

/* Support des icônes Font Awesome dans les emplacements historiquement SVG */
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 15px; }
.list-card-arrow i { font-size: 16px; }
.btn i { font-size: 14px; }
.modal-close i { font-size: 16px; }

/* Coloration des icônes Font Awesome selon le contexte */
.btn-primary i { color: #fff; }
.btn-outline i { color: var(--accent); }
.btn-danger-outline i { color: var(--danger); }
.btn-danger-outline:hover i { color: #fff; }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }

.list-card-arrow { color: var(--accent); }
.list-card-arrow i { color: var(--accent); }

.modal-close i { color: var(--text-muted); }
.modal-close:hover i { color: var(--danger); }

.auth-icon i { color: #fff; }
.input-icon-wrap i { color: #64748b; }
.captcha-refresh i { color: #64748b; }
.captcha-refresh:hover i { color: var(--accent); }
.toggle-pw i { color: #64748b; }

.badge-success i { color: #059669; }
.badge-danger i { color: #dc2626; }
.badge-muted i { color: #6b7280; }

.avatar-circle i { color: #1d4ed8; }

.sidebar-nav a.active .nav-icon { color: #fff !important; }
.sidebar-nav a:hover .nav-icon { color: #fff !important; }

.icon-blue { color: #60a5fa; }
.icon-green { color: #34d399; }
.icon-purple { color: #a78bfa; }
.icon-orange { color: #fb923c; }
.icon-red { color: #f87171; }
.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon { color: #fff; }
.btn i { margin-right: 2px; }

/* Cases statistiques dashboard */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-stat-card {
    display: flex; flex-direction: column; gap: 8px; padding: 20px;
    border-radius: 12px; text-decoration: none; color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08); transition: transform .15s ease;
}
.dash-stat-card:hover { transform: translateY(-2px); }
.dash-stat-icon { font-size: 22px; opacity: .9; }
.dash-stat-value { font-size: 32px; font-weight: 700; }
.dash-stat-label { font-size: 13px; opacity: .9; }
.dash-stat-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dash-stat-orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.dash-stat-purple2 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.dash-stat-red { background: linear-gradient(135deg, #f87171, #dc2626); }
@media (max-width: 900px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dash-stats { grid-template-columns: 1fr; } }

.result-card { align-items: center; }

/* Planning - vue mois */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 6px 0; }
.cal-cell {
    display: block; text-decoration: none; color: var(--text); background: var(--card-bg);
    border: 1px solid var(--border); border-radius: 8px; padding: 6px; min-height: 90px;
    font-size: 12px; overflow: hidden;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell-muted { opacity: .4; }
.cal-cell-today { border: 2px solid var(--accent); }
.cal-cell-num { font-weight: 600; margin-bottom: 4px; }
.cal-pill { color: #fff; border-radius: 4px; padding: 2px 5px; font-size: 10px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { font-size: 10px; color: var(--text-muted); }

/* Planning - vue semaine */
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-week-day { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px; min-height: 200px; }
.cal-week-head { display: block; text-decoration: none; color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
@media (max-width: 900px) { .cal-week { grid-template-columns: 1fr; } }

/* Planning - vue année */
.cal-year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cal-year-month { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.cal-year-month-title { display: block; text-decoration: none; color: var(--text); font-weight: 600; font-size: 13px; margin-bottom: 8px; text-align: center; }
.cal-year-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-year-day { text-align: center; font-size: 9px; padding: 2px 0; border-radius: 3px; color: var(--text-muted); }
.cal-year-day-muted { opacity: .25; }
.cal-year-day-has-event { background: var(--accent); color: #fff; font-weight: 600; }

@media (max-width: 700px) { .cal-grid { grid-template-columns: repeat(7, 1fr); } .cal-cell { min-height: 60px; font-size: 10px; padding: 3px; } .cal-pill { display:none; } }

/* Planning - style Google Agenda */
.pl-topbar { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; background:#fff; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:10px; }
.pl-nav-btn { width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:50%; color:var(--text-muted); text-decoration:none; }
.pl-nav-btn:hover { background:#f1f5f9; color:var(--text); }
.pl-title { font-size:16px; font-weight:600; min-width:180px; text-align:center; }
.pl-today-btn { padding:6px 14px; border:1px solid var(--border); border-radius:6px; text-decoration:none; color:var(--text); font-size:13px; }
.pl-today-btn:hover { background:#f1f5f9; }

.pl-month-tabs { display:flex; overflow-x:auto; background:#fff; border-bottom:1px solid var(--border); padding:0 20px; }
.pl-month-tab { padding:10px 14px; text-decoration:none; color:var(--text-muted); font-size:13px; white-space:nowrap; border-bottom:2px solid transparent; }
.pl-month-tab:hover { color:var(--text); }
.pl-month-tab-active { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }

.pl-grid { display:grid; grid-template-columns: 30px repeat(7, 1fr); background:#fff; }
.pl-grid-head { text-align:center; font-size:11px; font-weight:600; color:var(--text-muted); padding:10px 4px; border-bottom:1px solid var(--border); }
.pl-week-num { display:flex; align-items:flex-start; justify-content:center; padding-top:6px; font-size:10px; color:#cbd5e1; border-right:1px solid var(--border); border-bottom:1px solid var(--border); }
.pl-cell {
    display:flex; flex-direction:column; text-decoration:none; color:var(--text);
    border-right:1px solid var(--border); border-bottom:1px solid var(--border);
    padding:6px; min-height:90px; position:relative;
}
.pl-cell:hover { background:#f8fafc; }
.pl-cell-out { color:#cbd5e1; background:#fafafa; }
.pl-cell-num { font-size:12px; }
.pl-cell-today {
    display:inline-flex; align-items:center; justify-content:center;
    width:22px; height:22px; border-radius:50%; background:var(--accent); color:#fff; font-weight:600;
}
.pl-dots { display:flex; flex-wrap:wrap; gap:3px; margin-top:6px; }
.pl-dot { width:8px; height:8px; border-radius:50%; }
.pl-dot-more { font-size:9px; color:var(--text-muted); }
.pl-pill { color:#fff; border-radius:4px; padding:3px 6px; font-size:11px; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

@media (max-width: 700px) {
    .pl-title { font-size:14px; min-width:auto; }
    .pl-grid { grid-template-columns: 20px repeat(7, minmax(30px, 1fr)); }
    .pl-cell { min-height:50px; padding:3px; }
    .pl-cell-num { font-size:10px; }
    .pl-grid-head { font-size:9px; padding:6px 2px; }
}

.pl-year-nav { display:flex; align-items:center; gap:10px; padding:10px 20px; background:#f8fafc; border-bottom:1px solid var(--border); }
.pl-year-label { font-size:15px; font-weight:700; min-width:50px; text-align:center; }

.ca-banner {
    display:flex; align-items:center; gap:16px; padding:20px 24px; border-radius:12px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb); color:#fff; margin-bottom:16px;
}
.ca-banner-icon { width:48px; height:48px; border-radius:12px; background:rgba(255,255,255,.15); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }

.ca-quick-actions { display:flex; gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.ca-quick-btn {
    display:flex; align-items:center; gap:10px; padding:12px 18px; background:#fff;
    border:1px solid var(--border); border-radius:10px; text-decoration:none; color:var(--text);
    font-size:14px; font-weight:500; flex:1; min-width:180px; position:relative;
    box-shadow:0 1px 3px rgba(0,0,0,.05); transition: all .15s ease;
}
.ca-quick-btn:hover { border-color:var(--accent); box-shadow:0 2px 8px rgba(0,0,0,.08); transform:translateY(-1px); }
.ca-quick-btn i { font-size:16px; color:var(--accent); }
.ca-quick-badge { position:absolute; top:-6px; right:-6px; background:var(--danger); color:#fff; font-size:11px; font-weight:700; width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; }

.ca-search-btn {
    position:absolute; right:8px; top:50%; transform:translateY(-50%);
    background:var(--accent); color:#fff; border:none; border-radius:8px;
    padding:9px 16px; font-size:13px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:6px;
}
.ca-search-btn:hover { background:var(--accent-hover); }

.ca-empty { text-align:center; padding:50px 20px; background:#fff; border-radius:12px; border:1px solid var(--border); }
.ca-empty-icon { font-size:32px; color:#cbd5e1; margin-bottom:12px; display:block; }
.ca-empty p { color:var(--text-muted); margin:0; }

@media (max-width: 700px) { .ca-quick-actions { flex-direction:column; } .ca-banner { flex-direction:column; text-align:center; } }

.ca-quick-btn-active { border-color: var(--accent); background: #eff6ff; }
.ca-quick-btn-active i { color: var(--accent); }

.moteur-quickview-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; flex-wrap:wrap; gap:8px; }
.moteur-quickview-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:14px; }

.moteur-tabs { display:flex; gap:4px; margin-bottom:16px; overflow-x:auto; border-bottom:1px solid var(--border); }
.moteur-tab-btn { padding:10px 16px; background:none; border:none; border-bottom:2px solid transparent; color:var(--text-muted); font-size:13px; cursor:pointer; white-space:nowrap; }
.moteur-tab-btn:hover { color:var(--text); }
.moteur-tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
