/* =============================================
   MUSCAD – Feuille de styles globale
   Palette : Soft Mode Chaleureux & Naturel
   ============================================= */

/* ── Variables de la palette ── */
:root {
    --mc-bg: #F4F1EA;
    /* Fond principal beige crème */
    --mc-surface: #FAF9F6;
    /* Fonds secondaires blanc cassé */
    --mc-text: #2D3748;
    /* Texte principal gris anthracite */
    --mc-text-muted: #718096;
    /* Texte secondaire */
    --mc-accent: #C4623A;
    /* Terracotta (accent principal) */
    --mc-accent-hover: #B05430;
    /* Terracotta foncé hover */
    --mc-accent-light: #F5E6DF;
    /* Terracotta très léger */
    --mc-green: #6B8E23;
    /* Vert sauge (accent secondaire) */
    --mc-green-hover: #527019;
    --mc-green-light: #EAF0D4;
    --mc-alert: #EAB308;
    /* Ocre jaune – alertes */
    --mc-border: #E2D9CF;
    /* Bordure douce */
    --mc-border-focus: #C4623A;
    /* Bordure focus */
    --mc-shadow: rgba(45, 55, 72, 0.08);
    --mc-sidebar-bg: #3D2B1F;
    /* Sidebar brun chaud profond */
    --mc-sidebar-text: #EDE0D4;
    --mc-sidebar-hover: #5C3D2A;
    --mc-sidebar-active: #C4623A;
}

/* ═══════════════════════════════════════════
   FULLSCREEN MODE (migré depuis FrontendRouter::inject_fullscreen_css)
   ═══════════════════════════════════════════ */

body.muscad-fullscreen #wpadminbar {
    display: none !important;
}

body.muscad-fullscreen #muscad-fullscreen-root {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    overflow: hidden;
    background: #F4F1EA;
}

body.muscad-fullscreen {
    overflow: hidden !important;
}

/* ═══════════════════════════════════════════
   SIDEBAR – TRANSITIONS (migré depuis dashboard.php)
   ═══════════════════════════════════════════ */
#muscad-sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed #muscad-sidebar {
    width: 0;
    transform: translateX(-100%);
}

.sidebar-collapsed #muscad-sidebar-content {
    opacity: 0;
}

/* ═══════════════════════════════════════════
   BOUTON LOGIN SITE PUBLIC (migré depuis inject_site_login_button)
   ═══════════════════════════════════════════ */
.muscad-site-login-btn {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 999999;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(196, 98, 58, 0.10);
    color: #C4623A !important;
    padding: 4px 9px;
    border-radius: 9999px;
    border: 1px solid rgba(196, 98, 58, 0.25);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    opacity: 0.75;
}

.muscad-site-login-btn:hover {
    background-color: rgba(196, 98, 58, 0.20);
    color: #7A3520 !important;
    opacity: 1;
}

.muscad-btn-firstname {
    font-weight: 600;
    color: #7A3520 !important;
}

@media (max-width: 768px) {
    .muscad-site-login-btn span {
        display: none;
    }

    .muscad-site-login-btn {
        padding: 6px;
    }
}

/* ═══════════════════════════════════════════
   PANNEAU ADMIN WP (migré depuis admin-settings.php)
   ═══════════════════════════════════════════ */
#wpcontent {
    padding-left: 0;
}

.muscad-admin-panel h1,
.muscad-admin-panel h2,
.muscad-admin-panel h3 {
    margin: 0;
}

.muscad-admin-panel a {
    text-decoration: none !important;
}

/* ── Suppression des ombres héritées du thème ── */
#muscad-fullscreen-root .bg-white,
#muscad-fullscreen-root .rounded-xl,
#muscad-fullscreen-root .rounded-lg,
#muscad-fullscreen-root input,
#muscad-fullscreen-root select,
#muscad-fullscreen-root textarea {
    box-shadow: none !important;
}

/* ── Champ lecture seule ── */
#muscad-fullscreen-root input[readonly] {
    cursor: not-allowed;
    background: #EDE8E1 !important;
    color: #8C7B6E !important;
}

/* ── Textarea non redimensionnable ── */
#muscad-fullscreen-root textarea {
    resize: none;
}

/* ── Fond plein écran ── */
#muscad-fullscreen-root {
    background: var(--mc-bg) !important;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--mc-text);
}

/* ═══════════════════════════════════════════
   LAYOUT PRINCIPAL
   ═══════════════════════════════════════════ */

/* Fond main content */
#muscad-fullscreen-root #muscad-main-layout {
    background: var(--mc-bg) !important;
}

/* Scrollbar personnalisée */
#muscad-fullscreen-root ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#muscad-fullscreen-root ::-webkit-scrollbar-track {
    background: var(--mc-surface);
}

#muscad-fullscreen-root ::-webkit-scrollbar-thumb {
    background: #C4A98A;
    border-radius: 9999px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root #muscad-sidebar {
    background: var(--mc-sidebar-bg) !important;
    border-right: 1px solid #2A1E15;
}

/* Logo zone */
#muscad-fullscreen-root #muscad-sidebar>div>a {
    background: #2A1E15 !important;
    border-bottom: 1px solid #4A3020 !important;
}

#muscad-fullscreen-root #muscad-sidebar>div>a:hover {
    background: #3D2B1F !important;
}

/* Liens sidebar */
#muscad-fullscreen-root #muscad-sidebar nav a {
    color: var(--mc-sidebar-text) !important;
    border-radius: 8px !important;
    transition: background 0.22s ease, color 0.22s ease, transform 0.15s ease, box-shadow 0.22s ease !important;
    position: relative;
    overflow: hidden;
}

#muscad-fullscreen-root #muscad-sidebar nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--mc-accent);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#muscad-fullscreen-root #muscad-sidebar nav a:hover {
    background: var(--mc-sidebar-hover) !important;
    color: #FAF9F6 !important;
    transform: translateX(3px) !important;
    box-shadow: 2px 0 12px rgba(196, 98, 58, 0.18) !important;
}

#muscad-fullscreen-root #muscad-sidebar nav a:hover::before {
    opacity: 1;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root header {
    background: rgba(250, 249, 246, 0.90) !important;
    border-bottom: 1px solid var(--mc-border) !important;
    backdrop-filter: blur(12px);
}

/* Bouton toggle sidebar */
#muscad-fullscreen-root #muscad-sidebar-toggle {
    background: var(--mc-accent-light) !important;
    color: var(--mc-accent) !important;
    border: 1px solid #E8C4B2;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.18s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.2s ease !important;
}

#muscad-fullscreen-root #muscad-sidebar-toggle:hover {
    background: var(--mc-accent) !important;
    color: #fff !important;
    transform: scale(1.08) rotate(2deg) !important;
    box-shadow: 0 4px 16px rgba(196, 98, 58, 0.30) !important;
}

/* Séparateur header */
#muscad-fullscreen-root header .h-8.w-px {
    background: var(--mc-border) !important;
}

/* Titre de la page */
#muscad-fullscreen-root header h1 {
    color: var(--mc-text) !important;
}

/* Select de l'année */
#muscad-fullscreen-root #muscad_set_year {
    background: var(--mc-surface) !important;
    border: 1px solid var(--mc-border) !important;
    color: var(--mc-text) !important;
    border-radius: 9999px !important;
}

#muscad-fullscreen-root #muscad_set_year:hover {
    background: var(--mc-accent-light) !important;
    border-color: var(--mc-accent) !important;
}

#muscad-fullscreen-root #muscad_set_year:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.15) !important;
}

/* ═══════════════════════════════════════════
   CONTENU PRINCIPAL – ZONES
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .flex-1.overflow-auto {
    background: var(--mc-bg) !important;
}

/* ═══════════════════════════════════════════
   CARTES / PANELS
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .bg-white,
#muscad-fullscreen-root [class*="bg-white"] {
    background: var(--mc-surface) !important;
}

#muscad-fullscreen-root .bg-slate-50,
#muscad-fullscreen-root [class*="bg-slate-50"] {
    background: var(--mc-bg) !important;
}

#muscad-fullscreen-root .bg-slate-100,
#muscad-fullscreen-root [class*="bg-slate-100"] {
    background: #EDE8E1 !important;
}

/* Bordures */
#muscad-fullscreen-root .border-slate-200,
#muscad-fullscreen-root [class*="border-slate-200"] {
    border-color: var(--mc-border) !important;
}

#muscad-fullscreen-root .border-slate-300,
#muscad-fullscreen-root [class*="border-slate-300"] {
    border-color: #C9BDB3 !important;
}

/* ═══════════════════════════════════════════
   TEXTES
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .text-slate-800,
#muscad-fullscreen-root [class*="text-slate-800"] {
    color: var(--mc-text) !important;
}

#muscad-fullscreen-root .text-slate-700,
#muscad-fullscreen-root [class*="text-slate-700"] {
    color: #3D3228 !important;
}

#muscad-fullscreen-root .text-slate-600,
#muscad-fullscreen-root [class*="text-slate-600"] {
    color: #5A4A3C !important;
}

#muscad-fullscreen-root .text-slate-500,
#muscad-fullscreen-root [class*="text-slate-500"] {
    color: var(--mc-text-muted) !important;
}

#muscad-fullscreen-root .text-slate-400,
#muscad-fullscreen-root [class*="text-slate-400"] {
    color: #A89080 !important;
}

/* ═══════════════════════════════════════════
   TABLEAUX
   ═══════════════════════════════════════════ */

/* Table wrapper */
#muscad-fullscreen-root .rounded-xl.shadow-sm.border.border-slate-200.overflow-hidden {
    background: var(--mc-surface) !important;
    border-color: var(--mc-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px var(--mc-shadow) !important;
}

/* Thead */
#muscad-fullscreen-root thead,
#muscad-fullscreen-root thead tr,
#muscad-fullscreen-root .bg-slate-50.border-b {
    background: #EDE8E0 !important;
    border-bottom-color: var(--mc-border) !important;
}

/* Icône tri */
#muscad-fullscreen-root .sort-icon {
    color: #C4A98A !important;
}

/* Lignes de tbody */
#muscad-fullscreen-root tbody tr:hover {
    background: #F0EBE3 !important;
}

#muscad-fullscreen-root .divide-y.divide-slate-100>*+* {
    border-color: #E8E0D6 !important;
}

/* ═══════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════ */

/* Bouton principal (accent terracotta) */
#muscad-fullscreen-root a[style*="background-color: #4f46e5"],
#muscad-fullscreen-root button[style*="background-color: #4f46e5"],
#muscad-fullscreen-root .bg-indigo-600 {
    background-color: var(--mc-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

#muscad-fullscreen-root a[style*="background-color: #4f46e5"]:hover,
#muscad-fullscreen-root button[style*="background-color: #4f46e5"]:hover,
#muscad-fullscreen-root .bg-indigo-600:hover,
#muscad-fullscreen-root .hover\:bg-indigo-700:hover {
    background-color: var(--mc-accent-hover) !important;
}

/* Bouton secondaire / outline */
#muscad-fullscreen-root a[style*="background-color: #ffffff"],
#muscad-fullscreen-root a[style*="background-color: #1e293b"] {
    background-color: var(--mc-surface) !important;
    color: var(--mc-text) !important;
    border: 1px solid var(--mc-border) !important;
    border-radius: 8px !important;
}

#muscad-fullscreen-root a[style*="background-color: #ffffff"]:hover,
#muscad-fullscreen-root a[style*="background-color: #1e293b"]:hover {
    background-color: var(--mc-accent-light) !important;
    border-color: var(--mc-accent) !important;
    color: var(--mc-accent) !important;
}

/* Bouton "Retour au site" (header) */
#muscad-fullscreen-root header a[style*="background-color: #1e293b"] {
    background-color: var(--mc-accent) !important;
    color: #fff !important;
    border: none !important;
}

#muscad-fullscreen-root header a[style*="background-color: #1e293b"]:hover {
    background-color: var(--mc-accent-hover) !important;
}

/* Bouton vert émeraude → vert sauge */
#muscad-fullscreen-root .bg-emerald-600,
#muscad-fullscreen-root [style*="background-color:#059669"] {
    background-color: var(--mc-green) !important;
    color: #fff !important;
    border-radius: 8px !important;
}

#muscad-fullscreen-root .bg-emerald-600:hover,
#muscad-fullscreen-root [style*="background-color:#059669"]:hover {
    background-color: var(--mc-green-hover) !important;
}

/* Bouton Voir (actions table) */
#muscad-fullscreen-root .bg-slate-100.hover\:bg-slate-200 {
    background: var(--mc-accent-light) !important;
    color: var(--mc-accent) !important;
    border: 1px solid #E8C4B2 !important;
}

#muscad-fullscreen-root .bg-slate-100.hover\:bg-slate-200:hover {
    background: var(--mc-accent) !important;
    color: #fff !important;
}

/* Bouton Éditer (indigo-50) */
#muscad-fullscreen-root .bg-indigo-50.hover\:bg-indigo-100 {
    background: var(--mc-green-light) !important;
    color: var(--mc-green) !important;
    border: 1px solid #C5D99A !important;
}

#muscad-fullscreen-root .bg-indigo-50.hover\:bg-indigo-100:hover {
    background: var(--mc-green) !important;
    color: #fff !important;
}

/* Bouton Suppr (rose) – on garde le rouge mais plus doux */
#muscad-fullscreen-root .bg-rose-50 {
    background: #FEF0EC !important;
    color: #B44C30 !important;
    border: 1px solid #F5C3B0 !important;
}

#muscad-fullscreen-root .bg-rose-50:hover,
#muscad-fullscreen-root .hover\:bg-rose-100:hover {
    background: #B44C30 !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════
   FORMULAIRES – INPUTS, SELECT, TEXTAREA
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root input[type="text"],
#muscad-fullscreen-root input[type="date"],
#muscad-fullscreen-root input[type="time"],
#muscad-fullscreen-root input[type="email"],
#muscad-fullscreen-root input[type="number"],
#muscad-fullscreen-root select,
#muscad-fullscreen-root textarea {
    background: var(--mc-surface) !important;
    border-color: var(--mc-border) !important;
    color: var(--mc-text) !important;
    border-radius: 6px !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#muscad-fullscreen-root input:focus,
#muscad-fullscreen-root select:focus,
#muscad-fullscreen-root textarea:focus {
    border-color: var(--mc-border-focus) !important;
    box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.12) !important;
    outline: none !important;
}

/* Labels des champs */
#muscad-fullscreen-root label.block.text-\[10px\].uppercase {
    color: #9C8476 !important;
}

/* Placeholder des inputs */
#muscad-fullscreen-root ::placeholder {
    color: #B8A898 !important;
}

/* ═══════════════════════════════════════════
   SECTIONS DU FORMULAIRE (cartes sections)
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .bg-white.rounded-lg.border.border-slate-200 {
    background: var(--mc-surface) !important;
    border-color: var(--mc-border) !important;
    box-shadow: 0 1px 6px var(--mc-shadow) !important;
}

/* Fil d'ariane (breadcrumb) */
#muscad-fullscreen-root a[style*="background-color: #f1f5f9"] {
    background: var(--mc-accent-light) !important;
    color: var(--mc-accent) !important;
    border-color: #E8C4B2 !important;
}

#muscad-fullscreen-root a[style*="background-color: #f1f5f9"]:hover {
    background: var(--mc-accent) !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════
   ACCENTS INDIGO → TERRACOTTA
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .text-indigo-600,
#muscad-fullscreen-root [class*="text-indigo-6"] {
    color: var(--mc-accent) !important;
}

#muscad-fullscreen-root .text-indigo-700,
#muscad-fullscreen-root [class*="text-indigo-7"] {
    color: var(--mc-accent-hover) !important;
}

#muscad-fullscreen-root .bg-indigo-50 {
    background: var(--mc-accent-light) !important;
}

#muscad-fullscreen-root .bg-indigo-100 {
    background: #F5E6DF !important;
}

#muscad-fullscreen-root .text-indigo-800 {
    color: #7A3520 !important;
}

#muscad-fullscreen-root .border-indigo-200 {
    border-color: #E8C4B2 !important;
}

/* Focus ring indigo → terracotta */
#muscad-fullscreen-root .focus\:ring-indigo-500:focus,
#muscad-fullscreen-root .focus\:border-indigo-500:focus {
    box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.15) !important;
    border-color: var(--mc-accent) !important;
}

/* Badges indigo (cours actifs) */
#muscad-fullscreen-root .bg-indigo-100.text-indigo-700 {
    background: var(--mc-accent-light) !important;
    color: var(--mc-accent) !important;
}

/* Checkbox accent color */
#muscad-fullscreen-root input[type="checkbox"] {
    accent-color: var(--mc-accent) !important;
}

/* ═══════════════════════════════════════════
   PANNEAUX SPÉCIAUX (émeraude → sauge)
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .bg-emerald-50 {
    background: var(--mc-green-light) !important;
}

#muscad-fullscreen-root .border-emerald-200 {
    border-color: #B5D680 !important;
}

#muscad-fullscreen-root .text-emerald-600 {
    color: var(--mc-green) !important;
}

#muscad-fullscreen-root .bg-emerald-600 {
    background: var(--mc-green) !important;
}

/* Cases à cocher enrolled (table cours) */
#muscad-fullscreen-root [style*="background-color:#eef2ff"] {
    background-color: var(--mc-green-light) !important;
}

/* Compteur instruments sélectionnés */
#muscad-fullscreen-root #muscad-inst-count {
    background: var(--mc-accent-light) !important;
    color: var(--mc-accent) !important;
}

/* ═══════════════════════════════════════════
   BARRE DE RECHERCHE
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root #muscad_crud_search {
    background: var(--mc-surface) !important;
    border-color: var(--mc-border) !important;
    color: var(--mc-text) !important;
}

#muscad-fullscreen-root #muscad_crud_search:focus {
    border-color: var(--mc-accent) !important;
    box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.12) !important;
}

/* ═══════════════════════════════════════════
   LOGO MUSCAD (couleurs terracotta)
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .text-indigo-400 {
    color: #E8A882 !important;
}

/* ═══════════════════════════════════════════
   PAGE D'ACCUEIL – CARTES
   ═══════════════════════════════════════════ */

/* Carte Structure (indigo → terracotta) */
#muscad-fullscreen-root .bg-indigo-50.border.border-indigo-100 {
    background: var(--mc-accent-light) !important;
    border-color: #E8C4B2 !important;
}

#muscad-fullscreen-root .bg-indigo-50.border.border-indigo-100 .text-indigo-600 {
    color: var(--mc-accent) !important;
}

#muscad-fullscreen-root .bg-indigo-50.border.border-indigo-100 p {
    color: #7A5540 !important;
}

/* Carte Pédagogie (émeraude → vert sauge) */
#muscad-fullscreen-root .bg-emerald-50.border.border-emerald-100 {
    background: var(--mc-green-light) !important;
    border-color: #C5D99A !important;
}

#muscad-fullscreen-root .bg-emerald-50.border.border-emerald-100 .text-emerald-600 {
    color: var(--mc-green) !important;
}

#muscad-fullscreen-root .bg-emerald-50.border.border-emerald-100 p {
    color: #405215 !important;
}

/* Carte Scolarité (amber → ocre) */
#muscad-fullscreen-root .bg-amber-50.border.border-amber-100 {
    background: #FDF5DC !important;
    border-color: #F0D060 !important;
}

#muscad-fullscreen-root .bg-amber-50.border.border-amber-100 .text-amber-600 {
    color: #B8860B !important;
}

#muscad-fullscreen-root .bg-amber-50.border.border-amber-100 p {
    color: #6B5500 !important;
}

/* ═══════════════════════════════════════════
   ALERT / NOTIFICATION ocre
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .bg-amber-50.border.border-amber-200 {
    background: #FEFAE8 !important;
    border-color: #F0D060 !important;
    color: #7A6200 !important;
}

/* ═══════════════════════════════════════════
   ÉTOILE – établissement principal
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .text-amber-500 {
    color: var(--mc-alert) !important;
}

/* ═══════════════════════════════════════════
   SIDEBAR ACTIVE LINK
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root .bg-indigo-600.text-white.font-medium.shadow-md {
    background: var(--mc-accent) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(196, 98, 58, 0.35) !important;
}

/* ═══════════════════════════════════════════
   ANIMATIONS & MICRO-INTERACTIONS GLOBALES
   ═══════════════════════════════════════════ */

/* ── Transition universelle sur tous les éléments interactifs ── */
#muscad-fullscreen-root a,
#muscad-fullscreen-root button,
#muscad-fullscreen-root select,
#muscad-fullscreen-root input[type="text"],
#muscad-fullscreen-root input[type="date"],
#muscad-fullscreen-root input[type="time"],
#muscad-fullscreen-root .rounded-lg,
#muscad-fullscreen-root .rounded-xl {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.18s ease, opacity 0.2s ease !important;
}

/* ── Boutons d'action du tableau (Voir / Éditer / Suppr) ── */
#muscad-fullscreen-root td a,
#muscad-fullscreen-root td button {
    transition: background 0.18s ease, color 0.18s ease,
        transform 0.16s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.18s ease, border-color 0.18s ease !important;
}

#muscad-fullscreen-root td a:hover,
#muscad-fullscreen-root td button:hover {
    transform: translateY(-1px) scale(1.05) !important;
    box-shadow: 0 3px 10px rgba(45, 55, 72, 0.12) !important;
}

/* ── Lignes du tableau ── */
#muscad-fullscreen-root tbody tr {
    transition: background 0.16s ease !important;
}

#muscad-fullscreen-root tbody tr:hover {
    background: #F0EBE3 !important;
    cursor: default;
}

/* ── Boutons principaux (Ajouter, Enregistrer, etc.) ── */
#muscad-fullscreen-root a.px-5,
#muscad-fullscreen-root button.px-5,
#muscad-fullscreen-root button.px-8,
#muscad-fullscreen-root a.px-8 {
    transition: background 0.2s ease, color 0.2s ease,
        transform 0.18s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.22s ease !important;
}

#muscad-fullscreen-root a.px-5:hover,
#muscad-fullscreen-root button.px-5:hover,
#muscad-fullscreen-root button.px-8:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(196, 98, 58, 0.28) !important;
}

/* ── Breadcrumb (retour à la liste) ── */
#muscad-fullscreen-root .mb-6>a {
    transition: background 0.2s ease, color 0.2s ease,
        transform 0.18s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.2s ease !important;
}

#muscad-fullscreen-root .mb-6>a:hover {
    transform: translateX(-3px) !important;
    box-shadow: 0 3px 12px rgba(196, 98, 58, 0.20) !important;
}

/* ── Select de l'année (header) ── */
#muscad-fullscreen-root #muscad_set_year {
    transition: background 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.18s ease !important;
}

#muscad-fullscreen-root #muscad_set_year:hover {
    background: var(--mc-accent-light) !important;
    border-color: var(--mc-accent) !important;
    transform: scale(1.02) !important;
}

/* ── Bouton Retour au site (header) ── */
#muscad-fullscreen-root header a {
    transition: background 0.2s ease, color 0.2s ease,
        transform 0.18s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.22s ease !important;
}

#muscad-fullscreen-root a:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(196, 98, 58, 0.32) !important;
    filter: brightness(1.06) !important;
}

/* ── Cards / Cartes (page accueil) ── */
#muscad-fullscreen-root .grid>div {
    transition: transform 0.22s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.22s ease !important;
}

#muscad-fullscreen-root .grid>div:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(45, 55, 72, 0.12) !important;
}

/* ── Logo sidebar (effet shimmer au hover) ── */
#muscad-fullscreen-root #muscad-sidebar>div>a {
    transition: background 0.25s ease, filter 0.25s ease !important;
}

#muscad-fullscreen-root #muscad-sidebar>div>a:hover {
    filter: brightness(1.15) !important;
}

/* ── Chips instruments enseignants ── */
#muscad-fullscreen-root #muscad-inst-chips label {
    transition: background 0.18s ease, color 0.18s ease,
        border-color 0.18s ease,
        transform 0.16s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow 0.18s ease !important;
}

#muscad-fullscreen-root #muscad-inst-chips label:hover {
    transform: scale(1.06) !important;
    box-shadow: 0 3px 10px rgba(196, 98, 58, 0.18) !important;
}

/* ── Icône de tri (flèche) ── */
#muscad-fullscreen-root thead th[data-sortable] {
    transition: background 0.18s ease, color 0.18s ease !important;
}

#muscad-fullscreen-root thead th[data-sortable]:hover {
    background: #E6DDD4 !important;
    color: var(--mc-accent) !important;
}

/* ── Input focus ring animé ── */
#muscad-fullscreen-root input:focus,
#muscad-fullscreen-root select:focus,
#muscad-fullscreen-root textarea:focus {
    animation: mc-focus-ring 0.25s ease forwards;
}

@keyframes mc-focus-ring {
    0% {
        box-shadow: 0 0 0 0px rgba(196, 98, 58, 0);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.18);
    }
}

/* ── Apparition douce des vues ── */
#muscad-fullscreen-root .flex-1.overflow-auto>* {
    animation: mc-fadein 0.3s ease forwards;
}

@keyframes mc-fadein {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════
   SIDEBAR – HOVER VIA CLASSE JS (mc-nav-hover)
   (les inline style bloquent le CSS :hover)
   ═══════════════════════════════════════════ */
#muscad-fullscreen-root #muscad-sidebar nav a.mc-nav-hover {
    background: var(--mc-sidebar-hover) !important;
    color: #FAF9F6 !important;
    transform: translateX(3px) !important;
    box-shadow: 2px 0 12px rgba(196, 98, 58, 0.18) !important;
}

#muscad-fullscreen-root #muscad-sidebar nav a.mc-nav-hover::before {
    opacity: 1 !important;
}