/* ============================================================
   Maroiane.com — Global Styles
   Moroccan luxury theme — terracotta, sand, olive
   ============================================================ */

:root {
  --terra:       #C4622D;
  --terra-light: #E8855A;
  --terra-dark:  #8B3A14;
  --gold:        #C9942A;
  --sand:        #F5EFE6;
  --sand-deep:   #EDE0CF;
  --olive:       #4A5240;
  --bg:          #FDFAF7;
  --bg2:         #F5EFE6;
  --card:        #FFFCF8;
  --border:      rgba(196,98,45,0.14);
  --text:        #1A1208;
  --text2:       #5A4535;
  --text3:       #8A7060;
  --white:       #FFFFFF;
  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 2px 20px rgba(26,18,8,0.08);
  --shadow-lg:   0 8px 48px rgba(26,18,8,0.14);
  --nav-h:       70px;
  --font-display:'Cormorant Garamond', serif;
  --font-body:   'DM Sans', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--terra); border-radius: 3px; }

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5vw; }

/* ── Flash messages ─────────────────────────────────────────── */
.flash { padding: 12px 20px; border-radius: 10px; margin: 12px 5vw; font-size: 0.88rem; font-weight: 500; }
.flash-success { background: #DCFCE7; color: #14532D; border: 1px solid #86EFAC; }
.flash-error   { background: #FEE2E2; color: #7F1D1D; border: 1px solid #FCA5A5; }
.flash-warning { background: #FEF3C7; color: #78350F; border: 1px solid #FCD34D; }
.flash-info    { background: #DBEAFE; color: #1E3A5F; border: 1px solid #93C5FD; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5vw;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600; color: var(--terra);
}
.nav-logo em { color: var(--text); font-style: normal; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-link { font-size: 0.88rem; color: var(--text2); padding: 6px 12px; border-radius: 20px; transition: all .2s; font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--terra); }
.btn-nav {
  background: var(--terra); color: var(--white);
  font-size: 0.85rem; font-weight: 500; padding: 8px 18px; border-radius: 30px;
  border: none; transition: all .2s;
}
.btn-nav:hover { background: var(--terra-dark); transform: translateY(-1px); }
.nav-wa {
  width: 36px; height: 36px; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.nav-wa:hover { transform: scale(1.1); }
.lang-switcher { display: flex; gap: 2px; }
.lang-switcher a {
  font-size: 0.75rem; font-weight: 500; padding: 4px 8px; border-radius: 15px;
  color: var(--text3); transition: all .2s;
}
.lang-switcher a.active, .lang-switcher a:hover {
  background: var(--terra); color: var(--white);
}
.nav-menu-btn {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px;
}
.nav-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-mobile { display: none; flex-direction: column; background: var(--bg); border-top: 1px solid var(--border); padding: 16px 5vw; gap: 4px; }
.nav-mobile a { padding: 10px 12px; border-radius: 8px; font-size: 0.9rem; color: var(--text2); }
.nav-mobile a:hover { background: var(--bg2); color: var(--terra); }
.nav-mobile.open { display: flex; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 5vw 60px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(196,98,45,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(201,148,42,0.06) 0%, transparent 60%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C4622D' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C%2Fsvg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 16px;
  font-size: 0.8rem; font-weight: 500; color: var(--terra);
  margin-bottom: 24px;
  animation: fadeUp .6s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500; line-height: 1.1; color: var(--text);
  margin-bottom: 20px;
  animation: fadeUp .6s .1s ease both;
}
.hero-title em { color: var(--terra); font-style: italic; }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text2); font-weight: 300; line-height: 1.7;
  max-width: 560px; margin: 0 auto 40px;
  animation: fadeUp .6s .2s ease both;
}

/* ── Search bar ─────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 60px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow-lg); gap: 0;
  max-width: 780px; margin: 0 auto 48px;
  animation: fadeUp .6s .3s ease both;
}
.search-field {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; flex: 1; min-width: 140px;
  color: var(--text3);
}
.search-field svg { flex-shrink: 0; }
.search-field input, .search-field select {
  border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 0.88rem; color: var(--text);
  width: 100%; cursor: pointer;
}
.search-field input::placeholder { color: var(--text3); }
.search-divider { width: 1px; height: 28px; background: var(--border); flex-shrink: 0; }
.search-btn {
  background: var(--terra); color: var(--white);
  border: none; border-radius: 50px; padding: 12px 24px;
  font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  transition: all .2s; white-space: nowrap;
}
.search-btn:hover { background: var(--terra-dark); transform: translateY(-1px); }

/* ── Hero Stats ─────────────────────────────────────────────── */
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  animation: fadeUp .6s .4s ease both;
}
.stat { text-align: center; padding: 0 24px; }
.stat-n { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--terra); display: block; }
.stat-l { font-size: 0.78rem; color: var(--text3); }
.stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg2); }
.section-head { margin-bottom: 48px; }
.section-label {
  font-size: 0.72rem; font-weight: 500; color: var(--terra);
  letter-spacing: 2px; text-transform: uppercase; display: block; margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 500; color: var(--text); margin-bottom: 8px;
}
.section-sub { font-size: 0.95rem; color: var(--text2); font-weight: 300; max-width: 480px; }
.section-cta { text-align: center; margin-top: 48px; }

/* ── Listings grid ──────────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.listing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.listing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-link { display: block; color: inherit; }
.card-photo {
  position: relative; height: 220px; overflow: hidden;
  background: var(--sand);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.listing-card:hover .card-photo img { transform: scale(1.04); }
.card-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
}
.card-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.badge {
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-featured { background: var(--terra); color: var(--white); }
.badge-type { background: rgba(255,255,255,0.9); color: var(--terra-dark); }
.card-rating {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.95); border-radius: 20px;
  padding: 4px 10px; font-size: 0.78rem; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 4px;
}
.card-rating span { color: var(--text3); font-size: 0.72rem; }
.card-body { padding: 18px 20px 16px; }
.card-location {
  font-size: 0.78rem; color: var(--text3); margin-bottom: 6px;
  display: flex; align-items: center; gap: 4px;
}
.card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: var(--text); margin-bottom: 10px; line-height: 1.3; }
.card-features {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.card-features span {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: var(--text2);
}
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.card-price strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--text); }
.card-price span { font-size: 0.78rem; color: var(--text3); margin-left: 2px; }
.card-actions-row { display: flex; align-items: center; gap: 8px; }
.btn-wa-sm {
  width: 34px; height: 34px; border-radius: 50%; background: #25D366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.btn-wa-sm:hover { transform: scale(1.1); }
.btn-voir {
  font-size: 0.82rem; font-weight: 500; color: var(--terra);
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--terra);
  transition: all .2s;
}
.listing-card:hover .btn-voir { background: var(--terra); color: var(--white); }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text3);
}
.empty-icon { font-size: 4rem; margin-bottom: 20px; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); margin-bottom: 10px; }
.empty-state p { font-size: 0.95rem; }
.empty-state a { color: var(--terra); font-weight: 500; }

/* ── Why grid ───────────────────────────────────────────────── */
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 48px;
}
.why-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 22px; text-align: center;
  box-shadow: var(--shadow); transition: transform .2s;
}
.why-card:hover { transform: translateY(-4px); }
.why-icon { font-size: 2.2rem; margin-bottom: 14px; }
.why-card h3 { font-size: 1rem; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.why-card p { font-size: 0.85rem; color: var(--text2); line-height: 1.6; }

/* ── CTA Band ───────────────────────────────────────────────── */
.section-cta-band { background: var(--terra); }
.cta-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; padding: 20px 0;
}
.cta-band-text h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; color: var(--white); margin-bottom: 8px; }
.cta-band-text p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }
.cta-band-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--terra); color: var(--white);
  padding: 13px 28px; border-radius: 50px;
  font-size: 0.92rem; font-weight: 500; border: none;
  transition: all .25s; box-shadow: 0 4px 16px rgba(196,98,45,0.3);
  text-decoration: none;
}
.btn-primary:hover { background: var(--terra-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(196,98,45,0.4); }
.section-cta-band .btn-primary { background: var(--white); color: var(--terra); }
.section-cta-band .btn-primary:hover { background: var(--sand); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--white);
  padding: 13px 28px; border-radius: 50px;
  font-size: 0.92rem; font-weight: 500;
  border: 1.5px solid rgba(255,255,255,0.5);
  transition: all .25s; text-decoration: none;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-body); font-size: 0.92rem;
  transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--terra); }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-error { color: #dc2626; font-size: 0.8rem; margin-top: 4px; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { background: var(--text); color: var(--sand); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; color: var(--terra-light); display: inline-block; margin-bottom: 14px; }
.footer-logo em { color: var(--sand); font-style: normal; }
.footer-brand p { font-size: 0.85rem; color: var(--text3); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text3); padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  transition: all .2s;
}
.social-btn:hover { color: var(--terra-light); border-color: var(--terra-light); }
.footer-links h4 { font-size: 0.8rem; font-weight: 500; color: var(--sand); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links a, .footer-contact a { display: block; font-size: 0.85rem; color: var(--text3); margin-bottom: 8px; transition: color .2s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--terra-light); }
.footer-contact h4 { font-size: 0.8rem; font-weight: 500; color: var(--sand); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-contact p { font-size: 0.85rem; color: var(--text3); margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text3); flex-wrap: wrap; gap: 8px; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-link, .btn-nav { display: none; }
  .nav-menu-btn { display: flex; }
}
@media (max-width: 640px) {
  .hero { min-height: 80vh; padding: 60px 4vw 40px; }
  .search-bar { border-radius: 16px; flex-direction: column; padding: 12px; gap: 4px; }
  .search-divider { display: none; }
  .search-field { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
  .search-btn { width: 100%; justify-content: center; border-radius: 10px; }
  .hero-stats { gap: 16px 0; }
  .stat-sep { display: none; }
  .listings-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-band { flex-direction: column; text-align: center; }
}

/* ── RTL (Arabic) ───────────────────────────────────────────── */
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] .card-badges { left: auto; right: 12px; }
[dir="rtl"] .card-rating { right: auto; left: 12px; }
