/* Normigo - Components
   Buttons, forms, cards, modals, tables, badges, toasts, etc. */

/* === PAGE HEADER === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.page-title { font-size: 1.35rem; font-weight: 700; }
.page-meta { display: flex; gap: .5rem; align-items: center; }

/* === SECTION HEADER === */
.section-header {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--blue);
    padding: .75rem 0 .25rem;
    margin-top: .5rem;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 .5rem;
    color: var(--text-muted);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1rem;
    min-height: 44px;
    border: none;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-base);
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--blue); color: #fff; }
.btn-success   { background: var(--green); color: #fff; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-outline   { background: var(--bg-card); color: var(--gray-800); border: 1px solid var(--gray-200); }
.btn-sm        { padding: .3rem .65rem; font-size: .8rem; min-height: 36px; }
.btn-block     { width:100%; justify-content: center; }
.btn-danger-outline { color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }

.header-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.form-actions {
    display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; justify-content: flex-end;
}
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }

@media (max-width: 767px) {
    .header-actions { flex-wrap: wrap; gap: var(--space-2); }
    .btn-sm { min-height: 44px; }
    .form-actions { flex-direction: column; gap: var(--space-3); }
    .form-actions .btn { width: 100%; justify-content: center; }
}

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-size: .85rem; font-weight: 500;
    margin-bottom: .3rem; color: var(--gray-600);
}
.form-control {
    width:100%; padding: .5rem .75rem; min-height: 44px;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 1rem; font-family: inherit; transition: border-color .15s;
}
.form-control-sm { padding: .3rem .65rem; min-height: 36px; font-size: .8rem; }
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }
/* Focus programmatique (a11y.focusMain) : pas d'outline visible */
[tabindex="-1"]:focus { outline: none; }

.autocomplete-list {
    position: absolute; z-index: 100;
    background: var(--bg-card); border: 1px solid var(--gray-300);
    border-radius: .25rem; box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 200px; overflow-y: auto;
    list-style: none; width: 100%; margin-top: 2px; padding: 0;
}
.autocomplete-list li { padding: .5rem .75rem; cursor: pointer; font-size: .9rem; }
.autocomplete-list li:hover,
.autocomplete-list li[aria-selected="true"] { background: var(--blue-light); color: var(--blue); }
.autocomplete-list li:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.form-group { position: relative; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
input[type="date"].form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3e%3c/rect%3e%3cline x1='16' y1='2' x2='16' y2='6'%3e%3c/line%3e%3cline x1='8' y1='2' x2='8' y2='6'%3e%3c/line%3e%3cline x1='3' y1='10' x2='21' y2='10'%3e%3c/line%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}
input[type="date"].form-control::-webkit-calendar-picker-indicator {
    position: absolute; top:0; right:0; width:100%; height:100%; opacity:0; cursor: pointer;
}
.form-error { color: var(--danger); font-size: .85rem; min-height:1.25rem; margin-top: .25rem; }
label input[type="checkbox"] { vertical-align: middle; margin-right: .4rem; }
.form-error:empty { min-height:0; margin-top:0; }
.form-help { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

.filters-row {
    display: flex; gap: .75rem; flex-wrap: wrap; align-items: end;
}
.filters-row .form-group { margin:0; }
@media (max-width: 767px) {
    .filters-row { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* === CHECKLIST === */
.checklist-item {
    display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--gray-100);
    align-items: flex-start;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.saved-flash { background: var(--green-light); transition: background .3s; }
.checklist-item:not(.saved-flash) { transition: background .3s; }
.checklist-num {
    flex-shrink:0; width:1.75rem; height:1.75rem; border-radius:50%;
    background: var(--gray-100); color: var(--gray-600);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 600;
}
.checklist-body { flex:1; }
.checklist-label { font-size: .9rem; margin-bottom: .35rem; }
.checklist-aide { font-size: .8rem; color: var(--gray-400); margin-bottom: .35rem; }

.radio-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.radio-btn {
    display: flex; align-items: center; gap: .3rem;
    padding: .3rem .6rem; min-height: 44px; min-width: 44px;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    cursor: pointer; font-size: .8rem; transition: all .15s;
}
@media (max-width: 767px) {
    .radio-group { gap: var(--space-2); }
    .radio-btn { flex:1; justify-content: center; min-width: auto; }
}
.radio-btn:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.radio-btn.conforme:has(input:checked) { border-color: var(--green); background: var(--green-light); }
.radio-btn.non-conforme:has(input:checked) { border-color: var(--red); background: var(--red-light); }
.radio-btn input { display: none; }

.checklist-readonly { opacity: .85; }

@media (max-width: 767px) {
    .checklist-item { gap: var(--space-3); padding: var(--space-3) 0; }
    .checklist-num { width:1.5rem; height:1.5rem; font-size:.7rem; }
    .checklist-label { font-size:.85rem; margin-bottom: var(--space-1); }
    .checklist-aide { font-size:.75rem; margin-bottom: var(--space-2); }
}

/* === PROGRESS BAR === */
.progress-bar { height:.5rem; background: var(--gray-100); border-radius:99px; overflow:hidden; margin-top:.5rem; }
.progress-fill { height:100%; border-radius:99px; transition: width .3s; }
.progress-header { display: flex; justify-content: space-between; font-size:.85rem; }

/* === CARDS === */
.card {
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.25rem; margin-bottom: var(--space-4);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.card-title { font-size: var(--text-base); font-weight: 600; }
.card-danger { background: var(--red-light); border: 1px solid var(--red); }
.card-danger .card-title { color: var(--red); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { border-color: var(--blue); }
.card-row { display: flex; justify-content: space-between; align-items: center; }
.card-meta { text-align: right; }

.cockpit-card {
    background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius);
    padding: var(--space-3); margin-bottom: var(--space-3);
}
.cockpit-card:last-child { margin-bottom:0; }
.cockpit-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-2); }
.cockpit-card-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-sm); color: var(--gray-600); margin-bottom: var(--space-3); }
.cockpit-card-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.cockpit-card-actions .btn { min-width: 80px; }

/* === STAT CARDS === */
.stats-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3); margin-bottom: 1.25rem;
}
.stat-card {
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: var(--space-4); text-align: center;
}
.stat-value { font-size: var(--text-3xl); font-weight: 700; line-height:1.2; }
.stat-label { font-size:.8rem; color: var(--gray-600); margin-top: var(--space-1); }

.stats-details summary { cursor: pointer; color: var(--gray-600); font-size: var(--text-sm); padding: var(--space-2); list-style: none; }
.stats-details summary::-webkit-details-marker { display: none; }
.stats-details[open] .stats-summary::before { content:'▲ '; }
.stats-details .stats-summary::before { content:'▼ '; }
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
    gap: var(--space-3); padding: var(--space-2) 0;
}
@media (max-width: 767px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); }
}
@media (max-width: 374px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* === BADGES === */
.badge {
    display: inline-block; padding: .15rem .55rem; border-radius: 99px;
    font-size: var(--text-xs); font-weight: 600;
}
.badge-red    { background: var(--red-light);    color: var(--red); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-green  { background: var(--green-light);  color: var(--green); }
.badge-blue   { background: var(--blue-light);   color: var(--blue); }
.badge-gray   { background: var(--gray-100);     color: var(--gray-600); }

/* === TABLE === */
.table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 calc(-1 * var(--space-2)); padding: 0 var(--space-2);
}
@media (min-width: 768px) { .table-wrap { margin:0; padding:0; } }

table { width:100%; border-collapse: collapse; font-size:.9rem; }
th {
    text-align: left; padding: .6rem .75rem; font-weight: 600; font-size:.8rem;
    color: var(--gray-600); text-transform: uppercase; letter-spacing:.03em;
    border-bottom: 2px solid var(--gray-200);
}
td { padding: .65rem .75rem; border-bottom: 1px solid var(--gray-100); }
tr:hover td { background: var(--gray-50); }

@media (max-width: 767px) {
    table { table-layout: fixed; }
    th, td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    td strong { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* === MODAL === */
.modal-overlay {
    position: fixed; inset:0; background: rgba(0,0,0,.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000; padding: 1rem;
}
.modal {
    background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); width:100%; max-width:560px;
    max-height: 90vh; overflow-y: auto; padding: 1.5rem;
}
@media (max-width: 767px) {
    .modal-overlay { align-items: flex-end; padding:0; }
    .modal { border-radius: var(--radius) var(--radius) 0 0; padding:1.25rem 1rem; max-height:95vh; animation: slideUp .2s ease-out; }
}
@media (max-width: 480px) {
    .modal { width: calc(100vw - 16px); max-width: none; margin: 8px; }
    .modal textarea,
    .modal input[type="text"],
    .modal input[type="email"],
    .modal input[type="password"],
    .modal select { width: 100%; box-sizing: border-box; }
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-title { font-size:1.1rem; font-weight:700; margin-bottom:1rem; }
.modal-body { margin-bottom:1rem; }
.modal-footer {
    display: flex; gap:.5rem; justify-content: flex-end;
    padding-top:1rem; border-top:1px solid var(--border);
}

/* === TOAST === */
.toast {
    position: fixed; bottom:1.5rem; right:1.5rem;
    background: var(--gray-800); color:#fff;
    padding: .75rem 1.25rem; border-radius: var(--radius);
    font-size: .9rem; z-index:3000; animation: slideIn .3s ease; cursor:pointer;
}
.toast-success { background: var(--ok); }
.toast-error   { background: var(--danger); }
.toast-warning { background: var(--orange); }

@keyframes slideIn { from { transform: translateY(1rem); opacity:0; } to { transform: translateY(0); opacity:1; } }

/* === EMPTY STATE === */
.empty-state { text-align:center; padding: var(--space-6); color: var(--gray-600); }
.empty-state p:first-child { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.empty { text-align:center; padding:3rem 1rem; color: var(--gray-400); }
.empty p { margin-bottom: 1.25rem; }
.empty-icon { font-size:3rem; margin-bottom:.5rem; }

/* === ACTIONS LIST === */
.actions-list { display: flex; flex-direction: column; gap: var(--space-3); }
.action-card {
    background: var(--bg-card); border:1px solid var(--gray-200); border-radius: var(--radius); padding: var(--space-3);
}
.action-card-retard { border-color: var(--red); background: var(--red-light); }
.action-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-2); }
.action-desc { color: var(--gray-600); margin: var(--space-2) 0; }
.action-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-sm); color: var(--gray-600); margin-bottom: var(--space-2); }
.action-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-2); border-top:1px solid var(--gray-100); }

/* === PHOTOS === */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap:.5rem; }
.photo-thumb { display:block; border:1px solid var(--gray-200); border-radius:6px; overflow:hidden; text-decoration:none; color:inherit; }
.photo-thumb:hover { border-color: var(--blue); }
.photo-img { width:100%; height:90px; object-fit:cover; display:block; }
.photo-placeholder {
    width:100%; height:90px; display:flex; align-items:center; justify-content:center;
    background: var(--gray-50); font-size:2rem; color:var(--text-muted);
}
.photo-caption { padding:4px 6px; font-size:.7rem; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upload-preview { margin-top:.5rem; text-align:center; }
.upload-preview-img { max-width:100%; max-height:200px; border-radius:4px; }

/* === DOCUMENTS === */
.documents-list { display:flex; flex-direction:column; gap:.5rem; margin:.5rem 0; }
.document-row { display:flex; align-items:center; gap:.75rem; padding:.5rem; border:1px solid var(--border); border-radius:4px; background:var(--bg); }
.document-thumb { width:48px; height:48px; object-fit:cover; border-radius:4px; flex-shrink:0; }
.document-icon {
    width:48px; height:48px; display:flex; align-items:center; justify-content:center;
    background:var(--blue-light); color:var(--blue); border-radius:4px; font-weight:700; font-size:.75rem; flex-shrink:0;
}
.document-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-size { font-size:.85rem; flex-shrink:0; }

/* === SIGNATURE === */
.signature-display { display:flex; gap:1rem; align-items:center; }
.signature-img { border:1px solid var(--gray-200); border-radius:4px; max-width:300px; height:auto; }
.signature-name { font-weight:600; }
.signature-canvas-wrap { border:1px solid var(--gray-200); border-radius:6px; margin-top:.5rem; position:relative; }
.signature-canvas { width:100%; height:150px; cursor:crosshair; display:block; touch-action:none; }
.signature-clear { position:absolute; top:4px; right:4px; }

/* === ANOMALY === */
.anomaly-row { display:flex; gap:.5rem; align-items:center; padding:.4rem 0; border-bottom:1px solid var(--gray-100); }
.anomaly-desc { flex:1; font-size:.85rem; }
.anomaly-date { font-size:.75rem; color:var(--text-muted); }

/* === BREADCRUMB === */
.breadcrumb {
    margin-bottom:.75rem; background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius); padding:.5rem .75rem;
}
.breadcrumb-list { display:flex; flex-wrap:wrap; align-items:center; list-style:none; gap:.35rem; font-size:.9rem; }
.breadcrumb-item + .breadcrumb-item::before { content:'\203A'; color:var(--text-muted); margin-right:.35rem; }
.breadcrumb-link { color:var(--blue); text-decoration:none; }
.breadcrumb-link:hover { text-decoration:underline; }
.breadcrumb-link:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.breadcrumb-item [aria-current] { color:var(--text); font-weight:600; }

/* === VALIDATED BANNER === */
.validated-banner {
    display:flex; align-items:center; gap:.75rem;
    background:var(--green-light); border:2px solid var(--ok);
    border-radius:var(--radius); padding:.75rem 1rem; margin-bottom:1rem;
    animation: slide-in-banner .4s ease-out;
}
@keyframes slide-in-banner {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.validated-banner-icon {
    flex-shrink:0; width:32px; height:32px; border-radius:50%;
    background:var(--ok); color:#fff; font-size:1.1rem; font-weight:700;
    display:flex; align-items:center; justify-content:center;
    animation: validated-pulse 1.2s ease-out;
}
@keyframes validated-pulse {
    0%   { transform: scale(0.6); opacity: 0; }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.validated-banner-body { font-size:.95rem; color:var(--text); line-height:1.4; }

/* === HELP BANNER & FAB === */
.help-banner {
    display:flex; align-items:flex-start; gap:.75rem;
    background:var(--blue-light); border:1px solid var(--blue);
    border-radius:var(--radius); padding:.75rem 1rem; margin-bottom:1rem;
    font-size:.9rem; line-height:1.4; color:var(--text);
}
.help-banner-icon {
    flex-shrink:0; width:28px; height:28px; border-radius:50%;
    background:var(--blue); color:#fff; font-weight:700; font-size:.95rem;
    display:flex; align-items:center; justify-content:center;
}
.help-banner-body { flex:1; }
.help-banner-close {
    flex-shrink:0; background:none; border:none; font-size:1.3rem;
    cursor:pointer; color:var(--text-muted); padding:0 .25rem; line-height:1;
    min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center;
}
.help-banner-close:hover { color:var(--text); }

.help-fab {
    position:fixed; bottom:1.25rem; right:1.25rem;
    width:48px; height:48px; border-radius:50%; border:2px solid var(--blue);
    background:var(--blue); color:#fff; font-size:1.25rem; font-weight:700;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    box-shadow:0 2px 8px rgba(0,0,0,.2); z-index:900;
    transition: background .15s, transform .15s;
}
.help-fab:hover, .help-fab:focus-visible { background:#003d75; transform:scale(1.1); }
.help-fab:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.help-modal-content p { font-size:1rem; line-height:1.6; color:var(--text); }

/* === ALERT ROWS (dashboard) === */
.alert-row {
    display:flex; align-items:center; gap:.75rem; padding:.5rem 0;
    border-bottom:1px solid var(--gray-100); text-decoration:none; color:var(--text);
}
.alert-row:last-child { border-bottom:none; }
.alert-row:hover { background:var(--gray-50); }
.alert-danger { color:var(--danger); }
.alert-warning { color:var(--warning); }
.alert-content { display:flex; flex-direction:column; gap:.25rem; }
.alert-link { color:var(--red); font-weight:500; text-decoration:underline; }
.alert-link:hover { color:var(--red-dark); }

/* === SITE STATS === */
.site-stats { display:flex; gap:1rem; margin-top:.5rem; }
.card-inactive { opacity:.6; }

/* === INFO GRID (parametrage) === */
.info-grid { display:grid; grid-template-columns:1fr 1fr; gap:.25rem .5rem; }
.info-row { display:flex; gap:.5rem; padding:.35rem 0; border-bottom:1px solid var(--gray-100); }
.info-label { font-weight:600; min-width:8rem; color:var(--text-muted); font-size:.9rem; }
.info-value { font-size:.9rem; }
.row-muted { opacity:.5; }
@media (max-width: 767px) { .info-grid { grid-template-columns:1fr; } }

/* === FEEDBACK FAB === */
.feedback-fab {
    position:fixed; bottom:1.25rem; right:5.25rem; z-index:900;
    background:var(--blue); color:#fff; border:2px solid var(--blue);
    border-radius:99px; padding:.6rem 1.1rem; font-size:.85rem; font-weight:600;
    cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.2); min-height:48px;
    transition: background .15s, transform .15s;
}
.feedback-fab:hover, .feedback-fab:focus-visible { background:#003d75; transform:scale(1.05); }
.feedback-fab:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
@media print { .feedback-fab { display:none !important; } }

/* === OFFLINE BANNER === */
.offline-banner {
    background:var(--warning); color:#fff; text-align:center;
    padding:8px 16px; font-size:.85rem; font-weight:600;
    position:sticky; top:0; z-index:1100;
}
.sync-badge {
    display:inline-block; background:var(--accent); color:var(--text);
    font-size:.75rem; font-weight:600; padding:4px 10px; border-radius:12px;
    margin-left:auto; white-space:nowrap;
}
.sync-badge.sync-active { animation: pulse-sync 1.2s ease-in-out infinite; }
@keyframes pulse-sync { 0%,100% { opacity:1; } 50% { opacity:.5; } }

/* === ROW DANGER (habilitations expirees) === */
.row-danger { background: var(--red-light); }

/* === DETAIL ROW (incidents) === */
.detail-row { margin-bottom:6px; }

/* === MODELE DETAIL === */
.modele-detail { margin-top:1rem; border-top:1px solid var(--gray-200); padding-top:.75rem; }
.modele-item { font-size:.85rem; padding:.3rem 0 .3rem 1rem; }

/* === IMPERSONATION BANNER (super admin) === */
.impersonation-banner {
    position:sticky; top:0; z-index:1000;
    display:flex; align-items:center; justify-content:space-between;
    padding:8px 16px; background:var(--danger); color:#fff;
    font-weight:600; font-size:0.875rem;
}
.impersonation-banner .btn { background:#fff; color:var(--danger); border:none; font-weight:600; }

/* === DARK MODE — overrides apres les composants pour gagner la cascade === */
@media (prefers-color-scheme: dark) {
    .toast { background: var(--gray-100); }
    .btn-outline { color: var(--text); border-color: var(--border); }
    .impersonation-banner .btn { background: var(--bg-card); }
    .signature-canvas { background: var(--bg-card); }
    nav { background: #0a1a2e; }
}
