/*
 * Dijital School — theme « Pastel arrondi » des 3 panels Filament (admin, etablissement, censeur).
 *
 * Feuille STATIQUE (aucun build) chargee comme URL du fournisseur de police local :
 * voir App\Filament\Support\ThemeDijital. Selecteurs prefixes par .fi-body pour battre
 * les utilitaires Tailwind du CSS Filament ; mode sombre = classe .dark sur <html>.
 * Aucune ressource externe (CSP) : police Nunito auto-hebergee dans public/fonts (OFL).
 *
 * Regles : pastels = FONDS uniquement (jamais couleur de texte) ; texte >= 4,5:1 ; aucun flou
 * d'arriere-plan (machines modestes) ; animations coupees sous prefers-reduced-motion.
 */

/* ---------- Police (Nunito variable, sous-ensemble latin : accents francais, oe) ---------- */
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Nunito";
    font-style: italic;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/nunito-latin-wght-italic.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Jetons de design ---------- */
/*
 * Palette « Ciel » (mode clair, bleu ciel degrade) / « Nuit » (mode sombre,
 * titres et menus en blanc) — accent bleu (echelle "sky") unifie sur les 2
 * modes ; --dj-accent-strong/--dj-accent-hover gardent la MEME valeur dans
 * les 2 blocs (le bouton est toujours peint sur son propre fond opaque,
 * seul le contraste texte blanc/fond compte, verifie une seule fois :
 * blanc sur #0369a1 = 7,5:1). Mode sombre = classe .dark sur <html>
 * (Filament : defaultThemeMode ; espace eleve/parent : voir resources/css/app.css).
 */
:root {
    --dj-bg: #f3f7fd;
    --dj-surface: #ffffff;
    --dj-surface-2: #eaf1fb;
    --dj-sidebar: #ffffff;
    --dj-text: #10243a;
    --dj-title: #0a1b30;
    --dj-muted: #4f6580;
    --dj-muted-strong: #565b70;
    --dj-faint: #8b90a3;
    --dj-border: #d3e0f1;
    --dj-border-soft: #e7f1f9;

    /* Accent : bleu ciel (#0ea5e9) pour les aplats decoratifs, variante « strong »
     * (#0369a1, 7,5:1 avec du texte blanc) pour les boutons et le texte d'accent. */
    --dj-accent: #0ea5e9;
    --dj-accent-strong: #0369a1;
    --dj-accent-hover: #075985;
    --dj-accent-soft: #e0f2fe;
    --dj-accent-soft-text: #075985;
    --dj-accent-halo: rgba(14, 165, 233, 0.18);
    --dj-hover: #eef8fe;

    --dj-tint-1: #eaf7ef; /* vert */
    --dj-tint-2: #fff4e2; /* ambre */
    --dj-tint-3: #ffeaea; /* rose */
    --dj-tint-4: #ecebfb; /* lavande */
    --dj-tint-5: #e0f2fe; /* bleu ciel */

    --dj-ok-bg: #e3f9ea; /* maquette #d6f5e1 echouait 4,5:1 (4,30:1) avec --dj-ok-fg ; eclairci (4,54:1) */
    --dj-ok-fg: #15803d;
    --dj-warn-bg: #fff3dc; /* maquette #ffe9c2 echouait 4,5:1 (4,23:1) avec --dj-warn-fg ; eclairci (4,57:1) */
    --dj-warn-fg: #b45309;
    --dj-danger-bg: #ffdcdf;
    --dj-danger-fg: #c01f2f;
    --dj-info-bg: #d0f2f8;
    --dj-info-fg: #0e7490;
    --dj-violet-bg: #ebe3ff;
    --dj-violet-fg: #6d28d9;
    --dj-pink-bg: #ffdcec;
    --dj-pink-fg: #be185d;
    --dj-orange-bg: #ffecdf; /* maquette #ffe3d1 echouait 4,5:1 (4,23:1) avec --dj-orange-fg ; eclairci (4,52:1) */
    --dj-orange-fg: #c2410c;

    --dj-shadow: 0 1px 2px rgba(16, 36, 58, 0.06), 0 8px 20px rgba(16, 36, 58, 0.08);
    --dj-shadow-lg: 0 24px 60px -24px rgba(20, 70, 140, 0.3);
    --dj-overlay: rgba(15, 35, 60, 0.42);

    --dj-radius-card: 18px;
    --dj-radius-ctl: 12px;
    --dj-radius-pill: 999px;

    /* Fond de page degrade (bleu ciel -> presque blanc -> bleu indigo pale) :
     * jamais applique aux petits elements (badges, icones...), qui restent
     * sur le --dj-bg plat pour rester lisibles a toute taille. */
    --dj-app-fond: linear-gradient(160deg, #dcf0fd 0%, #f5fbff 45%, #e7edfd 100%);
    --dj-login-fond: linear-gradient(160deg, #dcf0fd 0%, #f6fbff 48%, #dbeafe 100%);
    --dj-brand: #075985;
    --dj-jauge-l: 30%;
    --dj-shadow-notif: 0 24px 60px -20px rgba(20, 70, 140, 0.35), 0 0 0 100vmax rgba(15, 35, 60, 0.16);

    /* Jetons reserves aux phases 2 (menu) / 3 (dashboards), non consommes ici. */
    --dj-side: #12305a;
    --dj-side-fg: #e2edfb;
    --dj-side-muted: #9fbbdb;
    --dj-title-grad: linear-gradient(120deg, #0369a1, #7c3aed);
}

.dark {
    --dj-bg: #1a2b4a;
    --dj-surface: #243a63;
    --dj-surface-2: #2d4673;
    --dj-sidebar: #243a63;
    --dj-text: #e6effb;
    /* Titres ET menus en blanc (demande explicite) : --dj-title sert aux deux
     * (en-tetes de page ET libelles de navigation, cf. regles dediees plus bas) ;
     * le texte courant (--dj-text) reste plus doux pour ne pas fatiguer la
     * lecture de longs paragraphes/tableaux. */
    --dj-title: #ffffff;
    --dj-muted: #b2c6e2;
    --dj-muted-strong: #aeb3c8;
    --dj-faint: #8b90a8;
    --dj-border: #41609a;
    --dj-border-soft: #252940;

    --dj-accent: #5cc8ff;
    --dj-accent-strong: #0369a1; /* texte blanc dessus : 7,5:1, identique au mode clair */
    --dj-accent-hover: #075985;
    --dj-accent-soft: #0c2d42;
    --dj-accent-soft-text: #7dd3fc;
    --dj-accent-halo: rgba(56, 189, 248, 0.22);
    --dj-hover: #232739;

    /* Eclaircies au-dessus de --dj-surface sombre (#243a63) pour garder l'effet
     * de carte en relief (elevation) : marge de securite deja mesuree pour que
     * --dj-muted-strong y reste >= 4,5:1 (ratio ~4,6:1, cf. ThemeDijitalTest). */
    --dj-tint-1: #34493d;
    --dj-tint-2: #4c4433;
    --dj-tint-3: #543f41;
    --dj-tint-4: #434259;
    --dj-tint-5: #2b485c;

    --dj-ok-bg: #1a5a3a;
    --dj-ok-fg: #5eea96;
    --dj-warn-bg: #6a4a12;
    --dj-warn-fg: #ffcb4d;
    --dj-danger-bg: #79283a;
    --dj-danger-fg: #ffa3ab; /* maquette #ff8a93 echouait 4,5:1 (4,27:1) avec --dj-danger-bg ; eclairci (5,09:1) */
    --dj-info-bg: #17566a;
    --dj-info-fg: #46e0f2;
    --dj-violet-bg: #44358a;
    --dj-violet-fg: #b9a2ff;
    --dj-pink-bg: #712350; /* maquette #7a2c58 echouait 4,5:1 (4,28:1) avec --dj-pink-fg ; fonce (4,84:1) */
    --dj-pink-fg: #ff8fc4;
    --dj-orange-bg: #6e3414; /* maquette #7a3c18 echouait 4,5:1 (4,21:1) avec --dj-orange-fg ; fonce (4,84:1) */
    --dj-orange-fg: #ffa066;

    --dj-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(5, 12, 30, 0.3);
    --dj-shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    --dj-overlay: rgba(8, 10, 20, 0.6);

    /* Jetons reserves aux phases 2 (menu) / 3 (dashboards), non consommes ici. */
    --dj-side: #14284a;
    --dj-side-fg: #e6effb;
    --dj-side-muted: #9bb6da;
    --dj-title-grad: linear-gradient(120deg, #5cc8ff, #c4a8ff);

    /* Le mode sombre reste sombre (pas de bleu ciel ici, reserve au mode
     * clair) : fond de page plat, seul le degrade de connexion garde une
     * pointe de bleu pour rappeler l'accent de la marque. */
    --dj-app-fond: var(--dj-bg);
    --dj-login-fond: linear-gradient(160deg, #0f2438 0%, #161826 50%, #1b2440 100%);
    --dj-brand: #7dd3fc;
    --dj-jauge-l: 72%;
    --dj-shadow-notif: 0 24px 60px -20px rgba(0, 0, 0, 0.75), 0 0 0 100vmax rgba(8, 10, 20, 0.5);
}

/* ---------- Base ---------- */
.fi-body {
    font-family: "Nunito", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
    background: var(--dj-app-fond);
    background-attachment: fixed;
    color: var(--dj-text);
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
}

.fi-body ::selection {
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
}

.fi-body :focus-visible {
    outline: 2px solid var(--dj-accent);
    outline-offset: 2px;
}

/* Chiffres alignes dans les tableaux et indicateurs */
.fi-body .fi-ta-table,
.fi-body .fi-wi-stats-overview-stat-value,
.fi-body .fi-pagination,
.fi-body table {
    font-variant-numeric: tabular-nums;
}

/* ---------- Barre du haut et menu lateral ---------- */
.fi-body .fi-topbar > nav {
    background: var(--dj-surface);
    box-shadow: 0 1px 0 var(--dj-border);
    --tw-ring-shadow: 0 0 #0000;
}

.fi-body .fi-sidebar {
    background: var(--dj-sidebar);
    box-shadow: 1px 0 0 var(--dj-border-soft);
    --tw-ring-shadow: 0 0 #0000;
}

.fi-body .fi-sidebar-header {
    background: var(--dj-sidebar);
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
}

.fi-body .fi-sidebar-nav {
    padding-top: 1rem;
}

.fi-body .fi-sidebar-group-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: var(--dj-title);
}

/* Titre de groupe ("Paramètres", "Mon espace", "Personnel"...) encadré sur
 * un fond propre : demande explicite ("bien lisible et encadre de maniere
 * tres pro"), au lieu d'un simple texte flottant sans repere visuel. */
.fi-body .fi-sidebar-group-button {
    border-radius: var(--dj-radius-ctl);
    background: var(--dj-surface);
    border: 1px solid var(--dj-border);
    border-left: 3px solid var(--dj-accent-strong);
    margin-bottom: 0.35rem;
    box-shadow: var(--dj-shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.fi-body .fi-sidebar-group-icon,
.fi-body .fi-sidebar-group-collapse-button {
    color: var(--dj-muted);
}

.fi-body .fi-sidebar-item-button {
    border-radius: var(--dj-radius-ctl);
    padding: 0.5rem 0.65rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fi-body .fi-sidebar-item-button:hover,
.fi-body .fi-sidebar-item-button:focus-visible {
    background: var(--dj-hover);
}

.fi-body .fi-sidebar-item-label {
    font-weight: 700;
    color: var(--dj-text);
}

/* Menus en blanc en mode sombre (demande explicite) : libelles de navigation
 * (item, groupe, onglets, fil d'Ariane, menus deroulants) — l'element ACTIF
 * garde sa couleur d'accent (cf. .fi-active plus bas), c'est ce qui le
 * distingue visuellement du reste du menu, en blanc. */
.dark .fi-body .fi-sidebar-item-label,
.dark .fi-body .fi-sidebar-group-label,
.dark .fi-body .fi-tabs-item,
.dark .fi-body .fi-breadcrumbs-item-label,
.dark .fi-body .fi-dropdown-list-item-label,
.dark .fi-body .fi-dropdown-header-label {
    color: var(--dj-title);
}

/* Icones dans une pastille arrondie, COLOREE (demande explicite) plutot que
 * grise/neutre — meme couple fond/texte deja verifie pour l'element actif
 * ci-dessous, applique desormais a toutes les icones de sous-menu pour
 * qu'elles restent reperables au premier coup d'oeil. */
.fi-body .fi-sidebar-item-icon {
    box-sizing: content-box;
    padding: 0.3rem;
    border-radius: 10px;
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dark .fi-body .fi-sidebar-item-icon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dj-accent-soft-text);
}

/* Element actif : pilule vert pale */
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background: var(--dj-accent-soft);
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-button .fi-sidebar-item-label {
    color: var(--dj-accent-soft-text);
    font-weight: 800;
}

.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-button .fi-sidebar-item-icon {
    background: var(--dj-surface);
    color: var(--dj-accent-strong);
}

.dark .fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-button .fi-sidebar-item-icon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-sidebar-item-grouped-border div {
    background: var(--dj-border);
}

/* Selecteur d'etablissement */
.fi-body .fi-sidebar-nav-tenant-menu-ctn button,
.fi-body .fi-tenant-menu button {
    border-radius: var(--dj-radius-ctl);
}

/* ---------- En-tete de page ---------- */
.fi-body .fi-header-heading {
    color: var(--dj-title);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fi-body .fi-header-subheading,
.fi-body .fi-breadcrumbs a,
.fi-body .fi-breadcrumbs-item-label {
    color: var(--dj-muted);
}

.fi-body .fi-breadcrumbs-item-label {
    font-weight: 600;
}

/* ---------- Cartes, sections et widgets ---------- */
.fi-body .fi-section,
.fi-body .fi-ta-ctn,
.fi-body .fi-wi-stats-overview-stat,
.fi-body .fi-fo-tabs,
.fi-body .fi-in-tabs,
.fi-body .fi-wi-chart,
.fi-body .fi-wi-table .fi-ta-ctn {
    background: var(--dj-surface);
    border: 0;
    border-radius: var(--dj-radius-card);
    box-shadow: var(--dj-shadow);
    --tw-ring-shadow: 0 0 #0000;
}

.fi-body .fi-section-header-heading,
.fi-body .fi-ta-header-heading {
    color: var(--dj-title);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.fi-body .fi-section-header-description,
.fi-body .fi-ta-header-description {
    color: var(--dj-muted);
}

.fi-body .fi-section-header {
    padding: 1.1rem 1.35rem;
}

.fi-body .fi-section-content {
    padding: 1.1rem 1.35rem;
}

.fi-body .fi-section:not(.fi-section-not-contained):not(.fi-aside) > .fi-section-header {
    border-color: var(--dj-border-soft);
}

.fi-body .fi-section-content-ctn {
    border-color: var(--dj-border-soft);
}

/* Indicateurs : une teinte pastel par carte, en boucle (vert, ambre, rose, lavande) */
.fi-body .fi-wi-stats-overview-stat {
    padding: 1.25rem 1.35rem;
    border-radius: var(--dj-radius-card);
    box-shadow: none;
}

.fi-body .fi-wi-stats-overview-stats-ctn > .fi-wi-stats-overview-stat:nth-child(4n + 1) {
    background: var(--dj-tint-1);
}

.fi-body .fi-wi-stats-overview-stats-ctn > .fi-wi-stats-overview-stat:nth-child(4n + 2) {
    background: var(--dj-tint-2);
}

.fi-body .fi-wi-stats-overview-stats-ctn > .fi-wi-stats-overview-stat:nth-child(4n + 3) {
    background: var(--dj-tint-3);
}

.fi-body .fi-wi-stats-overview-stats-ctn > .fi-wi-stats-overview-stat:nth-child(4n + 4) {
    background: var(--dj-tint-4);
}

.fi-body .fi-wi-stats-overview-stat-label {
    color: var(--dj-muted-strong);
    font-weight: 700;
}

.fi-body .fi-wi-stats-overview-stat-value {
    color: var(--dj-title);
    font-size: 2rem;
    line-height: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fi-body .fi-wi-stats-overview-stat-icon {
    color: var(--dj-muted-strong);
}

/* Bandeau de periode (annee, sequence, trimestre) : trois teintes douces */
.fi-body [data-testid="bandeau-periode"] > .grid > .fi-section:nth-child(1) {
    background: var(--dj-tint-1);
}

.fi-body [data-testid="bandeau-periode"] > .grid > .fi-section:nth-child(2) {
    background: var(--dj-tint-5);
}

.fi-body [data-testid="bandeau-periode"] > .grid > .fi-section:nth-child(3) {
    background: var(--dj-tint-4);
}

.fi-body [data-testid="bandeau-periode"] .fi-section > div:first-child {
    color: var(--dj-muted-strong);
    font-weight: 700;
}

.fi-body [data-testid="bandeau-periode"] .fi-section > div:last-child {
    color: var(--dj-title);
    font-weight: 800;
}

/* ---------- Tableaux « Minimal aere » ---------- */
.fi-body .fi-ta-ctn {
    overflow: hidden;
}

.fi-body .fi-ta-header-ctn,
.fi-body .fi-ta-header {
    border-color: var(--dj-border-soft);
}

.fi-body .fi-ta-table thead tr {
    background: transparent;
    border-bottom: 1px solid var(--dj-border);
}

.fi-body .fi-ta-header-cell {
    color: var(--dj-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fi-body .fi-ta-header-cell-label,
.fi-body .fi-ta-header-cell span {
    color: inherit;
    font-weight: 800;
}

.fi-body .fi-ta-table tbody,
.fi-body .fi-ta-content > div {
    border-color: var(--dj-border-soft);
}

.fi-body .fi-ta-table tbody > tr,
.fi-body .fi-ta-content .divide-y > *,
.fi-body .fi-ta-content-grid .fi-ta-record {
    border-color: var(--dj-border-soft);
}

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

.fi-body .fi-ta-row:hover {
    background: var(--dj-hover);
}

.fi-body .fi-ta-cell,
.fi-body .fi-ta-text-item,
.fi-body .fi-ta-text {
    color: var(--dj-text);
}

.fi-body .fi-ta-text-item-label {
    color: inherit;
}

/* Plus d'air dans les cellules (les regles de compacite du projet restent, en un peu plus aere) */
.fi-body .fi-ta-cell .fi-ta-col-wrp {
    padding-top: 0.55rem !important;
    padding-bottom: 0.55rem !important;
}

.fi-body .fi-ta-cell .fi-ta-text-item {
    padding-top: 0.05rem !important;
    padding-bottom: 0.05rem !important;
}

/* Actions de ligne discretes, l'accent seulement au survol (les actions dangereuses gardent leur rouge) */
.fi-body .fi-ta-actions .fi-link.fi-color-primary > span,
.fi-body .fi-ta-actions .fi-link.fi-color-primary .fi-link-icon,
.fi-body .fi-ta-actions .fi-link.fi-color-gray > span {
    color: var(--dj-muted);
    font-weight: 700;
    transition: color 0.12s ease;
}

.fi-body .fi-ta-actions .fi-link.fi-color-primary:hover > span,
.fi-body .fi-ta-actions .fi-link.fi-color-primary:hover .fi-link-icon,
.fi-body .fi-ta-row:hover .fi-ta-actions .fi-link.fi-color-primary > span,
.fi-body .fi-ta-row:hover .fi-ta-actions .fi-link.fi-color-primary .fi-link-icon,
.fi-body .fi-ta-actions .fi-link.fi-color-gray:hover > span {
    color: var(--dj-accent-strong);
}

.dark .fi-body .fi-ta-actions .fi-link.fi-color-primary:hover > span,
.dark .fi-body .fi-ta-actions .fi-link.fi-color-primary:hover .fi-link-icon,
.dark .fi-body .fi-ta-row:hover .fi-ta-actions .fi-link.fi-color-primary > span,
.dark .fi-body .fi-ta-row:hover .fi-ta-actions .fi-link.fi-color-primary .fi-link-icon,
.dark .fi-body .fi-ta-actions .fi-link.fi-color-gray:hover > span {
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-ta-search-field .fi-input-wrp {
    min-width: 14rem;
}

.fi-body .fi-ta-empty-state-icon-ctn {
    background: var(--dj-accent-soft);
    border-radius: var(--dj-radius-pill);
}

.fi-body .fi-ta-empty-state-icon {
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-ta-selection-indicator,
.fi-body .fi-ta-filter-indicators {
    background: var(--dj-accent-soft);
}

/* Cases a cocher : accent vert */
.fi-body .fi-checkbox-input,
.fi-body .fi-radio-input {
    color: var(--dj-accent-strong);
}

.fi-body .fi-checkbox-input {
    border-radius: 6px;
}

/* ---------- Boutons ---------- */
.fi-body .fi-btn {
    border-radius: var(--dj-radius-ctl);
    font-weight: 700;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.fi-body .fi-btn.fi-btn-color-primary {
    background: var(--dj-accent-strong);
    color: #ffffff;
    box-shadow: 0 6px 14px -8px rgba(3, 105, 161, 0.7);
}

.dark .fi-body .fi-btn.fi-btn-color-primary {
    background: var(--dj-accent-strong);
    color: #ffffff;
    box-shadow: none;
}

.fi-body .fi-btn.fi-btn-color-primary:hover {
    background: var(--dj-accent-hover);
}

.fi-body .fi-btn.fi-btn-color-gray {
    background: var(--dj-surface);
    color: var(--dj-text);
    box-shadow: 0 0 0 1px var(--dj-border) !important;
}

.fi-body .fi-btn.fi-btn-color-gray:hover {
    background: var(--dj-hover);
    box-shadow: 0 0 0 1px var(--dj-faint) !important;
}

.fi-body .fi-btn.fi-btn-color-gray .fi-btn-icon {
    color: var(--dj-muted);
}

.fi-body .fi-icon-btn {
    border-radius: var(--dj-radius-ctl);
}

.fi-body .fi-link.fi-color-primary {
    font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
    .fi-body .fi-btn:active {
        transform: scale(0.98);
    }
}

/* ---------- Champs de formulaire ---------- */
.fi-body .fi-input-wrp {
    background: var(--dj-surface);
    border-radius: var(--dj-radius-ctl);
    box-shadow: 0 0 0 1px var(--dj-border) !important;
    transition: box-shadow 0.15s ease;
}

.fi-body .fi-input-wrp:hover {
    box-shadow: 0 0 0 1px var(--dj-faint) !important;
}

.fi-body .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 1px var(--dj-accent), 0 0 0 4px var(--dj-accent-halo) !important;
}

.fi-body .fi-input-wrp.fi-disabled,
.fi-body .fi-input-wrp:has(:disabled) {
    background: var(--dj-bg);
}

.fi-body .fi-input,
.fi-body .fi-fo-select select,
.fi-body .fi-input-wrp input,
.fi-body .fi-input-wrp select,
.fi-body .fi-input-wrp textarea {
    color: var(--dj-title);
}

.fi-body .fi-input-wrp input::placeholder,
.fi-body .fi-input-wrp textarea::placeholder {
    color: var(--dj-faint);
}

.fi-body .fi-fo-field-wrp-label span {
    color: var(--dj-title);
    font-weight: 700;
}

.fi-body .fi-fo-field-wrp-helper-text,
.fi-body .fi-fo-field-wrp-hint {
    color: var(--dj-muted);
}

.fi-body .fi-fo-toggle {
    border-radius: var(--dj-radius-pill);
}

/* Listes de recherche (Choices.js des Select a recherche) */
.fi-body .choices__inner,
.fi-body .choices__list--dropdown {
    border-radius: var(--dj-radius-ctl);
}

.fi-body .choices__list--dropdown {
    border: 1px solid var(--dj-border);
    box-shadow: var(--dj-shadow);
    background: var(--dj-surface);
}

.fi-body .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
}

/* ---------- Onglets ---------- */
.fi-body .fi-tabs {
    background: var(--dj-surface);
    border-radius: var(--dj-radius-card);
    box-shadow: var(--dj-shadow);
    --tw-ring-shadow: 0 0 #0000;
    padding: 0.35rem;
    gap: 0.25rem;
}

.fi-body .fi-tabs-item {
    border-radius: var(--dj-radius-ctl);
    font-weight: 700;
    color: var(--dj-muted-strong);
}

.fi-body .fi-tabs-item:hover {
    background: var(--dj-hover);
}

.fi-body .fi-tabs-item.fi-active {
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-tabs-item.fi-active .fi-tabs-item-label,
.fi-body .fi-tabs-item.fi-active .fi-tabs-item-icon {
    color: var(--dj-accent-soft-text);
}

/* ---------- Badges (pilules) ---------- */
.fi-body .fi-badge {
    border-radius: var(--dj-radius-pill);
    font-weight: 700;
    --tw-ring-shadow: 0 0 #0000;
    box-shadow: none;
}

.fi-body .fi-badge.fi-color-success {
    background: var(--dj-ok-bg);
    color: var(--dj-ok-fg);
}

.fi-body .fi-badge.fi-color-warning {
    background: var(--dj-warn-bg);
    color: var(--dj-warn-fg);
}

.fi-body .fi-badge.fi-color-danger {
    background: var(--dj-danger-bg);
    color: var(--dj-danger-fg);
}

.fi-body .fi-badge.fi-color-info {
    background: var(--dj-info-bg);
    color: var(--dj-info-fg);
}

.fi-body .fi-badge.fi-color-primary {
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-badge.fi-color-gray {
    background: var(--dj-bg);
    color: var(--dj-muted-strong);
}

.fi-body .fi-badge.fi-color-success *,
.fi-body .fi-badge.fi-color-warning *,
.fi-body .fi-badge.fi-color-danger *,
.fi-body .fi-badge.fi-color-info *,
.fi-body .fi-badge.fi-color-primary *,
.fi-body .fi-badge.fi-color-gray * {
    color: inherit;
}

/* ---------- Menus deroulants, fenetres, pagination ---------- */
.fi-body .fi-dropdown-panel {
    background: var(--dj-surface);
    border-radius: 14px;
    box-shadow: var(--dj-shadow-lg);
    --tw-ring-shadow: 0 0 0 1px var(--dj-border);
}

.fi-body .fi-dropdown-list-item {
    border-radius: 10px;
}

.fi-body .fi-dropdown-list-item:hover,
.fi-body .fi-dropdown-list-item:focus-visible {
    background: var(--dj-hover);
}

.fi-body .fi-dropdown-header-label,
.fi-body .fi-dropdown-list-item-label {
    font-weight: 600;
}

.fi-body .fi-modal-window {
    background: var(--dj-surface);
    border-radius: var(--dj-radius-card);
    box-shadow: var(--dj-shadow-lg);
    --tw-ring-shadow: 0 0 #0000;
}

.fi-body .fi-modal-close-overlay {
    background: var(--dj-overlay);
}

.fi-body .fi-modal-heading {
    color: var(--dj-title);
    font-weight: 800;
}

.fi-body .fi-modal-header,
.fi-body .fi-modal-footer {
    border-color: var(--dj-border-soft);
}

.fi-body .fi-modal-icon-ctn,
.fi-body .fi-modal-icon {
    border-radius: var(--dj-radius-pill);
}

.fi-body .fi-pagination-item-button {
    border-radius: 10px;
    font-weight: 700;
    color: var(--dj-text);
}

.fi-body .fi-pagination-item.fi-active .fi-pagination-item-button {
    background: var(--dj-accent-soft);
    color: var(--dj-accent-soft-text);
}

.fi-body .fi-pagination-item-button:hover {
    background: var(--dj-hover);
}

.fi-body .fi-pagination-overview {
    color: var(--dj-muted);
}

.fi-body .fi-pagination-records-per-page-select {
    border-radius: var(--dj-radius-ctl);
}

/* ---------- Notifications ---------- */
.fi-body .fi-no-notification {
    background: var(--dj-surface);
    border-radius: var(--dj-radius-card);
    --tw-ring-shadow: 0 0 0 1px var(--dj-border);
}

.fi-body .fi-no-notification-title {
    color: var(--dj-title);
    font-weight: 800;
}

.fi-body .fi-no-notification-body {
    color: var(--dj-text);
}

/* ---------- Connexion (pages « simples ») ---------- */
.fi-body.fi-body:has(.fi-simple-layout),
.fi-body .fi-simple-layout {
    background: var(--dj-login-fond);
}

.fi-body .fi-simple-main {
    background: var(--dj-surface);
    border-radius: 28px;
    box-shadow: var(--dj-shadow-lg);
    --tw-ring-shadow: 0 0 #0000;
    padding: 2.5rem 2rem;
}

@media (min-width: 640px) {
    .fi-body .fi-simple-main {
        padding: 3rem 3rem;
    }
}

.fi-body .fi-simple-header {
    align-items: center;
    text-align: center;
}

.fi-body .fi-simple-header-heading {
    color: var(--dj-title);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fi-body .fi-simple-header-subheading {
    color: var(--dj-muted);
}

/* ---------- Divers ---------- */
.fi-body .fi-avatar {
    border-radius: var(--dj-radius-pill);
}

.fi-body hr,
.fi-body .fi-fo-repeater-item {
    border-color: var(--dj-border-soft);
}

.fi-body .fi-fo-repeater-item {
    border-radius: var(--dj-radius-ctl);
    background: var(--dj-surface);
}

/* Barre de defilement discrete (Chromium/Edge) */
.fi-body ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.fi-body ::-webkit-scrollbar-thumb {
    background: var(--dj-border);
    border-radius: var(--dj-radius-pill);
}

@media (prefers-reduced-motion: reduce) {
    .fi-body *,
    .fi-body *::before,
    .fi-body *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
