/* ============================================================
   Cosyflat — Charte graphique POC
   ============================================================
   Palette  : Beige sable + terracotta + brun chaleureux
   Typo     : Fraunces (titres) + Inter (texte)
   Mobile-first responsive
   ============================================================ */

/* ---------- Reset & Variables ---------- */

:root {
  /* Couleurs */
  --bg: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-soft: #F0EAE0;
  --text: #2C2419;
  --text-soft: #6B5F50;
  --text-muted: #9A8E7E;
  --accent: #B85C38;
  --accent-hover: #9E4D2E;
  --accent-soft: #F5E6DD;
  --gold: #C9A87C;
  --border: #E8E0D3;
  --border-soft: #F0EAE0;

  /* Typo */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --container: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(44, 36, 25, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 36, 25, 0.08);
  --shadow-lg: 0 16px 48px rgba(44, 36, 25, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.header {
  background: var(--bg);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(250, 247, 242, 0.92);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav a {
  font-size: 15px;
  color: var(--text-soft);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--text-muted, #8a7a6b);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  margin-left: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s;
  white-space: nowrap;
}
.btn-clear:hover {
  color: var(--accent);
}

.nights-badge {
  align-self: center;
  background: rgba(184, 92, 56, 0.12);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-block {
  width: 100%;
}

/* ---------- Hero (page index) ---------- */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero .subtitle {
  font-size: 19px;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ---------- Search bar (placeholder) ---------- */

.search-bar {
  max-width: 720px;
  margin: 0 auto 60px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-soft);
}

.search-field {
  flex: 1;
  padding: 14px 20px;
  border-right: 1px solid var(--border-soft);
}

.search-field:last-of-type {
  border-right: none;
}

.search-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.search-field input,
.search-field select {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  padding: 0;
  outline: none;
}

.search-field select {
  padding-right: 20px;
}

.search-bar .btn-primary {
  border-radius: var(--radius);
  padding: 14px 24px;
}

/* ---------- Grid apparts (page index) ---------- */

.section-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 40px;
}

.apparts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}

.appart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.appart-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.appart-card .photo {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-soft);
  position: relative;
}

.appart-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.appart-card:hover .photo img {
  transform: scale(1.04);
}

.appart-card .city-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.appart-card .body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.appart-card .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.appart-card .tagline {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
  min-height: 40px;
}

.appart-card .info-row {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-soft);
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.appart-card .info-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.appart-card .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 16px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-soft);
  background: transparent;
  color: inherit;
}

.appart-card .price-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.appart-card .price-block .from {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.appart-card .price-block .amount {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.appart-card .price-block .amount small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.appart-card .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* ---------- Page appart ---------- */

.appart-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 8px;
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.appart-gallery .photo-main {
  grid-row: span 2;
  background: var(--bg-soft);
}

.appart-gallery .photo {
  background: var(--bg-soft);
  overflow: hidden;
}

.appart-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s;
}

.appart-gallery img:hover {
  transform: scale(1.03);
}

.appart-header {
  margin-bottom: 32px;
}

.appart-header .city {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.appart-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.appart-header .tagline {
  font-size: 18px;
  color: var(--text-soft);
}

.appart-stats {
  display: flex;
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 32px;
  font-size: 15px;
  flex-wrap: wrap;
}

.appart-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.appart-stat .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.appart-stat .value {
  font-weight: 600;
  color: var(--text);
}

.appart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.appart-main h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 16px;
  margin-top: 40px;
  letter-spacing: -0.01em;
}

.appart-main h2:first-of-type {
  margin-top: 0;
}

.appart-main p.intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 8px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Sidebar booking widget ---------- */

.booking-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-md);
}

.booking-widget .price-row {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.booking-widget .price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.booking-widget .price-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.booking-widget .price-unit {
  color: var(--text-soft);
  font-size: 15px;
}

.booking-widget .price-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.date-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.date-picker > div {
  padding: 12px 16px;
  border-right: 1.5px solid var(--border);
}

.date-picker > div:last-child {
  border-right: none;
}

.date-picker label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.date-picker input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  outline: none;
}

.guest-picker {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.guest-picker label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.guest-picker select {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.booking-widget .note {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 12px;
}

/* ---------- Mini calendar (placeholder visuel) ---------- */

.mini-calendar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.mini-calendar .month {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cal-month-label {
  flex: 1;
  text-align: center;
}

.cal-nav {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-family: var(--font-body);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cal-nav:hover:not([disabled]) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}
.cal-nav[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

#bk-clear-dates {
  display: block;
  margin: 12px auto 0;
  font-size: 13px;
}

.mini-calendar .grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.mini-calendar .grid .day-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0;
  text-transform: uppercase;
}

.mini-calendar .grid .day {
  font-size: 13px;
  padding: 8px 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}

.mini-calendar .grid .day.empty {
  color: transparent;
  cursor: default;
}

.mini-calendar .grid .day.past {
  color: var(--text-muted);
  opacity: 0.35;
  cursor: not-allowed;
}

.mini-calendar .grid .day.booked {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: line-through;
  cursor: not-allowed;
}

.mini-calendar .grid .day.available {
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mini-calendar .grid .day.available:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.mini-calendar .grid .day.selected {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.mini-calendar .grid .day.in-range {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 0;
}

.booking-widget .selection-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ---------- Reservation page ---------- */

.reservation-wrap {
  padding: 40px 0 80px;
}

.reservation-header {
  margin-bottom: 32px;
}

.reservation-header .back {
  color: var(--text-soft);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-weight: 500;
}

.reservation-header .back:hover {
  color: var(--accent);
}

.reservation-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.reservation-header .summary {
  color: var(--text-soft);
  margin-top: 6px;
}

.reservation-frame {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.reservation-frame iframe {
  width: 100%;
  height: 1200px;
  border: none;
  display: block;
}

/* ---------- Footer ---------- */

.footer {
  background: #1F1812;
  color: #C9BEB0;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-tagline {
  color: #8B7E72;
  font-size: 15px;
  max-width: 320px;
}

.footer h4 {
  font-family: var(--font-display);
  color: white;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #C9BEB0;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #2D2419;
  padding-top: 24px;
  font-size: 13px;
  color: #8B7E72;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .appart-layout {
    grid-template-columns: 1fr;
  }
  .booking-widget {
    position: static;
  }
  .appart-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
  }
  .appart-gallery .photo-main {
    grid-column: span 2;
    grid-row: span 1;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .search-bar {
    flex-direction: column;
    padding: 16px;
  }
  .search-field {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    width: 100%;
  }
  .search-field:last-of-type {
    border-bottom: none;
  }
  .search-bar .btn-primary {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 16px;
  }
  .nav a {
    font-size: 14px;
  }
  .apparts-grid {
    grid-template-columns: 1fr;
  }
  .appart-stats {
    gap: 20px;
  }
  .appart-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 200px);
  }
  .appart-gallery .photo-main {
    grid-column: span 1;
  }
}

/* === Category badge (top right on card photo) === */
.appart-card .photo { position: relative; }
.cat-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #B5763A;
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  z-index: 2;
}

/* === Key features chips (équipements) === */
.key-features-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.feature-chip {
  background: #FAEEDA;
  color: #5C3D1E;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.feature-chip .e { font-size: 13px; line-height: 1; }

/* Page détail — section équipements plus généreuse */
.key-features-section {
  margin: 28px 0;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.key-features-section h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  color: #2a1f17;
  margin: 0 0 20px 0;
  letter-spacing: -0.3px;
}
.key-features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.key-features-section .feature-chip {
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
}
.key-features-section .feature-chip .e { font-size: 16px; }
