/* ==============================================
   HOME — layout style Kayak
   ============================================== */

/* ── Page wrapper — pleine largeur, max-width par élément ── */
.home-page {
  width: 100%;
}

/* ── Hero — carte arrondie ───────────────────── */
.home-hero {
  display: grid;
  grid-template-columns: 55fr 45fr;
  height: 500px;
  max-width: var(--max-width);
  margin: 50px auto 0;
  padding: 0 var(--page-padding, 20px);
  background: #f6f6f6;
  border-radius: 24px;
  overflow: hidden;
}

/* ── Colonne gauche ──────────────────────────── */
.home-hero__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 40px 64px 80px;
}

/* ── Titre ───────────────────────────────────── */
.home-hero__title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #111;
  margin: 0 0 2.5rem;
}

.home-hero__dot {
  color: var(--color-primary, #37ED4A);
}

/* ── Catégories ──────────────────────────────── */
.home-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-cat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: #fff;
  border: 1.5px solid #e0ddd7;
  border-radius: 16px;
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.home-cat:hover {
  border-color: #111;
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

.home-cat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #111;
}

.home-cat__icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  display: block;
}

/* ── Colonne droite ──────────────────────────── */
.home-hero__right {
  position: relative;
  overflow: hidden;
  padding-left: 16px;
}

/* Fondu gauche */
.home-hero__right::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 40px;
  background: linear-gradient(to right, var(--color-background), transparent);
  z-index: 1;
  pointer-events: none;
}

/* ── Mosaïque ────────────────────────────────── */
/*
   3 images × 260px + 2 gaps × 12px = 808px de colonne
   Pour centrer dans 500px : margin-top = -(808-500)/2 = -154px
   → image du haut coupée à 154px, image du bas coupée à 154px
*/
.home-mosaic {
  display: flex;
  gap: 12px;
  height: 774px;
  margin-top: -137px;
  margin-right: -20px; /* Col 2 dépasse légèrement à droite */
  width: fit-content;
  margin-left: auto;   /* Colle à droite du panneau */
}

.home-mosaic__col {
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  will-change: transform;
}

/* Col 2 décalée pour le stagger */
.home-mosaic__col--offset {
  padding-top: 50px;
}

/* Items — carrés 260×260 */
.home-mosaic__item {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
}

.home-mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.home-mosaic__item:hover img {
  transform: scale(1.04);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  .home-hero__left {
    padding: 48px 32px 48px 48px;
  }
  .home-mosaic__col     { flex: 0 0 210px; }
  .home-mosaic__item    { width: 210px; height: 210px; }
  .home-mosaic          { height: 656px; margin-top: -78px; }
}

@media (max-width: 768px) {
  .home-hero {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    border-radius: 16px;
    margin-top: 24px;
  }
  .home-hero__left { padding: 48px 24px 32px; }
  .home-hero__right {
    height: 280px;
    padding: 0;
    overflow: hidden;
  }
  .home-hero__right::before { display: none; }
  .home-mosaic {
    height: 560px;
    margin-top: -140px;
    margin-right: -12px;
  }
  .home-mosaic__col  { flex: 0 0 130px; }
  .home-mosaic__item { width: 130px; height: 130px; }
  .home-mosaic__col--offset { padding-top: 30px; }
}

@media (max-width: 480px) {
  .home-hero__title {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    margin-bottom: 1.75rem;
  }
  .home-cat { width: 54px; height: 54px; border-radius: 14px; }
  .home-hero__cats { gap: 10px; }
  .home-cat__icon,
  .home-cat__icon svg { width: 24px; height: 24px; }
}

/* ── Carrousel — Derniers articles ───────────── */
.home-recent {
  max-width: var(--max-width);
  margin: 72px auto;
  padding: 0 20px; /* 20px de marge → respiration pour translateY + drop-shadow */
}

.home-recent__heading {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 20px;
}

/* Wrapper — overflow:hidden uniquement sur les côtés (cache les cartes hors-champ)
   padding vertical seul : donne de la marge à translateY + drop-shadow
   sans exposer de cartes supplémentaires sur les côtés */
.home-recent__overflow {
  overflow: hidden;
  padding: 16px 0 20px;
  margin: -16px 0 -20px;
}

/* Track — positionné par JS via translateX, pas de scroll natif */
.home-recent__track {
  display: flex;
  gap: 16px;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}


/* Carte — blanche, drop-shadow (non clippé par overflow), padding uniforme */
.home-recent__card {
  flex: 0 0 calc(25% - 12px);
  height: 290px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  background: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
  transition: transform 0.22s ease, filter 0.22s ease;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
}
.home-recent__card:hover {
  transform: translateY(-5px);
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.13));
}

/* Image — coins arrondis propres, hauteur fixe anti-jump */
.home-recent__img {
  width: 100%;
  height: 210px;               /* hauteur fixe anti-jump */
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 10px;         /* image avec ses propres coins arrondis */
}
.home-recent__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.38s ease;
}
.home-recent__card:hover .home-recent__img img {
  transform: scale(1.07); /* zoom contenu par overflow:hidden de .home-recent__img */
}

/* Titre — 2 lignes max avec ellipsis
   Pas de height explicite : conflit avec line-clamp → la carte fixe la hauteur */
.home-recent__label {
  padding: 12px 6px 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  margin: 0;
  font-family: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Navigation — flèches en bas à droite */
.home-recent__nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Flèche — état actif (peut cliquer) */
.home-recent__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #aaa;
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, color 0.18s, box-shadow 0.18s;
  padding: 0 0 1px 0;         /* micro-ajustement optique centrage vertical */
  user-select: none;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
.home-recent__arrow:not(:disabled):hover {
  border-color: #111;
  color: #000;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

/* Flèche — état désactivé (fin de carrousel) */
.home-recent__arrow:disabled {
  border-color: #ddd;
  color: #ccc;
  cursor: default;
  box-shadow: none;
}

/* ── Responsive carrousel ─────────────────────── */
@media (max-width: 1024px) {
  .home-recent__card { flex: 0 0 calc(33.333% - 11px); height: 270px; }
  .home-recent__img  { height: 190px; }
}
@media (max-width: 768px) {
  .home-recent__card { flex: 0 0 calc(50% - 8px); height: 255px; }
  .home-recent__img  { height: 175px; }
  .home-recent__nav  { display: none; }
}
@media (max-width: 480px) {
  .home-recent__card  { flex: 0 0 72vw; height: 245px; }
  .home-recent__img   { height: 165px; }
  .home-recent        { margin-top: 40px; margin-bottom: 40px; }
}
