/*
 * Thème EDUKORA (repris de CORIS STOCK) pour l'administration Filament.
 * Les couleurs viennent des variables --edu-* définies dans
 * resources/views/filament/theme/variables.blade.php (couleur choisie dans Administration → Paramètres).
 */

/* ---------- Fond général ---------- */
.fi-body { background: var(--edu-fond) !important; }
.dark .fi-body { background: #0b1120 !important; }

/* ---------- Barre du haut ---------- */
.fi-topbar {
    background: var(--edu-barre) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    border-bottom: none !important;
    color: #fff;
}
.fi-topbar .fi-icon-btn,
.fi-topbar .fi-topbar-open-sidebar-btn,
.fi-topbar .fi-topbar-close-sidebar-btn,
.fi-topbar .fi-topbar-open-collapse-sidebar-btn,
.fi-topbar .fi-topbar-close-collapse-sidebar-btn { color: rgba(255, 255, 255, .9) !important; }
.fi-topbar .fi-icon-btn:hover { background: rgba(255, 255, 255, .15) !important; }
.fi-topbar .fi-global-search-field .fi-input-wrp {
    background: rgba(255, 255, 255, .96) !important;
    border-radius: .65rem;
    box-shadow: none;
}
.fi-topbar .fi-user-menu-trigger .fi-user-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }

/* Logo */
.edu-logo { display: flex; align-items: center; gap: .65rem; color: #fff; line-height: 1.05; }
.edu-logo-icone {
    width: 2.35rem; height: 2.35rem; border-radius: .7rem; display: grid; place-items: center;
    background: var(--edu-logo-fond); box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.edu-logo-icone svg { width: 1.35rem; height: 1.35rem; color: var(--edu-logo-icone); }
.edu-logo-nom { font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; }
.edu-logo-sous { font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }

/* ---------- Menu latéral ---------- */
.fi-sidebar {
    background: var(--edu-menu) !important;
    box-shadow: 2px 0 14px rgba(0, 0, 0, .12);
}
.fi-sidebar-nav { scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.fi-sidebar .fi-sidebar-group-label { color: var(--edu-menu-titre) !important; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; font-weight: 700; }
.fi-sidebar .fi-sidebar-group-btn .fi-icon,
.fi-sidebar .fi-sidebar-group-collapse-btn { color: rgba(255, 255, 255, .45) !important; }
.fi-sidebar .fi-sidebar-group-btn .fi-sidebar-group-icon { color: var(--edu-menu-titre) !important; }

.fi-sidebar .fi-sidebar-item-btn { border-radius: .6rem; transition: background .15s, transform .15s; }
.fi-sidebar .fi-sidebar-item-label { color: rgba(255, 255, 255, .86) !important; font-weight: 500; }
.fi-sidebar .fi-sidebar-item-icon { color: rgba(255, 255, 255, .6) !important; }
.fi-sidebar .fi-sidebar-item-btn:hover { background: rgba(255, 255, 255, .08) !important; }
.fi-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-label { color: #fff !important; }

.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--edu-actif) !important;
    box-shadow: 0 4px 14px var(--edu-actif-ombre);
}
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon { color: #fff !important; font-weight: 600; }

/* Pastilles (compteurs) dans le menu */
.fi-sidebar .fi-badge { box-shadow: none; }

/* Pied du menu */
.edu-pied-menu {
    margin: .75rem 1rem 1rem; padding: .85rem 1rem; border-radius: .8rem;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .75); font-size: .78rem; line-height: 1.4;
}
.edu-pied-menu strong { color: #fff; display: block; font-size: .85rem; }
.edu-pied-menu .trait { width: 2rem; height: 3px; border-radius: 3px; background: var(--edu-accent); margin-top: .5rem; }

/* ---------- Titres de page ---------- */
.fi-header-heading { color: var(--edu-titre); letter-spacing: -.01em; }
.dark .fi-header-heading { color: #fff; }

/* ---------- Cartes, sections, tableaux ---------- */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart .fi-section,
.fi-in-repeatable-table,
.fi-fo-repeater-item {
    border-radius: 1rem !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05) !important;
}
.fi-ta-header-cell { background: var(--edu-entete-tableau) !important; }
.fi-ta-header-cell, .fi-ta-header-cell * { color: var(--edu-titre) !important; }
.dark .fi-ta-header-cell { background: rgba(255, 255, 255, .04) !important; }
.dark .fi-ta-header-cell, .dark .fi-ta-header-cell * { color: #e5e7eb !important; }
.fi-ta-row:hover > td { background: var(--edu-survol) !important; }
.dark .fi-ta-row:hover > td { background: rgba(255, 255, 255, .03) !important; }

/* ---------- Indicateurs du tableau de bord ---------- */
.fi-wi-stats-overview-stat { position: relative; overflow: hidden; border-top: 4px solid var(--edu-stat, var(--edu-accent)) !important; }
.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-label-ctn > .fi-icon {
    width: 2.6rem; height: 2.6rem; padding: .55rem; border-radius: .75rem;
    color: #fff; background: var(--edu-stat, var(--edu-accent));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-label { font-weight: 600; }
.fi-wi-stats-overview-stat-value { letter-spacing: -.02em; font-size: 1.35rem !important; white-space: nowrap; }
.fi-wi-stats-overview-stat-description { white-space: normal; line-height: 1.35; }
.fi-wi-stats-overview-stat-description > span { min-width: 0; }
.edu-stat-orange { --edu-stat: var(--edu-c500); }
.edu-stat-vert   { --edu-stat: #16a34a; }
.edu-stat-bleu   { --edu-stat: #2563eb; }
.edu-stat-violet { --edu-stat: #9333ea; }
.edu-stat-rouge  { --edu-stat: #dc2626; }
.edu-stat-or     { --edu-stat: #d97706; }
.edu-stat-cyan   { --edu-stat: #0891b2; }

/* ---------- Raccourcis du tableau de bord ---------- */
.edu-raccourcis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .85rem; }
.edu-raccourci {
    display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: .9rem;
    color: #fff !important; font-weight: 700; text-decoration: none; font-size: .9rem; white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12); transition: transform .15s, box-shadow .15s;
}
.edu-raccourci:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .16); }
.edu-raccourci svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.edu-r-vert   { background: linear-gradient(135deg, #16a34a, #22c55e); }
.edu-r-bleu   { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.edu-r-violet { background: linear-gradient(135deg, #7e22ce, #a855f7); }
.edu-r-orange { background: linear-gradient(135deg, var(--edu-c600), var(--edu-accent-x)); }
.edu-r-cyan   { background: linear-gradient(135deg, #0e7490, #14b8a6); }
.edu-r-rose   { background: linear-gradient(135deg, #be123c, #f43f5e); }

/* ---------- Écran de connexion ---------- */
.fi-simple-layout { background: var(--edu-connexion) !important; }
.fi-simple-main { border-radius: 1.1rem !important; box-shadow: 0 20px 50px rgba(0, 0, 0, .25) !important; }
.fi-simple-header .edu-logo { color: var(--edu-titre); }
.dark .fi-simple-header .edu-logo { color: #fff; }

/* ---------- EDUKORA : grilles (saisie des notes, emploi du temps) ---------- */
.edu-grille { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.edu-grille th { background: var(--edu-entete-tableau); color: var(--edu-titre); font-weight: 700; text-align: left; padding: .55rem .7rem; border-bottom: 1px solid rgba(15, 23, 42, .08); white-space: nowrap; }
.edu-grille td { padding: .45rem .7rem; border-bottom: 1px solid rgba(15, 23, 42, .06); vertical-align: middle; }
.edu-grille tr:hover td { background: var(--edu-survol); }
.edu-grille .d { text-align: right; white-space: nowrap; }
.edu-grille .c { text-align: center; }
.edu-grille input[type=number], .edu-grille input[type=text] {
    width: 6.5rem; padding: .35rem .5rem; border-radius: .5rem; border: 1px solid #d1d5db; background: #fff; text-align: right; font-size: .9rem;
}
.edu-grille input:focus { outline: 2px solid var(--edu-c400); border-color: transparent; }
.dark .edu-grille th { background: rgba(255, 255, 255, .04); color: #e5e7eb; }
.dark .edu-grille td { border-color: rgba(255, 255, 255, .06); }
.dark .edu-grille input { background: #111827; border-color: #374151; color: #fff; }
.edu-carte { background: #fff; border-radius: 1rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 18px rgba(15, 23, 42, .05); overflow: visible; } /* visible : sinon les listes déroulantes du formulaire sont coupées */
.dark .edu-carte { background: #111827; }
.edu-pastille { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.edu-ok { background: #dcfce7; color: #166534; }
.edu-ko { background: #fee2e2; color: #991b1b; }
.edu-neutre { background: #f3f4f6; color: #374151; }

.edu-edt { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.edu-edt th { background: var(--edu-entete-tableau); color: var(--edu-titre); padding: .5rem; border-radius: .5rem; font-size: .85rem; }
.edu-edt td { vertical-align: top; padding: 0; }
.edu-edt .heure { width: 4.5rem; font-size: .75rem; color: #6b7280; text-align: right; padding-right: .4rem; }
.edu-seance { border-radius: .6rem; padding: .45rem .55rem; color: #fff; font-size: .78rem; line-height: 1.3; margin-bottom: 4px;
    background: linear-gradient(135deg, var(--edu-c600), var(--edu-accent-x)); box-shadow: 0 3px 10px rgba(0, 0, 0, .12); }
.edu-seance.td { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.edu-seance.tp { background: linear-gradient(135deg, #0e7490, #14b8a6); }
.edu-seance strong { display: block; font-size: .82rem; }
.edu-annule > td { opacity: .55; text-decoration: line-through; }
