.calendar-day {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.3rem;
  height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
}
.calendar-day:hover {
  background-color: #f9fafb;
}
.calendar-day.selected {
  background-color: #e5e7eb;
}
.day-number {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.hour-block {
  border-radius: 0.4rem;
  height: 8px;
  margin-top: 3px;
  position: relative;
  overflow: hidden;
}
.hour-block::after {
  content: attr(data-hours) "h";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  font-weight: 500;
  color: white;
}

/* 🎨 Style global — simple et propre */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --gray-light: #f9fafb;
  --gray-border: #e5e7eb;
  --text-dark: #111827;
  --text-muted: #6b7280;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

/* ✅ Mise en page principale */
body {
  background: var(--gray-light);
  margin: 0;
  padding: 1rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

/* 🧭 En-têtes */
h1 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* 🧱 Table clients */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--gray-border);
}

th {
  text-align: left;
  background: #f3f4f6;
  color: var(--text-dark);
}

td {
  color: var(--text-dark);
}

tr:hover {
  background: #f9fafb;
}

/* 🔘 Boutons */
button {
  cursor: pointer;
  border: none;
  border-radius: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

button.primary {
  background: var(--primary);
  color: #fff;
}

button.primary:hover {
  background: var(--primary-dark);
}

button.secondary {
  background: #e5e7eb;
  color: var(--text-dark);
}

button.secondary:hover {
  background: #d1d5db;
}

/* 💬 Modal (fond + boîte) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 0.8rem;
  padding: 1.5rem;
  max-width: 600px;
  width: 95%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  h1 {
    font-size: 1.25rem;
  }

  button {
    width: 100%;
    margin-top: 0.4rem;
  }

  .flex {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* 🌙 Mode sombre */
.dark body {
  background: #111827;
  color: #f3f4f6;
}

.dark .container {
  background: #1f2937; /* gray-800 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dark h1 {
  color: #f9fafb;
}

.dark table {
  border-color: #374151;
}

.dark th {
  background: #374151; /* gray-700 */
  color: #f3f4f6;
}

.dark td {
  color: #e5e7eb;
}

.dark tr:hover {
  background: #2d3646;
}

.dark button.primary {
  background: #3b82f6;
}

.dark button.primary:hover {
  background: #2563eb;
}

.dark button.secondary {
  background: #374151;
  color: #f3f4f6;
}

.dark button.secondary:hover {
  background: #4b5563;
}

.dark .calendar-day {
  background-color: #1f2937;
  border-color: #374151;
  color: #f3f4f6;
}

.dark .calendar-day:hover {
  background-color: #374151;
}

.dark .calendar-day.selected {
  background-color: #4b5563;
}

.dark .modal-content {
  background: #1f2937;
  color: #f3f4f6;
}
/* 🌙 Correction widgets Tailwind — fonds et cartes */
.dark .bg-white,
.dark .bg-gray-50,
.dark .bg-gray-100,
.dark section,
.dark article,
.dark .card,
.dark .widget {
  background-color: #1f2937 !important; /* gray-800 */
  color: #f3f4f6 !important;
  border-color: #374151 !important;
}

.dark .shadow,
.dark .shadow-md,
.dark .shadow-lg {
  box-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
}

.dark h2, 
.dark h3, 
.dark h4 {
  color: #f9fafb !important;
}

.dark p, 
.dark span, 
.dark td, 
.dark th {
  color: #e5e7eb !important;
}
/* 🌙 Formulaires et sélecteurs en mode sombre */
.dark select,
.dark input,
.dark textarea {
  background-color: #1f2937;        /* gris foncé (gray-800) */
  color: #1e3a8a;                   /* bleu marine foncé (blue-900) */
  border: 1px solid #374151;        /* gris moyen (gray-700) */
}

.dark select:focus,
.dark input:focus,
.dark textarea:focus {
  outline: none;
  border-color: #3b82f6;            /* accent bleu (blue-500) */
  box-shadow: 0 0 0 1px #3b82f6;
}

.dark option {
  background-color: #1f2937;
  color: #f9fafb;
}

.dark select::placeholder,
.dark input::placeholder,
.dark textarea::placeholder {
  color: #60a5fa;                   /* bleu clair pour le texte "Choisir un service" */
}
/* 🌙 Cadres et entêtes de listes en mode sombre */
.dark .list-header,
.dark .summary-box,
.dark .resume-box,
.dark .header-bar,
.dark .filter-bar {
  background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%) !important; /* dégradé bleu foncé */
  color: #e0e7ff !important; /* texte clair (bleu-gris) */
  border: 1px solid #3b82f6 !important; /* bordure accent bleu */
}

.dark .list-header strong,
.dark .summary-box strong,
.dark .resume-box strong,
.dark .header-bar strong,
.dark .filter-bar strong {
  color: #f9fafb !important;
}

.dark .list-header span,
.dark .summary-box span,
.dark .resume-box span,
.dark .header-bar span,
.dark .filter-bar span {
  color: #93c5fd !important; /* bleu clair */
}

.dark .list-header a,
.dark .summary-box a,
.dark .resume-box a,
.dark .header-bar a,
.dark .filter-bar a {
  color: #001b64 !important; /* bleu marine très foncé */
  font-weight: 600;
}

.dark .list-header a:hover,
.dark .summary-box a:hover,
.dark .resume-box a:hover,
.dark .header-bar a:hover,
.dark .filter-bar a:hover {
  color: #60a5fa !important; /* bleu clair au survol */
}

/* Surcharges finales mode sombre */
.dark select,
.dark input,
.dark textarea {
  color: #f9fafb !important;
}

.dark a[class*="bg-blue-100"],
.dark button[class*="bg-blue-100"],
.dark span[class*="bg-blue-100"] {
  background-color: #1d4ed8 !important;
  color: #dbeafe !important;
}

.dark a[class*="hover:bg-blue-200"]:hover,
.dark button[class*="hover:bg-blue-200"]:hover {
  background-color: #2563eb !important;
  color: #eff6ff !important;
}

.dark a[class*="bg-green-100"],
.dark button[class*="bg-green-100"],
.dark span[class*="bg-green-100"] {
  background-color: #166534 !important;
  color: #dcfce7 !important;
}

.dark a[class*="hover:bg-green-200"]:hover,
.dark button[class*="hover:bg-green-200"]:hover {
  background-color: #15803d !important;
  color: #f0fdf4 !important;
}

.dark a[class*="bg-purple-100"],
.dark button[class*="bg-purple-100"],
.dark span[class*="bg-purple-100"] {
  background-color: #6b21a8 !important;
  color: #f3e8ff !important;
}

.dark a[class*="hover:bg-purple-200"]:hover,
.dark button[class*="hover:bg-purple-200"]:hover {
  background-color: #7e22ce !important;
  color: #faf5ff !important;
}

.dark a[class*="bg-amber-100"],
.dark button[class*="bg-amber-100"],
.dark span[class*="bg-amber-100"] {
  background-color: #92400e !important;
  color: #fef3c7 !important;
}

.dark a[class*="hover:bg-amber-200"]:hover,
.dark button[class*="hover:bg-amber-200"]:hover {
  background-color: #b45309 !important;
  color: #fffbeb !important;
}

.dark a[class*="bg-red-100"],
.dark button[class*="bg-red-100"],
.dark span[class*="bg-red-100"] {
  background-color: #991b1b !important;
  color: #fee2e2 !important;
}

.dark a[class*="hover:bg-red-200"]:hover,
.dark button[class*="hover:bg-red-200"]:hover {
  background-color: #b91c1c !important;
  color: #fef2f2 !important;
}

.dark a[class*="bg-gray-100"],
.dark button[class*="bg-gray-100"],
.dark span[class*="bg-gray-100"] {
  background-color: #374151 !important;
  color: #f3f4f6 !important;
}

.dark a[class*="hover:bg-gray-200"]:hover,
.dark button[class*="hover:bg-gray-200"]:hover {
  background-color: #4b5563 !important;
  color: #ffffff !important;
}

/* Harmonisation globale des utilitaires Tailwind en mode sombre */
.dark .bg-white {
  background-color: #1f2937 !important;
}

.dark .bg-gray-50 {
  background-color: #111827 !important;
}

.dark .bg-gray-100 {
  background-color: #374151 !important;
}

.dark .text-gray-900,
.dark .text-gray-800 {
  color: #f9fafb !important;
}

.dark .text-gray-700,
.dark .text-gray-600 {
  color: #d1d5db !important;
}

.dark .text-gray-500,
.dark .text-gray-400 {
  color: #9ca3af !important;
}

.dark .text-blue-900,
.dark .text-blue-800,
.dark .text-blue-700,
.dark .text-blue-600 {
  color: #bfdbfe !important;
}

.dark .text-green-800,
.dark .text-green-700,
.dark .text-green-600 {
  color: #bbf7d0 !important;
}

.dark .text-amber-800,
.dark .text-amber-700,
.dark .text-amber-600 {
  color: #fde68a !important;
}

.dark .text-purple-700,
.dark .text-purple-600 {
  color: #e9d5ff !important;
}

.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300,
.dark .border-gray-700 {
  border-color: #4b5563 !important;
}

.dark .border-blue-100,
.dark .border-blue-200,
.dark .border-blue-300 {
  border-color: #1d4ed8 !important;
}

.dark .border-amber-100,
.dark .border-amber-200,
.dark .border-amber-300 {
  border-color: #b45309 !important;
}

.dark .border-green-100,
.dark .border-green-200,
.dark .border-green-300 {
  border-color: #15803d !important;
}

.dark .shadow,
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

.dark tr.bg-gray-100,
.dark thead tr.bg-gray-100,
.dark thead.bg-gray-100 {
  background-color: #374151 !important;
}

.dark thead th,
.dark tr.bg-gray-100 th {
  color: #f3f4f6 !important;
}

.dark tr.border-b,
.dark th.border-b,
.dark td.border-b {
  border-color: #4b5563 !important;
}

.dark .hover\:bg-gray-50:hover {
  background-color: #243042 !important;
}

.dark .hover\:bg-blue-700:hover,
.dark .hover\:bg-emerald-700:hover,
.dark .hover\:bg-green-700:hover,
.dark .hover\:bg-purple-700:hover,
.dark .hover\:bg-amber-700:hover {
  filter: brightness(1.05);
}

.dark [class*="from-blue-50"],
.dark [class*="to-blue-100"] {
  background-image: linear-gradient(90deg, #1e3a8a, #1d4ed8) !important;
}

.dark .bg-blue-50,
.dark .bg-blue-100 {
  background-color: #1e3a8a !important;
}

.dark .bg-green-100 {
  background-color: #166534 !important;
}

.dark .bg-amber-50,
.dark .bg-amber-100 {
  background-color: #78350f !important;
}

.dark .bg-red-100 {
  background-color: #7f1d1d !important;
}

.dark .bg-purple-100 {
  background-color: #581c87 !important;
}
