/* ==========================================================================
   LouezEntreVous — Design system (maquette de démonstration)
   Palette bleu/vert confiance, cartes à ombres douces, coins arrondis.
   ========================================================================== */

:root {
  --blue-900: #0b3a53;
  --blue-700: #1069a3;
  --blue-600: #1a83c7;
  --blue-100: #e3f1fb;
  --green-600: #12a67a;
  --green-500: #1fbf8f;
  --green-100: #dcf6ec;
  --ink: #14303f;
  --muted: #5b7280;
  --line: #e4ecf1;
  --bg: #f4f8fb;
  --card: #ffffff;
  --amber: #f6a623;
  --danger: #e5533d;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(16, 105, 163, 0.08);
  --shadow: 0 8px 24px rgba(16, 105, 163, 0.12);
  --shadow-lg: 0 16px 40px rgba(11, 58, 83, 0.18);

  --maxw: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Bandeau démo ---------------------------------------------- */
.demo-banner {
  background: repeating-linear-gradient(45deg, var(--amber), var(--amber) 12px, #f7b64a 12px, #f7b64a 24px);
  color: #4a2f00;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}

/* ---------- Header ----------------------------------------------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--blue-900);
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--green-500));
  display: grid; place-items: center;
  color: #fff; font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.logo span b { color: var(--green-600); }

.main-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}
.main-nav a {
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { background: var(--blue-100); text-decoration: none; }
.main-nav a.active { background: var(--blue-700); color: #fff; }

.burger {
  display: none;
  margin-left: auto;
  background: var(--blue-100);
  border: none;
  border-radius: 12px;
  width: 44px; height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--blue-900);
}

/* ---------- Boutons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-600); text-decoration: none; }
.btn-green { background: var(--green-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-green:hover { background: var(--green-500); text-decoration: none; }
.btn-ghost { background: var(--blue-100); color: var(--blue-900); }
.btn-ghost:hover { background: #d3e8f7; text-decoration: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Hero / recherche ------------------------------------------ */
.hero {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 55%, var(--green-600));
  color: #fff;
  padding: 46px 0 120px;
}
.hero h1 { font-size: 2.1rem; margin: 0 0 8px; }
.hero p { margin: 0; opacity: .92; font-size: 1.05rem; }

.search-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  margin-top: -80px;
  position: relative;
  z-index: 5;
}
.search-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.field input, .field select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-100);
}

/* ---------- Bandeau IA ------------------------------------------------- */
.ai-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(120deg, var(--green-100), var(--blue-100));
  border: 1px solid #cfe8de;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 24px 0;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.ai-banner p { margin: 0; font-size: 0.95rem; }
.ai-banner .ai-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ai-chip {
  background: #fff;
  border: 1px solid #cfe8de;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-900);
}

/* ---------- Section titre --------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 28px 0 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head .count { color: var(--muted); font-size: 0.95rem; }

/* ---------- Grille de cartes ------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.card .thumb { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card .cat-tag {
  align-self: flex-start;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.card h3 { margin: 2px 0; font-size: 1.05rem; color: var(--ink); }
.card .meta { color: var(--muted); font-size: 0.88rem; display: flex; align-items: center; gap: 6px; }
.card .card-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price { color: var(--blue-900); font-weight: 800; font-size: 1.15rem; }
.price small { font-weight: 600; color: var(--muted); font-size: 0.8rem; }
.rating { color: var(--amber); font-weight: 700; font-size: 0.9rem; }
.rating small { color: var(--muted); font-weight: 500; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 40px;
  background: var(--card);
  border-radius: var(--radius);
}

/* ---------- Fiche annonce --------------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  margin: 28px 0;
}
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery .main-photo {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.gallery .thumb-mini {
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}
.gallery .thumb-mini:hover { border-color: var(--blue-600); }

.detail-title { font-size: 1.8rem; margin: 4px 0 8px; }
.detail-sub { color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.detail-desc { margin: 20px 0; color: #33505f; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.panel + .panel { margin-top: 20px; }
.panel h3 { margin-top: 0; }

.price-big { font-size: 2rem; font-weight: 800; color: var(--blue-900); }
.price-big small { font-size: 1rem; color: var(--muted); font-weight: 600; }

/* Profil loueur */
.owner { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--green-500));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
}
.owner .name { font-weight: 700; }
.owner .stat { color: var(--muted); font-size: 0.88rem; }

/* Calendrier simplifié */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.cal .dow { text-align: center; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.cal .day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 0.85rem;
  background: var(--green-100);
  color: var(--green-600);
  font-weight: 600;
}
.cal .day.busy { background: #f6e0dc; color: var(--danger); text-decoration: line-through; }
.cal .day.empty { background: transparent; }
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 0.82rem; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.dot.free { background: var(--green-500); }
.dot.busy { background: var(--danger); }

.ai-suggest {
  border: 1px dashed var(--green-500);
  background: var(--green-100);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 18px;
}
.ai-suggest .ai-badge { margin-bottom: 8px; }
.ai-suggest .row { display: flex; justify-content: space-between; align-items: baseline; }

/* ---------- Tunnel de réservation ------------------------------------- */
.steps { display: flex; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.step {
  flex: 1 1 0;
  min-width: 120px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.step .num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--line); color: var(--muted);
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
}
.step.active { border-color: var(--blue-600); color: var(--blue-900); font-weight: 700; }
.step.active .num { background: var(--blue-700); color: #fff; }
.step.done .num { background: var(--green-600); color: #fff; }

.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; margin-bottom: 40px; }

.recap-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.recap-line.total { border-bottom: none; font-weight: 800; font-size: 1.2rem; color: var(--blue-900); padding-top: 14px; }
.recap-line .muted { color: var(--muted); font-size: 0.85rem; }

.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-row label { font-weight: 600; font-size: 0.88rem; }
.form-row input {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 12px; font-size: 0.95rem; font-family: inherit;
}
.form-row input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.fake-note {
  background: #fff6e5; border: 1px solid #f6d492; color: #7a5200;
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.85rem; margin-bottom: 16px;
}

.confirm {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px 24px;
  margin: 30px auto;
  max-width: 560px;
}
.confirm .check {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--green-100); color: var(--green-600);
  display: grid; place-items: center; font-size: 2.4rem; margin: 0 auto 16px;
}
.confirm h2 { margin: 0 0 8px; }

/* ---------- Dashboard -------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 24px 0; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}
.stat-card .label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.stat-card .value { font-size: 1.8rem; font-weight: 800; color: var(--blue-900); margin-top: 4px; }
.stat-card .trend { font-size: 0.8rem; font-weight: 700; }
.trend.up { color: var(--green-600); }
.trend.down { color: var(--danger); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 40px; }

.chart-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.chart-card h3 { margin-top: 0; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; margin-top: 12px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%;
  background: linear-gradient(180deg, var(--green-500), var(--blue-600));
  border-radius: 8px 8px 0 0;
  min-height: 4px;
  transition: height .3s ease;
}
.bar-wrap .m { font-size: 0.72rem; color: var(--muted); font-weight: 700; }

.list-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.list-card h3 { margin-top: 0; }
.res-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-item:last-child { border-bottom: none; }
.res-item .thumb-sm { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.res-item .info { flex: 1; }
.res-item .info .t { font-weight: 700; font-size: 0.95rem; }
.res-item .info .s { color: var(--muted); font-size: 0.82rem; }
.badge {
  font-size: 0.74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge.pending { background: #fff2d6; color: #8a5b00; }
.badge.confirmed { background: var(--green-100); color: var(--green-600); }

.my-listing { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.my-listing:last-child { border-bottom: none; }
.my-listing .thumb-sm { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.my-listing .info { flex: 1; }
.my-listing .info .t { font-weight: 700; font-size: 0.95rem; }
.my-listing .info .s { color: var(--muted); font-size: 0.82rem; }

/* ---------- Footer ----------------------------------------------------- */
.site-footer {
  background: var(--blue-900);
  color: #cfe1ee;
  padding: 30px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: #fff; }

/* ---------- Responsive ------------------------------------------------- */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .search-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .burger { display: block; }
  .main-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--card);
    padding: 12px 16px;
    gap: 4px;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 12px 14px; }

  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 32px 0 110px; }
  .search-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card .thumb { aspect-ratio: 16 / 9; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-two { grid-template-columns: 1fr; }
  .detail-title { font-size: 1.4rem; }
  .container { padding: 0 16px; }
}
