/* ── ICC Revendeurs — Admin custom styles ─────────────────────────────── */

/* ── Variables de marque (vert ICC grand public) ─────────────────────────── */
:root {
    --icc-primary: #047857;
    --icc-primary-dark: #064E3B;
    --icc-primary-light: #D1FAE5;
    --icc-accent: #10B981;
}

/* ── Taille de texte globale ────────────────────────────────────────────── */
.fi-body {
    font-size: 13px;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Topbar : dégradé subtil ─────────────────────────────────────────────── */
.fi-topbar {
    background: linear-gradient(180deg, #ffffff 0%, #FAFAFB 100%) !important;
    border-bottom: 1px solid rgba(16, 185, 129, 0.08) !important;
    backdrop-filter: blur(8px);
}
.dark .fi-topbar {
    background: linear-gradient(180deg, rgba(30,30,40,.95) 0%, rgba(20,20,30,.95) 100%) !important;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15) !important;
}

/* ── Sidebar : accent violet ─────────────────────────────────────────────── */
.fi-sidebar {
    border-right: 1px solid rgba(16, 185, 129, 0.08) !important;
}
.fi-sidebar-header {
    border-bottom: 1px solid rgba(16, 185, 129, 0.08) !important;
}
.fi-sidebar-item-active .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.02) 100%) !important;
    border-left: 3px solid var(--icc-primary) !important;
    padding-left: calc(0.75rem - 3px) !important;
}
.fi-sidebar-item-btn:hover {
    background: rgba(16, 185, 129, 0.04) !important;
}
.dark .fi-sidebar-item-active .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.04) 100%) !important;
    border-left-color: var(--icc-accent) !important;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.fi-sidebar-item-label {
    font-size: 0.78rem !important;
}
.fi-sidebar-group-label {
    font-size: 0.68rem !important;
    letter-spacing: 0.06em;
}
.fi-sidebar-item-btn {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}

/* ── En-tête de page ─────────────────────────────────────────────────────── */
.fi-page-header-heading {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    color: var(--icc-primary-dark) !important;
}
.dark .fi-page-header-heading { color: #A7F3D0 !important; }
.fi-page-content {
    padding: 1rem 1.25rem !important;
}

/* ── Labels de champs ────────────────────────────────────────────────────── */
.fi-fo-field-wrp-label,
.fi-fo-field-label-content {
    font-size: 0.75rem !important;
}
.fi-fo-field-label-required-mark {
    font-size: 0.7rem !important;
}

/* ── Inputs via classes Filament uniquement ──────────────────────────────── */
.fi-input          { font-size: 0.8rem !important; }
.fi-select-input   { font-size: 0.8rem !important; }
.fi-textarea       { font-size: 0.8rem !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.fi-ta-cell {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
}
.fi-ta-cell-content,
.fi-ta-text-item,
.fi-ta-text-item-label {
    font-size: 0.78rem !important;
}
.fi-ta-col-header-cell,
.fi-ta-header-cell {
    font-size: 0.7rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}
.fi-badge {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.5rem !important;
}
.fi-ta-actions .fi-btn {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.6rem !important;
}
.fi-page-header .fi-btn {
    font-size: 0.78rem !important;
    padding: 0.4rem 0.9rem !important;
}

/* ── Stats overview ──────────────────────────────────────────────────────── */
.fi-wi-stats-overview-stat-label       { font-size: 0.68rem !important; }
.fi-wi-stats-overview-stat-value       { font-size: 1.3rem !important; }
.fi-wi-stats-overview-stat-description { font-size: 0.7rem !important; }

/* ── Repeater ────────────────────────────────────────────────────────────── */
.fi-fo-repeater-item-label       { font-size: 0.75rem !important; }
.fi-fo-repeater-add-action .fi-btn { font-size: 0.75rem !important; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.fi-modal-heading     { font-size: 0.95rem !important; }
.fi-modal-description { font-size: 0.78rem !important; }

/* ── Notifications ───────────────────────────────────────────────────────── */
.fi-no-notification-title { font-size: 0.8rem !important; }
.fi-no-notification-body  { font-size: 0.75rem !important; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.fi-breadcrumbs-item-label { font-size: 0.72rem !important; }

/* ── Boutons primaires : dégradé violet ICC ─────────────────────────────── */
.fi-btn-color-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.25), 0 1px 3px rgba(16, 185, 129, 0.15) !important;
    border: none !important;
}
.fi-btn-color-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #065F46 100%) !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3), 0 3px 8px rgba(16, 185, 129, 0.2) !important;
    transform: translateY(-1px);
    transition: all 0.15s ease;
}

/* ── Widgets stats : cartes plus premium ─────────────────────────────────── */
.fi-wi-stats-overview-stat {
    border: 1px solid rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 1px 2px rgba(0,0,0,.02) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08), 0 2px 4px rgba(0,0,0,.04) !important;
}

/* ── Badges de navigation : plus marqués ─────────────────────────────────── */
.fi-sidebar-item-badge {
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

/* ── Tables : header avec fond doux violet ───────────────────────────────── */
.fi-ta-header-cell {
    background: linear-gradient(180deg, #FAFAFB 0%, #ECFDF5 100%) !important;
    font-weight: 700 !important;
    color: #065F46 !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.dark .fi-ta-header-cell {
    background: linear-gradient(180deg, rgba(6,78,59,.25) 0%, rgba(6,78,59,.15) 100%) !important;
    color: #6EE7B7 !important;
}

/* ── Liens : couleur de marque ──────────────────────────────────────────── */
.fi-link, a.fi-ta-text-item {
    color: var(--icc-primary) !important;
}
.fi-link:hover { color: var(--icc-primary-dark) !important; }

/* ── Login : arrière-plan dégradé violet ────────────────────────────────── */
.fi-simple-page {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 50%, #A7F3D0 100%) !important;
}
.dark .fi-simple-page {
    background: linear-gradient(135deg, #022C22 0%, #064E3B 50%, #065F46 100%) !important;
}
.fi-simple-main {
    box-shadow: 0 20px 50px rgba(6, 78, 59, 0.15), 0 8px 20px rgba(0,0,0,0.06) !important;
    border-radius: 1rem !important;
}

/* ── Formulaires : focus ring violet ────────────────────────────────────── */
.fi-input:focus,
.fi-select-input:focus,
.fi-textarea:focus {
    border-color: var(--icc-accent) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* ── Scrollbar fine ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.25);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.45); background-clip: padding-box; }


/* ══════════════════════════════════════════════════════════════════════════ */
/* ── Couleurs des sections de formulaire ─────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════════════ */

/* ── Base commune : titre de section plus visible ────────────────────────── */
.fi-section-header-heading {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
}

/* ── Accent coloré sur le bord gauche du header ──────────────────────────── */
.section-client    .fi-section-header,
.section-articles  .fi-section-header,
.section-conditions .fi-section-header,
.section-livraison .fi-section-header,
.section-notes     .fi-section-header {
    border-radius: 0.5rem 0.5rem 0 0;
    padding-left: 1rem !important;
}

/* ── Client — bleu ───────────────────────────────────────────────────────── */
.section-client .fi-section-header {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-left: 4px solid #3B82F6;
}
.section-client .fi-section-header-heading {
    color: #1D4ED8 !important;
}

/* ── Articles — vert émeraude ────────────────────────────────────────────── */
.section-articles .fi-section-header {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-left: 4px solid #10B981;
}
.section-articles .fi-section-header-heading {
    color: #065F46 !important;
}

/* ── Conditions & Totaux — violet ────────────────────────────────────────── */
.section-conditions .fi-section-header {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-left: 4px solid #10B981;
}
.section-conditions .fi-section-header-heading {
    color: #065F46 !important;
}

/* ── Livraison — ambre ───────────────────────────────────────────────────── */
.section-livraison .fi-section-header {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-left: 4px solid #F59E0B;
}
.section-livraison .fi-section-header-heading {
    color: #92400E !important;
}

/* ── Notes — gris slate ──────────────────────────────────────────────────── */
.section-notes .fi-section-header {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-left: 4px solid #94A3B8;
}
.section-notes .fi-section-header-heading {
    color: #475569 !important;
}

/* ── Dark mode ───────────────────────────────────────────────────────────── */
.dark .section-client    .fi-section-header { background: linear-gradient(135deg, #1e3a5f 0%, #1e3a5f 100%); }
.dark .section-articles  .fi-section-header { background: linear-gradient(135deg, #064e3b 0%, #064e3b 100%); }
.dark .section-conditions .fi-section-header { background: linear-gradient(135deg, #3b0764 0%, #3b0764 100%); }
.dark .section-livraison .fi-section-header { background: linear-gradient(135deg, #451a03 0%, #451a03 100%); }
.dark .section-notes     .fi-section-header { background: linear-gradient(135deg, #1e293b 0%, #1e293b 100%); }
.dark .section-client    .fi-section-header-heading { color: #93C5FD !important; }
.dark .section-articles  .fi-section-header-heading { color: #6EE7B7 !important; }
.dark .section-conditions .fi-section-header-heading { color: #6EE7B7 !important; }
.dark .section-livraison .fi-section-header-heading { color: #FCD34D !important; }
.dark .section-notes     .fi-section-header-heading { color: #CBD5E1 !important; }
