/* ============================================================
   style.css — Styles personnalisés (complète Tailwind CDN)
   Design system : warm, premium, Airbnb-inspired
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
  --primary:        #B45309;
  --primary-dark:   #92400E;
  --primary-light:  #FEF3C7;
  --accent:         #C9A96E;
  --text:           #1C1917;
  --text-muted:     #78716C;
  --bg:             #FAFAF8;
  --surface:        #FFFFFF;
  --border:         #E7E5E4;
  --success:        #15803D;
  --error:          #DC2626;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.07);
  --shadow-md:      0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:      0 12px 48px rgba(0,0,0,.14);
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --transition:     .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary-light); color: var(--primary-dark); }

/* ── Custom scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Typography ──────────────────────────────────────────── */
.font-serif { font-family: 'Playfair Display', Georgia, serif; }

/* ── Navbar ──────────────────────────────────────────────── */
#navbar {
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}
#navbar.transparent {
  background: transparent;
  color: #fff;
}
#navbar.solid {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
#navbar.transparent .nav-logo,
#navbar.transparent .nav-link { color: #fff; }
#navbar.solid .nav-logo,
#navbar.solid .nav-link { color: var(--text); }
#navbar.transparent .nav-contact-btn {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}
#navbar.transparent .nav-contact-btn:hover {
  background: rgba(255,255,255,.3);
}
#navbar.solid .nav-contact-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
#navbar.solid .nav-contact-btn:hover {
  background: var(--primary-dark);
}
.nav-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid;
  font-size: .85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-bg {
  background-attachment: fixed;  /* parallax léger */
}
@media (max-width: 768px) {
  .hero-bg { background-attachment: scroll; }
}
.scroll-indicator {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 12px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5px;
}
.scroll-indicator span {
  width: 4px; height: 8px;
  background: rgba(255,255,255,.55);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%,100% { transform: translateY(0); opacity: 1; }
  60%      { transform: translateY(10px); opacity: 0; }
}

/* ── House Cards ─────────────────────────────────────────── */
.house-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.house-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.house-card-img-wrap {
  display: block;
  position: relative;
  padding-top: 66%;       /* ratio 3:2 */
  overflow: hidden;
  cursor: pointer;
}
.house-card-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
}
.house-card:hover .house-card-img-wrap img { transform: scale(1.05); }
.house-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.badge {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  padding: .3rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.amenity-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  background: #F5F5F4;
  color: var(--text-muted);
  border-radius: 50px;
  padding: .3rem .7rem;
  font-size: .78rem;
  font-weight: 400;
}

/* ── Primary Button ──────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: .8rem 1.6rem;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: .75rem 1.5rem;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ── Gallery Grid ────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: .5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-grid .gallery-item { position: relative; overflow: hidden; cursor: pointer; }
.gallery-grid .gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--transition);
}
.gallery-grid .gallery-item:hover img { transform: scale(1.06); }
.gallery-grid .gallery-item:first-child { grid-row: 1 / 3; }
.gallery-grid .gallery-item:last-child::after {
  content: attr(data-more);
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.gallery-overlay-btn {
  position: absolute;
  right: 1rem; bottom: 1rem;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
  display: flex; align-items: center; gap: .4rem;
}
.gallery-overlay-btn:hover { background: rgba(255,255,255,1); }

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 160px;
  }
  .gallery-grid .gallery-item:first-child { grid-column: 1 / 3; grid-row: 1; }
}

/* ── Lightbox ────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
  touch-action: none;
}
#lightbox.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex; flex-direction: column; align-items: center;
}
#lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  user-select: none;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 1.8rem;
  z-index: 10001;
  flex-shrink: 0;
  pointer-events: auto;
}
.lb-nav:hover { background: rgba(255,255,255,.32); }
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }
.lb-close {
  position: absolute; top: -50px; right: 0;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background var(--transition);
}
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-counter {
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  margin-top: .75rem;
}
@media (max-width: 600px) {
  .lb-prev { left: -48px; }
  .lb-next { right: -48px; }
}

/* ── Calendar ────────────────────────────────────────────── */
.calendar-wrap { position: relative; }

.calendar-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
  gap: .6rem;
  font-size: .9rem;
}
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.calendar-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 640px) {
  .calendar-months { grid-template-columns: 1fr; gap: 1.5rem; }
  .cal-month:nth-child(2) { display: none; }
  .cal-month:nth-child(2).visible { display: block; }
}

.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.cal-nav-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.cal-nav-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cal-nav-btn:disabled { opacity: .35; cursor: default; }
.cal-month-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  text-transform: capitalize;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: .5rem;
}
.cal-weekdays span {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .3rem 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
  min-width: 0;
  user-select: none;
}
.cal-day .day-num  { font-weight: 500; line-height: 1; }
.cal-day .day-price {
  font-size: .6rem;
  color: var(--text-muted);
  line-height: 1;
  margin-top: 2px;
  white-space: nowrap;
}

/* États des jours */
.cal-day.empty     { cursor: default; }
.cal-day.past      { color: #D4D0CE; cursor: default; }
.cal-day.past .day-price { display: none; }

.cal-day.today .day-num {
  background: var(--primary-light);
  color: var(--primary-dark);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 600;
}

.cal-day.unavailable {
  color: #C7C3C1;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #F5F4F2;
}
.cal-day.unavailable .day-price { display: none; }

.cal-day.available:hover:not(.selected-start):not(.selected-end) {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.cal-day.selected-start,
.cal-day.selected-end {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}
.cal-day.selected-start .day-price,
.cal-day.selected-end .day-price { color: rgba(255,255,255,.75); }

.cal-day.in-range {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 0;
}
.cal-day.range-start { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cal-day.range-end   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Arrondi aux extrémités du range */
.cal-day.selected-start.in-range { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.cal-day.selected-end.in-range   { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.cal-legend-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.cal-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Booking Summary ─────────────────────────────────────── */
#booking-summary {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: opacity .3s, transform .3s;
}
#booking-summary.hidden { display: none; }

.booking-dates {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
}
.booking-date-col { text-align: center; }
.booking-date-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .25rem; }
.booking-date-val   { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.booking-date-arrow { color: var(--text-muted); }

.booking-price-row  { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--text-muted); }
.booking-total-row  { display: flex; justify-content: space-between; align-items: center; padding-top: .75rem; margin-top: .75rem; border-top: 1px solid var(--border); font-weight: 600; font-size: 1rem; }

.booking-error {
  padding: .75rem 1rem;
  background: #FEF2F2;
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: .85rem;
  margin-top: .75rem;
  display: none;
}
.booking-error.visible { display: block; }

/* ── Contact Form ────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-label { font-size: .82rem; font-weight: 500; color: var(--text); }
.form-input {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-input.error { border-color: var(--error); }
textarea.form-input { resize: vertical; min-height: 110px; }

.form-success {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--success);
}
.form-success.visible { display: flex; }
.form-success-icon { font-size: 2.5rem; }

/* ── Stats Bar ───────────────────────────────────────────── */
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 400; margin-top: .15rem; }

/* ── Section dividers ────────────────────────────────────── */
.section-divider {
  width: 48px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: .75rem auto 0;
}
.section-divider-left {
  margin-left: 0;
}

/* ── Skeleton loading ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #F0EFED 25%, #E8E6E3 50%, #F0EFED 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ── Footer ──────────────────────────────────────────────── */
.footer-link {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: rgba(255,255,255,.95); }
.social-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  font-size: .9rem;
}
.social-btn:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

/* ── Fade-in animations ──────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in  { animation: fadeIn  .5s ease forwards; }
.animate-fade-up  { animation: fadeUp  .6s ease forwards; }
.animate-slide-down { animation: slideDown .3s ease forwards; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 8888;
  padding: .85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  pointer-events: none;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
#toast.success { background: #15803D; }
#toast.error   { background: var(--error); }
#toast.info    { background: #1D4ED8; }

/* ── Misc helpers ────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); }
.text-primary { color: var(--primary); }
.bg-primary   { background: var(--primary); }
.ring-primary { box-shadow: 0 0 0 3px var(--primary-light); }

/* ── Back to top ─────────────────────────────────────────── */
#back-to-top {
  position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 999;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { color: var(--primary); transform: translateY(-2px); }
