/* Styles améliorés pour la vérification de disponibilité */

/* Conteneur principal des résultats */
.availability-results {
  margin-top: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation de chargement */
.availability-loading {
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.loading-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-dots {
  display: flex;
  gap: 0.5rem;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loading-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.loading-text p {
  opacity: 0.9;
  font-size: 1rem;
}

/* Message de succès */
.availability-success {
  padding: 0;
}

.success-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.success-icon {
  font-size: 3rem;
  animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.success-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.success-text p {
  opacity: 0.9;
  font-size: 1rem;
}

/* Grille des chambres */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

/* Cartes de chambres améliorées */
.room-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.room-header {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  font-weight: 600;
}

.room-type i {
  font-size: 1.2rem;
}

.room-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.room-status.available {
  background: #10b981;
  color: white;
}

.room-status.unavailable {
  background: #ef4444;
  color: white;
}

.room-content {
  padding: 1.5rem;
}

.room-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
  font-weight: 600;
}

.room-description {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.room-features {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

.feature i {
  color: #667eea;
}

.room-pricing {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.price-per-night {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.price-per-night .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.price-per-night .period {
  color: #64748b;
  font-size: 0.9rem;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.total-price .label {
  color: #64748b;
  font-size: 0.9rem;
}

.total-price .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #667eea;
}

.room-footer {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.book-room-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.book-room-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.book-room-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Message d'aucune chambre disponible */
.availability-empty {
  padding: 3rem 2rem;
  text-align: center;
  background: #fef3c7;
  color: #92400e;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.empty-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #92400e;
  font-weight: 600;
}

.empty-text p {
  margin-bottom: 2rem;
  opacity: 0.8;
  font-size: 1rem;
}

.empty-suggestions {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.empty-suggestions h4 {
  color: #92400e;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.empty-suggestions ul {
  list-style: none;
  padding: 0;
}

.empty-suggestions li {
  padding: 0.5rem 0;
  color: #78350f;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.empty-suggestions li:before {
  content: "•";
  color: #f59e0b;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Message d'erreur */
.availability-error {
  padding: 2rem;
  text-align: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ef4444;
}

.error-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #991b1b;
  font-weight: 600;
}

.error-content p {
  margin-bottom: 2rem;
  opacity: 0.8;
  font-size: 1rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.retry-btn, .contact-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.retry-btn {
  background: #ef4444;
  color: white;
}

.retry-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.contact-btn {
  background: white;
  color: #ef4444;
  border: 1px solid #ef4444;
}

.contact-btn:hover {
  background: #fef2f2;
  transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
  .rooms-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .success-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .room-features {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .retry-btn, .contact-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .availability-loading,
  .availability-empty,
  .availability-error {
    padding: 2rem 1rem;
  }
}

/* Animations d'apparition */
.room-card {
  animation: fadeInUp 0.6s ease-out;
}

.room-card:nth-child(1) { animation-delay: 0.1s; }
.room-card:nth-child(2) { animation-delay: 0.2s; }
.room-card:nth-child(3) { animation-delay: 0.3s; }
.room-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
