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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #f9a825;
  --accent2: #43a047;
  --bg: #f0f4f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.15);
  --radius: 16px;
  --header-h: 110px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 60%, #1565c0 100%);
  color: #fff;
  padding: 28px 32px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(26,115,232,.35);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-text {
  display: flex;
  align-items: center;
  gap: 14px;
}

.emoji-title {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.subtitle {
  font-size: .85rem;
  opacity: .82;
  margin-top: 2px;
  font-weight: 400;
}

.header-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

/* ─── CONTROLS ──────────────────────────────────────── */
.controls {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--card-bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26,115,232,.12);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 9px 16px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--card-bg);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  color: var(--text-muted);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
}

.sort-wrap select {
  padding: 9px 14px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: .85rem;
  font-family: inherit;
  background: var(--card-bg);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}

.sort-wrap select:focus { border-color: var(--primary); }

/* ─── RESULTS INFO ──────────────────────────────────── */
.results-info {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 20px;
  font-size: .84rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── GRID ──────────────────────────────────────────── */
.grid {
  max-width: 1200px;
  margin: 16px auto 40px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ─── CARD ──────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  animation: fadeUp .35s ease both;
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-header {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  padding: 20px 22px 16px;
  color: #fff;
  position: relative;
}

.card-rank {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  padding-right: 36px;
}

.card-location {
  font-size: .78rem;
  opacity: .8;
  margin-top: 4px;
  font-weight: 400;
}

.card-body {
  padding: 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-total {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}

.price-night {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .82rem;
  line-height: 1.3;
}

.meta-icon { font-size: .95rem; flex-shrink: 0; margin-top: 1px; }
.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 600; color: var(--text); }

.card-resume {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
  border-left: 3px solid var(--border);
  padding-left: 10px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: .73rem;
  font-weight: 500;
}

.tag.highlight {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

.tag.animaux-oui {
  background: #fff3e0;
  border-color: #ffcc80;
  color: #e65100;
}

.tag.animaux-non {
  background: #fce4ec;
  border-color: #f48fb1;
  color: #c62828;
}

.card-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  font-family: inherit;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  flex: 1;
  justify-content: center;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ─── NO RESULTS ────────────────────────────────────── */
.no-results {
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
}

.no-results span { font-size: 3rem; display: block; margin-bottom: 12px; }
.no-results p { font-size: 1rem; }

/* ─── MODAL ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}

.modal-overlay.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: slideUp .25s ease;
}

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,.08);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: .9rem;
  cursor: pointer;
  z-index: 10;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: rgba(0,0,0,.18); }

.modal-header {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  padding: 28px 28px 22px;
  border-radius: 20px 20px 0 0;
}

.modal-header h2 { font-size: 1.25rem; font-weight: 800; padding-right: 36px; line-height: 1.3; }
.modal-header p { font-size: .82rem; opacity: .82; margin-top: 4px; }

.modal-body { padding: 24px 28px 28px; }

.modal-section { margin-bottom: 22px; }
.modal-section-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-detail-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
}

.modal-detail-item .label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 3px;
}

.modal-detail-item .value {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
}

.modal-price-block {
  background: linear-gradient(135deg, #e8f0fe, #c5d8ff);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.modal-price-block .total { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.modal-price-block .per-night { font-size: .82rem; color: var(--text-muted); }
.modal-price-block .label { font-size: .75rem; color: var(--text-muted); }

.modal-equip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-equip-item {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
}

.modal-resume-text {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
}

.modal-cta {
  display: flex;
  gap: 10px;
}

.modal-cta .btn { flex: 1; justify-content: center; font-size: .88rem; }

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px;
  font-size: .78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-link { font-weight: 600; color: var(--primary); }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 640px) {
  header { padding: 18px 16px 16px; }
  h1 { font-size: 1.3rem; }
  .header-stats { gap: 8px; }
  .stat-chip { padding: 4px 10px; font-size: .72rem; }
  .grid { grid-template-columns: 1fr; padding: 0 12px; }
  .controls { padding: 0 12px; }
  .modal-detail-grid { grid-template-columns: 1fr; }
  .modal-price-block { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.hidden { display: none !important; }
