/* ============================
   IMMO — Global Stylesheet
   Luxury Real Estate Agency
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ---- VARIABLES ---- */
:root {
  --gold: #C9A96E;
  --gold-light: #E8D5B0;
  --gold-dark: #9A7A47;
  --bg: #07070F;
  --bg2: #0E0E1A;
  --bg3: #141424;
  --text: #F0EDE8;
  --text-muted: rgba(240,237,232,0.45);
  --text-sub: rgba(240,237,232,0.65);
  --border: rgba(201,169,110,0.18);
  --border-light: rgba(240,237,232,0.08);
  --nav-h: 80px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition: 0.4s var(--ease-out);
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* ---- SELECTION ---- */
::selection { background: var(--gold); color: var(--bg); }

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 60px;
  transition: background 0.5s, backdrop-filter 0.5s, border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7,7,15,0.92);
  backdrop-filter: blur(20px);
  border-color: var(--border-light);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-right: auto;
  transition: opacity 0.3s;
}
.nav-logo span { color: var(--text); }
.nav-logo:hover { opacity: 0.8; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-sub);
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta {
  margin-left: 32px;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  transition: var(--transition);
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 28px; height: 1px;
  background: var(--text);
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu .nav-link {
  font-size: 36px;
  letter-spacing: 4px;
  font-family: var(--font-display);
  font-weight: 300;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border-light);
  padding: 80px 60px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}
.social-links { display: flex; gap: 20px; }
.social-links a {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-links a:hover { border-color: var(--gold); color: var(--gold); }

/* ===========================
   UTILITY CLASSES
   =========================== */
.container { max-width: 1320px; margin: 0 auto; padding: 0 60px; }
.section { padding: 120px 0; }
.section-sm { padding: 80px 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.tag::before {
  content: '';
  display: block;
  width: 30px; height: 1px;
  background: var(--gold);
}

.display-title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: var(--gold);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 40px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  border-radius: 2px;
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.divider {
  width: 60px; height: 1px;
  background: var(--gold);
  margin: 24px 0;
}

/* ===========================
   PROPERTY CARDS
   =========================== */
.prop-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg2);
  transition: transform 0.5s var(--ease-out);
}
.prop-card:hover { transform: translateY(-6px); }
.prop-card-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.prop-card:hover .prop-card-img { transform: scale(1.05); }
.prop-card-badge {
  position: absolute;
  top: 20px; left: 20px;
  padding: 6px 16px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--bg);
  font-weight: 500;
  border-radius: 2px;
}
.prop-card-body { padding: 28px; }
.prop-card-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
}
.prop-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.prop-card-loc {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
.prop-card-loc i { font-size: 14px; color: var(--gold); }
.prop-card-specs {
  display: flex;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.spec-item i { color: var(--gold); font-size: 14px; }

/* Reveal animations (initial state) */
.reveal { opacity: 0; transform: translateY(60px); }
.reveal-left { opacity: 0; transform: translateX(-60px); }
.reveal-right { opacity: 0; transform: translateX(60px); }
.reveal-scale { opacity: 0; transform: scale(0.9); }

/* ===========================
   PAGE HERO (shared)
   =========================== */
.page-hero {
  padding-top: var(--nav-h);
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.06) 0%, transparent 60%);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero-content .tag { margin-bottom: 16px; }
.page-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.05;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .nav { padding: 0 32px; }
  .container { padding: 0 32px; }
  .footer { padding: 60px 32px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}


@media (max-width: 768px) {
  :root { --nav-h: 70px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .section { padding: 80px 0; }
  .container { padding: 0 24px; }
  .footer { padding: 60px 24px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }

  /* ─── AJOUTS ET CORRECTIONS POUR LE HERO RESPONSIVE ─── */
  
  .hero {
    align-items: flex-start !important; /* Aligne le contenu vers le haut */
    height: auto;           /* Supprime les 100vh stricts pour laisser le contenu respirer */
    min-height: 100vh;      /* Assure que la section prend quand même tout l'écran au minimum */
    padding-top: calc(var(--nav-h) + 40px); /* Laisse de l'espace pour ne pas cacher le texte sous le menu fixe */
    padding-bottom: 120px;  /* Crée de la place en bas pour éviter l'écrasement */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-content {
    margin-bottom: 40px;    /* Sépare proprement les textes de la barre de recherche */
  }

  .hero-actions {
    flex-direction: column; /* Aligne les deux boutons l'un sous l'autre pour les petits écrans */
    gap: 12px;
  }
  
  .hero-actions .btn-primary, 
  .hero-actions .btn-outline {
    width: 100%;            /* Les boutons prennent toute la largeur disponible pour cliquer plus facilement */
    justify-content: center;
  }

  .hero-search {
    position: relative;     /* Crucial : annule le comportement absolu sur mobile */
    bottom: 0;              /* Réinitialise la position */
    margin-top: 20px;
  }

  .hero-search-inner {
    padding: 20px;          /* Réduit les espacements internes trop grands sur smartphone */
    gap: 16px;
  }


  /* 1. On empêche le bloc de déborder de l'écran */
  .mission-right { 
    margin-top: 60px; 
    padding-bottom: 40px; 
    overflow: hidden; /* Aligne et coupe proprement ce qui dépasse */
    position: relative;
  }

  /* 2. On repositionne le badge pour qu'il reste dans les clous */
  .mission-badge { 
    right: 10px !important; 
    top: 10px;
    padding: 15px; /* On réduit un peu sa taille sur smartphone */
  }
  
  .mission-badge .bval {
    font-size: 24px; /* Plus adapté aux petits écrans */
  }

  /* 3. Optionnel mais recommandé : On neutralise l'effet de translation X sur mobile 
     pour éviter que GSAP ne pousse le conteneur hors de l'écran au chargement */
  .reveal-right {
    transform: translateY(30px) !important; /* On passe sur un axe vertical sur mobile */
  }
}
