/**
 * Page Contact - Style NEXGEN
 * Design moderne et cohérent avec le template Hemera
 */

/* ========================================
   HERO CONTACT
   ======================================== */
.contact-hero {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 159, 217, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.contact-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.contact-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #60a5fa 0%, #3b9fd9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-hero p {
    font-size: 1.25rem;
    color: #e5e7eb;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

/* ========================================
   INFORMATIONS DE CONTACT
   ======================================== */
.contact-info {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.contact-info h2 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.contact-info p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.contact-method:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    transform: translateX(5px);
    border-color: #3b9fd9;
    box-shadow: 0 4px 12px rgba(59, 159, 217, 0.15);
}

.contact-method-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, #1e88e5 0%, #3b9fd9 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.25);
}

.contact-method-content h3 {
    font-size: 1.125rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-method-content p {
    color: #64748b;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.contact-method-content a {
    color: #1e88e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-method-content a:hover {
    color: #1565c0;
}

/* WhatsApp QR Code */
.whatsapp-qr {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border-radius: 1rem;
    text-align: center;
}

.whatsapp-qr h3 {
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whatsapp-qr p {
    color: #16a34a;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.qr-code-container {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-code-container img {
    width: 200px;
    height: 200px;
    display: block;
}

/* ========================================
   FORMULAIRE DE CONTACT
   ======================================== */
.contact-form-wrapper {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.contact-form-wrapper h2 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-form-wrapper > p {
    color: #64748b;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #0f172a;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e88e5;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

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

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.form-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.875rem;
    color: #64748b;
}

.form-checkbox label a {
    color: #1e88e5;
    text-decoration: none;
}

.form-checkbox label a:hover {
    text-decoration: underline;
}

/* Captcha styling */
.form-captcha {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-captcha > div,
.g-recaptcha,
.h-captcha,
.captcha-container {
    transform: scale(1);
    transform-origin: 0 0;
}

@media (max-width: 480px) {
    .form-captcha > div,
    .g-recaptcha,
    .h-captcha,
    .captcha-container {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

.btn-submit {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #1e88e5 0%, #3b9fd9 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    margin-top: 1.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ========================================
   HORAIRES & LOCALISATION
   ======================================== */
.additional-info {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.info-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #1e88e5;
}

.info-card h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-card h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #1e88e5;
    border-radius: 50%;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-day {
    color: #64748b;
    font-weight: 500;
}

.schedule-hours {
    color: #0f172a;
    font-weight: 600;
}

.schedule-hours.closed {
    color: #ef4444;
}

.location-info p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.location-info strong {
    color: #0f172a;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info {
        position: static;
    }
    
    .additional-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 5rem 0 4rem;
    }
    
    .contact-hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-hero p {
        font-size: 1.125rem;
    }
    
    .contact-container {
        padding: 3rem 1.5rem;
    }
    
    .contact-info,
    .contact-form-wrapper,
    .info-card {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .whatsapp-qr {
        padding: 1.5rem;
    }
    
    .qr-code-container img {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .contact-hero h1 {
        font-size: 2rem;
    }
    
    .contact-hero p {
        font-size: 1rem;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-method-icon {
        margin: 0 auto;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-method,
.info-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.contact-method:nth-child(1) { animation-delay: 0.1s; }
.contact-method:nth-child(2) { animation-delay: 0.2s; }
.contact-method:nth-child(3) { animation-delay: 0.3s; }

/* ========================================
   ALERTES JOOMLA
   ======================================== */
/* Le container de messages reste visible initialement, JS le déplacera */

/* Container des messages dans le formulaire */
#contact-messages-container {
    margin: 1.5rem 0;
}

#contact-messages-container:empty {
    display: none;
}

/* Style de base des messages dans le formulaire */
#contact-messages-container .joomla-alert,
#contact-messages-container .alert,
#contact-messages-container [role="alert"],
.contact-form-wrapper .joomla-alert,
.contact-form-wrapper .alert {
    position: relative;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    animation: fadeInUp 0.4s ease-out;
}

/* Masquer les éléments visuellement cachés */
#contact-messages-container .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Message de succès - Vert */
#contact-messages-container .joomla-alert:has(.success),
#contact-messages-container [role="alert"]:has(.success),
#contact-messages-container .alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #16a34a;
    color: #15803d;
}

/* Message d'erreur - Rouge */
#contact-messages-container .joomla-alert:has(.error),
#contact-messages-container .joomla-alert:has(.danger),
#contact-messages-container [role="alert"]:has(.error),
#contact-messages-container .alert-error,
#contact-messages-container .alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #dc2626;
    color: #991b1b;
}

/* Message d'avertissement - Orange */
#contact-messages-container .joomla-alert:has(.warning),
#contact-messages-container [role="alert"]:has(.warning),
#contact-messages-container .alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
    color: #92400e;
}

/* Message d'info - Bleu */
#contact-messages-container .joomla-alert:has(.info),
#contact-messages-container [role="alert"]:has(.info),
#contact-messages-container .alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* Style des titres de message */
#contact-messages-container .alert-heading {
    display: none; /* Masquer l'icône par défaut */
}

/* Style du contenu du message */
#contact-messages-container .alert-message,
#contact-messages-container .alert-wrapper {
    font-weight: 500;
}

/* Bouton de fermeture */
#contact-messages-container .joomla-alert--close,
#contact-messages-container .close,
#contact-messages-container button[aria-label*="Fermer"],
#contact-messages-container button[aria-label*="Close"] {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: currentColor;
    opacity: 0.5;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s ease;
}

#contact-messages-container .joomla-alert--close:hover,
#contact-messages-container .close:hover,
#contact-messages-container button[aria-label*="Fermer"]:hover,
#contact-messages-container button[aria-label*="Close"]:hover {
    opacity: 1;
}

/* Messages en haut de page sur contact - seront masqués par JS après déplacement */
.is-contact #system-message-container {
    /* Ne pas masquer immédiatement, laisser JS faire son travail */
}

/* Fallback pour les messages en haut (autres pages) */
#system-message-container .joomla-alert,
#system-message-container .alert {
    padding: 1.5rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.6;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.joomla-alert.alert-success,
.alert-success {
    background: #e8f5e9;
    border-left-color: #4caf50;
    color: #1b5e20;
}

.joomla-alert.alert-error,
.alert-error,
.alert-danger {
    background: #ffebee;
    border-left-color: #f44336;
    color: #b71c1c;
}

.joomla-alert.alert-warning,
.alert-warning {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
}

.joomla-alert.alert-info,
.alert-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #0d47a1;
}

.joomla-alert h4,
.alert h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.joomla-alert p,
.alert p {
    margin: 0;
}

.joomla-alert button.close,
.alert button.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    float: right;
    padding: 0;
    margin: -0.5rem 0 0 0;
}

.joomla-alert button.close:hover,
.alert button.close:hover {
    opacity: 1;
}
