/* ============================================================
   Veille Info — Composants UI partagés (admin + user)
   Chargé dans tous les layouts : admin_sidebar, user, gestionnaire
   ============================================================ */

/* ── Variables partagées ────────────────────────────────── */
:root {
    --card-radius: 0.5rem;
    --transition: 0.22s ease;

    /* Système de boutons btn-vi-* — charte institutionnelle marchés publics */
    --vi-btn-radius:      0.375rem;
    --vi-btn-font-size:   0.875rem;   /* 14px — lisibilité organismes publics */
    --vi-btn-font-weight: 500;
    --vi-btn-padding:     0.45rem 1.1rem;
    --vi-btn-transition:  all 0.18s ease;

    /* Primary — bleu marine institutionnel (ratio 12.4:1) */
    --vi-primary-bg:      #003783;
    --vi-primary-hover:   #002b68;
    --vi-primary-text:    #ffffff;

    /* Action — bleu action (ratio 7.3:1) */
    --vi-action-border:     #0055b3;
    --vi-action-text:       #0055b3;
    --vi-action-hover-bg:   #0055b3;
    --vi-action-hover-text: #ffffff;

    /* Edit — anthracite (ratio 11.4:1) */
    --vi-edit-border:     #3b4351;
    --vi-edit-text:       #3b4351;
    --vi-edit-hover-bg:   #3b4351;
    --vi-edit-hover-text: #ffffff;

    /* Delete — rouge bordeaux (ratio 8.3:1) */
    --vi-delete-border:     #b91c1c;
    --vi-delete-text:       #b91c1c;
    --vi-delete-hover-bg:   #b91c1c;
    --vi-delete-hover-text: #ffffff;

    /* Back */
    --vi-back-border:     #9ca3af;
    --vi-back-text:       #4b5563;
    --vi-back-hover-bg:   #f3f4f6;
    --vi-back-hover-text: #1f2937;

    /* Secondary */
    --vi-secondary-bg:    #f3f4f6;
    --vi-secondary-text:  #374151;
    --vi-secondary-hover: #e5e7eb;
}

/* ── Flash messages ──────────────────────────────────────── */
.flash-container {
    padding: 0 1.5rem;
    margin-top: 0.75rem;
}

/* ── Notification Mercure ────────────────────────────────── */
/* #messages est un conteneur de données (data-topics, data-mercure-url) uniquement.
   Les notifications sont affichées via viToast() — aucun style de positionnement ici. */
#messages {
    display: none;
}

/* ============================================================
   Système de boutons — btn-vi-*
   ============================================================ */

/* Base commune */
[class^="btn-vi-"],
[class*=" btn-vi-"] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: var(--vi-btn-padding);
    font-size: var(--vi-btn-font-size);
    font-weight: var(--vi-btn-font-weight);
    border-radius: var(--vi-btn-radius);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: var(--vi-btn-transition);
    white-space: nowrap;
    line-height: 1.4;
}

[class^="btn-vi-"]:focus-visible,
[class*=" btn-vi-"]:focus-visible {
    outline: 3px solid #003783;
    outline-offset: 2px;
}

/* btn-sm — taille compacte lisible (tableaux, listings) */
[class^="btn-vi-"].btn-sm,
[class*=" btn-vi-"].btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.825rem;
    gap: 0.28rem;
}

/* Cible tactile minimale sur mobile (WCAG 2.5.5) */
@media (max-width: 768px) {
    [class^="btn-vi-"],
    [class*=" btn-vi-"] {
        min-height: 44px;
    }
}

/* Primary */
.btn-vi-primary {
    background: var(--vi-primary-bg);
    border-color: var(--vi-primary-bg);
    color: var(--vi-primary-text);
}
.btn-vi-primary:hover,
.btn-vi-primary:focus-visible {
    background: var(--vi-primary-hover);
    border-color: var(--vi-primary-hover);
    color: var(--vi-primary-text);
}

/* Action */
.btn-vi-action {
    background: transparent;
    border-color: var(--vi-action-border);
    color: var(--vi-action-text);
}
.btn-vi-action:hover,
.btn-vi-action:focus-visible {
    background: var(--vi-action-hover-bg);
    color: var(--vi-action-hover-text);
}

/* Edit */
.btn-vi-edit {
    background: transparent;
    border-color: var(--vi-edit-border);
    color: var(--vi-edit-text);
}
.btn-vi-edit:hover,
.btn-vi-edit:focus-visible {
    background: var(--vi-edit-hover-bg);
    border-color: var(--vi-edit-hover-bg);
    color: var(--vi-edit-hover-text);
}

/* Delete */
.btn-vi-delete {
    background: transparent;
    border-color: var(--vi-delete-border);
    color: var(--vi-delete-text);
}
.btn-vi-delete:hover,
.btn-vi-delete:focus-visible {
    background: var(--vi-delete-hover-bg);
    border-color: var(--vi-delete-hover-bg);
    color: var(--vi-delete-hover-text);
}

/* Delete solid (modals de confirmation) */
.btn-vi-delete-solid {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}
.btn-vi-delete-solid:hover,
.btn-vi-delete-solid:focus-visible {
    background: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
}

/* Back */
.btn-vi-back {
    background: transparent;
    border-color: var(--vi-back-border);
    color: var(--vi-back-text);
}
.btn-vi-back:hover,
.btn-vi-back:focus-visible {
    background: var(--vi-back-hover-bg);
    color: var(--vi-back-hover-text);
}

/* Secondary */
.btn-vi-secondary {
    background: var(--vi-secondary-bg);
    border-color: var(--vi-back-border);
    color: var(--vi-secondary-text);
}
.btn-vi-secondary:hover,
.btn-vi-secondary:focus-visible {
    background: var(--vi-secondary-hover);
    color: #1e293b;
}

/* Large */
.btn-vi-lg {
    padding: 0.6rem 1.4rem;
    font-size: 0.9375rem;
}

/* ── Dropdown "Actions" ───────────────────────────────────── */
.btn-vi-actions {
    background: transparent;
    border: 1px solid #9ca3af;
    border-radius: var(--vi-btn-radius);
    color: #3b4351;
    font-size: var(--vi-btn-font-size);
    font-weight: var(--vi-btn-font-weight);
    padding: var(--vi-btn-padding);
    transition: var(--vi-btn-transition);
    white-space: nowrap;
}
.btn-vi-actions:hover,
.btn-vi-actions:focus-visible {
    background: #f3f4f6;
    border-color: #3b4351;
    color: #1f2937;
}
.btn-vi-actions.show {
    background: #e5e7eb;
    border-color: #3b4351;
    color: #1f2937;
}

.vi-dropdown-menu {
    min-width: 160px;
    padding: 0.25rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    font-size: var(--vi-btn-font-size);
}

.vi-dropdown-menu .dropdown-item {
    padding: 0.45rem 0.9rem;
    border-radius: 0;
    transition: background 0.12s ease;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #374151;
    font-weight: 450;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.vi-dropdown-menu .dropdown-item.vi-di-action { color: #0055b3; }
.vi-dropdown-menu .dropdown-item.vi-di-action:hover,
.vi-dropdown-menu .dropdown-item.vi-di-action:focus { background: #eff6ff; color: #003f8a; }

.vi-dropdown-menu .dropdown-item.vi-di-edit { color: #3b4351; }
.vi-dropdown-menu .dropdown-item.vi-di-edit:hover,
.vi-dropdown-menu .dropdown-item.vi-di-edit:focus { background: #f3f4f6; color: #1f2937; }

.vi-dropdown-menu .dropdown-item.vi-di-warning { color: #92400e; }
.vi-dropdown-menu .dropdown-item.vi-di-warning:hover,
.vi-dropdown-menu .dropdown-item.vi-di-warning:focus { background: #fffbeb; color: #78350f; }

.vi-dropdown-menu .dropdown-item.vi-di-success { color: #166534; }
.vi-dropdown-menu .dropdown-item.vi-di-success:hover,
.vi-dropdown-menu .dropdown-item.vi-di-success:focus { background: #f0fdf4; color: #14532d; }

.vi-dropdown-menu .dropdown-item.vi-di-danger { color: #b91c1c; }
.vi-dropdown-menu .dropdown-item.vi-di-danger:hover,
.vi-dropdown-menu .dropdown-item.vi-di-danger:focus { background: #fef2f2; color: #991b1b; }

/* ============================================================
   Composants SaaS — réutilisables sur toutes les pages
   ============================================================ */

/* ── Stats / KPI Cards ──────────────────────────────────── */
.vi-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.vi-stat-card {
    background: #ffffff;
    border-radius: var(--card-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-left: 3px solid transparent;
    transition: box-shadow var(--transition);
}
.vi-stat-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
    .vi-stat-card:hover {
        transform: none;
        transition: none;
    }
}

@media (max-width: 480px) {
    .vi-stats-row {
        grid-template-columns: 1fr;
    }
}

.vi-stat-card--blue   { border-left-color: #3b82f6; }
.vi-stat-card--green  { border-left-color: #22c55e; }
.vi-stat-card--red    { border-left-color: #ef4444; }
.vi-stat-card--amber  { border-left-color: #f59e0b; }
.vi-stat-card--slate  { border-left-color: #94a3b8; }
.vi-stat-card--violet { border-left-color: #8b5cf6; }


.vi-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.vi-stat-card--blue   .vi-stat-icon { background: #eff6ff; color: #3b82f6; }
.vi-stat-card--green  .vi-stat-icon { background: #f0fdf4; color: #22c55e; }
.vi-stat-card--red    .vi-stat-icon { background: #fef2f2; color: #ef4444; }
.vi-stat-card--amber  .vi-stat-icon { background: #fffbeb; color: #f59e0b; }
.vi-stat-card--slate  .vi-stat-icon { background: #f1f5f9; color: #64748b; }
.vi-stat-card--violet .vi-stat-icon { background: #f5f3ff; color: #8b5cf6; }

.vi-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.vi-stat-label {
    font-size: 0.75rem;
    color: #4b5563;
    margin-top: 0.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Notification panel ─────────────────────────────────── */
/* ── Notification badge (cloche) ────────────────────────────────── */
.vi-notif-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
    border: 2px solid #fff;
}

/* ── Panel dropdown ──────────────────────────────────────────────── */
.vi-notif-panel {
    width: 360px !important;
    min-width: 360px !important;
    padding: 0 !important;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.14) !important;
    border-radius: 10px !important;
    margin-top: 6px !important;
}

@media (max-width: 400px) {
    .vi-notif-panel {
        width: calc(100vw - 1rem) !important;
        min-width: unset !important;
    }
}

/* ── Header fixe ─────────────────────────────────────────────────── */
.vi-notif-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.8rem 1rem !important;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
    gap: 0.5rem;
}

.vi-notif-header-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
}

.vi-notif-read-all {
    font-size: 0.73rem;
    color: #3b82f6;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
    display: inline !important;
    width: auto !important;
    float: none !important;
}
.vi-notif-read-all:hover {
    color: #1d4ed8;
    text-decoration: underline;
    background: none !important;
}

/* ── Items ───────────────────────────────────────────────────────── */
.vi-notif-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
    white-space: normal !important;
}
.vi-notif-item:last-child { border-bottom: none; }
.vi-notif-item:hover,
.vi-notif-item:focus { background: #f8fafc !important; outline: none; }
.vi-notif-item--unread { background: #eff6ff !important; }
.vi-notif-item--unread:hover,
.vi-notif-item--unread:focus { background: #dbeafe !important; }

.vi-notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    background: #eff6ff;
    color: #3b82f6;
}
.vi-notif-icon--info    { background: #eff6ff; color: #3b82f6; }
.vi-notif-icon--success { background: #f0fdf4; color: #22c55e; }
.vi-notif-icon--warning { background: #fffbeb; color: #f59e0b; }
.vi-notif-icon--danger  { background: #fef2f2; color: #ef4444; }
.vi-notif-icon--error   { background: #fef2f2; color: #ef4444; }

.vi-notif-text {
    flex: 1;
    min-width: 0;
}
.vi-notif-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: #111827;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}
.vi-notif-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* ── État vide ───────────────────────────────────────────────────── */
.vi-notif-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.82rem;
}

/* ── Notification bell — navbar gestionnaire / user ──────── */
.navbar-notif-dropdown {
    display: flex;
    align-items: center;
    margin-right: .5rem;
}
.navbar-notif-btn {
    position: relative;
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    color: #374151;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    transition: background .15s, color .15s;
}
.navbar-notif-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

@keyframes bell-ring {
    0%,100% { transform: rotate(0deg); }
    15%      { transform: rotate(-18deg); }
    35%      { transform: rotate(14deg); }
    55%      { transform: rotate(-10deg); }
    75%      { transform: rotate(6deg); }
}
.bell-ringing i { animation: bell-ring 0.65s ease; }

/* ── Top rank badge (dashboard most-consulted) ──────────── */
.vi-top-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}
.vi-top-rank--1 { background: #fef3c7; color: #92400e; }
.vi-top-rank--2 { background: #f1f5f9; color: #334155; }
.vi-top-rank--3 { background: #fff7ed; color: #9a3412; }

.vi-top-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}
.vi-top-item:last-child { border-bottom: none; }
.vi-top-item:hover { background: #f8fafc; }

/* ── Avatar ─────────────────────────────────────────────── */
.vi-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    user-select: none;
}

.vi-avatar-sm  { width: 30px;  height: 30px;  font-size: 0.65rem; }
.vi-avatar-md  { width: 40px;  height: 40px;  font-size: 0.85rem; }
.vi-avatar-lg  { width: 56px;  height: 56px;  font-size: 1.15rem; }
.vi-avatar-xl  { width: 72px;  height: 72px;  font-size: 1.5rem;  }

.vi-avatar-blue   { background: #3b82f6; }
.vi-avatar-green  { background: #22c55e; }
.vi-avatar-violet { background: #8b5cf6; }
.vi-avatar-orange { background: #f59e0b; }
.vi-avatar-teal   { background: #14b8a6; }

/* ── Badges rôle / statut ───────────────────────────────── */
.vi-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.71rem;
    font-weight: 600;
    padding: 0.22em 0.6em;
    border-radius: 999px;
    letter-spacing: 0.01em;
    line-height: 1.5;
    white-space: nowrap;
}

.vi-badge-admin    { background: #fef2f2; color: #b91c1c; } /* 8.3:1 */
.vi-badge-manager  { background: #fffbeb; color: #92400e; } /* 7.2:1 */
.vi-badge-user     { background: #eff6ff; color: #0055b3; } /* 7.3:1 */
.vi-badge-active   { background: #f0fdf4; color: #166534; } /* 7.4:1 */
.vi-badge-inactive { background: #fef2f2; color: #b91c1c; } /* 8.3:1 */
.vi-badge-group    { background: #eff6ff; color: #0055b3; } /* 7.3:1 */
.vi-badge-nogroup  { background: #f9fafb; color: #6b7280; } /* 5.7:1 */
.vi-badge-info     { background: #f0f9ff; color: #0369a1; } /* 7.3:1 */
.vi-badge-warning  { background: #fffbeb; color: #92400e; } /* 7.2:1 */
.vi-badge-success  { background: #f0fdf4; color: #166534; } /* 7.4:1 */
.vi-badge-danger   { background: #fef2f2; color: #b91c1c; } /* 8.3:1 */

/* ── Profile header ─────────────────────────────────────── */
.vi-profile-header {
    background: #ffffff;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.vi-profile-header-info { flex: 1; min-width: 0; }

.vi-profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.3rem;
    line-height: 1.2;
}

.vi-profile-email {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.vi-profile-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vi-profile-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ── Info sections (pages show / détail) ─────────────────── */
.vi-info-section {
    background: #ffffff;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    height: 100%;
}

.vi-info-section-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.vi-info-section-body { padding: 1.25rem; }

.vi-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

@media (max-width: 576px) {
    .vi-info-grid { grid-template-columns: 1fr; }
}

.vi-info-item { display: flex; flex-direction: column; gap: 0.2rem; }

.vi-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.vi-info-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

.vi-info-value.text-muted { color: #9ca3af !important; font-style: italic; }

/* ── Form card (new / edit) ─────────────────────────────── */
.vi-form-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 991px) {
    .vi-form-layout { grid-template-columns: 1fr; }
}

.vi-form-card {
    background: #ffffff;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.vi-form-card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fafafa;
}

/* Neutralise les styles navigateur des <h2>/<h3> — RGAA 9.1 */
.vi-form-card-title {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: inherit;
}

.vi-form-card-body { padding: 1.25rem; }

.vi-form-card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vi-form-field { margin-bottom: 1.1rem; }
.vi-form-field:last-child { margin-bottom: 0; }

.vi-form-field > label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}

.vi-form-field .form-control,
.vi-form-field select.form-control,
.vi-form-field select {
    font-size: 0.875rem;
    border-color: #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.45rem 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    color: #374151;
}

.vi-form-field .form-control:focus,
.vi-form-field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.vi-form-field .form-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    display: block;
}

.vi-help-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
}

.vi-help-card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.vi-help-card-body { padding: 1rem; }

.vi-help-item {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.875rem;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.45;
}
.vi-help-item:last-child { margin-bottom: 0; }

.vi-help-icon {
    width: 18px;
    flex-shrink: 0;
    color: #3b82f6;
    font-size: 0.875rem;
    margin-top: 0.1rem;
}

/* ── Table enhancements ──────────────────────────────────── */
.vi-table-user td,
.vi-table-user th { vertical-align: middle; }

.vi-user-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.vi-user-cell-info { display: flex; flex-direction: column; min-width: 0; }

.vi-user-cell-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.vi-user-cell-email {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

@media (max-width: 480px) {
    .vi-user-cell-email {
        max-width: 100px;
    }
}

/* ── Empty state ─────────────────────────────────────────── */
.vi-empty-state {
    padding: 3.5rem 1.5rem;
    text-align: center;
    color: #9ca3af;
}

/* Enfant direct uniquement : sinon cette règle repeint aussi l'icône du bouton
   d'action de partials/_no_data.html.twig */
.vi-empty-state > i {
    font-size: 2.5rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.875rem;
}

.vi-empty-state p { margin: 0; font-size: 0.875rem; }

/* ============================================================
   Composant modal — vi-modal
   ============================================================ */
.vi-modal .modal-content {
    border: none;
    border-radius: 0.625rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.vi-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #1e2a3a 0%, #2d3f55 100%);
    border-bottom: none;
    gap: 0.75rem;
}

.vi-modal-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.vi-modal-icon {
    width: 30px;
    height: 30px;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #93c5fd;
    flex-shrink: 0;
}

.vi-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}
.vi-modal-close:hover { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
.vi-modal-close:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

.vi-modal-body {
    padding: 1.5rem 1.25rem;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.6;
}

.vi-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    flex-wrap: wrap;
}

/* ── Documentation content ───────────────────────────────── */
.vi-doc-content h1,
.vi-doc-content h2,
.vi-doc-content h3 {
    color: #111827;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}
.vi-doc-content h1 { font-size: 1.15rem; }
.vi-doc-content h2 { font-size: 1rem; }
.vi-doc-content h3 { font-size: 0.9rem; }
.vi-doc-content p  { margin-bottom: 0.75rem; }
.vi-doc-content ul,
.vi-doc-content ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.vi-doc-content li { margin-bottom: 0.25rem; }
.vi-doc-content code {
    background: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.82em;
    color: #e11d48;
}
.vi-doc-content blockquote {
    border-left: 3px solid #3b82f6;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    border-radius: 0 0.375rem 0.375rem 0;
    color: #1e40af;
    margin: 0.75rem 0;
}

/* ── Sélection utilisateurs — groupe show ────────────────── */
.vi-user-row {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    animation: vi-fade-slide-in 0.2s ease both;
}
.vi-user-row:hover {
    background-color: #f0f6ff !important;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.08);
}
@keyframes vi-fade-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vi-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.vi-user-row-remove {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}
.vi-user-row-remove:hover { background-color: #fee2e2; color: #b91c1c; }

/* ============================================================
   Badges sémantiques — module Ressource
   Remplacement des bg-violet-c64, bg-bordeaux, bg-blue etc.
   ============================================================ */

.badge-source {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 0.25rem;
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-source:hover { background: #ddd6fe; color: #4c1d95; text-decoration: none; }

.badge-auteur {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-auteur:hover { background: #e2e8f0; color: #1e293b; text-decoration: none; }

.badge-motcle {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-motcle:hover { background: #fef3c7; color: #78350f; text-decoration: none; }

.badge-typemedia {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-typemedia:hover { background: #dbeafe; color: #1e3a8a; text-decoration: none; }

.badge-rubrique {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #86efac;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-rubrique:hover { background: #dcfce7; color: #14532d; text-decoration: none; }

/* ── Rang ordinal sobre (listing consultes) ─────────────── */
/* Chiffre cerclé, neutre, lisible — pas de couleur jeu     */
.badge-rang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #374151;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    flex-shrink: 0;
}
/* Les 3 premiers : accentuation discrète par la couleur du bord uniquement */
.badge-rang-1 { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.badge-rang-2 { border-color: #475569; color: #334155; background: #f1f5f9; }
.badge-rang-3 { border-color: #94a3b8; color: #475569; background: #f8fafc; }

/* Compteur de consultations inline dans la cellule Titre */
.badge-consultations-count {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 500;
    border-radius: 0.2rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* Compteur de consultations dans le tableau Top 3 */
.vi-consult-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

/* ============================================================
   Page détail ressource — layout 2 colonnes
   ============================================================ */

.ressource-detail-header {
    margin-bottom: 1.25rem;
}

.ressource-detail-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.ressource-type-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 1px solid #bfdbfe;
}

.ressource-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.ressource-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.ressource-detail-actions {
    flex-shrink: 0;
    margin-left: auto;
}

/* Le header de la fiche ressource contient un dropdown —
   overflow:visible pour ne pas le couper (override vi-form-card) */
.ressource-detail-header {
    overflow: visible;
}

.ressource-detail-sidebar {
    /* layout pleine largeur — sidebar sous le contenu principal */
}

@media (max-width: 992px) {
    .ressource-detail-hero {
        flex-wrap: wrap;
    }
}

/* ── Grille métadonnées horizontale ─────────────────────── */
.ressource-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem 1.5rem;
}

.ressource-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ressource-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    white-space: nowrap;
}

.ressource-meta-value {
    font-size: 0.8125rem;
    color: #374151;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

/* ── Titre section card ──────────────────────────────────── */
.vi-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.vi-card-title i { color: #6b7280; }

/* ── Métadonnées (dl/dt/dd) ─────────────────────────────── */
.vi-meta-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.1rem 0.75rem;
    align-items: baseline;
}

.vi-meta-list dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    padding-top: 0.65rem;
    white-space: nowrap;
}

.vi-meta-list dd {
    font-size: 0.8125rem;
    color: #374151;
    margin: 0;
    padding-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

/* ── Attachments list ────────────────────────────────────── */
.attachment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.attachment-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8125rem;
    color: #374151;
}

.attachment-list li:last-child { border-bottom: none; }

.attachment-list li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-list li a:hover { text-decoration: underline; }

.attachment-list li a i { color: #6b7280; flex-shrink: 0; }

/* ── Contenu ressource ──────────────────────────────────── */
.ressource-contenu {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #1f2937;
}

.ressource-contenu p { margin-bottom: 0.875rem; }

.ressource-contenu h2, .ressource-contenu h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 1.25rem 0 0.5rem;
}

/* ── Stat KPI inline (consultation, prix) ───────────────── */
.vi-kpi-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.vi-kpi-inline-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    text-align: center;
}

.vi-kpi-inline-card .vi-stat-value { font-size: 1.25rem; }
.vi-kpi-inline-card .vi-stat-label { margin-top: 0.1rem; }

/* ── Vote like / dislike ────────────────────────────────── */
.btn-vote {
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 2rem;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    color: #64748b;
    white-space: nowrap;
}

.btn-vote .fa { font-size: 1.1rem; }

.btn-like:hover,
.btn-like:focus-visible {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

.btn-dislike:hover,
.btn-dislike:focus-visible {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.btn-like.active  { background: #f0fdf4; border-color: #22c55e; color: #16a34a; }
.btn-dislike.active { background: #fef2f2; border-color: #ef4444; color: #dc2626; }

.vote-bar-track {
    height: 8px;
    background: #fee2e2;
    border-radius: 99px;
    overflow: hidden;
}

.vote-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.vote-bar-label {
    font-size: 0.7rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .vote-bar-fill { transition: none; }
}

/* ── Toast notifications ─────────────────────────────────── */
.vi-toast-container {
    position: fixed;
    top: 1.25rem;
    left: 1.5rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: calc(100% - 3rem);
    pointer-events: none;
}

.vi-toast {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid transparent;
    pointer-events: all;
    animation: vi-toast-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
               vi-toast-glow 0.6s ease 0.2s;
}

.vi-toast--success { border-left-color: #22c55e; }
.vi-toast--danger  { border-left-color: #ef4444; }
.vi-toast--warning { border-left-color: #f59e0b; }
.vi-toast--info    { border-left-color: #3b82f6; }

.vi-toast-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.vi-toast--success .vi-toast-icon { background: #f0fdf4; color: #16a34a; }
.vi-toast--danger  .vi-toast-icon { background: #fef2f2; color: #dc2626; }
.vi-toast--warning .vi-toast-icon { background: #fffbeb; color: #92400e; }
.vi-toast--info    .vi-toast-icon { background: #eff6ff; color: #2563eb; }

.vi-toast-body {
    flex: 1;
    font-size: 0.875rem;
    color: #1e293b;
    line-height: 1.45;
    margin: 0;
    align-self: center;
}

.vi-toast-close {
    background: none;
    border: none;
    padding: 0.1rem;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    font-size: 0.8rem;
    align-self: flex-start;
    transition: color 0.15s ease;
}
.vi-toast-close:hover { color: #374151; }

@keyframes vi-toast-in {
    0%   { opacity: 0;   transform: translateY(-0.75rem) scale(0.96); }
    55%  { opacity: 1;   transform: translateY(4px)      scale(1.02); }
    75%  { transform: translateY(-2px) scale(0.995); }
    100% { opacity: 1;   transform: translateY(0)        scale(1);    }
}
@keyframes vi-toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-0.5rem) scale(0.95); }
}
@keyframes vi-toast-glow {
    0%   { box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
    40%  { box-shadow: 0 0 0 5px rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.18); }
    100% { box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
}

@media (max-width: 576px) {
    .vi-toast-container {
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
    }
}

/* ── Datepicker input-group ───────────────────────────────────────────── */
.vi-datepicker-input-group .form-control {
    border-right: none;
    background-color: #fff;
    cursor: pointer;
}
.vi-datepicker-input-group .form-control:read-only:focus {
    border-color: #ced4da;
    box-shadow: none;
}
.vi-datepicker-btn {
    border: 1px solid #ced4da;
    border-left: none;
    background: #f8fafc;
    color: #64748b;
    padding: 0 0.75rem;
    transition: background 0.15s, color 0.15s;
    border-radius: 0 0.375rem 0.375rem 0;
}
.vi-datepicker-btn:hover,
.vi-datepicker-btn:focus {
    background: #e2e8f0;
    color: #1e3a5f;
    border-color: #ced4da;
    outline: none;
    box-shadow: none;
}
.vi-datepicker-input-group:focus-within .vi-datepicker-btn {
    border-color: #86b7fe;
}

/* ── Filigrane inline ─────────────────────────────────────────────────── */
.vi-filigrane-inline {
    height: 38px; /* aligne verticalement avec les inputs Bootstrap */
}

/* ── Form card optionnelle (facturation) ──────────────────────────────── */
.vi-form-card--muted {
    border-color: #e2e8f0;
    background: #fafafa;
}
/* Le header est un <button> — override du padding hérité de vi-form-card-header */
.vi-form-card--muted .vi-form-card-header.vi-collapsible-header {
    padding: 0;
}
.vi-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    padding: 0.85rem 1.25rem;
    color: inherit;
    border-radius: 0;
}
.vi-collapsible-header:hover,
.vi-collapsible-header:focus-visible {
    background: #f1f5f9;
    outline: none;
}
.vi-collapse-icon {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.vi-collapsible-header[aria-expanded="true"] .vi-collapse-icon {
    transform: rotate(180deg);
}
.vi-optional-badge {
    font-size: 0.68rem;
    font-weight: 500;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* ── Bouton submit ressource ──────────────────────────────────────────── */
.vi-submit-ressource {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
    transition: box-shadow 0.2s, transform 0.15s;
}
.vi-submit-ressource:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}
.vi-submit-ressource:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}
.vi-submit-ressource:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* ── Commentaires ────────────────────────────────────────── */
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.comment-item:last-child { border-bottom: none; }

.comment-item--pending { opacity: 0.85; background: #fffbeb; border-radius: 0.5rem; padding: 1rem; }

.comment-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
}

.comment-avatar--pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.comment-body { flex: 1; min-width: 0; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
}

.comment-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.comment-status-pending {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    background: #fef9c3;
    color: #a16207;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comment-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.comment-content {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ── Boutons d'action commentaire ────────────────────────── */
.btn-comment-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    line-height: 1.5;
}
.btn-comment-action:hover { text-decoration: none; }

.btn-comment-action.btn-reply       { color: #0055b3; border-color: #bfdbfe; }
.btn-comment-action.btn-reply:hover { background: #eff6ff; color: #003783; }

.btn-comment-action.btn-subscribe         { color: #d97706; border-color: #fde68a; }
.btn-comment-action.btn-subscribe:hover   { background: #fffbeb; }
.btn-comment-action.btn-unsubscribe       { color: #64748b; border-color: #e2e8f0; }
.btn-comment-action.btn-unsubscribe:hover { background: #f8fafc; }

.btn-comment-action.btn-validate         { color: #16a34a; border-color: #bbf7d0; }
.btn-comment-action.btn-validate:hover   { background: #f0fdf4; }
.btn-comment-action.btn-invalidate       { color: #d97706; border-color: #fde68a; }
.btn-comment-action.btn-invalidate:hover { background: #fffbeb; }

.btn-comment-action.btn-edit-comment       { color: #475569; border-color: #e2e8f0; }
.btn-comment-action.btn-edit-comment:hover { background: #f8fafc; color: #1e293b; }

.btn-comment-action.btn-delete-comment       { color: #b91c1c; border-color: #fecaca; }
.btn-comment-action.btn-delete-comment:hover { background: #fef2f2; }

/* ── Réponses (thread) ───────────────────────────────────── */
.comment-replies {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 3px solid #e2e8f0;
}

.reply-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
}
.reply-item:last-child { border-bottom: none; }

.reply-avatar {
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    user-select: none;
}

/* ── État vide commentaires ──────────────────────────────── */
.comment-section-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
}

/* ── Responsive commentaires ─────────────────────────────── */
@media (max-width: 576px) {
    .comment-avatar { width: 2rem; height: 2rem; font-size: 0.65rem; }
    .comment-item   { gap: 0.75rem; }
    .comment-actions { gap: 0.3rem; }
    .btn-comment-action { font-size: 0.68rem; padding: 0.18rem 0.5rem; }
}

/* ── Accessibilité — prefers-reduced-motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Détail ressource — layout 2 colonnes (journal)
   ============================================================ */

/* Topbar sticky */
.vi-ressource-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.625rem 0; /* aligné sur container-fluid px-0 — padding horizontal géré par .page-content */
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.vi-ressource-topbar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    max-width: 480px;
    line-height: 1.3;
}

/* Sidebar sticky */
.vi-ressource-sidebar {
    position: sticky;
    top: 56px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

/* Introduction — bloc mise en valeur */
.vi-ressource-intro {
    padding: 1rem 1.25rem;
    border-left: 3px solid #3b82f6;
    background: #f8faff;
    border-radius: 0 6px 6px 0;
    color: #475569;
    font-size: 0.9375rem;
    font-style: italic;
    line-height: 1.7;
}

/* Contenu : lisibilité optimale */
.ressource-contenu {
    max-width: 68ch;
}

/* Sidebar meta list — version compacte */
.vi-sidebar-meta-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
}

.vi-sidebar-meta-list dt,
.vi-sidebar-meta-list dd {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.vi-sidebar-meta-list dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    white-space: nowrap;
    align-items: center;
    background: #fafafa;
}

.vi-sidebar-meta-list dd {
    font-size: 0.8125rem;
    color: #374151;
}

.vi-sidebar-meta-list dt:last-of-type,
.vi-sidebar-meta-list dd:last-of-type {
    border-bottom: none;
}

/* Icône cercle dans les KPI stat sidebar */
.vi-stat-icon-circle {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* KPI inline dans sidebar */
.vi-kpi-inline-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.vi-kpi-inline-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-top: 0.2rem;
}

/* ── Sidebar commentaires live ───────────────────────────────────────── */
.vi-sidebar-comment {
    display: flex;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}
.vi-sidebar-comment:last-child {
    border-bottom: none;
}

.vi-sidebar-comment-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.vi-sidebar-comment-body {
    flex: 1;
    min-width: 0;
}

.vi-sidebar-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.vi-sidebar-comment-author {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
}

.vi-sidebar-comment-date {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
}

.vi-sidebar-comment-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.1rem;
}

.vi-sidebar-comment-content {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
    word-break: break-word;
}

/* Animation entrée nouveau commentaire live */
@keyframes vi-comment-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vi-comment-live-enter {
    animation: vi-comment-slide-in 0.35s ease forwards;
    background: #f0fdf4;
    border-left: 3px solid #10b981;
}

/* Fade-out après 3s */
.vi-comment-live-enter.vi-comment-settled {
    background: transparent;
    border-left-color: transparent;
    transition: background 0.6s ease, border-left-color 0.6s ease;
}

/* ── Upload dropzone ─────────────────────────────────────────────────── */
.vi-dropzone {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.875rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    text-align: left;
    margin-bottom: 0;
}

.vi-dropzone:hover,
.vi-dropzone:focus-within {
    border-color: #3b82f6;
    background: #eff6ff;
}

.vi-dropzone--active {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.vi-dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.vi-dropzone-icon {
    font-size: 1.5rem;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.2s;
}

.vi-dropzone:hover .vi-dropzone-icon,
.vi-dropzone--active .vi-dropzone-icon {
    color: #3b82f6;
}

/* Wrapper vertical : titre + hint */
.vi-dropzone-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.vi-dropzone-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.4;
}

/* Lien "parcourir" stylisé à l'intérieur du texte */
.vi-dropzone-link {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.vi-dropzone-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
}

/* Badge actions rapides à droite de la dropzone */
.vi-dropzone-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #6b7280;
    background: #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .vi-dropzone-badge { display: none; }
}

/* Liste de fichiers sélectionnés — lignes groupées */
.vi-file-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
}

.vi-file-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    font-size: 0.8125rem;
    color: #374151;
    max-width: 100%;
    transition: background 0.15s;
}

.vi-file-item:first-child {
    border-top: 1px solid #e2e8f0;
    border-radius: 0.375rem 0.375rem 0 0;
}

.vi-file-item:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

.vi-file-item:only-child {
    border-radius: 0.375rem;
    border-top: 1px solid #e2e8f0;
}

.vi-file-item:hover {
    background: #f8fafc;
}

.vi-file-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.vi-file-item-icon--pdf   { color: #ef4444; }
.vi-file-item-icon--img   { color: #8b5cf6; }
.vi-file-item-icon--xls   { color: #16a34a; }
.vi-file-item-icon--doc   { color: #2563eb; }
.vi-file-item-icon--other { color: #6b7280; }

.vi-file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    min-width: 0;
}

.vi-file-item-size {
    font-size: 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Nom de fichier cliquable */
.vi-file-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}
.vi-file-item-link:hover {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.vi-file-item-ext-icon {
    font-size: 0.7rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.vi-file-item-remove {
    background: none;
    border: none;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.8rem;
    flex-shrink: 0;
    line-height: 1;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}
.vi-file-item-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Barre d'actions — footer attaché à la liste */
.vi-upload-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid #e2e8f0;
}

/* ── Import Excel dropzone (form submit — non AJAX) ─────────────────── */
.vi-dropzone--import {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.75rem 1.25rem;
    gap: 0.5rem;
}

.vi-dropzone--import .vi-dropzone-icon {
    font-size: 2rem;
    color: #16a34a;
}

.vi-dropzone--import:hover .vi-dropzone-icon,
.vi-dropzone--import.vi-dropzone--active .vi-dropzone-icon {
    color: #15803d;
}

.vi-dropzone--import .vi-dropzone-body {
    align-items: center;
}

/* Chip de fichier sélectionné — s'affiche sous la dropzone */
.vi-import-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.625rem;
    padding: 0.5rem 0.875rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    color: #166534;
    font-weight: 500;
    word-break: break-all;
}

.vi-import-selected .vi-import-selected-icon {
    font-size: 1rem;
    flex-shrink: 0;
    color: #16a34a;
}

/* Mobile — sidebar sous le contenu, plus sticky */
@media (max-width: 991.98px) {
    .vi-ressource-sidebar {
        position: static;
        max-height: none;
    }
    .vi-ressource-topbar-title {
        max-width: 200px;
    }
}

/* ============================================================
   Module Tendances — composants spécifiques
   ============================================================ */

/* ── Groupes de périodes dans le formulaire filtre ────────── */
.vi-periode-group {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem 0.75rem;
    background: #f8fafc;
    height: 100%;
}

.vi-periode-group--1 {
    border-left: 3px solid #3b82f6;
    background: #f0f6ff;
}

.vi-periode-group--2 {
    border-left: 3px solid #7c3aed;
    background: #f5f3ff;
}

.vi-periode-group-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.vi-periode-group--1 .vi-periode-group-label { color: #1d4ed8; }
.vi-periode-group--2 .vi-periode-group-label { color: #6d28d9; }

/* ── Séparateur VS entre les deux périodes ────────────────── */
.vi-periode-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 0.25rem;
    margin-top: 1.75rem; /* aligne avec les inputs */
}

@media (max-width: 991.98px) {
    .vi-periode-vs {
        margin-top: 0;
        flex-direction: row;
        gap: 0.5rem;
    }
    .vi-periode-vs::before,
    .vi-periode-vs::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e2e8f0;
    }
}

/* ── Badges période P1/P2 — en-têtes colonnes tableau tendance ── */
.vi-badge-p1 { background: #e0e7ff; color: #3730a3; font-weight: 600; }
.vi-badge-p2 { background: #ede9fe; color: #5b21b6; font-weight: 600; }

/* ── Séparateur actions formulaire ────────────────────────── */
.vi-form-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

/* ── Bandeau résultats (période analysée) ─────────────────── */
.vi-result-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 0.375rem;
    padding: 0.875rem 1.125rem;
    font-size: 0.875rem;
    color: #1e3a5f;
    line-height: 1.5;
}

.vi-result-banner-icon {
    font-size: 1.125rem;
    color: #3b82f6;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.vi-result-banner-text { flex: 1; }

/* ── Badges de rang dans les tableaux ─────────────────────── */
.vi-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
    flex-shrink: 0;
}

/* Or, argent, bronze — contrastes WCAG AA */
.vi-rank-badge--1 { background: #fde68a; color: #78350f; } /* ratio >4.5:1 */
.vi-rank-badge--2 { background: #cbd5e1; color: #1e293b; }
.vi-rank-badge--3 { background: #fed7aa; color: #7c2d12; }

/* ── Badge évolution hausse/baisse ────────────────────────── */
/* Icône + texte : l'information n'est jamais transmise uniquement par la couleur (WCAG 1.4.1) */
.vi-evo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.vi-evo-badge--up   { color: #15803d; } /* ratio 4.6:1 sur blanc */
.vi-evo-badge--down { color: #b91c1c; } /* ratio 5.1:1 sur blanc */
.vi-evo-badge--flat { color: #475569; }

/* ── Guide des modes — état vide ──────────────────────────── */
.vi-mode-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.875rem;
    margin-top: 1.5rem;
    text-align: left;
}

.vi-mode-guide-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.vi-mode-guide-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.vi-mode-guide-icon {
    font-size: 1.125rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.vi-mode-guide-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.vi-mode-guide-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

/* Utilitaire absent de Bootstrap 5 (il vient de Tailwind), pourtant employé dans
   6 fichiers du projet. Sans lui, min-width vaut auto sur un enfant flex : il ne
   peut pas rétrécir sous la largeur de son contenu, et text-truncate n'opère
   jamais — d'où les titres qui débordaient de la modale de suggestions. */
.min-w-0 { min-width: 0 !important; }

/* ── Suggestions IA ─────────────────────────────────────────────── */
.suggestion-card {
    transition: background .15s, box-shadow .15s;
    color: inherit;
}
.suggestion-card:hover {
    background: #f5f3ff !important;
    box-shadow: 0 2px 8px rgba(139,92,246,.12) !important;
    color: inherit;
}
/* Titre sur deux lignes plutôt qu'une troncature sèche : un titre de presse
   coupé au tiers ne dit plus rien, même dans une modale élargie. */
.suggestion-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-evidence {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Volumétrie affichée dans l'en-tête de modale */
.vi-modal-count {
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Skeleton pulse animation */
@keyframes vi-skeleton-pulse {
    0%   { opacity: 1; }
    50%  { opacity: .45; }
    100% { opacity: 1; }
}
.skeleton-line {
    animation: vi-skeleton-pulse 1.4s ease-in-out infinite;
}

/* ── Setting nav dropdown menu ────────────────────────────────────────────── */
.vi-setting-nav-menu {
    min-width: 220px;
}
.vi-setting-nav-menu .dropdown-item.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}
.vi-setting-nav-menu .dropdown-item.active .fa {
    opacity: 1;
}

/* ── Template item — listing cards fichiers & emails ─────────────────────── */
.vi-template-item {
    transition: background-color 0.15s ease;
}

.vi-template-item:hover {
    background-color: #f8fafc;
}

.vi-template-icon {
    /* Dimensions fixées inline — flex-shrink-0 via Bootstrap */
}

/* ── Setting items (ligne label + contrôle) ─────────────── */
.vi-setting-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.vi-setting-item-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 0 0 260px;
    min-width: 0;
    padding-top: 0.25rem;
}

.vi-setting-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    padding-top: 0.1rem;
}

.vi-setting-item-control {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .vi-setting-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    .vi-setting-item-label {
        flex: none;
        width: 100%;
    }
}

/* ── Documentation accordion ────────────────────────────── */
.vi-doc-accordion-item {
    border-bottom: 1px solid #e9ecef;
}

.vi-doc-accordion-item:last-child {
    border-bottom: none;
}

.vi-doc-accordion-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fff;
    color: #1e293b;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease;
}

.vi-doc-accordion-btn:not(.collapsed) {
    background: #f8fafc;
    color: #3b82f6;
}

.vi-doc-accordion-btn::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1rem;
    transition: transform 0.2s ease;
}

.vi-doc-accordion-btn:not(.collapsed)::after {
    transform: rotate(-180deg);
}

.vi-doc-accordion-icon {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.vi-doc-accordion-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vi-doc-quill-container {
    min-height: 180px;
    border-radius: 0.375rem;
    overflow: hidden;
}

/* ── Photo viewer (vi-photo-viewer.js) ──────────────────── */
.vi-viewer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1090;
    align-items: center;
    justify-content: center;
}

.vi-viewer-overlay--open {
    display: flex;
}

.vi-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.vi-viewer-container {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 900px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.vi-viewer-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.875rem;
}

.vi-viewer-close:hover {
    background: rgba(255,255,255,0.25);
}

.vi-viewer-img-wrap {
    border-radius: 0.5rem;
    overflow: hidden;
    max-height: calc(90vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Damier pour images transparentes */
.vi-viewer-img-wrap--transparent {
    background-image:
        linear-gradient(45deg, #555 25%, transparent 25%),
        linear-gradient(-45deg, #555 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #555 75%),
        linear-gradient(-45deg, transparent 75%, #555 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #333;
    padding: 1rem;
}

.vi-viewer-img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 6rem);
    object-fit: contain;
    border-radius: 0.25rem;
}

.vi-viewer-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}

/* Curseur pointer sur les éléments déclencheurs */
[data-vi-viewer] {
    cursor: zoom-in;
}

/* ── Filigrane preview + dropzone ───────────────────────── */
.vi-filigrane-preview-wrap {
    display: inline-block;
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem;
    max-width: 200px;
}

.vi-filigrane-preview-img {
    display: block;
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.vi-filigrane-dropzone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    cursor: pointer;
    background: #f8fafc;
    transition: border-color 0.18s ease, background 0.18s ease;
    max-width: 380px;
    margin-bottom: 0.5rem;
}

.vi-filigrane-dropzone:hover,
.vi-filigrane-dropzone:focus-within {
    border-color: #3b82f6;
    background: #eff6ff;
}

.vi-filigrane-dropzone--selected {
    border-color: #22c55e;
    background: #f0fdf4;
}

.vi-filigrane-dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.vi-filigrane-dropzone-icon {
    font-size: 1.25rem;
    color: #64748b;
    flex-shrink: 0;
}

.vi-filigrane-dropzone-text {
    font-size: 0.875rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vi-filigrane-dropzone-link {
    color: #3b82f6;
    font-weight: 500;
}

/* ── Quill editor container ─────────────────────────────── */
.vi-quill-editor {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

/* ============================================================
   Stat cards — Dashboard User / Gestionnaire
   Remplace bg-bordeaux / bg-green / bg-blue / bg-violet-c64
   Ratios RGAA AA (texte blanc sur fond) :
     bordeaux  #b91c1c  → 8.3:1
     vert      #166534  → 7.3:1
     primary   #003783  → 12.4:1
     amber     #92400e  → 7.0:1
     cyan      #075985  → 7.6:1
   ============================================================ */

.vi-stat-card {
    display:         flex;
    border-radius:   0.5rem;
    overflow:        hidden;
    box-shadow:      0 2px 8px rgba(0,0,0,.12);
    text-decoration: none;
    color:           #fff;
    transition:      transform .2s ease, box-shadow .2s ease;
    min-height:      6rem;
}
.vi-stat-card:hover,
.vi-stat-card:focus {
    transform:       translateY(-4px);
    box-shadow:      0 6px 18px rgba(0,0,0,.18);
    color:           #fff;
    text-decoration: none;
    outline-offset:  2px;
}
.vi-stat-card-inner {
    display:     flex;
    align-items: center;
    width:       100%;
    padding:     1.25rem 1.5rem;
    gap:         1.25rem;
}
.vi-stat-card-icon-wrapper {
    font-size:   2rem;
    opacity:     .85;
    flex-shrink: 0;
}
.vi-stat-card-content {
    display:        flex;
    flex-direction: column;
}
.vi-stat-card-count {
    font-size:   2rem;
    font-weight: 700;
    line-height: 1;
}
.vi-stat-card-label {
    font-size:   .875rem;
    font-weight: 500;
    margin-top:  .25rem;
    opacity:     .92;
}

/* Variantes couleur */
.vi-stat-card-bordeaux { background: #b91c1c; }
.vi-stat-card-bordeaux:hover,
.vi-stat-card-bordeaux:focus { background: #991b1b; }

.vi-stat-card-vert { background: #166534; }
.vi-stat-card-vert:hover,
.vi-stat-card-vert:focus { background: #14532d; }

.vi-stat-card-primary { background: #003783; }
.vi-stat-card-primary:hover,
.vi-stat-card-primary:focus { background: #002b68; }

.vi-stat-card-amber { background: #92400e; }
.vi-stat-card-amber:hover,
.vi-stat-card-amber:focus { background: #78350f; }

.vi-stat-card-cyan { background: #075985; }
.vi-stat-card-cyan:hover,
.vi-stat-card-cyan:focus { background: #0c4a6e; }

/* ═══════════════════════════════════════════════════════════════
   FullCalendar v4 — design system override
   ═══════════════════════════════════════════════════════════════ */

/* Base */
.fc {
    font-family: inherit;
    font-size: 0.875rem;
}

/* ── Toolbar ───────────────────────────────────────────────── */
.fc-header-toolbar {
    padding: 0.75rem 1rem !important;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0 !important;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-toolbar h2 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ── Boutons navigation / vues ─────────────────────────────── */
.fc-button,
.fc-button-primary {
    background-color: #ffffff !important;
    border: 1px solid var(--vi-action-border, #0055b3) !important;
    color: var(--vi-action-text, #0055b3) !important;
    border-radius: var(--vi-btn-radius, 0.375rem) !important;
    font-size: var(--vi-btn-font-size, 0.875rem) !important;
    font-weight: var(--vi-btn-font-weight, 500) !important;
    padding: 0.35rem 0.8rem !important;
    transition: var(--vi-btn-transition, all 0.18s ease) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
}

.fc-button:hover,
.fc-button-primary:hover {
    background: var(--vi-action-border, #0055b3) !important;
    color: #ffffff !important;
    border-color: var(--vi-action-border, #0055b3) !important;
}

.fc-button:not(:disabled):active,
.fc-button-primary:not(:disabled):active {
    background: var(--vi-primary-bg, #003783) !important;
    border-color: var(--vi-primary-bg, #003783) !important;
    color: #ffffff !important;
}

/* Vue active (ex: "Mois" sélectionné) */
.fc-button-primary:not(:disabled).fc-button-active {
    background: var(--vi-primary-bg, #003783) !important;
    border-color: var(--vi-primary-bg, #003783) !important;
    color: #ffffff !important;
}

/* Focus clavier — RGAA */
.fc-button:focus,
.fc-button-primary:focus {
    outline: 2px solid var(--vi-action-border, #0055b3) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* ── En-têtes de colonne (Lun, Mar…) ───────────────────────── */
.fc-day-header {
    padding: 0.45rem 0.5rem !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    color: #6b7280 !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* ── Cellules jour ─────────────────────────────────────────── */
.fc-day.fc-widget-content {
    cursor: default;
    transition: background 0.12s ease;
}

/* Hover et curseur uniquement sur les jours ayant des ressources */
.fc-day.fc-widget-content.fc-has-events {
    cursor: pointer;
}

.fc-day.fc-widget-content.fc-has-events:hover {
    background: #eff6ff !important;
}

.fc-day-number {
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    padding: 0.35rem 0.5rem !important;
    line-height: 1.8rem !important;
}

/* ── Aujourd'hui ───────────────────────────────────────────── */
td.fc-today {
    background: #eff6ff !important;
}

td.fc-today .fc-day-number {
    background: var(--vi-primary-bg, #003783) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 1.8rem !important;
    height: 1.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    float: right;
    margin: 0.35rem 0.5rem !important;
    line-height: 1 !important;
}

/* ── Événements ────────────────────────────────────────────── */
.fc-event {
    background: var(--vi-primary-bg, #003783) !important;
    border-color: var(--vi-primary-bg, #003783) !important;
    border-radius: 0.25rem !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    padding: 0.1rem 0.4rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background 0.12s ease !important;
}

.fc-event:hover {
    background: var(--vi-primary-hover, #002b68) !important;
    border-color: var(--vi-primary-hover, #002b68) !important;
}

.fc-event .fc-title {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* ── Vue liste ─────────────────────────────────────────────── */
.fc-list-heading-main {
    font-weight: 700;
    color: #111827;
}

.fc-list-item:hover td {
    background: #eff6ff !important;
}

/* ── Responsive mobile ─────────────────────────────────────── */
@media (max-width: 576px) {
    .fc-header-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .fc-left,
    .fc-center,
    .fc-right {
        display: flex !important;
        justify-content: center !important;
    }

    .fc-toolbar h2 {
        text-align: center !important;
    }

    .fc-day-header {
        font-size: 0.62rem !important;
        padding: 0.25rem !important;
    }

    .fc-day-number {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.3rem !important;
    }
}

/* ── Offcanvas styles globaux PDF ───────────────────────── */
#offcanvasStyles .offcanvas-body {
    padding: 0.75rem 1rem;
}

#formGlobalStyles {
    margin: 50px 0;
}

.vi-theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.vi-theme-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform .1s, border-color .1s;
}

.vi-theme-swatch:hover {
    transform: scale(1.15);
    border-color: #374151;
}

.vi-theme-swatch--active {
    border-color: #374151;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #374151;
}

#offcanvasStyles .vi-styles-section {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

#offcanvasStyles .vi-styles-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#offcanvasStyles .vi-styles-section .vi-card-title {
    margin-bottom: 0.5rem;
}

#offcanvasStyles .vi-styles-section .form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.2rem;
}

#offcanvasStyles textarea.form-control {
    resize: vertical;
    min-height: 62px;
}

#offcanvasStyles .vi-styles-section .form-group,
#offcanvasStyles .vi-styles-section .mb-2 {
    margin-bottom: 0.5rem !important;
}

#offcanvasStyles .vi-styles-section .form-text {
    margin-top: 0.15rem;
}

/* ════════════════════════════════════════════════════════════════
   Typography unification — 16px (1rem) partout
   Cohérence visuelle sur toute l'application : tableaux, formulaires,
   boutons, sidebar, topbar, badges, dropdowns. Hiérarchie h1-h6 conservée.
   ════════════════════════════════════════════════════════════════ */

/* Body + conteneurs principaux */
body,
.page-content,
.vi-form-card-body,
.modal-body,
.modal-title,
.alert,
.breadcrumb,
.breadcrumb-item {
    font-size: 1rem !important;
}

/* Hiérarchie titres préservée (>16px) */
h1, .h1 { font-size: 1.75rem !important; }
h2, .h2 { font-size: 1.5rem  !important; }
h3, .h3 { font-size: 1.25rem !important; }
h4, .h4 { font-size: 1.125rem !important; }
h5, .h5, h6, .h6 { font-size: 1.05rem !important; }

/* Tableaux : cellules + contenus inline */
table.dataTable thead th,
table.dataTable tbody td,
table.dataTable tbody td .badge,
table.dataTable tbody td span,
table.dataTable tbody td a,
table.dataTable tbody td small,
table.dataTable tbody td .small,
table.dataTable tbody td .text-muted,
.table thead th,
.table tbody td {
    font-size: 1rem !important;
}

/* Formulaires */
.form-control,
.form-select,
.form-check-label,
.form-label,
.form-text,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
label {
    font-size: 1rem !important;
}

/* Boutons unifiés */
.btn,
button.btn,
[class*="btn-vi-"],
.dt-buttons .dt-button,
.dt-buttons .btn {
    font-size: 1rem !important;
}

/* Sidebar — labels et footer */
.sidebar-link,
.sidebar-link .nav-label,
.sidebar-footer-name,
.sidebar-footer-role,
.sidebar-section-label {
    font-size: 1rem !important;
}

/* Topbar / Dropdowns */
.topbar-search input,
.topbar-profile-btn,
.dropdown-menu,
.dropdown-item,
.dropdown-header {
    font-size: 1rem !important;
}

/* Badges & chips (légèrement réduit pour rester compacts) */
.badge,
.vi-badge,
.text-bg-info,
.text-bg-success,
.text-bg-warning,
.text-bg-danger,
.text-bg-secondary {
    font-size: 0.95rem !important;
    padding: 0.35em 0.65em;
}

/* DataTables toolbar + pagination */
.dataTables_filter input,
.dataTables_filter label,
.dataTables_info,
div.dt-info,
.dt-paging .page-link,
.pagination .page-link {
    font-size: 1rem !important;
}

/* Stat cards & widgets */
.vi-stat-label {
    font-size: 1rem !important;
}
.vi-stat-value {
    font-size: 1.5rem !important;
    font-weight: 700;
}

/* Tooltips Bootstrap */
.tooltip,
.tooltip-inner {
    font-size: 0.95rem !important;
}

/* Petits libellés "small" hors tableau — restent un peu plus petits */
small, .small {
    font-size: 0.9rem !important;
}

/* ============================================================
   Récapitulatif clé / valeur (bandeau de recherche, chips de filtres)
   ============================================================ */
.vi-recap {
    display: grid;
    grid-template-columns: minmax(10rem, max-content) 1fr;
    gap: 0.85rem 1.5rem;
    margin: 0;
}

.vi-recap dt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 600;
}

.vi-recap dd {
    margin: 0;
}

/* Empilé sur mobile : deux colonnes deviennent illisibles sous 768px */
@media (max-width: 767.98px) {
    .vi-recap {
        grid-template-columns: 1fr;
        gap: 0.25rem 0;
    }

    .vi-recap dd {
        margin-bottom: 0.9rem;
    }
}

/* Les termes recherchés, mis en évidence comme une requête */
.vi-query {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #f1f5f9;
    color: #003783;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Chip de filtre : le critère est nommé, pas seulement sa valeur */
.vi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.25rem 0.65rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #0055b3;
    font-size: 0.8125rem;
}

.vi-chip-key {
    color: #64748b;
    font-weight: 600;
}

.vi-chip-key::after {
    content: ' :';
}

.vi-recap-empty {
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

/* ============================================================
   Bandeau de contexte de recherche (au-dessus des résultats)
   ============================================================ */
.vi-search-context {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 1.25rem 1.15rem;
    border: 1px solid #e6e2f5;
    border-radius: 0.65rem;
    background: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
}

.vi-search-context-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    background: #f5f3ff;
    color: #8b5cf6;
    font-size: 1.05rem;
}

.vi-search-context-overline {
    margin: 0 0 0.25rem;
    color: #8b5cf6;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vi-search-context-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    color: #1f2937;
    font-size: 1rem;
}

.vi-search-context-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.75rem;
}

.vi-search-context-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.vi-search-context-clear {
    color: #64748b;
    font-size: 0.8125rem;
    text-decoration: none;
}

.vi-search-context-clear:hover,
.vi-search-context-clear:focus-visible {
    color: #b91c1c;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .vi-search-context-actions {
        flex-direction: column;
        width: 100%;
    }

    .vi-search-context-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   État vide enrichi (partials/_no_data.html.twig)
   Se greffe sur .vi-empty-state ci-dessus : centrage et couleur en viennent.
   Sélecteurs à deux classes pour passer devant `.vi-empty-state p`.
   ============================================================ */
.vi-empty-state .vi-empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    background: #eff6ff;
    color: #0055b3;
    font-size: 1.25rem;
    opacity: 1;
}

.vi-empty-state .vi-empty-state-title {
    margin: 0 0 0.35rem;
    color: #003783;
    font-size: 1rem;
    font-weight: 600;
}

.vi-empty-state .vi-empty-state-text {
    max-width: 30rem;
    margin: 0 auto;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Le bouton vient de la macro btn_link : même rendu que partout ailleurs,
   rien à surcharger hormis l'écart. */
.vi-empty-state .vi-empty-state-action {
    margin-top: 1rem;
}

/* Volumétrie affichée dans l'en-tête d'une carte de listing */
.vi-card-count {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: #e7f0fb;
    color: #0055b3;
    font-size: 0.8125rem;
    font-weight: 700;
    vertical-align: middle;
}


/* Chips de filtre déclinées par famille de critère (palette des cartes KPI).
   Chaque couple fond/texte est vérifié ≥ 4.5:1. */
.vi-chip--amber  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.vi-chip--violet { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.vi-chip--teal   { background: #f0fdfa; border-color: #99f6e4; color: #115e59; }
.vi-chip--green  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.vi-chip--slate  { background: #f8fafc; border-color: #e2e8f0; color: #334155; }

.vi-chip--amber  .vi-chip-key,
.vi-chip--violet .vi-chip-key,
.vi-chip--teal   .vi-chip-key,
.vi-chip--green  .vi-chip-key,
.vi-chip--slate  .vi-chip-key {
    color: inherit;
    opacity: 0.75;
}
