@import url('contact-forms.css');
@import url('contact-success.css');

.breadcrumbs {
    margin: 0 auto;
}

.required-star {
    color: var(--color-primary-900);
}

/* Contact Page CSS */
.contact-page {
    position: relative;
    overflow: hidden;
}

/* Fond rouge qui s'étend à gauche */
.contact-page::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 50%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    border-top-right-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
}

/* Fond blanc qui s'étend à droite */
.contact-page::after {
    content: '';
    position: absolute;
    top: 2rem;
    bottom: 0;
    right: 0;
    width: 48%;
    background-color: #F6F6F6;
    z-index: 0;
    border-top-left-radius: 1.5rem;
    border-bottom-left-radius: 1.5rem;
}

.contact-container {
    max-width: min(var(--page-max-width, 1600px), calc(100% - 1.5rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
}

/* ===== PARTIE GAUCHE (Rouge) ===== */
.contact-left-section {
    position: relative;
    z-index: 1;
    flex: 1;
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    gap: 5rem;
    
    h2 {
        margin: 0;
    }
}


.contact-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1rem;
    padding-top: 1rem;

    &.no-breadcrumbs {
        padding-top: 2rem;
    }
}

.contact-image {
    display: flex;
    align-items: flex-end;
}

.contact-truck-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    border-top-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    max-height: 600px;
}

.contact-content h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0;
    line-height: 1.2;
}

.contact-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 80%;
}

/* CTAs */
.contact-ctas {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn-outline-white,
.btn-continue {
    padding: 12px 24px;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-continue {
    align-self: flex-start;
    background-color: #900C22;
    cursor: pointer;
}

.btn-outline-white:hover,
.btn-continue:hover {
    background: white;
    color: var(--color-primary-750) !important;
}

/* Couleur et souligné portés par .tg-btn-on-dark-text */
.btn-link-white {
    padding: 12px 0;
}

/* ===== PARTIE DROITE (Blanche) ===== */
.contact-right-section {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-top: 3rem;
}

.contact-right-section:has(> #contactSuccessContainer[style*="display: flex"]) {
    justify-content: center;
}

.contact-form-container {
    width: 90%;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.contact-form-container h2 {
    color: #900C22;
}


/* ===== FORMULAIRE PARTIE DROITE ===== */
.profile-selection {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-option {
    padding: 2.25rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.profile-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.profile-label {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Radio button personnalisé */
.profile-option::before {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 6px solid #ddd;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.profile-option input[type="radio"]:checked ~ ::before,
.profile-option:has(input[type="radio"]:checked)::before {
    border-color: #900C22;
    width: 20px;
    height: 20px;
    box-shadow: inset 0 0 0 4px white;
}

.profile-option:has(input[type="radio"]:checked)::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid #900C22;
    border-radius: 8px;
    pointer-events: none;
}

.profile-option:hover {
    border-color: #900C22;
}

.btn-continue:disabled {
    color: white;
    cursor: not-allowed;
    transform: none;
}

@media screen and (max-width: 1280px) {
    .breadcrumbs {
        padding: 0;
    }

    .contact-container {
        width: 100%;
        padding: 0 1rem;
    }

    .contact-content {
        padding-top: 6rem;
    }
}

@media screen and (max-width: 1024px) {
    .contact-page::before, .contact-page::after {
        display: none;
    }

    .contact-container {
        display: flex;
        flex-direction: column;
        padding: inherit;
    }

    .contact-left-section {
        background-image: var(--bg-image);
        padding: 1rem;
    }

    .contact-right-section {
        max-width: 100%;
        width: 100%;
        padding: 1rem;
        justify-content: center;
        margin-top: 4rem;
    }

    .contact-form-container {
        margin-bottom: 0;
        gap: 1rem;
        padding: 1rem 2rem;
    }

    .contact-image {
        display: none;
    }
}

/** RESPONSIVE **/
@media screen and (max-width: 768px) {
    .contact-content p {
        max-width: 100%;
        margin-bottom: 0;
        margin-top: 0;
    }

    .contact-form-container {
        width: 100%;
        padding: 2rem;
    }

    .profile-option {
        padding: 2.25rem 1rem;
    }

    .profile-selection {
        gap: 0.6rem;
    }
}

.rgpd-notice {
    font-size: 0.8rem;
}