﻿/* Styles pour l'estimateur de prix - Module indépendant */

.estimator-widget {
    position: absolute;
    right: 2rem;
    top: 5%;
    z-index: 10;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) rgba(255, 255, 255, 0.3);
    padding: 1rem 1rem 1rem 1rem;
}

.estimator-widget::-webkit-scrollbar {
    width: 8px;
}

.estimator-widget::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.estimator-widget::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

.estimator-widget::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

.estimator-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.estimator-header {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.estimator-header h3 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.estimator-subtitle {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    opacity: 0.95;
}

.estimator-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #DC143C);
    width: 0%;
    transition: width 0.4s ease;
}

.estimator-content {
    padding: 1.5rem 1rem;
}

.estimator-content h4 {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-weight: 600;
}

.estimator-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
}

.estimator-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.8rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    color: #333;
    text-align: center;
    word-break: break-word;
    min-height: 90px;
}

.estimator-option:hover {
    background: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 183, 0.15);
}

.option-icon {
    font-size: 1.8rem;
}

.btn-back {
    margin-top: 1.5rem;
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.estimator-result {
    animation: fadeIn 0.5s ease-in;
}

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

.result-price-box {
    background: var(--color-primary);
    color: white;
    padding: 2rem 2rem 2rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-price-box h4 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: white;
}

.price-range {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0;
    letter-spacing: -1px;
}

.result-info {
    font-size: 0.85rem;
    opacity: 0.95;
    line-height: 1.6;
    margin: 1rem 0 0 0;
}

.result-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-details h5 {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.8rem 0 0.3rem 0;
    text-transform: uppercase;
}

.result-details h5:first-child {
    margin-top: 0;
}

.result-details p {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.result-cta {
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-quote-popup {
    background: linear-gradient(135deg, #DC143C 0%, #B91224 50%, #A01020 100%);
    color: #ffffff;
    border: 2px solid #FFFFFF;
    padding: 1.2rem 2.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.4), 0 0 20px rgba(220, 20, 60, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
    animation: neonGoldPulse 2s ease-in-out infinite;
}

@keyframes neonGoldPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(220, 20, 60, 0.3), 0 0 20px rgba(220, 20, 60, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(220, 20, 60, 0.5), 0 0 30px rgba(220, 20, 60, 0.3);
    }
}

.btn-quote-popup:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.6), 0 0 40px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 50%, #B91224 100%);
}

.btn-quote-popup:active {
    transform: translateY(-1px);
}

.btn-reset {
    width: 100%;
    background: #000;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Bouton de fermeture de l'estimateur */
.estimator-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.estimator-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* Bouton de toggle mobile */
.estimator-toggle {
    display: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .estimator-widget {
        position: fixed;
        right: -100%;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        max-width: 90%;
        width: 400px;
        max-height: 90vh;
        overflow-y: auto;
        padding: 0 1rem 0 0;
        z-index: 1000;
        transition: right 0.4s ease;
    }
    
    .estimator-widget.open {
        right: 0;
    }
    
    .estimator-close {
        display: block;
    }
    
    .estimator-toggle {
        display: block;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        background: var(--color-primary);
        color: white;
        border: none;
        border-radius: 10px 0 0 10px;
        padding: 1.5rem 0.8rem;
        cursor: pointer;
        z-index: 999;
        font-weight: 700;
        font-size: 0.9rem;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        box-shadow: -3px 0 10px rgba(0,0,0,0.2);
        transition: all 0.3s;
    }
    
    .estimator-toggle:hover {
        background: var(--color-accent);
        padding-right: 1rem;
    }
    
    .estimator-widget.open + .estimator-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .estimator-widget {
        position: fixed;
        right: 1rem;
        left: 1rem;
        top: auto;
        bottom: 80px;
        transform: translateX(120%);
        max-width: 100%;
        max-height: 70vh;
        padding: 0;
        width: auto;
        transition: transform 0.4s ease;
    }
    
    .estimator-widget.open {
        transform: translateX(0);
    }
    
    .estimator-card {
        border-radius: 16px;
    }
    
    .estimator-header h3 {
        font-size: 1.2rem;
    }

    .estimator-content {
        padding: 1.2rem 0.8rem;
    }
    
    .estimator-content h4 {
        font-size: 1rem;
    }

    .estimator-options {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    
    .estimator-option {
        padding: 0.7rem 0.4rem;
        font-size: 0.8rem;
        min-height: 80px;
    }
    
    .option-icon {
        font-size: 1.5rem;
    }

    .price-range {
        font-size: 2rem;
    }
    
    .result-price-box {
        padding: 1.5rem;
    }
    
    .estimator-toggle {
        padding: 1.2rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .quote-popup {
        padding: 24px;
        max-width: calc(100vw - 2rem);
    }

    .quote-popup h3 {
        font-size: 20px;
    }

    .popup-price {
        font-size: 18px;
    }
}

/* Animation de scroll pour la grille */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Popup de devis */
.quote-popup-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: 10000;
    padding: 20px;
}

.quote-popup {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #DC143C;
}

.quote-popup h3 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #111;
}

.popup-price {
    font-size: 20px;
    font-weight: 700;
    color: #DC143C;
    margin-bottom: 24px;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-form .form-group {
    display: flex;
    flex-direction: column;
}

.quote-form label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.quote-form input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.quote-form input:focus {
    outline: none;
    border-color: #DC143C;
}

.btn-submit-quote {
    background: linear-gradient(135deg, #DC143C 0%, #B91224 50%, #A01020 100%);
    color: #ffffff;
    border: 2px solid #FFFFFF;
    padding: 14px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.4), 0 0 20px rgba(220, 20, 60, 0.2);
    animation: neonGoldPulse 2s ease-in-out infinite;
}

.btn-submit-quote:hover {
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 50%, #B91224 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.6), 0 0 40px rgba(220, 20, 60, 0.4);
}

.quote-success {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    line-height: 1.6;
}

/* Styles pour le formulaire de l'étape 8 */
.estimator-form-step {
    padding: 0;
}

.estimator-form-step h4 {
    font-size: 1.25rem;
    color: #333;
    margin: 0 0 0.4rem 0;
    text-align: center;
    font-weight: 700;
}

.form-subtitle {
    text-align: center;
    color: #DC143C;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.estimator-contact-form .form-group {
    margin-bottom: 0.7rem;
}

.estimator-contact-form input {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.estimator-contact-form input:focus {
    outline: none;
    border-color: #DC143C;
}

.estimator-contact-form input::placeholder {
    color: #999;
    font-size: 0.9rem;
}

.btn-submit-estimator {
    width: 100%;
    background: linear-gradient(135deg, #DC143C 0%, #B91224 50%, #A01020 100%);
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.3);
    font-family: inherit;
}

.btn-submit-estimator:hover {
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 50%, #B91224 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 20, 60, 0.4);
}

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

.estimator-success {
    display: none;
    text-align: center;
    padding: 1.5rem 0;
}

.estimator-success .success-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.estimator-success h4 {
    color: #155724;
    font-size: 1rem;
    margin: 0 0 0.3rem 0;
    font-weight: 600;
}

.estimator-success p {
    color: #155724;
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 480px) {
    .estimator-widget {
        bottom: 70px;
        max-height: 65vh;
    }
    
    .estimator-header h3 {
        font-size: 1.1rem;
    }
    
    .estimator-content h4 {
        font-size: 0.95rem;
    }
    
    .estimator-option {
        font-size: 0.75rem;
        min-height: 75px;
    }
    
    .price-range {
        font-size: 1.8rem;
    }
}