/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body{
    overflow-x: hidden;
    color: #353333;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

b, strong {
    font-weight: 700 !important;
}

/* Titles */
h1, h2, h3, h4, h5 {
    text-transform: uppercase;
}
h1 {
    font: 300 48px/52px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h2 {
    font: 300 36px/44px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h3 {
    font: 300 28px/36px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h4 {
    font: 300 20px/28px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h5 {
    font: 300 18px/22px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
p, a {
    font: 300 16px/24px 'arial', sans-serif;
}
@media(max-width: 1180px){
    h1 {
        font-size: 36px;
        line-height: 48px;
    }
    h2 {
        font-size: 30px;
        line-height: 40px;
    }
    h3 {
        font-size: 24px;
        line-height: 32px;
    }
    h4 {
        font-size: 18px;
        line-height: 24px;
    }
}

@media(max-width: 767px){
    h1 {
        font-size: 30px;
        line-height: 40px;
    }
    h2 {
        font-size: 26px;
        line-height: 34px;
    }
    h3 {
        font-size: 20px;
        line-height: 28px;
    }
    h4 {
        font-size: 16px;
        line-height: 24px;
    }
}
.wrap {
    max-width: calc(1440px - 40px);
    margin: 0 auto;
    padding: 0 20px;
}
/* Top header */
.top-header {
    background-color: #353333;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.made-canada {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.made-canada__img {
    width: 24px;
    height: 24px;
    margin-left: 5px;
}
.made-canada::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: absolute;
    left: 0;
}
.made-canada__text {
    font-size: 14px;
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300 !important;
    text-transform: uppercase;
    color: #fff;
}
.top-header-actions {
    display: flex;
    gap: 24px;
}
.top-header-actions .phone__link, .top-header-actions .mail__link, .top-header-actions .lang__link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    color: #ece605;
    font-size: 16px !important;
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600 !important;
    text-transform: uppercase;
}
.top-header-actions .phone__link:hover, .top-header-actions .mail__link:hover, .top-header-actions .lang__link:hover {
    text-decoration: underline !important;
    cursor: pointer;
    color: #fff !important;
}
.top-header-actions .phone__link:before {
    content: '';
    background-image: url('../images/ic-phone-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 10px;
}
.top-header-actions .mail__link:before {
    content: '';
    background-image: url('../images/ic-mail-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 10px;
}
.top-header-actions .lang__link {
    padding: 8px;
    border: 2px solid white;
}
.top-header-actions .actions__separator {
    width: 1px;
    background-color: white;
    display: inline-block;
}
@media(max-width: 767px){
    .top-header-actions .mail__link, .top-header-actions .phone__link {
        display: none;
    }
    .top-header-actions .actions__separator {
        display: none;
    }
}

/* Header */
.page-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Header buttons */

.header-btn__item, .btn__item {
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300 !important;
    padding: 14px 22px;
    border: 1px solid #353333;
    color: #353333 !important;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
}
.header-btn__item:hover, .btn__item:hover {
    background-color: #d5d3d0;
    border-color: #d5d3d0 !important;
}
/* Mastergate logo */
.mastergate-logo-link {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0px;
    color: #353333 !important;
    text-decoration: none !important;
}

.mastergate-logo {
    height: 40px;
    width: fit-content;
    margin-left: -2px;
    object-position: left;
}
.mastergate-logo-text {
    font-size: 12px;
    line-height: 16px;
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300 !important;
}
/* Fin du Header */

/* Footer */
footer {
    padding: 24px 0;
    background-color: #353333;
}
.footer__content {
    display: flex;
    align-items: end;
    justify-content: space-between;
}
.footer__text {
    font-size: 12px;
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300 !important;
    color: #fff;
    text-transform: uppercase;
}
@media(max-width: 767px){
    .footer__content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
}
/* Section One */
.sectionOne, .sectionThree {
    padding: 120px 0px;
    background-color: #f6f5f2;
    text-align: center;

}
.sectionOne__content, .sectionThree__content {
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sectionOne__content h1 {
    margin-bottom: 16px;
    max-width: 65%;
}
.sectionOne__content .lede {
    font-size: 20px;
    line-height: 28px;
    max-width: 80%;
}
.sectionOne__content .btn__container, .sectionThree__content .btn__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
} 
/* Fin de la Section One */
/* Section Two */
.sectionTwo {
    padding: 120px 0px;
    text-align: center;
}
.sectionTwo__content {
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sectionTwo__content h2, .sectionThree__content h2 {
    margin-bottom: 16px;
}
.sectionTwo__content .lede, .sectionThree__content .lede  {
    font-size: 16px;
    line-height: 24px;
    max-width: 80%;
    text-align: center;
}
.sectionTwo__items {
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    gap: 48px;
    margin-top: 80px;
}
.sectionTwo__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.sectionTwo__item .item_content {
    width: 100%;
    padding: 120px 24px 40px;
    margin-top: -90px;
    border: 1px solid #353333;
}
.sectionTwo__item h3 {
    margin-bottom: 16px;
    font-size: 24px;
    line-height: 32px;
}
.sectionTwo__item-media {
    width: 100%;
    padding: 0 24px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    cursor: zoom-in;
}
button.sectionTwo__item-media {
    border: none;
    background: transparent;
    font: inherit;
    text-align: inherit;
    color: inherit;
    appearance: none;
}
button.sectionTwo__item-media:focus-visible {
    outline: 2px solid #353333;
    outline-offset: 3px;
}
.sectionTwo__item-media img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
/* Lightbox modèles vedettes */
.lightbox[hidden] {
    display: none !important;
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.9);
    cursor: zoom-out;
}
.lightbox__panel {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1400px);
    max-height: 92vh;
    margin: auto;
}
.lightbox__img {
    display: block;
    max-width: 100%;
    max-height: min(92vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}
.lightbox__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #f0f0f0;
    background: #353333;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox__close:hover {
    background: #2a2929;
}
body.lightbox-open {
    overflow: hidden;
}
@media (max-width: 767px) {
    .lightbox__close {
        top: 8px;
        right: 8px;
    }
}
/* Fin de la Section Two */

@media(max-width: 1180px) {
    .sectionOne .btn__return {
        top: -65px;
    }
    .sectionTwo__items {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    .wrap {
        max-width: calc(1440px - 20px);
    }
    .sectionOne,.sectionTwo,.sectionThree {
        padding: 80px 0px;
    }
    .sectionOne__content h1 {
        max-width: 100%;
    }
    .sectionOne__content .lede, .sectionTwo__content .lede, .sectionThree__content .lede {
        max-width: 100%;
    }
}
@media(max-width: 767px) {
    .mastergate-logo {
        height: 30px;
        max-width: 232px;
    }
    .mastergate-logo-text {
        font-size: 9px;
        margin-top: -5px;
    }
    .sectionTwo__items {
        grid-template-columns: repeat(1, 1fr);
    }
    .sectionOne .btn__container {
        flex-direction: column;
    }
}

/* Formulaire de demande d'information */
.sectionTwo__formulaire {
    text-align: unset !important;
}
.sectionTwo__formulaire .wrap {
    position: relative;
}

.lede2 {
    font-size: 16px !important;
    line-height: 24px !important;
    text-align: center;
    margin-top: 16px !important;
}
.lede2:last-of-type {
    margin-top: 0 !important;
}
.lede2 a {
    color: #353333 !important;
    text-decoration: underline !important;
    cursor: pointer;
}
.btn__return {
    font-size: 14px;
    font-family: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300 !important;
    color: #353333 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: -86px;
    left: 0;
    padding-left: 20px;
}
.btn__return:before {
    content: '';
    background-image: url('../images/arrow-primary.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 8px;
}
.btn__return:hover {
    text-decoration: underline !important;
    cursor: pointer;
}
.p-model-selected {
    font: 300 20px/28px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
    margin-bottom: 48px;
    text-align: center;
} 
form {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.form-group {
    width: calc(50% - 12px);
    display: flex;
    flex-direction: column;
    text-align: left;
}
.form-group label {
    font-family: 'arial', sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 300 !important;
    margin-bottom: 6px;
}
.form-group input {
    padding: 8px 12px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 300;
    border: 1px solid #353333;
    background-color: #fff;
    color: #353333;
    font-family: 'arial', sans-serif;
    font-weight: 300 !important;
    outline: none;
}
.form-group input:focus {
    border-width: 2px;
    border-color: #353333;
    outline: none;
}

/* Champs en erreur (validation serveur) */
.form-group.has-error label,
.p-model-selected.has-error {
    color: #cd0000;
}

.form-group.has-error .optionnel {
    color: #cd0000;
}

.form-group.has-error input[type="text"],
.form-group.has-error input[type="email"],
.form-group.has-error input[type="tel"] {
    border-color: #cd0000;
}

.form-group.has-error input:focus {
    border-color: #cd0000;
}

.form-group-utilisation.has-error legend {
    color: #cd0000;
}

.p-model-selected.has-error strong,
.p-model-selected.has-error em,
.p-model-selected.has-error a {
    color: #cd0000;
}

.form-group-utilisation.has-error fieldset label {
    color: #cd0000;
}

.form-group-utilisation.has-error input[type="radio"] {
    accent-color: #cd0000;
}

.form-demande-info .field-error {
    display: block;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    font-family: 'arial', sans-serif;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    color: #cd0000;
}

.form-demande-info .field-error--modele {
    text-align: center;
    margin-top: 12px;
    margin-bottom: 12px;
}

.form-demande-info[aria-busy="true"] {
    opacity: 0.88;
    pointer-events: none;
}

.form-envoi-error {
    text-align: center;
    margin: 0 auto 24px;
    max-width: 36rem;
}

.form-envoi-success {
    text-align: center;
}

.form-group-utilisation {
    width: 100%;
}

.form-group-utilisation fieldset {
    width: 100%;
    border: none !important;
    display: flex;
    flex-direction: column;
}

.form-group-utilisation.has-error fieldset {
    border: 1px solid #cd0000 !important;
    border-radius: 2px;
    padding: 8px 12px;
}
.form-group-utilisation legend {
    font-family: 'arial', sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 300 !important;
    margin-bottom: 6px;
}
form .btn__item {
    background-color: white !important;
    font-size: 16px;
    margin-top: 48px;
}
form .btn__item:hover {
    background-color: #2f2e2e30 !important;
    cursor: pointer;
}
@media(max-width: 1180px){
    .sectionTwo__formulaire {
        padding: 120px 0px 80px;
    }
}
@media(max-width: 767px) {
    .form-group {
        width: 100%;
    }
    .p-model-selected {
        font: 300 16px/24px 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
    } 
}