/* ============================================================
   SADIS IMMOBILIER — DA "PRMPT"
   Monochrome absolu : tout élément d'UI est #FFF + exclusion.
   Scroll 100% virtuel : la page est un spacer, tout est fixed.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* Accent du pôle Immobilier — vert du logo (3e barre). Vit HORS blend. */
:root { --immo-accent: #52A76C; }

html { background: #fff; }

body {
  margin: 0;
  background: #fff;
  color: #fff;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* Curseur système supprimé sur desktop (curseur custom) */
@media (min-width: 1024px) and (pointer: fine) {
  body, body a, body button { cursor: none; }
}

/* ---------- Intro fades (0.6s cubic-bezier(0.25,0.1,0.25,1)) ---------- */
@keyframes intro-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }

#info   { animation: intro-fade 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.45s both; }

/* ---------- Curseur custom ---------- */
#cursor {
  position: fixed;
  left: -100px;
  top: -100px;
  width: 48px;
  height: 48px;
  z-index: 1001; /* au-dessus de la nav, jamais recouvert */
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
}
/* Glyphe du curseur en vert — hors blend (surchage le stroke inline #fff) */
#cursor svg circle,
#cursor svg path { stroke: var(--immo-accent); }
@media (min-width: 1024px) and (pointer: fine) {
  #cursor { display: block; }
}

/* ---------- ACTE 1 : hero vidéo ---------- */
#hero-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(1) contrast(1.05);
  pointer-events: none;
  /* Visible d'emblée : le poster (1re frame) s'affiche TOUJOURS instantanément,
     puis la vidéo décodée le remplace. Plus jamais de hero blanc. */
  opacity: 1;
  background: #0b0b0b; /* filet noir le temps que le poster charge */
}
#hero-video.is-ready { opacity: 1; }

#hero-intro {
  position: fixed;
  left: 16px;
  bottom: 190px; /* mobile : au-dessus du bloc titre #info (bottom 48px + ~110px) */
  width: min(330px, 78vw);
  z-index: 20;
  mix-blend-mode: exclusion;
  color: #fff;
  pointer-events: none;
  display: block; /* visible sur TOUTES les tailles — le manifeste ne disparaît plus en mobile */
}
#hero-intro p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
#hero-intro .hint { font-size: 12px; }
@media (min-width: 1024px) {
  #hero-intro { left: 32px; bottom: 80px; }
  #hero-intro p { font-size: 16px; }
}

/* ---------- Bloc produit fixe (bottom-right) ---------- */
#info {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  mix-blend-mode: exclusion;
  color: #fff;
  pointer-events: none;
}
.info-head {
  width: 252px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 12px;
}
.sym-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  display: block;
}
.sym-wrap svg { width: 100%; height: 100%; display: block; }
#circle-symbol {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: -0.04em;
}
#info h1 {
  margin: 10px 0 0;
  width: 100%;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 500;
}
/* Compteur VERT — sorti du blend, JAMAIS superposé au titre (retour B).
   Il vit dans sa propre zone, calée AU-DESSUS du bloc #info, sans le recouvrir.
   JAMAIS mix-blend-mode:exclusion ici (fausserait le vert). */
#big-num {
  position: fixed;
  left: 16px;
  right: 16px;
  /* #info : bottom 48px, hauteur ~ symbole + titre 2 lignes (~90px). On cale
     le compteur au-dessus de cette pile pour éviter tout chevauchement. */
  bottom: 150px;
  margin: 0;
  z-index: 21;
  font-size: clamp(52px, 5.6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--immo-accent);
  pointer-events: none;
  animation: intro-fade 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) 0.45s both;
}
@media (min-width: 1024px) {
  #info { left: auto; right: 32px; bottom: 80px; width: 330px; }
  .info-head { width: 100%; margin-bottom: 32px; }
  .sym-wrap { width: 30px; height: 30px; }
  #circle-symbol { font-size: 15px; }
  /* Compteur calé au-dessus du bloc #info (titre 2 lignes ~ 110px + marge),
     même colonne droite, aligné à droite — jamais superposé au titre. */
  #big-num {
    left: auto;
    right: 32px;
    bottom: 230px;
    width: 330px;
    text-align: right;
  }
}

/* ---------- ACTE CHANTIER : film 30s scrubbé au scroll ---------- */
#chantier {
  position: fixed;
  inset: 0;
  z-index: 8; /* repos : sous le panneau (10) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* Actif : passe AU-DESSUS du panneau noir risen (10) et de l'outro (12),
   mais reste SOUS la nav (1000) et le curseur (1001). */
#chantier.is-live { visibility: visible; z-index: 13; }
#chantier-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  background: #000;
}
/* Voile noir pour lisibilité des textes en exclusion */
#chantier::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
#chantier-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.ch-eyebrow {
  position: absolute;
  top: 96px;
  left: clamp(16px, 4vw, 64px);
  margin: 0;
  color: #fff;
  mix-blend-mode: exclusion;
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
#chantier-phases {
  position: absolute;
  left: clamp(16px, 4vw, 64px);
  bottom: clamp(140px, 22vh, 220px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
  mix-blend-mode: exclusion;
  color: #fff;
}
.ch-phase {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  opacity: 0.28;
  transition: opacity 0.25s ease;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.ch-phase.is-on { opacity: 1; }
/* Le nom de la phase (sans numérotation) porte maintenant le grand style. */
.ch-phase span {
  font-weight: 500;
  font-size: clamp(20px, 3.4vw, 40px);
  line-height: 1;
  letter-spacing: -0.04em;
}
/* Label de phase ACTIVE en VERT (retour D). Isolé du blend parent :
   mix-blend-mode:normal crée son propre contexte → le vert reste juste. */
.ch-phase.is-on span {
  color: var(--immo-accent);
  mix-blend-mode: normal;
  isolation: isolate;
}
/* Compteur du film — VERT, HORS blend (jamais exclusion) */
#chantier-pct {
  position: absolute;
  right: clamp(16px, 4vw, 64px);
  bottom: clamp(48px, 8vh, 96px);
  margin: 0;
  color: var(--immo-accent);
  font-size: clamp(64px, 10vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-align: right;
}
@media (min-width: 1024px) {
  .ch-eyebrow { top: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  #chantier {
    position: static;
    opacity: 1;
    visibility: visible;
  }
  #chantier-video {
    position: static;
    width: 100%;
    height: 60vh;
  }
  #chantier::after { display: none; }
  #chantier-ui { position: static; }
  .ch-eyebrow,
  #chantier-phases {
    position: static;
    mix-blend-mode: normal;
    color: #000;
    padding: 24px clamp(16px, 4vw, 64px) 0;
  }
  .ch-phase { opacity: 1; }
  #chantier-pct { display: none; }
}

/* ---------- ACTE 2 : panneau noir + contenu ---------- */
#panel {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10;
  transform: translateY(100vh);
  will-change: transform;
  overflow: hidden;
}
#panel-wrap {
  padding-top: min(400px, 40vh);
  padding-bottom: 20vh;
  will-change: transform;
}

.p-block {
  padding-left: clamp(16px, 4vw, 64px);
  padding-right: clamp(16px, 4vw, 64px);
  margin: 0 0 16vh;
  color: #fff;
}
.p-eyebrow {
  margin: 0 0 clamp(20px, 3vh, 36px);
  font-size: 13px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.p-block h2 {
  margin: 0 0 clamp(28px, 4vh, 48px);
  font-size: clamp(30px, 4.8vw, 66px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 500;
  max-width: 18ch;
}
/* Mot clé en VERT dans le manifeste (retour D). Le panneau n'est pas
   en exclusion → couleur fidèle. */
.p-block .hl { color: var(--immo-accent); }
.p-copy {
  margin: 0 0 18px;
  font-size: clamp(16px, 1.3vw, 17px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 68ch;
}
.p-rows {
  list-style: none;
  margin: clamp(32px, 5vh, 56px) 0 0;
  padding: 0;
  max-width: 760px;
}
.p-rows li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  justify-content: space-between;
  border-top: 1px solid #fff;
  padding: 14px 0;
  font-size: clamp(15px, 1vw, 16px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.p-rows li:last-child { border-bottom: 1px solid #fff; }
.p-rows b { font-weight: 500; }
.p-rows span { text-align: right; }

.p-grid-head { margin-bottom: 6vh; }

/* Damier clairsemé */
#grid { width: 100%; }
.grid-row { display: flex; }
.cell { flex: 1; aspect-ratio: 2 / 3; position: relative; }
.bp-card {
  position: absolute;
  inset: 0;
  transform: scale(0);
  will-change: transform;
  overflow: hidden;
}
.bp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  user-select: none;
  -webkit-user-select: none;
}
.bp-card.f-contrast img { filter: grayscale(1) contrast(1.25); }
.bp-card.f-bright img { filter: grayscale(1) brightness(1.12); }
.bp-card.f-dark img { filter: grayscale(1) brightness(0.82) contrast(1.1); }

.bp-typo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #fff;
  color: #fff;
  padding: clamp(10px, 1.4vw, 20px);
  position: relative;
  overflow: hidden;
}
/* Fond photo assombri des cartes texte (plus de cadre vide) */
.bp-typo .t-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.42) contrast(1.05);
  z-index: 0;
  pointer-events: none;
}
.bp-typo .t-eyebrow,
.bp-typo .t-foot { position: relative; z-index: 1; }
.bp-typo .t-eyebrow {
  margin: 0;
  font-size: clamp(12px, 0.9vw, 13px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.bp-typo .t-big {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
}
/* Titre de carte en VERT (retour D). Les cartes typo ne portent PAS
   d'exclusion → le vert s'affiche fidèlement. */
.bp-typo .t-title {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 22px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--immo-accent);
}
.bp-typo .t-caption {
  margin: 0;
  font-size: clamp(12px, 0.85vw, 13px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.bp-typo .t-foot { display: flex; flex-direction: column; gap: 8px; }

/* FAQ */
.p-faq { margin-top: 20vh; }
.faq-item {
  border-top: 1px solid #fff;
  padding: 20px 0;
  max-width: 760px;
}
.faq-item:last-child { border-bottom: 1px solid #fff; }
.faq-item h3 {
  margin: 0 0 10px;
  font-size: clamp(16px, 1.4vw, 18px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-weight: 500;
}
.faq-item p {
  margin: 0;
  font-size: clamp(16px, 1.1vw, 16px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 60ch;
}

/* Statement + CTA */
.p-statement { margin-bottom: 0; }
.statement-big {
  margin: 0 0 clamp(24px, 4vh, 40px);
  font-size: clamp(30px, 5.4vw, 74px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  max-width: 17ch;
}
.statement-sub {
  margin: 0 0 clamp(24px, 4vh, 40px);
  font-size: clamp(16px, 1.2vw, 17px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 52ch;
}
.p-cta {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: clamp(16px, 1.2vw, 17px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
.p-cta:hover, .p-cta:focus-visible { border-bottom-color: #fff; }

/* ---------- ACTE 3 : outro ---------- */
#outro-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 12;
  pointer-events: none;
}

#outro-footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 15;
  mix-blend-mode: exclusion;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 13px;
}
#outro-footer .f-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(24px, 5vw, 80px);
}
#outro-footer .f-links { gap: 4px clamp(14px, 2vw, 28px); }
#outro-footer a { color: #fff; text-decoration: none; }
#outro-footer a:hover,
#outro-footer a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
#outro-footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
#outro-footer .f-legal { margin: 0; font-size: 12px; line-height: 1.5; max-width: 72ch; }
@media (min-width: 1024px) {
  #outro-footer {
    left: 32px;
    right: auto;
    bottom: 32px;
    font-size: 13px;
    max-width: min(46vw, 620px);
  }
  #outro-footer .f-legal { font-size: 12px; }
}

/* Pastille capsule géante */
/* Pastille "visiter" — accent VERT, hors blend (inversion au hover) */
#outro-buy {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 110px;
  height: 100px;
  border-radius: 1335px;
  /* VERT plein par défaut (bouton clairement vert, pas seulement au survol). */
  background: var(--immo-accent);
  border: 2px solid var(--immo-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transform-origin: right bottom;
  z-index: 21;
  pointer-events: none;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
#outro-buy span {
  font-size: clamp(48px, 13vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  color: #fff;
  transition: color 0.25s ease;
}
/* Survol : le bouton RESTE vert (texte blanc) — simple respiration lumineuse. */
#outro-buy:hover,
#outro-buy:focus-visible { background: var(--immo-accent); filter: brightness(1.07); }
#outro-buy:hover span,
#outro-buy:focus-visible span { color: #fff; }

/* Sur le vert, le curseur custom passe en BLANC (sinon il se fond dans le bouton). */
#cursor.over-green svg circle { stroke: #fff; }
#cursor.over-green svg path { stroke: #fff; }
@media (min-width: 1024px) {
  #outro-buy {
    left: auto;
    right: 32px;
    bottom: 32px;
    width: min(440px, calc(100vw - 64px));
    height: 174px;
  }
  #outro-buy span { font-size: clamp(72px, 7.6vw, 100px); }
}

/* ---------- Mobile : resserrage des espacements + confort de lecture ----------
   On réduit les grands vides verticaux (16vh/20vh/40vh) pour que le contenu
   respire sans énormes trous sur petit écran, sans toucher la DA desktop.
   Le scroll est virtuel : measure() recalcule le spacer au load/resize. */
@media (max-width: 640px) {
  #panel-wrap { padding-top: min(300px, 34vh); padding-bottom: 14vh; }
  .p-block { margin-bottom: 10vh; }
  .p-block h2 { margin-bottom: clamp(20px, 3vh, 32px); }
  .p-faq { margin-top: 12vh; }
  .p-grid-head { margin-bottom: 5vh; }
  /* Pastille « visiter » relevée pour ne pas chevaucher le footer agrandi. */
  #outro-buy { bottom: 148px; height: 92px; }
  #outro-buy span { font-size: clamp(44px, 12vw, 64px); }
}

/* ---------- Spacer ---------- */
#scroll-spacer { height: 500vh; }

/* ============================================================
   PREFERS-REDUCED-MOTION : page linéarisée, tout visible statique
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  body, body a, body button { cursor: auto; }
  #cursor { display: none !important; }
  #logo, #topnav, #info { animation: none; }

  #scroll-spacer { display: none; }

  #hero-video {
    position: static;
    display: block;
    width: 100%;
    height: 70vh;
    opacity: 1;
    visibility: visible !important;
  }

  #hero-intro {
    display: block;
    position: static;
    width: auto;
    max-width: 620px;
    mix-blend-mode: normal;
    color: #000;
    padding: 32px clamp(16px, 4vw, 64px) 0;
    opacity: 1 !important;
  }
  #hero-intro .hint { display: none; }

  #info {
    position: static;
    mix-blend-mode: normal;
    color: #000;
    align-items: flex-start;
    padding: 32px clamp(16px, 4vw, 64px) 48px;
    transform: none !important;
  }
  .info-head { width: auto; }
  #info h1 { text-align: left; }
  #big-num { display: none; }

  #panel { position: static; transform: none !important; overflow: visible; }
  #panel-wrap { transform: none !important; padding-top: clamp(48px, 8vh, 120px); }
  .bp-card { transform: none !important; will-change: auto; }

  #outro-overlay { display: none; }

  #outro-buy {
    position: static;
    transform: none !important;
    margin: 48px clamp(16px, 4vw, 64px);
    width: min(440px, calc(100% - 32px));
    background: var(--immo-accent);
    border-color: var(--immo-accent);
    pointer-events: auto;
  }
  #outro-buy span { color: #fff; }

  #outro-footer {
    position: static;
    opacity: 1 !important;
    mix-blend-mode: normal;
    color: #000;
    padding: 0 clamp(16px, 4vw, 64px) 48px;
    pointer-events: auto;
  }
  #outro-footer a { color: #000; }
}
