/* ── Page d'accueil Joon — landing page complète ── */

/* ── État de chargement ── */
body.home-loading #home-hero,
body.home-loading #main-content { display: none !important; }

/* ── Conteneur principal ── */
.home-hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: #fff;
  color: #1a1a2e;
  overflow-x: hidden;
}
.home-hero.hidden { display: none !important; }

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
.hl-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.hl-nav.scrolled {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #ede9fe;
}
.hl-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.hl-nav-logo img { height: 36px; display: block; }
.hl-nav:not(.scrolled) .hl-nav-logo { visibility: hidden; pointer-events: none; }
@keyframes hl-nav-logo-in {
  from { opacity: 0; transform: translateY(-8px) scale(.82); }
  to   { opacity: 1; transform: translateY(0)     scale(1);  }
}
.hl-nav.scrolled .hl-nav-logo {
  animation: hl-nav-logo-in .38s cubic-bezier(.22,.68,0,1.25) both;
}
.hl-nav-links { display: flex; gap: 28px; flex: 1; }
.hl-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: #5b5470;
  text-decoration: none;
  transition: color .15s;
}
.hl-nav-link:hover { color: #3b2689; }
.hl-nav-auth { display: flex; align-items: center; gap: 10px; }
.hl-nav-user { color: #fff; font-weight: 600; font-size: 15px; }
#hl-nav-auth .home-user-info { color: #1a1a1a; }

/* ─────────────────────────────────────────────
   BOUTONS COMMUNS
───────────────────────────────────────────── */
.hl-btn-ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #3b2689;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s;
}
.hl-btn-ghost:hover { background: #f5f3ff; }

.hl-btn-primary {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #3b2689;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .15s;
}
.hl-btn-primary:hover { background: #f5f3ff; box-shadow: none; }

/* ─────────────────────────────────────────────
   HERO FOLD
───────────────────────────────────────────── */
.hl-fold {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  overflow: visible;
}
.hl-fold-left {
  position: relative;
  z-index: 2;
  width: 50%;
  padding: 64px 48px 80px 7%;
  margin-top: -8%;
}
@keyframes hl-logo-in {
  from { opacity: 0; transform: translateY(-14px) scale(.92); }
  to   { opacity: 1; transform: translateY(0)     scale(1);   }
}

.hl-fold-logo {
  height: 56px;
  display: block;
  margin: 0 0 24px;
  animation: hl-logo-in .55s cubic-bezier(.22,.68,0,1.2) both;
}

.hl-fold-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #d946ef;
  margin: 0 0 14px;
}
.hl-fold-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: #1a1a2e;
  margin: 0 0 16px;
}
.hl-fold-sub {
  font-size: 1.05rem;
  color: #5b5470;
  font-weight: 500;
  margin: 0 0 32px;
  line-height: 1.65;
  max-width: 440px;
}

/* ── Carte adresse centrée par-dessus la photo ── */
.hl-fold-address-center {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 90%;
  max-width: 860px;
  padding: 0 20px;
}
.hl-address-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 28px rgba(59,38,137,.15), 0 1px 4px rgba(59,38,137,.08);
  border: 1px solid #ede9fe;
  padding: 20px;
  width: 100%;
}

#home-hero-address-slot { position: relative; margin-bottom: 10px; }

.hl-search-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b2689 0%, #34227a 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.hl-search-btn:hover { opacity: .9; }

#home-hero-address-slot .address-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f3ff;
  border: 1.5px solid #c4b5fd;
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
  transition: border-color .15s, box-shadow .15s;
}
#home-hero-address-slot .address-input-wrapper:focus-within {
  border-color: #3b2689;
  box-shadow: 0 0 0 3px rgba(59,38,137,.08);
}
#home-hero-address-slot .address-input-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 14px 4px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  font-family: inherit;
}
#home-hero-address-slot .address-input-wrapper input::placeholder { color: #9ca3af; }
#home-hero-address-slot .address-input-wrapper input:focus { outline: none; box-shadow: none; }

#home-hero-address-slot .geolocation-btn {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
}
#home-hero-address-slot .geolocation-btn:hover { opacity: .7; }

#home-hero-address-slot .address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 200;
}
#home-hero-address-slot .home-topbar-address-status {
  display: block;
  margin: 6px 2px 0;
  color: #9ca3af;
  font-size: 12.5px;
}

.home-hero-locate-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b2689 0%, #d946ef 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.home-hero-locate-btn:hover { opacity: .92; }
.home-hero-locate-btn:disabled { opacity: .6; cursor: wait; }

.hl-fold-right { display: flex; justify-content: flex-end; }

/* Photo plein écran côté droit avec coupe diagonale */
.hl-fold-photo-full {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
  pointer-events: none;
}
.hl-fold-photo-full > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─────────────────────────────────────────────
   EMPLACEMENTS PHOTO
───────────────────────────────────────────── */
.hl-photo {
  background: transparent;
  border-radius: 0;
  border: none;
  overflow: hidden;
  position: relative;
}
.hl-photo-1 {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3/4;
  min-height: 400px;
}
.hl-photo-1 > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hl-photo-2 {
  width: 100%;
  aspect-ratio: 4/5;
}
.hl-photo-3 {
  width: 100%;
  height: 100%;
  min-height: 440px;
}
.hl-photo::after {
  content: 'Image à ajouter';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: .04em;
  pointer-events: none;
}
.hl-photo > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hl-photo:has(> img)::after { display: none; }

/* ─────────────────────────────────────────────
   COMMENT ÇA MARCHE
───────────────────────────────────────────── */
.hl-how {
  background: #f9f7ff;
  padding: 88px 28px;
}
.hl-section-inner { max-width: 1100px; margin: 0 auto; }

.hl-section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #d946ef;
  margin: 0 0 10px;
  text-align: center;
}
.hl-section-title {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #1a1a2e;
  margin: 0 0 52px;
  text-align: center;
  line-height: 1.2;
}
.hl-steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hl-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.hl-step-num {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #3b2689;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(59,38,137,.28);
  flex-shrink: 0;
}
.hl-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}
.hl-step-text {
  font-size: .9rem;
  color: #5b5470;
  line-height: 1.6;
  margin: 0;
}
.hl-step-arrow {
  font-size: 1.4rem;
  color: #c4b5fd;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 18px;
}

/* ─────────────────────────────────────────────
   SECTION SPLIT — livreurs
───────────────────────────────────────────── */
.hl-split {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.hl-split-photo-right .hl-split-text { order: 1; }
.hl-split-photo-right .hl-photo      { order: 2; }

.hl-split-body {
  font-size: 1rem;
  color: #5b5470;
  line-height: 1.75;
  margin: 0 0 24px;
}
.hl-checks {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hl-checks li {
  font-size: .95rem;
  font-weight: 600;
  color: #1a1a2e;
  padding-left: 26px;
  position: relative;
}
.hl-checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #d946ef;
  font-weight: 800;
}

/* ─────────────────────────────────────────────
   SECTION PLEIN-ÉCRAN — produits frais
───────────────────────────────────────────── */
.hl-full-photo {
  position: relative;
  min-height: 440px;
  display: flex;
  overflow: hidden;
}
.hl-full-photo .hl-photo-3 {
  position: absolute;
  inset: 0;
  border-radius: 0;
  min-height: 0;
}
.hl-full-photo-overlay {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, rgba(59,38,137,.78) 0%, rgba(59,38,137,.32) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 72px;
  width: 100%;
  min-height: 440px;
}
.hl-full-photo-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -.025em;
  max-width: 520px;
}
.hl-full-photo-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.82);
  line-height: 1.65;
  font-weight: 500;
  margin: 0;
  max-width: 420px;
}

/* ─────────────────────────────────────────────
   CTA BANNER
───────────────────────────────────────────── */
.hl-cta {
  background: linear-gradient(135deg, #3b2689 0%, #4c35a0 100%);
  padding: 88px 28px;
}
.hl-cta-inner { text-align: center; }
.hl-cta-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -.025em;
}
.hl-cta-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.78);
  margin: 0 0 28px;
}
.hl-cta-btn {
  font-size: 1rem;
  padding: 14px 36px;
  background: #fff;
  color: #3b2689;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
.hl-cta-btn:hover { opacity: .95; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.hl-footer {
  background: #0f0a1e;
  padding: 44px 28px;
}
.hl-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hl-footer-logo img { height: 28px; opacity: .75; display: block; }
.hl-footer-copy {
  color: rgba(255,255,255,.4);
  font-size: 13px;
  margin: 0;
  flex: 1;
}
.hl-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.hl-footer-links a {
  color: rgba(255,255,255,.45);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.hl-footer-links a:hover { color: rgba(255,255,255,.85); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 920px) {
  .hl-fold {
    flex-direction: column;
    min-height: unset;
    padding: 0;
  }
  .hl-fold-left {
    width: 100%;
    padding: 48px 20px 28px;
  }
  /* Adresse sort du positionnement absolu et coule dans le flux */
  .hl-fold-address-center {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    padding: 0 16px 28px;
    order: 2;
  }
  /* Photo pleine largeur en dessous, coupée en bas */
  .hl-fold-photo-full {
    position: relative;
    width: 100%;
    height: 260px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    border-radius: 0;
    order: 3;
  }
  .hl-fold-left { order: 1; }
  .hl-fold-right { justify-content: center; }
  .hl-photo-1 { max-width: 100%; aspect-ratio: 4/3; }
  .hl-fold-sub { max-width: 100%; }
  .hl-address-card { max-width: 100%; }

  .hl-split {
    grid-template-columns: 1fr;
    padding: 56px 20px;
    gap: 36px;
  }
  .hl-split-photo-right .hl-split-text { order: 1; }
  .hl-split-photo-right .hl-photo      { order: 2; }

  .hl-full-photo-overlay { padding: 40px 28px; }
  .hl-full-photo-title { max-width: 100%; }
  .hl-full-photo-sub   { max-width: 100%; }
  .hl-section-title { margin-bottom: 36px; }
}

@media (max-width: 620px) {
  .hl-nav {
    background: #fff;
    border-bottom: 1px solid #ede9fe;
  }
  .hl-nav:not(.scrolled) .hl-nav-logo { visibility: visible; pointer-events: auto; }
  .hl-fold { padding-top: 60px; }
  .hl-nav-links { display: none; }
  .hl-fold-logo { display: none; }
  .hl-nav-inner { height: 60px; gap: 12px; }
  .hl-nav-user { color: #1a1a2e; }
  .hl-btn-ghost { padding: 8px 10px; font-size: 13px; }
  .hl-btn-primary { padding: 9px 16px; font-size: 13px; }

  .hl-steps {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  .hl-step-arrow { transform: rotate(90deg); padding: 0; align-self: center; }

  .hl-how, .hl-cta { padding: 56px 20px; }

  .hl-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hl-footer-copy { flex: none; }
}
