/* Custom styles for UNIV CLEAN DETAILING */

:root {
  --primary-gold: #FFD700;
  --secondary-gold: #FFC107;
  --dark-bg: #000000;
  --gray-bg: #111827;
  --text-light: #F3F4F6;
  --text-gray: #9CA3AF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--dark-bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Navigation */
.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-gold);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-nav-link {
  display: block;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--primary-gold);
  background-color: rgba(255, 215, 0, 0.1);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
  color: var(--dark-bg);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background-color: var(--primary-gold);
  color: var(--dark-bg);
  transform: translateY(-2px);
}

/* Service Cards */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 0.75rem;
  /* padding: 1.5rem; */
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--dark-bg);
}

/* Portfolio */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

/* Forms */
.form-input {
  width: 100%;
  background-color: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--text-light);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-input::placeholder {
  color: var(--text-gray);
}

/* Social Links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 215, 0, 0.1);
  color: var(--primary-gold);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-gold);
  color: var(--dark-bg);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Success/Error Messages */
.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.message-success {
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.message-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
  .service-card {
    padding: 1.5rem;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .service-card {
    padding: 1rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gold);
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
  .service-card {
    backdrop-filter: blur(10px);
  }
}

/* Admin Dashboard Styles */
.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-gray);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-item:hover {
  background-color: rgba(255, 215, 0, 0.1);
  color: var(--text-light);
}

.nav-item.active {
  background-color: var(--primary-gold);
  color: var(--dark-bg);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--dark-bg);
}

.sidebar {
  background-color: var(--gray-bg);
  border-right: 1px solid var(--primary-gold);
}

.main-content {
  background-color: var(--dark-bg);
}

.card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 0.5rem;
}

.section {
  display: block;
}

.section.hidden {
  display: none;
}

/* Status badges */
.status-pending {
  background: #fbbf24;
  color: #000;
}

.status-confirmed {
  background: #10b981;
  color: #fff;
}

.status-completed {
  background: #6b7280;
  color: #fff;
}

.status-cancelled {
  background: #ef4444;
  color: #fff;
}

/* Responsive admin layout */
@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    position: relative !important;
    height: auto;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
}

/* Reservation Steps Styling */
.step {
  transition: all 0.3s ease;
}

.step.active .step-number {
  background-color: var(--primary-gold) !important;
  color: #000 !important;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  transform: scale(1.1);
}

.step.active .step-title {
  color: var(--primary-gold) !important;
  font-weight: 600;
}

.step:not(.active) .step-number {
  background-color: #374151;
  color: #9CA3AF;
}

.step:not(.active) .step-title {
  color: #6B7280;
}

.step.completed .step-number {
  background-color: #10B981 !important;
  color: white !important;
}

.step.completed .step-title {
  color: #10B981 !important;
}

.step-arrow {
  margin: 0 1rem;
}

/* Responsive design for steps */
@media (max-width: 640px) {
  .step .step-number {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 1rem !important;
  }
  
  .step .step-title {
    font-size: 0.75rem !important;
  }
  
  .step-arrow svg {
    width: 1rem !important;
    height: 1rem !important;
  }
}

/* Service Cards Uniform Height */
#services-container {
  display: grid;
  align-items: stretch; /* Important pour avoir la même hauteur */
}

.service-option {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--primary-gold);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.1);
  transform: scale(1.02);
}

.service-card .service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 50%;
  margin: 0 auto 1rem;
  color: var(--primary-gold);
  flex-shrink: 0;
}

.service-card .service-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Ancien style service-selected supprimé - remplacé par le nouveau badge rond dynamique */

.service-option.selected .service-card {
  border-color: var(--primary-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, #1f2937 100%);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

/* Loading spinner */
.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Responsive adjustments for service cards */
@media (max-width: 768px) {
  .service-card {
    min-height: 350px;
    padding: 1rem;
  }
  
  .service-card .service-icon {
    width: 3rem;
    height: 3rem;
  }
}

/* Payment Method Selection Styles */
.payment-method-option {
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method-option:hover div {
  border-color: var(--primary-gold) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.payment-method-option.selected div {
  border-color: var(--primary-gold) !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, #1f2937 100%);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.payment-method-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}

.payment-container {
  transition: all 0.3s ease;
}

.payment-container.hidden {
  display: none !important;
}

/* Stripe Card Element Styling */
#stripe-card-element {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

#stripe-card-element:focus-within {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

#stripe-card-errors {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

#stripe-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

#stripe-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#stripe-spinner {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* PayPal container consistency */
#paypal-container {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#paypal-button-container {
  margin: 0 auto;
  max-width: 400px;
}

/* Responsive payment method grid */
@media (max-width: 768px) {
  .payment-method-option {
    margin-bottom: 1rem;
  }

  #payment-method-selection .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ===================================
   Before/After Comparison Slider
   =================================== */
.ba-slider {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.ba-slider img {
  pointer-events: none;
}

.ba-slider .ba-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider .ba-before-wrapper {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  transition: none;
}

.ba-slider .ba-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-slider .ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gold);
  cursor: ew-resize;
  z-index: 10;
  transition: none;
}

.ba-slider .ba-handle::before,
.ba-slider .ba-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 30%;
  background: rgba(255, 255, 255, 0.5);
}

.ba-slider .ba-handle::before {
  top: 10px;
}

.ba-slider .ba-handle::after {
  bottom: 10px;
}

.ba-slider .ba-handle > div {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ba-slider:hover .ba-handle > div,
.ba-slider:active .ba-handle > div {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Animation d'indication au chargement */
@keyframes slideHint {
  0%, 100% { left: 50%; }
  25% { left: 35%; }
  75% { left: 65%; }
}

.ba-slider.animate-hint .ba-before-wrapper {
  animation: slideHintBefore 2s ease-in-out;
}

.ba-slider.animate-hint .ba-handle {
  animation: slideHint 2s ease-in-out;
}

@keyframes slideHintBefore {
  0%, 100% { clip-path: inset(0 50% 0 0); }
  25% { clip-path: inset(0 65% 0 0); }
  75% { clip-path: inset(0 35% 0 0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ba-slider {
    height: 250px !important;
  }

  .ba-slider .ba-handle > div {
    width: 40px !important;
    height: 40px !important;
  }

  .ba-slider .ba-handle > div svg {
    width: 20px !important;
    height: 20px !important;
  }
}