/* ===================================
   CONTACT MODAL STYLES
   Phoenix On Wire - Formulaire de Contact
   =================================== */

/* --- Contact Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid rgba(255, 107, 74, 0.3);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(255, 107, 74, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(255, 107, 74, 0.2);
    color: var(--primary-orange);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--heading-color);
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-header p {
    color: var(--text-color);
    font-size: 1em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--heading-color);
    font-size: 0.95em;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    background: rgba(255, 107, 74, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    margin-top: 10px;
}

.submit-btn {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

/* Spinner animation */
.spinner {
    animation: rotate 1s linear infinite;
}

.spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.form-result {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
}

.form-result.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-result.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Light mode adjustments */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    background: rgba(255, 107, 74, 0.05);
}

/* --- Responsive Modal --- */
@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 1.5em;
    }
}
