:where([class^="ri-"])::before { content: "\f3c2"; }
body {
font-family: 'Tajawal', sans-serif;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.hero-shadow {
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.card-shadow-strong {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}


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

.price-direction {
  direction: ltr !important;
}

/* Animation pour l'indicateur de chargement */
.loading-indicator {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

:root {
  --green-start: #10b981;
  --green-end: #138F5B;
}

/* Styles pour les éléments verts avec dégradé */
.bg-gradient-green {
  background: linear-gradient(135deg, var(--green-start) 0%, var(--green-end) 100%);
}

.text-green {
  color: var(--green-start);
}

.border-green {
  border-color: var(--green-start);
}

.focus-green:focus {
  outline: none;
  border-color: var(--green-start);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/*------------------------------- GESTION DE COULEUR CSS -------------------------------*/
.color-selector {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  gap: 6px;
  z-index: 20;
  transition: all 0.3s ease-in-out;
}

.color-selector:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.color-selector {
  animation: fadeInUp 0.4s ease-out;
}

.color-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  outline: none;
}

.color-btn:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.color-btn.active {
  border: 1px solid #10b981 !important;
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.color-btn[style*="background-color: #ffffff"],
.color-btn[style*="background-color: #f8f9fa"] {
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.color-btn[style*="background-color: #ffffff"]:hover,
.color-btn[style*="background-color: #f8f9fa"]:hover {
  border-color: rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .color-selector {
    bottom: 8px;
    right: 8px;
    padding: 6px;
    gap: 4px;
  }
  
  .color-btn {
    width: 18px;
    height: 18px;
  }
}



/*------------------------------- SWIPER CSS - Amélioré -------------------------------*/

/* Conteneur principal */
.swiper-container {
  width: 100%;
  height: 100%;
}

/* Slide de l'image */
.swiper-slide {
  text-align: center;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Boutons de navigation */
.swiper-button-next,
.swiper-button-prev {
  color: #fff;
  background: rgba(0,0,0,0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.3s ease; /* Ajoute une transition pour l'effet de survol */
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(0,0,0,0.5); /* Assombrit le fond au survol */
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
}

/* Pagination (les points) */
.swiper-pagination {
  display: flex;
  justify-content: center;
  align-items: center; /* **La clé** pour le centrage vertical */
  margin-top: 10px; /* Ajoute un peu d'espace avec la carte */
}

.swiper-pagination-bullet {
  width: 5px; /* Taille par défaut légèrement augmentée pour une meilleure visibilité */
  height: 5px;
  background: #fff;
  opacity: 0.5;
  transition: all 0.3s ease;
  margin: 0 4px; /* Ajoute un espacement horizontal */
}

.swiper-pagination-bullet-active {
  width: 15px; /* Le bullet actif est plus large */
  height: 6px; /* **Garde la même hauteur** pour le centrage */
  background: #fff; /* Couleur du thème */
  opacity: 1;
  border-radius: 4px; /* Arrondi pour un effet "pilule" */
}

/*---------------------------------------------------------------------------*/
/* FilterManager - Styles CSS pour le système de filtrage professionnel */

/* Bouton de toggle principal */
.filter-toggle-btn {
  background: linear-gradient(135deg, var(--green-start) 0%, var(--green-end) 100%);
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.filter-toggle-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--green-end) 0%, #047857 100%);
}

.filter-toggle-btn:active {
  transform: translateY(0);
}

/* Badge de compteur de filtres */
.filter-count-badge {
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  position: absolute;
  top: -8px;
  right: -8px;
  animation: pulse 2s infinite;
}

/* Overlay du panneau de filtrage */
.filter-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-panel-overlay-visible {
  opacity: 1;
}

/* Backdrop avec effet de flou */
.filter-panel-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Panneau principal de filtrage */
.filter-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border: none;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-panel-visible {
  transform: translate(-50%, -50%) scale(1);
}

/* En-tête du panneau */
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: none;
  background: rgba(16, 185, 129, 0.1);
}

.filter-close-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.filter-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
  transform: scale(1.1);
}

/* Contenu du panneau */
.filter-content {
  padding: 1rem;
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

/* Sections de filtrage */
.filter-section {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: rgba(31, 41, 55, 0.5);
  border-radius: 16px;
  border: none;
}

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

/* Titres des sections */
.filter-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-title i {
  color: #10b981;
  font-size: 1.25rem;
}

/* Grille d'options de filtrage */
.filter-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
  gap: 1rem;
}

/* Boutons de filtrage */
.brand-filter-btn,
.status-filter-btn,
.sort-filter-btn {
  background: transparent;
  border: none;
  border-radius: 15px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  color: #d1d5db;
}

/* Styles au survol (hover) */
.brand-filter-btn:hover,
.status-filter-btn:hover,
.sort-filter-btn:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.05);
  background-color: #0b835b7f !important
}

/* Styles pour les boutons actifs */
.brand-filter-btn.active,
.status-filter-btn.active,
.sort-filter-btn.active {
  background-color: transparent;
}

.brand-filter-btn.active,
.status-filter-btn.active,
.sort-filter-btn.active,
.brand-filter-btn.active .brand-name,
.status-filter-btn.active .status-name,
.sort-filter-btn.active .sort-name {
  color: #10b981;
}

/* Styles pour les logos et icônes */
.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8);
  transition: all 0.3s ease;
}

/* Correction : Appliquer un filtre pour que le logo devienne vert uni */
.brand-filter-btn.active .brand-logo {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
  transform: scale(1.1);
}

.brand-filter-btn.active .brand-logo {
  filter: invert(55%) sepia(95%) saturate(500%) hue-rotate(120deg);
  transform: scale(1.1);
}

.status-filter-btn.active .status-icon i,
.sort-filter-btn.active .sort-icon i {
  filter: none;
  color: #10b981;
  transform: scale(1.1);
}

/* Section actions */
.filter-actions {
  display: flex;
  flex-direction: row; /* Modifié pour une orientation horizontale */
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.reset-filter-btn,
.apply-filter-btn {
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 140px;
}

.reset-filter-btn {
  color: #d1d5db;
  background-color: #374151;
}

.reset-filter-btn:hover {
  background-color: #4b5563;
  transform: translateY(-1px);
}

.apply-filter-btn {
  background: linear-gradient(135deg, var(--green-start) 0%, var(--green-end) 100%);
  color: white;
}

.apply-filter-btn:hover {
  background: #0B835B;
  transform: translateY(-1px);
}

/* Media Queries */
@media (min-width: 640px) {
  .filter-actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .filter-panel {
    max-width: 95%;
  }

  .filter-options-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .sort-name {
    font-size: 0.7rem;
    line-height: 1.1;
  }

    /* Réduit la hauteur de l'en-tête sur les écrans plus petits */
  .filter-header {
    padding: 0.5rem 1.5rem; /* Ajustez ces valeurs pour obtenir la hauteur désirée */
  }
}


/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.filter-section {
  animation: fadeInUp 0.4s ease-out;
}

/* Scrollbar personnalisée pour le contenu */
.filter-content::-webkit-scrollbar,
.whatsapp-content::-webkit-scrollbar {
  width: 6px;
}

.filter-content::-webkit-scrollbar-track,
.whatsapp-content::-webkit-scrollbar-track {
  background: rgba(55, 65, 81, 0.5);
  border-radius: 10px;
}

.filter-content::-webkit-scrollbar-thumb,
.whatsapp-content::-webkit-scrollbar-thumb {
  background-color: #10b981;
  border-radius: 10px;
  border: 1px solid #1f2937;
}

.filter-content::-webkit-scrollbar-thumb:hover,
.whatsapp-content::-webkit-scrollbar-thumb:hover {
  background-color: #059669;
}

/* Dégradé de l'en-tête de la modale WhatsApp */
.whatsapp-header-gradient {
    background: rgba(16, 185, 129, 0.1);
}

.whatsapp-icon {
  color: #10b981;
}

/* Fond de la modale WhatsApp */
.whatsapp-modal-background {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    overflow: hidden;
}

.whatsapp-submit-btn {
    background: linear-gradient(135deg, var(--green-start) 0%, var(--green-end) 100%);
}

.whatsapp-submit-btn:hover {
  background-color: #0B835B;
}

:root {
  --green-start: #10b981;
  --green-end: #138F5B;
}



/* Amélioration de l'expérience tactile sur mobile */
.brand-filter-btn,
.status-filter-btn,
.sort-filter-btn {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Prévenir les sélections accidentelles lors du défilement */
.filter-content {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Améliorer la zone de toucher sur mobile */
@media (max-width: 768px) {
  .brand-filter-btn,
  .status-filter-btn,
  .sort-filter-btn {
    min-height: 44px;
    padding: 8px 12px;
  }
  
  /* Espacement supplémentaire entre les boutons sur mobile */
  .filter-options-grid {
    gap: 12px;
  }
}

/* Animations de fermeture pour les modales */
@keyframes fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slide-down {
  from { transform: translateY(0); }
  to { transform: translateY(100vh); }
}

.animate-fade-out {
  animation: fade-out 0.3s forwards;
}

.animate-slide-down {
  animation: slide-down 0.3s forwards;
}