/* ========== IMPORTS DES WIDGETS ========== */
@import './widgets/login-check.css';
@import './widgets/login.css';
@import './widgets/signup.css';
@import './widgets/garage-info.css';
@import './widgets/time-slots.css';
@import './widgets/confirmation.css';
@import './widgets/validation.css';

/* ========== ANIMATIONS GLOBALES ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== CLASSES UTILITAIRES ========== */
.widget {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.widget.active {
  display: block;
}

/* ========== STYLES SPÉCIFIQUES ========== */
/* Calendrier */
.calendar-day {
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.calendar-day:hover:not(.disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.calendar-day.selected {
  background-color: #3b82f6;
  color: white;
}

.calendar-day.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #94a3b8;
}

/* Slots horaires */
.time-slot-btn {
  min-width: 3.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
}

.time-slot-btn.selected {
  background-color: #3b82f6;
  color: white;
}

.time-slots-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Validation mot de passe */
.password-requirement {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.password-requirement.valid {
  color: #22c55e;
}

.password-requirement.invalid {
  color: #94a3b8;
}

#password-strength {
  height: 0.25rem;
  background-color: #f3f4f6;
  border-radius: 9999px;
  margin-top: 0.5rem;
  overflow: hidden;
}

#password-strength-bar {
  height: 100%;
  transition: all 0.3s ease-in-out;
}

/* Toggle password */
.password-toggle {
  position: relative;
}

.password-toggle input {
  padding-right: 1rem;
}

.password-toggle-eye {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.password-toggle-eye:hover {
  color: #64748b;
}

/* Inputs spécifiques */
.siret-input {
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
  appearance: textfield;
  margin: 0;
}

.siret-input::-webkit-inner-spin-button,
.siret-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

/* Barre de progression */
.progress-step-1 { width: 25%; }
.progress-step-2 { width: 50%; }
.progress-step-3 { width: 75%; }
.progress-step-4 { width: 100%; }

/* ========== MEDIA QUERIES ========== */
@media (max-width: 640px) {
  .time-slot-btn {
    min-width: 2.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }

  .widget-container {
    padding: 0.5rem;
  }
}

/* ========== OVERRIDES TAILWINDS ========== */
/* Pour les éléments qui doivent forcer le style */
.force-visible {
  display: block !important;
}

/* ========== CORRECTIONS SPÉCIFIQUES ========== */
/* Correction pour Font Awesome */
.fas {
  display: inline-block;
}

/* Empêcher le zoom sur mobile */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  font-size: 16px;
}

/* ========== TRANSITIONS PERSONNALISÉES ========== */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0, 0.2, 1);
}

/* ========== CLASSES POUR JS ========== */
.js-hidden {
  display: none;
}

.js-visible {
  display: block;
}

.calendar-day.special-day {
  background-color: #fff7ed; /* beige léger */
  color: #b45309; /* orange doux */
  font-weight: bold;
  border: 1px solid #fdba74;
}

.calendar-day.special-day:hover {
  background-color: #ffedd5;
  transform: scale(1.05);
  cursor: pointer;
  box-shadow: 0 0 0 2px #fdba74;
}

.calendar-day.special-day {
    font-weight: bold;
    border: 1px solid #fca5a5;
}

.calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e5e7eb;
}
/* ⚠️ Style pour les jours spéciaux NON sélectionnés uniquement */
.calendar-day.special-day:not(.selected) {
  background-color: #fee2e2; /* rouge clair */
  color: #b91c1c; /* rouge foncé */
  font-weight: bold;
  border: 1px solid #fca5a5;
}

/* ✅ Style appliqué à un jour sélectionné (déjà en place via selected) */
.calendar-day.selected {
  background-color: #bfdbfe; /* bleu clair */
  color: #1d4ed8;
}