/* ============================================
   TITANIUM IMMOBILIER — Mosaïque premium B+D
   v2 — Effets boostés : border 3s, tilt 8°, parallax
   + Masquage libellés chiffres sur fiche bien
   ============================================ */

/* ============================================
   CONTENEUR PRINCIPAL
============================================ */
.ti-mosaique {
  display: grid;
  grid-template-columns: 1.65fr 1fr 1fr;
  grid-template-rows: 290px 290px;
  gap: 20px;
  perspective: 2000px;
}

/* ============================================
   HERO CARD
============================================ */
.tim-hero {
  grid-row: span 2;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1410;
  isolation: isolate;
  text-decoration: none;
  display: block;
  color: inherit;
}

/* Border luminescente RAPIDE et BRILLANTE (v2: 3s + 2 segments dorés plus larges) */
.tim-hero::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 11px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    #c9a84c 30deg,
    #e8c96a 60deg,
    #c9a84c 90deg,
    transparent 130deg,
    transparent 180deg,
    #c9a84c 210deg,
    #e8c96a 240deg,
    #c9a84c 270deg,
    transparent 310deg,
    transparent 360deg
  );
  z-index: -1;
  animation: tim-rotateBorder 3s linear infinite;
  opacity: 1;
  filter: blur(0.5px);
}
.tim-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0.95) 100%);
  pointer-events: none;
  z-index: 2;
}
@keyframes tim-rotateBorder {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Image hero — Ken Burns + PARALLAX au scroll */
.tim-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: tim-kenBurns 20s ease-in-out infinite alternate;
  z-index: 1;
  will-change: transform;
}
@keyframes tim-kenBurns {
  0%   { transform: scale(1.08) translate3d(0, var(--parallax-y, 0px), 0); }
  100% { transform: scale(1.20) translate3d(-2%, calc(var(--parallax-y, 0px) - 2%), 0); }
}

/* Badge Coup de cœur pulsant doré */
.tim-hero-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
  background: var(--or, #c9a84c);
  color: #0a0a0a;
  padding: 7px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  box-shadow: 0 0 0 0 rgba(201,168,76,0.6);
  animation: tim-pulseGold 2.5s ease infinite;
}
@keyframes tim-pulseGold {
  0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.7); }
  70%  { box-shadow: 0 0 0 16px rgba(201,168,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}

/* Contenu hero */
.tim-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  z-index: 3;
}
.tim-hero-loc {
  font-size: 0.72rem;
  color: var(--or, #c9a84c);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tim-hero-loc::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--or, #c9a84c);
}
.tim-hero-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.4rem;
  color: #F5F0E8;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.tim-hero-title {
  font-size: 1.35rem;
  color: #F5F0E8;
  margin-bottom: 22px;
  font-weight: 300;
  line-height: 1.3;
  max-width: 90%;
}
.tim-hero-meta {
  display: flex;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(201,168,76,0.35);
  font-size: 0.82rem;
  color: rgba(245,240,232,0.85);
  flex-wrap: wrap;
}
.tim-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tim-hero-meta-item strong {
  color: var(--or, #c9a84c);
  font-weight: 500;
}

/* ============================================
   PETITES CARTES — TILT 3D 8° (v2 : plus prononcé)
============================================ */
.tim-small {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1410;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s ease;
  transform-style: preserve-3d;
  text-decoration: none;
  color: inherit;
  display: block;
  will-change: transform;
}

/* Tilt 3D 8° au hover */
.tim-small:hover {
  transform: rotateY(-8deg) rotateX(5deg) translateY(-8px) translateZ(20px);
  box-shadow:
    40px 50px 80px rgba(0,0,0,0.7),
    0 0 60px rgba(201,168,76,0.35),
    -20px 30px 60px rgba(0,0,0,0.5);
  z-index: 4;
}

.tim-small-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  transform: scale(1.05) translate3d(0, var(--parallax-y-small, 0px), 0);
  will-change: transform;
}
.tim-small:hover .tim-small-img {
  transform: scale(1.18) translate3d(0, var(--parallax-y-small, 0px), 0);
}
.tim-small::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 25%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.92) 100%);
  pointer-events: none;
  z-index: 2;
  transition: background 0.4s ease;
}
.tim-small:hover::after {
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 10%,
    rgba(0,0,0,0.5) 35%,
    rgba(0,0,0,0.95) 100%);
}

/* Badge Coup de cœur sur petite carte */
.tim-small-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  padding: 5px 11px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  background: var(--or, #c9a84c);
  color: #0a0a0a;
}

/* Badge "Nouveau" scintillant rouge bordeaux */
.tim-small-badge.nouveau {
  background: #8B3A3A;
  color: #F5F0E8;
  animation: tim-shimmerRed 3s ease infinite;
}
@keyframes tim-shimmerRed {
  0%, 100% { box-shadow: 0 0 8px rgba(139,58,58,0.5); }
  50%      { box-shadow: 0 0 24px rgba(139,58,58,1),
                         0 0 35px rgba(139,58,58,0.4); }
}

/* Contenu petite carte */
.tim-small-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 3;
}
.tim-small-loc {
  font-size: 0.62rem;
  color: var(--or, #c9a84c);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tim-small-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  color: #F5F0E8;
  line-height: 1;
  margin-bottom: 10px;
}
.tim-small-title {
  font-size: 0.85rem;
  color: #F5F0E8;
  margin-bottom: 0;
  font-weight: 300;
  line-height: 1.3;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s 0.2s ease,
              margin-bottom 0.5s 0.15s ease;
}
.tim-small:hover .tim-small-title {
  max-height: 80px;
  opacity: 1;
  margin-bottom: 14px;
}
.tim-small-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.72rem;
  color: rgba(245,240,232,0.85);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  border-top: 1px solid transparent;
  transition: max-height 0.5s 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s 0.3s ease,
              padding-top 0.5s 0.25s ease,
              border-color 0.4s 0.3s ease;
}
.tim-small-meta strong { color: var(--or, #c9a84c); font-weight: 500; }
.tim-small:hover .tim-small-meta {
  max-height: 90px;
  opacity: 1;
  padding-top: 10px;
  border-top: 1px solid rgba(201,168,76,0.3);
}
.tim-small-meta-dpe { margin-left: auto; color: var(--or, #c9a84c); }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
  .ti-mosaique {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .tim-hero {
    grid-row: auto;
    grid-column: span 2;
    min-height: 420px;
  }
  .tim-small { min-height: 280px; }
}
@media (max-width: 640px) {
  .ti-mosaique { grid-template-columns: 1fr; gap: 14px; }
  .tim-hero { grid-column: auto; min-height: 380px; }
  .tim-hero-content { padding: 24px; }
  .tim-hero-price { font-size: 2.4rem; }
  .tim-hero-title { font-size: 1.05rem; }
  .tim-hero-meta { gap: 16px; font-size: 0.75rem; }
  .tim-small { min-height: 240px; }
  /* Tilt 3D désactivé sur mobile (tactile) */
  .tim-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  }
  /* Sur mobile, infos toujours visibles */
  .tim-small-title { max-height: 80px; opacity: 1; margin-bottom: 14px; }
  .tim-small-meta {
    max-height: 90px; opacity: 1; padding-top: 10px;
    border-top: 1px solid rgba(201,168,76,0.3);
  }
}

/* ============================================
   ACCESSIBILITÉ — Réduit les anim si demandé
============================================ */
@media (prefers-reduced-motion: reduce) {
  .tim-hero::before,
  .tim-hero-img,
  .tim-hero-badge,
  .tim-small-badge.nouveau {
    animation: none !important;
  }
  .tim-small { transition: none !important; }
  .tim-small:hover { transform: none !important; }
}

/* ============================================
   ICÔNES CHIFFRES — Masque les libellés
   (Surface hab. / Pièces / Chambres / etc.)
============================================ */
.bien-chiffres .chiffre-label {
  display: none;
}

/* Ajuste l'espacement maintenant que les labels sont masqués */
.bien-chiffres .chiffre-val {
  margin-bottom: 0;
}
.bien-chiffres .chiffre-item {
  padding-bottom: 8px;
}
