/* ——— Accueil Parhelion ——— */

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.loader-word {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.42em;
  margin-left: 0.42em;
  color: var(--text);
}

.loader-track {
  width: 220px;
  height: 1px;
  background: var(--line-3);
  overflow: hidden;
}

.loader-bar {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.loader-count {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
}

/* Sans JavaScript, le loader ne peut pas se retirer : on ne l'affiche pas. */
html:not(.js) .loader {
  display: none;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15, 13, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.14em;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links a.is-accent {
  color: var(--accent);
}

.nav-links a.is-accent:hover {
  color: var(--accent-hover);
}

.nav-progress {
  height: 1px;
  background: var(--line);
}

.nav-progress-bar {
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* Burger — masqué sur desktop */
.nav-toggle {
  display: none;
  position: relative;
  width: 34px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 2;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) { top: 6px; }
.nav-toggle span:nth-child(2) { top: 12.5px; }
.nav-toggle span:nth-child(3) { top: 19px; }

.nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-media {
  position: absolute;
  inset: -8%;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 13, 10, 0.92) 0%,
    rgba(15, 13, 10, 0.42) 48%,
    rgba(15, 13, 10, 0.28) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 76px;
}

.mask {
  overflow: hidden;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 82px;
  line-height: 1.02;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

.hero-title .mask {
  display: block;
  padding-bottom: 0.06em;
}

.hero-title .mask > span {
  display: block;
}

.accent-italic {
  font-style: italic;
  color: var(--accent);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-sub {
  font-size: 18px;
  max-width: 460px;
  color: rgba(242, 239, 233, 0.82);
}

.hero-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.8);
}

.hero-cue svg {
  animation: ph-cue 2.4s ease-in-out infinite;
}

/* Bandeau défilant */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
}

.marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.12em;
  color: rgba(242, 239, 233, 0.42);
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 56px;
}

.marquee-item i {
  color: var(--accent);
  font-size: 14px;
  font-style: normal;
}

/* ——— Récits épinglés ——— */
.story {
  position: relative;
}

.story--intro { height: 300svh; }

.story--steps {
  height: 500svh;
  margin-top: 150px;
}

.story-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.story--steps .story-sticky {
  border-top: 1px solid var(--line);
}

.story-inner {
  height: 100%;
  padding-top: 96px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: 64px 1fr;
}

/* Rail de progression */
.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-right: 24px;
}

.rail-track,
.rail-fill {
  position: absolute;
  left: 0;
  width: 1px;
}

.rail-track {
  top: 12%;
  bottom: 12%;
  background: var(--line-2);
}

.rail-fill {
  top: 12%;
  height: 76%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

.story--steps .rail-track { top: 16%; bottom: 16%; }
.story--steps .rail-fill { top: 16%; height: 68%; }

.rail-ticks {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 16px;
}

.rail-ticks--wide { gap: 26px; }

.rail-ticks span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(242, 239, 233, 0.8);
  opacity: 0.32;
  transition: opacity 0.4s ease, color 0.4s ease;
}

/* Panneaux */
.panels {
  position: relative;
  height: 100%;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.panel-text {
  position: relative;
}

.panel-ghost {
  position: absolute;
  left: -14px;
  top: -96px;
  font-family: var(--serif);
  font-size: 190px;
  line-height: 1;
  color: rgba(242, 239, 233, 0.045);
  pointer-events: none;
  user-select: none;
}

.kicker {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.panel-title {
  position: relative;
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 20px;
}

.panel-body {
  font-size: 17px;
  color: var(--text-2);
  max-width: 440px;
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid rgba(242, 239, 233, 0.12);
  padding-top: 22px;
  margin-top: 32px;
  max-width: 440px;
}

.fig-k {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--accent);
}

.fig-v {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.55);
  margin-top: 6px;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.step-head .panel-title { margin-bottom: 0; }

.step-num {
  font-family: var(--serif);
  font-size: 60px;
  line-height: 1;
  color: rgba(242, 239, 233, 0.18);
}

.panel-visual {
  position: relative;
  align-self: center;
}

.panel-img {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 5;
  max-height: 68svh;
  align-self: center;
}

.panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.panel-img2 {
  position: absolute;
  left: -72px;
  bottom: -46px;
  width: 44%;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.panel-img2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

/* Chips */
.tags-wrap {
  padding-bottom: 110px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.tag {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid var(--line-3);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.7);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Blocs de section */
.block { padding-bottom: 140px; }

.section-num {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  margin-bottom: 18px;
  transition: opacity 0.6s ease;
}

.section-title {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 600;
  margin-bottom: 20px;
}

.section-lead {
  font-size: 17px;
  max-width: 620px;
  color: var(--text-2);
}

/* Prestations */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 52px 32px;
  margin-top: 60px;
}

.service-img {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

/* `!important` est nécessaire, pas cosmétique : après la révélation,
   anim.js laisse `transform: none` et un `transition-delay` en styles
   inline sur l'image. Un style inline l'emporte sur une règle de classe,
   ce qui neutraliserait le zoom au survol. Seule une déclaration
   `!important` de la feuille de style repasse devant. */
.service:hover .service-img img,
.service:focus-within .service-img img {
  transform: scale(1.06) !important;
  transition: transform 1s var(--ease) !important;
  transition-delay: 0s !important;
}

.service h3 {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.service p {
  font-size: 15px;
  color: rgba(242, 239, 233, 0.66);
  line-height: 1.65;
  max-width: 440px;
}

/* Contact */
.contact {
  padding-top: 160px;
  padding-bottom: 150px;
  text-align: center;
}

.contact-kicker {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 22px;
}

.contact-title {
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 20px;
}

.contact-lead {
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-2);
}

.form {
  max-width: 620px;
  margin: 52px auto 0;
  text-align: left;
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--field);
  border: 1px solid var(--line-3);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.25s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-4);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.field textarea {
  resize: vertical;
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  padding-right: 46px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.select-wrap option {
  background: var(--bg);
}

.select-wrap svg {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Piège à robots : retiré du flux, invisible et non focusable */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
}

.btn-gold {
  padding: 16px 34px;
  border: none;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.btn-gold:hover {
  background: var(--accent-hover);
}

.btn-gold:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-note {
  font-size: 13px;
  color: var(--text-3);
}

.form-note.is-error { color: var(--error); }
.form-note.is-ok { color: var(--accent); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  margin-top: 44px;
  font-size: 14px;
}

.contact-links a:first-child { color: var(--accent); }
.contact-links a:first-child:hover { color: var(--accent-hover); }
.contact-links a:last-child { color: rgba(242, 239, 233, 0.7); }

/* ——— Mobile : un seul point de rupture ——— */
@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav-brand {
    position: relative;
    z-index: 2;
  }

  /* backdrop-filter créerait un bloc conteneur qui empêcherait le
     panneau en position: fixed de couvrir tout l'écran. */
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }

  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links a {
    font-family: var(--serif);
    font-size: 30px;
    text-transform: none;
    letter-spacing: 0.04em;
  }

  .hero-title { font-size: 44px; }
  .hero-sub { font-size: 16px; }
  .hero-eyebrow { font-size: 10px; letter-spacing: 0.2em; }
  .hero-content { padding-bottom: 56px; }

  .section-title,
  .panel-title,
  .contact-title { font-size: 30px; }

  .marquee-track { font-size: 20px; gap: 36px; }
  .marquee-item { gap: 36px; }

  /* Les récits ne sont plus épinglés : les panneaux s'empilent en flux normal. */
  .story,
  .story--intro,
  .story--steps { height: auto; }

  .story--steps { margin-top: 84px; }

  .story-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .story-inner {
    display: block;
    padding-top: 84px;
    padding-bottom: 0;
  }

  .rail { display: none; }

  .panels { height: auto; }

  .panel {
    position: static;
    display: block;
    margin-bottom: 84px;
    /* !important : neutralise les styles inline posés par anim.js
       si la fenêtre passe du desktop au mobile. */
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .panels .panel:last-child { margin-bottom: 0; }

  .panel-ghost { display: none; }

  .panel-img {
    aspect-ratio: 16 / 10;
    max-height: 38svh;
    margin-top: 24px;
  }

  .panel-img2 { display: none; }

  .figures { gap: 16px; }
  .fig-k { font-size: 26px; }

  .step-num { font-size: 40px; }

  .block { padding-bottom: 84px; }
  .tags-wrap { padding-bottom: 72px; }

  .services,
  .form-row { grid-template-columns: 1fr; }

  .services { gap: 40px; margin-top: 40px; }

  .contact {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .form-foot { gap: 14px; }
  .btn-gold { width: 100%; }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-cue svg { animation: none; }
  .hero-video { transform: none; }
  .service:hover .service-img img { transform: none; }
}
