/**
 * Styles de la page contact - Design "Neuro-Tech"
 * Simple et cohérent
 */

/* ======================================
   CONTACT SECTION BACKGROUND
====================================== */
.contact-page-section {
    background: #1e293b; /* Dark slate like home contact */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) inset, 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Background glow */
.contact-page-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1000px;
    height: 100%;
    max-height: 1000px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.contact-page-section .container {
    position: relative;
    z-index: 1;
}

/* ======================================
   CONTACT HEADER
====================================== */
.contact-header h1 {
    color: white !important;
    background: none !important;
    -webkit-text-fill-color: white !important;
    font-weight: 800;
    margin-bottom: 2rem;
}

.contact-header .lead {
    color: var(--text-color) !important;
    font-size: 1.25rem;
}

.contact-header p {
    color: var(--text-muted) !important;
}

/* ======================================
   CONTACT FORM STYLES
====================================== */
#contact-form-container label {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#contact-form-container .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.75rem 1rem;
}

#contact-form-container .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    color: white;
}

#contact-form-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#contact-form-container .form-text {
    color: var(--text-muted);
}

#contact-form-container .btn-close {
    filter: invert(1) brightness(2);
}

/* ======================================
   CAPTCHA STYLING
====================================== */
.captcha-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.captcha-image-container img {
    background: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

/* Style pour le champ de saisie du captcha */
.captcha-input-container input[type="text"] {
    max-width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.captcha-input-container input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    outline: none;
}

/* ======================================
   SUCCESS MESSAGE
====================================== */
#contact-form-container .success-message {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    color: #d1fae5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#contact-form-container .success-message h4 {
    color: #34d399;
    font-weight: 700;
    font-size: 1.5rem;
}

#contact-form-container .success-message i {
    color: #34d399;
}

#contact-form-container .success-message hr {
    border-color: rgba(16, 185, 129, 0.2);
    margin: 1.5rem 0;
}

#contact-form-container .success-message .btn {
    border-color: #34d399;
    color: #34d399;
}

#contact-form-container .success-message .btn:hover {
    background: #34d399;
    color: #064e3b;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

/* ======================================
   PROCESSING INDICATOR (HTMX Native)
====================================== */
/* État par défaut : caché */
.htmx-indicator {
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-in;
}

/* État ACTIF : Quand HTMX ajoute la classe .htmx-request */
/* Utilisation de l'ID pour garantir la priorité CSS sur le display:none */
#processing-indicator.htmx-request,
.htmx-indicator.htmx-request {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Configuration de l'overlay fullscreen */
#processing-indicator {
    display: none; /* Caché structurellement par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in-out;
}

.spinner-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 1rem;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease-out;
}

.spinner-content h5 {
    color: white;
    font-weight: 600;
    margin: 0;
}

.spinner-content .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.spinner-content .progress {
    background: rgba(255, 255, 255, 0.1);
}

.spinner-content .progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.spinner-content .spinner-border {
    border-width: 0.3rem;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ======================================
   SPAM WARNING MESSAGE
====================================== */
#contact-form-container .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    color: #fef3c7;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#contact-form-container .alert-warning h4 {
    color: #fbbf24;
    font-weight: 700;
    font-size: 1.5rem;
}

#contact-form-container .alert-warning i.fa-triangle-exclamation {
    color: #fbbf24;
}

#contact-form-container .alert-warning hr {
    border-color: rgba(245, 158, 11, 0.2);
    margin: 1.5rem 0;
}

#contact-form-container .alert-warning .btn-outline-warning {
    border-color: #fbbf24;
    color: #fbbf24;
}

#contact-form-container .alert-warning .btn-outline-warning:hover {
    background: #fbbf24;
    color: #78350f;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

#contact-form-container .alert-warning .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

#contact-form-container .alert-warning .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}
