/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #1e293b;
}

/* Services Section */
.services-section {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

/* Animated Background */
.animated-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  animation: backgroundShift 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Countdown Section */
.countdown-wrapper {
  text-align: center;
  margin-bottom: 64px;
}

.countdown-title {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #092031 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.countdown-subtitle {
  font-size: 18px;
  color: #64748b;
  margin-bottom: 40px;
  font-weight: 500;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.countdown-item {
  background: white;
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 120px;
}

.countdown-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.countdown-value {
  font-size: 48px;
  font-weight: 700;
  color: #092031;
  line-height: 1;
  display: block;
}

.countdown-label {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  display: block;
}

.countdown-separator {
  font-size: 32px;
  font-weight: 700;
  color: #94a3b8;
  display: none;
}

/* Services Slider */
.services-slider {
  position: relative;
}

.slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  margin-bottom: 48px;
}

/* Hide scrollbar but keep functionality */
.slider-track::-webkit-scrollbar {
  height: 8px;
}

.slider-track::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 4px;
}

.slider-track::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

.slider-track::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Service Card */
/* ========================================================= */
/* BASE DES CARTES (À UTILISER DANS VOTRE CSS GLOBAL) */
/* ========================================================= */
.service-card {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Essentiel pour le flexbox et l'alignement */
  display: flex;
  flex-direction: column;
  
  overflow: hidden;
  flex-shrink: 0; /* Empêche les cartes de rétrécir */
  
  /* --- GESTION DE LA TAILLE PC PAR DÉFAUT --- */
  /* Ici, nous définissons la largeur pour les grands écrans (3 cartes visibles) */
  /* NOTE: Le '24px' est l'espacement (gap) défini dans .slider-track */
  min-width: calc((50% - 24px) / 2); /* (100% - 2*Gap) / 3 cartes */
  width: 395px; /* Largeur fixe pour les grands écrans */
  
  /* --- GESTION OPTIONNELLE DE LA HAUTEUR (pour l'uniformité) --- */
  min-height: 450px; /* Définir une hauteur minimale si les contenus varient */
}

/* ========================================================= */
/* MEDIA QUERIES (POUR GÉRER LA TAILLE RESPONSIVE) */
/* ========================================================= */

/* 1. Tablettes et Écrans Moyens (769px à 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 2 cartes visibles par page */
    .service-card {
        /* Formule : (100% - 1*Gap) / 2 cartes */
        min-width: calc((100% - 24px) / 2); 
    }
}

/* 2. Mobile (768px et moins) */
@media (max-width: 768px) {
    /* 1 carte visible par page */
    .service-card {
        /* 90% de la largeur du conteneur, laissant 5% de marge de chaque côté */
        min-width: 90%; 
    }
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2e7a7e 0%, #6366f1 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card.featured {
  border: 2px solid #e0e7ff;
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #092031 0%, #72F3FA 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.3s ease;
}

.service-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-icon i {
  font-size: 30px;
  color: #092031;
}

.card-title {
  font-size: 27px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 20px;
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
}

.card-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: #475569;
}

.card-features i {
  color: #72F3FA;
  font-size: 16px;
  flex-shrink: 0;
}

/* ========================================================= */
/* STYLE DU LIEN "DÉCOUVRIR" / .card-link */
/* ========================================================= */

.service-card .card-link {
    /* Style de base pour agir comme un bouton */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    margin-top: 20px; /* Ajoute un espace au-dessus si nécessaire */
    
    /* Couleurs et bordure */
    background-color: var(--primary-color);
    color: var(--text-light); /* Texte blanc/clair sur fond primaire */
    border: 2px solid var(--primary-color);
    border-radius: 50px; /* Coins très arrondis (Pill button) */
    
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

/* Positionnement de l'icône */
.service-card .card-link i {
    margin-left: 10px;
    font-size: 0.9em;
    transition: transform 0.3s;
}

/* Effet au survol (Hover Effect) */
.service-card .card-link:hover {
    background-color: transparent; /* Inverse les couleurs */
    color: var(--primary-color); /* Le texte devient bleu */
    transform: translateY(-2px); /* Léger soulèvement */
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.2); /* Ombre subtile */
}

/* Animation de la flèche au survol */
.service-card .card-link:hover i {
    transform: translateX(3px); /* La flèche bouge légèrement vers la droite */
}

/* Si vous aviez déjà des styles .learn-more, assurez-vous de les remplacer ou de les cibler correctement */
/* Dans votre HTML, il semblait que vous aviez .learn-more. Si c'est le cas, utilisez cette classe à la place : */
/*
.service-card .learn-more {
    ... Styles ci-dessus ...
}
.service-card .learn-more:hover {
    ... Hover styles ci-dessus ...
}
*/

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: white;
  color: #092031;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
}

.slider-btn:hover {
  background: #092031;
  color: white;
  border-color: #092031;
  transform: scale(1.1);
}

.slider-btn:active {
  transform: scale(0.95);
}

.slider-dots {
  display: flex;
  gap: 12px;
  align-items: center;
}

.slider-wrapper {
    display: flex;
    gap: 30px; /* Assurez-vous que cette valeur correspond à celle dans le JS (const gap) */
    
    /* Permet le défilement horizontal sans coupure */
    width: fit-content; 
    
    /* Active la transition CSS pour le mouvement fluide */
    transition: transform 0.5s ease-in-out; /* Réglez la durée de transition ici */
    
    /* Désactive le défilement par défaut (nativement) si vous voulez un contrôle total par JS */
    overflow-x: hidden; 
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 32px;
  border-radius: 6px;
  background: #092031;
}

.dot:hover {
  background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .services-section {
    padding: 48px 0;
  }

  .countdown-title {
    font-size: 36px;
  }

  .countdown-subtitle {
    font-size: 16px;
  }

  .countdown-item {
    padding: 16px 24px;
    min-width: 90px;
  }

  .countdown-value {
    font-size: 36px;
  }

  .countdown-label {
    font-size: 12px;
  }

  /* <CHANGE> Adjusted mobile card width */
  

  .countdown-separator {
    display: none;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* <CHANGE> Adjusted tablet card width */
  .service-card {
    min-width: 280px;
    min-height: 100px;
  }
}

@media (min-width: 1025px) {
  /* <CHANGE> Adjusted desktop card width */
  .service-card {
    min-width: 300px;
    min-height: 100px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.slider-btn:focus-visible,
.card-link:focus-visible,
.dot:focus-visible {
  outline: 2px solid #092031;
  outline-offset: 2px;
}
