/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/

.news.section {
  background: linear-gradient(180deg, rgba(7, 22, 89, 0.1) 0%, rgba(7, 22, 89, 0) min(25rem, 100%));
  font-size: 1.1rem;
}
.news.section::after {
    content: "";
    width: 100%;
    height: 20px;
    padding: 0;
    margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 0;
    box-shadow: 0px -10px 10px -10px rgba(0,0,0,1) inset;
    -webkit-box-shadow: 0px -10px 10px -10px rgba(0,0,0,1) inset;
    -moz-box-shadow: 0px -10px 10px -10px rgba(0,0,0,1) inset;
    border-bottom: 1px solid var(--bs-gray-800);
}
@media (max-width: 991px) {
    .main .container.main {
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        min-width: 600px;
    }
}
@media (min-width: 992px) {
    .main .container.main {
        max-width: none;
    }
}

.container.main {
    background: linear-gradient(180deg, rgba(7, 22, 89, 0) 90%, rgba(7, 22, 89, 0.1) 100%);
}

@media (min-width: 992px) {
    .news.section {
        background: linear-gradient(180deg, rgba(7, 22, 89, 0.3) 0%, rgba(7, 22, 89, 0) min(25rem, 100%)), 
                    url("../img/bg-page-section.png") calc(16.66666667% + 4rem) bottom / 300px no-repeat fixed;
    }
}
@media (max-width: 992px) {
    .news.section {
        background: linear-gradient(180deg, rgba(7, 22, 89, 0.3) 0%, rgba(7, 22, 89, 0) min(25rem, 100%)), 
                    url("../img/bg-page-section.png") 1rem bottom / 300px no-repeat fixed;
    }
}

/* Hero container */
.container.hero {
    height: 75vh;
    background: url("../img/panier-01.jpg") 0 30% no-repeat;
    background-size: cover;
    width: 100%;
    max-width: unset;
    min-height: unset;
    display: block;
    position: relative;
    padding-bottom: 23rem;
    padding-left: 1.52rem;
    justify-content: start !important;
}
.container.hero::after {
  content: "";
  width: 100%;
  height: 20%;
  padding: 0;

  margin: 0;

  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  box-shadow: 0px -10px 5px -6px rgba(0,0,0, 0.75) inset;
  -webkit-box-shadow: 0px -10px 5px -6px rgba(0,0,0, 0.75) inset;
  -moz-box-shadow: 0px -10px 5px -6px rgba(0,0,0, 0.75) inset;
}
.hero .overlay .col p.hero {
  font-size: clamp(1.2rem, -0.086rem + 3.429vw, 3rem);
  color: #271d67;
  font-weight: 700;
  font-family: var(--heading-font);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, .1);
  justify-content: start;
  padding-left: 1.75rem;
  padding-bottom: 10rem;
}
.container.hero {
    height: 60vh;
    display: flex;
    justify-content: center !important;
    align-items: end;
}
.container.hero .row {
    background: color-mix(in srgb, var(--contrast-color), transparent 80%) !important;
}

.hero .titre {
    color: var(--contrast-color);
    font-size: clamp(2rem, 1.286rem + 1.905vw, 3rem);
    font-weight: 700;
    font-family: var(--heading-font);
    text-shadow: 2px 2px 8px #000000;
    padding: 1rem calc(1rem + var(--bs-gutter-x) * .5) 0rem calc(1rem + var(--bs-gutter-x) * .5) !important;
    margin-bottom: 0;
}

.hero .step {
    text-align: center;
}
.hero .step img {
    height: min(173px, 100%);
    width: auto;
    margin: 0;
    filter: drop-shadow(var(--box-shadow));
    cursor: pointer;
}
.hero .col:has(img:hover) {
    background: color-mix(in srgb, var(--contrast-color), transparent 50%) !important;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
.hero .step img:hover {
    filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.5));
    transform: translateX(-5px);
}

.hero .icons {
    cursor: pointer;
    width: clamp(5rem, 3.929rem + 2.857vw, 6.5rem);
    height: clamp(5rem, 3.929rem + 2.857vw, 6.5rem);
    border: 2px solid var(--bs-white);
    border-radius: 5rem;
    position: relative;
    transition: background-color .5s, color .5s;
    font-size: clamp(2.5rem, 1.786rem + 1.905vw, 3.5rem);
}
.hero .path {
    position: relative;
}
.hero .path::before {
    content: "";
    width: 250%;
    height: 10px;
    position: absolute;
    top: calc(50% - 1rem);
    left: 2.5rem;
    border-top: 10px solid #ffffff;
}
.hero .path:has(.icons.valid)::before {
    background: linear-gradient(90deg,rgb(28, 138, 87) 0%, rgb(19, 96, 58) 100%);
    border: 1px solid color-mix(var(--contrast-color), transparent 50%);
}
.hero .path:has(.icons.invalid)::before {
    border-top: 5px dashed var(--bs-white);
}
.hero .col:has(.path .icons.invalid) ~ .col .path::before {
    content: unset;
}

.hero .path-lg {
    position: relative;
}
.hero .path-lg::before {
    content: "";
    width: 100%;
    height: 10px;
    position: absolute;
    top: calc(50% - 1rem);
    left: 50%;
    border-top: 10px solid #ffffff;
}
.hero .path-lg:has(.d-block[src*="green"])::before {
    background: #00ff00;
    border: 1px solid color-mix(var(--contrast-color), transparent 50%);
}
.hero .path-lg:has(.d-block[src*="red"])::before {
    border-top: 5px dashed var(--bs-danger);
    background: transparent;
}


.hero .icons .bi:before {
    margin-top: 1.25rem;
}
.hero .icons:has(a:hover) {
    box-shadow: var(--box-shadow);
}
.hero .icons.invalid {
    background: var(--bs-danger);
    color: var(--bs-white);
}
.hero .icons.invalid:has(a:hover) {
    color: var(--bs-danger);
    background: var(--bs-white);
    border: 2px solid var(--bs-danger);
}
.hero .icons.valid {
    background: var(--bs-success);
    color: var(--bs-white);
}
.hero .icons.valid:has(a:hover) {
    color: var(--bs-success);
    background: var(--bs-white);
    border: 2px solid var(--bs-success);
}
.hero .icons + .legend {
    font-size: 1.2rem;
    text-align: center;
    color: var(--contrast-color);
    text-shadow: 2px 2px 8px #000000;
    font-weight: 700;
}

/* General */
.news .card.cart:hover,
.news .card.cart:has(input:focus),
.news .card.cart:has(button:focus),
.news .card.address:hover,
.news .card.payment:hover,
.news .card.payment:has(input:focus),
.news .card.payment:has(select:focus),
.news .card.deal:hover,
.news .card.deal:has(input:focus),
.news .card.deal:has(button:focus) {
    box-shadow: unset;
    background: inherit;
}

.news .card.cart:hover .card-header,
.news .card.cart:has(input:focus) .card-header,
.news .card.cart:has(button:focus) .card-header,
.news .card.address:hover .card-header,
.news .card.payment:hover .card-header,
.news .card.payment:has(input:focus) .card-header,
.news .card.payment:has(select:focus) .card-header,
.news .card.deal:hover .card-footer,
.news .card.deal:has(input:focus) .card-footer,
.news .card.deal:has(button:focus) .card-footer,
.news .card.deal:hover .card-body .card-body {
    background-color: #f8f8f8;
}
.news .card.cart:hover .card-body,
.news .card.cart:has(input:focus) .card-body,
.news .card.cart:has(button:focus) .card-body,
.news .card.address:hover .card-body,
.news .card.address:has(input:focus) .card-body,
.news .card.address:has(textarea:focus) .card-body,
.news .card.payment:hover .card-body,
.news .card.payment:has(input:focus) .card-body,
.news .card.payment:has(select:focus) .card-body,
.news .card.deal:hover .card-body {
    background: linear-gradient(180deg, rgba(7, 22, 89, 0.3) 0%, rgba(7, 22, 89, 0) min(50%), rgba(7, 22, 89, 0.3) min(100%)) !important;
}
.news .card.deal:hover .card-body .card-body {
    background: white !important;
}
.news .card.cart:hover .card-body .item .card-body,
.news .card.cart:has(input:focus) .card-body .item .card-body,
.news .card.cart:has(button :focus) .card-body .item .card-body,
.news .card.deal:has(input:focus) .card-body .card-body,
.news .card.deal:has(button :focus) .card-body .card-body {
    background: inherit !important;
}
.news .card.cart .card-body .item .card-body:hover,
.news .card.cart .card-body .item .card-body:has(input:focus),
.news .card.cart .card-body .item .card-body:has(button:focus),
.news .card.deal .card-body .card-body:hover,
.news .card.deal .card-body .card:has(.card-footer:hover) .card-body,
.news .card.deal .card-body .card-body:has(input:focus),
.news .card.deal .card-body .card-body:has(button:focus) {
    background: linear-gradient(180deg, #faf2f1 0%, #ffffff 100%) !important;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
}

.credit-card input,
.credit-card select {
    outline: none;
}
.news h3 {
    padding: 0 !important;
    text-wrap: balance;
}

/* Header */
.card-header.invalide > *,
.card-header.invalide h2,
.card-header.invalide h3,
.card-header.invalide h4 {
    color: var(--bs-red) !important;
    text-wrap: balance;
}
.card-header.valide > *,
.card-header.valide h2,
.card-header.valide h3,
.card-header.valide h4 {
    color: var(--bs-green) !important;
    text-wrap: balance;
}

.header-ready {
    background: var(--bs-form-valid-color);
}
.header-not-ready {
    background: var(--bs-form-invalid-color);
}
.header-ready *,
.header-not-ready * {
    color: var(--contrast-color) !important;
}

/* Form control */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Cart */
.cart .card-header {
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-start;
    
}
.card-header .icon {
    margin-right: 1rem;
}
.card-header .icon i {
    font-size: 3rem;
}
.cart .prix-unitaire,
.cart .sous-total {
    font-weight: 700;
    font-size: 1.2rem;
}
.cart .control-quantite input {
    font-size: 1rem;
}
.cart .name {
    font-weight: 700;
    font-size: 1.2rem;
}
.cart .item-description img {
    height: auto;
}

/* Credit card */
.credit-card-wrapper {
    height: 20rem;
    margin-top: 3rem;
}
.credit-card {
    color: white;
    font-family: Arial;
    position: relative;
    isolation: isolate;
}
.credit-card .front,
.credit-card .back {
    background-color: hsl(200, 80%, 30%);
    border: 1px solid hsl(200, 80%, 10%);
    border-radius: .5rem;
    width: 325px;
    height: 150px;
    padding: .75rem 1rem;
    padding-bottom: 1.25rem;
    isolation: isolate;
}
.credit-card .front {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1;
    overflow: hidden;
    position: relative;
    height: 15rem;
    width: 25rem;
    background: url("../img/carte-de-credit-bg-front.jpg") top left no-repeat;
    box-shadow: 5px 5px 15px -2px rgba(0, 0, 0, .5);
    margin-left: calc((100vw - 37.5rem) / 2); 
}

.credit-card .front .overlay,
.credit-card .back .overlay {
    display: none;
    position: absolute;
    width: 100%;
    height: 100;
    left: 0;
    top: 0;
    position: absolute;
    height: 15rem;
    background: rgba(255, 255, 255, .5);
    /* z-index: -1; */
}
.credit-card .front:has(.is-invalid) .overlay,
.credit-card .back:has(.is-invalid) .overlay {
    display: block;
}

.credit-card .card-data-row {
    display: flex;
    margin-bottom: auto;
}
.credit-card .logo {
    height: 40px !important;
    width: 50px !important;
    flex-grow: 0;
}
.credit-card .brand-name {
    flex-grow: 1;
    font-size: 1.25rem;
    font-weight: bold;
}
.credit-card .form-group {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    z-index: 2;
}
.credit-card fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.credit-card fieldset legend {
    visibility: hidden;
    height: 0;
    width: 0;
    position: absolute;
    top: -200vh;
}
.credit-card .horizontal-input-stack {
    display: flex;
    gap: .5rem;
}
.credit-card .cc-inputs input {
    width: 6ch;
    font-family: monospace;
    font-size: 1.1rem;
    background: white;
    color: black;
}
.credit-card input,
.credit-card select {
    padding: .25em .5em;
    border: none;
    border-radius: .25em;
    appearance: none;
    background: white;
    color: black;
    font-family: monospace;
    font-size: 1.1rem;
}
.credit-card label {
    font-size: .65rem;
    text-transform: uppercase;
}
.credit-card .input-row {
    display: flex;
    gap: 2rem;
}
.credit-card .name-group {
    flex-grow: 1;
}
.credit-card .front::before {
    content: "";
    position: absolute;
    height: 400px;
    width: 400px;
    border-radius: 100%;
    background-color: hsl(0, 0%, 100%, .15);
    top: -250px;
    left: -150px;
    z-index: -1;
}
.credit-card .front::after {
    content: "";
    position: absolute;
    height: 600px;
    width: 600px;
    border-radius: 100%;
    background-color: hsl(0, 0%, 100%, .075);
    bottom: -475px;
    left: -150px;
    z-index: -1;
}
.credit-card .back {
    position: absolute;
    top: 2rem;
    left: calc((100vw / 2) - 13rem); /* 5.25rem; */
    height: 15rem;
    width: 25rem;
}
.credit-card .stripe {
    background-color: hsl(200, 80%, 10%);
    height: 45px;
    position: absolute;
    left: 0;
    right: 0;
    top: 2.5rem;
    z-index: -1;
}
.credit-card .cvc-group {
    position: absolute;
    bottom: 3.25rem;
    right: .5rem;
}
.credit-card .cvc-input {
    width: 6ch;
    font-family: monospace;
}

@media (min-width: 992px) {
    .credit-card .front {
    margin-left: calc(((100vw - 16.66666667vw) - 37.5rem) / 2); 
    }
    .credit-card .back {
    left: calc(((100vw - 16.66666667vw) / 2) - 13rem);
    }
}
@media (max-width: 600px) {
    .credit-card-wrapper {
        height: 26rem;
    }
    .credit-card .front {
    margin-left: 0; 
    }
    .credit-card .back {
    /* left: 5.25rem; */
    right: 0;
    top: 8rem;
    }
}

.credit-card .form-group:has(.is-valid) input,
.credit-card .form-group:has(.is-valid) select {
    border: 1px solid var(--bs-form-valid-border-color);
}
.credit-card .form-group:has(.is-valid) input:focus,
.credit-card .form-group:has(.is-valid) select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-success-rgb), 0.75);
}

.credit-card .form-group:has(.is-invalid) label {
    color: var(--bs-form-invalid-border-color);
    font-weight: 700;
    background: linear-gradient(90deg, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%);
    margin: -.2rem;
    padding: .2rem;
    border-radius: .25rem;
}
.credit-card .form-group:has(.is-invalid) input,
.credit-card .form-group:has(.is-invalid) select {
    border: 1px solid var(--bs-form-invalid-border-color);
}
.credit-card .form-group:has(.is-invalid) input:focus,
.credit-card .form-group:has(.is-invalid) select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}
.credit-card input:last-of-type {
    position: relative;
}
.credit-card .form-group:has(.is-invalid) input:last-of-type:after {
    content: "";
    width: 2rem;
    height: 2rem;
    position: absolute;
    border: 1px solid red;
    background: red;
}

.address .switch-wrapper,
.payment .switch-wrapper {
    border-radius: .5rem;
    padding: .5rem;
}
.address .switch-wrapper:has(:checked),
.payment .switch-wrapper:has(:checked) {
    background: rgba(255, 255, 255, .5);
}
.address .form-check-input:checked,
.payment .form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}
.address .form-check-input:checked:focus,
.payment .form-check-input:checked:focus {
    border-color: var(--bs-success);
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(var(--bs-success-rgb), .25);
}

.address .form-switch:has(:checked) label,
.payment .form-switch:has(:checked) label,
.montant-gratuit {
    color: var(--bs-success);
}


/* Total */
.deal .sous-total {
    font-weight: 700;
    font-size: 1.2rem;
}

