/*
=========================================================
Projet : Gestion Patrimoine
Auteur : Raphaël ELIARD
Description : Feuille de style utilitaire complétant Tailwind CSS.
Contient les surcharges pour les barres de défilement, le thème sombre et le glassmorphism.
=========================================================
*/
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* Animation de fond (Blobs) pour sublimer le Glassmorphism */
body {
    position: relative;
    z-index: 0;
    overflow-x: hidden;
    max-width: 100%;
}
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}
body::before {
    top: -10%; left: -10%;
    width: 60vw; height: 60vh;
    background: rgba(37, 99, 235, 0.2); /* Bleu */
    animation: float-tl 25s infinite alternate ease-in-out;
}
body::after {
    bottom: -10%; right: -10%;
    width: 60vw; height: 60vh;
    background: rgba(245, 158, 11, 0.2); /* Ambre/Or */
    animation: float-br 25s infinite alternate ease-in-out;
    animation-delay: -12s;
}
@keyframes float-tl {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6%, 6%) scale(1.1); }
}
@keyframes float-br {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-6%, -6%) scale(1.1); }
}

/* Surcharge pour le mode sombre profond adapté au Glassmorphism */
html.dark { background-color: #000000; }
.dark body { background-color: transparent !important; }
.dark body::before { background: rgba(37, 99, 235, 0.12); }
.dark body::after { background: rgba(245, 158, 11, 0.12); }

.dark .dark\:bg-slate-900 { background-color: rgba(5, 5, 5, 0.65) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.dark .dark\:bg-slate-800 { background-color: rgba(18, 18, 18, 0.65) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.dark .dark\:bg-slate-900\/50 { background-color: rgba(5, 5, 5, 0.45) !important; backdrop-filter: blur(14px); }
.dark .dark\:bg-slate-800\/50 { background-color: rgba(18, 18, 18, 0.45) !important; backdrop-filter: blur(14px); }
.dark .dark\:bg-slate-700 { background-color: rgba(30, 30, 30, 0.65) !important; }

.dark .dark\:border-slate-800 { border-color: #1a1a1a !important; }
.dark .dark\:border-slate-700 { border-color: #262626 !important; }
.dark .dark\:border-slate-600 { border-color: #383838 !important; }

/* Transitions & Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }

.skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%); background-size: 200% 100%; animation: skeletonLoading 1.5s infinite; }
.dark .skeleton { background: linear-gradient(90deg, #181818 25%, #262626 50%, #181818 75%); background-size: 200% 100%; }
@keyframes skeletonLoading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@keyframes tabEnter { from { opacity: 0; transform: translateY(12px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.animate-tab-enter { animation: tabEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Autocomplete search dropdowns */
#api-search-results, #t-api-results {
    position: absolute;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    margin-top: 4px;
}
.dark #api-search-results, .dark #t-api-results {
    background-color: #0f172a;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}
