/* ============================================================
   IdentiBien — habillage de la cinématique d'identification
   (le « crible », js/cinematique-crible.js). La toile occupe tout
   le bloc hôte ; les libellés sont en HTML par-dessus, pour rester
   nets et sélectionnables. L'ancienne cinématique en SVG, passée
   en fond du bandeau, a été retirée le 08/10/2026 avec ses styles.
   ============================================================ */

.cine-hote {
  position: relative;
  overflow: hidden;
  background: #dfe7f5;
  isolation: isolate;
}

/* Toile du « crible » (js/cinematique-crible.js) : elle occupe tout le bloc,
   sous les surimpressions HTML (compteur, fiche). Le moteur règle lui-même sa
   définition (densité de pixels plafonnée à 2). */
.crible-toile {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Surimpression : compteur et étape en cours ---------- */

.cine-panneau {
  position: absolute;
  left: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2.5rem);
  z-index: 2;
  color: #16233b;
  transition: opacity 0.2s linear;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.85);
}

.cine-compteur {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cine-nombre {
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.cine-unite {
  font-size: clamp(0.75rem, 1.3vw, 0.95rem);
  font-weight: 600;
  color: #44506a;
}

.cine-etape {
  margin-top: 0.35rem;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  font-weight: 600;
  color: #1d4ed8;
}

.cine-etape::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  margin-right: 0.5rem;
  vertical-align: middle;
  animation: cine-pouls 1.6s ease-in-out infinite;
}

@keyframes cine-pouls {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* ---------- Fiche d'adresse révélée ---------- */

.cine-fiche {
  position: absolute;
  right: clamp(1rem, 4vw, 3.5rem);
  top: 50%;
  z-index: 3;
  margin-top: -3.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(22, 35, 59, 0.28);
  padding: 1.05rem 1.4rem 0.9rem;
  opacity: 0;
  transform-origin: center right;
  border: 1px solid #dde3ef;
  max-width: min(19rem, 42vw);
  pointer-events: none;
}

.cine-fiche-titre {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0f9d58;
}

.cine-fiche-titre::before {
  content: '✓ ';
}

.cine-fiche-adresse {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 800;
  color: #16233b;
  line-height: 1.2;
  margin-top: 0.2rem;
}

.cine-fiche-detail {
  font-size: 0.9rem;
  color: #44506a;
  margin-top: 0.15rem;
}

/* ---------- Fiche caviardée puis révélée ----------
   Même geste que la carte du héro : un cache rayé, de la couleur de l'encre,
   se retire de gauche à droite, dans le sens de la lecture. Le pilote de la
   scène règle le retrait image par image (clip-path et flou en ligne). */

.cine-masque {
  position: relative;
  display: inline-block;
}

.cine-masque-texte {
  display: inline-block;
  filter: blur(4px);
}

.cine-masque-cache {
  position: absolute;
  inset: 2px -3px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #16233b 0 14px, #31405f 14px 19px);
}

/* Les deux mentions occupent la même case : l'une s'efface pendant que
   l'autre apparaît, sans que la fiche change de hauteur. */
.cine-fiche-statut {
  display: grid;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid #eef1f7;
  font-size: 0.72rem;
  color: #6b7690;
}

.cine-fiche-statut > span {
  grid-area: 1 / 1;
}

.cine-statut-apres {
  opacity: 0;
}

/* ---------- Format compact : colonne de héro, petits blocs, mobile ----------
   La fiche revient dans le cadre et laisse le marqueur visible. */

.cine-compact .cine-fiche {
  right: auto;
  left: 50%;
  top: auto;
  bottom: 0.9rem;
  margin-top: 0;
  transform-origin: bottom center;
  margin-left: -8.5rem;
  width: 17rem;
  max-width: calc(100% - 1.8rem);
  padding: 0.75rem 1rem 0.65rem;
}

.cine-compact .cine-fiche-adresse { font-size: 1.05rem; }
.cine-compact .cine-fiche-detail { font-size: 0.82rem; }

.cine-compact .cine-panneau {
  left: 0.9rem;
  bottom: auto;
  top: 0.9rem;
}

.cine-compact .cine-compteur {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.cine-compact .cine-nombre { font-size: 1.45rem; }
.cine-compact .cine-unite,
.cine-compact .cine-etape { font-size: 0.74rem; }
.cine-compact .cine-etape { margin-top: 0.2rem; }

@media (prefers-reduced-motion: reduce) {
  .cine-etape::before { animation: none; }
}
