/**
 * Styles spécifiques Can-Am
 * Couleurs : Rouge #E53E3E (primaire) + Jaune #FFD700 (accent)
 */

:root {
    --canam-red: #E53E3E;
    --canam-yellow: #FFD700;
    --canam-red-subtle: rgba(229, 62, 62, 0.1);
    --canam-yellow-subtle: rgba(255, 215, 0, 0.1);
}

/* ================================
   HEADER/FOOTER — icônes service rouge/jaune
================================ */

/* Service commercial = rouge */
[aria-label*="commercial"] i.fa-phone {
    color: var(--canam-red) !important;
}

/* Service atelier = jaune */
[aria-label*="atelier"] i.fa-phone,
[aria-label*="carrosserie"] i.fa-phone {
    color: var(--canam-yellow) !important;
}

/* ================================
   FILTRE GAMMES — ARCHIVE VÉHICULES
================================ */
.canam-range-filter {
    position: sticky;
    top: 80px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.canam-range-filter.is-stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Boutons gammes parentes */
.canam-parent-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 16px;
}

.canam-parent-filters::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .canam-parent-filters {
        padding: 2px 0;
        flex-wrap: wrap;
    }
}

.canam-parent-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.canam-parent-btn:hover {
    border-color: var(--canam-red);
    color: var(--canam-red);
}

.canam-parent-btn.active {
    background: var(--canam-red);
    border-color: var(--canam-red);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

/* Accent jaune sur le compteur du bouton actif */
.canam-parent-btn.active .canam-count {
    background: var(--canam-yellow);
    color: #1a1a1a;
}

.canam-parent-btn .canam-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

/* (compteur actif géré au-dessus avec jaune Can-Am) */

/* Sous-gammes (enfants) */
.canam-child-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 16px;
    min-height: 38px;
    align-items: center;
}

.canam-child-filters::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .canam-child-filters {
        padding: 2px 0;
        flex-wrap: wrap;
    }
}

.canam-child-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.canam-child-btn:hover {
    background: var(--canam-red-subtle);
    color: var(--canam-red);
}

.canam-child-btn.active {
    background: var(--canam-red);
    color: white;
    font-weight: 600;
}

/* ================================
   DOUBLE TRAIT ROUGE/JAUNE CAN-AM
   (appliqué au bloc title-subtitle + sections véhicules)
================================ */

/* Bloc title-subtitle : double trait rouge + jaune */
.title-subtitle-block .title-underline {
    position: relative;
}

.title-subtitle-block .title-underline,
.title-subtitle-block .title-underline::after {
    border-radius: 0 !important;
}

.title-subtitle-block .title-underline::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--canam-yellow);
}

/* ================================
   DESCRIPTION-ICONS : icônes rouge/jaune alternées
================================ */

.description-icons-block .space-y-6 > div:nth-child(odd) i {
    color: var(--canam-red) !important;
}

.description-icons-block .space-y-6 > div:nth-child(even) i {
    color: var(--canam-yellow) !important;
}

/* ================================
   ACCENTS JAUNE CAN-AM
================================ */

/* Séparateur de section : bande rouge + bande jaune collées */
.canam-range-section .w-12.h-1 {
    background: var(--canam-red) !important;
    width: 4rem;
    height: 3px !important;
    position: relative;
    border-radius: 0 !important;
}

.canam-range-section .w-12.h-1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--canam-yellow);
}

/* Badge "Essai dispo" en jaune/noir */
.canam-range-section .vehicle-card [style*="rotate(3deg)"] {
    background: var(--canam-yellow) !important;
    color: #1a1a1a !important;
    border-color: var(--canam-yellow) !important;
    font-weight: 700;
}

/* Compteur de modèles avec accent jaune */
.canam-range-section .rounded-full.bg-gray-100 {
    background: var(--canam-yellow-subtle) !important;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Hover sous-gamme avec accent jaune */
.canam-child-btn:hover {
    background: var(--canam-yellow-subtle);
    color: #1a1a1a;
}

/* Bordure basse du filtre sticky */
.canam-range-filter.is-stuck {
    border-bottom-color: var(--canam-yellow);
}

.canam-child-filters .canam-child-sep {
    width: 1px;
    height: 20px;
    background: #e5e7eb;
    flex-shrink: 0;
}

/* Animation des sections */
.canam-range-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.canam-range-section.is-hidden {
    display: none;
}

/* Mobile */
@media (max-width: 767px) {
    .canam-range-filter {
        top: 64px;
        padding: 8px 0;
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
    }

    .canam-parent-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .canam-parent-btn .canam-count {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .canam-child-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Fade edges pour indiquer le scroll horizontal */
    .canam-parent-filters,
    .canam-child-filters {
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
    }
}
