[data-bs-theme-primary="vmi"] {
	--tblr-primary: #117aa5;
	--tblr-primary-rgb: 17, 122, 155;
}

:root {
	--tblr-bg-surface-dark: #091c2d;
    --tblr-primary: #117aa5;
    --tblr-primary-rgb: 17, 122, 155;
	--tblr-btn-bg: var(--tblr-primary);
	--tblr-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
	--fc-today-bg-color: var(--tblr-primary-lt);
	--fc-event-bg-color: var(--tblr-primary);
	--fc-event-border-color: var(--tblr-bg-surface-dark);
}

/* CSS */
body {
    font-family: var(--tblr-font-sans-serif);
	font-size: 0.9rem; /* slightly smaller */
}

h1, h2, h3, h4, h5, h6, .card-title { font-weight: bold; }


#logo {
	max-height: 36px;
}
#logo-login {
	max-height: 64px;
}

aside.navbar-dark {
	background: var(--tblr-bg-surface-dark);
}

li.nav-item {
	margin: 4px 8px;
}
li.nav-item.active>a, li.menu-active>a, li.menu-active>a:active, li.menu-active>a:focus, li.menu-active>a:hover  {
	background-color: var(--tblr-primary);
	color: #fff;
}

li.nav-item.show  {
	background-color: var(--tblr-dropdown-link-hover-bg);
}

.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item {
	padding-left: 24px;
	margin-left: 16px;
	border-left: 3px solid var(--tblr-dropdown-link-hover-bg);
}
.navbar-vertical.navbar-expand-lg .navbar-collapse .dropdown-menu .dropdown-item.active {
	/* background: red; */
	border-left: 3px solid var(--tblr-primary);
	color: #fff;
}

@media (min-width: 992px) {
    .navbar-expand-lg .nav-item.active:after {
		border-color: transparent;
	}
}

.dropdown-toggle.show:after, .nav-link[aria-expanded="true"]::after {
  transform: rotate(135deg);
}


div.menu-badge {
	width: 20px;
	height: 20px;
	background: var(--tblr-danger);
	color: #fff;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	font-weight: 600;
}

.form-control { width: 100% !important; }

.form-select:focus, .form-control:focus {
	border-color: #1497cc;
}

#type_rdv .btn-check:checked+.btn, #type_rdv .btn.active, #type_rdv .btn.show, #type_rdv .btn:first-child:active, #type_rdv :not(.btn-check)+.btn:active {
	background-color: var(--tblr-primary);
	color: #fff;
}

.page-center {
  position: relative;
}

#login {
  position: relative;
  z-index: 1;
}

.table td.text-center {
  vertical-align: middle !important;
  text-align: center !important;
}
/* Optional: shrink switch padding so it's visually balanced */
.table .form-check.form-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
}

.fc-list-day-text, .fc-list-day-side-text, .fc-list-day-text:hover, .fc-list-day-side-text:hover, .fc-col-header-cell-cushion, .fc-col-header-cell-cushion:hover, .fc-daygrid-day-number, .fc-daygrid-day-number:hover {
	text-decoration: none; 
	cursor: default;
	color: var(--tblr-body-color);
}
.fc-daygrid-day-number, .fc-daygrid-day-number:hover {
	font-weight: bold;
	font-size: 1em;
	background-color: var(--tblr-body-bg);
	width: 28px;
	text-align: center;
	border-radius: 0 0 0 25%;
}

.fc-day-today .fc-daygrid-day-number, .fc-day-today .fc-daygrid-day-number:hover {
	background-color: var(--tblr-primary);
	color: #fff;
}

.calendar-wrapper.fc-theme-standard .fc-list {
	border: none;
}

tr.fc-day-today .fc-cell-shaded {
	background-color: var(--tblr-primary) !important;
	color: #fff !important;
	border-radius: 0 !important;
}
tr.fc-day-today .fc-cell-shaded a {
	color: #fff !important;
}

td.fc-day:hover, .fc-daygrid-dot-event.fc-event-mirror, .fc-daygrid-dot-event:hover, th.fc-col-header-cell  {
	background-color: var(--tblr-light);
	cursor: pointer;
}
.calendar-wrapper.fc-theme-standard td.fc-day:hover, .fc-daygrid-dot-event.fc-event-mirror, .fc-daygrid-dot-event:hover, th.fc-col-header-cell  {
	background-color: #fff;
	cursor: default;
}
.fc-daygrid-dot-event:hover  {
	background-color: var(--tblr-primary);
	color: #fff;
}
a.fc-event { color: var(--tblr-body-color); padding: 3px; }

/* Add this after your FullCalendar CSS */
.fc-daygrid-day:hover,
.fc-timegrid-slot:hover {
  background-color: var(--tblr-primary-lt); /* soft blue */
  cursor: pointer;
}

.flatpickr-day.today {
	background-color: var(--tblr-primary) !important;
	color: #fff !important;
	border-color: var(--tblr-primary) !important;
}

/* ============================= */
/* 📅 Calendar + Layout          */
/* ============================= */

#calendar-wrap { min-height: 85vh; }
.fc .fc-toolbar-title { font-size: 1.125rem; }
a.fc-event, tr.fc-event { cursor: pointer; }

/* Duration buttons */
.duration-group .btn { min-width: 4rem; }

/* Voice dictation alignment */
.input-group textarea.form-control {
  display: flex;
  flex: 1 1 auto;
  resize: vertical;
}
.input-group .btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-secteurs th,
.table-secteurs td {
  text-align: center;
  vertical-align: middle;
  border-left: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  padding: 6px 8px;
}
.table-secteurs .form-check {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  height: 100%;
}

table.sticky {
  position: relative;
  border-collapse: collapse; 
}
table.sticky th {
  position: sticky;
  top: 0; /* Don't forget this, required for the stickiness */
}


/* ============================= */
/* 🧭 FullCalendar Tabler tweak  */
/* ============================= */

.fc .btn {
  padding: .25rem .5rem;
  border-radius: var(--tblr-border-radius);
  font-weight: 500;
}
.fc .fc-today-button.btn {
  background: var(--tblr-secondary-bg);
  color: var(--tblr-secondary);
  border-color: var(--tblr-border-color);
}
.fc .btn-primary.active,
.fc .btn-primary:active {
  filter: brightness(0.95);
}
.fc .fc-toolbar-chunk { gap: .5rem; }
.fc .fc-toolbar { align-items: center; }

/* ============================= */
/* 🔽 Tom Select + Tabler theme  */
/* ============================= */

/* Wrapper reset */
.ts-wrapper.form-select, .ts-wrapper.form-control {
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

/* Control styling to mimic Tabler input */
.ts-wrapper.single .ts-control {
  display: flex;
  align-items: center;
  height: calc(var(--tblr-input-height, 2.5rem));
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background-color: #fff;
  color: var(--tblr-body-color);
  box-shadow: none;
  padding: 0 .5rem;
  font-size: var(--tblr-body-font-size);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ts-wrapper.single.focus .ts-control {
  box-shadow: var(--tblr-shadow-input),0 0 0 .25rem rgba(var(--tblr-primary-rgb),.25);
  border-color: #6376c5;
}

/* Input inside TomSelect */
.ts-wrapper.single .ts-control input {
  height: auto;
  padding: 0;
  margin: 0;
  color: inherit;
  background: transparent;
}

/* Clear button */
.ts-wrapper.single .ts-control .clear-button {
  color: var(--tblr-muted, #6c757d);
  opacity: 0.6;
  margin-left: 0.25rem;
  transition: opacity 0.15s ease;
  font-size: 16px;
}
.ts-wrapper.single .ts-control .clear-button:hover {
  opacity: 1;
  color: var(--tblr-body-color);
}

/* Dropdown look */
.ts-dropdown {
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  box-shadow: var(--tblr-shadow-dropdown);
  background: var(--tblr-body-bg);
  z-index: 1050;
}
.ts-dropdown .option.active,
.ts-dropdown .option.selected {
  background-color: var(--tblr-primary);
  color: #fff;
}
.ts-dropdown .option:hover:not(.active):not(.selected) {
  background-color: var(--tblr-primary-bg-subtle);
  color: var(--tblr-body-color);
}

/* ============================= */
/* 🎨 Icon integration (step 2)  */
/* ============================= */

.ts-input-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.ts-input-icon .icon-left {
  position: absolute;
  left: 0.5rem;
  color: var(--tblr-muted, #6c757d);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity .2s ease-in-out;
}
.ts-input-icon .ts-input {
  padding-left: 2rem !important;
}

/* Spinner animation */
.spinner {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Make the calendar fill the remaining viewport height */
#calendar-wrap {
  min-height: calc(100vh - 140px); /* Adjust 220px if header/footer height changes */
  display: flex;
  flex-direction: column;
}

#calendar {
  flex: 1 1 auto;
}

#calendar button.fc-button.fc-button-primary {
	background: white;
	color: var(--tblr-body-color);
	border-color: rgb(229, 231, 235);
}

#calendar button.fc-button.fc-button-primary:hover, #calendar button.fc-button.fc-button-primary.fc-button-active {
	background: var(--tblr-primary);
	color: #fff;
	border-color: var(--tblr-primary);;
    box-shadow: var(--tblr-shadow-input);
}
.fc .fc-button .icon {
  vertical-align: middle;
  margin-top: -2px;
  stroke-width: 2;
  opacity: 0.85;
}
.fc .fc-button-active .icon {
  stroke: #fff;
}

#turnstile-container {
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: center;
}
.cf-turnstile {
  width: 100% !important;
  max-width: 100% !important;
  transform: scale(1);
  transform-origin: center;
}
iframe[src*="challenges.cloudflare.com"],
.cf-turnstile iframe {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.ts-dropdown, .ts-control, .ts-control input {
    color: var(--tblr-body-color);
    font-size: 1em;
}
.mic-pulse {
  animation: micPulse 1s infinite ease-in-out;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 0, 0, 0.1); }
}

table.dataTable thead>tr>th.dt-orderable-asc:hover,
table.dataTable thead>tr>th.dt-orderable-desc:hover {
  color: var(--tblr-primary);
  transition: color .3s;
}

table.table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>* {
  box-shadow: inset 0 0 0 9999px #fff;
}
table.table.dataTable.table-striped>tbody>tr:nth-of-type(2n)>* {
  box-shadow: inset 0 0 0 9999px var(--tblr-table-striped-bg);
}

.dataTables_filter {
  margin-bottom: 1rem;
}
.dataTables_filter input {
  max-width: 340px;
  font-size: 1rem;
}
.input-icon {
  position: relative;
}
.input-icon-addon {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
}
.input-icon input {
  padding-right: 2rem;
}

/* Ajustements responsive */
@media (max-width: 991.98px) { /* écrans moyens */
  .card-header .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767.98px) {
  .card-header .col-md-6,
  .card-header .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  select.form-select {
    font-size: 0.95rem;
  }
  .input-icon-addon svg {
    width: 20px;
    height: 20px;
  }
}

div.dataTables_wrapper div.dataTables_paginate {
  text-align: center;
  float: none !important;
  margin: 0 auto;
}