/* Cartes de services */
.service-card {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(179, 136, 255, 0.2);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(179, 136, 255, 0.4);
    border: 1px solid rgba(179, 136, 255, 0.5);
}

.service-icon {
    transition: all 0.3s ease;
}

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

/* Bordures animées */
.animated-border {
    position: relative;
    border: 1px solid rgba(179, 136, 255, 0.3);
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b388ff);
    animation: animate 3s linear infinite;
}

/* Formulaires */
.form-input {
    background-color: #121212;
    border: 1px solid rgba(179, 136, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #b388ff;
    box-shadow: 0 0 0 3px rgba(179, 136, 255, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Boutons */
.btn-primary {
    background: linear-gradient(135deg, #b388ff 0%, #9b6dff 100%);
    color: #121212;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(179, 136, 255, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(179, 136, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #b388ff;
    color: #b388ff;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #b388ff;
    color: #121212;
}

/* Cartes d'information */
.info-card {
    background: rgba(45, 45, 45, 0.7);
    border: 1px solid rgba(179, 136, 255, 0.2);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Calendrier Google */
.calendar-wrapper {
    background: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(179, 136, 255, 0.2);
    border: 1px solid rgba(179, 136, 255, 0.3);
}

.calendar-wrapper iframe {
    background-color: #ffffff !important;
    border: none;
    border-radius: 0.75rem;
}

.info-card:hover {
    border-color: rgba(179, 136, 255, 0.4);
    box-shadow: 0 0 15px rgba(179, 136, 255, 0.2);
}

/* Avantages */
.advantage-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(179, 136, 255, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(179, 136, 255, 0.2);
    margin-bottom: 1rem;
    cursor: pointer;
}

.advantage-item svg {
    color: #b388ff;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.advantage-item.active {
    background: rgba(179, 136, 255, 0.18);
    border-color: rgba(179, 136, 255, 0.5);
}

/* Contact info */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.7);
    border-radius: 0.5rem;
    border: 1px solid rgba(179, 136, 255, 0.2);
    margin-bottom: 1rem;
}

.contact-info-item svg {
    color: #b388ff;
    margin-top: 0.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Footer */
.footer-link {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #b388ff;
}

/* Social media icons */
.social-icon {
    color: #9ca3af;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: #b388ff;
    transform: translateY(-2px);
}

/* Newsletter form */
.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-input {
    flex: 1;
    background: #2d2d2d;
    border: 1px solid rgba(179, 136, 255, 0.3);
    border-radius: 0.5rem 0 0 0.5rem;
    padding: 0.5rem 1rem;
    color: #ffffff;
}

.newsletter-button {
    background: #b388ff;
    color: #121212;
    padding: 0.5rem 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    background: #9b6dff;
}

/* Scroll lock when overlay is open */
.no-scroll {
    overflow: hidden;
}

/* Breakpoint spécifique pour iPhone et petits écrans */
@media (max-width: 480px), (max-device-width: 480px) {
    .services-slider-container {
        padding: 0 24px; /* espace pour les flèches */
        min-height: 450px;
    }
    
    /* Carte légèrement réduite et centrée avec bordures stylisées */
    .service-card-mobile {
        width: 92%;
        max-width: 340px; 
        margin: 0 auto;
        padding: 0.9rem;
        /* Ajout des mêmes bordures que la version desktop */
        border: 1px solid rgba(179, 136, 255, 0.2);
        border-radius: 15px;
        transition: all 0.3s ease;
    }
    
    /* Hover effect pour les cartes mobile */
    .service-card-mobile:hover {
        border-color: rgba(179, 136, 255, 0.5);
        box-shadow: 0 0 15px rgba(179, 136, 255, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 2rem;
    }
    
    .info-card {
        margin-bottom: 2rem;
    }
    
    .contact-info-item {
        margin-bottom: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input,
    .newsletter-button {
        border-radius: 0.5rem;
    }
    
    /* Réduction de l'espacement vertical de la section services sur mobile */
    #services {
        padding-top: 2rem !important;    /* 32px au lieu de 64px */
        padding-bottom: 2rem !important; /* 32px au lieu de 64px */
    }
} 

/* Services Slider Styles */
.services-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    min-height: 350px; /* Ensure consistent height */
    padding: 0 16px; /* plus de flèches, padding réduit */
}

/* Chatbot mobile fullscreen overlay */
@media (max-width: 768px) {
    #chatbot-interface.chat-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh; /* better on mobile keyboards */
        z-index: 50; /* above nav z-10 */
        background: #121212; /* solid dark */
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
        display: flex;
        flex-direction: column;
    }

    #chatbot-interface.chat-overlay .info-card {
        /* Make the card fill the viewport and become a flex column */
        flex: 1;
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 0; /* flush edges in fullscreen */
        border-left: none;
        border-right: none;
        padding: 0; /* header/input have their own padding */
        background: transparent;
        border: none;
    }

    #chatbot-interface.chat-overlay .chat-header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: rgba(179, 136, 255, 0.08);
        padding: 1rem;
        border-bottom: 1px solid rgba(179, 136, 255, 0.2);
    }

    #chatbot-interface.chat-overlay .chat-messages {
        flex: 1;
        max-height: none; /* override */
        overflow-y: auto;
        padding: 1rem;
    }

    #chatbot-interface.chat-overlay .chat-input {
        position: sticky;
        bottom: 0;
        z-index: 1;
        padding: 1rem;
        border-top: 1px solid rgba(179, 136, 255, 0.2);
        background: rgba(18, 18, 18, 0.98);
    }

    #chatbot-interface.chat-overlay .chat-textarea {
        /* Ensure good tap targets and avoid jump when keyboard opens */
        min-height: 48px;
        max-height: 160px; /* allow a bit more lines in fullscreen */
    }
}

.services-slider {
    display: flex;
    transition: transform 0.5s ease-out;
    width: 300%; /* 3 slides × 100% pour assurer la visibilité de toutes les cartes */
}

.service-slide {
    /* Centre la carte dans le slide et évite qu'elle ne colle aux bords */
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 100%;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Empêche tout débordement latent dans le slide */
}

/* Navigation arrows removed */
.slider-nav-btn, .slider-nav-prev, .slider-nav-next {
    display: none !important;
}

/* Mobile touch feedback - Always visible on mobile */
@media (max-width: 768px), (max-device-width: 768px) {
    .services-slider-container { padding: 0 16px; }
    
    .service-slide {
        flex: 0 0 100%; /* Force chaque slide à prendre exactement 100% */
        min-width: 100%; /* Force la largeur minimale */
        max-width: 100%; /* Force la largeur maximale */
        padding: 0 0.25rem; /* Réduit de 0.5rem à 0.25rem */
    }
    
    /* Alignement à gauche des paragraphes de description sur mobile */
    .service-card-mobile p.text-gray-300.mb-4.text-center.text-sm {
        text-align: left;
    }
    
    /* Bordures stylisées pour tablettes et mobile */
    .service-card-mobile {
        border: 1px solid rgba(179, 136, 255, 0.2);
        border-radius: 15px;
        transition: all 0.3s ease;
    }
    
    .service-card-mobile:hover {
        border-color: rgba(179, 136, 255, 0.5);
        box-shadow: 0 0 15px rgba(179, 136, 255, 0.3);
    }
    
    .slider-nav-btn, .services-slider-container:active .slider-nav-btn { display: none !important; }
}

/* FINAL mobile overrides (placed last to win the cascade on iPhone) */
@media (max-width: 480px), (max-device-width: 480px) {
  .services-slider-container { padding: 0 24px !important; }
  .service-slide { padding: 0 !important; align-items: center !important; }
  .service-card-mobile {
    width: 92% !important;
    max-width: 330px !important;
    margin: 0 auto !important;
    padding: 0.9rem !important;
    height: auto !important;
  }
}

/* Fade animation for slides */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-slide {
    animation: slideFadeIn 0.5s ease-out;
}

/* Glow effect for navigation arrows */
.slider-nav-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #b388ff, #9b6dff, #7c4dff, #b388ff);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-nav-btn:hover::before {
    opacity: 0.3;
    animation: rotate 2s linear infinite;
}

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

/* Touch indicator */
.services-slider-container::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(179, 136, 255, 0.3);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.services-slider-container:active::after {
    opacity: 1;
} 

/* ============================================
   3D Card Effect for Services — Premium Flip
   ============================================ */
.service-card-3d {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  perspective: 1200px;
}

.card {
  overflow: visible;
  width: 100%;
  height: 100%;
  max-width: 350px;
  cursor: pointer;
}

.content {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.6s ease;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(179, 136, 255, 0.1);
  border-radius: 16px;
  position: relative;
}

/* Glow edge on hover */
.content::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(179, 136, 255, 0.4), rgba(155, 109, 255, 0.1), rgba(79, 195, 247, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.card:hover .content::before {
  opacity: 1;
}

.card:hover .content {
  transform: rotateY(180deg);
  box-shadow: 
    0 20px 60px rgba(179, 136, 255, 0.25),
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(179, 136, 255, 0.3);
}

.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}

/* Front face — subtle gradient bg */
.front {
  transform: rotateY(0deg);
  color: white;
  background: linear-gradient(160deg, #2d2d2d 0%, #1e1e1e 100%);
  border: 1px solid rgba(179, 136, 255, 0.15);
}

/* Shimmer effect on front */
.front::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(179, 136, 255, 0.05),
    rgba(179, 136, 255, 0.1),
    rgba(179, 136, 255, 0.05),
    transparent
  );
  transition: left 0.8s ease;
  pointer-events: none;
}

.card:hover .front::after {
  left: 150%;
}

.front .front-content {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-footer {
  color: rgba(255, 255, 255, 0.35);
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* Back face — richer background */
.back {
  width: 100%;
  height: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  overflow: hidden;
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #2a2040 0%, #1e1e2e 40%, #1e1e1e 100%);
  border: 1px solid rgba(179, 136, 255, 0.25);
}

.back-content {
  position: absolute;
  width: 99%;
  height: 99%;
  border-radius: 15px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

/* Service icon hover lift */
.service-card-3d .service-icon {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(179, 136, 255, 0.3);
}

/* CTA button on back face */
.back-content a {
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(179, 136, 255, 0.2);
}

.back-content a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 136, 255, 0.4);
}

/* Floating animation for idle state */
@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(6px); }
  100% { transform: translateY(0px); }
}

/* Mobile horizontal swipe — reusable component */
@media (max-width: 767px) {
  .mobile-swipe {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 12px;
    scrollbar-width: none;
  }

  .mobile-swipe::-webkit-scrollbar {
    display: none;
  }

  .mobile-swipe > * {
    scroll-snap-align: center;
    flex-shrink: 0;
    width: 85vw;
    max-width: 340px;
  }

  /* Dots indicator hint */
  .swipe-hint {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
  }

  .swipe-hint .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(179, 136, 255, 0.25);
    transition: background 0.3s;
  }

  .swipe-hint .dot.active {
    background: rgba(179, 136, 255, 0.8);
  }
}

@media (min-width: 768px) {
  .swipe-hint {
    display: none !important;
  }
}

/* Logo carousel — infinite scroll */
.logo-carousel-track {
  animation: logo-scroll 25s linear infinite;
  width: max-content;
}

.logo-carousel-track:hover {
  animation-play-state: paused;
}

@keyframes logo-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Hide 3D cards on mobile — slider used instead */
@media (max-width: 767px) {
  .service-card-3d {
    display: none;
  }
}

/* Styles du formulaire de contact */
.form-input {
    @apply w-full px-4 py-3 bg-dark-light border border-brand/30 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-brand/50 focus:border-brand transition-all duration-300;
}

/* Styles spécifiques pour le textarea du chat */
.chat-textarea {
    min-height: 48px; /* Hauteur d'une ligne */
    max-height: 120px; /* Hauteur de 4 lignes environ */
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    transition: height 0.2s ease;
    font-family: inherit;
    font-size: inherit;
}

.chat-textarea::-webkit-scrollbar {
    width: 4px;
}

.chat-textarea::-webkit-scrollbar-track {
    background: rgba(179, 136, 255, 0.1);
    border-radius: 2px;
}

.chat-textarea::-webkit-scrollbar-thumb {
    background: rgba(179, 136, 255, 0.4);
    border-radius: 2px;
}

.chat-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(179, 136, 255, 0.6);
}

.form-input:focus {
    @apply border-brand shadow-lg shadow-brand/20;
}

.form-input.error {
    @apply border-red-500 border-2;
}

.form-input.error:focus {
    @apply ring-red-500/50 border-red-500;
}

/* Bouton du formulaire */
.btn-primary {
    @apply px-8 py-3 bg-gradient-to-r from-brand to-brand-dark text-white font-medium rounded-lg transition-all duration-300 hover:shadow-lg hover:shadow-brand/20 hover:scale-105 focus:outline-none focus:ring-2 focus:ring-brand/50;
}

.btn-primary:disabled {
    @apply opacity-70 cursor-not-allowed hover:scale-100 hover:shadow-none;
}

/* Bouton de la popup de succès */
.success-popup-button {
    transition: all 0.3s ease;
}

.success-popup-button:hover {
    background-color: #b388ff !important;
    border-color: #b388ff !important;
    color: white !important;
}

.success-popup-button:hover svg {
    stroke: white !important;
}

/* Animations pour les notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    animation: slideInRight 0.3s ease-out;
}

.notification.removing {
    animation: slideOutRight 0.3s ease-in;
}

/* Responsive pour le formulaire */
@media (max-width: 768px) {
    .form-input {
        @apply px-3 py-2 text-sm;
    }
    
    .btn-primary {
        @apply px-6 py-2 text-sm;
    }
} 