:root {
    /* Couleurs */
    --color-red: hsl(14, 86%, 42%);
    --color-green: hsl(159, 69%, 38%);
    
    --color-rose-50: hsl(20, 50%, 98%);
    --color-rose-100: hsl(13, 31%, 94%);
    --color-rose-300: hsl(14, 25%, 72%);
    --color-rose-400: hsl(7, 20%, 60%);
    --color-rose-500: hsl(12, 20%, 44%);
    --color-rose-900: hsl(14, 65%, 9%);

    /* Typographie */
    --font-body: 'Red Hat Text', sans-serif;
    
    /* Taille de police */
    --font-size-body: 16px;

    /* Poids de la police */
    --font-weight-normal: 400;
    --font-weight-medium: 600;
    --font-weight-bold: 700;
}
*{
    font-family: var(--font-body);
}
body {
    min-height: 100px;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-body);
    background-color: var(--color-rose-50);
}
.menu-header {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px 20px;
    }
    .menu-header h1 {
      color: #6f4e37;
      margin: 0;
    }
    .menu-header img {
      margin-left: 5px;
    }
p{
    margin-bottom: 1px;
}
h2{
    margin: 0;
    font-size: 1em;
}
h3{
    margin: 0px 0;
    font-size: 0.8em;
    color: var(--color-red);
}
h4{
    font-size: 1.2em;
    color: var(--color-red);
}
.container {
    padding: 1rem 1rem;

}
main{
    gap: 15px;
    display: grid;
    margin-right: 1rem;
    margin-left: 1rem;
    grid-template-columns: 1fr 1fr;
}
.main-section {
    flex: 1;
}
.sidebar {
    flex: 1;
}
.cart {
    z-index: 10;
    position: fixed;
    bottom: 0;
    margin-bottom: 5%;
    width: 70%;
    max-width: 80%;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 10px;
    border-radius: 10px;
    background-color: hsl(0, 0%, 100%, 0.9);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
    transition: opacity 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out;
}
.cart.expanded {
    padding: 15px;
    overflow-y: scroll;
}
.empty-message{
    margin-bottom: -0.5rem;
    font-size: 0.9em;
    color: var(--color-rose-500);
}
.empty-content{
    text-align: center;
    margin-bottom: 0.8rem;
}
.content-message{
    display: none;
    text-align: center;
    margin-top: 10px;
    margin-bottom: -0.6rem;
    font-size: 1rem;
    color: var(--color-rose-500);
}
.products-card{
    margin-top: 1.2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.products-card p{
    margin-top: 0.5rem;
    font-size: 0.9em;
    color: var(--color-rose-500);
    font-weight: var(--font-weight-medium);
}
.image-product{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    border: 1px solid transparent;
}
.image-product.active{
    border: 2px solid var(--color-red);
}
.addToCart{
    display: flex;
    align-items: center;
    border-radius: 50px;
    padding: 0.6rem 1rem;
    color: var(--color-rose-900);
    font-weight: var(--font-weight-medium);
    background-color: hsl(0, 0%, 100%);
    border: 2px solid var(--color-rose-300);
}
.addToCart img{
    margin-right: 5px;
}
.addToCart:hover{
    cursor: pointer;
    color: var(--color-red);
    border-color: var(--color-red);
}
.addToCart,
.counter {
    z-index: 1;
    margin-top: -25px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.addToCart.hidden {
    display: none;
}
.counter {
    display: none;
    justify-content: space-between;
    align-items: center;
}
.icon-remove {
    padding: 5px;
    cursor: pointer;
    border-radius: 50%;
    fill: #CAAFA7;
    border: 1px solid var(--color-rose-300);
}
.icon-remove:hover {
    fill: var(--color-rose-900);
    border: 1px solid var(--color-rose-900);
}
.counter{
    width: 50%;
    display: flex;
    align-items: center;
    border-radius: 50px;
    padding: 0.6rem 1rem;
    justify-content: space-between;
    background-color: var(--color-red);
}
.counter span{
    color: hsl(0, 0%, 100%);
}
.hidden {
    display: none;
}
.cart-item,.summary-item{
    display: none;
    margin-top: 10px;
    align-items: center;
    margin-right: 5%;
    margin-left: 5%;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-rose-100);
}
.cart.expanded .cart-item{
    display: flex;
}
.cart-item h2{
    color: var(--color-rose-900);
    font-weight: var(--font-weight-medium);
}
.cart-summary{
    align-items: center;
    justify-content: space-between;
}
.carbo-neutral{
    gap: 10px;
    display: flex;
    padding: 10px;
    border-radius: 5px;
    align-items: center;
    justify-content: center;
    background-color: var(--color-rose-100);
}
.cart-total{
    font-size: 1.2em;
    font-weight: var(--font-weight-bold);
}
.pdcs-infos{
    display: flex;
    align-items: flex-start;
    margin-top: -0.8rem;
}
.total-div,.final-total{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 3px;
    align-items: center;
    text-align: center;
}
.product-quantity{
    margin-right: 15px;
    color: var(--color-red);
    font-weight: var(--font-weight-medium);
}
.single-price{
    margin-right: 10px;
    color: var(--color-rose-300);
    font-weight: var(--font-weight-medium);
}
.total-price{
    color: var(--color-rose-500);
    font-weight: var(--font-weight-medium);
}
.confirm-order,.start-new-order{
    width: 85%;
    border: none;
    padding: 0.6rem;
    font-size: 0.8em;
    cursor: pointer;
    border-radius: 50px;
    color: hsl(0, 0%, 100%);
    background-color: var(--color-red);
    font-weight: var(--font-weight-medium);
    margin-top: 15px;
}
.confirm-order:hover{
    cursor: pointer;
    background-color: hsl(14, 85%, 31%);
}
.icon-decrement,.icon-increment{
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    border: 1px solid hsl(0, 0%, 100%);
}
.icon-decrement{
    padding: 8px 4px;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.final-summary {
  position:fixed;
  background: white;
  width: 80%;
  max-width: 400px;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.fa-coffee {
  transform: translate(0, 25%);
  margin-left: 20px;
  font-size: 35px;
  color: var(--color-rose-900);
}
.qr-code{
  position: relative;
  width: 50%;
  transform: translate(-40%, 0);
}
.timer {
  margin-top: 5px;
  margin-bottom: -4px;
  font-size: 1.2em;
  color: #555;
}
.order-summary{
  max-height: 35%;
  padding: 20px;
  overflow-y: scroll;
  border-radius: 10px;
  background-color: var(--color-rose-50);
}
.hope-p{
  color: var(--color-rose-300);
}
.final-infos{
  gap: 20px;
  display: flex;
  align-items: flex-start;
}
.final-div-infos{
  display: flex;
}
.final-total{
  margin-top: -1px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  width: 75%;
}
.final-total strong{
  font-size: 1.2em;
}
.image-thumbnail{
  height: 50px;
  border-radius: 10px;
}
.start-new-order {
  margin-top: 10px;
}
.final-price{
  font-weight: var(--font-weight-medium);
}
@media (max-width: 768px) {
  .hope-p{
      margin-top: -20px;
      margin-bottom: 15px;
  }
    h1{
      margin-top: 0px;
      font-size: 2em;
    }
    h4{
      text-align: center;
      margin-top: 0.6rem;
      margin-bottom: -0.5rem;
    }
    .container {
      flex-direction: column;
    }
    main{
      grid-template-columns: 1fr 1fr 1fr; 
      flex-direction: column;
    }
    .image-product{
      width: 100%;
      height: 100%;
    }
    .congratsText{
      margin-bottom: 15px;
      font-size: 1.1em;
      color: var(--color-rose-900);
    }
}

  .swal-icon--success {
    border-color: #a5dc86
  }
  
  .swal-icon--success:after, .swal-icon--success:before {
    content: "";
    border-radius: 50%;
    position: absolute;
    width: 60px;
    height: 120px;
    background: #fff;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg)
  }
  
  .swal-icon--success:before {
    border-radius: 120px 0 0 120px;
    top: -7px;
    left: -33px;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-transform-origin: 60px 60px;
    transform-origin: 60px 60px
  }
  
  .swal-icon--success:after {
    border-radius: 0 120px 120px 0;
    top: -11px;
    left: 30px;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-transform-origin: 0 60px;
    transform-origin: 0 60px;
    -webkit-animation: rotatePlaceholder 4.25s ease-in;
    animation: rotatePlaceholder 4.25s ease-in
  }
  
  .swal-icon--success__ring {
    width: 80px;
    height: 80px;
    border: 4px solid hsla(98, 55%, 69%, .2);
    border-radius: 50%;
    box-sizing: content-box;
    position: absolute;
    left: -4px;
    top: -4px;
    z-index: 2
  }
  
  .swal-icon--success__hide-corners {
    width: 5px;
    height: 90px;
    background-color: #fff;
    padding: 1px;
    position: absolute;
    left: 28px;
    top: 8px;
    z-index: 1;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg)
  }
  
  .swal-icon--success__line {
    height: 5px;
    background-color: #a5dc86;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 2
  }
  
  .swal-icon--success__line--tip {
    width: 25px;
    left: 14px;
    top: 46px;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-animation: animateSuccessTip .75s;
    animation: animateSuccessTip .75s
  }
  
  .swal-icon--success__line--long {
    width: 47px;
    right: 8px;
    top: 38px;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-animation: animateSuccessLong .75s;
    animation: animateSuccessLong .75s
  }
  
  .swal-icon {
    width: 80px;
    height: 80px;
    border-width: 4px;
    border-style: solid;
    border-radius: 50%;
    padding: 0;
    position: relative;
    box-sizing: content-box;
    margin: 20px auto
  }
  
  .swal-icon:first-child {
    margin-top: 32px
  }

  #transaction-approved.show {
    animation: showGreenCheck 3s ease-in-out;
  }

  @keyframes showGreenCheck {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
  }

  @keyframes animateSuccessLong {
    0% {
      width: 0;
      right: 46px;
      top: 54px
    }
    65% {
      width: 0;
      right: 46px;
      top: 54px
    }
    84% {
      width: 55px;
      right: 0;
      top: 35px
    }
    to {
      width: 47px;
      right: 8px;
      top: 38px
    }
  }
  
  @keyframes rotatePlaceholder {
    0% {
      -webkit-transform: rotate(-45deg);
      transform: rotate(-45deg)
    }
    5% {
      -webkit-transform: rotate(-45deg);
      transform: rotate(-45deg)
    }
    12% {
      -webkit-transform: rotate(-405deg);
      transform: rotate(-405deg)
    }
    to {
      -webkit-transform: rotate(-405deg);
      transform: rotate(-405deg)
    }
  }
  
  @keyframes animateSuccessTip {
    0% {
      width: 0;
      left: 1px;
      top: 19px
    }
    54% {
      width: 0;
      left: 1px;
      top: 19px
    }
    70% {
      width: 50px;
      left: -8px;
      top: 37px
    }
    84% {
      width: 17px;
      left: 21px;
      top: 48px
    }
    to {
      width: 25px;
      left: 14px;
      top: 45px
    }
  }
  .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #db5534;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }