

/*# sourceMappingURL=custom.css.map */

/* TomSelect optgroup styling */
.ts-dropdown .optgroup-header {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-base-content, #888);
    padding: 6px 12px 2px;
    letter-spacing: 0.05em;
    cursor: default;
}
.ts-dropdown .optgroup + .optgroup {
    border-top: 1px solid color-mix(in oklab, var(--color-base-content, #000) 15%, transparent);
    margin-top: 4px;
    padding-top: 4px;
}

:root {
    --primary-color: purple;
    --card-color: #fff;
    --info-color: #f0f0f0;
    --neutral-light-color: #e5f3fd;
    --neutral-color: #60B9FF;
    --neutral-hover-color: #539DFF;
    --badge-cancelled: red;
    --label-read-color: var(--color-stone-400);
    --border-inner-card-div: color-mix(in oklab, var(--color-base-content) 20%, #0000);
}

[bspk="menu"] li.active {
    background-color: var(--neutral-hover-color);
    border-radius: 0.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: bold;
}

h2 {
    font-size: 1.75rem;
    font-weight: bold;
}

h3 {
    font-size: 1.5rem;
    font-weight: bold;
}

h4 {
    font-size: 1.25rem;
    font-weight: bold;
}

body {
    font-size: 16px;
    /*background-color: var(--card-color);*/
}

#errorCenter h3 {
    font-size: 1rem !important;
}

.disabled::before {
    background-color: var(--disabled-color);
}

.listboxMessage {
    position: relative;
    font-size: 22px;

    & span {
        position: absolute;
        top: 4px;
        left: 4px;
        font-size: 13px;
    }
}

[data-row].selected {
    background-color: var(--color-cyan-200);
}

@layer utilities {
    .text-primary-color {
        color: var(--primary-color);
    }

    .bg-primary-color {
        background-color: var(--primary-color);
    }
}

.btn-primary:has(:not(#devPannel)) {
    background-color: var(--primary-color);
}

.serobankHead {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.serobankHeadColumn {
    height: 30px;
}

.serobankHeadLign {
    width: 30px;
}

.serobankCell {
    font-size: 0.75rem;
}

.swiper-button-next, .swiper-button-prev {
    display: none;
}

/* Styles pour le drag and drop de la sérothèque */
.serotheque-draggable {
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

/* Styles pour les cellules sélectionnées (Ctrl+clic) */
.serotheque-selected {
    background-color: #fff3e0 !important;
    border: 2px solid #ff9800 !important;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.6) !important;
    position: relative;
    transition: none !important;
    /* Supprimer la transition pour éviter le lag */
}

.serotheque-selected::after {
    content: "✓";
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #ff9800;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    will-change: transform;
    /* Optimisation GPU */
}

/* Styles pour les cellules en cours de drag multiple */
.serotheque-dragging-multiple {
    opacity: 0.7;
    background-color: #fff3e0 !important;
}

.serotheque-draggable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.serotheque-dragging {
    opacity: 0.6;
    transform: rotate(3deg) scale(0.95);
    cursor: grabbing;
    z-index: 10;
}

.serotheque-drag-over {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

/* Styles pour les zones de drop acceptant plusieurs cellules */
.serotheque-drag-over.from-multiple-cells {
    background-color: #f3e5f5 !important;
    border-color: #9c27b0 !important;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.6);
}

.serotheque-drag-over.from-multiple-cells::after {
    content: "↓ " attr(data-multiple-count) " cellules";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #9c27b0;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
}

bspk[blocname="wrapper7"].disabled {
    opacity: 0.7;
    cursor: default;
}

bspk[blocname="wrapper7"].disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Styles pour les cellules vides (non-draggables) */
.serotheque-empty {
    cursor: default;
    opacity: 0.8;
}

.serotheque-empty:hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

/* Styles pour les cellules désactivées avant la première cellule autorisée */
.serotheque-disabled-before-first, .serotheque-disabled-after-last {
    cursor: not-allowed !important;
    opacity: 0.3 !important;
    background-color: #e0e0e0 !important;
    border-color: #bdbdbd !important;
    color: #9e9e9e !important;
    pointer-events: none !important;
    filter: grayscale(100%) !important;
}

.serotheque-disabled-before-first:hover, .serotheque-disabled-after-last:hover {
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.3 !important;
}

.serotheque-disabled-before-first *, .serotheque-disabled-after-last * {
    color: #9e9e9e !important;
}

/* Styles pour les lignes de listbox draggables */
.listbox-draggable {
    cursor: grab;
    transition: all 0.2s ease;
}

.listbox-draggable:hover {
    background-color: #f5f5f5;
}

.listbox-dragging {
    opacity: 0.7;
    background-color: #e3f2fd;
    cursor: grabbing;
}

/* Styles pour les lignes multiples en cours de drag */
.listbox-dragging-multiple {
    opacity: 0.8;
    background-color: #fff3e0 !important;
    border-left: 4px solid #ff9800 !important;
    position: relative;
}

.listbox-dragging-multiple::before {
    content: "✓";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff9800;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* Styles pour les zones de drop spécifiques aux listbox */
.serotheque-drag-over.from-listbox {
    background-color: #e8f5e8 !important;
    border-color: #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Styles pour les zones de drop spécifiques aux listbox multiples */
.serotheque-drag-over.from-multiple-listbox {
    background-color: #fff3e0 !important;
    border-color: #ff9800 !important;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
}

.serotheque-empty-cell {
    border: 2px dashed #ccc;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.05) 10px,
        rgba(0, 0, 0, 0.05) 20px
    );
}

.serotheque-drag-over.from-multiple-listbox::after {
    content: attr(data-multiple-count) " éléments";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

/* Styles pour les zones de drop interdites */
.serotheque-drag-forbidden {
    background-color: #ffebee !important;
    border-color: #f44336 !important;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
    position: relative;
}

.serotheque-drag-forbidden::before {
    content: "🚫";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 10;
}

/* Styles pour la listbox en mode drop */
bspk[blocname="tmpZoneSamples"].listbox-drag-over {
    background-color: #e8f5e9 !important;
    border: 2px dashed #4caf50 !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    position: relative;
}

bspk[blocname="tmpZoneSamples"].listbox-drag-over::after {
    content: "↓ Déposer ici pour retirer de la sérothèque";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Styles pour la listbox en mode drop avec cellules multiples */
bspk[blocname="tmpZoneSamples"].listbox-drag-over[data-multiple-cells-count]::after {
    content: "↓ Déposer " attr(data-multiple-cells-count) " cellules ici pour les retirer";
    background-color: #ff9800;
}

bspk[blocname="tmpZoneSamples"].listbox-drag-over[data-multiple-cells-count] {
    background-color: #fff3e0 !important;
    border-color: #ff9800 !important;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.6);
}

.select-border-right-none label {
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.border-radius-left-none {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Loader Overlay */
bspk[blocname="loaderOverlay"]:not(.hidden) {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

bspk[blocname="loaderOverlay"]:not(.hidden) bspk[blocname="loaderMessage"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 48px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeInUp 0.3s ease-out;
}

bspk[blocname="loaderOverlay"]:not(.hidden) bspk[blocname="loaderMessage"]::before {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

.quality-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #2d5016;
    background: linear-gradient(135deg, #e8f5d9 0%, #c5e1a5 100%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(45, 80, 22, 0.15);
    transition: all 0.3s ease;
}

.quality-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 80, 22, 0.25);
    background: linear-gradient(135deg, #d4ecc2 0%, #aed581 100%);
}

.quality-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(45, 80, 22, 0.2);
}

.badge-special {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* =============================================
   DASHBOARD - Layout & Widgets & Post-its
   ============================================= */

/* Layout principal : flex row, widgets + post-its cote a cote */
.dashboard-layout {
    display: flex;
    gap: 16px;
}

/* Zone widgets : flex-wrap pour disposer les cartes */
.widgets-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: flex-start;
}

/* Zone post-its : sticky a droite, flex column, pas de scroll global */
.postits-area {
    position: sticky;
    top: 0;
    width: 340px;
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 20px 16px 24px 20px;
    background: #f8f8fa;
    align-self: flex-start;
}

/* Tous les enfants directs restent fixes, sauf postitsList qui scrolle */
.postits-area > * {
    flex-shrink: 0;
}

/* --- Widget Card --- */
.widget-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.widget-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Widget sizes */
.widget-sm {
    width: calc(33.333% - 11px);
    min-width: 200px;
}

.widget-md {
    width: calc(50% - 8px);
    min-width: 280px;
}

.widget-lg {
    width: 100%;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.widget-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.widget-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.widget-value {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.widget-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

.widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.badge-danger {
    background: #fef2f2;
    color: #ef4444;
}

.badge-success {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-info {
    background: #eff6ff;
    color: #2563eb;
}

/* Widget color accents */
.widget-accent-indigo .widget-icon { background: #eef2ff; color: #4f46e5; }
.widget-accent-indigo .widget-value { color: #4338ca; }

.widget-accent-amber .widget-icon { background: #fffbeb; color: #d97706; }
.widget-accent-amber .widget-value { color: #d97706; }

.widget-accent-red .widget-icon { background: #fef2f2; color: #ef4444; }
.widget-accent-red .widget-value { color: #ef4444; }

.widget-accent-green .widget-icon { background: #f0fdf4; color: #22c55e; }
.widget-accent-green .widget-value { color: #16a34a; }

.widget-accent-blue .widget-icon { background: #eff6ff; color: #2563eb; }
.widget-accent-blue .widget-value { color: #2563eb; }

/* --- Chart placeholder --- */
.chart-area {
    margin-top: 12px;
    flex: 1;
}

/* --- Post-it Section --- */
.postits-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    margin-bottom: 6px;
}

.postits-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.postits-title i {
    color: #fbbf24;
}

.postits-count {
    background: #fbbf24;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.postits-list::-webkit-scrollbar {
    width: 5px;
}

.postits-list::-webkit-scrollbar-track {
    background: transparent;
}

.postits-list::-webkit-scrollbar-thumb {
    background: #fbbf24;
    border-radius: 10px;
}

.postits-list::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

.postit-card {
    position: relative;
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.postit-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Post-it color variants */
.postit-yellow { background: #fffde7; border-left-color: #fbc02d; }
.postit-yellow:hover { background: #fff9c4; }

.postit-blue { background: #e3f2fd; border-left-color: #42a5f5; }
.postit-blue:hover { background: #bbdefb; }

.postit-green { background: #e8f5e9; border-left-color: #66bb6a; }
.postit-green:hover { background: #c8e6c9; }

.postit-pink { background: #fce4ec; border-left-color: #ef5350; }
.postit-pink:hover { background: #f8bbd0; }

.postit-orange { background: #fff3e0; border-left-color: #ffa726; }
.postit-orange:hover { background: #ffe0b2; }

.postit-purple { background: #f3e5f5; border-left-color: #ab47bc; }
.postit-purple:hover { background: #e1bee7; }

.postit-ref {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.postit-ref .tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: #eef2ff;
    color: #4f46e5;
}

.postit-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.postit-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.postit-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 14px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    z-index: 1;
}

.postit-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.postit-separator {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 8px 0 4px;
}

.postit-comments {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.postit-comment {
    font-size: 11px;
    color: #64748b;
}

.postit-comment-author {
    font-weight: 600;
    color: #475569;
}

.postit-comment-date {
    color: #94a3b8;
}

.postit-comment-text {
    margin-top: 1px;
    color: #475569;
    line-height: 1.3;
}

.postit-action {
    font-size: 12px;
    color: #22c55e;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.postit-action:hover {
    color: #16a34a;
}

/* Tabs for widgets */
.widget-tabs {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 8px;
}

.widget-tab {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.widget-tab.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Table for "derniers dossiers" widget */
.widget-table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
}

.widget-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.widget-table td {
    font-size: 13px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.widget-table tr:hover td {
    background: #f8fafc;
}

.widget-table .ref {
    font-weight: 600;
    color: #1e293b;
}

.widget-table .status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-table .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.widget-table a.link-all {
    font-size: 13px;
    color: #4f46e5;
    font-weight: 500;
    text-decoration: none;
}

.widget-table a.link-all:hover {
    text-decoration: underline;
}

/* Page title */
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
}

/* Quick stats row (for widget-accent-red "Incidents") */
.stat-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.stat-item {
    font-size: 12px;
    color: #94a3b8;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-item strong {
    font-weight: 600;
    color: #1e293b;
}

/* Chart bars */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 8px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-bar-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100px;
    width: 100%;
    justify-content: center;
}

.chart-bar {
    width: 12px;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s;
}

.chart-bar.primary { background: #4f46e5; opacity: 0.85; }
.chart-bar.secondary { background: #d6d3d1; opacity: 0.6; }

.chart-label {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #94a3b8;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Status dot color variants */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.danger { background: #ef4444; }
.status-dot.warning { background: #fbbf24; }
.status-dot.success { background: #22c55e; }

/* Responsive : post-its masques en dessous de XL (1280px) */
@media (max-width: 1279px) {
    .postits-area {
        display: none;
    }

    .dashboard-layout {
        flex-direction: column;
    }
}

/* =============================================
   FIN DASHBOARD
   ============================================= */

/* A rajouter dans tailwind css */