/* ========================================
   🚗 COVOITURAGE CHECKICE - VERSION CORRIGÉE
   Design propre, lisible et moderne
   ======================================== */

/* ===== RESET & VARIABLES ===== */

:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #64748b;
  --border-light: #e2e8f0;
  --white: #ffffff;
}

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

.carpooling-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.05);
}

.carpooling-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 1.5rem 0;
}

.carpooling-title svg {
  color: var(--primary-blue);
  filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
  flex-shrink: 0;
}

/* ===== ONGLETS ===== */

.carpooling-tabs {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 6px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.08);
}

.tab-btn.tab-active {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.tab-btn:hover svg,
.tab-btn.tab-active svg {
  transform: scale(1.1);
}

/* ===== CONTENU ===== */

.carpooling-content {
  margin-top: 2rem;
}

/* ===== FILTRES DE RECHERCHE ===== */

.carpooling-filters {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.carpooling-filters h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 1.25rem 0;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.filter-select:hover,
.filter-input:hover {
  border-color: #cbd5e1;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== BOUTONS ===== */

.ice-button,
.trip-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.ice-button,
.trip-btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ice-button:hover,
.trip-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.ice-button:active,
.trip-btn-primary:active {
  transform: translateY(0);
}

.trip-btn-secondary {
  background: var(--white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.trip-btn-secondary:hover {
  background: rgba(59, 130, 246, 0.08);
}

.trip-btn-danger {
  background: var(--white);
  color: #ef4444;
  border: 2px solid #ef4444;
}

.trip-btn-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

.trip-btn-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.trips-grid {
  display: flex;
  flex-wrap: wrap; /* ✅ Passe à la ligne automatiquement */
  gap: 1.5rem;
  justify-content: center;
  max-width: 1400px; /* ✅ Limite sur grands écrans */
  margin: 0 auto;
}

.trips-grid .trip-card {
  flex: 1 1 350px; /* ✅ Flexible : min 350px, peut grandir */
  max-width: 450px; /* ✅ Mais ne dépasse jamais 450px */
}


/* ===== CARTE DE TRAJET ===== */

.trip-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
}

/* ===== EN-TÊTE DU TRAJET ===== */

.trip-header {
  margin-bottom: 1.25rem;
}

.trip-route {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.route-point {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.route-point svg {
  color: var(--primary-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.route-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1rem;
}

.route-time,
.route-date {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 2px;
}

.route-line {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
}

.route-line svg {
  color: #cbd5e1;
}

/* ===== INFOS CONDUCTEUR ===== */

.trip-driver {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.driver-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.driver-info {
  flex: 1;
}

.driver-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1rem;
}

.driver-vehicle {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* ===== POINT DE RENDEZ-VOUS ===== */

.trip-meeting-point {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #92400e;
}

.trip-meeting-point svg {
  color: #f59e0b;
  flex-shrink: 0;
}

/* ===== DESCRIPTION ===== */

.trip-description {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  background: rgba(100, 116, 139, 0.05);
  border-radius: 10px;
  border-left: 3px solid var(--primary-blue);
}

/* ===== INFOS TRAJET ===== */

.trip-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.trip-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.trip-info-item svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}

.trip-info-item strong {
  color: var(--text-dark);
  font-weight: 700;
}

.trip-price {
  color: #059669;
}

.trip-price strong {
  color: #059669;
}

/* ===== BADGES ===== */

.trip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-full {
  background: #fee2e2;
  color: #991b1b;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-confirmed {
  background: #d1fae5;
  color: #065f46;
}

.badge-rejected {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-driver {
  background: #dbeafe;
  color: #1e40af;
}

/* ===== ACTIONS ===== */

.trip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trip-btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

/* ===== BADGE DEMANDES ===== */

.trip-requests-badge {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  margin-top: 12px; /* ✅ Espace au-dessus du badge */
}

/* ===== BOUTON FLOTTANT ===== */

.floating-carpooling-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: var(--white);
  border: none;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-carpooling-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

.floating-carpooling-btn:active {
  transform: scale(1.05) rotate(90deg);
}

/* ===== MODALES ===== */

.carpooling-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.carpooling-modal.active {
  opacity: 1;
  pointer-events: all;
}

.carpooling-modal-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.carpooling-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.carpooling-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.carpooling-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.carpooling-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.carpooling-modal-body {
  padding: 2rem;
}

/* ===== FORMULAIRES ===== */

.carpooling-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.form-select,
.form-input,
.form-textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--white);
  color: var(--text-dark);
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.375rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* ===== INFO BOX ===== */

.info-box {
  display: flex;
  gap: 0.875rem;
  padding: 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  margin-top: 1rem;
}

.info-box svg {
  color: var(--primary-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-box strong {
  color: var(--text-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.info-box p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== GESTION PASSAGERS ===== */

.passengers-section {
  margin-bottom: 2rem;
}

.passengers-section:last-child {
  margin-bottom: 0;
}

.passengers-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.15);
}

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

.passenger-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.passenger-card:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.passenger-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.passenger-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.passenger-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.passenger-message {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border-left: 2px solid var(--primary-blue);
}

.passenger-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.passenger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== DÉTAILS DU TRAJET ===== */

.trip-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.trip-details-section {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.trip-details-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trip-details-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.trip-details-route {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trip-details-text {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.trip-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.trip-details-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  margin-top: 1rem;
}

.route-arrow {
  text-align: center;
  font-size: 1.25rem;
  color: #cbd5e1;
}

/* ===== MESSAGES D'ÉTAT ===== */

.text-center {
  text-align: center;
}

.text-red-500 {
  color: #ef4444;
}

.text-gray-500 {
  color: var(--text-light);
}

.text-gray-400 {
  color: #9ca3af;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.text-6xl {
  font-size: 3.75rem;
  line-height: 1;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.col-span-full {
  grid-column: 1 / -1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
  .carpooling-header {
    padding: 1.5rem;
  }

  .carpooling-title {
    font-size: 1.5rem;
  }

  .carpooling-tabs {
    flex-direction: column;
  }

  .tab-btn {
    justify-content: flex-start;
    padding: 1rem;
  }

  .trips-grid {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .trip-info {
    grid-template-columns: 1fr;
  }

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

  .trip-btn {
    width: 100%;
  }

  .floating-carpooling-btn {
    width: 56px;
    height: 56px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .carpooling-modal-content {
    max-width: 100%;
    border-radius: 20px;
  }

  .carpooling-modal-header,
  .carpooling-modal-body {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .passenger-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .passenger-actions {
    width: 100%;
  }

  .passenger-actions .trip-btn {
    flex: 1;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .trip-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .carpooling-header {
    padding: 1rem;
  }

  .carpooling-title {
    font-size: 1.25rem;
    gap: 0.5rem;
  }

  .carpooling-title svg {
    width: 24px;
    height: 24px;
  }

  .trip-card {
    padding: 1.25rem;
  }
}


/* ========================================
   HISTORIQUE DES TRAJETS
   ======================================== */

/* En-tête de l'historique */
.history-header {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}

.history-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.history-icon-badge {
  padding: 8px;
  background: #dbeafe;
  border-radius: 8px;
}

.history-icon-badge svg {
  color: #3b82f6;
}

.history-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.history-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Boutons de sélection conducteur/passager */
.history-toggle-buttons {
  display: flex;
  gap: 12px;
}

/* Grille de cartes d'historique */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Carte d'historique */
.history-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.history-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Badge de statut */
.history-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.history-status-badge.completed {
  background: #e5e7eb;
  color: #4b5563;
}

.history-status-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

.history-status-badge.confirmed {
  background: #d1fae5;
  color: #059669;
}

.history-status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

/* Section trajet (départ/arrivée) */
.history-route {
  margin: 16px 0;
}

.history-route-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.history-route-icon {
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-route-icon.departure {
  background: #dbeafe;
}

.history-route-icon.departure svg {
  color: #3b82f6;
}

.history-route-icon.arrival {
  background: #d1fae5;
}

.history-route-icon.arrival svg {
  color: #10b981;
}

.history-route-name {
  font-weight: 600;
  color: #1e293b;
}

/* Informations du trajet */
.history-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: #64748b;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  margin-top: 16px;
}

.history-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Section conducteur (pour les passagers) */
.history-driver-info {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.history-driver-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.history-driver-name {
  font-weight: 600;
  color: #1e293b;
}

/* Bouton "Laisser un avis" */
.history-review-button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.history-review-button:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* État vide */
.history-empty-state {
  text-align: center;
  padding: 64px 20px;
}

.history-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: #94a3b8;
}

.history-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.history-empty-text {
  color: #64748b;
  font-size: 14px;
}

/* État de chargement */
.history-loading {
  text-align: center;
  padding: 48px 20px;
}

.history-loading-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.history-loading-text {
  color: #94a3b8;
}

/* État d'erreur */
.history-error {
  text-align: center;
  padding: 48px 20px;
}

.history-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.history-error-title {
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
}

.history-error-text {
  font-size: 14px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
  
  .history-toggle-buttons {
    flex-direction: column;
  }
}

/* ========================================
   HISTORIQUE DES TRAJETS
   ======================================== */

/* Conteneur principal de l'en-tête */
.history-header {
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

/* Titre de l'historique */
.history-title {
  margin: 0 0 16px 0;
  font-size: 20px;
  color: #1e293b;
  font-weight: 600;
}

/* Sous-titre */
.history-subtitle {
  color: #64748b;
  margin-bottom: 20px;
}

/* Conteneur des boutons de sélection */
.history-toggle-buttons {
  display: flex;
  gap: 12px;
}

.history-toggle-buttons .ice-button,
.history-toggle-buttons .ice-button-secondary {
  flex: 1;
}

/* Conteneur des résultats 
#history-results {
   Pas de style particulier, juste pour référence 
} */

/* État de chargement */
.history-loading {
  text-align: center;
  color: #94a3b8;
  padding: 40px;
}


/* ========================================
   STYLE AMÉLIORÉ - HISTORIQUE (COMME LES ONGLETS PRINCIPAUX)
   ======================================== */

/* Conteneur des boutons avec le style glass/card */
.history-toggle-buttons {
  display: flex;
  gap: 0.75rem; /* 12px */
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 6px;
}

/* Bouton actif (sélectionné) */
.history-toggle-buttons .ice-button {
  flex: 1;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Bouton inactif (non sélectionné) */
.history-toggle-buttons .ice-button-secondary {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Effet hover sur le bouton inactif */
.history-toggle-buttons .ice-button-secondary:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
}

/* Effet hover sur le bouton actif */
.history-toggle-buttons .ice-button:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

/* Supprimer l'outline au focus */
.history-toggle-buttons .ice-button:focus,
.history-toggle-buttons .ice-button-secondary:focus {
  outline: none;
}



/* ========================================
   MODALE DE CONFIRMATION ÉLÉGANTE
   ======================================== */

.custom-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.custom-confirm-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

/* ========================================
   ICÔNE DE LA MODALE - CENTRAGE PARFAIT
   ======================================== */

.custom-confirm-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  
  /* ✅ Centrage absolu garanti */
  position: relative;
  margin: 0 auto 20px;
  font-size: 28px;
  line-height: 56px; /* Égal à la hauteur */
  text-align: center;
  
  /* Forcer l'emoji à se comporter comme du texte */
  display: block;
}


/* ✅ Forcer le centrage de l'emoji sur tous les navigateurs */
.custom-confirm-icon::before {
  content: '';
  display: inline-block;
}


.custom-confirm-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 12px;
}

.custom-confirm-message {
  font-size: 15px;
  color: #64748b;
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

.custom-confirm-buttons {
  display: flex;
  gap: 12px;
}

.custom-confirm-btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.custom-confirm-btn-cancel {
  background: #f1f5f9;
  color: #64748b;
}

.custom-confirm-btn-cancel:hover {
  background: #e2e8f0;
}

.custom-confirm-btn-confirm {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.custom-confirm-btn-confirm:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-confirm-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  margin: 0 auto 20px;
  font-size: 28px;
  
  /* ✅ CENTRAGE PARFAIT */
  line-height: 56px;
  text-align: center;
  display: block;
}
