/* Thème visuel SAV PLUS Formation pour le back-office Filament */
:root {
    --sav-navy: #040414;
    --sav-navy-soft: #0a0a32;
    --sav-crimson: #B30000;
    --sav-peach: #FFBC7D;
}

/* Typographie */
.fi-header-heading,
.fi-simple-layout .fi-logo,
.fi-section-header-heading,
.fi-modal-heading,
.fi-page-heading {
    font-family: 'Times New Roman', Times, serif;
    letter-spacing: -0.01em;
}

/* Barre latérale */
.fi-sidebar {
    border-inline-end: none !important;
    box-shadow: 2px 0 24px -8px rgba(4, 4, 20, 0.15);
}

.fi-sidebar-header {
    box-shadow: none !important;
}

.fi-sidebar-nav-groups {
    gap: 1.75rem;
}

.fi-sidebar-group-label {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.68rem;
    opacity: 0.65;
}

.fi-sidebar-item-button {
    border-radius: 0.75rem;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.fi-sidebar-item-button:hover {
    transform: translateX(2px);
}

.fi-sidebar-item-active > .fi-sidebar-item-button {
    background: linear-gradient(135deg, var(--sav-crimson), #e00000) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -4px rgba(179, 0, 0, 0.45);
}

.fi-sidebar-item-active > .fi-sidebar-item-button .fi-sidebar-item-icon {
    color: #fff !important;
}

/* Barre du haut */
.fi-topbar nav {
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px -8px rgba(4, 4, 20, 0.12);
}

/* Sections / cartes */
.fi-section {
    border-radius: 1rem !important;
    box-shadow: 0 4px 18px -6px rgba(4, 4, 20, 0.08) !important;
    transition: box-shadow 0.2s ease;
}

.fi-section:hover {
    box-shadow: 0 8px 26px -8px rgba(4, 4, 20, 0.14) !important;
}

/* Widgets de statistiques */
.fi-wi-stats-overview-stat {
    border-radius: 1rem !important;
    box-shadow: 0 4px 16px -6px rgba(4, 4, 20, 0.10) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}

.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sav-crimson), var(--sav-navy));
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px -8px rgba(4, 4, 20, 0.18) !important;
}

/* Tableaux */
.fi-ta-ctn {
    border-radius: 1rem !important;
    box-shadow: 0 4px 18px -6px rgba(4, 4, 20, 0.08) !important;
}

.fi-ta-header-cell {
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

.fi-ta-row {
    transition: background-color 0.12s ease;
}

/* Boutons */
.fi-btn {
    border-radius: 0.65rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.fi-btn:hover {
    transform: translateY(-1px);
}

/* Badges */
.fi-badge {
    font-weight: 600;
}

/* Page de connexion */
.fi-simple-layout {
    background: radial-gradient(circle at 15% 20%, rgba(255, 188, 125, 0.16), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(179, 0, 0, 0.16), transparent 45%),
        linear-gradient(160deg, var(--sav-navy), var(--sav-navy-soft));
}

.fi-simple-main-ctn {
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.45) !important;
}

.fi-simple-layout .fi-logo {
    max-height: 3.25rem;
}

/* Défilement de la barre latérale */
.fi-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

/* Mode sombre : teinte navy pour rester cohérent avec l'identité du site */
.dark .fi-sidebar {
    background-color: var(--sav-navy) !important;
}

.dark .fi-topbar nav {
    background-color: rgba(4, 4, 20, 0.85) !important;
}

/* Rampe "primary" alignée sur le navy de marque.
   Filament dérive ses nuances par simple assombrissement du hex fourni :
   partant de #040414 (déjà quasi noir), les nuances 500 à 950 deviennent
   identiques, ce qui supprime tout retour visuel au survol et rend les
   boutons illisibles en mode sombre. On redéfinit donc la rampe à la main,
   en gardant #040414 comme fond de bouton en mode clair. */
:root {
    --primary-50: 242, 242, 246;
    --primary-100: 228, 228, 236;
    --primary-200: 198, 198, 214;
    --primary-300: 156, 156, 180;
    --primary-400: 110, 110, 142;
    --primary-500: 26, 26, 62;
    --primary-600: 4, 4, 20;
    --primary-700: 3, 3, 15;
    --primary-800: 2, 2, 11;
    --primary-900: 1, 1, 8;
    --primary-950: 1, 1, 5;
}

/* En mode sombre, Filament utilise primary-500 comme fond de bouton et
   primary-400 au survol : on éclaircit pour rester lisible sur l'anthracite. */
.dark {
    --primary-400: 138, 138, 174;
    --primary-500: 58, 58, 104;
}
