/* Custom styles to complement Bootstrap */
:root {
  --bs-primary: #3b82f6;
  --bs-primary-rgb: 59, 130, 246;
  --bs-secondary: #6b7280;
  --bs-success: #10b981;
  --bs-warning: #f59e0b;
  --bs-danger: #ef4444;
  --bs-info: #06b6d4;
}

.gradient-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  min-height: 100vh;
}

.service-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.service-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.service-card.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.time-slot {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #e5e7eb;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 0.375rem;
}

.time-slot:hover {
  border-color: #10b981;
  background-color: #f0fdf4;
}

.time-slot.selected {
  border-color: #10b981;
  background-color: #dcfce7;
  color: #166534;
}

.date-card {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #e5e7eb;
}

.date-card:hover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.date-card.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  align-items: center;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.step-circle.completed {
  background-color: #10b981;
  color: white;
}

.step-circle.current {
  background-color: #3b82f6;
  color: white;
}

.step-circle.pending {
  background-color: #e5e7eb;
  color: #6b7280;
}

.step-label {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.step-label.completed {
  color: #10b981;
}

.step-label.current {
  color: #3b82f6;
}

.step-label.pending {
  color: #6b7280;
}

.step-connector {
  width: 32px;
  height: 2px;
  margin: 0 1rem;
  transition: all 0.3s ease;
}

.step-connector.completed {
  background-color: #10b981;
}

.step-connector.pending {
  background-color: #e5e7eb;
}

.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  background-color: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

@media (max-width: 768px) {
  .step-indicator {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .step-connector {
    display: none;
  }
}

/* ===== MOBILE-FIRST LAYOUT & TOKENS ===== */
:root{
  --container-max: 520px;      /* largeur max lisible pour mobile + small desktop */
  --radius-2xl: 1.25rem;
}

/* Conteneurs principaux */
header .container,
main .container{ max-width: var(--container-max); }

/* Lisibilité titres & textes */
h2, .display-5, .display-6{ line-height:1.2; letter-spacing:-.01em; }
.lead{ color:#4b5563; }

/* Stepper: plus lisible, scrollable en mobile */
.step-indicator{ gap:.5rem; overflow-x:auto; -webkit-overflow-scrolling:touch; padding:.25rem .5rem; }
.step-circle{ min-width:36px; min-height:36px; font-weight:700; }
.step-label{ font-size:.9rem; }

/* Cartes service/date: coins adoucis + ombre légère */
.service-card, .date-card{ border-radius:var(--radius-2xl); box-shadow:0 1px 0 rgba(0,0,0,.04); }
.service-card.selected, .date-card.selected{ border-color:var(--bs-primary); background:#eff6ff; }

/* Slots horaires */
#timeSlotsContainer .row{ margin:0; }
.time-slot{ min-height:48px; border-radius:.75rem; font-weight:600; }
.time-slot.disabled{ opacity:.5; cursor:not-allowed; background:#f3f4f6; border-style:dashed; }

/* Formulaire (#client) */
.form-section-title{ display:flex; align-items:center; gap:.5rem; margin-bottom:.75rem; }

/* Erreurs visibles (Bootstrap-like) */
.was-validated .form-control:invalid,
.form-control.is-invalid{ border-color:#ef4444; box-shadow:0 0 0 .2rem rgba(239,68,68,.15); }
.invalid-feedback{ display:none; color:#b91c1c; font-size:.875rem; margin-top:.375rem; }
.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback{ display:block; }

/* CTA sticky sur mobile (utile au formulaire) */
.sticky-cta{ position:sticky; bottom:.75rem; z-index:10; padding-top:.5rem; background:linear-gradient(to bottom, rgba(248,250,252,0), rgba(248,250,252,1)); }

/* Callouts / panneaux d'info (confirmation, notices) */
.callout{ border-radius:var(--radius-2xl); border:1px solid #e5e7eb; background:#f8fafc; padding:1rem; }

/* --- Breakpoints --- */
@media (max-width:480px){
  .card .card-body{ padding:1.25rem !important; }
  .display-5, .display-6{ font-size:1.5rem; }
  /* Grille créneaux: 2 colonnes nettes */
  .col-6.col-sm-4.col-md-3.col-lg-2{ width:50%; }
}

@media (min-width:768px){
  :root{ --container-max: 760px; }
}

@media (min-width:992px){
  :root{ --container-max: 920px; }
  .step-label{ font-size:1rem; }
}

@media (min-width:1200px){
  :root{ --container-max: 1100px; }
}