/* ==========================================================================
   Publicard - Page Contact
   CSS propre, unique et scoped a la page contact.
   ========================================================================== */

.contact-page-wrapper {
    --contact-ink: var(--pc-slate-900, #0f172a);
    --contact-muted: var(--pc-slate-500, #64748b);
    --contact-muted-strong: #526078;
    --contact-page: #f4f6fa;
    --contact-surface: #ffffff;
    --contact-soft: #f8fafc;
    --contact-line: rgba(100, 116, 139, 0.18);
    --contact-line-strong: rgba(100, 116, 139, 0.28);
    --contact-blue: var(--pc-blue-600, #2563eb);
    --contact-pink: var(--pc-pink-500, #ec4899);
    --contact-green: var(--pc-green-500, #10b981);
    --contact-red: #ef4444;
    --contact-radius: 26px;
    --contact-radius-sm: 16px;
    --contact-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
    --contact-shadow-soft: 0 14px 38px rgba(15, 23, 42, 0.065);
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f7f9fc 0%, #ffffff 42%, #f4f6fa 100%);
    color: var(--contact-ink);
}

.contact-page-wrapper,
.contact-page-wrapper * {
    box-sizing: border-box;
}

.contact-page-wrapper .container {
    width: min(100% - 40px, 1240px);
    max-width: 1240px;
    margin-inline: auto;
    padding: 0;
}

/* Hero */
.contact-hero-header {
    padding: calc(var(--header-height, 86px) + 68px) 0 54px;
    background:
        linear-gradient(90deg, var(--contact-pink) 0 16%, transparent 16% 74%, var(--contact-blue) 74% 100%) top / 100% 4px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 250, 0.58));
}

.contact-hero-header .container {
    display: block;
}

.badge-pill-light {
    width: fit-content;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 15px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: var(--contact-surface);
    color: var(--contact-blue);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.badge-pill-light i {
    color: var(--contact-pink);
}

.contact-main-title {
    max-width: 980px;
    margin: 22px 0 22px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: clamp(3rem, 5.2vw, 4.9rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
}

.text-highlight {
    background: linear-gradient(120deg, var(--contact-blue) 0%, #7c3aed 48%, var(--contact-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-sub {
    max-width: 720px;
    margin: 0;
    color: var(--contact-muted-strong);
    font-size: clamp(1.08rem, 1.4vw, 1.28rem);
    font-weight: 750;
    line-height: 1.62;
}

/* Layout */
.section-faq-contact {
    padding: 24px 0 92px;
    background: transparent;
}

.section-faq-contact .container {
    width: min(100% - 40px, 1240px);
    max-width: 1240px;
}

.faq-split-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.43fr) minmax(0, 0.57fr);
    gap: 28px;
    align-items: start;
}

.faq-left-col {
    position: sticky;
    top: calc(var(--header-height, 86px) + 24px);
    align-self: start;
    z-index: 2;
}

/* Form card */
.contact-box-glass {
    position: relative;
    overflow: hidden;
    padding: 30px 28px 28px;
    border: 1px solid transparent;
    border-radius: var(--contact-radius);
    background:
        linear-gradient(var(--contact-surface), var(--contact-surface)) padding-box,
        linear-gradient(135deg, rgba(236, 72, 153, 0.46), rgba(37, 99, 235, 0.38)) border-box;
    box-shadow: var(--contact-shadow);
}

.contact-box-glass::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--contact-pink), var(--contact-blue));
}

.icon-support {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(37, 99, 235, 0.12)),
        var(--contact-surface);
    color: var(--contact-blue);
    font-size: 1.25rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

.contact-box-glass h3 {
    margin: 0 0 10px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 900;
    line-height: 1.08;
}

.contact-box-glass p {
    max-width: 42ch;
    margin: 0 0 24px;
    color: var(--contact-muted);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.55;
}

/* Contact Form 7 */
.cf7-custom-style form,
.cf7-custom-style .wpcf7-form {
    display: grid;
    gap: 14px;
}

.cf7-custom-style p {
    margin: 0;
}

.cf7-custom-style br {
    display: none;
}

.cf7-custom-style label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.35;
}

.cf7-custom-style .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.cf7-custom-style input[type="text"],
.cf7-custom-style input[type="email"],
.cf7-custom-style input[type="tel"],
.cf7-custom-style input[type="url"],
.cf7-custom-style textarea,
.cf7-custom-style select {
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 15px 17px;
    border: 1px solid var(--contact-line-strong);
    border-radius: 16px;
    background: var(--contact-soft);
    color: var(--contact-ink);
    font-family: var(--font-body, "Outfit", sans-serif);
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.4;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.cf7-custom-style textarea {
    min-height: 150px;
    resize: vertical;
}

.cf7-custom-style input::placeholder,
.cf7-custom-style textarea::placeholder {
    color: #94a3b8;
}

.cf7-custom-style input:focus,
.cf7-custom-style textarea:focus,
.cf7-custom-style select:focus {
    border-color: rgba(37, 99, 235, 0.52);
    background: var(--contact-surface);
    box-shadow: none;
    outline: 2px solid rgba(37, 99, 235, 0.48);
    outline-offset: 2px;
}

.cf7-custom-style .wpcf7-not-valid {
    border-color: rgba(239, 68, 68, 0.50);
    background: #fff7f7;
}

.cf7-custom-style .wpcf7-not-valid-tip {
    margin-top: 7px;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 800;
}

.cf7-custom-style label:has(.wpcf7-acceptance) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--contact-line);
    border-radius: 16px;
    background: var(--contact-soft);
    color: var(--contact-muted-strong);
    font-family: var(--font-body, "Outfit", sans-serif);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
}

.cf7-custom-style .wpcf7-acceptance {
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: 1px;
}

.cf7-custom-style .wpcf7-list-item {
    margin: 0;
}

.cf7-custom-style input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--contact-blue);
}

.cf7-custom-style input[type="submit"] {
    width: 100%;
    min-height: 56px;
    margin-top: 2px;
    padding: 0 22px;
    border: 1px solid var(--contact-ink);
    border-radius: 16px;
    background: var(--contact-ink);
    color: #ffffff;
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.cf7-custom-style input[type="submit"]:hover {
    background: #172033;
    border-color: #172033;
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.20);
}

.cf7-custom-style .wpcf7-spinner {
    margin: 12px auto 0;
}

.contact-page-wrapper div.wpcf7-response-output {
    display: none;
}

/* Contact details */
.contact-details-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.contact-details-panel h2 {
    margin: 0 0 4px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.2;
}

.contact-detail-card {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--contact-line);
    border-radius: 20px;
    background: var(--contact-surface);
    box-shadow: var(--contact-shadow-soft);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-detail-card::before {
    content: "";
    position: absolute;
    inset: 18px auto 18px 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, var(--contact-pink), var(--contact-blue));
    opacity: 0.55;
}

.contact-detail-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(236, 72, 153, 0.08)),
        var(--contact-surface);
    color: var(--contact-blue);
}

.contact-detail-card h3 {
    margin: 0 0 6px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.22;
}

.contact-detail-card p {
    margin: 0 0 10px;
    color: var(--contact-muted);
    font-size: 0.91rem;
    font-weight: 650;
    line-height: 1.48;
}

.contact-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-detail-card a {
    min-height: 34px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: #f8fbff;
    color: var(--contact-blue);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-detail-card a:hover {
    border-color: rgba(37, 99, 235, 0.34);
    background: #eef5ff;
}

/* FAQ */
.faq-accordion-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--contact-line);
    border-radius: var(--contact-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.94)),
        var(--contact-surface);
    box-shadow: var(--contact-shadow);
}

.faq-section-title {
    margin: -22px -22px 10px;
    padding: 26px 22px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--contact-radius) var(--contact-radius) 0 0;
    background:
        linear-gradient(90deg, var(--contact-pink) 0 18%, transparent 18% 76%, var(--contact-blue) 76% 100%) top / 100% 5px no-repeat,
        rgba(255, 255, 255, 0.96);
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    font-weight: 900;
    line-height: 1.1;
}

.faq-item {
    overflow: hidden;
    border: 1px solid var(--contact-line);
    border-radius: 18px;
    background: var(--contact-surface);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.faq-item[open] {
    border-color: rgba(37, 99, 235, 0.26);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.075);
}

.faq-item summary {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item .q-text {
    min-width: 0;
}

.icon-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: #f8fbff;
    color: var(--contact-blue);
    transition: transform 0.18s ease, background-color 0.18s ease;
}

.faq-item[open] summary .icon-toggle {
    background: #eef5ff;
    transform: rotate(45deg);
}

.answer {
    padding: 0 22px 22px;
    color: var(--contact-muted-strong);
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.7;
    animation: contactAnswerIn 0.22s ease-out;
}

.answer a {
    color: var(--contact-blue);
    font-weight: 900;
}

@keyframes contactAnswerIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CF7 popup */
.checkout-error-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483650;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.checkout-error-modal.active {
    opacity: 1;
    visibility: visible;
}

.error-modal-content {
    width: min(100%, 430px);
    padding: 34px 28px;
    border: 1px solid var(--contact-line);
    border-top: 5px solid var(--contact-red);
    border-radius: 24px;
    background: var(--contact-surface);
    text-align: center;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    transform: translateY(12px);
    transition: transform 0.2s ease;
}

.checkout-error-modal.active .error-modal-content {
    transform: translateY(0);
}

.checkout-error-modal.is-success .error-modal-content {
    border-top-color: var(--contact-green);
}

.error-modal-icon {
    margin-bottom: 18px;
    color: var(--contact-red);
    font-size: 3rem;
}

.checkout-error-modal.is-success .error-modal-icon {
    color: var(--contact-green);
}

.error-modal-title {
    margin-bottom: 10px;
    color: var(--contact-ink);
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 1.45rem;
    font-weight: 900;
}

.error-modal-body {
    margin-bottom: 24px;
    color: var(--contact-muted);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.55;
}

.error-modal-close {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 15px;
    background: var(--contact-ink);
    color: #ffffff;
    font-family: var(--font-head, "Space Grotesk", sans-serif);
    font-size: 0.96rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.error-modal-close:hover {
    background: #172033;
    transform: translateY(-1px);
}

@media (hover: hover) and (pointer: fine) {
    .contact-detail-card:hover,
    .faq-item:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, 0.24);
        box-shadow: 0 22px 52px rgba(15, 23, 42, 0.085);
    }
}

@media (max-width: 1100px) {
    .faq-split-layout {
        grid-template-columns: 1fr;
    }

    .contact-sub {
        max-width: 680px;
    }

    .faq-left-col {
        position: static;
    }
}

@media (max-width: 700px) {
    .contact-page-wrapper .container,
    .section-faq-contact .container {
        width: min(100% - 28px, 1240px);
    }

    .contact-hero-header {
        padding: calc(var(--header-height, 76px) + 42px) 0 34px;
    }

    .badge-pill-light {
        white-space: normal;
    }

    .contact-main-title {
        font-size: clamp(2.55rem, 13vw, 4rem);
        line-height: 1;
    }

    .contact-sub {
        font-size: 1rem;
    }

    .section-faq-contact {
        padding: 18px 0 62px;
    }

    .faq-split-layout {
        gap: 18px;
    }

    .contact-box-glass,
    .faq-accordion-col {
        border-radius: 24px;
    }

    .contact-box-glass {
        padding: 24px 20px 20px;
    }

    .contact-detail-card {
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 16px;
        border-radius: 18px;
    }

    .contact-detail-icon {
        width: 44px;
        height: 44px;
    }

    .faq-accordion-col {
        padding: 16px;
    }

    .faq-section-title {
        margin: -16px -16px 8px;
        padding: 24px 16px 16px;
        border-radius: 24px 24px 0 0;
    }

    .faq-item summary {
        min-height: 66px;
        padding: 18px 16px;
        font-size: 0.94rem;
    }

    .answer {
        padding: 0 16px 18px;
        font-size: 0.94rem;
    }
}

@media (max-width: 430px) {
    .contact-main-title {
        font-size: 2.7rem;
    }

    .cf7-custom-style input[type="text"],
    .cf7-custom-style input[type="email"],
    .cf7-custom-style input[type="tel"],
    .cf7-custom-style input[type="url"],
    .cf7-custom-style textarea,
    .cf7-custom-style select {
        border-radius: 14px;
    }

    .contact-detail-card a {
        width: 100%;
        justify-content: center;
    }
}
