/* ============================================================
   Planevia — Annuaire patient (rdv.planevia.ca)
   Charte turquoise/cyan (planevia.ca). Moderne, profond, inspirant.
   ============================================================ */

:root {
  /* Charte Planevia (turquoise/cyan) */
  --teal: #14b8ce;
  --teal-d: #0e91a6;
  --teal-dd: #0b7587;
  --teal-l: #2bcadd;
  --grad: linear-gradient(135deg, #1ec6da 0%, #14b8ce 45%, #0e91a6 100%);

  --ink: #0c2730;
  --ink-soft: #44606a;
  --muted: #93a8af;
  --line: #e7eff1;
  --bg: #eef6f8;
  --card: #ffffff;
  --amber: #f59e0b;

  /* Teintes douces derivees du teal */
  --teal-tint: #e2f6fa;
  --teal-tint-2: #d3f1f6;

  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(12, 39, 48, .05), 0 2px 8px rgba(12, 39, 48, .04);
  --shadow-md: 0 10px 34px rgba(12, 39, 48, .10);
  --shadow-lg: 0 24px 60px rgba(14, 145, 166, .30);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-d); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 30px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px);
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-name { font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.6px; }
.brand-name b { color: var(--teal-d); }
.nav-link {
  color: var(--teal-d); font-weight: 700; font-size: 14px;
  background: var(--teal-tint); padding: 8px 15px; border-radius: 999px;
}
.nav-link:hover { background: var(--teal-tint-2); text-decoration: none; }

/* ── Hero / recherche ───────────────────────────────────────── */
.search-hero {
  background: var(--grad);
  padding: 54px 24px 120px;
  text-align: center; color: #fff; position: relative; overflow: hidden;
  border-bottom-left-radius: 42px; border-bottom-right-radius: 42px;
}
.search-hero::before, .search-hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(8px); opacity: .4; }
.search-hero::before { width: 340px; height: 340px; background: #7fe3ef; top: -130px; right: -70px; }
.search-hero::after  { width: 260px; height: 260px; background: #36d0e3; bottom: -120px; left: -40px; }
/* fines lignes "tech" facon circuit, clin d'oeil au logo */
.search-hero .grid-deco {
  position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 72%);
}

.hero-title { position: relative; font-size: clamp(28px, 4.4vw, 45px); font-weight: 800; margin: 0 0 10px; letter-spacing: -1.2px; text-shadow: 0 2px 22px rgba(0,0,0,.14); }
.hero-sub { position: relative; margin: 0 0 30px; opacity: .96; font-size: 17px; font-weight: 500; }

.search-bar {
  position: relative; display: flex; gap: 8px; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto; background: #fff; padding: 9px; border-radius: 22px; box-shadow: var(--shadow-lg);
}
.field {
  display: flex; align-items: center; gap: 9px; flex: 1 1 240px; min-width: 0;
  padding: 7px 16px; border-radius: 15px; background: #f3f8f9; border: 1.5px solid transparent; transition: border-color .15s, background .15s;
}
.field:focus-within { border-color: #9fe1ec; background: #fff; }
.field-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.field input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; color: var(--ink); padding: 9px 0; font-weight: 500; }
.geo-btn { border: 0; background: var(--teal-tint); color: var(--teal-d); font-weight: 700; font-size: 12px; padding: 7px 11px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.geo-btn:hover { background: var(--teal-tint-2); }
.search-submit {
  border: 0; background: var(--ink); color: #fff; font-weight: 700; padding: 0 30px; border-radius: 15px; cursor: pointer; font-size: 15px; flex: 0 0 auto; transition: transform .12s, background .15s;
}
.search-submit:hover { background: #0c2730; transform: translateY(-1px); }

/* ── Filtres ────────────────────────────────────────────────── */
.filters { position: relative; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; max-width: 900px; margin: 20px auto 0; }
.filter-chip { appearance: none; border: 1.5px solid rgba(255,255,255,.5); background: rgba(255,255,255,.16); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); transition: background .15s; }
.filter-chip:hover { background: rgba(255,255,255,.28); }
.filter-chip option { color: var(--ink); }
.clientele-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-chip { border: 1.5px solid rgba(255,255,255,.5); background: rgba(255,255,255,.14); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.cl-chip:hover { background: rgba(255,255,255,.28); }
.cl-chip.active { background: #fff; color: var(--teal-d); border-color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.14); }

/* ── Layout resultats + carte ──────────────────────────────── */
.layout { display: grid; grid-template-columns: 1fr 40%; gap: 26px; max-width: 1360px; margin: -72px auto 0; padding: 0 26px 48px; align-items: start; position: relative; z-index: 5; }
.results-col { min-width: 0; }
.results-meta { color: var(--ink); font-size: 15px; font-weight: 800; margin: 0 4px 16px; padding-top: 4px; letter-spacing: -.3px; }
.results { display: flex; flex-direction: column; gap: 16px; }

.map-col { position: sticky; top: 84px; height: calc(100vh - 108px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #d6e6ea; border: 4px solid #fff; }
#map { width: 100%; height: 100%; }

/* ── Carte praticien ───────────────────────────────────────── */
.pro-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 20px; transition: box-shadow .2s, transform .2s, border-color .2s; position: relative; overflow: hidden; }
.pro-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.pro-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #cdeaef; }
.pro-card:hover::before { opacity: 1; }

.pro-head { display: flex; gap: 15px; }
.pro-photo { width: 66px; height: 66px; border-radius: 18px; object-fit: cover; flex: none; background: linear-gradient(135deg, var(--teal-tint), var(--teal-tint-2)); display: grid; place-items: center; color: var(--teal-d); font-weight: 800; font-size: 22px; box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(14,145,166,.20); }
.pro-info { min-width: 0; flex: 1; }
.pro-name { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -.4px; }
.pro-title { color: var(--teal-d); font-weight: 700; font-size: 14px; margin: 3px 0 0; }
.pro-clinic { color: var(--ink-soft); font-size: 13px; margin: 5px 0 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 500; }
.pro-dist { background: #f0f5f6; color: var(--ink-soft); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pro-rating { color: var(--amber); font-size: 14px; font-weight: 800; margin-top: 5px; letter-spacing: 1px; }
.pro-rating .count { color: var(--muted); font-weight: 600; letter-spacing: 0; }

.pro-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.tag { background: var(--teal-tint); color: var(--teal-d); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* Service + calendrier */
.pro-booking { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.svc-select { width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--ink); background: #fff; margin-bottom: 14px; cursor: pointer; }
.week { display: grid; grid-template-columns: repeat(var(--days, 6), 1fr); gap: 8px; }
.day-col { text-align: center; }
.day-h { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.day-d { font-size: 14px; color: var(--ink); font-weight: 800; margin-bottom: 9px; }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slot { border: 0; background: var(--teal-tint); color: var(--teal-d); font-weight: 800; font-size: 12.5px; padding: 8px 4px; border-radius: 10px; cursor: pointer; transition: all .12s; }
.slot:hover { background: var(--teal); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,145,166,.38); }
.slot-empty { color: #c2d2d6; font-size: 13px; padding: 8px 0; }
.week-loading { color: var(--muted); font-size: 13px; padding: 12px 0; }
.book-more { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 800; }

/* Etats */
.empty-state, .loading { text-align: center; color: var(--ink-soft); padding: 48px 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.empty-state p { margin: 0; font-weight: 600; }
.empty-ico { font-size: 40px; margin-bottom: 12px; display: block; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 26px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; margin-top: -60px; }
  .map-col { position: relative; top: 0; height: 300px; order: -1; }
}
@media (max-width: 560px) {
  .search-hero { padding: 40px 18px 110px; }
  .search-bar { flex-direction: column; }
  .search-submit { padding: 13px; }
  .week { grid-template-columns: repeat(3, 1fr); }
}
