/* Nakaïa — intro immersive « Là où le souffle ralentit »
 * Tout est préfixé #nk-intro / .nk-* pour cohabiter avec le thème (Salient).
 * Couleurs de la charte : nuit #2B323A, ardoise #455465, sable #F2CFA8, or #CDA57C, brume #F2F2F2 ; or du site #C1A47D.
 * Typographies du site : Cinzel (titres) et Montserrat (textes, surtitres en capitales espacées).
 */
/* l'état est porté par un attribut de <html> : le thème réécrit ses classes au chargement */
html[data-nk-intro],
html[data-nk-intro] body { overflow: hidden !important; }
html:not([data-nk-intro]) #nk-intro { display: none !important; }

#nk-intro {
  --nk-nuit: #2b323a;
  --nk-ardoise: #455465;
  --nk-sable: #f2cfa8;
  --nk-or: #cda57c;
  --nk-or-site: #c1a47d;
  --nk-brume: #f2f2f2;
  --nk-fond: #12171d;
  --nk-vh: 100vh;
  --nk-screens: 11.4;
  position: fixed;
  inset: 0;
  z-index: 99998;
  overflow: hidden;
  background: var(--nk-fond);
  color: #fff;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.45, 0, 0.2, 1);
}
/* une fois la 3D prête, le fond vient de la scène : à la fin, elle devient transparente et laisse voir l'accueil */
#nk-intro.is-ready { background: transparent; }
#nk-intro *,
#nk-intro *::before,
#nk-intro *::after { box-sizing: border-box; }
#nk-intro.is-closing { opacity: 0; pointer-events: none; }
#nk-intro img { max-width: none; border: 0; }
#nk-intro p, #nk-intro h1, #nk-intro h2, #nk-intro blockquote { margin: 0; padding: 0; border: 0; background: none; }
#nk-intro h1, #nk-intro h2 { text-transform: none; font-style: normal; }
#nk-intro p::before, #nk-intro p::after, #nk-intro h1::before, #nk-intro h1::after, #nk-intro h2::before, #nk-intro h2::after { content: none; }
#nk-intro button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; box-shadow: none; }

/* ------------------------------------------------------------------ scène */
#nk-intro .nk-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
#nk-intro .nk-stage::after { /* lisibilité des textes (gauche sur ordinateur, bas de l'écran sur téléphone) */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 18, 23, 0.72) 0%, rgba(14, 18, 23, 0.45) 30%, rgba(14, 18, 23, 0) 54%);
  opacity: var(--nk-veil, 0);
  z-index: 2;
}
#nk-intro .nk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
#nk-intro .nk-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* ------------------------------------------------------------------ défilement */
#nk-intro .nk-scroller {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  outline: none;
}
#nk-intro .nk-scroller::-webkit-scrollbar { display: none; }
#nk-intro .nk-track { width: 1px; height: calc(var(--nk-screens) * var(--nk-vh)); }

/* ------------------------------------------------------------------ textes */
#nk-intro .nk-txt {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 7vw, 128px);
  top: 50%;
  width: min(33rem, 40vw);
  transform: translateY(-50%);
  visibility: hidden;
  pointer-events: none;
}
#nk-intro .nk-txt > * { opacity: 0; will-change: opacity, transform; }
#nk-intro .nk-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--nk-sable);
  margin-bottom: 22px;
}
#nk-intro .nk-kicker b {
  font-family: Cinzel, Georgia, serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--nk-or);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
#nk-intro .nk-kicker b::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }
#nk-intro .nk-kicker em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  padding: 4px 10px 4px 12px;
  border: 1px solid rgba(242, 207, 168, 0.45);
  border-radius: 99px;
  color: var(--nk-sable);
}
#nk-intro .nk-title {
  font-family: Cinzel, Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 3.9vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 24px;
  text-wrap: balance;
}
#nk-intro .nk-lead {
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
  max-width: 30rem;
}
#nk-intro .nk-quote {
  margin-top: 26px;
  padding-left: 22px;
  border-left: 1px solid rgba(205, 165, 124, 0.7);
  font-family: Cinzel, Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--nk-sable);
  max-width: 26rem;
}

/* ouverture : centrée */
#nk-intro .nk-t-open {
  left: 50%;
  top: 52%;
  width: min(46rem, 88vw);
  transform: translate(-50%, -50%);
  text-align: center;
}
#nk-intro .nk-t-open .nk-kicker { justify-content: center; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.32em; }
#nk-intro .nk-t-open .nk-title { font-size: clamp(46px, 6.2vw, 96px); margin-bottom: 18px; }
#nk-intro .nk-t-open .nk-lead { margin: 0 auto; max-width: 34rem; font-size: 18px; }
#nk-intro .nk-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 52px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
#nk-intro .nk-scroll span {
  position: relative;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}
#nk-intro .nk-scroll span::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--nk-sable);
  animation: nk-drip 2.6s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes nk-drip { to { top: 110%; } }

/* ------------------------------------------------------------------ étiquettes posées sur la scène (soins, lieux) */
#nk-intro .nk-label {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  width: max-content;
  max-width: 260px;
  transform: translate3d(-200px, -200px, 0);
  visibility: hidden;
  opacity: 0;
  will-change: transform, opacity;
}
#nk-intro .nk-label i {
  grid-row: span 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nk-sable);
  box-shadow: 0 0 0 4px rgba(242, 207, 168, 0.16), 0 0 18px 2px rgba(242, 207, 168, 0.75);
}
#nk-intro .nk-label b {
  font-family: Cinzel, Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 16px rgba(10, 14, 18, 0.9);
}
#nk-intro .nk-label small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 10px rgba(10, 14, 18, 0.95);
}
#nk-intro .nk-label.is-left { grid-template-columns: 1fr auto; text-align: right; }
#nk-intro .nk-label.is-left i { grid-column: 2; grid-row: 1 / span 2; }
#nk-intro .nk-label.is-left b,
#nk-intro .nk-label.is-left small { grid-column: 1; }

/* les deux lieux (chapitre V) */
#nk-intro .nk-lieux { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
#nk-intro .nk-lieux li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; margin: 0; padding: 0; background: none; }
#nk-intro .nk-lieux li::before, #nk-intro .nk-lieux li::after { content: none; }
#nk-intro .nk-lieux i {
  grid-row: span 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nk-sable);
  box-shadow: 0 0 0 4px rgba(242, 207, 168, 0.14), 0 0 16px 2px rgba(242, 207, 168, 0.7);
}
#nk-intro .nk-lieux b { font-family: Cinzel, Georgia, serif; font-weight: 400; font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; line-height: 1.25; }
#nk-intro .nk-lieux span { font-size: 13px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.7); }

/* ------------------------------------------------------------------ interface */
#nk-intro .nk-ui { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
#nk-intro .nk-ui > * { pointer-events: auto; }
#nk-intro .nk-brand {
  position: absolute;
  left: 50%;
  top: 22px;
  height: 92px;
  transform: translateX(-50%);
  display: block;
  line-height: 0;
  opacity: 0.92;
}
#nk-intro .nk-brand.is-placed { transform: none; }
#nk-intro .nk-brand img { height: 100%; width: auto; display: block; }
#nk-intro .nk-brand.is-placed img { width: 100%; object-fit: contain; }
#nk-intro .nk-skip {
  position: absolute;
  right: clamp(20px, 2.4vw, 40px);
  top: 36px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(242, 207, 168, 0.45);
  background: rgba(43, 50, 58, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  transition: background 0.25s, border-color 0.25s, opacity 0.5s;
}
#nk-intro .nk-skip:hover,
#nk-intro .nk-skip:focus-visible { background: var(--nk-or-site); border-color: var(--nk-or-site); outline: none; }
#nk-intro .nk-rail {
  position: absolute;
  right: clamp(22px, 2.6vw, 44px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
}
#nk-intro .nk-rail button {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 14px;
  padding: 7px 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
#nk-intro .nk-rail i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(242, 207, 168, 0.7);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
#nk-intro .nk-rail span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; }
#nk-intro .nk-rail:hover span,
#nk-intro .nk-rail button.is-on span,
#nk-intro .nk-rail button:focus-visible span { opacity: 1; transform: none; }
#nk-intro .nk-rail button.is-on { color: #fff; }
#nk-intro .nk-rail button.is-on i { background: var(--nk-sable); transform: scale(1.25); box-shadow: 0 0 12px rgba(242, 207, 168, 0.8); }
#nk-intro .nk-rail button:hover { color: #fff; }
#nk-intro .nk-rail button:focus-visible { outline: none; color: #fff; }

#nk-intro .nk-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
#nk-intro .nk-progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--nk-or), var(--nk-sable));
}
/* phrase en bas à gauche (à droite du bouton rond des cookies quand il est là) */
#nk-intro .nk-notice {
  position: absolute;
  left: 74px;
  bottom: 22px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.58);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(10, 14, 18, 0.6);
}
#nk-intro .nk-notice a {
  pointer-events: auto;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 207, 168, 0.5);
  transition: color 0.25s, border-color 0.25s;
}
#nk-intro .nk-notice a:hover,
#nk-intro .nk-notice a:focus-visible { color: var(--nk-sable); border-bottom-color: var(--nk-sable); outline: none; }
#nk-intro .nk-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.6s;
  animation: nk-pulse 1.8s ease-in-out infinite;
}
#nk-intro .nk-loader img { width: 100%; height: auto; display: block; }
@keyframes nk-pulse { 50% { opacity: 0.35; } }
#nk-intro.is-ready .nk-loader { opacity: 0; animation: none; }
#nk-intro:not(.is-ready) .nk-skip,
#nk-intro:not(.is-ready) .nk-rail,
#nk-intro:not(.is-ready) .nk-brand { opacity: 0; }
#nk-intro .nk-brand { transition: opacity 0.5s; }

/* image fixe (captures) : pas de petite animation d'interface */
#nk-intro.is-still .nk-scroll span::after { animation: none; top: 30%; }

/* ------------------------------------------------------------------ tablette et téléphone */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  #nk-intro .nk-stage::after {
    background: linear-gradient(0deg, rgba(14, 18, 23, 0.86) 0%, rgba(14, 18, 23, 0.6) 34%, rgba(14, 18, 23, 0) 60%);
  }
  #nk-intro .nk-txt {
    left: 24px;
    right: 24px;
    width: auto;
    top: auto;
    bottom: calc(52px + env(safe-area-inset-bottom));
    transform: none;
  }
  #nk-intro .nk-t-open { left: 24px; right: 24px; top: 50%; bottom: auto; width: auto; transform: translateY(-50%); }
  #nk-intro .nk-t-open .nk-title { font-size: clamp(40px, 12vw, 58px); }
  #nk-intro .nk-t-open .nk-lead { font-size: 16px; }
  #nk-intro .nk-t-open .nk-kicker { font-size: 10px; letter-spacing: 0.24em; flex-wrap: wrap; }
  #nk-intro .nk-scroll { margin-top: 38px; }
  #nk-intro .nk-title { font-size: clamp(29px, 8.4vw, 40px); margin-bottom: 14px; }
  #nk-intro .nk-lead { font-size: 15px; line-height: 1.6; }
  #nk-intro .nk-kicker { font-size: 11px; margin-bottom: 14px; gap: 10px; }
  #nk-intro .nk-kicker b::after { width: 22px; }
  #nk-intro .nk-quote { margin-top: 16px; font-size: 16px; padding-left: 16px; }
  #nk-intro .nk-brand { top: 16px; height: 64px; }
  #nk-intro .nk-skip { right: 14px; top: 22px; height: 34px; padding: 0 14px; font-size: 10.5px; }
  #nk-intro .nk-rail { display: none; }
  #nk-intro .nk-label { max-width: 190px; column-gap: 9px; }
  #nk-intro .nk-label b { font-size: 15px; }
  #nk-intro .nk-label small { display: none; }
  #nk-intro .nk-lieux { margin-top: 14px; gap: 8px; }
  #nk-intro .nk-lieux b { font-size: 14px; }
  #nk-intro .nk-lieux span { font-size: 12px; }
  #nk-intro .nk-notice { left: 70px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #nk-intro .nk-scroll span::after,
  #nk-intro .nk-loader { animation: none; }
}
