.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 */
}
