/* rem and em do NOT depend on html font-size in media queries! Instead, 1rem = 1em = 16px */

/* CTA Section Responsive Styles */
@media (max-width: 75em) {
  .section-cta-intermediate {
    padding: 5rem 0;
  }

  .cta-wrapper {
    grid-template-columns: 1fr;
    gap: 6rem;
    text-align: center;
  }

  .cta-content {
    text-align: center;
  }

  .cta-title {
    font-size: 4.4rem;
  }

  .cta-description {
    font-size: 1.8rem;
  }

  .cta-buttons {
    justify-content: center;
    gap: 2rem;
  }

  .store-btn-cta {
    min-width: 22rem;
  }

  .cta-features {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .feature-item {
    min-width: 28rem;
    padding: 1.8rem 2.5rem;
    justify-content: flex-start;
  }

  .cta-visual {
    height: 60rem;
  }

  .main-hero-image {
    max-width: 65rem;
  }
}

@media (max-width: 59em) {
  .section-cta-intermediate {
    padding: 4rem 0;
  }

  .cta-wrapper {
    gap: 4rem;
  }

  .cta-title {
    font-size: 3.6rem;
  }

  .cta-description {
    font-size: 1.7rem;
    margin-bottom: 4rem;
  }

  .cta-buttons {
    gap: 1.5rem;
    margin-bottom: 4rem;
  }

  .store-btn-cta {
    min-width: 20rem;
    padding: 1.4rem 2rem;
  }

  .cta-features {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .feature-item {
    min-width: 24rem;
    padding: 1.5rem 2rem;
  }

  .feature-icon {
    font-size: 2rem;
    width: 4rem;
    height: 4rem;
  }

  .cta-visual {
    height: 50rem;
  }

  .main-hero-image {
    max-width: 50rem;
  }

  .floating-element {
    font-size: 2.5rem;
  }
}

@media (max-width: 44em) {
  .section-cta-intermediate {
    padding: 3rem 0;
  }

  .cta-wrapper {
    gap: 4rem;
  }

  .cta-badge {
    padding: 1rem 1.8rem;
  }

  .badge-text {
    font-size: 1.4rem;
  }

  .cta-title {
    font-size: 3rem;
  }

  .cta-description {
    font-size: 1.6rem;
    margin-bottom: 3rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .store-btn-cta {
    min-width: 24rem;
    padding: 1.4rem 2rem;
  }

  .store-btn-cta .btn-logo {
    width: 3.2rem;
    height: 3.2rem;
  }

  .store-btn-cta .btn-label {
    font-size: 1.2rem;
  }

  .store-btn-cta .btn-store {
    font-size: 1.6rem;
  }

  .cta-features {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .feature-item {
    min-width: 22rem;
    padding: 1.4rem 2rem;
  }

  .cta-visual {
    height: 40rem;
  }

  .main-hero-image {
    max-width: 40rem;
  }

  .floating-element {
    font-size: 2rem;
    opacity: 0.3;
  }
}

/**************************/
/* BELOW 1344px (Smaller desktops) */
/**************************/

@media (max-width: 84em) {
  .hero {
    max-width: 140rem;
    gap: 4rem;
  }

  .section-hero .heading-primary {
    font-size: 4.2rem;
  }

  .hero-description {
    font-size: 1.7rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/**************************/
/* BELOW 1200px (Landscape Tablets) */
/**************************/

@media (max-width: 75em) {
  html {
    /* 9px / 16px  */
    font-size: 56.25%;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 15.4rem;
  }

  .heading-secondary {
    font-size: 3.6rem;
  }

  .heading-tertiary {
    font-size: 2.4rem;
  }

  .header {
    padding: 0 3.2rem;
  }

  .main-nav-list {
    gap: 3.2rem;
  }

  .hero {
    gap: 4.8rem;
  }

  .testimonials-container {
    padding: 9.6rem 3.2rem;
  }
}

/**************************/
/* BELOW 944px (Tablets) */
/**************************/

@media (max-width: 59em) {
  html {
    /* 8px / 16px = 0.5 = 50% */
    font-size: 50%;
  }

  .section-ccm {
    margin: 5rem;
  }

  .innovation-badge {
    right: 30px;
  }
  .store-btn-container.first-block .store-btn .store {
    width: 50%;
    height: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 3.2rem;
    gap: 4rem;
    text-align: center;
  }

  .section-hero .heading-primary {
    font-size: 3.6rem;
  }

  .hero-description {
    font-size: 1.6rem;
    max-width: 100%;
  }

  .store-btn-container {
    justify-content: center;
  }

  .hero-cta-section {
    align-items: center;
  }

  .cta-badge-hero {
    align-self: center;
  }

  .hero-img {
    width: 100%;
    max-width: 100%;
    transform: translateX(0);
    object-fit: contain;
  }

  .hero-img:hover {
    transform: translateX(0) scale(1.02);
  }

  .hero-img-box {
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .hero-img {
    width: 60%;
  }

  .delivered-ccm {
    justify-content: center;
    margin-top: 3.2rem;
  }

  .logos img {
    height: 2.4rem;
  }

  .step-number {
    font-size: 7.4rem;
  }

  .meal-content {
    padding: 2.4rem 3.2rem 3.2rem 3.2rem;
  }

  .section-testimonials {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }

  .cta {
    /* 3/5 = 60% + 2/5 = 40% */
    grid-template-columns: 3fr 2fr;
  }

  .cta-form {
    grid-template-columns: 1fr;
  }

  .btn--form {
    margin-top: 1.2rem;
  }

  /* MOBILE NAVIGATION */
  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .store-btn-container {
    position: relative; /* Définir la position relative */
    z-index: 1; /* Assurez-vous que les boutons d'application sont en arrière-plan */
  }

  .main-nav {
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: translateX(100%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;

    /* Hide navigation */
    /* Allows NO transitions at all */
    /* display: none; */

    /* 1) Hide it visually */
    opacity: 0;

    /* 2) Make it unaccessible to mouse and keyboard */
    pointer-events: none;

    /* 3) Hide it from screen readers */
    visibility: hidden;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-open .icon-mobile-nav[name="close-outline"] {
    display: block;
  }

  .nav-open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }

  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .main-nav-link:link,
  .main-nav-link:visited {
    font-size: 3rem;
  }
}

/**************************/
/* BELOW 704px (Smaller tablets) */
/**************************/

@media (max-width: 44em) {
  .section-hero {
    padding: 4rem 0 6rem 0;
  }

  .section-hero .heading-primary {
    font-size: 3rem;
    margin-bottom: 2rem;
  }

  .hero-description {
    font-size: 1.5rem;
    margin-bottom: 3rem;
  }

  .cta-text-new {
    font-size: 1.4rem;
  }

  .cta-subtitle {
    font-size: 1.2rem;
  }

  .store-btn-hero {
    padding: 1.2rem 2rem;
    min-width: 180px;
  }

  .store-btn-hero img {
    height: 3rem;
  }

  .btn-store {
    font-size: 1.3rem;
  }

  .store-btn-container {
    flex-direction: column;
    align-items: center;
  }

  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid {
    row-gap: 5.4rem;
  }

  .benefit {
    width: 35%;
  }

  .meal-img {
    width: 100%;
  }

  .innovation-badge {
    right: 150px;
  }

  .store-btn-container.second-block .store-btn .store {
    width: 90%;
    height: auto;
  }

  .cta-img-box {
    background-size: cover;
    width: 40rem !important;
  }

  .diets {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .heading-secondary {
    margin-bottom: 4.8rem;
  }

  .propos-plan {
    width: 100%;
  }

  .grid--footer {
    grid-template-columns: repeat(6, 1fr);
  }

  .logo-col,
  .address-col {
    grid-column: span 3;
  }

  .nav-col {
    grid-row: 1;
    grid-column: span 2;
    margin-bottom: 3.2rem;
  }
}

/**************************/
/* BELOW 544px (Phones) */
/**************************/

@media (max-width: 34em) {
  .grid {
    row-gap: 4.8rem;
  }

  .grid--2-cols,
  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: 1fr;
  }

  .btn,
  .btn:link,
  .btn:visited {
    padding: 2.4rem 1.6rem;
  }

  .benefit {
    width: 20%;
  }

  .heading-primary {
    font-size: 3.4rem;
  }
  .innovation-badge {
    right: 9rem;
  }

  .grid {
    row-gap: 10rem;
  }

  .step-text-box {
    text-align: center;
  }

  .meal-img {
    width: 100%;
  }

  .step-img-box .step-img.phone {
    width: 50%;
  }

  .step-img-box {
    width: 65%;
    margin: 0 auto;
  }

  .step-img-box:nth-child(3) img {
    width: 85%;
  }

  .feature {
    text-align: center;
  }

  .store-btn-container.first-block .store-btn .store {
    width: 70%;
    height: auto;
  }

  .store-btn-container.second-block .store-btn .store {
    width: 70%;
  }

  .cta-img-box {
    background-size: cover;
    height: 40rem !important;
    width: 62rem !important;
  }

  .section-hero {
    padding: 2.4rem 0 6.4rem 0;
  }

  .hero {
    padding: 0rem;
  }

  .hero-img {
    width: 80%;
  }

  .logos img {
    height: 1.2rem;
  }

  .step-img-box:nth-child(2) {
    grid-row: 1;
  }

  .step-img-box:nth-child(6) {
    grid-row: 5;
  }

  .step-img-box {
    transform: translateY(2.4rem);
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
  }

  .cta {
    grid-template-columns: 1fr;
  }

  .cta-text-box {
    padding: 3.2rem;
  }

  .cta-img-box {
    height: 32rem;
    width: 45rem !important;
    grid-row: 1;
  }
}

/**************************/
/* BELOW 375px (Phones) */
/**************************/

@media (max-width: 24em) {
  .grid {
    row-gap: 4.8rem;
  }

  .grid--2-cols,
  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: 1fr;
  }

  .btn,
  .btn:link,
  .btn:visited {
    padding: 2.4rem 1.6rem;
  }

  .benefit {
    width: 20%;
  }

  .heading-primary {
    font-size: 3.4rem;
    margin-right: 0px;
  }

  .store-btn {
    margin-right: 3rem;
  }

  .delivered-imgs img {
    height: 5.8rem;
    width: 5.8rem;
  }

  .hero-description {
    margin-right: 0px;
  }

  .cta-text-box {
    margin-right: 5rem;
  }
}

/**************************/
/* BELOW 320px (Phones) */
/**************************/

@media (max-width: 20em) {
  .innovation-badge {
    right: 4rem;
  }

  .cta-text-box {
    margin-right: 10rem;
  }

  .store-btn-container.second-block .store-btn .store {
    width: 90%;
  }
}

/*
- Font sizes (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98

- Spacing system (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
*/

/**************************/
/* Fixing Safari flexbox gap */
/**************************/

.no-flexbox-gap .main-nav-list li:not(:last-child) {
  margin-right: 4.8rem;
}

.no-flexbox-gap .list-item:not(:last-child) {
  margin-bottom: 1.6rem;
}

.no-flexbox-gap .list-icon:not(:last-child) {
  margin-right: 1.6rem;
}

.no-flexbox-gap .delivered-faces {
  margin-right: 1.6rem;
}

.no-flexbox-gap .meal-attribute:not(:last-child) {
  margin-bottom: 2rem;
}

.no-flexbox-gap .meal-icon {
  margin-right: 1.6rem;
}

.no-flexbox-gap .footer-row div:not(:last-child) {
  margin-right: 6.4rem;
}

.no-flexbox-gap .social-links li:not(:last-child) {
  margin-right: 2.4rem;
}

.no-flexbox-gap .footer-nav li:not(:last-child) {
  margin-bottom: 2.4rem;
}

@media (max-width: 75em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 3.2rem;
  }
}

@media (max-width: 59em) {
  .no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 4.8rem;
  }
}

/**************************/
/* BACK2SCHOOL RESPONSIVE */
/**************************/

@media (max-width: 75em) {
  .steps-grid {
    gap: 3rem;
  }

  .testimonials-grid {
    gap: 3rem;
  }

  .countdown-timer {
    gap: 2rem;
  }
}

@media (max-width: 59em) {
  .promo-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .section-promo .promo-banner {
    padding: 3rem 2rem;
  }

  .section-promo .promo-banner h2 {
    font-size: 2.6rem;
  }

  .promo-benefits {
    gap: 2rem;
  }

  .benefit-item {
    font-size: 1.6rem;
  }

  .section-promo .promo-code {
    font-size: 1.8rem;
  }

  .section-promo .promo-code strong {
    font-size: 2rem;
  }

  .promo-details {
    padding: 3rem 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .promo-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 4rem;
  }

  .step-content {
    flex-direction: column;
    text-align: center;
    gap: 3.5rem;
  }

  .step-image {
    width: auto;
  }

  .step-image img {
    width: 20rem;
  }

  .step-text {
    padding-left: 0;
  }
  
  .step-number {
    width: 60px;
    height: 60px;
    font-size: 2.4rem;
    top: -35px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .trust-logos {
    gap: 2rem;
  }

  .trust-logo {
    height: 3rem;
  }

  .urgency-banner {
    padding: 3rem 2rem;
  }

  .urgency-banner h2 {
    font-size: 2.4rem;
  }

  .countdown-timer {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .countdown-item {
    min-width: 6rem;
    padding: 1.5rem;
  }

  .countdown-item span {
    font-size: 2.4rem;
  }
}

@media (max-width: 44em) {
  .section-promo .promo-banner h2 {
    font-size: 2.8rem;
  }

  .section-promo .promo-banner > p {
    font-size: 2rem;
  }

  .promo-benefits {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .benefit-item {
    font-size: 1.8rem;
    padding: 1rem 1.5rem;
  }

  .section-promo .promo-code {
    font-size: 2rem;
    padding: 1.5rem 2rem;
  }

  .section-promo .promo-code strong {
    font-size: 2.2rem;
  }

  .promo-details h3 {
    font-size: 2.4rem;
  }

  .service-item {
    padding: 1.2rem;
  }

  .service-item span:last-child {
    font-size: 1.8rem;
  }

  .stat-number {
    font-size: 2.4rem;
  }

  .stat-label {
    font-size: 1.6rem;
  }

  .promo-partners h4 {
    font-size: 2rem;
  }

  .partner-logos-promo {
    gap: 1.5rem;
  }

  .promo-partner-logo {
    height: 4.5rem;
  }

  .partner-name {
    font-size: 1.6rem;
    padding: 1.2rem 2.4rem;
  }

  .step-item {
    padding: 5rem 2.5rem 3rem 2.5rem;
    margin-top: 4rem;
    min-height: 30rem;
  }

  .step-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .step-image {
    width: auto;
  }

  .step-image img {
    width: 18rem;
  }

  .step-text {
    padding-left: 0;
  }

  .step-text h3 {
    font-size: 1.8rem;
  }

  .step-text p {
    font-size: 1.4rem;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    top: -25px;
  }

  .testimonial {
    padding: 2rem;
  }

  .testimonial blockquote {
    font-size: 1.6rem;
  }

  .trust-logos {
    gap: 1.5rem;
  }

  .trust-logo {
    height: 2.5rem;
  }

  .urgency-banner h2 {
    font-size: 2rem;
  }

  .countdown-item {
    min-width: 5rem;
    padding: 1rem;
  }

  .countdown-item span {
    font-size: 2rem;
  }

  .countdown-item label {
    font-size: 1.2rem;
  }

  /* CTA Responsive */
  .cta-wrapper {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .cta-content {
    text-align: center;
  }

  .cta-title {
    font-size: 3.2rem;
  }

  .cta-description {
    font-size: 1.6rem;
    max-width: 100%;
  }

  .cta-trust {
    justify-content: center;
  }

  .hero-image {
    width: 30rem;
  }

  .app-showcase {
    position: static;
    transform: none;
    margin-top: 3rem;
  }

  .app-screens {
    width: 25rem;
  }
}

@media (max-width: 34em) {
  .cta-title {
    font-size: 2.6rem;
  }

  .cta-description {
    font-size: 1.5rem;
  }

  .download-btn {
    min-width: 240px;
    padding: 1.5rem 2rem;
  }

  .hero-image {
    width: 25rem;
  }

  .app-screens {
    width: 20rem;
  }

  .cta-trust {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .section-promo .promo-banner {
    padding: 2rem 1.5rem;
  }

  .section-promo .promo-banner h2 {
    font-size: 1.8rem;
  }

  .section-promo .promo-banner > p {
    font-size: 1.4rem;
  }

  .benefit-item {
    font-size: 1.2rem;
    padding: 0.8rem 1rem;
  }

  .section-promo .promo-code {
    font-size: 1.4rem;
    padding: 1rem 1.5rem;
  }

  .section-promo .promo-code strong {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .promo-details {
    padding: 2rem 1.5rem;
  }

  .promo-details h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }

  .service-item {
    padding: 1rem;
    gap: 0.8rem;
  }

  .service-icon {
    font-size: 1.8rem;
  }

  .service-item span:last-child {
    font-size: 1.3rem;
  }

  .stat-item {
    padding: 1.5rem 0.8rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 1.1rem;
  }

  
  .step-item {
    padding: 4.5rem 1.5rem 2.5rem 1.5rem;
    margin-top: 3.5rem;
    min-height: 28rem;
  }

  .step-content {
    gap: 2.5rem;
  }

  .step-image img {
    width: 16rem;
  }

  .step-text h3 {
    font-size: 2rem;
  }

  .step-text p {
    font-size: 1.5rem;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 2.2rem;
    top: -30px;
  }

  .testimonial-img {
    width: 6rem;
    height: 6rem;
  }

  .urgency-banner {
    padding: 2rem 1rem;
  }

  .urgency-banner h2 {
    font-size: 1.8rem;
  }

  .countdown-timer {
    gap: 1rem;
  }

  .countdown-item {
    min-width: 4.5rem;
    padding: 0.8rem;
  }

  .countdown-item span {
    font-size: 1.8rem;
  }
}
