/* Christin's Home Design — intro immersive 3D
   Tout est préfixé #chd-intro (ou .chd-*) pour résister au thème du site. */

#chd-intro {
  --chd-gold: #b69f5e;
  --chd-gold-l: #cdb983;
  --chd-blue: #66c7f0;
  --chd-ink: #141414;
  --chd-paper: #f6f4f0;
  --chd-vh: 100vh;
  --chd-css-ok: visible; /* rend la scène visible : voir le style critique dans le balisage */
  position: relative;
  height: calc(var(--chd-screens, 12.2) * var(--chd-vh));
  background: var(--chd-paper);
  color: var(--chd-ink);
  font-family: "Open Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#chd-intro :where(h1, h2, p, a, button, nav, span, b, i, img) {
  margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit;
  letter-spacing: inherit; text-transform: none; text-decoration: none; box-shadow: none;
}
#chd-intro .chd-stage {
  position: sticky; top: 0;
  width: 100%; height: var(--chd-vh);
  overflow: hidden;
  background: var(--chd-paper);
}
#chd-intro .chd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#chd-intro .chd-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; will-change: opacity, transform; transform-origin: 50% 50%;
  pointer-events: none;
}
#chd-intro .chd-shade { position: absolute; inset: 0; background: rgba(8, 10, 12, .42); opacity: 0; pointer-events: none; }
/* voile clair derrière les textes de chapitre (côté gauche) */
#chd-intro .chd-veil {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(246,244,240,.92) 0%, rgba(246,244,240,.72) 26%, rgba(246,244,240,0) 48%);
}
#chd-intro .chd-grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .045;
  background: url(../img/grain.png); mix-blend-mode: multiply;
}

/* ---------- textes ---------- */
#chd-intro .chd-txt { position: absolute; z-index: 3; visibility: hidden; pointer-events: none; }
#chd-intro .chd-txt > * { display: block; will-change: transform, opacity; }
#chd-intro .chd-kicker {
  font-family: Figtree, sans-serif; font-weight: 500; font-size: 12.5px;
  letter-spacing: .24em; text-transform: uppercase; color: #5b5b5b;
}
#chd-intro .chd-kicker b { color: var(--chd-gold); font-weight: 600; margin-right: .2em; }
#chd-intro .chd-kicker b::after {
  content: ""; display: inline-block; vertical-align: middle; width: 34px; height: 1px; margin: -2px 1.1em 0;
  background: var(--chd-gold);
}
#chd-intro .chd-title {
  margin-top: .38em;
  font-family: Figtree, sans-serif; font-weight: 300;
  font-size: clamp(42px, 5.6vw, 92px); line-height: 1.02; letter-spacing: -.035em;
  color: var(--chd-ink);
}
#chd-intro .chd-lead {
  margin-top: 1.4em; max-width: 25em;
  font-size: clamp(15px, 1.12vw, 18px); line-height: 1.65; color: #3d3d3d;
}
#chd-intro .chd-t-open { left: 7vw; top: 50%; transform: translateY(-50%); }
#chd-intro .chd-t-open .chd-title { font-size: clamp(46px, 6.4vw, 108px); }
#chd-intro .chd-scroll {
  margin-top: 3.2em; display: flex !important; align-items: center; gap: 14px;
  font-family: Figtree, sans-serif; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #6a6a6a;
}
#chd-intro .chd-scroll span { position: relative; width: 56px; height: 1px; background: rgba(182,159,94,.35); overflow: hidden; }
#chd-intro .chd-scroll span::after {
  content: ""; position: absolute; inset: 0; background: var(--chd-gold);
  animation: chd-line 2.4s cubic-bezier(.6,0,.2,1) infinite;
}
@keyframes chd-line { 0% { transform: translateX(-100%); } 55% { transform: translateX(0); } 100% { transform: translateX(100%); } }

#chd-intro .chd-chap { left: 7vw; top: 50%; transform: translateY(-50%); max-width: 40vw; }

#chd-intro .chd-hero { left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #fff; }
#chd-intro .chd-hero-title {
  font-family: Figtree, sans-serif; font-weight: 300; color: #fff;
  font-size: clamp(40px, 5.7vw, 96px); line-height: 1.12; letter-spacing: -.03em;
}
#chd-intro .chd-hero-sub {
  margin-top: 1.6em; font-family: Figtree, sans-serif; font-size: 14px; letter-spacing: .26em;
  text-transform: uppercase; color: #fff;
}

/* défilé détouré */
#chd-intro .chd-marquee {
  position: absolute; left: 0; bottom: 3.5vh; z-index: 2; white-space: nowrap; visibility: hidden;
  pointer-events: none; will-change: transform, opacity;
}
#chd-intro .chd-marquee span {
  display: inline-block; font-family: Figtree, sans-serif; font-weight: 400;
  font-size: clamp(64px, 9vw, 150px); letter-spacing: -.02em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.2px var(--chd-gold);
}

/* ---------- en-tête du site, en fin d'intro ---------- */
#chd-intro .chd-header {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 110px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 30px 0 20px;
  opacity: 0; visibility: hidden; color: #fff;
}
#chd-intro .chd-header-logo img { display: block; width: 150px; height: auto; }
#chd-intro .chd-header-nav { display: flex; gap: 22px; font-family: Figtree, sans-serif; font-weight: 500; font-size: 15px; }
#chd-intro .chd-header-nav a { color: #fff; }
#chd-intro .chd-header-tel {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 17px; border-radius: 40px;
  background: var(--chd-gold); color: #fff; font-family: Figtree, sans-serif; font-weight: 500; font-size: 14px;
}
#chd-intro .chd-header-tel svg { width: 13px; height: 13px; fill: #fff; }
#chd-intro .chd-chevron {
  position: absolute; z-index: 4; left: 50%; bottom: 34px; width: 14px; height: 14px; margin-left: -7px;
  border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(45deg);
  opacity: 0; visibility: hidden;
}

/* ---------- crédit Creavolution (bas gauche, toute la page) ---------- */
#chd-intro .chd-notice {
  position: fixed; z-index: 7; left: 26px; bottom: 18px; margin: 0; max-width: calc(100vw - 52px);
  font-family: "Open Sans", system-ui, sans-serif; font-size: 12px; line-height: 1.35; letter-spacing: .04em;
  color: #8a857c; pointer-events: none; transition: color .4s ease, opacity .3s ease, visibility 0s;
}
#chd-intro[data-fond="aucun"] .chd-notice { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
#chd-intro[data-fond="sombre"] .chd-notice { color: rgba(255,255,255,.75); }
/* le bouton rond de CookieYes (45 px, à 15 px du coin) occupe le coin : la mention se place à sa droite */
body:has(.cky-btn-revisit-wrapper) #chd-intro .chd-notice { left: 74px; bottom: 29px; max-width: calc(100vw - 92px); }
/* le paragraphe laisse passer le défilement et les clics vers la scène : seul le lien est cliquable
   (zone de clic agrandie en hauteur pour le doigt, sans changer la mise en page) */
#chd-intro .chd-notice a, .chd-apres-mention a {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color .25s ease; /* pas de transition de couleur : le lien suivrait le passage gris → blanc avec retard */
}
#chd-intro .chd-notice a { pointer-events: auto; padding: 8px 0; }
#chd-intro .chd-notice a:hover, .chd-apres-mention a:hover { color: #b69f5e; text-decoration-color: currentColor; }
#chd-intro[data-fond="sombre"] .chd-notice a:hover { color: #fff; }
#chd-intro .chd-notice a:focus-visible, .chd-apres-mention a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* ---------- interface ---------- */
#chd-intro .chd-hud {
  position: absolute; z-index: 5; left: 0; right: 0; top: 0; padding: 26px 30px 0 26px;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
#chd-intro .chd-brand { pointer-events: auto; display: block; }
#chd-intro .chd-brand img { display: block; width: 128px; height: auto; }
#chd-intro .chd-skip {
  pointer-events: auto; cursor: pointer; margin-top: 8px;
  font-family: Figtree, sans-serif; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: #444; padding: 10px 0; border-bottom: 1px solid rgba(182,159,94,.7);
  transition: color .3s;
}
#chd-intro .chd-skip:hover { color: var(--chd-gold); }
#chd-intro .chd-rail {
  position: absolute; z-index: 5; right: 30px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 16px; align-items: flex-end;
}
#chd-intro .chd-rail button { position: relative; display: block; cursor: pointer; padding: 4px 0; }
#chd-intro .chd-rail span {
  position: absolute; right: calc(100% + 14px); top: 50%; white-space: nowrap;
  font-family: Figtree, sans-serif; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #6b6b6b; opacity: 0; transform: translate(6px, -50%); transition: opacity .35s, transform .35s;
}
#chd-intro .chd-rail i {
  display: block; width: 18px; height: 1px; background: rgba(20,20,20,.25);
  transition: width .4s, background .4s;
}
#chd-intro .chd-rail button.is-on i { width: 34px; background: var(--chd-gold); }
#chd-intro .chd-rail button.is-on span,
#chd-intro .chd-rail button:hover span { opacity: 1; transform: translate(0, -50%); }
#chd-intro .chd-progress { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(182,159,94,.12); }
#chd-intro .chd-progress span { display: block; height: 100%; background: var(--chd-gold); transform-origin: 0 50%; transform: scaleX(0); }

#chd-intro .chd-loader {
  position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--chd-paper); transition: opacity .8s ease, visibility 0s linear .8s;
}
#chd-intro .chd-loader img { width: 46px; height: auto; }
#chd-intro .chd-loader span { width: 120px; height: 1px; background: rgba(182,159,94,.25); position: relative; overflow: hidden; }
#chd-intro .chd-loader span::after { content: ""; position: absolute; inset: 0; background: var(--chd-gold); animation: chd-line 1.6s cubic-bezier(.6,0,.2,1) infinite; }
#chd-intro.is-ready .chd-loader { opacity: 0; visibility: hidden; }
#chd-intro.is-still .chd-loader { transition: none; }

/* Dans une page du thème (code court) : l'en-tête du thème remplace l'en-tête simulé */
#chd-intro.is-embed .chd-header { display: none; }
/* masqué dès le premier affichage (pas d'apparition furtive), rendu à la fin de l'intro par le script */
html.chd-js:has(#chd-intro[data-mode="shortcode"]):not(.chd-entete-ok) :is(#header-outer, #header-secondary-outer) {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
  transition: opacity .45s ease, visibility 0s linear .45s !important;
}
html:has(#chd-intro[data-mode="shortcode"]) :is(#header-outer, #header-secondary-outer) { transition: opacity .6s ease; }
/* Salient met parfois overflow: hidden sur <body> (selon la largeur) : <body> devient alors un conteneur
   de défilement et la scène « collante » ne colle plus. clip masque toujours le débord horizontal,
   sans créer de conteneur de défilement. */
html.chd-js:has(#chd-intro[data-mode="shortcode"]) body { overflow-x: clip !important; overflow-y: visible !important; }

/* Sans JavaScript / sans WebGL : la photo et la phrase d'accueil */
html:not(.chd-js) #chd-intro, #chd-intro.is-fallback { height: var(--chd-vh); }
html:not(.chd-js) #chd-intro .chd-photo, #chd-intro.is-fallback .chd-photo { opacity: 1; }
html:not(.chd-js) #chd-intro .chd-shade, #chd-intro.is-fallback .chd-shade { opacity: 1; }
html:not(.chd-js) #chd-intro .chd-hero, #chd-intro.is-fallback .chd-hero { visibility: visible; }
html:not(.chd-js) #chd-intro .chd-notice, #chd-intro.is-fallback .chd-notice { color: rgba(255,255,255,.75); }
html:not(.chd-js) #chd-intro .chd-notice a:hover, #chd-intro.is-fallback .chd-notice a:hover { color: #fff; }
html:not(.chd-js) #chd-intro :is(.chd-loader, .chd-rail, .chd-canvas, .chd-skip),
#chd-intro.is-fallback :is(.chd-loader, .chd-rail, .chd-canvas, .chd-skip) { display: none; }

/* ---------- téléphone (portrait) ---------- */
@media (max-aspect-ratio: 1/1) {
  #chd-intro .chd-veil { background: linear-gradient(0deg, rgba(246,244,240,.95) 0%, rgba(246,244,240,.8) 30%, rgba(246,244,240,0) 52%); }
  #chd-intro .chd-chap, #chd-intro .chd-t-open { left: 24px; right: 24px; top: auto; bottom: 9vh; transform: none; max-width: none; }
  #chd-intro .chd-t-open { bottom: auto; top: 50%; transform: translateY(-50%); }
  #chd-intro .chd-title { font-size: clamp(38px, 11vw, 64px); }
  #chd-intro .chd-t-open .chd-title { font-size: clamp(44px, 13vw, 72px); }
  #chd-intro .chd-lead { font-size: 15px; margin-top: 1em; }
  #chd-intro .chd-kicker { font-size: 11px; }
  #chd-intro .chd-rail { display: none; }
  #chd-intro .chd-hud { padding: 18px 20px 0 18px; }
  #chd-intro .chd-brand img { width: 104px; }
  #chd-intro .chd-marquee { display: none; }
  #chd-intro .chd-hero-title { font-size: clamp(32px, 9.4vw, 52px); padding: 0 18px; }
  #chd-intro .chd-header { height: 84px; padding: 0 18px 0 14px; }
  #chd-intro .chd-header-logo img { width: 112px; }
  #chd-intro .chd-header-nav { display: none; }
  #chd-intro .chd-header-tel { padding: 8px 12px; font-size: 0; gap: 0; }
  #chd-intro .chd-header-tel svg { width: 15px; height: 15px; }
  #chd-intro .chd-notice { left: 18px; bottom: 10px; font-size: 10px; max-width: calc(100vw - 36px); }
  #chd-intro .chd-chevron { bottom: 68px; }
  body:has(.cky-btn-revisit-wrapper) #chd-intro .chd-notice { left: 70px; bottom: 22px; max-width: calc(100vw - 86px); }
}

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

/* ---------- page de test : suite de l'accueil ---------- */
body.chd-page { margin: 0; background: #fff; }
.chd-apres { font-family: "Open Sans", system-ui, sans-serif; color: #212121; background: #fff; }
.chd-apres-bienvenue {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center;
  max-width: 1280px; margin: 0 auto; padding: 160px 7vw 140px;
}
.chd-apres-kicker { font-family: Figtree, sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #333; margin: 0 0 14px; }
.chd-apres h2 { font-family: Figtree, sans-serif; font-weight: 400; font-size: clamp(30px, 3vw, 44px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 28px; color: #000; }
.chd-apres p { font-size: 17px; line-height: 1.6; color: #555; margin: 0 0 14px; }
.chd-apres-stats { display: flex; gap: 80px; margin: 34px 0 44px; }
.chd-apres-stats b { display: block; font-family: Figtree, sans-serif; font-weight: 400; font-size: 30px; color: #000; }
.chd-apres-stats span { font-family: Figtree, sans-serif; font-size: 14px; color: #333; }
.chd-btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 12px 30px 12px 26px; border-radius: 40px;
  background: #66c7f0; color: #fff; font-family: Figtree, sans-serif; font-size: 14px; text-decoration: none;
}
.chd-btn i { display: block; width: 18px; height: 1px; background: #fff; }
.chd-apres-img img { display: block; width: 100%; height: auto; }
.chd-apres-mention { margin: 0; padding: 0 7vw 26px; font-family: "Open Sans", system-ui, sans-serif; font-size: 12px; letter-spacing: .04em; color: #8a857c; }
body:has(.cky-btn-revisit-wrapper) .chd-apres-mention { padding-left: 74px; }
.chd-apres-note { margin: 0; padding: 22px 7vw 40px; text-align: center; font-family: Figtree, sans-serif; font-size: 12px; letter-spacing: .06em; color: #9a9a9a; border-top: 1px solid #eee; }
@media (max-width: 800px) {
  .chd-apres-bienvenue { grid-template-columns: 1fr; padding: 90px 24px; }
  .chd-apres-stats { gap: 44px; }
}
