/* ===== Page Devis Styles ===== */

/* Hero Section */
.devis-hero {
    background: linear-gradient(135deg, var(--ats-blue-dark) 0%, var(--ats-blue-light) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--ats-white);
    position: relative;
    overflow: hidden;
}

.devis-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0 L60 30 L30 60 L0 30 Z" fill="rgba(255,255,255,0.02)"/></svg>');
    opacity: 0.1;
}

.devis-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.devis-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.devis-hero p {
    font-size: 20px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Container du formulaire */
.devis-container {
    background: var(--ats-white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* Barre de progression */
.devis-progress {
    margin-bottom: 40px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--ats-red);
    color: var(--ats-white);
    box-shadow: 0 0 0 4px rgba(227, 17, 47, 0.2);
}

.step.completed .step-number {
    background: var(--ats-blue-light);
    color: var(--ats-white);
    position: relative;
}

.step.completed .step-number:after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.step-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.step.active .step-label {
    color: var(--ats-red);
    font-weight: 600;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ats-red), var(--ats-blue-light));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Étapes du formulaire */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.form-step h3 {
    font-size: 28px;
    color: var(--ats-blue-dark);
    margin-bottom: 30px;
    text-align: center;
}

/* Grille des services */
.services-grid-devis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.service-card-devis {
    cursor: pointer;
    position: relative;
}

.service-card-inner {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card-devis.selected .service-card-inner {
    border-color: var(--ats-red);
    background: var(--ats-white);
    box-shadow: 0 10px 30px rgba(227, 17, 47, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--ats-blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--ats-white);
    transition: all 0.3s ease;
}

.service-card-devis.selected .service-icon {
    background: var(--ats-red);
    transform: scale(1.1) rotate(360deg);
}

.service-card-inner h4 {
    font-size: 20px;
    color: var(--ats-blue-dark);
    margin-bottom: 10px;
}

.service-card-inner p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.service-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--ats-red);
    font-size: 24px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.service-card-devis.selected .service-check {
    opacity: 1;
    transform: scale(1);
}

.service-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Champs du formulaire */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 0 0 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ats-blue-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ats-red);
    box-shadow: 0 0 0 4px rgba(227, 17, 47, 0.1);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Navigation du formulaire */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-prev {
    background: transparent;
    border: 2px solid var(--ats-red);
    color: var(--ats-red);
}

.btn-prev:hover {
    background: var(--ats-red);
    color: var(--ats-white);
}

.btn-next,
.btn-submit {
    background: var(--ats-red);
    color: var(--ats-white);
    border: 2px solid var(--ats-red);
    margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
    background: var(--ats-blue-dark);
    border-color: var(--ats-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(56, 41, 143, 0.3);
}

.btn-submit {
    position: relative;
    min-width: 250px;
}

.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline-block;
}

/* Récapitulatif */
.recap-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

.recap-section {
    margin-bottom: 30px;
}

.recap-section h4 {
    color: var(--ats-blue-dark);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ats-red);
}

.recap-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recap-service-tag {
    background: var(--ats-white);
    border: 2px solid var(--ats-red);
    border-radius: 50px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.recap-service-tag i {
    color: var(--ats-red);
}

.recap-table {
    width: 100%;
}

.recap-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.recap-table td {
    padding: 10px 0;
}

.recap-table td:first-child {
    font-weight: 600;
    color: var(--ats-blue-dark);
    width: 150px;
}

.recap-description {
    background: var(--ats-white);
    padding: 15px;
    border-radius: 10px;
    line-height: 1.8;
}

/* Message de succès */
.devis-success {
    text-align: center;
    padding: 60px 20px;
}

.success-animation {
    margin-bottom: 30px;
}

.success-animation i {
    font-size: 80px;
    color: #28a745;
    animation: scaleIn 0.5s ease;
}

.devis-success h3 {
    font-size: 32px;
    color: var(--ats-blue-dark);
    margin-bottom: 20px;
}

.devis-success p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

/* Cartes d'information */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-card {
    background: var(--ats-white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(227, 17, 47, 0.1);
}

.info-icon {
    width: 80px;
    height: 80px;
    background: var(--ats-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--ats-white);
}

.info-card h3 {
    font-size: 20px;
    color: var(--ats-blue-dark);
    margin-bottom: 15px;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* FAQ */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--ats-white);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h4 {
    font-size: 16px;
    color: var(--ats-blue-dark);
    margin: 0;
}

.faq-toggle {
    width: 30px;
    height: 30px;
    background: var(--ats-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ats-white);
    transition: all 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    background: var(--ats-blue-dark);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive */
@media (max-width: 992px) {
    .devis-hero h1 {
        font-size: 36px;
    }
    
    .devis-hero p {
        font-size: 18px;
    }
    
    .devis-container {
        padding: 30px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .progress-steps {
        display: none;
    }
    
    .devis-hero h1 {
        font-size: 28px;
    }
    
    .services-grid-devis {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
    }
}