/* ==========================================================
   VT Web 3.0 — Thème Clair & Vibrant
   Palette Indigo · Émeraude · Violet · Ambre
   Bootstrap 5.3 · Bootstrap Icons 1.11
   ========================================================== */

/* ── Variables ─────────────────────────────────────────── */
:root {
  /* Palette principale */
  --vt-indigo:        #6366f1;
  --vt-indigo-dark:   #4f46e5;
  --vt-indigo-light:  #e0e7ff;
  --vt-violet:        #8b5cf6;
  --vt-violet-light:  #ede9fe;
  --vt-emerald:       #10b981;
  --vt-emerald-light: #d1fae5;
  --vt-amber:         #f59e0b;
  --vt-amber-light:   #fef3c7;
  --vt-rose:          #f43f5e;
  --vt-mulberry-ligh:  #dc287326; 
  --vt-rose-light:    #ffe4e6;
  --vt-sky:           #0ea5e9;
  --vt-sky-light:     #e0f2fe;

  /* Fond & surfaces */
  --vt-bg:            #f1f5f9;
  --vt-surface:       #ffffff;
  --vt-surface-2:     #f8fafc;

  /* Texte */
  --vt-text:          #0f172a;
  --vt-text-2:        #334155;
  --vt-muted:         #64748b;

  /* Bordures */
  --vt-border:        #e2e8f0;
  --vt-border-2:      #cbd5e1;

  /* Ombres */
  --vt-shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --vt-shadow-sm: 0 2px 6px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --vt-shadow:    0 4px 16px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --vt-shadow-lg: 0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);

  --vt-radius:    .75rem;
  --vt-radius-sm: .5rem;
  --navbar-h:     64px;

  /* Couleurs séances */
  --color-cm:     #6366f1;
  --color-td:     #10b981;
  --color-tp:     #8b5cf6;
  --color-other:  #f59e0b;

  /* FullCalendar */
  --fc-small-font-size:          .75em;
  --fc-button-text-color:        #fff;
  --fc-button-bg-color:          #6366f1;
  --fc-button-border-color:      #4f46e5;
  --fc-button-hover-bg-color:    #4f46e5;
  --fc-button-hover-border-color:#4338ca;
  --fc-button-active-bg-color:   #3730a3;
  --fc-button-active-border-color:#3730a3;
  --fc-today-bg-color:           rgba(99,102,241,.06);
  --fc-now-indicator-color:      #f43f5e;
  --fc-page-bg-color:            var(--vt-surface);
  --fc-neutral-bg-color:         var(--vt-surface-2);
  --fc-border-color:             var(--vt-border);
  --fc-daygrid-event-dot-width:  8px;
}

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--vt-bg);
  color: var(--vt-text);
  min-height: 100vh;
  padding-top: var(--navbar-h);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vt-indigo); text-decoration: none; }
a:hover { color: var(--vt-indigo-dark); text-decoration: underline; }

/* ── Navbar ─────────────────────────────────────────────── */
.vt-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: var(--vt-surface);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.25rem;
  z-index: 1040;
  border-bottom: 1px solid var(--vt-border);
  box-shadow: var(--vt-shadow-sm);
  /* Accent coloré en haut */
  border-top: 3px solid var(--vt-indigo);
}

/* Brand */
.vt-navbar__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--vt-text);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -.02em;
}
.vt-navbar__brand:hover { color: var(--vt-indigo); text-decoration: none; }

.vt-navbar__brand .brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--vt-indigo) 0%, var(--vt-violet) 100%);
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}

/* Séparateur vertical */
.vt-navbar__divider {
  width: 1px;
  height: 28px;
  background: var(--vt-border);
  flex-shrink: 0;
}

/* Sélecteur composante */
.vt-navbar__composante {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  color: var(--vt-muted);
  white-space: nowrap;
}
.vt-navbar__composante label {
  margin: 0;
  font-weight: 500;
  color: var(--vt-text-2);
}
.vt-navbar__composante .form-select {
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-border);
  color: var(--vt-text);
  border-radius: var(--vt-radius-sm);
  font-size: .85rem;
  height: 36px;
  padding: 0 2rem 0 .65rem;
  transition: border-color .15s, box-shadow .15s;
}
.vt-navbar__composante .form-select:focus {
  border-color: var(--vt-indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  outline: none;
}

/* Zone de recherche */
.vt-navbar__search { flex: 1; min-width: 0; max-width: 380px; }

/* Actions (menu) */
.vt-navbar__actions { margin-left: auto; }

/* ── Bouton Menu ─────────────────────────────────────────── */
.vt-menu-btn {
  background: var(--vt-surface-2) !important;
  border: 1px solid var(--vt-border) !important;
  color: var(--vt-text-2) !important;
  border-radius: var(--vt-radius-sm) !important;
  padding: .4rem .85rem;
  font-size: .875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  line-height: 1.4;
  transition: all .15s;
}
.vt-menu-btn:hover,
.vt-menu-btn:focus {
  background: var(--vt-indigo-light) !important;
  border-color: var(--vt-indigo) !important;
  color: var(--vt-indigo) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12) !important;
}
.vt-menu-btn.show {
  background: var(--vt-indigo) !important;
  border-color: var(--vt-indigo) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.vt-menu-btn::after { display: none !important; }

/* ── Dropdown menu ───────────────────────────────────────── */
.vt-navbar .dropdown-menu {
  min-width: 260px;
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow-lg);
  padding: .5rem;
  margin-top: .4rem;
  animation: vt-dropdown-in .15s ease;
  z-index: 1060;
}

@keyframes vt-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vt-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  border-radius: calc(var(--vt-radius) - .2rem);
  color: var(--vt-text-2);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .12s, color .12s;
}
.vt-nav-item:hover {
  background: var(--vt-indigo-light);
  color: var(--vt-indigo-dark);
  text-decoration: none;
}

.vt-nav-icon {
  width: 32px; height: 32px;
  border-radius: .45rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0;
}

/* Labels de section dans le menu */
.vt-menu-section {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--vt-muted);
  padding: .25rem .75rem;
}

/* ── Page wrapper ───────────────────────────────────────── */
.vt-page {
  padding: 1.5rem;
  /* Permet le scroll horizontal si le calendrier est agrandi */
  min-width: 0;
  overflow-x: auto;
}

/* ── Cards ──────────────────────────────────────────────── */
.vt-card {
  background: var(--vt-surface);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius);
  box-shadow: var(--vt-shadow-sm);
  /* NE PAS mettre overflow:hidden ici : ça coupe le calendrier agrandi */
  transition: box-shadow .2s;
  min-width: 0;
}
.vt-card:hover { box-shadow: var(--vt-shadow); }

.vt-card__header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--vt-border);
  background: linear-gradient(135deg, var(--vt-surface) 60%, rgba(99,102,241,.025) 100%);
  /* Coins arrondis en haut uniquement */
  border-radius: var(--vt-radius) var(--vt-radius) 0 0;
  overflow: hidden;
}

/* Corps de la card : scrollable horizontalement */
.vt-card__body {
  padding: 1.5rem;
  overflow-x: auto;
  /* Assure que le scroll fonctionne même sous iOS */
  -webkit-overflow-scrolling: touch;
}

/* Corps dédié au calendrier : pas de padding côté, scroll fluide */
.vt-card__body--calendar {
  padding: .75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Wrapper interne du calendrier : peut dépasser la largeur du parent */
.vt-calendar-scroll {
  min-width: 0;
  width: 100%;
  min-height: 600px;
}

.vt-card__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--vt-text);
  margin: 0 0 .2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: -.02em;
}
.vt-card__title i { color: var(--vt-indigo); }

.vt-card__subtitle {
  font-size: .9rem;
  color: var(--vt-text-2);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.vt-card__subtitle strong { color: var(--vt-indigo-dark); }

.vt-card__meta {
  font-size: .78rem;
  color: var(--vt-muted);
  margin-top: .4rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* ── Header EDT : label + pill ressource + boutons ─────── */
.vt-edt-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--vt-text-2);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.vt-resource-pill {
  display: inline-flex;
  align-items: center;
  background: var(--vt-indigo-light);
  color: var(--vt-indigo-dark);
  font-size: .82rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 2rem;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sélecteur de fuseau horaire ────────────────────────── */
.vt-tz-select {
  font-size: .72rem;
  padding: 1px 4px;
  border: 1px solid var(--vt-border);
  border-radius: 5px;
  background: var(--vt-surface);
  color: var(--vt-text);
  cursor: pointer;
  max-width: 160px;
}
.vt-tz-select:focus {
  outline: 2px solid var(--vt-indigo);
  outline-offset: 1px;
}

/* Toast timezone */
.vt-tz-toast {
  background: var(--vt-surface);
  color: var(--vt-text);
  border: 1px solid var(--vt-border) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 300px;
  font-size: .85rem;
}

.vt-hdr-sep {
  width: 1px;
  height: 24px;
  background: var(--vt-border);
  flex-shrink: 0;
}

/* Boutons action (Exporter ICS, Copier agenda) */
.vt-btn-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .85rem;
  border: 1px solid var(--vt-border-2);
  border-radius: var(--vt-radius-sm);
  background: var(--vt-surface);
  color: var(--vt-text-2);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.vt-btn-action:hover {
  background: var(--vt-indigo-light);
  border-color: var(--vt-indigo);
  color: var(--vt-indigo-dark);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(99,102,241,.15);
}

/* ── Contrôles (slider, switch) ─────────────────────────── */
.vt-size-control {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  color: var(--vt-muted);
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-border);
  padding: .3rem .7rem;
  border-radius: 2rem;
}
.vt-size-control input[type="range"] {
  accent-color: var(--vt-indigo);
  width: 120px;
}

.form-check-input:checked {
  background-color: var(--vt-indigo);
  border-color: var(--vt-indigo);
}

/* ── Bouton ICS ─────────────────────────────────────────── */
.btn-ics {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  border: 1.5px solid var(--vt-indigo);
  color: var(--vt-indigo);
  background: var(--vt-indigo-light);
  border-radius: 2rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.btn-ics:hover {
  background: var(--vt-indigo);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
  transform: translateY(-1px);
}

/* ── Badges séance ──────────────────────────────────────── */
.badge-cm    { background: var(--vt-indigo-light);  color: var(--vt-indigo-dark);  border: 1px solid #c7d2fe; }
.badge-td    { background: var(--vt-emerald-light); color: #065f46;                border: 1px solid #a7f3d0; }
.badge-tp    { background: var(--vt-violet-light);  color: #5b21b6;                border: 1px solid #ddd6fe; }
/*.badge-other { background: var(--vt-amber-light);   color: #92400e;                border: 1px solid #fde68a; }*/
.badge-other { background: var(--vt-mulberry-ligh);   color: #b30e53 !important;                border: 1px solid #dc2873; }

/* ── FullCalendar toolbar ────────────────────────────────── */
#calendar { min-height: 600px; }

.fc .fc-toolbar { padding: .4rem 0; gap: .5rem; }

.fc .fc-toolbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--vt-text);
  letter-spacing: -.02em;
}

/* Groupe de boutons vues */
.fc .fc-button-group {
  border-radius: .6rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(99,102,241,.18);
}

.fc .fc-button {
  border-radius: 0 !important;
  font-size: .78rem;
  padding: .32rem .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  border-right-color: rgba(255,255,255,.25) !important;
  transition: background .12s;
}

.fc .fc-button-group > .fc-button:first-child { border-radius: .6rem 0 0 .6rem !important; }
.fc .fc-button-group > .fc-button:last-child  { border-radius: 0 .6rem .6rem 0 !important; border-right-color: var(--fc-button-border-color) !important; }

.fc .fc-prev-button,
.fc .fc-next-button {
  border-radius: .6rem !important;
  padding: .32rem .6rem;
  font-size: .9rem;
}
.fc .fc-today-button { border-radius: .6rem !important; font-weight: 700; }

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: var(--fc-button-active-bg-color) !important;
  border-color: var(--fc-button-active-border-color) !important;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.2);
}

/* ── En-têtes de jours (style screenshot) ────────────────── */
.fc .fc-col-header-cell { border-bottom: 2px solid var(--vt-border); }
.fc .fc-col-header-cell-cushion {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .5rem .25rem;
  gap: 3px;
  text-decoration: none !important;
  color: inherit !important;
}

/* Nom du jour : lun. mar. etc */
.fc-day-hdr-name {
  font-size: .7rem;
  font-weight: 500;
  color: var(--vt-muted);
  text-transform: lowercase;
  letter-spacing: .02em;
}

/* Numéro du jour : 10/11 */
.fc-day-hdr-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vt-text);
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .15s;
}

/* Aujourd'hui : cercle indigo */
.fc-day-hdr-num.is-today {
  background: var(--vt-indigo);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,102,241,.4);
}

/* Numéros de semaine */
.fc-week-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 600;
  color: var(--vt-muted);
  line-height: 1.3;
  padding: .25rem;
}

/* Numéro de semaine cliquable (navLink) */
.fc .fc-daygrid-week-number {
  cursor: pointer;
  border-radius: .35rem;
  transition: background .15s, color .15s;
}
.fc .fc-daygrid-week-number:hover { background: var(--vt-indigo-light); color: var(--vt-indigo-dark); }
.fc .fc-daygrid-week-number:hover .fc-week-num { color: var(--vt-indigo-dark); }

/* Numéro de jour cliquable (navLink) dans daygrid */
.fc .fc-daygrid-day-number {
  cursor: pointer;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  transition: background .15s, color .15s;
  text-decoration: none;
  color: var(--vt-text);
}
.fc .fc-daygrid-day-number:hover { background: var(--vt-indigo-light); color: var(--vt-indigo-dark); text-decoration: none; }
.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--vt-indigo);
  color: #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,.35);
}

/* Slots horaires */
.fc .fc-timegrid-slot-label-cushion { font-size: .72rem; color: var(--vt-muted); font-weight: 500; }
.fc .fc-timegrid-axis-cushion { font-size: .72rem; color: var(--vt-muted); }

/* ── Événements : structure carte (timegrid) ─────────────── */
.fc-timegrid-event {
  border-radius: .45rem !important;
  border: none !important;
  border-left: 4px solid transparent !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
  overflow: hidden;
}

.fc-timegrid-event .fc-event-main {
  padding: 0 !important;
  height: 100%;
}

/* Carte d'événement custom */
.fc-ev {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
  height: 100%;
  overflow: hidden;
}

/* Ligne 1 : Type · Heure début - fin */
.fc-ev__meta {
  font-size: .68rem;
  font-weight: 600;
  color: inherit;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ligne 2 : Titre matière */
.fc-ev__title {
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Ligne 3 : Salle · Prof */
.fc-ev__sub {
  font-size: .6rem;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ligne 4 : Badge groupe */
.fc-ev__badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  padding: 1px 1px;
  border-radius: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
  opacity: .9;
}

/* Ligne 5 : Volume horaire */
.fc-ev__evo {
  font-size: .65rem;
  opacity: .65;
  white-space: nowrap;
  margin-top: 1px;
}

/* ── Densité adaptative selon la hauteur de la carte ─────────
   Classes ajoutées par JS dans eventDidMount selon offsetHeight
   ──────────────────────────────────────────────────────────── */

/* Séance ~1h (55-72px) : masquer volume horaire, titre sur 1 ligne */
.fc-ev--sm .fc-ev__evo   { display: none; }
.fc-ev--sm .fc-ev__title { -webkit-line-clamp: 1; line-clamp: 1; }

/* Séance < 45min (< 40px) : meta + titre uniquement */
.fc-ev--xs .fc-ev__sub,
.fc-ev--xs .fc-ev__badge,
.fc-ev--xs .fc-ev__evo   { display: none; }
.fc-ev--xs .fc-ev__title { -webkit-line-clamp: 1; line-clamp: 1; }

/* ── Événements daygrid ───────────────────────────────────── */
.fc-daygrid-event {
  border-radius: .35rem !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  border-bottom: 3px solid transparent !important;
  font-size: .75rem;
  font-weight: 600;
  white-space: normal;
  height: auto !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08) !important;
}

/* ── Vue Planning (listWeek) ────────────────────────────── */
.fc-ev--list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
  height: auto;
}

.fc-ev__list-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}

.fc-ev__list-type {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fc-ev__list-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--vt-text);
}

/* Réduire la hauteur de ligne des lignes planning */
.fc-list-event td {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* Appliquer la couleur de fond selon le type sur la ligne entière */
.fc-list-event.fc-ev-type--cm { background: rgba(224,122,95,.07) !important; }
.fc-list-event.fc-ev-type--td { background: rgba(124,58,237,.07) !important; }
.fc-list-event.fc-ev-type--tp { background: rgba(5,150,105,.07)  !important; }
.fc-list-event.fc-ev-type--ci { background: rgba(37,99,235,.07)  !important; }
.fc-list-event.fc-ev-type--ds { background: rgba(224,122,95,.07) !important; }

/* ── Couleurs par type de séance (classe sur arg.el) ─────── */
/* CM —  Voiolet  */
/*.fc-ev-type--cm { border-left-color: #e07a5f !important; background: rgba(224,122,95,.12) !important; color: #7c2d12 !important; }*/
.fc-ev-type--cm { border-left-color: #dc2873 !important;  background: #dc287326 !important;   color: #b30e53 !important;}
/* TD — violet */
.fc-ev-type--td { border-left-color: #7c3aed !important; background: rgba(124,58,237,.09) !important; color: #3b0764 !important; }
/* TP — émeraude */
.fc-ev-type--tp { border-left-color: #059669 !important; background: rgba(5,150,105,.09) !important; color: #064e3b !important; }
/* CI / Cours Intégré — bleu acier */
.fc-ev-type--ci { border-left-color: #2563eb !important; background: rgba(37,99,235,.09) !important; color: #1e3a8a !important; }
/* DS — orange terracotta */
.fc-ev-type--ds { border-left-color: #e07a5f !important; background: rgba(224,122,95,.12) !important; color: #7c2d12 !important; }
/* Autres — gris ardoise */
 .fc-ev-type--other { border-left-color: #64748b !important; background: rgba(100,116,139,.09) !important; color: #1e293b !important; }

/* Today highlight */
.fc .fc-day-today { background: rgba(99,102,241,.04) !important; }

/* ── Popover ─────────────────────────────────────────────── */
.popover {
  max-width: 280px;
  font-size: .8rem;
  box-shadow: var(--vt-shadow-lg);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius);
}
.popover-header {
  font-size: .8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--vt-indigo) 0%, var(--vt-violet) 100%);
  color: #fff;
  border-bottom: none;
  border-radius: calc(var(--vt-radius) - 1px) calc(var(--vt-radius) - 1px) 0 0;
  letter-spacing: .01em;
}
.popover-body {
  font-size: .8rem;
  line-height: 1.7;
  color: var(--vt-text-2);
  padding: .65rem .85rem;
}

/* Loader */
#fullScreenLoader {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.spinner-border { color: var(--vt-indigo) !important; }

/* ── Select2 dans la navbar (thème clair) ───────────────── */
.vt-navbar .select2-container--bootstrap-5 .select2-selection {
  background: var(--vt-surface-2) !important;
  border: 1px solid var(--vt-border) !important;
  color: var(--vt-text) !important;
  height: 36px !important;
  border-radius: var(--vt-radius-sm) !important;
  transition: border-color .15s, box-shadow .15s;
}
.vt-navbar .select2-container--bootstrap-5 .select2-selection--single:focus,
.vt-navbar .select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: var(--vt-indigo) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
}
.vt-navbar .select2-container--bootstrap-5 .select2-selection__placeholder { color: var(--vt-muted) !important; }
.vt-navbar .select2-container--bootstrap-5 .select2-selection__rendered { color: var(--vt-text) !important; line-height: 34px !important; font-size: .85rem; }

/* Contraindre la largeur du Select2 composante (identique au form-select natif) */
.vt-navbar__composante .select2-container { min-width: 155px; max-width: 210px; width: auto !important; }
/* Contraindre la hauteur du Select2 de recherche ressource */
.vt-navbar__search .select2-container { width: 100% !important; }

/* ── DataTables ──────────────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--vt-radius-sm);
  border: 1px solid var(--vt-border);
  font-size: .875rem;
  padding: .3rem .65rem;
  transition: border-color .15s, box-shadow .15s;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--vt-indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  outline: none;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: var(--vt-radius-sm);
  border: 1px solid var(--vt-border);
}

table.dataTable thead th {
  background: linear-gradient(135deg, var(--vt-indigo) 0%, var(--vt-violet) 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-color: rgba(255,255,255,.1);
}

table.dataTable tbody tr { transition: background .1s; }
table.dataTable tbody tr:hover td { background: var(--vt-indigo-light) !important; }

/* Bilan tables — police légèrement réduite pour la densité */
.vt-card table.dataTable tbody td,
.vt-card table.dataTable tfoot th {
  font-size: .82rem;
  padding: .45rem .65rem;
}

/* Export buttons */
.dt-buttons .btn {
  font-size: .8rem;
  padding: .3rem .75rem;
  border-radius: var(--vt-radius-sm);
  font-weight: 600;
  transition: all .15s;
}
.dt-button-excel { background: #059669 !important; color: #fff !important; border-color: #059669 !important; }
.dt-button-excel:hover { background: #047857 !important; }
.dt-button-pdf   { background: var(--vt-rose) !important; color: #fff !important; border-color: var(--vt-rose) !important; }
.dt-button-pdf:hover { background: #e11d48 !important; }
.dt-button-print { background: var(--vt-indigo) !important; color: #fff !important; border-color: var(--vt-indigo) !important; }
.dt-button-print:hover { background: var(--vt-indigo-dark) !important; }

/* ── Utilitaires ─────────────────────────────────────────── */
.text-vt-primary { color: var(--vt-indigo) !important; }
/* Rétrocompatibilité */
.text-ugb { color: var(--vt-indigo) !important; }
.bg-ugb   { background: var(--vt-indigo) !important; }
.text-accent { color: var(--vt-amber) !important; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-header[style*="ugb-primary"],
.modal-header[style*="var(--ugb"] {
  background: linear-gradient(135deg, var(--vt-indigo) 0%, var(--vt-violet) 100%) !important;
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .vt-navbar, .vt-size-control, .btn-ics,
  .fc .fc-toolbar, .d-print-none { display: none !important; }
  body { padding-top: 0; background: #fff; }
  .vt-card { box-shadow: none; border: 1px solid #e2e8f0; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .vt-navbar__composante label { display: none; }
}

@media (max-width: 767.98px) {
  .vt-navbar { gap: .4rem; padding: 0 .75rem; }
  .vt-navbar__search { max-width: 160px; }
  .vt-navbar__divider { display: none; }
  .vt-page { padding: .75rem .5rem; }
  .fc .fc-toolbar { flex-direction: column; gap: .4rem; }
  .fc .fc-toolbar-title { font-size: 1rem; }
  .vt-card__header { padding: 1rem; }
}

@media (max-width: 575.98px) {
  .vt-navbar__brand span { display: none; }
  .vt-navbar__composante { display: none; }
}
