/**
 * UX Enhancements - Styles
 */

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

/* Animation keyframes */
@keyframes wcpc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wcpc-slide-in-right {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes wcpc-slide-in-left {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes wcpc-slide-in-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes wcpc-scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes wcpc-bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wcpc-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wcpc-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes wcpc-check-mark {
    0% { stroke-dashoffset: 50; }
    100% { stroke-dashoffset: 0; }
}

@keyframes wcpc-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Animation classes */
.wcpc-animate-fade-in {
    animation: wcpc-fade-in 0.3s ease-out forwards;
}

.wcpc-animate-slide-right {
    animation: wcpc-slide-in-right 0.3s ease-out forwards;
}

.wcpc-animate-slide-left {
    animation: wcpc-slide-in-left 0.3s ease-out forwards;
}

.wcpc-animate-slide-up {
    animation: wcpc-slide-in-up 0.3s ease-out forwards;
}

.wcpc-animate-scale {
    animation: wcpc-scale-in 0.2s ease-out forwards;
}

.wcpc-animate-bounce {
    animation: wcpc-bounce-in 0.4s ease-out forwards;
}

/* Animation speed variants */
.wcpc-animation-slow .wcpc-animate-fade-in,
.wcpc-animation-slow .wcpc-animate-slide-right,
.wcpc-animation-slow .wcpc-animate-slide-left,
.wcpc-animation-slow .wcpc-animate-slide-up {
    animation-duration: 0.5s;
}

.wcpc-animation-fast .wcpc-animate-fade-in,
.wcpc-animation-fast .wcpc-animate-slide-right,
.wcpc-animation-fast .wcpc-animate-slide-left,
.wcpc-animation-fast .wcpc-animate-slide-up {
    animation-duration: 0.15s;
}

/* Disable animations */
.wcpc-no-animations *,
.wcpc-no-animations *::before,
.wcpc-no-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* ============================================
   GRILLE DE PRODUITS - NOMBRE DE COLONNES
   ============================================ */

/* Colonnes configurables via data-attribute */
.wcpc-configurator[data-columns="2"] .wcpc-options-grid {
    --wcpc-columns: 2 !important;
}

.wcpc-configurator[data-columns="3"] .wcpc-options-grid {
    --wcpc-columns: 3 !important;
}

.wcpc-configurator[data-columns="4"] .wcpc-options-grid {
    --wcpc-columns: 4 !important;
}

.wcpc-configurator[data-columns="5"] .wcpc-options-grid {
    --wcpc-columns: 5 !important;
}

.wcpc-configurator[data-columns="6"] .wcpc-options-grid {
    --wcpc-columns: 6 !important;
}

/* ============================================
   WIZARD MODE - STEPPER HORIZONTAL
   Force override du style de base avec !important
   ============================================ */

/* CACHER LES ÉTAPES CONDITIONNELLES dans le stepper */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.wcpc-progress-step-hidden {
    display: none !important;
}

/* CACHER LE CONNECTEUR de la dernière étape visible ou si pas de suivant visible */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.wcpc-last-visible::after,
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.wcpc-no-connector::after {
    display: none !important;
}

/* Container en mode wizard */
.wcpc-configurator.wcpc-wizard-mode {
    /* On garde le layout du configurateur tel quel */
}

/* Barre de progression */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress {
    margin-bottom: 30px !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Cacher la barre de remplissage */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-bar {
    display: none !important;
}

/* Container des étapes - RESET COMPLET + nouveau style */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-steps {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 0 !important;
    padding: 30px 50px !important;
    background: #f1f5f9 !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    margin: 0 auto !important;
    max-width: 100% !important;
}

/* Chaque étape - RESET COMPLET + nouveau style vertical */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 50px !important;
    margin: 0 !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    min-width: 150px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    white-space: normal !important;
}

/* Reset hover du style de base */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step:hover {
    background: transparent !important;
    border: none !important;
}

/* Connecteur horizontal entre les étapes */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    top: 24px !important;
    left: calc(50% + 35px) !important;
    width: calc(100% - 70px) !important;
    height: 4px !important;
    background: #cbd5e1 !important;
    z-index: 1 !important;
    border-radius: 2px !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed:not(:last-child)::after {
    background: #16a34a !important;
}

/* Numéro de l'étape - RESET COMPLET */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-number {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 4px solid #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    color: #64748b !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Titre de l'étape - TOUJOURS VISIBLE */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-title {
    font-size: 14px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    text-align: center !important;
    max-width: 160px !important;
    line-height: 1.4 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: normal !important;
}

/* ===== ÉTAT ACTIF (étape en cours) ===== */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.active {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.active .wcpc-progress-step-number {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25) !important;
    transform: scale(1.1) !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.active .wcpc-progress-step-title {
    color: #2563eb !important;
    font-weight: 700 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== ÉTAT COMPLÉTÉ ===== */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed .wcpc-progress-step-number {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: transparent !important;
    font-size: 0 !important;
}

/* Icône ✓ dans le cercle complété */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed .wcpc-progress-step-number::after {
    content: '✓' !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    display: block !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed .wcpc-progress-step-title {
    color: #16a34a !important;
    font-weight: 600 !important;
}

/* Hover sur étapes complétées */
.wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed:hover .wcpc-progress-step-number {
    transform: scale(1.1) !important;
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.25) !important;
}

/* ===== MASQUER/AFFICHER LES ÉTAPES ===== */

.wcpc-configurator.wcpc-wizard-mode .wcpc-step {
    display: none !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-step.wcpc-step-active {
    display: block !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-step.wcpc-step-active .wcpc-step-content {
    display: block !important;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-step-header {
    display: none !important;
}

/* Animation d'entrée */
.wcpc-configurator.wcpc-wizard-mode .wcpc-step.wcpc-step-entering {
    animation: wcpc-slide-in-right 0.3s ease-out forwards;
}

.wcpc-configurator.wcpc-wizard-mode .wcpc-step.wcpc-step-entering-reverse {
    animation: wcpc-slide-in-left 0.3s ease-out forwards;
}

/* ===== NAVIGATION WIZARD ===== */

.wcpc-wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--wcpc-border);
    gap: 15px;
}

.wcpc-wizard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--wcpc-radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.wcpc-wizard-btn-prev {
    background: var(--wcpc-secondary-button-bg);
    color: var(--wcpc-secondary-button-text);
}

.wcpc-wizard-btn-prev:hover:not(:disabled) {
    background: var(--wcpc-border);
}

.wcpc-wizard-btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wcpc-wizard-btn-next {
    background: var(--wcpc-button-bg);
    color: var(--wcpc-button-text);
    margin-left: auto;
}

.wcpc-wizard-btn-next:hover:not(:disabled) {
    background: var(--wcpc-button-hover-bg);
    transform: translateY(-1px);
}

.wcpc-wizard-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.wcpc-wizard-btn svg {
    width: 18px;
    height: 18px;
}

.wcpc-wizard-step-indicator {
    font-size: 14px;
    color: var(--wcpc-text-light);
    text-align: center;
}

/* ============================================
   NAVIGATION WIZARD FLOTTANTE
   ============================================ */

.wcpc-wizard-nav-floating {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.wcpc-wizard-nav-floating .wcpc-wizard-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    gap: 20px;
}

.wcpc-wizard-nav-floating .wcpc-wizard-btn {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 8px;
    min-width: 150px;
}

.wcpc-wizard-nav-floating .wcpc-wizard-btn-prev {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.wcpc-wizard-nav-floating .wcpc-wizard-btn-prev:hover:not(:disabled) {
    background: #e2e8f0;
}

.wcpc-wizard-nav-floating .wcpc-wizard-btn-next {
    background: #2563eb;
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.wcpc-wizard-nav-floating .wcpc-wizard-btn-next:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.wcpc-wizard-nav-floating .wcpc-wizard-step-indicator {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    background: #f8fafc;
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.wcpc-wizard-nav-floating .wcpc-wizard-step-indicator .current {
    color: #2563eb;
    font-weight: 700;
}

/* Titre du configurateur dans la barre flottante */
.wcpc-wizard-nav-floating .wcpc-wizard-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    border-radius: 8px;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
    max-width: 250px;
    overflow: hidden;
}

.wcpc-wizard-nav-floating .wcpc-wizard-nav-title svg {
    flex-shrink: 0;
    color: #4f46e5;
}

.wcpc-wizard-nav-floating .wcpc-wizard-nav-title span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Titre de l'étape en cours */
.wcpc-wizard-current-step-title {
    display: flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    border: 1px solid #fcd34d;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
}

.wcpc-wizard-current-step-title .wcpc-current-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mini-stepper dans la barre flottante */
.wcpc-wizard-mini-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.wcpc-mini-step {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.wcpc-mini-step:hover {
    transform: scale(1.3);
}

.wcpc-mini-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #cbd5e1;
    transition: all 0.2s ease;
    font-size: 9px;
    color: white;
    font-weight: bold;
}

/* État en attente (pas encore de choix) */
.wcpc-mini-step.pending .wcpc-mini-step-dot {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* État actif (étape en cours) */
.wcpc-mini-step.active .wcpc-mini-step-dot {
    background: #2563eb;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* État complété (choix fait) = VERT */
.wcpc-mini-step.completed .wcpc-mini-step-dot {
    background: #16a34a;
    border-color: #15803d;
}

.wcpc-mini-step.completed .wcpc-mini-step-dot::after {
    content: '✓';
}

/* Actif ET complété (étape en cours avec choix fait) */
.wcpc-mini-step.active.completed .wcpc-mini-step-dot {
    background: #16a34a;
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3);
}

.wcpc-mini-step.active.completed .wcpc-mini-step-dot::after {
    content: '✓';
}

/* Bouton Terminé amélioré (tout complété) */
.wcpc-wizard-btn-next.wcpc-wizard-btn-complete {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    border-color: #16a34a !important;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4) !important;
    animation: wcpc-pulse-complete 2s infinite;
}

.wcpc-wizard-btn-next.wcpc-wizard-btn-complete:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5) !important;
}

@keyframes wcpc-pulse-complete {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(22, 163, 74, 0.4);
    }
    50% { 
        box-shadow: 0 4px 25px rgba(22, 163, 74, 0.6);
    }
}

/* Responsive - mobile */
@media (max-width: 768px) {
    .wcpc-wizard-nav-floating .wcpc-wizard-nav-inner {
        padding: 12px 15px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-btn {
        padding: 12px 20px;
        font-size: 14px;
        min-width: auto;
        flex: 1;
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-step-indicator {
        display: none; /* Cacher sur mobile pour gagner de la place */
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-nav-title {
        max-width: 100px;
        font-size: 11px;
        padding: 5px 8px;
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-nav-title svg {
        width: 14px;
        height: 14px;
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-current-step-title {
        max-width: 150px;
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .wcpc-wizard-nav-floating .wcpc-wizard-mini-stepper {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
}

/* ===== RESPONSIVE STEPPER ===== */

@media (max-width: 768px) {
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-steps {
        padding: 20px 20px !important;
        justify-content: flex-start !important;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step {
        padding: 0 25px !important;
        min-width: 110px !important;
    }
    
    /* FORCER l'affichage du titre même en responsive */
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-title {
        font-size: 12px !important;
        max-width: 100px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.active .wcpc-progress-step-title,
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed .wcpc-progress-step-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-number {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        font-size: 18px !important;
        border-width: 3px !important;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step.completed .wcpc-progress-step-number::after {
        font-size: 22px !important;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step:not(:last-child)::after {
        top: 20px !important;
        left: calc(50% + 25px) !important;
        width: calc(100% - 50px) !important;
        height: 3px !important;
    }
}

/* ============================================
   VISUAL PREVIEW - PANNEAU D'APERÇU
   ============================================ */

.wcpc-preview-panel {
    background: var(--wcpc-bg);
    border: 1px solid var(--wcpc-border);
    border-radius: var(--wcpc-radius);
    padding: 15px;
    margin-bottom: 20px;
}

.wcpc-preview-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--wcpc-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wcpc-preview-title svg {
    width: 18px;
    height: 18px;
    color: var(--wcpc-primary);
}

.wcpc-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.wcpc-preview-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--wcpc-radius-sm);
    overflow: hidden;
    border: 2px solid var(--wcpc-border);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wcpc-preview-item.wcpc-animate-add {
    animation: wcpc-bounce-in 0.4s ease-out;
}

.wcpc-preview-item.wcpc-animate-remove {
    animation: wcpc-fade-out 0.2s ease-out forwards;
}

.wcpc-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcpc-preview-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 4px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 9px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wcpc-preview-item-qty {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--wcpc-primary);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 8px;
}

.wcpc-preview-empty {
    text-align: center;
    padding: 20px;
    color: var(--wcpc-text-light);
}

.wcpc-preview-empty svg {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.wcpc-preview-empty p {
    margin: 0;
    font-size: 13px;
}

.wcpc-preview-summary {
    border-top: 1px solid var(--wcpc-border);
    padding-top: 12px;
    font-size: 13px;
}

.wcpc-preview-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wcpc-preview-summary-total {
    font-weight: 600;
    font-size: 15px;
    color: var(--wcpc-price);
}

/* NE PAS utiliser de grid layout qui casse l'existant */
/* L'aperçu s'insère dans le flux normal */

/* Floating preview - panneau fixe en bas à droite */
.wcpc-preview-panel.wcpc-preview-floating {
    position: fixed !important;
    bottom: 90px;
    right: 20px;
    width: 280px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 9998;
    border-radius: 12px;
    background: white;
}

.wcpc-preview-panel.wcpc-preview-floating.visible {
    display: block !important;
}

.wcpc-preview-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wcpc-primary, #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wcpc-preview-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.wcpc-preview-toggle svg {
    width: 24px;
    height: 24px;
}

.wcpc-preview-toggle .wcpc-preview-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--wcpc-error, #dc2626);
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Grid adjustments */
    .wcpc-configurator.wcpc-preview-right,
    .wcpc-configurator.wcpc-preview-left {
        grid-template-columns: 1fr;
    }
    
    .wcpc-preview-panel {
        position: static;
        order: 999;
    }
    
    /* Stepper horizontal scrollable sur mobile */
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-steps {
        justify-content: flex-start;
        padding: 15px 10px;
        gap: 0;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step {
        padding: 8px 15px;
        flex-shrink: 0;
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-title {
        display: none; /* Cacher les titres sur mobile, garder juste les numéros */
    }
    
    .wcpc-configurator.wcpc-wizard-mode .wcpc-progress-step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Sticky mobile summary */
    .wcpc-mobile-sticky-summary .wcpc-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--wcpc-bg);
        border-top: 1px solid var(--wcpc-border);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 100;
        padding: 15px;
        margin: 0;
        border-radius: 0;
    }
    
    .wcpc-mobile-sticky-summary .wcpc-configurator {
        padding-bottom: 120px;
    }
    
    /* Touch-friendly options */
    .wcpc-option {
        min-height: 60px;
    }
    
    .wcpc-option-image {
        min-width: 60px;
        min-height: 60px;
    }
    
    /* Swipe hint */
    .wcpc-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px;
        background: var(--wcpc-bg-alt);
        border-radius: var(--wcpc-radius);
        margin-bottom: 15px;
        font-size: 13px;
        color: var(--wcpc-text-light);
    }
    
    .wcpc-swipe-hint svg {
        width: 20px;
        height: 20px;
        animation: wcpc-swipe-animation 2s ease-in-out infinite;
    }
    
    @keyframes wcpc-swipe-animation {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(10px); }
    }
    
    /* Wizard nav mobile */
    .wcpc-wizard-nav {
        flex-wrap: wrap;
    }
    
    .wcpc-wizard-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
        padding: 14px 20px;
    }
    
    .wcpc-wizard-step-indicator {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 10px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .wcpc-option:active {
        transform: scale(0.98);
    }
    
    .wcpc-wizard-btn:active {
        transform: scale(0.95);
    }
}

/* ============================================
   SWIPE CONTAINER
   ============================================ */

.wcpc-swipe-container {
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.wcpc-swipe-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.wcpc-swipe-slide {
    flex: 0 0 100%;
    width: 100%;
}

/* ============================================
   OPTION SELECTION ANIMATIONS
   ============================================ */

.wcpc-option {
    transition: all 0.2s ease;
}

.wcpc-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--wcpc-shadow);
}

.wcpc-option.selected {
    animation: wcpc-pulse 0.3s ease;
}

.wcpc-option.selected .wcpc-option-check {
    animation: wcpc-scale-in 0.2s ease-out;
}

.wcpc-option-check svg path {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

.wcpc-option.selected .wcpc-option-check svg path {
    animation: wcpc-check-mark 0.3s ease-out forwards;
}

/* Ripple effect on click */
.wcpc-option::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.wcpc-option.wcpc-ripple::after {
    width: 200%;
    height: 200%;
    opacity: 0;
}

/* ============================================
   LOADING STATES
   ============================================ */

.wcpc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.wcpc-loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.wcpc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--wcpc-border);
    border-top-color: var(--wcpc-primary);
    border-radius: 50%;
    animation: wcpc-spin 0.8s linear infinite;
}

@keyframes wcpc-spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.wcpc-skeleton {
    background: linear-gradient(90deg, var(--wcpc-bg-alt) 25%, var(--wcpc-border) 50%, var(--wcpc-bg-alt) 75%);
    background-size: 200% 100%;
    animation: wcpc-skeleton-loading 1.5s infinite;
    border-radius: var(--wcpc-radius-sm);
}

@keyframes wcpc-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
