/**
 * Carrousel Personnalisé - Styles CSS
 * Fichier: css/of-custom-carrousel.css dans votre thème enfant
 */

.zellige-carrousel-section {
    width: 100%;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

.zellige-carrousel-section .carrousel-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    font-weight: 600;
}

.zellige-carrousel-container {
    position: relative;
    padding: 0 60px;
}

.zellige-carrousel {
    overflow: hidden;
    width: 100%;
}

.zellige-carrousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease-in-out;
}

.zellige-carrousel-item {
    flex: 0 0 calc(25% - 15px);
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zellige-carrousel-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.zellige-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.zellige-carrousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zellige-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zellige-link:hover .zellige-overlay {
    opacity: 1;
}

.zellige-view-text {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.zellige-link:hover .zellige-view-text {
    background: white;
    color: #333;
}

/* Boutons de navigation */
.carrousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrousel-btn:hover:not(:disabled) {
    background: #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.carrousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carrousel-btn span {
    font-size: 2rem;
    line-height: 1;
    color: #333;
    transition: color 0.3s ease;
}

.carrousel-btn:hover:not(:disabled) span {
    color: white;
}

.carrousel-btn-prev {
    left: 0;
}

.carrousel-btn-next {
    right: 0;
}

/* Points de navigation */
.carrousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carrousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carrousel-dot:hover {
    border-color: #999;
}

.carrousel-dot.active {
    background: #333;
    border-color: #333;
}

/* Messages d'erreur */
.carrousel-error,
.zellige-carrousel-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .zellige-carrousel-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 767px) {
    .zellige-carrousel-section .carrousel-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .zellige-carrousel-container {
        padding: 0 50px;
    }
    
    .zellige-carrousel-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .carrousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carrousel-btn span {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .zellige-carrousel-section {
        margin: 40px auto;
    }
    
    .zellige-carrousel-container {
        padding: 0 45px;
    }
    
    .zellige-carrousel-item {
        flex: 0 0 100%;
    }
    
    .zellige-carrousel-track {
        gap: 0;
    }
    
    .carrousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .carrousel-btn span {
        font-size: 1.25rem;
    }
    
    .zellige-view-text {
        font-size: 0.875rem;
        padding: 10px 20px;
    }
}