/**
 * Styles pour le bloc "Nos marques"
 * 
 * À placer dans : /blocks/brands/style.css
 */

/* ========================================
   STYLES DE BASE POUR LES LOGOS
   ======================================== */

/* Amélioration des transitions pour les logos cliquables */
.brands-block a.cursor-pointer {
    transition: all 0.3s ease-in-out;
}

.brands-block a.cursor-pointer:hover {
    box-shadow: 0 4px 6px -1px rgba(102, 70, 255, 0.1), 0 2px 4px -1px rgba(102, 70, 255, 0.06);
    transform: translateY(-1px);
}

/* Styles pour l'accessibilité */
.brands-block a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Animation des logos au hover */
.brands-block .group-hover\:scale-105 {
    transition: transform 0.2s ease-in-out;
}

/* Mode logos en niveaux de gris */
.brands-block .brands-black-mode {
    filter: grayscale(90%);
    transition: all 0.3s ease-in-out;
}

/* Hover pour le mode niveaux de gris : retour aux couleurs + zoom */
.brands-block .group:hover .brands-black-mode,
.brands-block .brands-black-mode:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Pour les logos sans lien en mode niveaux de gris */
.brands-block .brands-black-mode:not(.group *):hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ========================================
   TAILLES RESPONSIVE DES LOGOS
   ======================================== */

/* Mobile */
@media (max-width: 640px) {
    .brands-block .grid img {
        min-width: 70px;
        min-height: 70px;
    }
    
}

/* Small screens */
@media (min-width: 640px) {
    .brands-block img {
        max-width: 96px; /* w-24 */
        max-height: 96px; /* h-24 */
    }
}

/* Medium screens */
@media (min-width: 768px) {
    .brands-block img {
        max-width: 112px; /* w-28 */
        max-height: 112px; /* h-28 */
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .brands-block img {
        max-width: 112px; /* w-28 */
        max-height: 112px; /* h-28 */
    }
}

/* Extra large screens */
@media (min-width: 1280px) {
    .brands-block img {
        max-width: 128px; /* w-32 */
        max-height: 128px; /* h-32 */
    }
}

/* ========================================
   ALIGNEMENTS GUTENBERG
   ======================================== */

.brands-block.alignwide,
.brands-block.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
}

/* ========================================
   STYLES POUR LE MODE SLIDER
   ======================================== */

/* Boutons de navigation */
.brands-block .brands-nav-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(107, 114, 128, 0.15);
    border: 1px solid rgba(107, 114, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    position: relative;
    z-index: 152;
}

.brands-block .brands-nav-button:hover {
    background: rgba(107, 114, 128, 0.25);
    border-color: rgba(107, 114, 128, 0.3);
    opacity: 1;
    transform: scale(1.05);
}

.brands-block .brands-nav-button:active {
    transform: scale(0.95);
}

.brands-block .brands-nav-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Barre de progression */
.brands-block .brands-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1f2937 0%, #374151 100%);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
}

/* Animation de pulsation pour la barre de progression */
@keyframes brandProgressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.brands-block .brands-progress-fill {
    animation: brandProgressPulse 2s ease-in-out infinite;
}

/* Track du slider */
.brands-block .brands-track {
    transition: transform 0.5s ease-out;
}

/* Éléments du slider */
.brands-block .brand-item {
    flex-shrink: 0;
}

/* ========================================
   CORRECTIONS MOBILE POUR LE SLIDER
   ======================================== */

@media (max-width: 767px) {
    /* Boutons de navigation plus petits sur mobile */
    
    /* Barre de progression - corrections spécifiques mobile */
    .brands-block .brands-progress-fill {
        display: block !important;
        height: 100% !important;
        background: linear-gradient(90deg, #1f2937 0%, #374151 100%) !important;
        transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        animation: none !important; /* Pas d'animation sur mobile */
        min-width: 0 !important;
        max-width: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 2px !important;
    }
    
    /* Container de la barre de progression */
    .brands-block .flex-1.mx-5 {
        flex: 1 1 auto !important;
        margin-left: 1.25rem !important;
        margin-right: 1.25rem !important;
        min-width: 0 !important;
    }
    
    /* Background de la barre de progression */
    .brands-block .h-\[3px\] {
        height: 3px !important;
        width: 100% !important;
        display: block !important;
        background-color: #e5e7eb !important;
        border-radius: 2px !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* Container navigation */
    .brands-block .flex.items-center.justify-between.mt-8 {
        margin-top: 1.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        gap: 0.5rem !important;
    }
    
    /* Annuler les classes Tailwind conflictuelles */
    .brands-block .brands-progress-fill.bg-gradient-to-r,
    .brands-block .brands-progress-fill.from-gray-800,
    .brands-block .brands-progress-fill.to-gray-600 {
        background: linear-gradient(90deg, #1f2937 0%, #374151 100%) !important;
    }
    
    .brands-block .brands-progress-fill.animate-pulse {
        animation: none !important;
    }
    
}

/* ========================================
   DARK MODE
   ======================================== */

@media (prefers-color-scheme: dark) {
    .brands-block a,
    .brands-block div:not(.group) {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .brands-block a.cursor-pointer:hover {
        background-color: #1f2937;
        border-color: #6646ff !important;
        box-shadow: 0 4px 6px -1px rgba(102, 70, 255, 0.2), 0 2px 4px -1px rgba(102, 70, 255, 0.1);
    }
}