/* ============== Mobile-first ============== */
:root {
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-brd: rgba(255, 255, 255, 0.08);
    --glass-blur: 10px;
}

/* Glass card */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Badges de priorité */
.badge.priority-low {
    background: #3b7;
}

.badge.priority-normal {
    background: #0d6efd;
}

.badge.priority-high {
    background: #fd7e14;
}

.badge.priority-urgent {
    background: #dc3545;
}

/* Table UX */
table tr:hover {
    transition: background 0.15s ease;
}

.note-table thead.sticky-top {
    top: 60px;
}

/* ajuste si header plus haut */
.note-table tbody tr:nth-child(2n) {
    background: rgba(255, 255, 255, 0.02);
}

.note-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Troncatures multi-lignes */
.text-truncate-1,
.text-truncate-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-1 {
    -webkit-line-clamp: 1;
}

.text-truncate-2 {
    -webkit-line-clamp: 2;
}

/* Boutons d'action compacts */
.btn-group-xs .btn {
    --bs-btn-padding-y: 0.2rem;
    --bs-btn-padding-x: 0.45rem;
    --bs-btn-font-size: 0.75rem;
    min-width: 28px;
}

/* Focus visible (accessibilité) */
:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.8);
    outline-offset: 2px;
}

/* ===== AJAX Loader ===== */
#ajax-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
}

#ajax-loader.show {
    display: flex;
}

#ajax-loader .loader-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: #fff;
    text-align: center;
    min-width: 200px;
}

#ajax-loader .loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

#ajax-loader .loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.85;
    animation: loader-bounce 0.9s infinite ease-in-out;
}

#ajax-loader .loader-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

#ajax-loader .loader-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loader-bounce {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.55;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

#ajax-loader .loader-text {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* Bouton en chargement */
.btn-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading .spinner-border {
    --bs-spinner-width: 1rem;
    --bs-spinner-height: 1rem;
    margin-right: 0.4rem;
    vertical-align: -2px;
}
