/* assets/css/style.css */

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}


/* Configuration du Background Motif */
.bg-pattern {
    background-image: url('../background-header.webp');
    background-color: #f3f4f6;
    background-position: center top;
    background-repeat: repeat;
    background-size: 1000px auto;
    background-attachment: fixed;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- STYLE GLOBAL FORMULAIRES --- */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    border: 1px solid #9ca3af !important;
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    width: 100%;
}

/* --- FIX GLOBAL ICONES DANS INPUTS (Login, Recherche, etc.) --- */
.input-with-icon {
    padding-left: 3rem !important;
}

[dir="rtl"] .input-with-icon {
    padding-left: 1rem !important;
    padding-right: 3rem !important;
}

/* Utilités pour les icônes positionnées en absolute dans un parent .relative */
.relative>i.fas[class*="absolute"],
.relative>i.far[class*="absolute"] {
    color: #94a3b8;
    transition: all 0.2s ease;
}

.relative:focus-within>i.fas[class*="absolute"],
.relative:focus-within>i.far[class*="absolute"] {
    color: #1A428A;
}

.dark .relative:focus-within>i.fas[class*="absolute"],
.dark .relative:focus-within>i.far[class*="absolute"] {
    color: #60a5fa;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #1A428A !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 66, 138, 0.1) !important;
}

input::placeholder {
    color: #9ca3af;
}

input:read-only,
input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Tom Select Fixes */
.ts-control {
    border: 1px solid #9ca3af !important;
    border-radius: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    box-shadow: none !important;
}

.ts-wrapper.focus .ts-control {
    border-color: #1A428A !important;
    box-shadow: 0 0 0 3px rgba(26, 66, 138, 0.1) !important;
}

.ts-dropdown {
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    z-index: 50 !important;
}

/* FIX SIDEBAR COLLAPSE */
#app-sidebar.w-20 .sidebar-text {
    display: none !important;
}

#app-sidebar.w-20 .sidebar-arrow {
    display: none !important;
}

#app-sidebar.w-20 .sidebar-section-title {
    display: none !important;
}

/* Centrer les icônes quand collapsed */
#app-sidebar.w-20 a,
#app-sidebar.w-20 button {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}