/* ==========================================================================
   Contact Page Specific Styles
   ========================================================================== */

/* Contact Hero */
.contact-hero {
    padding: calc(120px + var(--g-lg)) 0 var(--g-xl);
    background: linear-gradient(135deg, var(--paper) 0%, rgba(191, 161, 116, 0.05) 100%);
    text-align: center;
}

.contact-hero-content .overline {
    color: var(--gold-500);
    margin-bottom: var(--g-xs);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
    font-weight: var(--font-medium);
}

.contact-hero h1 {
    margin-bottom: var(--g-sm);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-hero .lead {
    max-width: 700px;
    margin: 0 auto;
    font-size: 20px;
    color: var(--ink-700);
    line-height: 1.6;
}

/* Contact Grid */
.section-contact-grid {
    padding: var(--g-xl) 0;
    background: white;
}

.grid-contact {
    display: grid;
    grid-template-columns: 520px 1fr;
    gap: var(--g-xl);
    align-items: start;
    min-height: 600px;
}

/* Contact Form */
.contact-form {
    background: var(--paper);
    padding: var(--g-lg);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(191, 161, 116, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--g-sm);
}

.form-group {
    margin-bottom: var(--g-md);
}

.form-group label {
    display: block;
    font-weight: var(--font-medium);
    margin-bottom: 8px;
    color: var(--ink-900);
    font-size: 15px;
}

.required {
    color: var(--gold-500);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e5e5;
    border-radius: var(--r-md);
    font-size: 16px;
    background: white;
    transition: all var(--transition-base);
    font-family: var(--font-body);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--gold-300);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(191, 161, 116, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* Checkbox */
.checkbox-group {
    margin-bottom: var(--g-md);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--gold-500);
    flex-shrink: 0;
}

.checkbox-text {
    line-height: 1.5;
    font-size: 15px;
}

/* Error messages */
.error-message {
    display: block;
    font-size: 14px;
    color: #dc2626;
    margin-top: 6px;
    min-height: 20px;
    font-weight: var(--font-medium);
}

.has-error input,
.has-error textarea,
.form-group input.error,
.form-group textarea.error {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.02);
}

.has-error input:focus,
.has-error textarea:focus,
.form-group input.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Success message */
.form-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--g-sm);
    border-radius: var(--r-md);
    margin-top: var(--g-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.form-success svg {
    flex-shrink: 0;
}

.form-success p {
    margin: 0;
    font-weight: var(--font-medium);
}

/* Submit button */
.contact-form .btn-primary {
    width: 100%;
    margin-top: var(--g-sm);
    padding: 16px 32px;
    font-size: 17px;
}

/* Business Card Component */
.col-business-card {
    position: sticky;
    top: calc(120px + var(--g-sm));
}

.business-card {
    position: relative;
    background-image: url('../../media/image/Accueil/villa-castellane-portrait-nuit-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-hard);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    min-height: 500px;
    width: 100%;
}

.business-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

/* Dark overlay for better text readability */
.business-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 18, 21, 0.88) 0%,
        rgba(15, 18, 21, 0.78) 40%,
        rgba(191, 161, 116, 0.15) 100%
    );
    z-index: 1;
}

/* Premium gold accent line */
.business-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--gold-300), transparent);
    opacity: 0.8;
    z-index: 2;
}

/* Additional golden corner accent */
.business-card-content::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    background: var(--gold-500);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    z-index: -1;
    opacity: 0.7;
}

.business-card-content {
    position: relative;
    z-index: 3;
    padding: var(--g-xl) var(--g-lg) var(--g-xl) calc(var(--g-xl) + var(--g-md));
    color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}

.business-card h3 {
    font-size: 28px;
    font-weight: var(--font-bold);
    color: var(--gold-200);
    margin-bottom: var(--g-md);
    line-height: 1.2;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
    max-width: 320px;
}

.business-card address {
    font-style: normal;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: var(--g-md);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.business-card-email {
    font-size: 18px;
    font-weight: var(--font-semibold);
    color: var(--gold-200);
    text-decoration: none;
    margin-bottom: var(--g-lg);
    display: inline-block;
    transition: color var(--transition-base);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.business-card-email:hover {
    color: var(--gold-100);
}

.business-card-social {
    display: flex;
    gap: var(--g-xs);
    align-items: center;
}

.business-card .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    color: #fff;
}

.business-card .social-icon:hover {
    background: var(--gold-500);
    border-color: var(--gold-500);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(191, 161, 116, 0.4);
    color: var(--ink-900);
}

.business-card .social-icon svg {
    width: 22px;
    height: 22px;
    transition: transform var(--transition-base);
}

.business-card .social-icon:hover svg {
    transform: scale(1.1);
}

/* Map Section */
.section-map {
    padding: var(--g-xl) 0;
    background: var(--paper);
}

/* Map container - reduced max-width for nearly full width */
.container-map {
    max-width: calc(100vw - 48px); /* Much wider than normal container */
    margin: 0 auto;
    padding: 0 24px;
}

.section-map .section-header {
    margin-bottom: var(--g-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-map .overline {
    color: var(--gold-500);
    margin-bottom: var(--g-xs);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
    font-weight: var(--font-medium);
}

.section-map h2 {
    margin-bottom: var(--g-sm);
}

.map-intro {
    max-width: 700px;
    margin: 0 auto;
    color: var(--ink-700);
    font-size: 18px;
    line-height: 1.6;
}

/* Map wrapper for positioning overlay */
.map-wrapper {
    position: relative;
    margin-top: var(--g-lg);
}

.map-embed {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.map-embed iframe {
    display: block;
    width: 100%;
    border: none;
}

/* Address overlay - positioned in top-left corner */
.map-overlay {
    position: absolute;
    top: var(--g-sm);
    left: var(--g-sm);
    z-index: 10;
    background: rgba(246, 243, 238, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--r-md);
    padding: var(--g-sm);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(191, 161, 116, 0.2);
    max-width: 280px;
    transition: all var(--transition-base);
}

.map-overlay:hover {
    background: rgba(246, 243, 238, 0.98);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.overlay-content h3 {
    font-size: 16px;
    font-weight: var(--font-semibold);
    color: var(--gold-600);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-content h3::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--gold-500);
    border-radius: 50%;
    flex-shrink: 0;
}

.overlay-content address {
    font-style: normal;
    line-height: 1.5;
    font-size: 14px;
    color: var(--ink-700);
    margin: 0 0 12px 0;
}

.overlay-actions {
    border-top: 1px solid rgba(191, 161, 116, 0.15);
    padding-top: 12px;
}

.overlay-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: var(--font-medium);
    color: var(--gold-600);
    text-decoration: none;
    transition: color var(--transition-base);
}

.overlay-phone::before {
    content: "📞";
    font-size: 12px;
}

.overlay-phone:hover {
    color: var(--gold-500);
}

/* Form Validation States */
.form-group.is-valid input,
.form-group.is-valid textarea {
    border-color: #10b981;
}

.form-group.is-valid input:focus,
.form-group.is-valid textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Success message from JS */
.form-success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--g-md);
    border-radius: var(--r-lg);
    margin: var(--g-md) 0;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
    animation: slideInUp 0.5s ease-out;
}

.form-success-message svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.form-success-message p {
    margin: 0;
    font-weight: var(--font-medium);
    line-height: 1.5;
}

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

/* Loading state */
.btn-primary.is-loading {
    opacity: 0.8;
    pointer-events: none;
    position: relative;
}

.btn-primary.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-contact {
        grid-template-columns: 1fr;
        gap: var(--g-lg);
    }
    
    .col-business-card {
        position: static;
        order: -1; /* Business card appears first on mobile */
    }
    
    .business-card {
        min-height: 400px;
    }
    
    /* Map responsive adjustments */
    .container-map {
        max-width: calc(100vw - 32px);
        padding: 0 16px;
    }
    
    .map-overlay {
        position: static;
        margin-top: var(--g-sm);
        max-width: none;
        background: white;
        backdrop-filter: none;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding-top: calc(80px + var(--g-md));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: var(--g-md);
    }
    
    .business-card {
        min-height: 350px;
    }
    
    .business-card-content {
        padding: var(--g-md) var(--g-sm) var(--g-md) var(--g-lg);
        min-height: 350px;
    }
    
    .business-card h3 {
        font-size: 24px;
    }
    
    .checkbox-label {
        font-size: 14px;
    }
    
    /* Map mobile optimizations */
    .container-map {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .map-embed iframe {
        height: 400px; /* Slightly smaller on mobile */
    }
    
    .overlay-content h3 {
        font-size: 15px;
    }
    
    .overlay-content address {
        font-size: 13px;
    }
    
    .overlay-phone {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        padding: calc(80px + var(--g-sm)) 0 var(--g-lg);
    }
    
    .contact-form {
        padding: var(--g-sm);
    }
    
    .business-card {
        min-height: 320px;
    }
    
    .business-card-content {
        padding: var(--g-sm) var(--g-xs) var(--g-sm) var(--g-md);
        min-height: 320px;
    }
    
    .business-card h3 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .business-card address {
        font-size: 15px;
        margin-bottom: 16px;
    }
    
    .business-card-email {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .business-card .social-icon {
        width: 42px;
        height: 42px;
    }
    
    .business-card .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Very small screen map adjustments */
    .container-map {
        padding: 0 12px;
    }
    
    .map-embed iframe {
        height: 350px; /* Smaller on very small screens */
    }
    
    .map-overlay {
        padding: 16px;
    }
    
    .overlay-content h3 {
        font-size: 14px;
    }
    
    .overlay-content address {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .overlay-phone {
        font-size: 12px;
    }
}