/* ============================================================
   HAFIDI IMMOBILIER — Stylesheet Global
   Holding : Expert Agencement
   ============================================================ */

/* -----------------------------------------------------------
   VARIABLES
----------------------------------------------------------- */
:root {
  --indigo:       #252878;
  --indigo-deep:  #1a1c5e;
  --indigo-light: #3538a0;
  --white:        #FFFFFF;
  --off-white:    #F9F9F8;
  --gray-line:    #E8E8E4;
  --gray-subtle:  #F4F4F2;
  --text-dark:    #1C1C1C;
  --text-mid:     #4A4A4A;
  --text-light:   #8A8A8A;

  --font-title: 'Cinzel', 'Trajan Pro', serif;
  --font-body:  'Jost', 'Helvetica Neue', sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;

  --nav-h: 88px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* -----------------------------------------------------------
   RESET & BASE
----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* -----------------------------------------------------------
   TYPOGRAPHY
----------------------------------------------------------- */
.t-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--indigo);
}
.t-title {
  font-family: var(--font-title);
  color: var(--indigo-deep);
  letter-spacing: 0.08em;
  line-height: 1.15;
}
.t-serif {
  font-family: var(--font-serif);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
  font-size: 1.1rem;
}

/* -----------------------------------------------------------
   LAYOUT
----------------------------------------------------------- */
.container       { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.container--wide { max-width: 1400px; margin: 0 auto; padding: 0 48px; }
.section-pad     { padding: 120px 0; }
.section-pad--lg { padding: 160px 0; }
.section-alt     { background: var(--gray-subtle); }

.section-header          { margin-bottom: 72px; }
.section-header--center  { text-align: center; }
.section-header .t-label { margin-bottom: 18px; }
.section-header h2       { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.section-header .t-serif { margin-top: 20px; max-width: 560px; }
.section-header--center .t-serif { margin: 20px auto 0; }

.divider-thin          { width: 40px; height: 1px; background: var(--indigo); margin: 20px 0; }
.divider-thin--center  { margin: 20px auto; }

/* -----------------------------------------------------------
   BUTTONS
----------------------------------------------------------- */
.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 16px 36px;
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
  background: none;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }
.btn-outline--dark { border-color: var(--indigo); color: var(--indigo); }
.btn-outline--dark:hover { background: var(--indigo); color: var(--white); }

/* -----------------------------------------------------------
   NAVBAR
----------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#navbar.scrolled { border-color: var(--gray-line); box-shadow: 0 1px 24px rgba(0,0,0,0.04); }
#navbar.nav-dark { background: var(--indigo-deep); }
#navbar.nav-dark.scrolled { border-color: rgba(255,255,255,0.08); }

.nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 48px; width: auto; }
.nav-logo-inv img { height: 48px; width: auto; filter: brightness(0) invert(1) opacity(0.85); }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--indigo);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--indigo); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--indigo); }
.nav-links a.active::after { width: 100%; }

/* Dark nav variant */
.nav-dark .nav-links a { color: rgba(255,255,255,0.6); }
.nav-dark .nav-links a::after { background: rgba(255,255,255,0.6); }
.nav-dark .nav-links a:hover { color: var(--white); }
.nav-dark .nav-links a.active { color: var(--white); }

.nav-cta {
  border: 1px solid var(--indigo) !important;
  padding: 10px 22px !important;
  color: var(--indigo) !important;
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--indigo) !important; color: var(--white) !important; }
.nav-dark .nav-cta { border-color: rgba(255,255,255,0.4) !important; color: rgba(255,255,255,0.8) !important; }
.nav-dark .nav-cta:hover { background: rgba(255,255,255,0.12) !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-burger span { display: block; width: 24px; height: 1px; background: var(--indigo-deep); transition: var(--transition); }
.nav-dark .nav-burger span { background: rgba(255,255,255,0.7); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-line);
  padding: 32px 48px 40px;
  z-index: 999;
  flex-direction: column;
  gap: 24px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color var(--transition);
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--indigo); }

/* -----------------------------------------------------------
   PAGE HERO (intérieur)
----------------------------------------------------------- */
.page-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  border-bottom: 1px solid var(--gray-line);
}
.page-hero--dark {
  background: var(--indigo-deep);
  padding-top: 0;
  height: 420px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 64px;
  position: relative;
  overflow: hidden;
}
.page-hero--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}
.page-hero--dark .t-label { color: rgba(255,255,255,0.4); }
.page-hero--dark h1 { color: var(--white); }
.page-hero--dark .page-hero-sub { color: rgba(255,255,255,0.5); }

.page-hero-inner { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 3.2rem); margin-bottom: 16px; }
.page-hero-sub {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-mid);
  font-weight: 300;
  max-width: 560px;
  line-height: 1.8;
}

/* -----------------------------------------------------------
   ANIMATIONS
----------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* -----------------------------------------------------------
   CARDS GÉNÉRIQUES
----------------------------------------------------------- */
.card-img {
  overflow: hidden;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.card-img:hover img { transform: scale(1.04); }

/* -----------------------------------------------------------
   FORM
----------------------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
}
.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-dark);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray-line);
  padding: 12px 0;
  outline: none;
  transition: border-color var(--transition);
  resize: none;
  width: 100%;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--indigo); }
.form-group textarea { min-height: 100px; }

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */
#footer { background: var(--indigo-deep); padding: 72px 0 40px; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img { height: 36px; margin-bottom: 20px; filter: brightness(0) invert(1) opacity(0.7); }
.footer-brand p { font-size: 0.75rem; color: rgba(255,255,255,0.35); line-height: 1.8; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-title);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.75rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
}
.footer-bottom p { font-size: 0.625rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.25); }

/* -----------------------------------------------------------
   RESPONSIVE
----------------------------------------------------------- */
@media (max-width: 1100px) {
  .container, .container--wide { padding: 0 32px; }
}
@media (max-width: 900px) {
  .container, .container--wide { padding: 0 28px; }
  .nav-inner { padding: 0 28px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .section-pad { padding: 80px 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-mobile { padding: 32px 28px 40px; }
}
@media (max-width: 580px) {
  .section-pad { padding: 64px 0; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
