/**
 * Les Bouteilles de Clem - Services Carousel AMÉLIORE
 * Version responsive avec affichage vertical mobile
 */

/* === Container Principal === */
.lbdc-services-carousel-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* === Titre Principal === */
.lbdc-services-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    color: #3d2c2c;
    text-align: center;
    margin-bottom: 50px;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* === Container du Carrousel === */
.lbdc-carousel-container {
    position: relative;
    padding: 0;
}

/* === MASQUER LA NAVIGATION === */
.lbdc-carousel-nav {
    display: none !important;
}

/* === Carrousel Desktop === */
.lbdc-services-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

/* === Wrapper de carte === */
.lbdc-service-card-wrapper {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

/* === Carte de Service === */
.lbdc-service-card {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Overlay sombre avec dégradé */
.lbdc-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.75) 100%
    );
    transition: all 0.4s ease;
    z-index: 1;
}

/* Hover sur la carte */
.lbdc-service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.lbdc-service-card:hover::before {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* === Contenu de la carte === */
.lbdc-service-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 35px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* === Titre === */
.lbdc-service-title {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.3px;
    flex: 1;
    transition: all 0.3s ease;
}

.lbdc-service-card:hover .lbdc-service-title {
    transform: translateX(5px);
}

/* === Icône flèche === */
.lbdc-service-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lbdc-service-card:hover .lbdc-service-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px) rotate(45deg);
    border-color: rgba(255, 255, 255, 0.4);
}

.lbdc-service-icon svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ======================================
   RESPONSIVE - TABLET
   ====================================== */
@media (max-width: 1024px) {
    .lbdc-services-carousel-wrapper {
        padding: 50px 15px;
    }
    
    .lbdc-services-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .lbdc-service-card-wrapper {
        min-height: 400px;
    }
    
    .lbdc-service-card {
        min-height: 400px;
    }
    
    .lbdc-services-title {
        margin-bottom: 40px;
    }
}

/* ======================================
   RESPONSIVE - MOBILE (VERTICAL)
   ====================================== */
@media (max-width: 768px) {
    .lbdc-services-carousel-wrapper {
        padding: 40px 15px;
    }
    
    /* AFFICHAGE VERTICAL - TOUT VISIBLE */
    .lbdc-services-carousel {
        display: flex;
        flex-direction: column;
        gap: 20px;
        overflow: visible;
    }
    
    .lbdc-service-card-wrapper {
        width: 100%;
        flex: none;
        min-height: 350px;
    }
    
    .lbdc-service-card {
        min-height: 350px;
        border-radius: 20px;
    }
    
    .lbdc-service-content {
        padding: 25px 20px;
    }
    
    .lbdc-service-title {
        font-size: 22px;
    }
    
    .lbdc-service-icon {
        width: 45px;
        height: 45px;
    }
    
    .lbdc-service-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .lbdc-services-title {
        margin-bottom: 30px;
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .lbdc-services-carousel-wrapper {
        padding: 30px 10px;
    }
    
    .lbdc-service-card-wrapper {
        min-height: 300px;
    }
    
    .lbdc-service-card {
        min-height: 300px;
        border-radius: 16px;
    }
    
    .lbdc-service-content {
        padding: 20px 15px;
    }
    
    .lbdc-service-title {
        font-size: 18px;
    }
    
    .lbdc-service-icon {
        width: 40px;
        height: 40px;
    }
    
    .lbdc-service-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ======================================
   ANIMATIONS & TRANSITIONS
   ====================================== */

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

.lbdc-service-card-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

/* Délai progressif pour chaque carte */
.lbdc-service-card-wrapper:nth-child(1) { animation-delay: 0.1s; }
.lbdc-service-card-wrapper:nth-child(2) { animation-delay: 0.2s; }
.lbdc-service-card-wrapper:nth-child(3) { animation-delay: 0.3s; }
.lbdc-service-card-wrapper:nth-child(4) { animation-delay: 0.4s; }
.lbdc-service-card-wrapper:nth-child(5) { animation-delay: 0.5s; }
.lbdc-service-card-wrapper:nth-child(6) { animation-delay: 0.6s; }

/* ======================================
   AMÉLIORATIONS ACCESSIBILITÉ
   ====================================== */

/* Focus pour navigation clavier */
.lbdc-service-card:focus {
    outline: 3px solid rgba(139, 111, 111, 0.5);
    outline-offset: 4px;
}

.lbdc-service-card:focus:not(:focus-visible) {
    outline: none;
}

/* Préférence de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .lbdc-service-card,
    .lbdc-service-title,
    .lbdc-service-icon,
    .lbdc-service-card-wrapper {
        animation: none !important;
        transition: none !important;
    }
    
    .lbdc-service-card:hover {
        transform: none !important;
    }
}

/* ======================================
   MODE SOMBRE (si activé)
   ====================================== */

@media (prefers-color-scheme: dark) {
    .lbdc-services-title {
        color: #f5f5f5;
    }
    
    .lbdc-service-card {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }
    
    .lbdc-service-card:hover {
        box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
    }
}

/* ======================================
   OPTIMISATIONS PERFORMANCE
   ====================================== */

/* Forcer l'accélération GPU */
.lbdc-service-card,
.lbdc-service-icon {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimiser le rendu des images */
.lbdc-service-card {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
