/* =========================================
   Contact Modal (Typeform Style)
   ========================================= */

.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.contact-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.close-modal-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: transform 0.2s ease;
    z-index: 100;
}

.close-modal-btn:hover {
    transform: rotate(90deg);
}

.modal-progress {
    width: 100%;
    height: 4px;
    background: #f1f5f9;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: transparent;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.4s ease;
}

.modal-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.form-step {
    display: none;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Animations for slide transitions could be enhanced here */

.step-number {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-total {
    color: var(--color-text-light);
    font-weight: 400;
    font-size: 0.9rem;
}

.form-step h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.step-desc {
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.modal-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    font-size: 1.8rem;
    padding: 0.5rem 0;
    background: transparent;
    color: var(--color-text);
    margin-bottom: 2.5rem;
    border-radius: 0;
    font-family: var(--font-heading);
    transition: border-color 0.3s ease;
}

.modal-input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}

.modal-input::placeholder {
    color: #cbd5e1;
}

select.modal-input {
    cursor: pointer;
}

.step-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-next,
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

.btn-text:hover {
    color: var(--color-text);
}

.press-enter {
    margin-left: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
    opacity: 0.7;
    display: none;
}

@media(min-width: 768px) {
    .press-enter {
        display: block;
    }
}

/* Shake Animation for Error */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }

    75% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

.modal-input.error {
    border-bottom-color: #ef4444;
}

/* ====== RESPONSIVE MOBILE — MODAL CONTACT ====== */
@media (max-width: 768px) {
    .close-modal-btn {
        top: 1rem;
        right: 1rem;
    }

    .modal-content {
        padding: 1.5rem 1.25rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .form-step h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .step-desc {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }

    .modal-input {
        font-size: 1.25rem;
        padding: 0.5rem 0;
        margin-bottom: 1.75rem;
    }

    /* Empêcher le zoom iOS sur les inputs */
    .modal-input,
    select.modal-input {
        font-size: 16px;
    }

    .step-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    .btn-text {
        width: 100%;
        text-align: center;
        padding: 0.6rem;
    }

    .step-number {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
        padding-top: 2.5rem;
    }

    .form-step h2 {
        font-size: 1.3rem;
    }

    .step-desc {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .modal-input {
        font-size: 16px;
        margin-bottom: 1.5rem;
    }
}