/* ===================================
   CONTACT SECTION: PREMIUM BENTO GRID (COMPACT)
   =================================== */

.contact-section {
    padding: var(--space-12) 0;
    /* Réduit de space-20 */
    /* Transparent to show global gradient */
    background: transparent;
    background-image:
        radial-gradient(at 0% 0%, rgba(var(--accent-rgb), 0.02) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(102, 126, 234, 0.02) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
}

/* --- LAYOUT GRID SYSTEM --- */
.contact-container {
    max-width: 1100px;
    /* Plus étroit pour éviter que ça s'étale trop */
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    gap: 24px;
    /* Réduit de 32px -> 24px */
}

/* Rangée 1 : Intro + Quick Form */
.contact-row-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Rangée 2 : Standard Form + Map */
.contact-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .contact-row-1 {
        grid-template-columns: 360px 1fr;
        /* Carte gauche plus compacte */
        align-items: stretch;
    }

    .contact-row-2 {
        grid-template-columns: 1.1fr 0.9fr;
        /* Formulaire un peu plus large */
        align-items: stretch;
    }
}

/* --- BENTO CARDS DESIGN --- */
.contact-card {
    background: var(--bg-elevated);
    border-radius: 24px;
    /* Réduit de 32px -> 24px pour échelle plus petite */
    padding: 28px;
    /* Réduit de 40px -> 28px */

    /* Effet de profondeur subtil mais présent */
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 10px 15px -3px rgba(0, 0, 0, 0.03);

    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease-out,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px) scale(1.002);
    /* Mouvement plus subtil */
    box-shadow:
        0 15px 25px -5px rgba(0, 0, 0, 0.06),
        0 30px 50px -10px rgba(0, 0, 0, 0.04);
    border-color: rgba(var(--accent-rgb), 0.1);
    /* Highlight bordure au hover */
    z-index: 10;
}

/* 1. Carte Intro (Premium) */
.contact-card-intro {
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
}

.contact-card-intro .contact-card-title {
    margin-bottom: 0px;
    font-size: 1.25rem;
}

/* Intro Card Header (Round 7) */
.contact-intro-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-color), rgba(var(--accent-rgb), 0.5));
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-elevated);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid var(--bg-elevated);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.contact-availability {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 4px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    transform: translateX(8px);
    background: var(--bg-elevated);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}


/* Titre Hero */
.contact-hero-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    /* Réduit de 3rem -> 2.2rem */
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0;
    letter-spacing: -0.03em;
}

.contact-header-centered {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.title-accent-dot {
    color: var(--accent-color);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Info Items */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Réduit */
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    /* Plus compact */
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.contact-info-item:hover {
    background: var(--bg-elevated);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateX(4px);
}

.contact-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-outline {
    fill: none !important;
    /* Force no fill */
}

/* Protection Téléphone */
.protection-trigger {
    cursor: pointer;
    position: relative;
}

.protective-blur {
    filter: blur(5px);
    transition: filter 0.3s ease;
    user-select: none;
    background: rgba(0, 0, 0, 0.05);
    padding: 0 4px;
    border-radius: 4px;
}

.reveal-hint {
    display: block;
    font-size: 0.65rem;
    color: var(--accent-color);
    opacity: 0.8;
    margin-top: 2px;
    font-style: italic;
    transition: opacity 0.3s ease;
    padding-right: 12px;
}

/* Modal de Vérification (Premium Glass) */
.verify-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.verify-modal.active {
    opacity: 1;
    pointer-events: auto;
}

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

.verify-modal-card {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: var(--bg-elevated);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    text-align: center;
}

.verify-modal.active .verify-modal-card {
    transform: translateY(0);
}

.verify-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.verify-modal-close:hover {
    color: var(--accent-color);
}

.verify-icon {
    width: 70px;
    height: 70px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.verify-modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.verify-modal-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.verify-input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.verify-input-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.verify-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.verify-error-msg {
    color: #ef4444 !important;
    font-size: 0.85rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-weight: 600;
}

.verify-success-checkmark {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-bottom: 1rem;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


.contact-info-item:hover .contact-icon-box {
    transform: rotate(-10deg) scale(1.1);
}

.contact-info-text strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.contact-info-text span {
    font-size: 0.95rem;
    /* Réduit */
    font-weight: 600;
    color: var(--text-primary);
}

/* Socials */
.contact-socials {
    margin-top: 10px;
}

.contact-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-social-link:hover {
    background: #0077b5;
    /* LinkedIn Color */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.3);
}

/* Unified Hover Effect for all Contact Items */
.contact-info-item:hover {
    background: rgba(var(--accent-rgb), 0.05);
}

.contact-info-item:hover .contact-icon-box {
    background: var(--accent-color) !important;
    color: white !important;
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}

/* Specific box colors (already set to pinkish but keeping for clarity) */
.box-mail,
.box-phone,
.linkedin-box,
.box-location {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
}

/* 2. Carte Fill-in-the-blank (Clean & Interactive) */
.contact-card-fillblank {
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fillblank-title {
    font-size: 1.2rem;
    /* Réduit */
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--text-primary), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fillblank-form p {
    font-size: 1rem;
    line-height: 2.2;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.fillblank-contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
}


.fillblank-input {
    border: none;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    padding: 0 4px 2px 4px;
    margin: 4px 0;
    width: 140px;
    max-width: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.fillblank-input[name="nom"] {
    width: 180px;
}

.fillblank-input[name="projet"],
.fillblank-input[name="reason"] {
    width: 200px;
}

.fillblank-input[name="email"] {
    width: 240px;
}

.fillblank-input[name="details"] {
    width: 220px;
}

.fillblank-input[name="date"] {
    width: 130px;
}

.fillblank-input[name="phone"] {
    width: 125px;
}


.fillblank-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.06);
}

.fillblank-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
    font-style: italic;
    font-size: 0.9em;
}

/* 3. Carte Standard Form */
.contact-card-form {
    background: var(--bg-elevated);
}

.form-header {
    margin-bottom: 1.5rem;
}

.contact-card-title {
    font-size: 1.3rem;
    /* Réduit */
    font-weight: 700;
    margin-bottom: 4px;
}

.standard-form-grid {
    display: grid;
    gap: 16px;
    /* Réduit de 20px */
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-input-styled {
    width: 100%;
    padding: 12px 16px;
    /* Réduit 16px 20px -> 12px 16px */
    border: 1px solid var(--border-color);
    /* Bordure adaptative */
    border-radius: 12px;
    /* Arrondi cohérent */
    background: var(--bg-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    /* Réduit */
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input-styled:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    transform: translateY(-1px);
}

textarea.form-input-styled {
    resize: vertical;
    min-height: 100px;
    /* Réduit de 140px */
    line-height: 1.5;
}

.form-input-styled::placeholder {
    color: var(--text-tertiary);
    opacity: 0.8;
}

/* 4. Carte Map (Visuelle) */
.contact-card-map {
    border-radius: 24px;
    padding: 0;
    min-height: 320px;
    /* Réduit de 400px minimum */
    background: var(--bg-secondary);
}

.map-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 24px;
    overflow: visible;
    /* Fix for Chrome clipping absolute elements */
}

.map-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Show full map */
    object-position: center;
    padding: 0px;
    /* Breathing room */
    transition: transform 0.3s ease-out;
}

.contact-card-map:hover .map-img {
    transform: scale(1.05);
    /* Zoom fluide */
}

/* Dark mode map adjustment */
[data-theme="dark"] .map-img {
    filter: invert(0.88) hue-rotate(180deg) brightness(1.3) contrast(1.2) saturate(0.5);
    /* Better dark mode map: Inverted but blue-ish, brighter lines */
    opacity: 1;
}

/* Arrows in dark mode - Make them bright */
[data-theme="dark"] .marker-svg path[stroke="#26214D"],
[data-theme="dark"] .arrow-carhaix-svg path[stroke="#26214D"] {
    stroke: #E0E7FF;
    /* Very light indigo/white for visibility */
}

[data-theme="dark"] .arrow-carhaix-svg path[fill="#26214D"] {
    fill: #E0E7FF;
}

/* Boutons */
.btn-submit-premium {
    margin-top: 0.5rem;
    padding: 12px 28px;
    /* Plus compact */
    background: linear-gradient(135deg, #222 0%, #333 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-submit-premium svg {
    transition: transform 0.3s ease;
}

.btn-submit-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--accent-color) 0%, rgba(var(--accent-rgb), 0.5) 100%);
}

.btn-submit-premium:hover svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .contact-section {
        padding-bottom: 2rem;
    }

    .contact-container {
        padding: 0 16px;
        gap: 24px;
    }

    .contact-row-1,
    .contact-row-2 {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* Hide redundant forms on mobile as requested */
    .contact-card-fillblank,
    .contact-card-form {
        display: none !important;
    }

    /* Show Quick Contact & Map */
    .contact-card-intro,
    .contact-card-map {
        display: block !important;
        width: 100%;
    }

    .contact-card-map {
        min-height: 400px;
        /* Give space for the active map */
        padding: 10px;
    }

    .contact-card {
        padding: 24px;
        border-radius: 24px;
    }

    .contact-hero-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    /* Adjust map wrapper for mobile */
    .map-wrapper {
        transform: scale(0.9);
        transform-origin: center center;
    }
}

/* --- FORM STATUS MESSAGES --- */
.form-status-message {
    margin-top: 1rem;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
    text-align: center;
}

.form-status-message.show {
    display: block;
}

.form-status-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

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

.form-status-message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}