/* ---------- Global ---------- */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to bottom right, #f3e8ff, #ffffff);
  color: #1f2937;
  transition: background 1s ease, color 1s ease;
}

/* ---------- Animations ---------- */
@keyframes pulse-line {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}
.hr-animated {
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, #ce9bdd, #71baff, #ce9bdd);
  background-size: 200% 100%;
  animation: pulse-line 4s linear infinite;
  opacity: 0.6;
  border-radius: 2px;
}

@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.header-animated {
  animation: fade-slide-down 0.8s ease-out forwards;
}

@keyframes fade-blur {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}
.fade-blur {
  opacity: 0;
  animation: fade-blur 0.6s ease-out forwards;
}

/* --- Animation plus fluide pour les cards --- */
@keyframes fade-slide-right {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.grid-animate {
  animation: fade-slide-right 1s ease-out;
}

/* ---------- Titles ---------- */
.title-gradient {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  background: linear-gradient(90deg, #ce9bdd, #71baff, #ce9bdd);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  line-height: 1.1;
  animation: gradient-breathe 6s ease-in-out infinite, title-breathe 4s ease-in-out infinite;
}

@keyframes gradient-breathe {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes title-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.015);
    filter: brightness(1.1);
  }
}
h1,
.title {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
}

/* ---------- Cards ---------- */
.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ---------- Play button ---------- */
.play {
  transition: background-color 0.2s ease, color 0.2s ease;
}
.play:hover {
  background-color: var(--play);
  color: #fff;
}

/* ---------- Labels ---------- */
.label {
  position: absolute;
  top: 5px;
  left: -18px;
  transform: rotate(-45deg);
  background-color: #ede9fe !important; /* violet clair Aurélia */
  color: #6d28d9 !important; /* violet moyen lisible */
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 20px;
  border-radius: 3px;
  opacity: 0.95;
  letter-spacing: 0.5px;
  display: grid;
  place-items: center;
  width: auto;
  min-width: 48px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- Light Mode ---------- */
/* Bandeau "BIENTÔT" pour les apps non disponibles */
.app-bientot-badge {
  width: 100%;
  padding: 0.25rem 0;
  font-size: 8px;
  font-weight: 600;
  text-align: center;
  border-radius: 0.75rem 0.75rem 0 0;
  flex-shrink: 0;
  background: linear-gradient(to right, #f3f4f6, #e5e7eb);
  color: #6b7280;
  border-bottom: 1px solid #d1d5db;
}
body.dark .app-bientot-badge {
  background: linear-gradient(to right, #1f2937, #111827);
  color: #9ca3af;
  border-bottom-color: #374151;
}

.app-card,
.client-card,
.modal,
.saas-modal,
.note-card {
  background: #ffffff;
}
.client-container,
.monitoring-container,
.notes-container {
  background: rgba(255, 255, 255, 0.8);
}
.info-button {
  background: #f3f4f6;
  color: #4b5563;
}
.info-button:hover {
  background: #e5e7eb;
}
.progress-bar {
  background: #e5e7eb;
}
.client-card-hover:hover {
  background: #f9fafb;
}
.welcome-text {
  color: #374151;
}
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.note-content {
  white-space: pre-wrap;
  word-break: break-word;
}
.note-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.note-card:hover .note-actions {
  opacity: 1;
}
.note-modal textarea {
  min-height: 150px;
  resize: vertical;
}
/* === Modale Kanban Notes (fond overlay translucide + blur) === */
.fixed.inset-0.flex.items-center.justify-center.z-50 {
  background: rgba(255, 255, 255, 0.6); /* clair translucide */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.dark .fixed.inset-0.flex.items-center.justify-center.z-50 {
  background: rgba(0, 0, 0, 0.7); /* sombre translucide */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* === Bouton Annuler (Kanban Notes) === */
.modal-content button.bg-gray-600 {
  background: #f3f4f6 !important; /* gris clair */
  color: #374151 !important; /* texte foncé */
}
.modal-content button.bg-gray-600:hover {
  background: #e5e7eb !important;
}

/* Version dark */
body.dark .modal-content button.bg-gray-600 {
  background: #374151 !important; /* gris anthracite */
  color: #f9fafb !important; /* texte clair */
}
body.dark .modal-content button.bg-gray-600:hover {
  background: #4b5563 !important;
}

/* ---------- Dark Mode ---------- */
body.dark {
  background: linear-gradient(to bottom right, #1f2937, #111827);
  color: #e5e7eb;
}
body.dark .app-card,
body.dark .client-card,
body.dark .modal,
body.dark .saas-modal,
body.dark .welcome-modal,
body.dark .note-card {
  background: #1f2937;
}

body.dark .client-container,
body.dark .monitoring-container,
body.dark .notes-container {
  background: rgba(31, 41, 55, 0.6);
}

/* Styles pour le résumé IA en mode light */
.note-summary-container {
  background: #f9fafb !important;
}
body.dark .note-summary-container {
  background: #1f2937 !important;
}

.note-summary-text {
  background: #ffffff !important;
  color: #1f2937 !important;
}
body.dark .note-summary-text {
  background: #111827 !important;
  color: #e5e7eb !important;
}

/* Bouton ? en mode light */
.notes-container button[title="Aide"] {
  background: #ffffff !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
}
body.dark .notes-container button[title="Aide"] {
  background: #374151 !important;
  color: #d1d5db !important;
  border: 1px solid #4b5563 !important;
}

/* Calendrier - dates en mode light */
.monitoring-container .aspect-square:not([class*="bg-gradient"]) {
  color: #1f2937 !important;
}
body.dark .monitoring-container .aspect-square:not([class*="bg-gradient"]) {
  color: #e5e7eb !important;
}

/* Date du jour en blanc (light et dark) */
.monitoring-container .aspect-square[class*="bg-gradient"] {
  color: #ffffff !important;
}

/* Calendrier - hover en mode light */
.monitoring-container .aspect-square:hover:not([class*="bg-gradient"]) {
  background-color: #f3f4f6 !important;
}
body.dark .monitoring-container .aspect-square:hover:not([class*="bg-gradient"]) {
  background-color: #374151 !important;
}

/* Modale ? en mode light */
.help-modal-content {
  background: #ffffff !important;
  color: #1f2937 !important;
}
body.dark .help-modal-content {
  background: #1f2937 !important;
  color: #e5e7eb !important;
}

.help-modal-content p {
  color: #1f2937 !important;
}
body.dark .help-modal-content p {
  color: #e5e7eb !important;
}

/* Bouton fermer modale ? en mode light */
.help-modal-close {
  background: #f3f4f6 !important;
  color: #374151 !important;
}
.help-modal-close:hover {
  background: #e5e7eb !important;
}
.help-modal-close svg {
  color: #374151 !important;
  stroke: #374151 !important;
}
body.dark .help-modal-close {
  background: #374151 !important;
  color: #d1d5db !important;
}
body.dark .help-modal-close:hover {
  background: #4b5563 !important;
}
body.dark .help-modal-close svg {
  color: #d1d5db !important;
  stroke: #d1d5db !important;
}

/* Badge "Bientôt" en mode light */
.help-modal-content span[class*="inline-block"] {
  background: #e0e7ff !important;
  color: #4338ca !important;
}
body.dark .help-modal-content span[class*="inline-block"] {
  background: rgba(79, 70, 229, 0.3) !important;
  color: #c7d2fe !important;
}
body.dark .info-button {
  background: #4b5563;
  color: #d1d5db;
}
body.dark .info-button:hover {
  background: #6b7280;
}
body.dark .progress-bar {
  background: #4b5563;
}
body.dark .client-card-hover:hover {
  background: #374151;
}
body.dark .welcome-text {
  color: #e5e7eb;
}
body.dark .card-hover:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
body.dark .label {
  background-color: #10b981;
  color: #ecfdf5;
}

/* ---------- Buttons ---------- */
.theme-toggle,
.profile-toggle,
.sleep-toggle,
.saas-toggle {
  position: static;
  top: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 9999px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}
.theme-toggle {
  right: 64px;
}
.profile-toggle {
  right: 16px;
}
.sleep-toggle {
  right: 112px;
}
.saas-toggle {
  right: 160px;
}

body.dark .theme-toggle,
body.dark .profile-toggle,
body.dark .sleep-toggle,
body.dark .saas-toggle {
  background: rgba(31, 41, 55, 0.8);
}
.theme-toggle svg,
.profile-toggle svg,
.sleep-toggle svg,
.saas-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ---------- Sleep overlay ---------- */
.sleep-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}
.clock {
  font-family: "Nunito", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(90deg, #ce9bdd, #71baff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}
.wake-button {
  margin-top: 1rem;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(to right, #818cf8, #a78bfa);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.wake-button:hover {
  opacity: 0.9;
}

/* ---------- Disabled apps ---------- */
.app-disabled {
  cursor: default;
}
.app-disabled:hover {
  background-color: #e5e7eb !important;
}
.dark .app-disabled:hover {
  background-color: #374151 !important;
}

/* ---------- Modal texts ---------- */
.modal-text {
  color: #374151;
}
body.dark .modal-text {
  color: #d1d5db;
}

/* ---------- Header labels ---------- */
body.dark .header-label {
  color: #ffffff !important;
}

/* ---------- Titre des apps en Dark Mode ---------- */
body.dark .app-name {
  color: rgb(211, 176, 246) !important;
}

/* ---------- Welcome text ---------- */
.welcome-text {
  color: #374151 !important;
}
body.dark .welcome-text {
  color: #e5e7eb !important;
}

/* === Animation d'apparition de la modale === */
@keyframes fade-blur {
  from {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
.animate-fade-blur {
  animation: fade-blur 0.3s ease-out;
}

/* ---------- Filters ---------- */
.filter-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 0.45rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #ffffff;
  color: #1f2937;
  opacity: 0.6;
}
body.dark .filter-btn {
  background: #374151;
  color: #ffffff;
}
.filter-btn.active,
body.dark .filter-btn.active {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  color: #fff;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.filter-btn:hover {
  opacity: 0.8;
}

/* ---------- Transitions harmonisées Light/Dark ---------- */
body,
.app-card,
.client-card,
.modal,
.saas-modal,
.welcome-modal,
.note-card,
.client-container,
.monitoring-container,
.notes-container {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

/* --- Kanban Notes (Aurélia Suite) --- */

.kanban-add-btn,
button.kanban-add-btn {
  background: linear-gradient(to right, #a78bfa, #6366f1) !important;
  color: #fff !important;
  font-weight: 300;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, transform 0.2s ease;
}
.kanban-add-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* --- Bloc global Kanban --- */
.kanban-wrapper {
  background: #fff; /* clair translucide */
  transition: background 0.3s ease;
}
body.dark .kanban-wrapper {
  background: rgba(31, 41, 55, 0.6); /* foncé translucide */
}

/* --- Colonnes --- */
.kanban-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, border-color 0.3s ease;
}
body.dark .kanban-section {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Cartes --- */
.kanban-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid transparent !important;
  border-radius: 0.75rem;
  background-image: linear-gradient(white, white),
    linear-gradient(to right, rgba(167, 139, 250, 0.6), rgba(99, 102, 241, 0.6));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

body.dark .kanban-card {
  background: rgba(31, 41, 55, 0.95);
  border: 1px solid transparent !important;
  background-image: linear-gradient(#1f2937, #1f2937),
    linear-gradient(to right, rgba(99, 102, 241, 0.6), rgba(167, 139, 250, 0.6));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* --- Overlay modale --- */
/* --- Overlay des modales (fond noir translucide) --- */
.modal {
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px);
}

/* --- Bloc central modale générique --- */
.modal-content {
  background: #ffffff; /* blanc plein en light */
  color: #111827;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark .modal-content {
  background: rgba(31, 41, 55, 0.92); /* anthracite en dark */
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* --- Champs (inputs, selects, textarea) --- */
.modal-content input,
.modal-content select,
.modal-content textarea {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body.dark .modal-content input,
body.dark .modal-content select,
body.dark .modal-content textarea {
  background: rgba(55, 65, 81, 0.85);
  color: #f9fafb;
  border: 1px solid #374151;
}

/* --- Inputs focus --- */
.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #6366f1; /* Indigo */
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* --- Animation réveil : tremblement de l’icône --- */
@keyframes shake {
  0% {
    transform: rotate(-8deg);
  }
  25% {
    transform: rotate(8deg);
  }
  50% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(8deg);
  }
  100% {
    transform: rotate(0);
  }
}
.reveil-shake {
  animation: shake 0.7s infinite;
}

/* --- Aura pulsante derrière l’icône réveil --- */
@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}
.animate-pulse-ring {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  top: -25px;
  background: radial-gradient(circle, rgba(99, 102, 241, 1), transparent 90%);
  animation: pulse-ring 2s infinite;
  z-index: 1;
}
body.dark .animate-pulse-ring {
  background: radial-gradient(circle, rgba(167, 139, 250, 1), transparent 90%);
}

/* --- Réveil oversize qui sort du bloc --- */
.reveil-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.reveil-icon {
  font-size: 6rem; /* réveil énorme */
  position: relative;
  top: -30px; /* sort du bloc */
  z-index: 10;
  color: #6366f1; /* indigo clair */
}
body.dark .reveil-icon {
  color: #a78bfa; /* violet néon en dark */
}
/* --- Modale Réveil --- */

/* Pour que le cercle réveille se place bien */
.alert-modal {
  padding-top: 4rem; /* espace pour laisser passer le cercle */
}

/* Optionnel : animation douce du réveil */
.alert-modal .text-4xl {
  animation: bounce 1.2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* === Styles modale confirmation === */

/* Mode light par défaut */
.modal-box {
  background-color: #ffffff; /* fond blanc */
  color: #333333; /* texte sombre */
  border-radius: 1rem; /* arrondi équivalent à rounded-2xl */
  padding: 2rem; /* équivalent p-8 */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); /* shadow-2xl */
  text-align: center;
  position: relative;
  max-width: 28rem; /* équivalent max-w-md */
  width: 90%;
}

/* Texte light mode */
.modal-box p {
  color: #4a4a4a; /* gris moyen */
}

/* Mode dark */
.dark .modal-box {
  background-color: #1e1e1e; /* fond sombre */
  color: #cccccc; /* texte clair */
}

/* Texte dark mode */
.dark .modal-box p {
  color: #cccccc;
}

/* Cercle check → anneau adaptatif */
.modal-check {
  width: 6rem; /* w-24 */
  height: 6rem; /* h-24 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #6366f1, #a855f7); /* indigo → violet */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 4px solid #ffffff; /* ring en light */
}

.dark .modal-check {
  border-color: #1e1e1e; /* ring en dark */
}

/* Bouton gradient */
.modal-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(to right, #6366f1, #a855f7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease;
}

.modal-btn:hover {
  opacity: 0.9;
}
/* Optionnel si tu veux que .active fasse un fade-in */
.sleep-overlay {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.sleep-overlay:not(.active) {
  opacity: 1;
} /* déjà cachée par .hidden */

.rotate-y-180 {
  transform: rotateY(180deg);
}
.backface-hidden {
  backface-visibility: hidden;
}
.preserve-3d {
  transform-style: preserve-3d;
}

/* Welcome modal en Light */
.welcome-modal {
  background: #ffffff !important;
  color: #1f2937 !important; /* texte lisible */
}
.welcome-modal input {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #d1d5db !important;
}
.welcome-modal input::placeholder {
  color: #9ca3af !important; /* gris moyen */
}

/* Welcome modal en Dark */
body.dark .welcome-modal {
  background: #1f2937 !important;
  color: #f9fafb !important;
}
body.dark .welcome-modal input {
  background: #374151 !important;
  color: #f9fafb !important;
  border: 1px solid #4b5563 !important;
}
body.dark .welcome-modal input::placeholder {
  color: #9ca3af !important;
}

.alert-modal p,
.alert-modal h2 {
  color: #1f2937; /* gris foncé lisible */
}

body.dark .alert-modal p,
body.dark .alert-modal h2 {
  color: #f9fafb; /* blanc lisible */
}

/* ---------- Help Toggle ---------- */
/* ---------- Help Toggle ---------- */
.help-toggle {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 9999px; /* rond parfait */
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
  font-weight: bold;
  font-size: 1.1rem;
  line-height: 1;
}
.help-toggle:hover {
  background: rgba(243, 244, 246, 1);
}
body.dark .help-toggle {
  background: rgba(31, 41, 55, 0.8);
}
body.dark .help-toggle:hover {
  background: rgba(55, 65, 81, 1);
}

.help-toggle span {
  font-weight: bold;
  font-size: 1.1rem;
  display: block;
  line-height: 1;
}

/* ---------- Help Modal ---------- */
.help-modal {
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px);
}
.help-modal-content {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 32rem;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: fade-blur 0.3s ease-out;
}
body.dark .help-modal-content {
  background: rgba(31, 41, 55, 0.92);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* --- Horloge cadran --- */
.clock-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* width et height gérés par les classes Tailwind dans le composant */
  transition: background 0.3s ease, color 0.3s ease;
}

/* --- Texte heures/minutes --- */
.clock-hours {
  font-size: 5.5rem;
  font-weight: 800;
  color: #6366f1; /* Indigo */
  line-height: 1;
}

.clock-minutes {
  font-size: 4.5rem;
  font-weight: 600;
  color: #a855f7; /* Violet */
  margin-top: -0.5rem;
  line-height: 1;
}

/* --- Encadré horloge mobile --- */
.clock-mobile-frame {
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image: linear-gradient(white, white),
    linear-gradient(90deg, rgba(99, 102, 241, 0.6), rgba(168, 85, 247, 0.6));
}

body.dark .clock-mobile-frame {
  background-image: linear-gradient(#1f2937, #1f2937),
    linear-gradient(90deg, rgba(99, 102, 241, 0.6), rgba(168, 85, 247, 0.6));
}
/* ==== AgendaBlock - FullCalendar tweaks ==== */
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: rgba(255, 255, 255, 0.03) !important;
}
.fc .fc-scrollgrid {
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 0.75rem;
}
.fc .fc-col-header-cell {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: #d1d5db;
}
.fc .fc-daygrid-day-number {
  color: #e5e7eb;
  font-weight: 500;
}
.fc .fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fc .fc-button-primary {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 0.75rem;
  padding: 6px 14px;
  font-weight: 500;
}
.fc .fc-button-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.fc .fc-day-today {
  background: rgba(139, 92, 246, 0.12) !important;
}
.fc-event {
  border: none !important;
  border-radius: 0.75rem !important;
  padding: 2px 8px !important;
  font-weight: 500 !important;
}

.sidebar {
  width: 340px;
  background: #1f2937;
  padding: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar input,
.sidebar select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: #111827;
  border: 1px solid #374151;
  margin-bottom: 0.9rem;
}
.modal-shell {
  width: 92vw;
  max-width: 1920px;
  height: 90vh;
}

/* Correction pour les checkboxes */
.checkbox-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-item input[type="checkbox"] {
  margin: 0;
  width: 1rem;
  height: 1rem;
}

/* Centrage du bloc 50% */
.half-block {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Scrollbars stylisées */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* Mini agenda ludique */
.mini-calendar {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.mini-calendar .fc-toolbar {
  margin-bottom: 0.5rem;
}
.mini-calendar .fc-toolbar-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.mini-calendar .fc-col-header-cell {
  padding: 0.3rem 0;
  font-size: 0.75rem;
}
.mini-calendar .fc-daygrid-day {
  padding: 0.2rem;
}
.mini-calendar .fc-daygrid-day-number {
  font-size: 0.8rem;
  padding: 0.2rem;
}
.mini-calendar .fc-event {
  font-size: 0.7rem;
  padding: 1px 4px;
  margin: 1px 0;
}
.mini-calendar .fc-day-today .fc-daygrid-day-number {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section au-dessus du mini agenda */
.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.agenda-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.quick-actions {
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.quick-action-btn {
  background: linear-gradient(to right, #a78bfa, #6366f1) !important;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  color: #ffffff !important;
  font-weight: 300;
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 1000; /* Garantir que le bouton est cliquable */
  pointer-events: auto; /* Assurer l'interactivité */
}
.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* === PATCH: Modales harmonisées Light/Dark pour l'agenda === */

/* Overlay commun (géré par JS avec .hidden, on garde display:none) */
.add-rdv-modal,
.demo-modal {
  position: fixed;
  inset: 0;
  display: none; /* piloté par .hidden / JS */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Overlay Light */
body:not(.dark) .add-rdv-modal,
body:not(.dark) .demo-modal {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

/* Overlay Dark */
body.dark .add-rdv-modal,
body.dark .demo-modal {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

/* Boîte de contenu */
.add-rdv-modal-content,
.demo-modal-content {
  background: #ffffff;
  color: #1f2937;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Variante Dark */
body.dark .add-rdv-modal-content,
body.dark .demo-modal-content {
  background: #1f2937;
  color: #f9fafb;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* (Option) Conserver ton gradient uniquement en Dark pour la démo */
body.dark .demo-modal-content {
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Header de la démo : clair en Light / profond en Dark */
.demo-modal-header {
  background: rgba(0, 0, 0, 0.04);
  padding: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.dark .demo-modal-header {
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

/* Titre : on neutralise le -webkit-text-fill forcé */
.demo-modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  -webkit-text-fill-color: initial; /* retire le "toujours clair" */
  color: inherit;
}

/* Inputs/selects (Light/Dark) */
.add-rdv-modal-content input,
.add-rdv-modal-content select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  margin-bottom: 0.9rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
body.dark .add-rdv-modal-content input,
body.dark .add-rdv-modal-content select {
  background: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

/* Labels */
.add-rdv-modal-content label {
  color: #374151;
}
body.dark .add-rdv-modal-content label {
  color: #d1d5db;
}

/* Boutons */
.add-rdv-modal-content button,
.demo-modal-content .demo-close-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.add-rdv-modal-content button:hover,
.demo-modal-content .demo-close-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
/* === Overlay adaptatif pour modale d'alerte === */
body:not(.dark) .alert-overlay {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
}

body.dark .alert-overlay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}
/* === PATCH Light/Dark pour la modale démo === */
body:not(.dark) .demo-modal {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(10px);
}

body.dark .demo-modal {
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(10px);
}

/* Boîte interne */
body:not(.dark) .demo-modal-content {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark .demo-modal-content {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  color: #f9fafb !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body:not(.dark) .alert-modal {
  background: #ffffff;
  color: #1f2937;
}
body.dark .alert-modal {
  background: #1f2937;
  color: #f9fafb;
}

.demo-close-btn {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
}

.demo-modal-body {
  padding: 1.5rem;
}

.demo-event-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #6366f1;
}

.demo-event-icon {
  font-size: 2rem;
}

.demo-event-details h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #f8fafc;
}

.demo-event-time {
  margin: 0 0 0.25rem 0;
  color: #f59e0b;
  font-weight: 500;
}

.demo-event-location {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.demo-notification p {
  margin: 0;
  color: #c4b5fd;
  font-weight: 500;
}

.demo-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: center;
}

.demo-confirm-btn {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.demo-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Tooltip pour les événements du mini agenda */
.event-tooltip {
  position: fixed; /* évite les problèmes avec overflow hidden */
  background: #ffffff; /* fond blanc pour mode light */
  border: 1px solid rgba(99, 102, 241, 0.4); /* bord indigo léger */
  border-radius: 0.5rem;
  padding: 9px; /* plus de padding pour aération */
  color: #1f2937; /* texte gris foncé pour mode light */
  font-size: 0.85rem;
  line-height: 1.3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* ombre légère */
  max-width: 280px;
  pointer-events: none;
  z-index: 999999 !important;
  animation: fadeIn 0.15s ease-out;
  white-space: normal !important;
  word-break: break-word !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Séparation fine entre titre et contenu */
.event-tooltip strong {
  display: block;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.3); /* bordure indigo subtile */
}

/* Mode sombre */
body.dark .event-tooltip {
  background: rgba(30, 41, 59, 0.95); /* fond sombre d’origine */
  border: 1px solid rgba(139, 92, 246, 0.4); /* bord violet léger */
  color: #fff; /* texte blanc */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* ombre pour dark */
}

/* Séparation fine en mode sombre */
body.dark .event-tooltip strong {
  border-bottom: 1px solid rgba(139, 92, 246, 0.3); /* bordure violette subtile */
}

/* Animation d'apparition */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}
/* Utilitaire pour masquer un élément */
.sidebar.hidden {
  display: none !important;
}
/* Quand la sidebar est masquée, le calendrier prend toute la largeur */

.sidebar.hidden {
  display: none !important;
}
/* Décale toute la barre FullCalendar vers le bas */
.fc-header-toolbar {
  margin-top: 2.5rem; /* ajuste la valeur (ex : 40px) */
}

/* ==== 🎨 AGENDA VERSION LIGHT (Aurélia Suite) ==== */

/* --- Mini Agenda --- */
.mini-calendar {
  background: rgba(255, 255, 255, 0.9); /* fond clair translucide */
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); /* ombre douce */
}
.mini-calendar .fc-col-header-cell {
  background: #f9fafb; /* gris très clair pour l’entête */
  color: #374151; /* gris foncé pour le texte */
  font-weight: 600;
}
.mini-calendar .fc-daygrid-day-number {
  color: #1f2937; /* noir/gris foncé pour lisibilité */
  font-weight: 500;
}
/* Titres d'événements moins gras (dayGrid & timeGrid) */
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-main,
.fc .fc-timegrid-event .fc-event-title,
.fc .fc-timegrid-event .fc-event-main {
  font-weight: 400;
}

.mini-calendar .fc-day-today .fc-daygrid-day-number {
  background: rgba(99, 102, 241, 0.15); /* Indigo pastel */
  color: #1f2937;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Boutons mini agenda --- */
#prevMini,
#nextMini {
  background: #f3f4f6; /* gris clair */
  color: #374151; /* texte foncé */
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.25rem 0.6rem;
  transition: background 0.2s ease;
}
#prevMini:hover,
#nextMini:hover {
  background: #e5e7eb; /* hover un peu plus sombre */
}

/* --- Sidebar RDV --- */
.sidebar {
  width: 340px;
  background: #ffffff; /* blanc */
  padding: 1.25rem;
  border-left: 1px solid #e5e7eb; /* séparation discrète */
  color: #1f2937;
}
.sidebar input,
.sidebar select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: #ffffff; /* input blanc */
  border: 1px solid #d1d5db; /* bord gris clair */
  margin-bottom: 0.9rem;
  color: #1f2937;
}
.sidebar label {
  color: #374151; /* texte gris foncé */
  font-weight: 500;
}
.sidebar h3 {
  color: #1f2937; /* titre foncé */
}

/* --- Modale ajout rapide (Add RDV) --- */
.add-rdv-modal-content {
  background: #ffffff; /* blanc plein */
  color: #1f2937; /* texte foncé */
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* ombre douce */
  padding: 1.5rem;
}
.add-rdv-modal-content label {
  color: #374151;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  display: block;
}
.add-rdv-modal-content input,
.add-rdv-modal-content select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
}

/* --- Agenda complet (FullCalendar) Light --- */
.fc-theme-standard td,
.fc-theme-standard th {
  border-color: rgba(0, 0, 0, 0.05) !important; /* bordures fines claires */
}
.fc .fc-scrollgrid {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 0.75rem;
  background: #ffffff; /* fond clair */
}
.fc .fc-col-header-cell {
  background: #f9fafb; /* entête claire */
  color: #374151; /* gris foncé */
  font-weight: 600;
}
.fc .fc-daygrid-day {
  background: #ffffff; /* fond blanc */
}
.fc .fc-daygrid-day-number {
  color: #1f2937; /* chiffres foncés */
  font-weight: 500;
}
.fc .fc-day-today {
  background: rgba(99, 102, 241, 0.12) !important; /* indigo pastel */
}
.fc .fc-toolbar-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #6366f1, #8b5cf6); /* Indigo → Violet */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fc-event {
  border: none !important;
  border-radius: 0.5rem !important;
  padding: 2px 8px !important;
  font-weight: 500 !important;
}
/* --- Fond de la modale Agenda en mode "verre dépoli" --- */
#agendaModal {
  background: rgba(255, 255, 255, 0.6) !important; /* blanc translucide */
  backdrop-filter: blur(12px); /* effet vitre dépoli */
  -webkit-backdrop-filter: blur(12px); /* compat Safari */
}

/* Conteneur principal de la modale */
.modal-shell {
  background: rgba(255, 255, 255, 0.9) !important; /* blanc légèrement translucide */
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* ==== 🌙 AGENDA DARK MODE (Aurélia Suite) ==== */

/* --- Mini Agenda --- */
body.dark .mini-calendar {
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
body.dark .mini-calendar .fc-col-header-cell {
  background: rgba(255, 255, 255, 0.03);
  color: #d1d5db;
}
body.dark .mini-calendar .fc-daygrid-day-number {
  color: #e5e7eb;
}
body.dark .mini-calendar .fc-day-today .fc-daygrid-day-number {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
}

/* --- Boutons mini agenda --- */
body.dark #prevMini,
body.dark #nextMini {
  background: #374151;
  color: #f3f4f6;
  border: 1px solid #4b5563;
}
body.dark #prevMini:hover,
body.dark #nextMini:hover {
  background: #4b5563;
}

/* --- Sidebar RDV --- */
body.dark .sidebar {
  background: #1f2937;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}
body.dark .sidebar input,
body.dark .sidebar select {
  background: #111827;
  border: 1px solid #374151;
  color: #f9fafb;
}
body.dark .sidebar label {
  color: #d1d5db;
}
body.dark .sidebar h3 {
  color: #f9fafb;
}

/* --- Modale ajout RDV --- */
body.dark .add-rdv-modal-content {
  background: #1f2937;
  color: #f9fafb;
  border: 1px solid #374151;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
body.dark .add-rdv-modal-content label {
  color: #d1d5db;
}
body.dark .add-rdv-modal-content input,
body.dark .add-rdv-modal-content select {
  background: #111827;
  border: 1px solid #374151;
  color: #f9fafb;
}

/* --- FullCalendar --- */
body.dark .fc .fc-scrollgrid {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #1f2937;
}
body.dark .fc .fc-col-header-cell {
  background: rgba(255, 255, 255, 0.03);
  color: #d1d5db;
}
body.dark .fc .fc-daygrid-day {
  background: #1f2937;
}
body.dark .fc .fc-daygrid-day-number {
  color: #e5e7eb;
}
body.dark .fc .fc-day-today {
  background: rgba(139, 92, 246, 0.15) !important;
}

/* --- Fond de la modale principale Agenda --- */
body.dark #agendaModal {
  background: rgba(0, 0, 0, 0.7) !important; /* voile sombre */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.dark .modal-shell {
  background: rgba(31, 41, 55, 0.92) !important; /* anthracite */
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
/* === Boutons primaires Agenda (Enregistrer, etc.) === */
.sidebar button[type="submit"],
.add-rdv-modal-content button[type="submit"] {
  color: #fff !important; /* texte blanc */
  font-weight: 600;
}
/* --- Fond overlay NotesBlock (actualité) --- */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6); /* clair translucide */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
}

body.dark .modal-overlay {
  background: rgba(0, 0, 0, 0.7); /* sombre translucide */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* --- Bloc interne NotesBlock --- */
.note-modal-content {
  background: #ffffff; /* fond clair en light */
  color: #1f2937; /* texte foncé */
}

body.dark .note-modal-content {
  background: #1e1e1e; /* fond sombre en dark */
  color: #f9fafb; /* texte clair */
}
/* --- Texte description NotesBlock --- */
.note-modal-text {
  color: #374151; /* gris foncé en light */
}

body.dark .note-modal-text {
  color: #d1d5db; /* gris clair en dark */
}

.agenda-wrapper,
.agenda-wrapper .mini-calendar {
  min-height: 500px !important;
}
/* === KANBAN === */
.kanban-wrapper {
  height: 100%;
  min-height: 500px;
}

/* === AGENDA === */
.agenda-wrapper,
.agenda-wrapper .mini-calendar {
  min-height: 500px !important;
}
/* Neutraliser les hauteurs forcées en mobile */
@media (max-width: 1024px) {
  .kanban-wrapper,
  .agenda-wrapper,
  .agenda-wrapper .mini-calendar {
    min-height: 200px !important;
    height: auto !important;
  }
}
/* Forcer le thème sur la modale simple */
body.dark #addRdvSimpleModal > div {
  background: #1f2937; /* gris foncé */
  color: #f9fafb; /* texte clair */
}

/* Modale simple : champs en mode dark */
body.dark #addRdvSimpleModal input,
body.dark #addRdvSimpleModal select {
  background: #374151; /* gris foncé (Tailwind gray-700) */
  color: #f9fafb; /* texte clair */
  border-color: #4b5563; /* gris moyen */
}

/* placeholder lisible aussi */
body.dark #addRdvSimpleModal input::placeholder {
  color: #9ca3af; /* gris clair */
}
/* Animation slide + fade pour la zone avancée */
.advanced-section {
  animation: slideFadeIn 0.4s ease forwards;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    max-height: 0;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    max-height: 500px; /* assez large pour contenir les champs */
    transform: translateY(0);
  }
}
/* Améliore la lisibilité en dark mode */
.welcome-modal p,
.welcome-modal label,
.welcome-modal .text-xs {
  color: #4b5563 !important; /* gris moyen lisible en light */
}

body.dark .welcome-modal p,
body.dark .welcome-modal label,
body.dark .welcome-modal .text-xs {
  color: #d1d5db !important; /* gris clair (Tailwind gray-300) pour dark mode */
}
/* === 🌗 MODALE NOTIF (SMS / MAIL) — VERSION STABLE AVEC DÉGRADÉS === */

/* Overlay : flou léger et fond translucide */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

/* Fond clair/sombre */
body:not(.dark) .notif-overlay {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #1f2937 !important;
}
body.dark .notif-overlay {
  background: rgba(0, 0, 0, 0.7) !important;
  color: #f9fafb !important;
}

/* Bloc principal (ta modale) */
.notif-overlay > div {
  background: #ffffff !important;
  border-radius: 1.25rem;
  padding: 1.75rem;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
body.dark .notif-overlay > div {
  background: #1e293b !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

/* Titres et texte */
.notif-overlay h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.notif-overlay p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* === Boutons dégradés bleu/violet harmonieux === */
.notif-overlay .bg-violet-600 {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
  color: #ffffff !important;
  border: none;
  border-radius: 0.75rem;
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.notif-overlay .bg-violet-600:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* === Bouton "Aucun" (gris doux) === */
.notif-overlay .bg-gray-600 {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db) !important;
  color: #1f2937 !important;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db !important;
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.notif-overlay .bg-gray-600:hover {
  background: linear-gradient(135deg, #d1d5db, #9ca3af) !important;
  transform: translateY(-1px);
}
body.dark .notif-overlay .bg-gray-600 {
  background: linear-gradient(135deg, #4b5563, #6b7280) !important;
  color: #f9fafb !important;
  border: 1px solid #374151 !important;
}
body.dark .notif-overlay .bg-gray-600:hover {
  background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
}

/* === Focus accessible === */
.notif-overlay button:focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px;
  border-radius: 0.75rem;
}
/* === Agenda: boutons du tooltip (Précédent / Suivant) === */
#tooltip-prev,
#tooltip-next {
  appearance: none;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
#tooltip-prev:hover:not([disabled]),
#tooltip-next:hover:not([disabled]) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
#tooltip-prev[disabled],
#tooltip-next[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

/* === Agenda complet: chips "Plusieurs jours" / "Journée entière" === */
/* (le JS pilote #multiDay et #allDay : on stylise l’adjacent <div>) */
#multiDay + div,
#allDay + div {
  height: 60px; /* Hauteur fixe */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  transition: background 0.2s ease, color 0.2s ease, filter 0.1s ease;
}
#multiDay + div:hover,
#allDay + div:hover {
  background: #f3f4f6;
}
body.dark #multiDay + div,
body.dark #allDay + div {
  background: transparent;
  color: #e5e7eb;
  border-color: #4b5563;
}
body.dark #multiDay + div:hover,
body.dark #allDay + div:hover {
  background: #374151;
}
#multiDay:checked + div,
#allDay:checked + div {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  border-color: transparent;
}
#multiDay:checked + div:hover,
#allDay:checked + div:hover {
  filter: brightness(0.95);
}
body.dark #multiDay:checked + div,
body.dark #allDay:checked + div {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
}
body.dark #multiDay:checked + div:hover,
body.dark #allDay:checked + div:hover {
  filter: brightness(0.9);
}
.flex.gap-2 {
  align-items: center;
}
/* --- Mobile simple modal: force le light quand body n'est pas .dark --- */
body:not(.dark) #addRdvSimpleModal > div {
  background: #ffffff !important;
  color: #111827 !important; /* slate-800 */
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* champs */
body:not(.dark) #addRdvSimpleModal input,
body:not(.dark) #addRdvSimpleModal select {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important; /* gray-300 */
}

/* labels + textes d’aide */
body:not(.dark) #addRdvSimpleModal label,
body:not(.dark) #addRdvSimpleModal h2 {
  color: #111827 !important;
}

/* boutons “peer” (Plusieurs jours / Journée entière) */
body:not(.dark) #addRdvSimpleModal .hover\:bg-gray-100:hover {
  background: #f3f4f6 !important;
}
body:not(.dark) #addRdvSimpleModal .hover\:bg-gray-200:hover {
  background: #e5e7eb !important;
}
.color-picker {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.color-picker button:hover {
  transform: scale(1.1);
  transition: transform 0.2s;
}
/* Loader agenda */
.agenda-loading {
  position: relative;
}

.agenda-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-family: "Poppins", sans-serif;
  animation: fadeIn 0.3s ease;
}

.agenda-loader .spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(0, 0, 0, 0.1);
  border-top-color: #2563eb; /* Bleu Nextcloud/Aurélia */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.agenda-loader p {
  margin-top: 15px;
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
@media (max-width: 640px) {
  .event-tooltip .event-card > div:first-child {
    color: inherit !important; /* Force le header à suivre ev.textColor */
  }
}
@media (max-width: 640px) {
  .fc-dayGridMonth-view .fc-daygrid-day {
    min-height: 40px; /* Jours compacts */
    padding: 2px;
  }
  .fc-dayGridMonth-view .fc-daygrid-day-top {
    justify-content: center; /* Centre les points */
  }
  .fc-dayGridMonth-view .fc-daygrid-event {
    margin: 1px auto; /* Centre les points */
  }
  .fc-dayGridMonth-view .fc-daygrid-dot-event {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
  }
}
/* ────────────────────────────────
   🎯 Fix Dark : accordéons non blancs
   ──────────────────────────────── */
body.dark .welcome-modal .sso-block > button,
body.dark .welcome-modal button.w-full.flex.justify-between.items-center {
  background-color: #1e293b !important; /* slate-800 */
  color: #e2e8f0 !important; /* texte clair */
  border-color: #334155 !important; /* slate-700 */
}

/* pour écraser les bg-gray-100 ou bg-white utilisés par Tailwind */
/* Styles pour les éléments bg-gray-100 et bg-white en mode light */
.welcome-modal [class*="bg-gray-100"] {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
}
.welcome-modal [class*="bg-white"] {
  background: #ffffff !important;
  color: #1f2937 !important;
}
body.dark .welcome-modal [class*="bg-gray-100"],
body.dark .welcome-modal [class*="bg-white"] {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
}
/* ────────────────────────────────
   🧊 Fix final : bordures sombres et fondues
   ──────────────────────────────── */

/* Bordures principales : à peine visibles */
body.dark .welcome-modal .sso-block,
body.dark .welcome-modal .sso-block > button,
body.dark .welcome-modal .sso-block > div,
body.dark .welcome-modal input {
  border-color: rgba(255, 255, 255, 0.05) !important; /* très léger trait */
  box-shadow: none !important;
}

/* Empêche tout “ring” clair de Tailwind */
body.dark .welcome-modal [class*="ring"],
body.dark .welcome-modal [class*="focus:ring"],
body.dark .welcome-modal [class*="border-gray"],
body.dark .welcome-modal [class*="border-white"] {
  border-color: rgba(255, 255, 255, 0.05) !important;
  --tw-ring-color: transparent !important;
  box-shadow: none !important;
}

/* Survol plus doux (presque imperceptible) */
body.dark .welcome-modal .sso-block > button:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Séparateurs horizontaux */
body.dark .welcome-modal hr,
body.dark .welcome-modal .border-t,
body.dark .welcome-modal .border-b {
  border-color: rgba(255, 255, 255, 0.05) !important;
}
/* === ASSISTANT BLOCK === */
.assistant-block {
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

.assistant-container {
  background: transparent;
  color: #1f2937;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

body.dark .assistant-container {
  background: #1f2937;
  color: #e5e7eb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.assistant-left {
  background: linear-gradient(135deg, #dbd2ff, #f5f3ff);
  border-right: 1px solid rgba(99, 102, 241, 0.15);
}
body.dark .assistant-left {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(109, 40, 217, 0.2));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.assistant-text {
  color: #4b5563;
}
body.dark .assistant-text {
  color: #d1d5db;
}

.assistant-badge {
  background: #eef2ff;
  color: #4338ca;
}
body.dark .assistant-badge {
  background: rgba(79, 70, 229, 0.25);
  color: #c4b5fd;
}

/* === Modale === */
.assistant-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.assistant-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}
body.dark .assistant-modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}
.assistant-modal-frame {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
body.dark .assistant-modal-frame {
  background: #111827;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.assistant-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f9fafb;
  color: #1f2937;
}
body.dark .assistant-loader {
  background: #1f2937;
  color: #f9fafb;
}
/* === Bloc Résumé du jour (IA) === */
.note-summary {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
body.dark .note-summary {
  background: #1f2937;
  border-color: #374151;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* header avec date + bouton */
.note-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* titre (date du jour) */
.note-summary-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4f46e5;
  text-transform: capitalize;
}
body.dark .note-summary-title {
  color: #a78bfa;
}

/* bouton IA */
.note-summary-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.note-summary-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}
.note-summary-btn.disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* texte affiché par l'IA */
.note-summary-text {
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-line;
  font-family: inherit; /* 👉 hérite de la police globale Aurélia */
  transition: color 0.3s ease;
}
body.dark .note-summary-text {
  color: #e5e7eb;
}

/* Curseur IA clignotant */
.note-summary-text::after {
  content: "|";
  animation: blink 1s infinite;
  margin-left: 3px;
  opacity: 0.6;
}
@keyframes blink {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0;
  }
}
/* === CORRECTIONS SAAS MODAL === */

/* Titres en mode light */
.saas-modal h3,
.saas-modal h4 {
  color: #1f2937 !important;
}

/* Titres en mode dark */
body.dark .saas-modal h3,
body.dark .saas-modal h4 {
  color: #f9fafb !important;
}

/* Bordures en mode light */
.saas-modal .border-gray-200 {
  border-color: #e5e7eb !important;
}

.saas-modal .border-gray-700 {
  border-color: #374151 !important;
}

/* Bordures en mode dark */
body.dark .saas-modal .border-gray-200,
body.dark .saas-modal .border-gray-700 {
  border-color: #374151 !important;
}

/* Textes principaux en mode light */
.saas-modal .text-gray-900 {
  color: #1f2937 !important;
}

.saas-modal .text-gray-600 {
  color: #4b5563 !important;
}

/* Textes principaux en mode dark */
body.dark .saas-modal .text-gray-900 {
  color: #f9fafb !important;
}

body.dark .saas-modal .text-gray-400 {
  color: #9ca3af !important;
}

/* ========== AppInfoModal Styles ========== */
/* Mode Light - Fond blanc */
.app-info-modal {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.app-info-modal .bg-white,
.app-info-modal [class*="bg-white"] {
  background: #ffffff !important;
}

.app-info-modal .bg-gray-50,
.app-info-modal [class*="bg-gray-50"] {
  background: #f9fafb !important;
}

.app-info-modal .bg-gray-800,
.app-info-modal [class*="bg-gray-800"] {
  background: #ffffff !important;
}

.app-info-modal .text-gray-800,
.app-info-modal .text-gray-900 {
  color: #111827 !important;
}

.app-info-modal .text-gray-700 {
  color: #374151 !important;
}

.app-info-modal .text-gray-600 {
  color: #4b5563 !important;
}

.app-info-modal .text-gray-400 {
  color: #6b7280 !important;
}

.app-info-modal .text-gray-300 {
  color: #9ca3af !important;
}

.app-info-modal .border-gray-200,
.app-info-modal [class*="border-gray-200"] {
  border-color: #e5e7eb !important;
}

.app-info-modal .border-gray-600,
.app-info-modal [class*="border-gray-600"] {
  border-color: #d1d5db !important;
}

.app-info-modal .border-gray-700,
.app-info-modal [class*="border-gray-700"] {
  border-color: #d1d5db !important;
}

/* Mode Dark */
body.dark .app-info-modal {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark .app-info-modal .bg-white,
body.dark .app-info-modal [class*="bg-white"] {
  background: #1f2937 !important;
}

body.dark .app-info-modal .bg-gray-50,
body.dark .app-info-modal [class*="bg-gray-50"] {
  background: rgba(55, 65, 81, 0.5) !important;
}

body.dark .app-info-modal .bg-gray-800,
body.dark .app-info-modal [class*="bg-gray-800"] {
  background: #1f2937 !important;
}

body.dark .app-info-modal .bg-gray-700,
body.dark .app-info-modal [class*="bg-gray-700"] {
  background: rgba(55, 65, 81, 0.5) !important;
}

body.dark .app-info-modal .text-gray-800,
body.dark .app-info-modal .text-gray-900 {
  color: #f9fafb !important;
}

body.dark .app-info-modal .text-gray-700 {
  color: #e5e7eb !important;
}

body.dark .app-info-modal .text-gray-600 {
  color: #d1d5db !important;
}

body.dark .app-info-modal .text-gray-400 {
  color: #9ca3af !important;
}

body.dark .app-info-modal .text-gray-300 {
  color: #6b7280 !important;
}

body.dark .app-info-modal .border-gray-200,
body.dark .app-info-modal [class*="border-gray-200"] {
  border-color: #374151 !important;
}

body.dark .app-info-modal .border-gray-600,
body.dark .app-info-modal [class*="border-gray-600"] {
  border-color: #4b5563 !important;
}

body.dark .app-info-modal .border-gray-700,
body.dark .app-info-modal [class*="border-gray-700"] {
  border-color: #4b5563 !important;
}
