/* ===== Page contact ===== */

.contact-section {
    width: 100%;
    min-height: 90vh;
    padding: 70px 0 50px 0;
    background: linear-gradient(120deg, #ffffff 70%, #fff1e7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-grid {
    background: #fff;
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 0;
    width: 85vw;
    max-width: 1050px;
    min-height: 440px;
    overflow: hidden;
}

.contact-text {
    background: linear-gradient(145deg, #000000 62%, var(--color-primary) 100%);
    color: #fff;
    padding: 44px 36px 24px 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
    min-width: 270px;
    position: relative;
}

.contact-text h3 {
    font-size: 2rem;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 2px 12px #0003;
}

.contact-text p {
    font-size: 1.08rem;
    line-height: 1.6;
    color: #f3f6f8;
    margin-bottom: 0;
}

.contact-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    direction: ltr;
    unicode-bidi: isolate;
    writing-mode: horizontal-tb;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: width 0.3s ease, border-radius 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 2px 2px 14px rgba(0, 0, 0, 0.22);
    background-color: #00d757;
    color: #ffffff !important;
}

.contact-whatsapp-sign {
    width: 100%;
    transition: width 0.3s ease, padding-left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.contact-whatsapp-svg {
    width: 24px;
    height: 24px;
}

.contact-whatsapp-svg path {
    fill: #ffffff;
}

.contact-whatsapp-text {
    position: absolute;
    right: 0;
    width: 0;
    opacity: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.3s ease, width 0.3s ease, padding-right 0.3s ease;
}

.contact-whatsapp-btn:hover {
    width: 172px;
    border-radius: 40px;
    box-shadow: 0 12px 28px rgba(0, 215, 87, 0.28);
    color: #ffffff !important;
}

.contact-whatsapp-btn:hover .contact-whatsapp-sign {
    width: 30%;
    padding-left: 10px;
}

.contact-whatsapp-btn:hover .contact-whatsapp-text {
    opacity: 1;
    width: 70%;
    padding-right: 12px;
}

.contact-whatsapp-btn:active {
    transform: translate(2px, 2px);
}

.contact-whatsapp-alt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.contact-whatsapp-note {
    margin: 0;
    text-align: center;
    font-size: 0.98rem;
    color: var(--color-text-soft);
}

.contact-text .text-img {
    margin-top: 18px;
    width: 100%;
    max-width: 190px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.form-devis {
    background: none;
    padding: 40px 40px 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.form-title {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(222, 115, 67, 0.16);
}

/* Champs formulaire */
.form-devis select,
.form-devis textarea,
.form-devis input[type="text"],
.form-devis input[type="email"],
.form-devis input[type="tel"] {
    width: 100%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fffaf7;
    font-size: 1rem;
    transition: border-color 0.21s;
    color: #222;
    font-family: inherit;
    box-sizing: border-box;
}

.form-devis select:focus,
.form-devis textarea:focus,
.form-devis input[type="text"]:focus,
.form-devis input[type="email"]:focus,
.form-devis input[type="tel"]:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
}

.form-devis textarea {
    resize: vertical;
    min-height: 110px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row input {
    flex: 1;
}

.flybtn-button {
    font-family: inherit;
    font-size: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-rare));
    color: white;
    padding: 0.7em 1em;
    padding-left: 0.9em;
    display: flex;
    align-items: center;
    direction: ltr;
    unicode-bidi: isolate;
    writing-mode: horizontal-tb;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.flybtn-span {
    display: block;
    margin-left: 0.3em;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.flybtn-button svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

.flybtn-button:hover .flybtn-svg-wrapper {
    animation: flybtn-fly-1 0.6s ease-in-out infinite alternate;
}

.flybtn-button:hover svg {
    transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

.flybtn-button:hover .flybtn-span {
    transform: translateX(1.5em);
}

.flybtn-button:active {
    transform: scale(0.95);
}

@keyframes flybtn-fly-1 {
    from {
        transform: translateY(0.1em);
    }

    to {
        transform: translateY(-0.1em);
    }
}

html[lang="ar"] .flybtn-span,
html[lang="ar"] .contact-whatsapp-text {
    direction: rtl;
    unicode-bidi: isolate;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        min-width: unset;
        width: 96vw;
        max-width: 500px;
    }

    .contact-text {
        padding: 34px 20px 16px 20px;
        align-items: center;
        text-align: center;
    }

    .contact-whatsapp-btn {
        width: 172px;
        border-radius: 40px;
    }

    .contact-whatsapp-sign {
        width: 30%;
        padding-left: 10px;
    }

    .contact-whatsapp-text {
        opacity: 1;
        width: 70%;
        padding-right: 12px;
    }

    .contact-text .text-img {
        margin: 18px auto 0 auto;
        max-width: 130px;
    }

    .form-devis {
        padding: 30px 12px 20px 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row input {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .contact-section {
        padding: 30px 0 10px 0;
    }

    .contact-grid {
        border-radius: 13px;
    }

    .contact-text {
        border-radius: 13px 13px 0 0;
    }
}

html[data-theme="dark"] .contact-section {
    background: linear-gradient(120deg, #0f0e0d 70%, #1c1512 100%);
}

html[data-theme="dark"] .contact-grid {
    background: rgba(20, 17, 16, 0.94);
}

html[data-theme="dark"] .contact-whatsapp-btn {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .contact-whatsapp-note {
    color: var(--color-text-soft);
}

html[data-theme="dark"] .form-devis select,
html[data-theme="dark"] .form-devis textarea,
html[data-theme="dark"] .form-devis input[type="text"],
html[data-theme="dark"] .form-devis input[type="email"],
html[data-theme="dark"] .form-devis input[type="tel"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-dark);
}

html[data-theme="dark"] .form-devis select:focus,
html[data-theme="dark"] .form-devis textarea:focus,
html[data-theme="dark"] .form-devis input[type="text"]:focus,
html[data-theme="dark"] .form-devis input[type="email"]:focus,
html[data-theme="dark"] .form-devis input[type="tel"]:focus {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .form-devis select option {
    background: #171311;
    color: var(--color-dark);
}
