/* Protection Habitat Conseil — intro immersive « Rendre visible l'invisible »
 * Tout est préfixé #phc-intro / .phc-* pour cohabiter avec le thème (Salient).
 * Couleurs de la charte : ardoise #2D3946, acier #556A79, brume #92A5AC, sable #F3D8B9, bronze #BEA283.
 * Typographies du site : Montserrat (titres) et Roboto (textes).
 */
/* l'état est porté par un attribut de <html> : le thème réécrit ses classes au chargement */
html[data-phc-intro],
html[data-phc-intro] body { overflow: hidden !important; }
html:not([data-phc-intro]) #phc-intro { display: none !important; }

#phc-intro {
  --phc-ardoise: #2d3946;
  --phc-acier: #556a79;
  --phc-brume: #92a5ac;
  --phc-sable: #f3d8b9;
  --phc-bronze: #bea283;
  --phc-onde: #7fe7f2;
  --phc-nuit: #0b1116;
  --phc-vh: 100vh;
  --phc-screens: 11.4;
  position: fixed;
  inset: 0;
  z-index: 99998;
  overflow: hidden;
  background: var(--phc-nuit);
  color: #fff;
  font-family: Roboto, "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.9s cubic-bezier(0.45, 0, 0.2, 1);
}
#phc-intro *,
#phc-intro *::before,
#phc-intro *::after { box-sizing: border-box; }
#phc-intro.is-closing { opacity: 0; pointer-events: none; }
#phc-intro img { max-width: none; border: 0; }
#phc-intro p, #phc-intro h1, #phc-intro h2, #phc-intro blockquote { margin: 0; padding: 0; border: 0; background: none; }
#phc-intro blockquote { font-style: normal; quotes: none; }
#phc-intro blockquote::after { content: none; }
#phc-intro h1, #phc-intro h2 { text-transform: none; font-style: normal; }
#phc-intro button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }

/* ------------------------------------------------------------------ scène */
#phc-intro .phc-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 62% 36%, #1f2b36 0%, #141c24 46%, #0a0f14 100%);
}
#phc-intro .phc-stage::after { /* lisibilité des textes (bas de l'écran sur téléphone, gauche sur ordinateur) */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 12, 16, 0.7) 0%, rgba(8, 12, 16, 0.45) 30%, rgba(8, 12, 16, 0) 52%);
  opacity: var(--phc-veil, 0);
  z-index: 2;
}
#phc-intro .phc-black { position: absolute; inset: 0; background: #000; opacity: 0; }
#phc-intro .phc-photo-box {
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  overflow: hidden;
  opacity: 0;
  background: #000;
  will-change: opacity;
}
#phc-intro .phc-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
#phc-intro .phc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
#phc-intro .phc-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* ------------------------------------------------------------------ défilement */
#phc-intro .phc-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;
}
#phc-intro .phc-scroller::-webkit-scrollbar { display: none; }
#phc-intro .phc-track { width: 1px; height: calc(var(--phc-screens) * var(--phc-vh)); }

/* ------------------------------------------------------------------ textes */
#phc-intro .phc-txt {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 7.2vw, 132px);
  top: 50%;
  width: min(34rem, 40vw);
  transform: translateY(-50%);
  visibility: hidden;
  pointer-events: none;
}
#phc-intro .phc-txt > * { opacity: 0; will-change: opacity, transform; }
/* halo sombre derrière les textes de chapitre : lisibles même quand l'air est saturé de filaments */
#phc-intro .phc-chap::before {
  content: "";
  position: absolute;
  left: -18%;
  right: -22%;
  top: -34%;
  bottom: -34%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(9, 13, 17, 0.78), rgba(9, 13, 17, 0.5) 55%, rgba(9, 13, 17, 0) 100%);
  opacity: calc(var(--phc-halo, 0) * var(--phc-in, 0));
  pointer-events: none;
}
#phc-intro .phc-kicker {
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phc-brume);
  margin-bottom: 18px;
}
#phc-intro .phc-kicker b {
  font-weight: 600;
  color: #fff;
  display: inline-block;
  margin-right: 0.9em;
}
#phc-intro .phc-kicker b::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 26px;
  height: 1px;
  margin-left: 0.9em;
  background: var(--phc-brume);
  transform: translateY(-2px);
}
#phc-intro .phc-title {
  font-family: Montserrat, sans-serif;
  font-weight: 300;
  font-size: clamp(34px, 4.1vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 22px;
}
#phc-intro .phc-lead {
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.74);
  max-width: 30em;
}
#phc-intro .phc-t-open {
  left: 50%;
  top: 40%;
  width: min(54rem, 90vw);
  transform: translate(-50%, -50%);
  text-align: center;
}
#phc-intro .phc-t-open .phc-title { font-size: clamp(36px, 5vw, 76px); }
#phc-intro .phc-t-open .phc-lead { margin: 0 auto; color: rgba(255, 255, 255, 0.66); }
#phc-intro .phc-scroll {
  margin-top: 44px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
#phc-intro .phc-scroll span {
  display: block;
  width: 1px;
  height: 46px;
  margin: 0 auto 14px;
  background: linear-gradient(rgba(127, 231, 242, 0), rgba(127, 231, 242, 0.9));
  transform-origin: 50% 0;
  animation: phc-drip 2.2s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes phc-drip {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
#phc-intro .phc-count {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--phc-brume);
}
#phc-intro .phc-count b {
  font-weight: 300;
  font-size: 58px;
  letter-spacing: -0.04em;
  color: var(--phc-onde);
  font-variant-numeric: tabular-nums;
  min-width: 1.3em;
  text-shadow: 0 0 24px rgba(127, 231, 242, 0.45);
}
#phc-intro .phc-t-quote { width: min(44rem, 46vw); }
#phc-intro .phc-quote {
  position: relative;
  font-family: Montserrat, sans-serif;
  font-weight: 300;
  font-size: clamp(24px, 2.55vw, 40px);
  line-height: 1.24;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(5, 9, 12, 0.85);
}
/* guillemets écrits dans le texte : le thème (Salient, skin « material ») dessine un trait absolu dans blockquote::before */
#phc-intro .phc-quote::before,
#phc-intro .phc-quote::after { content: none !important; display: none !important; }
#phc-intro .phc-qm { color: var(--phc-onde); font-weight: 400; }
#phc-intro .phc-stat {
  margin-top: 26px;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--phc-brume);
}
#phc-intro .phc-stat b {
  display: block;
  font-weight: 300;
  font-size: clamp(48px, 4.6vw, 70px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-transform: none;
  color: var(--phc-sable);
}
#phc-intro .phc-t-end {
  left: 50%;
  top: auto;
  bottom: 13%;
  width: min(48rem, 90vw);
  transform: translateX(-50%);
  text-align: center;
}
#phc-intro .phc-t-end .phc-title { font-size: clamp(28px, 3vw, 46px); margin: 0; text-shadow: 0 2px 24px rgba(5, 9, 12, 0.6); }

/* ------------------------------------------------------------------ étiquettes des sources */
#phc-intro .phc-label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(9, 14, 19, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
  color: #fff;
  visibility: hidden;
  will-change: transform, opacity;
}
#phc-intro .phc-label i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--phc-onde));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 14px var(--c, var(--phc-onde));
}
#phc-intro .phc-label em {
  flex: none;
  display: none;
  width: 20px;
  height: 20px;
  margin: -2px -2px -2px -3px;
  border-radius: 50%;
  background: var(--c, var(--phc-onde));
  color: #0b1116;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0;
  line-height: 20px;
  text-align: center;
}
#phc-intro .phc-label small {
  display: none;
  font-family: Roboto, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.72);
}
#phc-intro .phc-label.is-rank em { display: block; }
#phc-intro .phc-label.is-rank i { display: none; }
#phc-intro .phc-label.is-rank small,
#phc-intro .phc-label.is-done small { display: inline; }
#phc-intro .phc-label.is-done { border-color: rgba(243, 216, 185, 0.5); }
#phc-intro .phc-label.is-done small { color: var(--phc-sable); }
#phc-intro .phc-label.is-focus { border-color: var(--c); box-shadow: 0 0 22px -6px var(--c); }

/* ------------------------------------------------------------------ interface */
#phc-intro .phc-ui { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
#phc-intro .phc-ui > * { pointer-events: auto; }
#phc-intro .phc-brand {
  position: absolute;
  left: 28px;
  top: 28px;
  height: 50px;
  display: block;
  line-height: 0;
}
#phc-intro .phc-brand img { height: 100%; width: auto; display: block; }
#phc-intro .phc-actions {
  position: absolute;
  right: 28px;
  top: 33px;
  display: flex;
  gap: 10px;
}
#phc-intro .phc-skip,
#phc-intro .phc-sound {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
#phc-intro .phc-skip:hover,
#phc-intro .phc-sound:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
#phc-intro .phc-skip:focus-visible,
#phc-intro .phc-sound:focus-visible,
#phc-intro .phc-enter:focus-visible,
#phc-intro .phc-rail button:focus-visible { outline: 2px solid var(--phc-onde); outline-offset: 3px; }
#phc-intro .phc-sound { border-color: rgba(255, 255, 255, 0.18); }
#phc-intro .phc-sound i { /* petit égaliseur */
  width: 14px;
  height: 12px;
  display: inline-block;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 2px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 4px 100% / 2px 90% no-repeat,
    linear-gradient(currentColor, currentColor) 8px 100% / 2px 60% no-repeat,
    linear-gradient(currentColor, currentColor) 12px 100% / 2px 30% no-repeat;
  opacity: 0.8;
}
#phc-intro .phc-sound[aria-pressed="true"] { border-color: var(--phc-onde); color: var(--phc-onde); }
#phc-intro .phc-sound[aria-pressed="true"] i { animation: phc-eq 0.9s steps(3) infinite; }
@keyframes phc-eq {
  0% { background-size: 2px 40%, 2px 90%, 2px 60%, 2px 30%; }
  50% { background-size: 2px 90%, 2px 30%, 2px 100%, 2px 70%; }
  100% { background-size: 2px 60%, 2px 70%, 2px 40%, 2px 100%; }
}

#phc-intro .phc-rail {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
#phc-intro .phc-rail button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 2px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
#phc-intro .phc-rail span { order: 1; opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; }
#phc-intro .phc-rail i {
  order: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
#phc-intro .phc-rail button:hover span,
#phc-intro .phc-rail button.is-on span { opacity: 1; transform: none; }
#phc-intro .phc-rail button.is-on { color: #fff; }
#phc-intro .phc-rail button.is-on i { background: var(--phc-onde); border-color: var(--phc-onde); transform: scale(1.35); box-shadow: 0 0 12px var(--phc-onde); }

#phc-intro .phc-hud {
  position: absolute;
  right: 28px;
  top: 100px;
  width: 300px;
  padding: 14px 16px 14px;
  border-radius: 16px;
  background: rgba(9, 14, 19, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: Montserrat, sans-serif;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
#phc-intro .phc-hud-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phc-brume);
  margin-bottom: 8px;
}
#phc-intro .phc-hud-head .phc-hud-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #ff6b5a;
  box-shadow: 0 0 8px #ff6b5a;
  vertical-align: 1px;
  animation: phc-rec 1.2s steps(2) infinite;
}
@keyframes phc-rec { 50% { opacity: 0.2; } }
#phc-intro .phc-hud-src { color: #fff; }
#phc-intro .phc-scope { display: block; width: 268px; height: 72px; }
#phc-intro .phc-hud-level { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
#phc-intro .phc-hud-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
#phc-intro .phc-hud-bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  border-radius: 4px;
  background: linear-gradient(90deg, #7fe7f2, #f3d8b9 55%, #ff8b6e);
  background-size: 268px 100%;
}
#phc-intro .phc-hud-val { min-width: 74px; text-align: right; font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

#phc-intro .phc-enter {
  position: absolute;
  left: 50%;
  bottom: max(9vh, 64px);
  transform: translateX(-50%);
  height: 54px;
  padding: 0 30px 0 26px;
  border-radius: 999px;
  background: var(--phc-ardoise);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 17px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transition: background 0.25s;
}
#phc-intro .phc-enter i { width: 18px; height: 1px; background: currentColor; }
#phc-intro .phc-enter:hover { background: var(--phc-acier); }

#phc-intro .phc-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
#phc-intro .phc-progress span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--phc-acier), var(--phc-onde));
}
#phc-intro .phc-notice {
  position: absolute;
  left: 74px;
  bottom: 20px;
  font-family: Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: color 0.4s;
}
#phc-intro .phc-notice a {
  pointer-events: auto;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 231, 242, 0.45);
  transition: color 0.25s, border-color 0.25s;
}
#phc-intro .phc-notice a:hover,
#phc-intro .phc-notice a:focus-visible { color: var(--phc-onde); border-bottom-color: var(--phc-onde); }
#phc-intro .phc-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.6s;
  animation: phc-pulse 1.6s ease-in-out infinite;
}
#phc-intro .phc-loader img { width: 100%; height: auto; display: block; opacity: 0.85; }
@keyframes phc-pulse { 50% { opacity: 0.35; } }
#phc-intro.is-ready .phc-loader { opacity: 0; animation: none; }
#phc-intro:not(.is-ready) .phc-actions,
#phc-intro:not(.is-ready) .phc-rail { opacity: 0; }
#phc-intro .phc-actions,
#phc-intro .phc-rail,
#phc-intro .phc-brand { transition: opacity 0.5s; }

/* image fixe (captures) : pas de petite animation d'interface */
#phc-intro.is-still .phc-scroll span,
#phc-intro.is-still .phc-hud-title::before { animation: none; }

/* ------------------------------------------------------------------ tablette et téléphone */
@media (max-width: 1100px) {
  #phc-intro .phc-hud { right: 28px; top: 92px; width: 260px; }
  #phc-intro .phc-scope { width: 228px; height: 62px; }
}
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  #phc-intro .phc-stage::after {
    background: linear-gradient(0deg, rgba(8, 12, 16, 0.82) 0%, rgba(8, 12, 16, 0.55) 34%, rgba(8, 12, 16, 0) 58%);
  }
  #phc-intro .phc-txt {
    left: 22px;
    right: 22px;
    width: auto;
    top: auto;
    bottom: calc(46px + env(safe-area-inset-bottom));
    transform: none;
  }
  #phc-intro .phc-t-open { left: 22px; right: 22px; top: 17%; bottom: auto; width: auto; transform: none; }
  #phc-intro .phc-t-open .phc-title { font-size: clamp(32px, 9vw, 46px); }
  #phc-intro .phc-scroll { margin-top: 30px; }
  #phc-intro .phc-t-quote { width: auto; }
  #phc-intro .phc-quote { font-size: clamp(21px, 6vw, 28px); }
  #phc-intro .phc-t-end { left: 22px; right: 22px; width: auto; bottom: 18%; transform: none; }
  #phc-intro .phc-title { font-size: clamp(30px, 8.4vw, 42px); margin-bottom: 14px; }
  #phc-intro .phc-lead { font-size: 15.5px; line-height: 1.55; }
  #phc-intro .phc-kicker { font-size: 11.5px; margin-bottom: 12px; }
  #phc-intro .phc-count { margin-top: 16px; }
  #phc-intro .phc-count b { font-size: 44px; }
  #phc-intro .phc-stat { margin-top: 14px; }
  #phc-intro .phc-stat b { font-size: 44px; }
  #phc-intro .phc-brand { left: 25px; top: 22px; height: 30px; }
  #phc-intro .phc-actions { right: 14px; top: 20px; gap: 6px; }
  #phc-intro .phc-skip,
  #phc-intro .phc-sound { height: 36px; padding: 0 14px; font-size: 12px; }
  #phc-intro .phc-sound span { display: none; }
  #phc-intro .phc-sound { width: 36px; padding: 0; justify-content: center; }
  #phc-intro .phc-rail,
  #phc-intro .phc-hud { display: none; }
  #phc-intro .phc-label { font-size: 9.5px; padding: 5px 10px 5px 6px; gap: 7px; }
  #phc-intro .phc-label small { display: none !important; }
  #phc-intro .phc-label.is-done i { display: block; background: var(--phc-sable); box-shadow: 0 0 10px var(--phc-sable); }
  #phc-intro .phc-label.is-done em { display: none; }
  #phc-intro .phc-notice { left: 70px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); font-size: 10px; }
  #phc-intro .phc-enter { height: 50px; font-size: 16px; bottom: max(12vh, 80px); }
}

@media (prefers-reduced-motion: reduce) {
  #phc-intro .phc-scroll span,
  #phc-intro .phc-loader,
  #phc-intro .phc-sound[aria-pressed="true"] i { animation: none; }
}
