:root {
  --yellow: #fffdbe;
  --cream: #fffdbe;
  --blue: #2763dc;
  --deep-blue: #1d2d8b;
  --night: #0c1d55;
  --text: #1e1b2e;
  --muted: #615b73;
  --card-shadow: 0 20px 45px rgba(24, 29, 78, 0.15);
  --header-offset: 70px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Gill sans", "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  font-weight: 200;
  font-size: 1.4rem;
  color: var(--text);
  background-color: var(--cream);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, calc(100% - 7rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--yellow);
  padding: 0.75rem 0;
  box-shadow: 0 10px 20px rgba(12, 29, 85, 0.1);
}

.site-header .container {
  font-family: "gil-modern";
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  color: var(--blue);
  font-family: "chorine-large";
  font-weight: 700;
  font-size: 4rem;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.2rem;
}

.brand img {
  height: 40px;
}

nav {
  display: flex;
  gap: 3rem;
  font-weight: 600;
  font-size: 2rem;
  color: var(--blue);
}

nav a {
  position: relative;
  padding-bottom: 0.25rem;
  color: inherit;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #2763dc;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  transform: scaleX(1);
}

.plongeoir {
  padding: 0;
  background-color: var(--blue);
}

.plongeoir-visual {
  position: relative;
  width: min(1200px, 100%);
  margin: 0 auto;
  container-type: inline-size;
}

.plongeoir img {
  width: 100%;
  display: block;
}

.plongeoir-slogan {
  position: absolute;
  top: 31%;
  left: 5.75%;
  z-index: 1;
  width: 38%;
  color: var(--yellow);
  line-height: 0.9;
}

.plongeoir-slogan-intro,
.plongeoir-slogan-brand {
  margin: 0;
}

.plongeoir-slogan-intro {
  font-family: "gil-modern", cursive;
  font-size: clamp(1.1rem, 3.8cqw, 2.8rem);
  margin-bottom: 0.35em;
}

.plongeoir-slogan-brand {
  font-family: "chorine-large", sans-serif;
  font-size: clamp(2.7rem, 9.8cqw, 7.4rem);
  letter-spacing: 0.015em;
}

.section {
  padding: 2rem 0 2rem 0;
}

.section[id] {
  scroll-margin-top: var(--header-offset);
}

.section h2,
.section h3 {
  font-family: "gil-modern", cursive;
  color: var(--deep-blue);
  margin-top: 0;
}

.section-quoi h2,
.section-ou h2 {
  color: var(--blue);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.section-quoi p {
  font-size: 1.5rem;
  letter-spacing: 0rem;
  line-height: 2.3rem;
}
.section-quoi {
  background-color: #efefef;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 0;
}

.quoi-content {
  position: relative;
  min-height: 480px;
  padding: 3rem 0;
}

.quoi-content::after {
  content: "";
  position: absolute;
  top: 0;
  right: -80px;
  bottom: -80px;
  width: 55%;
  background: url("../img/trempette-chocolat.jpg") center/cover no-repeat;
  opacity: 0.9;
}

.quoi-text {
  max-width: 660px;
  position: relative;
  z-index: 2;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 3rem;
  align-items: top;
}

.image-column img {
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

.section-cards {
  background-color: white;
}

.section-cards h2 {
  color: #2763dc;
  text-align: left;
  font-size: 2.3rem;
}

.card-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.card-item {
  background-color: var(--yellow);
  min-height: 0;
  padding: 1.4rem 1.2rem 1.8rem;
  border-radius: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  aspect-ratio: 0.58;
}

.card-label {
  margin: 0;
  color: var(--blue);
  font-family: "gil-modern";
  font-weight: 200;
  font-size: clamp(1.2rem, 2.2vw, 2.2rem);
  line-height: 1.03;
  min-height: 2.06em;
}

.card-number {
  margin: 0;
  color: var(--blue);
  font-size: clamp(3.2rem, 5vw, 4.2rem);
  font-family: "chorine-large";
  line-height: 1;
}

.card {
  color: var(--text);
  box-shadow: none;
}

.card-illustration {
  width: 100%;
  margin-top: 1rem;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-item {
    aspect-ratio: 0.72;
  }
}

.instagram {
  --ig-scroll-speed: 100;
  background-color: var(--blue);
  color: white;
  overflow: hidden;
}

.ig-carousel {
  --ig-card-width: clamp(170px, 20vw, 300px);
  width: 100%;
}

.ig-feed {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1rem;
  width: max-content;
  will-change: transform;
}

.ig-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--ig-card-width);
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

.ig-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--cream);
  color: var(--deep-blue);
  font-family: "Gill sans", cursive;
  font-size: clamp(0.9rem, 1.4vw, 1.25rem);
  line-height: 1.1;
  padding: 0.55rem 0.7rem 0.65rem;
  border-radius: 8px 8px 0 0;
}

.ig-card-head img {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  filter: invert(19%) sepia(78%) saturate(2451%) hue-rotate(225deg) brightness(83%) contrast(96%);
}

.ig-card a {
  display: block;
  aspect-ratio: 3 / 4;
}

.ig-card a img,
.ig-card a video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ig-card video {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ig-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ig-feed {
    padding-bottom: 0.25rem;
  }
}

.section-qui {
  position: relative;
  padding: 0 0 4rem;
  background: url("../img/trempette-plongeon-01.jpg") center / cover no-repeat;
  min-height: clamp(420px, 55vw, 680px);
}

.qui-overlay {
  position: relative;
  margin-top: 0;
  padding-top: max(0px, calc(clamp(6rem, 18vw, 14rem) - 150px));
  padding-bottom: 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
  color: white;
}

.qui-overlay h2 {
  grid-column: 1 / -1;
  color: #2763dc;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin: -18px 0 1.5rem;
}

.qui-card {
  width: 100%;
  max-width: 400px;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  color: white;
}

.qui-card h3 {
  margin: 0;
  font-family: "Gill sans", "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 500;
  color: black;
}

.qui-gauche {
  justify-self: start;
  margin-top: -20px;
}

.qui-droite {
  justify-self: end;
  margin-top: 200px;
  margin-right: 10%;
}

.qui-card p {
  line-height: 1.4;
  color: #1e1b2e;
  margin: 0;
  padding: 0;
  font-size: 1.4rem;
}

.section-ou {
  background-color: var(--yellow);
}

.schedule {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.note {
  color: var(--muted);
}

.site-footer {
  background-color: var(--blue);
  color: var(--yellow);
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
  font-family: "Gill sans", "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.8rem;
}

.footer-content p {
    width: 80%;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.footer-links span {
  position: relative;
  cursor: not-allowed;
}

.footer-links img {
    width: 50px;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background-color: var(--deep-blue);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 900px) {
  nav {
    gap: 1rem;
    font-size: 1.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .quoi-content {
    min-height: 420px;
  }

  .quoi-content::after {
    right: -40px;
    width: 65%;
  }

  .card-item {
    aspect-ratio: 0.68;
  }

  .qui-overlay {
    padding-top: max(0px, calc(clamp(5rem, 20vw, 12rem) - 175px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qui-card {
    max-width: 100%;
    padding: 0.9rem 1rem 1.05rem;
    background-color: rgba(245, 245, 245, 0.68);
    border-radius: 10px;
  }
  
  .footer-content p {
      width: 100%;
  }
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0rem;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

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

  .card-item {
    aspect-ratio: auto;
    min-height: 380px;
  }

  .quoi-content {
    min-height: auto;
    padding-bottom: 0;
  }

  .quoi-content::after {
    position: static;
    width: 100%;
    height: 260px;
    display: block;
    margin-top: 2rem;
  }

  .quoi-text {
    max-width: 100%;
  }

  .plongeoir-slogan {
    top: 29%;
    left: 6%;
    width: 46%;
    line-height: 0.92;
  }

  .plongeoir-slogan-intro {
    font-size: clamp(0.95rem, 4.6cqw, 1.5rem);
  }

  .plongeoir-slogan-brand {
    font-size: clamp(2.2rem, 12.2cqw, 4.4rem);
  }

  .section-qui {
    padding-bottom: 2rem;
    min-height: auto;
    background-position: center top;
  }

  .qui-overlay {
    padding-top: 2rem;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .qui-gauche,
  .qui-droite {
    justify-self: stretch;
    margin-top: 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-content p {
      width: 100%;
  }

  .footer-links {
    justify-content: center;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}
