@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

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

html,
body {
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --primaire-jhn: #ff7a57;
  --primaire-blanc: #ffffff;
  --fond-navbar: rgba(0, 0, 0, 0.23);
}

/* NAVBAR GLASS (desktop / tablette) */
.navbar-glass {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1300px;
  height: 88px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 64px 0 24px;

  background: var(--fond-navbar);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    -11.2px -10.4px 48px rgba(0, 0, 0, 0.08),
    -1.9px -1.7px 12px rgba(0, 0, 0, 0.15),
    inset 2px 1.9px 8.6px rgba(255, 255, 255, 0.15),
    inset 1.1px 1px 4.3px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  z-index: 50;
}

/* contour “liquid” */
.navbar-glass::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;

  background-image: conic-gradient(
    from 90deg at 0 0,
    rgba(255, 255, 255, 0.4) 12deg,
    transparent 36deg,
    rgba(255, 255, 255, 0.4) 62deg,
    transparent 86deg
  );
  background-origin: border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Items nav */
.nav-item {
  position: relative;
  font-family: "Rubik One", system-ui, sans-serif;
  font-size: 20px;
  color: var(--primaire-blanc);
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.nav-item.active {
  background-color: var(--primaire-jhn);
  color: var(--primaire-blanc);
  box-shadow: 0 0 24px rgba(255, 122, 87, 0.7);
}

.nav-item:hover {
  transform: translateY(-1px);
  background-color: rgba(255, 255, 255, 0.06);
}

/* NAV MOBILE (cachée par défaut) */
.navbar-mobile {
  display: none;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-group--right {
  justify-content: flex-end;
}

.nav-center-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.nav-center-logo img {
  height: 52px;
  width: auto;
}

/* HERO IMAGE + TEXTE (desktop / tablette) */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: scale(1.05);
  transform-origin: center;
}

/* léger voile sombre pour lisibilité */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.75)
  );
  z-index: 2;
}

/* contenu hero (desktop / tablette) */
.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8vw;
  color: #fff;
  margin-top: 140px;
}

.hero-content h1 {
  font-family: "Luckiest Guy", cursive;
  font-size: clamp(2.8rem, 4vw, 4rem);
  margin-bottom: 1rem;
}

.hero-content p {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.hero-content a {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* bouton hero */
.hero-buttons {
  display: flex;
  gap: 15px;
}

.btn-hero {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  background: var(--primaire-jhn);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.btn-hero:hover {
  background-color: #2d3030;
}

.px-task-btn {
  background-color: #32B9C5;
}

.cards-section {
  margin: 40px auto 64px;
  max-width: 1600px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding: 0 40px;
}

/* intro occupe toute la largeur des 2 colonnes */
.cards-intro {
  grid-column: 1 / -1;
}

.cards-intro p {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  color: #444;
  margin: -17px 0px 12px 0px;
}

/* style commun des lignes */
.cards-intro__line {
  display: block;
  width: 100%;
  height: 1px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 1);
}

/* par défaut (desktop) : on cache la ligne du haut */
.cards-intro__line--top {
  display: none;
}

/* CARTES PRODUITS */

.card {
  background: #e5e5e5;
  border-radius: 40px;
  padding: 30px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.12);

  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.16);
}

.card-text {
  max-width: 55%;
}

.card h2 {
  font-size: 26px;
  color: #2669d8;
  margin: 0 0 16px;
  font-family: "Luckiest Guy", cursive;
  font-weight: 400;
}

.card p {
  font-size: 13px;
  line-height: 1.4;
  color: #333;
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.card-link {
  color: inherit;
}

.card-media {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media img {
  max-width: 290px;
  height: auto;
  border-radius: 40px;
  margin-left: 15px;
}

.actif {
  font-weight: 1000 !important;
  color: #ef795b !important;
}

.cards-intro__text--short {
  display: none;
}

/* ----------------------------------------------------
   RESPONSIVE (MEDIA QUERIES)
   Grouped by breakpoint, from largest to smallest.
---------------------------------------------------- */

/* 1. Max Width: 1189px */
@media (max-width: 1189px) {
  .card-media img {
    max-width: 250px;
    margin-left: 0;
  }
}

/* 2. Max Width: 900px */
@media (max-width: 900px) {
  /* Cards Intro Tweaks */
  .cards-intro {
    grid-column: 1 / -1;
  }

  .cards-intro__line--top {
    display: block;
  }

  .cards-intro p {
    margin: 8px 0;
    max-width: 320px;
    font-size: 0.9rem;
  }

  .cards-intro__text--full {
    display: none;
  }
  .cards-intro__text--short {
    display: block;
  }

  /* Card Layout Changes */
  .card {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

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

  .card-media {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .card-media img {
    max-width: 250px;
    margin-left: 0;
  }

  /* Navbar Mobile + Hero Mobile */
  .navbar-glass {
    display: none;
  }

  .navbar-mobile {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
  }

  .navbar-mobile__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(245, 245, 247, 0.9);
    backdrop-filter: blur(20px);
    z-index: 110;
  }

  .navbar-mobile__logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 72px;
  }

  .navbar-mobile__icon {
    width: 101px;
    height: auto;
    display: block;
    margin: -14px -2px -14px 0px;
  }

  .navbar-mobile__title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111;
  }

  .burger {
    position: relative;
    width: 24px;
    height: 12px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 120;
  }

  .burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #111;
    border-radius: 999px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  .burger.is-open .burger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  .burger.is-open .burger-line:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    background: #f5f5f7;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
    padding: 80px 24px 24px;
    z-index: 90;
  }

  .mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu__list {
    list-style: none;
  }

  .mobile-menu__list li {
    margin-bottom: 18px;
    opacity: 0;
    transform: translateY(-6px);
    animation: menuItemFade 0.25s ease forwards;
  }

  .mobile-menu__list li:nth-child(1) { animation-delay: 0.05s; }
  .mobile-menu__list li:nth-child(2) { animation-delay: 0.08s; }
  .mobile-menu__list li:nth-child(3) { animation-delay: 0.11s; }
  .mobile-menu__list li:nth-child(4) { animation-delay: 0.14s; }

  .mobile-menu__list a {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
  }

  .mobile-menu__list a:hover {
    color: #000;
  }

  @keyframes menuItemFade {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* HERO MOBILE */
  .hero-full {
    display: none;
  }

  .hero::before {
    display: none;
  }

  .hero {
    margin-top: 56px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0 0;
    background: #fff;
  }

  .hero-content {
    height: auto;
    margin-top: 0;
    padding: 0 24px;
    align-items: center;
    text-align: center;
    color: #000;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content p {
    max-width: 320px;
    font-size: 0.9rem;
  }
}

/* 3. Range: 900px >= width >= 710px */
@media (max-width: 900px) and (min-width: 710px) {
  .cards-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 4. Max Width: 709px */
@media (max-width: 709px) {
  .cards-section {
    grid-template-columns: 1fr;
  }
}
