/**
 * Vivara Frontend Stylesheet
 * Design moderne et épuré avec branding Vivara
 * 
 * Couleurs:
 * - Bleu: #133b85
 * - Or: #ddae5e
 * - Gris: #6b7280, #f3f4f6
 * 
 * @package Vivara
 * @since 1.0.0
 */

/* ========================================
   CONTENEUR PRINCIPAL - 2025 Design Standards
========================================= */
.vivara-configurateur {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 0;
    background: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

/* ========================================
   HEADER
========================================= */
.vivara-config-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.vivara-config-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #133b85;
    margin: 0 0 12px 0;
}

.vivara-config-header .config-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   🔥 BARRE DE NAVIGATION STICKY (EN BAS)
========================================= */
.vivara-sticky-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 30px;
    z-index: 1000;
}

.vivara-sticky-nav .mobile-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.vivara-sticky-nav .nav-left {
    flex: 0 0 auto;
    min-width: 0; /* Permet le shrink si nécessaire */
}

.vivara-sticky-nav .nav-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0; /* CRITIQUE : Permet le shrink */
    overflow: hidden;
}

.vivara-sticky-nav .nav-right {
    flex: 0 0 auto;
    min-width: 0; /* Permet le shrink si nécessaire */
}

.vivara-sticky-nav button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0; /* Empêcher le shrink des boutons */
}

.vivara-sticky-nav button i,
.vivara-sticky-nav button svg {
    flex-shrink: 0; /* Icônes toujours visibles */
}

.vivara-sticky-nav .btn-prev {
    background: #f3f4f6;
    color: #374151;
}

.vivara-sticky-nav .btn-prev:hover:not(:disabled) {
    background: #e5e7eb;
}

.vivara-sticky-nav .btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vivara-sticky-nav .btn-next {
    background: #133b85;
    color: white;
}

.vivara-sticky-nav .btn-next:hover {
    background: #0f2d6b;
}

.vivara-sticky-nav .btn-submit {
    background: #10b981;
    color: white;
}

.vivara-sticky-nav .btn-submit:hover {
    background: #059669;
}

/* Étapes cliquables dans la barre sticky */
.sticky-progress-steps {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    max-width: 100%;
}

.sticky-progress-steps::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.sticky-progress-steps .step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
    flex-shrink: 0; /* Empêcher le shrink */
    white-space: nowrap;
}

.sticky-progress-steps .step-item:hover {
    background: #f3f4f6;
}

.sticky-progress-steps .step-item.active {
    background: #eff6ff;
}

.sticky-progress-steps .step-item.completed {
    opacity: 0.7;
}

.sticky-progress-steps .step-number-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s ease;
}

.sticky-progress-steps .step-item.active .step-number-small {
    background: #133b85;
    color: white;
}

.sticky-progress-steps .step-item.completed .step-number-small {
    background: #10b981;
    color: white;
}

.sticky-progress-steps .step-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.sticky-progress-steps .step-item.active .step-label {
    color: #133b85;
}

/* Version mobile avec nom de l'étape en haut */
.vivara-sticky-nav .sticky-current-step {
    display: none; /* Caché par défaut sur desktop */
}

@media (max-width: 1200px) {
    .vivara-sticky-nav .mobile-nav-row {
        gap: 16px;
    }
    
    .sticky-progress-steps {
        gap: 16px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 6px 12px;
    }
}

@media (max-width: 1024px) {
    .vivara-sticky-nav {
        padding: 12px 16px;
    }
    
    .vivara-sticky-nav .mobile-nav-row {
        gap: 12px;
    }
    
    /* Masquer les labels des étapes sur tablette */
    .sticky-progress-steps .step-label {
        display: none;
    }
    
    .sticky-progress-steps {
        gap: 10px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 6px 10px;
    }
    
    .vivara-sticky-nav button {
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .vivara-sticky-nav {
        padding: 12px 14px;
    }
    
    .vivara-sticky-nav .mobile-nav-row {
        gap: 10px;
    }
    
    .sticky-progress-steps {
        gap: 8px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 4px 8px;
    }
    
    .sticky-progress-steps .step-number-small {
        width: 30px;
        height: 30px;
    }
    
    .vivara-sticky-nav button {
        padding: 9px 16px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .vivara-sticky-nav {
        padding: 10px 12px;
    }
    
    /* Afficher le nom de l'étape en haut sur mobile */
    .vivara-sticky-nav .sticky-current-step {
        display: block;
        text-align: center;
        font-size: 12px;
        font-weight: 600;
        color: #133b85;
        margin-bottom: 8px;
    }
    
    .vivara-sticky-nav .mobile-nav-row {
        gap: 8px;
    }
    
    .sticky-progress-steps {
        gap: 6px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 4px 6px;
    }
    
    .sticky-progress-steps .step-number-small {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    
    .vivara-sticky-nav button {
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 580px) {
    /* Réduire le texte des boutons */
    .vivara-sticky-nav button {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .vivara-sticky-nav .mobile-nav-row {
        gap: 6px;
    }
    
    .sticky-progress-steps {
        gap: 5px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 3px 5px;
    }
}

@media (max-width: 480px) {
    .vivara-sticky-nav {
        padding: 8px 10px;
    }
    
    /* Masquer le TEXTE des boutons, garder uniquement les icônes */
    .vivara-sticky-nav .btn-prev span,
    .vivara-sticky-nav .btn-next span,
    .vivara-sticky-nav .btn-submit span {
        display: none;
    }
    
    .vivara-sticky-nav button {
        padding: 10px;
        min-width: 40px;
        justify-content: center;
    }
    
    .vivara-sticky-nav button i,
    .vivara-sticky-nav button svg {
        margin: 0 !important;
    }
    
    .vivara-sticky-nav .mobile-nav-row {
        gap: 6px;
    }
    
    .sticky-progress-steps .step-number-small {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .sticky-progress-steps {
        gap: 4px;
    }
    
    .sticky-progress-steps .step-item {
        padding: 2px 4px;
    }
}

/* Ajouter padding au body pour éviter que le contenu soit caché */
body.vivara-multistep-active {
    padding-bottom: 100px;
}

/* ========================================
   🛒 BOUTON RÉCAPITULATIF STICKY
========================================= */
.vivara-recap-btn {
    position: fixed;
    top: 42px;  /* ✅ 32px barre admin + 10px marge */
    right: 20px;
    z-index: 1001;
    background: #133b85;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(19, 59, 133, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.vivara-recap-btn:hover {
    background: #0f2d6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(19, 59, 133, 0.4);
}

.vivara-recap-badge {
    background: linear-gradient(135deg, #ddae5e 0%, #f4d890 100%);
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 26px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(221, 174, 94, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ========================================
   📋 MODAL SIDEBAR RÉCAPITULATIF
========================================= */
.vivara-recap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.vivara-recap-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vivara-recap-sidebar {
    position: fixed;
    top: 32px;  /* ✅ Éviter la barre admin WordPress */
    right: -500px;
    bottom: 0;
    width: 500px;
    max-width: 90vw;
    background: white;
    z-index: 1003;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.vivara-recap-sidebar.active {
    right: 0;
}

.vivara-recap-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #133b85 0%, #1e5bb8 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(19, 59, 133, 0.12);
    position: relative;
}

.vivara-recap-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ddae5e 0%, #f4d890 100%);
}

.vivara-recap-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: white !important;  /* ✅ Forcer le texte en blanc */
}

.vivara-recap-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.vivara-recap-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.vivara-recap-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: white;
}

.vivara-recap-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    gap: 16px;
}

.vivara-recap-header-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vivara-recap-header-left {
    flex: 1;
}

.vivara-recap-header-middle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vivara-recap-header-qty {
    min-width: 32px;
    text-align: center;
}

.vivara-recap-header-price {
    min-width: 100px;
    text-align: right;
}

.vivara-recap-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.vivara-recap-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 16px;
    transition: background 0.2s;
}

.vivara-recap-item:last-child {
    border-bottom: none;
}

.vivara-recap-item:hover {
    background: #fafbfc;
}

.vivara-recap-item-left {
    flex: 1;
    min-width: 0;
}

.vivara-recap-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.vivara-recap-item-middle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vivara-recap-qty {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    min-width: 32px;
    text-align: center;
}

.vivara-recap-price {
    font-size: 14px;
    font-weight: 700;
    color: #133b85;
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

.vivara-recap-footer {
    padding: 20px 24px;
    background: linear-gradient(to top, #f8f9fa 0%, white 100%);
    border-top: 1px solid #e5e7eb;
}

.vivara-recap-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vivara-recap-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vivara-recap-total-row.subtotal,
.vivara-recap-total-row.tva {
    font-size: 13px;
    color: #6b7280;
}

.vivara-recap-total-row.tva {
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 4px;
}

.vivara-recap-total-row.total {
    padding: 16px 0;
    margin-top: 4px;
}

.vivara-recap-total-label {
    font-size: 14px;
    font-weight: 600;
}

.vivara-recap-total-value {
    font-weight: 700;
    color: #133b85;
}

.vivara-recap-total-row.total .vivara-recap-total-label,
.vivara-recap-total-row.total .vivara-recap-total-value {
    color: #133b85;
}

.vivara-recap-total-row.total .vivara-recap-total-label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.vivara-recap-total-row.total .vivara-recap-total-value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Mobile */
@media (max-width: 768px) {
    .vivara-recap-btn {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .vivara-recap-sidebar {
        width: 100vw;
        right: -100vw;
    }
    
    .vivara-recap-header {
        padding: 20px 24px;
    }
    
    .vivara-recap-header h3 {
        font-size: 18px;
    }
    
    .vivara-recap-table th,
    .vivara-recap-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .vivara-recap-table th:first-child,
    .vivara-recap-table td:first-child {
        padding-left: 20px;
    }
    
    .vivara-recap-table th:last-child,
    .vivara-recap-table td:last-child {
        padding-right: 20px;
    }
    
    .vivara-recap-item-name {
        font-size: 14px;
    }
    
    .vivara-recap-qty {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .vivara-recap-price {
        font-size: 14px;
    }
    
    .vivara-recap-footer {
        padding: 24px 20px;
    }
    
    .vivara-recap-total-row.total .vivara-recap-total-value {
        font-size: 22px;
    }
}

/* ========================================
   🔥 BARRE DE PROGRESSION (MULTI-STEP)
========================================= */
.vivara-progress-bar {
    display: none !important; /* Masquée car remplacée par la barre sticky */
}

.vivara-progress-bar::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

.vivara-progress-bar .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
    cursor: default;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px #ffffff;
}

.step.active .step-number {
    background: #133b85;
    color: white;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 6px rgba(19, 59, 133, 0.2);
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    max-width: 120px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-label {
    color: #133b85;
    font-weight: 700;
}

.step.completed .step-label {
    color: #10b981;
}

/* ========================================
   🔥 ÉTAPES (MULTI-STEP)
========================================= */
.vivara-steps {
    min-height: 400px;
}

.vivara-step {
    display: none;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vivara-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ÉLÉMENTS DU CONFIGURATEUR
========================================= */
.vivara-element {
    margin-bottom: 30px;
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.vivara-element:hover {
    border-color: #133b85;
    box-shadow: 0 2px 8px rgba(19, 59, 133, 0.1);
}

.vivara-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.vivara-label .required {
    color: #dc2626;
    margin-left: 3px;
}

.vivara-tooltip {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* ========================================
   SECTION
========================================= */
.vivara-section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 48px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   CHECKBOX
========================================= */
.vivara-checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vivara-checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.vivara-checkbox-option:hover {
    border-color: #133b85;
    background: #eff6ff;
}

.vivara-checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #133b85;
}

.vivara-checkbox-option input[type="checkbox"]:checked + .option-label {
    font-weight: 600;
    color: #133b85;
}

.option-label {
    flex: 1;
    font-size: 14px;
    color: #111827;
}

.option-price {
    font-size: 14px;
    font-weight: 600;
    color: #ddae5e;
}

/* ========================================
   QUANTITÉ
========================================= */
.vivara-quantity-input {
    width: 100%;
    max-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    transition: all 0.2s;
}

.vivara-quantity-input:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

.vivara-unit-desc {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: #6b7280;
}

/* ========================================
   🔥 FORMULAIRE CLIENT (DERNIÈRE ÉTAPE)
========================================= */
.vivara-client-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: #133b85;
    margin: 0 0 8px 0;
}

.form-intro {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 30px 0;
}

/* Récapitulatif */
.vivara-summary {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
}

.vivara-summary h4 {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 16px 0;
}

.summary-items {
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #fde68a;
}

.summary-item:last-child {
    border-bottom: none;
}

.item-label {
    font-size: 14px;
    color: #78350f;
    font-weight: 500;
}

.item-details {
    font-size: 14px;
    color: #92400e;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 2px solid #fbbf24;
    font-size: 20px;
    font-weight: 700;
    color: #78350f;
}

.empty-summary {
    text-align: center;
    color: #92400e;
    font-size: 13px;
    margin: 0;
    padding: 10px 0;
}

/* Formulaire */
.client-info-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Champs conditionnels Particulier/Entreprise */
.show-for-entreprise {
    display: none;
}

.show-for-particulier {
    display: flex;
}

/* Quand "Entreprise" est sélectionné */
.client-info-form.mode-entreprise .show-for-particulier {
    display: none;
}

.client-info-form.mode-entreprise .show-for-entreprise {
    display: flex;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc2626;
}

/* ========================================
   🔥 NAVIGATION (MULTI-STEP)
========================================= */
.vivara-step-navigation {
    display: none !important; /* Masqué car remplacé par la barre sticky */
}

.vivara-step-navigation button {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-prev {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-prev:hover:not(:disabled) {
    background: #e5e7eb;
    color: #111827;
}

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

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #133b85 0%, #1a4a9d 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(19, 59, 133, 0.3);
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(19, 59, 133, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   TOAST (NOTIFICATIONS)
========================================= */
.vivara-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #fee2e2;
    border: 2px solid #dc2626;
    color: #991b1b;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.vivara-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   DROPDOWN (Radio Cards + Select)
========================================= */
.vivara-dropdown .choices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.choice-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.choice-card:hover {
    border-color: #133b85;
    box-shadow: 0 4px 12px rgba(19, 59, 133, 0.1);
}

.choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.choice-card input[type="radio"]:checked + .choice-content {
    font-weight: 600;
}

.choice-card:has(input:checked) {
    border-color: #133b85;
    background: linear-gradient(135deg, rgba(19, 59, 133, 0.05) 0%, rgba(19, 59, 133, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

.choice-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.choice-label {
    font-size: 15px;
    color: #111827;
}

.choice-price {
    font-size: 14px;
    color: #133b85;
    font-weight: 600;
}

/* Select Dropdown */
.vivara-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vivara-select:hover {
    border-color: #133b85;
}

.vivara-select:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

/* ========================================
   SLIDER
========================================= */
.vivara-slider {
    padding: 24px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.slider-header h4 {
    margin: 0;
    font-size: 18px;
    color: #111827;
}

.slider-value-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 24px;
    font-weight: 700;
    color: #133b85;
}

.slider-value-display .unit {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

.slider-value-display .value-price {
    font-size: 14px;
    font-weight: 500;
    color: #ddae5e;
    margin-left: 8px;
}

.slider-control {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.slider-min,
.slider-max {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.vivara-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.vivara-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #133b85;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(19, 59, 133, 0.3);
    transition: all 0.2s ease;
}

.vivara-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(19, 59, 133, 0.4);
}

.vivara-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #133b85;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(19, 59, 133, 0.3);
}

/* Slider en mode LISTE avec image */
.slider-list-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.slider-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   IMAGE BOX
========================================= */
/* Grid mode (plusieurs par ligne) */
.imagebox-grid.imagebox-grid {
    display: grid;
    gap: 20px;
    margin-top: 16px;
    justify-content: center; /* ✅ Centrer les colonnes quand il y a moins d'options */
}

/* ✅ Taille FIXE selon le nombre de colonnes - les cartes gardent la même taille ET se centrent */
.imagebox-grid[data-columns="1"] { 
    grid-template-columns: repeat(auto-fit, minmax(400px, 400px));
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.imagebox-grid[data-columns="2"] { 
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 10px), calc(50% - 10px)));
}
.imagebox-grid[data-columns="3"] { 
    grid-template-columns: repeat(auto-fit, minmax(calc(33.333% - 14px), calc(33.333% - 14px)));
}
.imagebox-grid[data-columns="4"] { 
    grid-template-columns: repeat(auto-fit, minmax(calc(25% - 15px), calc(25% - 15px)));
}
.imagebox-grid[data-columns="5"] { 
    grid-template-columns: repeat(auto-fit, minmax(calc(20% - 16px), calc(20% - 16px)));
}
.imagebox-grid[data-columns="6"] { 
    grid-template-columns: repeat(auto-fit, minmax(calc(16.666% - 17px), calc(16.666% - 17px)));
}

/* List mode (1 par ligne) */
.imagebox-grid.imagebox-list {
    grid-template-columns: 1fr !important;
}

.imagebox-list .imagebox-card {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.imagebox-list .imagebox-image {
    width: 200px;
    min-width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.imagebox-list .imagebox-content {
    flex: 1;
    padding: 20px;
}

/* Responsive - DÉSACTIVÉ (règles dans la section optimisation mobile complète) */

.imagebox-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04),
                0 1px 2px rgba(0, 0, 0, 0.02);
}

.imagebox-card:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06),
                0 2px 4px rgba(0, 0, 0, 0.04);
}

.imagebox-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.imagebox-card:has(input:checked) {
    border-color: #133b85;
    border-width: 2px;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.08),
                0 8px 16px rgba(19, 59, 133, 0.12);
}

.imagebox-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f3f4f6;
    /* 🔒 Couche de protection par-dessus l'image */
}

.imagebox-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Au-dessus de l'image */
    pointer-events: none; /* Laisse passer les clics vers la carte */
}

.imagebox-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* 🔒 Protection des images */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Empêche le drag & drop direct */
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.imagebox-card:hover .imagebox-image img {
    transform: scale(1.05);
}

.imagebox-checkmark {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10; /* Au-dessus de l'image */
}

/* 🚨 État d'erreur pour ImageBox obligatoire non rempli */
.imagebox-wrapper.error {
    animation: shake 0.3s ease;
}

.imagebox-wrapper.error .vivara-imagebox {
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.05);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.imagebox-card:has(input:checked) .imagebox-checkmark {
    opacity: 1;
    transform: scale(1);
}

.imagebox-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.imagebox-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.imagebox-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.imagebox-price {
    font-size: 16px;
    font-weight: 600;
    color: #133b85;
    margin-top: 4px;
    letter-spacing: -0.02em;
}

.imagebox-price-included {
    color: #059669;
    font-weight: 500;
    font-style: italic;
}

/* Sélecteur de quantité pour ImageBox - Compatible avec TOUS les layouts (grid, list, colonnes) */
.imagebox-card:has(input:checked) .imagebox-quantity-wrapper {
    display: flex !important;
}

.imagebox-quantity-wrapper {
    display: none;
    flex-direction: column;
    padding: 16px 20px;
    margin: 0;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.2s ease, padding 0.2s ease;
}

.imagebox-quantity-wrapper[style*="display: flex"],
.imagebox-quantity-wrapper[style*="display:flex"] {
    opacity: 1;
    max-height: 200px;
}

.quantity-control-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.quantity-helper-text {
    width: 100%;
    margin: 0;
    padding: 8px 0 0 0;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    display: none;
}

/* Sur mobile, adapter le quantity box pour qu'il s'intègre bien dans le grid */
@media (max-width: 768px) {
    .imagebox-quantity-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .quantity-control-box {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .quantity-label {
        font-size: 13px;
        width: 100% !important;
        margin-bottom: 8px;
    }
    
    .quantity-buttons {
        width: 100%;
    }
    
    .qty-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .qty-input {
        font-size: 14px;
    }
    
    /* 🔥 Sur mobile, forcer le texte "X maison(s) équipée(s)" à descendre */
    .quantity-helper-text {
        margin-top: 12px !important;
        display: block !important;
    }
}

@media (max-width: 380px) {
    .imagebox-quantity-wrapper {
        padding: 10px 12px;
    }
    
    .quantity-label {
        font-size: 12px;
    }
}

.quantity-control-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap; /* Forcer une seule ligne */
}

/* 🔥 Si l'espace est trop serré, passer en mode colonne */
@media (max-width: 1200px) {
    .vivara-imagebox.cols-4 .quantity-control-box,
    .vivara-imagebox.cols-3 .quantity-control-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .vivara-imagebox.cols-4 .quantity-label,
    .vivara-imagebox.cols-3 .quantity-label {
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .vivara-imagebox.cols-4 .quantity-buttons,
    .vivara-imagebox.cols-3 .quantity-buttons {
        width: 100%;
        justify-content: center;
    }
}

.quantity-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0; /* Ne pas rétrécir le label */
    white-space: nowrap; /* Empêcher le retour à la ligne */
}

.quantity-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #133b85;
    opacity: 0.6;
    cursor: help;
    transition: opacity 0.2s;
}

.quantity-info-icon:hover {
    opacity: 1;
}

.quantity-buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1; /* Prend l'espace restant */
    min-width: 120px; /* Largeur minimale réduite */
    justify-content: flex-end; /* Alignement à droite */
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.qty-btn:hover:not(:disabled) {
    border-color: #ddae5e;
    background: #fffbf0;
    color: #133b85;
}

.qty-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.qty-input {
    width: 50px !important;
    height: 36px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #111827 !important;
    background: #ffffff;
    transition: all 0.2s ease;
    opacity: 1 !important;
    position: relative !important;
    /* Enlever les flèches spinner */
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

.qty-input:hover {
    border-color: #ddae5e;
}

/* ========================================
   TEXT HTML
========================================= */
.vivara-texthtml {
    padding: 20px;
    background: #f9fafb;
    border-left: 4px solid #133b85;
}

.texthtml-content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

.texthtml-content h1,
.texthtml-content h2,
.texthtml-content h3,
.texthtml-content h4 {
    color: #111827;
    margin-top: 0;
    margin-bottom: 12px;
}

.texthtml-content p {
    margin: 0 0 12px 0;
}

.texthtml-content a {
    color: #133b85;
    text-decoration: underline;
}

.texthtml-content ul,
.texthtml-content ol {
    margin: 0 0 12px 20px;
}

.texthtml-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========================================
   COMMENT (Textarea)
========================================= */
.vivara-comment textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.vivara-comment textarea:hover {
    border-color: #d1d5db;
}

.vivara-comment textarea:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.1);
}

.vivara-comment textarea::placeholder {
    color: #9ca3af;
}

/* ========================================
   QUANTITY (Amélioration avec boutons +/-)
========================================= */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    margin-top: 12px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #133b85;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    border-color: #133b85;
    background: #f3f4f6;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-input {
    flex: 1;
    height: 40px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.qty-input:focus {
    outline: none;
    border-color: #133b85;
}

.quantity-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.quantity-price .price-label {
    font-size: 13px;
    color: #6b7280;
}

.quantity-price .price-value {
    font-size: 15px;
    font-weight: 600;
    color: #133b85;
}

/* ========================================
   MODAL DE SUCCÈS
========================================= */
.vivara-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.vivara-modal-overlay.active {
    opacity: 1;
}

.vivara-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.vivara-modal-overlay.active .vivara-modal-content {
    transform: scale(1);
}

.vivara-modal-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #133b85 0%, #1a4a9e 100%);
    color: white;
}

.vivara-success-icon {
    display: inline-flex;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: successPulse 2s ease infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.vivara-success-icon svg {
    color: #ddae5e;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.vivara-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.vivara-modal-header p {
    font-size: 16px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.vivara-modal-body {
    padding: 30px;
}

.vivara-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.vivara-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vivara-action-btn svg {
    flex-shrink: 0;
}

.vivara-action-btn.vivara-primary {
    background: linear-gradient(135deg, #ddae5e 0%, #c89a4d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(221, 174, 94, 0.3);
}

.vivara-action-btn.vivara-primary:hover {
    background: linear-gradient(135deg, #c89a4d 0%, #b5883f 100%);
    box-shadow: 0 6px 16px rgba(221, 174, 94, 0.4);
    transform: translateY(-2px);
}

.vivara-action-btn.vivara-secondary {
    background: #f3f4f6;
    color: #133b85;
}

.vivara-action-btn.vivara-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.vivara-modal-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.vivara-btn-close {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 24px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vivara-btn-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .vivara-configurateur {
        padding: 20px;
        margin: 20px auto;
    }
    
    .vivara-config-header h2 {
        font-size: 24px;
    }
    
    .vivara-progress-bar {
        padding: 0 10px;
    }
    
    .vivara-progress-bar::before {
        left: 30px;
        right: 30px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .step-label {
        font-size: 11px;
        max-width: 80px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .vivara-element {
        padding: 16px;
    }
    
    .vivara-step-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .vivara-step-navigation button {
        width: 100%;
    }
    
    .vivara-modal-actions {
        grid-template-columns: 1fr;
    }
    
    .vivara-modal-header h2 {
        font-size: 22px;
    }
    
    .vivara-success-icon {
        width: 64px;
        height: 64px;
    }
    
    .vivara-success-icon svg {
        width: 48px;
        height: 48px;
    }
}


/* ========================================
   ACCORDIONS PAR MAISON
========================================= */
.vivara-maison-accordion {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vivara-maison-accordion.is-open {
    border-color: #133b85;
    box-shadow: 0 0 0 3px rgba(19, 59, 133, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.08);
}

.vivara-maison-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #e5e7eb;
}

.vivara-maison-accordion.is-open .vivara-maison-accordion-header {
    background: #f9fafb;
    border-bottom-color: #133b85;
}

.vivara-maison-accordion-header:hover {
    background: #f9fafb;
}

.vivara-maison-accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #1e40af;
    letter-spacing: 0.2px;
    flex: 1;
}

.vivara-maison-accordion-header > div:last-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.vivara-maison-accordion-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.vivara-maison-accordion.is-open .vivara-maison-accordion-icon {
    transform: rotate(180deg);
}

.vivara-maison-accordion-count {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.vivara-maison-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.vivara-maison-accordion.is-open .vivara-maison-accordion-body {
    max-height: 10000px;
}

.vivara-maison-accordion-content {
    padding: 24px;
}

.vivara-finition-group {
    margin-bottom: 32px;
}

.vivara-finition-group:last-child {
    margin-bottom: 0;
}

/* 📋 Icône Info pour les descriptions */
.imagebox-title-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.imagebox-info-btn {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #133b85;
    opacity: 0.6;
}

.imagebox-info-btn:hover {
    opacity: 1;
    transform: scale(1.15);
    color: #133b85;
}

.imagebox-info-btn i,
.imagebox-info-btn svg {
    width: 18px;
    height: 18px;
}

/* 📋 Modal de description */
.vivara-description-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.vivara-description-modal.is-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.vivara-description-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.vivara-description-modal .modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.vivara-description-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.vivara-description-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.vivara-description-modal .modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.vivara-description-modal .modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.vivara-description-modal .modal-close i,
.vivara-description-modal .modal-close svg {
    width: 20px;
    height: 20px;
}

.vivara-description-modal .modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

/* Support du HTML enrichi dans les descriptions */
.vivara-description-modal .modal-body h1,
.vivara-description-modal .modal-body h2,
.vivara-description-modal .modal-body h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #111827;
    font-weight: 600;
}

.vivara-description-modal .modal-body h1 { font-size: 24px; }
.vivara-description-modal .modal-body h2 { font-size: 20px; }
.vivara-description-modal .modal-body h3 { font-size: 18px; }

.vivara-description-modal .modal-body p {
    margin-bottom: 12px;
}

.vivara-description-modal .modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.vivara-description-modal .modal-body ul,
.vivara-description-modal .modal-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.vivara-description-modal .modal-body li {
    margin-bottom: 6px;
}

/* 🔍 Champ de recherche pour ImageBox - Design Ultra-Moderne 2025 */
.imagebox-search-wrapper {
    position: relative;
    margin: 0 auto 48px;
    max-width: 640px;
    padding: 0 24px;
}

.imagebox-search-input {
    width: 100%;
    padding: 18px 60px 18px 28px;
    border: 1px solid #e5e7eb;
    border-radius: 50px;  /* ✨ Pill shape ultra-moderne */
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.03);
}

.imagebox-search-input:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06),
                0 2px 4px rgba(0, 0, 0, 0.04);
}

.imagebox-search-input:focus {
    outline: none;
    border-color: #133b85;
    box-shadow: 0 0 0 4px rgba(19, 59, 133, 0.1),
                0 8px 16px rgba(19, 59, 133, 0.08);
    transform: translateY(-2px);
}

.imagebox-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.imagebox-search-wrapper .search-icon {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.25s ease;
}

.imagebox-search-input:focus + .search-icon {
    color: #133b85;
    transform: translateY(-50%) scale(1.1);
}

/* Animation pour les cartes filtrées */
.imagebox-card.search-hidden {
    display: none !important;
}

.imagebox-card.search-visible {
    animation: searchFadeIn 0.3s ease;
}

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

/* Responsive - Recherche */
@media (max-width: 768px) {
    .imagebox-search-wrapper {
        margin: 0 auto 36px;
        max-width: 100%;
        padding: 0 16px;
    }
    
    .imagebox-search-input {
        padding: 16px 54px 16px 24px;
        font-size: 14px;
        border-radius: 50px;  /* ✨ Garde le pill shape */
    }
    
    .imagebox-search-wrapper .search-icon {
        right: 36px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .imagebox-search-wrapper {
        margin: 0 auto 28px;
        padding: 0 12px;
    }
    
    .imagebox-search-input {
        padding: 14px 48px 14px 20px;
        font-size: 14px;
        border-radius: 50px;  /* ✨ Toujours pill shape */
    }
    
    .imagebox-search-wrapper .search-icon {
        right: 30px;
        width: 19px;
        height: 19px;
    }
}

/* ========================================
   🚀 OPTIMISATION RESPONSIVE MOBILE COMPLÈTE
   ======================================== */

/* 📱 MOBILE - 768px et moins (iPhone, Samsung Galaxy, etc.) */
@media (max-width: 768px) {
    /* ✅ 1. CARTES IMAGEBOX - 2 COLONNES SUR MOBILE (optimisé) */
    .imagebox-grid[data-columns="2"],
    .imagebox-grid[data-columns="3"],
    .imagebox-grid[data-columns="4"],
    .imagebox-grid[data-columns="5"],
    .imagebox-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr) !important; /* ✅ 2 COLONNES */
        gap: 10px; /* Réduire l'espacement pour optimiser */
    }
    
    /* ✅ Cartes - Optimiser les proportions */
    .imagebox-card {
        border-radius: 8px;
    }
    
    /* ✅ 2. RÉDUIRE LES TAILLES DE TEXTE - Prix et titres */
    .imagebox-title {
        font-size: 14px !important;
        font-weight: 600;
        line-height: 1.3;
    }
    
    .imagebox-price {
        font-size: 16px !important;
        font-weight: 700;
    }
    
    /* ✅ Images optimisées pour 2 colonnes - Plus compactes */
    .imagebox-image {
        min-height: 120px;
        max-height: 120px;
        object-fit: cover;
    }
    
    .imagebox-content {
        padding: 10px 8px;
    }
    
    /* ✅ Badge prix - Plus compact */
    .imagebox-card.selected .imagebox-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* ✅ 3. OPTIMISER L'ACCORDÉON - Moins compressé */
    .vivara-maison-accordion {
        margin-bottom: 12px;
    }
    
    .vivara-maison-accordion-header {
        padding: 12px 10px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .vivara-maison-accordion-title {
        font-size: 14px;
        flex: 1;
        min-width: 120px;
        font-weight: 600;
    }
    
    .vivara-maison-accordion-header > div:last-child {
        flex-shrink: 0;
    }
    
    .vivara-maison-accordion-count {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .vivara-maison-accordion-content {
        padding: 10px 8px;
    }
    
    /* ✅ 4. OPTIMISER LA PAGINATION - Numéros visibles */
    .vivara-pagination {
        padding: 10px 8px;
        gap: 5px;
    }
    
    .vivara-pagination .page-number,
    .vivara-pagination .page-number.active {
        min-width: 34px;
        height: 34px;
        font-size: 12px;
        padding: 0 6px;
    }
    
    .vivara-pagination .page-prev,
    .vivara-pagination .page-next {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* ✅ 5. ESPACEMENTS ET MARGES - Plus compacts */
    .vivara-element {
        margin-bottom: 16px;
    }
    
    .vivara-element h4 {
        font-size: 15px;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .element-description {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    /* ✅ 6. RÉCAPITULATIF MOBILE */
    .vivara-recap {
        padding: 12px;
    }
    
    .recap-total {
        font-size: 18px;
    }
    
    .recap-subtitle {
        font-size: 11px;
    }
    
    /* ✅ 7. STICKY NAV - Meilleure lisibilité */
    .vivara-sticky-nav {
        padding: 8px 8px;
    }
    
    .sticky-progress-steps .step-number-small {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .vivara-sticky-nav button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* ✅ 8. CONTAINER PRINCIPAL - Utiliser tout l'espace */
    .vivara-configurateur {
        padding: 16px 8px !important; /* Réduire les paddings latéraux */
        max-width: 100% !important;
    }
    
    .vivara-config-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .vivara-config-header h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .vivara-config-header .config-description {
        font-size: 13px;
    }
    
    .vivara-configurator-container {
        padding: 0 !important;
    }
    
    .vivara-main-content {
        padding: 12px 8px !important;
    }
    
    .vivara-step {
        padding: 12px 8px !important;
    }
}

/* 📱 TRÈS PETIT MOBILE - 480px et moins (iPhone SE, petits Android) */
@media (max-width: 480px) {
    /* ✅ Cartes encore plus compactes */
    .imagebox-title {
        font-size: 13px !important;
    }
    
    .imagebox-price {
        font-size: 14px !important;
    }
    
    .imagebox-image {
        min-height: 100px;
        max-height: 100px;
    }
    
    .imagebox-content {
        padding: 8px 6px;
    }
    
    /* ✅ Accordéon encore plus compact */
    .vivara-maison-accordion-header {
        padding: 10px 8px;
    }
    
    .vivara-maison-accordion-title {
        font-size: 13px;
    }
    
    .vivara-maison-accordion-content {
        padding: 8px 6px;
    }
    
    .vivara-maison-accordion-count {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    /* ✅ Pagination encore plus petite */
    .vivara-pagination .page-number,
    .vivara-pagination .page-number.active {
        min-width: 30px;
        height: 30px;
        font-size: 11px;
        padding: 0 5px;
    }
    
    .vivara-pagination .page-prev,
    .vivara-pagination .page-next {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    /* ✅ Récapitulatif */
    .recap-total {
        font-size: 16px;
    }
    
    .recap-subtitle {
        font-size: 10px;
    }
    
    /* ✅ Sticky nav - Numéros plus petits */
    .vivara-sticky-nav {
        padding: 6px 6px;
    }
    
    .sticky-progress-steps .step-number-small {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    
    .vivara-sticky-nav button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* ✅ Container - Encore plus d'espace utilisé */
    .vivara-configurateur {
        padding: 12px 6px !important;
    }
    
    .vivara-main-content {
        padding: 10px 6px !important;
    }
    
    .vivara-step {
        padding: 10px 6px !important;
    }
    
    /* ✅ Header plus compact */
    .vivara-config-header h2 {
        font-size: 20px;
    }
    
    .vivara-config-header .config-description {
        font-size: 12px;
    }
}
