/**
 * Styles pour le générateur de devis
 * @package WebMatic
 */

.devis-generator-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.devis-header {
    text-align: center;
    margin-bottom: 3rem;
}

.devis-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f0f10;
}

.devis-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

/* Avantages */
.devis-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
}

.feature-item i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Conteneur du formulaire */
.devis-form-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

/* Indicateur d'étapes */
.devis-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.devis-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
}

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

.step.active .step-number {
    background: #2563eb;
    color: white;
}

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

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.step.active .step-label {
    color: #2563eb;
}

/* Étapes du formulaire */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.step-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.form-step h2 {
    text-align: center;
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #0f0f10;
}

.form-step > p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Champs du formulaire */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.entreprise-fields {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Sélection des services */
.services-selection {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-category {
    margin-bottom: 2rem;
}

.service-category h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f0f10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-category h4 i {
    color: #2563eb;
}

.service-items {
    display: grid;
    gap: 1rem;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.service-item.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.service-info {
    flex: 1;
}

.service-name {
    font-weight: 600;
    color: #0f0f10;
    margin-bottom: 0.25rem;
}

.service-price {
    color: #2563eb;
    font-weight: 700;
    font-size: 1.125rem;
}

.service-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-controls input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.quantity-controls input {
    width: 50px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

/* Services sélectionnés */
.selected-services-summary {
    background: #eff6ff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.selected-services-summary h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f0f10;
}

#selected-services-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selected-service-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
}

/* Récapitulatif */
.recap-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.recap-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f0f10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recap-section h3 i {
    color: #2563eb;
}

.recap-content {
    color: #374151;
    line-height: 1.8;
}

.recap-total {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    padding: 2rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.total-amount {
    font-size: 2rem;
}

.total-note {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Confirmation */
.confirmation-content {
    text-align: center;
    padding: 2rem 0;
}

.confirmation-content > p {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.confirmation-message {
    background: #d1fae5;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.confirmation-message p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #065f46;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.next-steps {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 2rem;
}

.next-steps h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    color: #374151;
}

.contact-info-box {
    background: #eff6ff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.contact-info-box h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f0f10;
}

.contact-info-box p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.contact-info-box i {
    color: #2563eb;
    width: 20px;
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    flex: 1;
    max-width: 250px;
}

.btn-prev {
    margin-right: auto;
}

.btn-next,
.btn-submit {
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .devis-form-container {
        padding: 1.5rem;
    }
    
    .devis-steps {
        gap: 0.5rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        max-width: 100%;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .service-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .total-line {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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