/* ============================================================================
   NatureSurvi : page d'accueil premium (hero 3D, sélection, boutiques…)
   S'appuie sur css/ns-premium.css (variables, boutons, cartes, footer).
   ========================================================================== */

/* ---------- HERO ---------- */
.ns-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--ns-nav-h) - 34px);
  min-height: max(640px, calc(100svh - var(--ns-nav-h) - 34px));
  display: flex; align-items: flex-end;
  background: var(--ns-forest-0);
}
.ns-hero-sky {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 55% at 72% 38%, rgba(200, 163, 90, 0.16), transparent 70%),
    radial-gradient(70% 60% at 20% 10%, rgba(64, 104, 78, 0.38), transparent 70%),
    radial-gradient(90% 70% at 50% 110%, #050a07 30%, transparent 70%),
    linear-gradient(180deg, #0d1c16 0%, #0a1510 55%, #070e0a 100%);
}
/* Rais de lumière CSS : décor du repli, et base douce sous la 3D */
.ns-hero-rays {
  position: absolute; inset: -20% -10% 0; z-index: -2; pointer-events: none; opacity: 0.55;
  background:
    linear-gradient(105deg, transparent 38%, rgba(230, 203, 143, 0.10) 41%, transparent 46%),
    linear-gradient(110deg, transparent 52%, rgba(230, 203, 143, 0.08) 55%, transparent 61%),
    linear-gradient(100deg, transparent 63%, rgba(200, 220, 190, 0.06) 66%, transparent 71%);
  filter: blur(6px);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 55%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 55%, transparent 90%);
}
.ns-hero-canvas {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1.2s ease;
  touch-action: pan-y;
}
html.ns-3d-on .ns-hero-canvas { opacity: 1; }

/* Image de repli (sans WebGL / animations réduites) */
.ns-hero-still { display: none; }
html.ns-no3d .ns-hero-canvas { display: none; }
html.ns-no3d .ns-hero-still {
  display: block; position: absolute; z-index: -1;
  right: 6%; top: 44%; width: min(32vw, 460px); aspect-ratio: 1; transform: translateY(-50%);
  border-radius: 28px; overflow: hidden;
  border: 1px solid rgba(232, 223, 202, 0.22);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 10px rgba(245, 240, 229, 0.03), 0 0 120px -20px rgba(200, 163, 90, 0.35);
}
html.ns-no3d .ns-hero-still::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), transparent 35%), linear-gradient(0deg, rgba(8, 16, 12, 0.45), transparent 50%);
}
html.ns-no3d .ns-hero-still img { width: 100%; height: 100%; object-fit: cover; }

.ns-hero-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: end;
  padding-top: 40vh; padding-bottom: 72px;
}
.ns-hero-copy { position: relative; display: grid; gap: 20px; max-width: 620px; }
/* Halo local derrière le texte (pas de voile plein écran : la 3D reste nette) */
.ns-hero-copy::before {
  content: ''; position: absolute; z-index: -1; inset: -30% -25% -25% -30%;
  background: radial-gradient(closest-side, rgba(7, 14, 10, 0.78), rgba(7, 14, 10, 0.45) 55%, transparent);
  pointer-events: none;
}
.ns-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }


/* Index des objets : porte d'entrée clavier + navigation tactile */
.ns-hero-index { position: relative; min-width: 0; }
.ns-hero-hint { font-size: 0.8rem; color: var(--ns-text-3); margin-bottom: 10px; }
.ns-hint-touch { display: none; }
@media (hover: none) { .ns-hint-hover { display: none; } .ns-hint-touch { display: inline; } }
html.ns-no3d .ns-hero-hint { display: none; }

.ns-objects {
  list-style: none; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none;
}
.ns-objects::-webkit-scrollbar { display: none; }
.ns-objects li { scroll-snap-align: start; flex: none; }
.ns-objects a {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline;
  padding: 10px 14px; border-radius: 14px; text-decoration: none; min-width: 168px;
  background: rgba(16, 32, 26, 0.62); border: 1px solid var(--ns-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s, background 0.25s, transform 0.35s var(--ns-ease);
}
.ns-objects .n { grid-row: span 2; font-size: 0.7rem; color: var(--ns-brass); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.ns-objects .t { font-size: 0.88rem; color: var(--ns-cream); }
.ns-objects .p { font-size: 0.76rem; color: var(--ns-text-3); font-variant-numeric: tabular-nums; min-height: 1em; }
.ns-objects a:hover, .ns-objects a:focus-visible, .ns-objects a.is-hot {
  border-color: rgba(230, 203, 143, 0.7); background: rgba(40, 52, 36, 0.78); transform: translateY(-2px);
}
.ns-objects a.is-hot .p, .ns-objects a:hover .p { color: var(--ns-brass-hi); }

/* Étiquette qui suit l'objet 3D survolé */
.ns-tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  transform: translate(-50%, calc(-100% - 18px)) scale(0.96); opacity: 0;
  transition: opacity 0.2s, transform 0.25s var(--ns-ease);
  padding: 10px 14px; border-radius: 12px; white-space: nowrap;
  background: rgba(10, 20, 15, 0.9); border: 1px solid rgba(230, 203, 143, 0.55);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9), 0 0 30px -10px rgba(230, 203, 143, 0.45);
  font-size: 0.86rem; color: var(--ns-cream);
}
.ns-tip.on { opacity: 1; transform: translate(-50%, calc(-100% - 18px)); }
.ns-tip b { font-family: var(--ns-serif); font-weight: 400; font-size: 1rem; display: block; }
.ns-tip small { color: var(--ns-brass-hi); font-size: 0.76rem; }

.ns-scroll-cue {
  position: absolute; left: 50%; bottom: 18px; width: 22px; height: 36px; margin-left: -11px;
  border: 1px solid var(--ns-line-2); border-radius: 12px; display: none;
}
.ns-scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; border-radius: 2px; background: var(--ns-brass-hi); animation: ns-cue 2s ease-in-out infinite; }
@keyframes ns-cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

@media (min-width: 900px) {
  .ns-hero { align-items: center; }
  .ns-hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-rows: 1fr auto; padding-top: 64px; padding-bottom: 76px; min-height: inherit; align-items: center; row-gap: 40px; }
  .ns-hero-copy { align-self: center; }
  .ns-hero-index { grid-column: 1 / -1; align-self: end; }
  .ns-objects { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 8px; }
  .ns-objects a { min-width: 0; padding: 12px 14px; height: 100%; grid-template-columns: 1fr; row-gap: 2px; }
  .ns-objects .n { grid-row: auto; }
  .ns-scroll-cue { display: block; }
}
@media (max-width: 899px) {
  html.ns-no3d .ns-hero-still { right: 50%; top: 18px; width: min(70vw, 340px); transform: translateX(50%); }
  html.ns-no3d .ns-hero-inner { padding-top: min(78vw, 380px); }
}
@media (prefers-reduced-motion: reduce) { .ns-scroll-cue span { animation: none; } }

/* ---------- RÉASSURANCE : voir ns-premium.css ---------- */


.ns-head--row { max-width: none; }
@media (min-width: 900px) { .ns-head--row { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; } }
.ns-more { display: flex; justify-content: center; margin-top: 44px; }
.ns-card[data-reveal] { transition-delay: calc(var(--i, 0) * 70ms); }

/* ---------- DEUX BOUTIQUES ---------- */
.ns-univers { background: var(--ns-forest-1); }
.ns-univers-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .ns-univers-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.ns-door {
  position: relative; display: block; border-radius: 24px; overflow: hidden; text-decoration: none;
  aspect-ratio: 4 / 3.4; border: 1px solid var(--ns-line);
}
.ns-door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ns-ease); }
.ns-door::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 16, 12, 0.05) 25%, rgba(8, 16, 12, 0.92) 92%); }
.ns-door:hover img { transform: scale(1.05); }
.ns-door-body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 26px; display: grid; gap: 10px; }
.ns-door-title { font-family: var(--ns-serif); font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.2; color: var(--ns-cream); max-width: 22em; }
.ns-door-cta { font-size: 0.88rem; font-weight: 600; color: var(--ns-brass-hi); }
.ns-door-cta span { display: inline-block; transition: transform 0.35s var(--ns-ease); }
.ns-door:hover .ns-door-cta span { transform: translateX(5px); }

/* ---------- APPROCHE ---------- */
.ns-approche-grid { display: grid; gap: 28px; }
.ns-approche-text { display: grid; gap: 18px; font-size: 1.06rem; color: #34433a; max-width: 38em; }
.ns-approche-text a { color: #2e4a39; font-weight: 600; }
@media (min-width: 900px) { .ns-approche-grid { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; } }

/* Champs masqués / accessibles (gardés pour d'autres formulaires) */
.ns-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ns-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
