/* =============================================
   CAROUSEL MODÈLES v3.3.0 - APPLE-LIKE
   Design minimal, clean, premium
   ============================================= */

/* Container principal - Pleine largeur */
.models-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px;
}

/* Viewport - Pleine largeur disponible */
.carousel-viewport {
    width: 100%;
    overflow: hidden;
}

/* Track - Scroll horizontal natif */
.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    /* Respiration latérale minimale */
    padding: 0 16px 16px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* =============================================
   CARD PREMIUM - CLEAN & STABLE
   ============================================= */

.model-card-premium {
    /* Mobile : carte large et confortable */
    flex: 0 0 calc(90% - 10px);
    max-width: 460px;
    
    /* Scroll snap */
    scroll-snap-align: center;
    scroll-snap-stop: always;
    
    /* Style minimal */
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 18px;
    
    /* Box model */
    box-sizing: border-box;
    
    /* Subtle shadow */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    
    /* Smooth transitions */
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    
    cursor: pointer;
}

/* Hover - Très subtil (Apple-like) */
.model-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Selected - Accent vert élégant */
.model-card-premium.selected {
    border-color: #34c759;
    border-width: 2px;
    background: linear-gradient(to bottom, rgba(52, 199, 89, 0.04), #ffffff);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.15);
}

/* =============================================
   IMAGE CONTAINER - ASPECT RATIO STABLE
   ============================================= */

.model-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    
    /* Grid centering */
    display: grid;
    place-items: center;
    
    /* Style */
    border-radius: 14px;
    background: #f9f9f9;
    overflow: hidden;
    margin-bottom: 16px;
}

.model-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =============================================
   TITRE - TOUJOURS VISIBLE
   ============================================= */

.model-title {
    margin: 0 0 14px;
    padding: 0;
    
    /* Typography */
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    
    /* Layout */
    width: 100%;
    text-align: center;
    
    /* Multi-line support */
    white-space: normal;
    overflow: visible;
    
    /* Min height for stability */
    min-height: 24px;
}

/* =============================================
   BOUTON SÉLECTION - APPLE-LIKE
   ============================================= */

.model-select-btn {
    width: 100%;
    max-width: 100%;
    padding: 13px 20px;
    
    /* Style */
    background: #007aff;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    
    /* Typography */
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    
    /* Interaction */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    
    /* Text */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* iOS feel */
    -webkit-tap-highlight-color: transparent;
}

.model-select-btn:hover {
    background: #0051d5;
}

.model-select-btn:active {
    transform: scale(0.98);
}

/* Selected card button */
.model-card-premium.selected .model-select-btn {
    background: #34c759;
}

.model-card-premium.selected .model-select-btn:hover {
    background: #2fb350;
}

/* =============================================
   DOTS NAVIGATION - APPLE-STYLE
   Discrets, élégants, fonctionnels
   ============================================= */

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 12px 0 4px;
    margin: 0;
}

.carousel-dot {
    /* Size */
    width: 6px;
    height: 6px;
    padding: 0;
    
    /* Style */
    background: rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 999px;
    
    /* Interaction */
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    
    /* iOS feel */
    -webkit-tap-highlight-color: transparent;
    
    /* Accessibility */
    appearance: none;
}

/* Active dot - Plus large et dense (Apple style) */
.carousel-dot.is-active {
    width: 20px;
    background: rgba(0, 0, 0, 0.4);
}

/* Hover (desktop only) */
@media (hover: hover) {
    .carousel-dot:hover {
        opacity: 0.7;
    }
}

/* Focus visible (accessibility) */
.carousel-dot:focus-visible {
    outline: 2px solid #007aff;
    outline-offset: 2px;
}

/* =============================================
   MESSAGE SÉLECTION - CLEAN
   ============================================= */

.etq-selected-info {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.08), rgba(52, 199, 89, 0.04));
    border: 1.5px solid rgba(52, 199, 89, 0.3);
    border-radius: 14px;
    padding: 14px 20px;
    color: #34c759;
    font-weight: 600;
    font-size: 15px;
    margin-top: 20px;
    text-align: center;
    letter-spacing: -0.01em;
}

/* =============================================
   RESPONSIVE - TABLETTE (768px+)
   ============================================= */

@media (min-width: 768px) {
    .models-carousel {
        max-width: 920px;
    }
    
    .model-card-premium {
        flex-basis: calc(48% - 10px);
        max-width: 440px;
    }
    
    .model-title {
        font-size: 19px;
    }
    
    .carousel-track {
        gap: 24px;
        padding: 0 24px 20px;
    }
}

/* =============================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================= */

@media (min-width: 1024px) {
    .models-carousel {
        max-width: 1240px;
    }
    
    .model-card-premium {
        flex-basis: calc(31% - 14px);
        max-width: 400px;
    }
    
    .carousel-track {
        gap: 28px;
        padding: 0 32px 20px;
    }
}

/* =============================================
   RESPONSIVE - LARGE DESKTOP (1280px+)
   ============================================= */

@media (min-width: 1280px) {
    .models-carousel {
        max-width: 1400px;
    }
    
    .model-card-premium {
        flex-basis: calc(24% - 16px);
        max-width: 380px;
    }
}

/* =============================================
   DARK MODE SUPPORT (Optional but nice)
   ============================================= */

@media (prefers-color-scheme: dark) {
    .model-card-premium {
        background: #1c1c1e;
        border-color: rgba(255, 255, 255, 0.12);
    }
    
    .model-card-premium:hover {
        border-color: rgba(255, 255, 255, 0.18);
    }
    
    .model-media {
        background: #2c2c2e;
    }
    
    .model-title {
        color: #f5f5f7;
    }
    
    .carousel-dot {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .carousel-dot.is-active {
        background: rgba(255, 255, 255, 0.5);
    }
}
