:root {
    --invosmart-primary: #6a11cb;
    --invosmart-primary-hover: #4d08a3;
    --invosmart-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);

    --primary-gradient: linear-gradient(135deg, #8b5cf6, #a855f7);
    --primary-hover: linear-gradient(135deg, #7c3aed, #9333ea);
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --card-hover: #faf5ff;
    --card-selected: linear-gradient(135deg, #faf5ff, #f3e8ff);
    --shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    --shadow-hover: 0 12px 35px rgba(139, 92, 246, 0.2);
    --radius: 16px;
}

@keyframes invoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

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

@keyframes invoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.invo-btn {
    position: fixed;
    z-index: 99999;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    animation: invoFloat 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

/* Positions disponibles */
.invo-btn.bottom-right { bottom: 20px; right: 20px; }
.invo-btn.bottom-left { bottom: 20px; left: 20px; }
.invo-btn.bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }
.invo-btn.middle-right { top: 50%; right: 20px; transform: translateY(-50%); }
.invo-btn.middle-left { top: 50%; left: 20px; transform: translateY(-50%); }
.invo-btn.top-right { top: 20px; right: 20px; }
.invo-btn.top-left { top: 20px; left: 20px; }
.invo-btn.top-center { top: 20px; left: 50%; transform: translateX(-50%); }

.invo-btn.bottom-center, .invo-btn.top-center { animation: invoFloatCenter 3s ease-in-out infinite; }
.invo-btn.middle-left, .invo-btn.middle-right { animation: invoFloatVertical 3s ease-in-out infinite; }

@keyframes invoFloatCenter {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes invoFloatVertical {
    0%, 100% { transform: translateY(-50%) translateX(0px); }
    50% { transform: translateY(-50%) translateX(3px); }
}

.invo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: var(--primary-hover);
}

.invo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    animation: invoFadeIn 0.3s ease;
}

.invo-modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 900px;
    zoom: 0.8;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    max-height: 85vh;
}

.invo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.invo-title {
    margin: 0;
    color: #7c3aed;
    font-size: 24px;
    font-weight: 600;
}

.invo-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #6b7280;
}

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

.invo-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px;
}

.invo-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #8b5cf6;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: invoSpin 1s linear infinite;
}

.invo-loader-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Grille des services en 3 colonnes */
.invo-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 5px;
}

.invo-service-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.invo-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.invo-service-card:hover {
    border-color: #c4b5fd;
    background: var(--card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.invo-service-card:hover::before {
    transform: scaleX(1);
}

.invo-service-card.selected {
    border-color: #8b5cf6;
    background: var(--card-selected);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.invo-service-card.selected::before {
    transform: scaleX(1);
}

.invo-service-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.3;
}

.invo-service-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 12px 0;
    flex-grow: 1;
}

.invo-service-price {
    color: #8b5cf6;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.invo-service-selected-badge {
    display: none;
    background: #10b981;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.invo-service-card.selected .invo-service-selected-badge {
    display: inline-block;
}

/* Navigation entre les services */
.invo-services-navigation {
    display: none;
    justify-content: center;
    margin-top: 20px;
}

.invo-services-navigation.show {
    display: flex;
}

.invo-btn-continue {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invo-btn-continue:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.invo-btn-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.invo-form {
    display: none;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.invo-form.show {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    animation: invoFadeIn 0.4s ease;
}

.invo-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invo-field.full-width {
    grid-column: span 2;
}

.invo-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.invo-input, .invo-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.invo-input:focus, .invo-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.invo-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 8px;
}

.invo-step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.invo-step.active {
    background: #8b5cf6;
    width: 20px;
    border-radius: 5px;
}

.invo-summary {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.invo-summary.show {
    display: flex;
    animation: invoFadeIn 0.4s ease;
}

.invo-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.invo-summary-label {
    font-weight: 500;
    color: var(--text-primary);
}

.invo-summary-value {
    color: var(--text-secondary);
}

.invo-summary-services {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--border-color);
}

.invo-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}

.invo-btn-secondary {
    background: #f3f4f6;
    color: var(--text-primary);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex: 1;
}

.invo-btn-secondary:hover {
    background: #e5e7eb;
}

.invo-submit {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.invo-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.invo-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Navigation des formulaires */
.invo-navigation {
    display: none;
    justify-content: space-between;
    margin-top: 25px;
    gap: 10px;
    grid-column: span 2;
}

.invo-navigation.show {
    display: flex;
}

.invo-btn-prev {
    background: #f3f4f6;
    color: var(--text-primary);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invo-btn-prev:hover {
    background: #e5e7eb;
}

.invo-btn-next {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.invo-btn-next:hover {
    background: var(--primary-hover);
}

.invo-btn-next:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.invo-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 15px;
    grid-column: span 2;
}

.invo-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: var(--success-color);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 15px;
    grid-column: span 2;
}

/* Responsive design amélioré */
@media (max-width: 1024px) {
    .invo-service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .invo-service-grid {
        grid-template-columns: 1fr;
    }

    .invo-form.show {
        grid-template-columns: 1fr;
    }

    .invo-field.full-width {
        grid-column: span 1;
    }

    .invo-navigation {
        grid-column: span 1;
    }

    .invo-modal-content {
        margin: 15px;
        padding: 25px 20px;
        max-width: 95%;
    }
}

@media (max-width: 640px) {
    .invo-modal-content {
        margin: 10px;
        padding: 20px 15px;
    }
    .invo-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    .invo-actions, .invo-navigation {
        flex-direction: column;
    }
    .invo-service-card {
        min-height: 100px;
        padding: 15px;
    }
}