/* ==============================================================================
   PROLUXIA HAUTE JOAILLERIE & PRIVATE CONCIERGE THEME FOR FILAMENT v3
   Palette: Obsidienne Profonde #0A0A0A, Or Pur #C9A84C, Or Chaud #DFBE62, Ivoire #FAFAF7
   Typographie: Cinzel (Titres Royaux) + Outfit (UI Moderne) + JetBrains Mono (Données)
   ============================================================================== */

/* --- 1. Typographie & Globales --- */
body, .fi-body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #0A0A0A !important;
    color: #EDEDED !important;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    letter-spacing: -0.01em;
}

/* Protection Absolue Anti-Texte Sombre sur Fond Noir */
body.fi-body .text-gray-900,
body.fi-body .text-gray-800,
body.fi-body .text-gray-700,
.dark .text-gray-900,
.dark .text-gray-800,
.dark .text-gray-700 {
    color: #F8F5F0 !important;
}

body.fi-body .text-gray-600,
body.fi-body .text-gray-500,
.dark .text-gray-600,
.dark .text-gray-500 {
    color: #D1C9BE !important;
}

/* En-têtes Royales Spécifiques en Cinzel (uniquement pour l'identité de marque et le grand titre de page) */
.fi-topbar-brand-name,
.fi-header-heading {
    font-family: 'Cinzel', Georgia, serif !important;
    letter-spacing: 0.04em !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
}

.fi-header-heading {
    font-size: 1.75rem !important;
    background: linear-gradient(135deg, #FFFFFF 0%, #E6C875 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Titres de Sections, Tableaux, Widgets & Modales en Outfit (Moderne, Épuré, Haute Précision) */
.fi-section-header-heading,
.fi-modal-heading,
.fi-ta-header-heading,
.fi-section-header-heading h2,
.fi-section-header-heading h3 {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.01em !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    color: #FFFFFF !important;
}

.fi-section-header-description,
.fi-header-subheading,
.fi-ta-header-description {
    color: #C5BEB5 !important;
    font-size: 0.82rem !important;
    font-weight: 400 !important;
}

/* --- 2. Topbar & Header Panneau --- */
.fi-topbar {
    background: rgba(12, 12, 12, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(201, 168, 76, 0.22) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.fi-topbar-brand-name {
    color: #C9A84C !important;
    font-size: 1.35rem !important;
    text-transform: uppercase;
    letter-spacing: 0.15em !important;
}

/* --- 3. Barre Latérale (Sidebar) Prestige --- */
.fi-sidebar {
    background: #0D0D0D !important;
    border-right: 1px solid rgba(201, 168, 76, 0.16) !important;
}

.fi-sidebar-header {
    border-bottom: 1px solid rgba(201, 168, 76, 0.14) !important;
    padding-bottom: 1rem !important;
}

/* Groupes de navigation */
.fi-sidebar-group-label {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #8C8275 !important;
    margin-top: 0.75rem !important;
}

/* Éléments de navigation */
.fi-sidebar-item-btn {
    border-radius: 0.75rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 0.15rem !important;
    font-size: 0.85rem !important;
}

.fi-sidebar-item-btn:hover {
    background: rgba(201, 168, 76, 0.08) !important;
    color: #DFBE62 !important;
    transform: translateX(3px);
}

.fi-sidebar-item-active > .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(201, 168, 76, 0.22) 0%, rgba(201, 168, 76, 0.04) 100%) !important;
    border-left: 3.5px solid #C9A84C !important;
    color: #E6C875 !important;
    font-weight: 700 !important;
    box-shadow: inset 0 0 20px rgba(201, 168, 76, 0.06) !important;
}

/* --- 4. Cartes KPIs & Widgets Haute Précision --- */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn {
    background: linear-gradient(160deg, #141414 0%, #0E0E0E 100%) !important;
    border: 1px solid rgba(201, 168, 76, 0.22) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Survol animé des cartes statistiques */
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-4px) scale(1.01) !important;
    border-color: rgba(201, 168, 76, 0.55) !important;
    box-shadow: 0 16px 40px -5px rgba(201, 168, 76, 0.2) !important;
}

.fi-wi-stats-overview-stat-value {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.85rem !important;
    color: #FFFFFF !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.fi-wi-stats-overview-stat-label {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 600 !important;
    color: #DFBE62 !important;
}

/* --- 5. Boutons d'Action Joaillerie --- */
.fi-btn-primary {
    background: linear-gradient(135deg, #C9A84C 0%, #A8832A 100%) !important;
    color: #0A0A0A !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 18px rgba(201, 168, 76, 0.35) !important;
    transition: all 0.25s ease !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem !important;
}

.fi-btn-primary:hover {
    background: linear-gradient(135deg, #DFBE62 0%, #C9A84C 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.5) !important;
}

/* --- 6. Tableaux de Données (Data Tables) --- */
.fi-ta-header-cell {
    background: #161616 !important;
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 700 !important;
    color: #C9A84C !important;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2) !important;
}

.fi-ta-record {
    transition: background-color 0.2s ease !important;
}

.fi-ta-record:hover {
    background-color: rgba(201, 168, 76, 0.04) !important;
}

/* Badges & Tags */
.fi-badge {
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.03em !important;
    padding: 0.2rem 0.65rem !important;
}

/* --- 7. Modales & Menus Déroulants --- */
.fi-modal-window, .fi-dropdown-panel {
    background: #141414 !important;
    border: 1px solid rgba(201, 168, 76, 0.28) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
}

/* Force le dropdown utilisateur du topbar à s'ouvrir vers le BAS */
.fi-topbar .fi-dropdown-panel,
.fi-topbar [x-float] {
    top: 100% !important;
    bottom: auto !important;
    right: 0 !important;
    margin-top: 0.5rem !important;
}

/* Override Alpine x-float placement pour forcer bottom-end */
.fi-topbar .fi-dropdown [x-float].fi-dropdown-panel {
    inset: auto 0 auto auto !important;
    top: calc(100% + 4px) !important;
    transform: none !important;
    position: absolute !important;
}

/* Assurer que le conteneur parent du dropdown a le bon contexte de positionnement */
.fi-topbar .fi-dropdown {
    position: relative !important;
}

/* --- 7b. KPI Hero Scorecard Cells --- */
.plx-kpi-cell {
    transition: all 0.2s ease !important;
}

.plx-kpi-cell:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Inputs & Formulaires */
.fi-input, .fi-select-input {
    border-radius: 0.65rem !important;
    background-color: #1A1A1A !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

.fi-input:focus, .fi-select-input:focus {
    border-color: #C9A84C !important;
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.3) !important;
}

/* --- 8. Barre de Défilement (Custom Scrollbar) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0A0A0A;
}
::-webkit-scrollbar-thumb {
    background: #2E2A20;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C9A84C;
}

/* --- 9. Lisibilité Haute Précision Tableaux & Formulaires --- */
.fi-ta-cell,
.fi-ta-text-item,
.fi-ta-text-item-label,
.fi-ta-content {
    color: #F0EAE1 !important;
}

.fi-fo-field-wrp-label,
.fi-fo-field-wrp-label span,
label.fi-fo-field-wrp-label {
    color: #F5F0E8 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.01em !important;
}

.fi-fo-field-wrp-helper-text {
    color: #B8B0A4 !important;
    font-size: 0.78rem !important;
}

.fi-pagination-record-index,
.fi-pagination-record-total {
    color: #B8B0A4 !important;
}

/* --- 10. Grilles Responsives Fixes Proluxia VIP --- */
.plx-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1rem !important;
}

@media (min-width: 640px) {
    .plx-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .plx-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.plx-two-col-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
}

@media (min-width: 1024px) {
    .plx-two-col-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

.plx-seo-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1rem !important;
}

@media (min-width: 768px) {
    .plx-seo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1280px) {
    .plx-seo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
