/* Modal de contact pour l'annuaire */

.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow-y: auto;
}

.contact-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
}

.contact-modal-container {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10002;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.contact-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-modal-header h3 {
    margin: 0;
    color: var(--cenc-brown);
    font-size: 1.5rem;
}

.contact-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.contact-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.contact-modal-body {
    padding: 2rem;
}

.contact-company-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--cenc-orange);
}

.contact-company-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--cenc-brown);
}

.contact-company-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

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

.contact-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--cenc-brown);
}

.contact-form-group label .required {
    color: #dc3545;
}

.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--cenc-orange);
}

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

.contact-form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.contact-btn {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.contact-btn-primary {
    background: var(--cenc-orange);
    color: white;
}

.contact-btn-primary:hover {
    background: var(--cenc-orange-dark);
}

.contact-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.contact-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.contact-btn-secondary:hover {
    background: #e0e0e0;
}

.contact-alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contact-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.contact-loading.active {
    display: block;
}

.contact-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--cenc-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .contact-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .contact-modal-header,
    .contact-modal-body,
    .contact-modal-footer {
        padding: 1.5rem;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .contact-modal-footer {
        flex-direction: column;
    }

    .contact-btn {
        width: 100%;
    }
}
