/**
 * ============================================================================
 * ACCOUNT MODAL - Styles du modal compte client
 * ============================================================================
 * Design cohérent avec booking-widget (noir/blanc/or)
 * Responsive et professionnel
 * ============================================================================
 */

/* ============================================================================
   MODAL CONTAINER
   ============================================================================ */

.account-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20003; /* Au-dessus du booking widget (20000) et login (20001) */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.account-modal.active {
  display: block;
}

/* Bloquer le scroll du body quand le modal est ouvert */
body.account-modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

.account-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.account-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  z-index: 2;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tabs sticky en haut */
.account-tabs {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Conteneur sticky pour tous les filtres */
.filters-container {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 9;
  padding-bottom: 1rem;
  margin-top: 0 !important;
}

/* Filtres principaux */
.bookings-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
}

/* Filtres temporels */
.time-filters-wrapper {
  margin-top: 0.75rem;
}

.time-filters-toggle {
  display: none; /* Caché par défaut, visible sur mobile via JS */
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.time-filters-toggle i {
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.time-filters-toggle.active i {
  transform: rotate(180deg);
}

.time-filters-toggle:hover {
  background: var(--bg-color);
  border-color: var(--primary-color);
}

.time-filters {
  display: flex;
  gap: 0.4rem;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  flex-wrap: wrap;
  align-items: center;
}

.time-filters.collapsed {
  display: none;
}

/* Scroll uniquement sur le contenu des tabs */
.account-tab-content {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  margin-top: 1rem;
  padding-right: 0.5rem;
  padding-bottom: 1rem;
  max-height: calc(90vh - 300px); /* Ajuster selon la hauteur du header + tabs */
}

/* Scrollbar moderne et discrète (EXACTEMENT comme booking widget) */
.account-tab-content::-webkit-scrollbar {
  width: 8px;
}

.account-tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.account-tab-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.account-tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

.account-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
}

.account-modal-close:hover {
  background: color-mix(in srgb, var(--primary-color) 5%, transparent);
  color: var(--primary-color);
  transform: rotate(90deg);
}

/* ============================================================================
   HEADER
   ============================================================================ */

.account-header {
  text-align: center;
  margin-bottom: 2rem;
}

.account-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 50%;
  color: white;
  font-size: 2rem;
}

.account-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

/* ============================================================================
   TABS NAVIGATION
   ============================================================================ */

.account-tabs {
  display: flex;
  gap: 0.5rem;
}

.account-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: -2px;
}

.account-tab:hover {
  color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 2%, transparent);
}

.account-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 5%, transparent);
}

.account-tab i {
  font-size: 1.1rem;
}

/* Badge de compteur sur les tabs */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.25rem;
}

.account-tab:not(.active) .tab-badge {
  background: var(--text-light);
}

/* ============================================================================
   TAB CONTENT
   ============================================================================ */

.account-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.account-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   BOOKINGS TAB - Filtres
   ============================================================================ */

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: color-mix(in srgb, var(--text-light) 20%, var(--bg-secondary));
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Déjà défini plus haut avec position sticky */

.time-filter-badge {
  padding: 0.35rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.time-filter-badge:hover {
  background: var(--bg-secondary);
  border-color: var(--text-light);
  color: var(--primary-color);
}

.time-filter-badge.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Badge de compteur sur les filtres */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--primary-color);
  color: white;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.4rem;
}

.filter-btn:not(.active) .filter-badge {
  background: var(--text-light);
  color: white;
}

.filter-btn.active .filter-badge {
  background: white;
  color: var(--primary-color);
}

/* ============================================================================
   BOOKINGS TAB - Liste
   ============================================================================ */

.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bookings-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.bookings-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.bookings-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.bookings-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

/* Booking Card */
.booking-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.booking-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.booking-card.cancelled {
  opacity: 0.6;
  border-color: var(--border-color);
}

.booking-card.cancelled:hover {
  opacity: 0.8;
}

.booking-image {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.booking-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking-service {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.booking-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.booking-info i {
  color: var(--text-light);
  width: 16px;
}

.booking-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-status.upcoming {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
}

.booking-status.past {
  background: var(--bg-secondary);
  color: var(--text-light);
}

.booking-status.cancelled {
  background: #dc3545;
  color: white;
}

.booking-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-booking-action {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  background: transparent;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-booking-action:hover {
  background: var(--primary-color);
  color: white;
}

.btn-booking-action.cancel {
  border-color: #dc3545;
  color: #dc3545;
}

.btn-booking-action.cancel:hover {
  background: #dc3545;
  color: white;
}

.btn-booking-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border-color);
  color: var(--text-light);
}

.btn-booking-action:disabled:hover {
  background: transparent;
  color: var(--text-light);
}

/* Tooltip personnalisé pour boutons désactivés */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.custom-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: normal !important;
  width: 220px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.custom-tooltip i {
  margin-right: 0.5rem;
  color: #ffc107;
}

/* Flèche du tooltip */
.custom-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--secondary-color);
}

/* Afficher au hover */
.tooltip-wrapper:hover .custom-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ============================================================================
   PROFILE TAB - Formulaire
   ============================================================================ */

.account-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-group label i {
  color: var(--text-light);
  width: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.form-group input.readonly,
.form-group input:disabled {
  background: var(--bg-secondary);
  color: var(--text-light);
  cursor: not-allowed;
}

.help-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.password-input-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
  z-index: 10;
}

.toggle-password:hover {
  color: var(--primary-color);
}

.change-password-modal .password-input-wrapper {
  position: relative;
}

.change-password-modal .toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
  z-index: 10;
  pointer-events: auto;
}

/* Buttons */
.btn-account-primary,
.btn-account-secondary,
.btn-account-danger {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-account-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.btn-account-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-account-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-account-secondary:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-account-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.btn-account-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.btn-account-primary:disabled,
.btn-account-secondary:disabled,
.btn-account-danger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Messages */
.account-success,
.account-error {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.account-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.account-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.account-success.show,
.account-error.show {
  display: flex;
}

/* Divider */
.account-divider {
  height: 2px;
  background: var(--border-color);
  margin: 2rem 0;
}

/* Password Section */
.password-section {
  max-width: 500px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.password-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-section h3:before {
  content: '\f023';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: var(--text-light);
}

/* ============================================================================
   SECURITY TAB - Cards
   ============================================================================ */

.security-section {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
  overflow: visible;
}

.security-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  padding-bottom: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.3s ease;
  overflow: visible;
  margin-bottom: 0.5rem;
}

.security-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.security-card.danger {
  background: #fff5f5;
  border-color: #dc3545;
}

.security-card.danger:hover {
  border-color: #c82333;
  box-shadow: 0 4px 16px rgba(220, 53, 69, 0.15);
}

.security-card-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.security-card:hover .security-card-icon {
  transform: scale(1.1);
}

.security-card-icon.danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: #fff;
}

.security-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.security-card-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.security-card-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}

.security-card .btn-account-secondary,
.security-card .btn-account-danger {
  width: auto;
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
}

/* ============================================================================
   CHANGE PASSWORD MODAL
   ============================================================================ */

.change-password-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20004; /* Au-dessus du account modal */
}

.change-password-modal.active {
  display: block;
}

.change-password-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.change-password-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  z-index: 2;
  padding: 2rem;
}

.change-password-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.change-password-modal-close:hover {
  background: color-mix(in srgb, var(--primary-color) 5%, transparent);
  color: var(--primary-color);
}

.change-password-modal h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .account-modal-content {
    width: 95%;
    padding: 1.5rem;
    max-height: 95vh;
  }

  .account-title {
    font-size: 1.4rem;
  }

  .account-tabs {
    overflow-x: auto;
    gap: 0.25rem;
  }

  .account-tab {
    flex: 0 0 auto;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .account-tab span {
    display: none;
  }

  .account-tab i {
    font-size: 1.2rem;
  }

  .booking-card {
    flex-direction: column;
    padding: 1rem;
  }

  .booking-image {
    width: 100%;
    height: 150px;
  }

  .booking-status {
    position: static;
    display: inline-block;
    margin-bottom: 0.5rem;
  }

  .booking-actions {
    flex-direction: column;
  }

  .btn-booking-action {
    width: 100%;
  }

  .security-card {
    flex-direction: column;
    padding: 1.5rem;
    text-align: center;
  }

  .security-card-icon {
    margin: 0 auto;
  }

  .security-card-content {
    align-items: center;
  }

  .security-card .btn-account-secondary,
  .security-card .btn-account-danger {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 480px) {
  /* Modal plein écran sur mobile - prend TOUT l'écran */
  .account-modal-content {
    width: 100%;
    height: 100vh; /* Hauteur fixe = toute la hauteur de viewport */
    max-width: 100%;
    max-height: none; /* Supprimer la limite max-height */
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
    padding: 1rem;
    padding-bottom: 0; /* Pas de padding en bas pour coller au bord */
  }

  /* Header plus compact sur mobile */
  .account-header {
    margin-bottom: 1rem; /* Réduit de 2rem à 1rem */
  }

  .account-icon {
    width: 48px; /* Réduit de 64px à 48px */
    height: 48px;
    margin-bottom: 0.5rem; /* Réduit de 1rem à 0.5rem */
    font-size: 1.5rem; /* Réduit de 2rem à 1.5rem */
  }

  .account-title {
    font-size: 1.3rem; /* Réduit de 1.8rem à 1.3rem */
  }

  /* Bouton fermer plus compact sur mobile */
  .account-modal-close {
    top: 0.75rem; /* Réduit de 1.5rem à 0.75rem */
    right: 0.75rem; /* Réduit de 1.5rem à 0.75rem */
    width: 32px; /* Réduit de 36px à 32px */
    height: 32px;
    font-size: 1.3rem; /* Réduit de 1.5rem à 1.3rem */
  }

  /* Tabs plus compacts sur mobile */
  .account-tabs {
    padding-bottom: 0.5rem; /* Réduit de 1rem à 0.5rem */
    margin-bottom: 1rem; /* Réduit de 2rem à 1rem */
  }

  .account-tab {
    padding: 0.5rem 0.5rem; /* Réduit de 0.75rem 1rem à 0.5rem */
    font-size: 0.85rem; /* Réduit de 0.95rem à 0.85rem */
  }

  .account-tab span {
    display: none; /* Masquer le texte sur mobile */
  }

  .account-tab i {
    font-size: 1.2rem; /* Agrandir les icônes quand seules */
  }

  /* Ajuster la hauteur du contenu pour prendre tout l'espace disponible */
  .account-tab-content {
    max-height: none; /* Supprimer la limite */
    height: calc(100vh - 180px); /* Réduit de 200px à 180px car header + tabs plus compacts */
    padding-bottom: 1rem; /* Padding en bas pour respirer */
    margin-top: 0.5rem; /* Réduit de 1rem à 0.5rem */
  }

  /* Afficher le bouton toggle sur mobile */
  .time-filters-toggle {
    display: flex !important;
  }

  /* Collapse par défaut sur mobile - IMPORTANT: plus spécifique */
  .time-filters-wrapper .time-filters {
    display: none !important;
  }

  .time-filters-wrapper .time-filters.expanded {
    display: flex !important;
  }

  /* Conteneur de filtres plus compact */
  .filters-container {
    padding-bottom: 0.5rem; /* Réduit de 1rem à 0.5rem */
  }

  .bookings-filters {
    gap: 0.2rem; /* Réduit de 0.25rem à 0.2rem */
    padding-bottom: 0.5rem; /* Réduit de 0.75rem (défaut) */
    flex-wrap: nowrap; /* Force sur une ligne */
    overflow-x: auto; /* Scroll horizontal si nécessaire */
    -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }

  .bookings-filters::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
  }

  .filter-btn {
    padding: 0.3rem 0.45rem; /* Réduit de 0.35rem 0.6rem */
    font-size: 0.7rem; /* Réduit de 0.75rem à 0.7rem */
    border-radius: 14px; /* Réduit de 16px à 14px */
    white-space: nowrap; /* Texte sur une ligne */
    flex-shrink: 0; /* Ne pas rétrécir */
  }

  .filter-badge {
    min-width: 14px; /* Réduit de 16px à 14px */
    height: 14px; /* Réduit de 16px à 14px */
    padding: 0 3px; /* Réduit de 4px à 3px */
    font-size: 0.6rem; /* Réduit de 0.65rem à 0.6rem */
    margin-left: 0.25rem; /* Réduit de 0.3rem à 0.25rem */
    border-radius: 7px; /* Réduit de 10px à 7px pour proportions */
  }

  .bookings-list {
    gap: 0.6rem; /* Réduit de 0.75rem à 0.6rem */
  }

  /* Cards de réservation plus compactes */
  .booking-card {
    padding: 0.75rem; /* Réduit de 1rem à 0.75rem */
    border-radius: 10px; /* Réduit de 12px à 10px */
    gap: 0.75rem; /* Réduit de 1.5rem à 0.75rem */
  }

  .booking-image {
    height: 120px; /* Réduit de 150px à 120px */
    border-radius: 8px; /* Réduit de 10px à 8px */
  }

  .booking-details {
    gap: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
  }

  .booking-service {
    font-size: 1rem; /* Réduit de 1.1rem à 1rem */
    line-height: 1.3; /* Compacter la hauteur de ligne */
  }

  .booking-info {
    font-size: 0.8rem; /* Réduit de 0.9rem à 0.8rem */
    gap: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
  }

  .booking-info i {
    width: 14px; /* Réduit de 16px à 14px */
    font-size: 0.8rem;
  }

  .booking-status {
    padding: 0.3rem 0.6rem; /* Réduit de 0.4rem 0.8rem */
    font-size: 0.7rem; /* Réduit de 0.8rem à 0.7rem */
    border-radius: 16px; /* Réduit de 20px à 16px */
    margin-bottom: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
  }

  .booking-actions {
    gap: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
    margin-top: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
    flex-direction: row; /* Force sur une ligne */
  }

  .btn-booking-action {
    padding: 0.6rem 0.7rem; /* Hauteur optimale : 0.6rem pour bon équilibre */
    font-size: 0.8rem; /* Réduit de 0.85rem à 0.8rem */
    border-radius: 6px; /* Réduit de 8px à 6px */
    gap: 0.35rem; /* Réduit de 0.5rem à 0.35rem */
    flex: 1; /* Prend la largeur disponible équitablement */
    white-space: nowrap; /* Texte sur une ligne */
  }

  .btn-booking-action i {
    font-size: 0.75rem; /* Icônes légèrement réduites */
  }

  .time-filter-badge {
    padding: 0.25rem 0.5rem; /* Réduit de 0.3rem 0.6rem */
    font-size: 0.7rem; /* Réduit de 0.75rem à 0.7rem */
  }

  /* Confirm Dialog plus compact */
  .confirm-dialog-content {
    width: 92%; /* Légèrement plus large pour mobile */
    padding: 1.25rem; /* Réduit de 2rem à 1.25rem */
    border-radius: 12px; /* Réduit de 16px à 12px */
  }

  .confirm-dialog-icon {
    width: 48px; /* Réduit de 64px à 48px */
    height: 48px;
    margin-bottom: 0.75rem; /* Réduit de 1rem à 0.75rem */
    font-size: 1.5rem; /* Réduit de 2rem à 1.5rem */
  }

  .confirm-dialog-title {
    font-size: 1.2rem; /* Réduit de 1.5rem à 1.2rem */
    margin-bottom: 0.4rem; /* Réduit de 0.5rem à 0.4rem */
  }

  .confirm-dialog-message {
    font-size: 0.9rem; /* Réduit de 1rem à 0.9rem */
    margin-bottom: 1rem; /* Réduit de 1.5rem à 1rem */
    line-height: 1.4; /* Compacté de 1.5 à 1.4 */
  }

  .confirm-dialog-actions {
    gap: 0.5rem; /* Réduit de 1rem à 0.5rem */
    flex-direction: column; /* Stack vertical sur très petit écran */
  }

  .btn-confirm-cancel,
  .btn-confirm-ok {
    width: 100%; /* Pleine largeur */
    padding: 0.6rem 1rem; /* Réduit de 0.75rem 1.5rem */
    font-size: 0.9rem; /* Réduit de 1rem à 0.9rem */
    border-radius: 6px; /* Réduit de 8px à 6px */
  }

  /* Change Password Modal plus compact */
  .change-password-modal-content {
    width: 92%;
    padding: 1.25rem; /* Réduit de 2rem à 1.25rem */
    border-radius: 12px; /* Réduit de 16px à 12px */
  }

  .change-password-modal-close {
    top: 0.75rem; /* Réduit de 1rem à 0.75rem */
    right: 0.75rem;
    width: 28px; /* Réduit de 32px à 28px */
    height: 28px;
    font-size: 1.1rem; /* Réduit de 1.3rem à 1.1rem */
  }

  .change-password-modal h3 {
    font-size: 1.1rem; /* Réduit de 1.4rem à 1.1rem */
    margin-bottom: 1rem; /* Réduit de 1.5rem à 1rem */
  }
}

/* ============================================================================
   CONFIRMATION DIALOG (style booking widget)
   ============================================================================ */

.confirm-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20005; /* Au-dessus de l'account modal */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.confirm-dialog.active {
  display: block;
}

.confirm-dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.confirm-dialog-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 450px;
  padding: 2rem;
  text-align: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.confirm-dialog-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff3cd;
  border-radius: 50%;
  color: #856404;
  font-size: 2rem;
}

.confirm-dialog-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.confirm-dialog-message {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-confirm-cancel,
.btn-confirm-ok {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-cancel {
  background: #f0f0f0;
  color: var(--text-light);
}

.btn-confirm-cancel:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.btn-confirm-ok {
  background: var(--primary-color);
  color: white;
}

.btn-confirm-ok:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-confirm-ok.danger {
  background: #dc3545;
}

.btn-confirm-ok.danger:hover {
  background: #c82333;
}

/* ============================================================================
   PASSWORD STRENGTH INDICATOR (comme signup)
   ============================================================================ */

.password-strength-indicator {
  margin-top: 0.75rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.password-strength-indicator.visible {
  opacity: 1;
  max-height: 200px;
}

.password-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.requirement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.requirement i {
  font-size: 0.5rem;
  color: rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.requirement.met {
  color: #22c55e;
  font-weight: 500;
}

.requirement.met i {
  color: #22c55e;
}

.requirement.met i::before {
  content: "\f058";  /* fa-check-circle */
}
