/* Afarco Immobilier — mobile-first stylesheet. Logical properties keep RTL/LTR symmetrical. */

/* ---------- fonts (self-hosted, fast on slow networks) ---------- */
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(../fonts/tajawal-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(../fonts/tajawal-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(../fonts/tajawal-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(../fonts/tajawal-arabic-800-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(../fonts/tajawal-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(../fonts/tajawal-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(../fonts/tajawal-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(../fonts/tajawal-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Montserrat"; font-weight: 300 800; font-display: swap; src: url(../fonts/montserrat-latin-wght-normal.woff2) format("woff2"); }

/* ---------- tokens (from the logo: navy #0E2A47, gold #C9A24A) ---------- */
:root {
  --navy: #0E2A47;
  --navy-2: #173B60;
  --navy-deep: #091D33;
  --gold: #C9A24A;
  --gold-ink: #8A6719;      /* gold for text on light backgrounds (AA) */
  --gold-soft: #F7EFDC;
  --bg: #F2F5F8;
  --surface: #FFFFFF;
  --text: #13243A;
  --muted: #56667A;
  --line: #DFE5EC;
  --wa: #128C4A;             /* WhatsApp green, darkened for white text contrast */
  --wa-2: #0E7A40;
  --danger: #B3261E;
  --ok: #17803D;
  --r: 18px;
  --r-sm: 12px;
  --shadow-1: 0 1px 2px rgba(14, 42, 71, .06), 0 2px 8px rgba(14, 42, 71, .06);
  --shadow-2: 0 6px 24px rgba(14, 42, 71, .12);
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tap: 48px;
  --header-h: 64px;
  --bottom-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
html[lang="fr"] { --font: "Montserrat", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-tap-highlight-color: transparent; overflow-x: hidden;
  padding-bottom: calc(var(--bottom-h) + var(--safe-b));
}
html[lang="fr"] body { font-size: 15.5px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; display: inline-block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 18px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
  -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-2); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-ghost { background: var(--surface); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 17px; padding-inline: 22px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--surface); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: transform .12s ease, background-color .15s; text-decoration: none; flex: none;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.solid-wa { background: var(--wa); color: #fff; box-shadow: none; }
.icon-btn.solid-navy { background: var(--navy); color: #fff; box-shadow: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; height: 100%; margin-inline-end: auto; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.lang-btn {
  min-width: var(--tap); height: 40px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--gold-soft); color: var(--navy); font-weight: 800; font-size: 15px;
  display: inline-flex; align-items: center; gap: 6px;
}
.lang-btn .ic { width: 18px; height: 18px; }
.lang-btn .long { display: none; }
.header-add { display: none; }
.header-install { width: 40px; height: 40px; }
.header-install .ic { width: 20px; height: 20px; }

/* ---------- bottom navigation (mobile) ---------- */
.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 45; height: calc(var(--bottom-h) + var(--safe-b));
  padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  box-shadow: 0 -4px 18px rgba(14, 42, 71, .06);
}
.bottom-nav a, .bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 100%; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.bottom-nav .ic { width: 26px; height: 26px; }
.bottom-nav [aria-current="page"] { color: var(--navy); }
.bottom-nav [aria-current="page"] .ic { stroke-width: 2.4; }
.bottom-nav .nav-add .bubble {
  width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--navy-deep); box-shadow: 0 4px 12px rgba(9, 29, 51, .22); border: 4px solid #fff;
}
.bottom-nav .nav-add .bubble .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.bottom-nav .nav-add { color: var(--navy); }

/* ---------- floating WhatsApp ---------- */
.fab-wa {
  position: fixed; z-index: 44; inset-inline-end: 16px; bottom: calc(var(--bottom-h) + var(--safe-b) + 16px);
  width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(9, 29, 51, .28); text-decoration: none; transition: transform .15s;
}
.fab-wa:active { transform: scale(.92); }
.fab-wa .ic { width: 32px; height: 32px; }
body.view-detail .fab-wa, body.view-add .fab-wa { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #1D4B78 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.hero::after { /* gold base strip, echoing the logo's foundation */
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 64px, transparent 64px 68px);
}
.hero-mark { position: absolute; inset-inline-end: -40px; top: 10px; width: 230px; opacity: .07; pointer-events: none; }
.hero .wrap { position: relative; padding-block: 26px 30px; }
.hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -.2px; max-width: 18ch; }
html[lang="fr"] .hero h1 { font-size: 24px; max-width: 22ch; letter-spacing: -.4px; }
.hero p { margin-top: 8px; color: #D4DEEA; font-size: 15.5px; max-width: 46ch; }
.search-box { margin-top: 18px; position: relative; }
.search-box input {
  width: 100%; height: 56px; border: 0; border-radius: 16px; background: #fff; color: var(--text);
  padding-inline: 52px 16px; font-size: 16.5px; box-shadow: var(--shadow-2);
}
.search-box .ic { position: absolute; inset-inline-start: 16px; top: 16px; color: var(--muted); }
.search-box input::placeholder { color: #8391A2; }

/* ---------- sale / rent tabs ---------- */
.deal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.deal-tab {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 14px; border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); color: #fff;
  text-decoration: none; transition: background-color .15s, border-color .15s, transform .12s;
}
.deal-tab:active { transform: scale(.98); }
.deal-tab .ic { width: 30px; height: 30px; color: var(--gold); }
.deal-tab b { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.deal-tab small { display: block; font-size: 13px; color: #C9D5E3; }
.deal-tab[aria-selected="true"] { background: #fff; border-color: #fff; color: var(--navy); }
.deal-tab[aria-selected="true"] small { color: var(--muted); }
.deal-tab[aria-selected="true"] .ic { color: var(--gold-ink); }

/* ---------- sections ---------- */
.section { padding-block: 22px 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 20px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.section-head h2 .ic { color: var(--gold-ink); }
.section-head .count { color: var(--muted); font-size: 14px; font-weight: 500; }

/* featured carousel */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }

/* type chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: none;
  min-width: 78px; min-height: 76px; padding: 8px 10px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--navy); font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: border-color .15s, background-color .15s, transform .12s;
}
.chip .ic { width: 28px; height: 28px; color: var(--gold-ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip[aria-pressed="true"] .ic { color: var(--gold); }

/* toolbar */
.toolbar { display: flex; gap: 8px; align-items: center; margin-block: 6px 14px; }
.toolbar .btn { min-height: 44px; padding-inline: 14px; font-size: 15px; }
.toolbar .btn .badge-dot { min-width: 20px; height: 20px; border-radius: 10px; background: var(--gold); color: var(--navy-deep); font-size: 12px; display: inline-grid; place-items: center; padding: 0 5px; }
.select-wrap { position: relative; margin-inline-start: auto; }
.select-wrap select { appearance: none; -webkit-appearance: none; height: 44px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); padding-inline: 14px 38px; font-weight: 700; font-size: 14.5px; color: var(--navy); max-width: 54vw; }
.select-wrap .ic { position: absolute; inset-inline-end: 12px; top: 10px; width: 20px; height: 20px; pointer-events: none; color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  position: relative; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-2); }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: #E3E9F0; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #9AA9BA; }
.card-media .noimg .ic { width: 56px; height: 56px; stroke-width: 1.4; }
.badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1; }
.badge .ic { width: 15px; height: 15px; }
.badge-sale { background: var(--navy); color: #fff; }
.badge-rent { background: #fff; color: var(--navy); }
.badge-featured { background: var(--gold); color: var(--navy-deep); }
.badge-new { background: #E8F6EE; color: #0F6B37; }
.badge-neg { background: var(--gold-soft); color: var(--gold-ink); }
.fav-btn {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .95); color: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-1);
  transition: transform .15s;
}
.fav-btn:active { transform: scale(.88); }
.fav-btn[aria-pressed="true"] { color: #D23B4B; }
.fav-btn[aria-pressed="true"] .ic { fill: currentColor; }
.fav-btn.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; color: var(--navy); }
.price b { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.price .unit { font-size: 14px; font-weight: 700; }
.price .per { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.price-old { font-size: 12.5px; color: var(--muted); }
.card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 2px; }
.loc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.loc .ic { width: 17px; height: 17px; color: var(--gold-ink); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; color: var(--text); font-size: 14px; font-weight: 500; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts .ic { width: 18px; height: 18px; color: var(--muted); }
.card-actions { position: relative; z-index: 2; display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.card-actions .btn { flex: 1; min-height: 46px; font-size: 15.5px; }
.card.featured-card { outline: 2px solid var(--gold); outline-offset: -2px; }

/* skeletons */
.skel { background: linear-gradient(90deg, #E6EBF1 0%, #F4F7FA 40%, #E6EBF1 80%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.card.skeleton .card-media { background: none; }
.card.skeleton .card-media .skel { position: absolute; inset: 0; border-radius: 0; }
.skel-line { height: 14px; margin-top: 8px; }

/* empty / error / offline */
.state { text-align: center; padding: 36px 20px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); }
.state .ic { width: 52px; height: 52px; color: var(--gold-ink); stroke-width: 1.6; margin-inline: auto; }
.state h3 { margin-top: 10px; font-size: 18px; color: var(--navy); }
.state p { margin-top: 6px; color: var(--muted); }
.state .btn { margin-top: 16px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); color: #5E4712; font-size: 14.5px; margin-bottom: 12px; }
.notice .ic { width: 22px; height: 22px; flex: none; }

/* ---------- add-ad section ---------- */
.add-section { padding-block: 26px; }
.add-card { background: var(--surface); border-radius: 22px; padding: 20px 16px; box-shadow: var(--shadow-1); }
.add-card h2 { font-size: 21px; color: var(--navy); font-weight: 800; text-align: center; }
.add-card > p { text-align: center; color: var(--muted); margin-top: 4px; }
.add-choices { display: grid; gap: 12px; margin-top: 16px; }
.choice-wa, .choice-form {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none; border: 0; text-align: start; width: 100%;
  transition: transform .12s, box-shadow .15s;
}
.choice-wa:active, .choice-form:active { transform: scale(.98); }
.choice-wa { background: var(--wa); color: #fff; box-shadow: var(--shadow-2); min-height: 92px; }
.choice-wa .icons { display: flex; flex: none; }
.choice-wa .icons span { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.choice-wa .icons span + span { width: 42px; height: 42px; align-self: center; margin-inline-start: -10px; background: #fff; color: var(--wa); border: 3px solid var(--wa); }
.choice-wa .icons span + span .ic { width: 22px; height: 22px; }
.choice-wa .icons .ic { width: 30px; height: 30px; }
.choice-wa b { display: block; font-size: 18px; font-weight: 800; line-height: 1.3; }
.choice-wa small { display: block; font-size: 14.5px; opacity: .95; margin-top: 2px; }
.choice-form { background: var(--surface); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); min-height: 76px; }
.choice-form .ic-wrap { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold-ink); flex: none; }
.choice-form b { display: block; font-size: 17px; font-weight: 800; }
.choice-form small { display: block; font-size: 14px; color: var(--muted); }
.choice-form .chev { margin-inline-start: auto; color: var(--muted); }
.review-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; color: var(--muted); font-size: 13.5px; text-align: center; }
.review-note .ic { width: 18px; height: 18px; color: var(--ok); }

/* ---------- detail view ---------- */
.detail-top {
  position: sticky; top: 0; z-index: 41; display: flex; align-items: center; gap: 8px; height: 60px; padding-inline: 12px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.detail-top .spacer { flex: 1; }
.detail-top .icon-btn { width: 44px; height: 44px; }
body.view-detail .site-header { display: none; }
.gallery { position: relative; background: #1B2633; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; max-height: 62vh; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track figure { margin: 0; flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.gallery-track img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: var(--navy); display: none; place-items: center; box-shadow: var(--shadow-2); }
.gallery .g-prev { inset-inline-start: 12px; }
.gallery .g-next { inset-inline-end: 12px; }
.gallery .g-count { position: absolute; bottom: 12px; inset-inline-end: 12px; background: rgba(9, 29, 51, .72); color: #fff; font-size: 13.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.gallery .g-dots { position: absolute; bottom: 14px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery .g-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .5); transition: transform .2s, background-color .2s; }
.gallery .g-dots i.on { transform: scaleX(2.4); margin-inline: 4px; background: #fff; }
.detail { padding-block: 16px 24px; }
.detail .badges { position: static; margin-bottom: 10px; }
.detail h1 { font-size: 23px; font-weight: 800; color: var(--navy); }
html[lang="fr"] .detail h1 { font-size: 21px; }
.detail .price { margin-top: 8px; }
.detail .price b { font-size: 28px; }
.detail .loc { margin-top: 6px; font-size: 15px; }
.detail .meta { margin-top: 6px; color: var(--muted); font-size: 13.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--surface); border-radius: var(--r); padding: 16px; margin-top: 14px; box-shadow: var(--shadow-1); }
.panel h2 { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spec { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); min-height: 60px; }
.spec .ic-wrap { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--gold-ink); flex: none; }
.spec small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.2; }
.spec b { display: block; font-size: 15.5px; color: var(--navy); line-height: 1.3; }
.desc { white-space: pre-line; font-size: 16px; line-height: 1.85; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.video-frame.tiktok { aspect-ratio: 9 / 16; max-width: 340px; margin-inline: auto; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.privacy-note .ic { color: var(--gold-ink); flex: none; }
.pin-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--gold-ink); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.pin-link .ic { width: 18px; height: 18px; }
.action-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 46; display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14, 42, 71, .08);
}
.action-bar .btn { flex: 1; min-height: 54px; font-size: 17px; }
.action-bar .icon-btn { width: 54px; height: 54px; }
body.view-detail .bottom-nav { display: none; }
body.view-detail { padding-bottom: calc(80px + var(--safe-b)); }

/* ---------- dialogs & sheets ---------- */
dialog { border: 0; padding: 0; max-width: none; max-height: none; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(9, 29, 51, .55); }
.sheet { width: 100%; margin: auto 0 0; }
.sheet-inner { background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px calc(16px + var(--safe-b)); max-height: 88vh; overflow: auto; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { font-size: 19px; color: var(--navy); }
dialog[open].sheet { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.modal { width: min(440px, calc(100% - 32px)); margin: auto; }
.modal-inner { background: #fff; border-radius: 22px; padding: 20px; }
.ios-steps { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 12px; counter-reset: s; }
.ios-steps li { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--bg); }
.ios-steps .ic-wrap { width: 46px; height: 46px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #0A84FF; flex: none; box-shadow: var(--shadow-1); }
.ios-steps li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .label { font-weight: 700; font-size: 15.5px; color: var(--navy); }
.field .hint { font-size: 13.5px; color: var(--muted); }
.input, .field select, .field textarea {
  width: 100%; min-height: 54px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 12px 14px; font-size: 17px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.field select { appearance: none; -webkit-appearance: none; padding-inline-end: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356667A' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 20px; background-position: left 14px center; }
[dir="ltr"] .field select { background-position: right 14px center; }
.input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); outline: 3px solid rgba(14, 42, 71, .12); outline-offset: 1px; }
.field.invalid .input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; font-weight: 700; display: none; align-items: center; gap: 6px; }
.err .ic { width: 18px; height: 18px; }
.field.invalid .err { display: flex; }
.phone-input { display: flex; direction: ltr; }
.phone-input .prefix { display: grid; place-items: center; padding-inline: 14px; border: 1.5px solid var(--line); border-inline-end: 0; border-radius: 14px 0 0 14px; background: var(--bg); font-weight: 700; color: var(--navy); }
.phone-input .input { border-radius: 0 14px 14px 0; letter-spacing: 1px; }
.counter { font-size: 13px; color: var(--muted); text-align: end; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tiles.t4 { grid-template-columns: repeat(4, 1fr); }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 6px;
  border-radius: 16px; border: 2px solid var(--line); background: #fff; color: var(--navy); font-weight: 800; font-size: 15px; text-align: center; line-height: 1.25;
  transition: border-color .15s, background-color .15s, transform .12s;
}
.tile .ic { width: 34px; height: 34px; color: var(--gold-ink); stroke-width: 1.8; }
.tile:active { transform: scale(.97); }
.tile[aria-checked="true"] { border-color: var(--navy); background: #EEF3F8; outline: 1px solid var(--navy); outline-offset: -3px; }
.tile[aria-checked="true"]::after { content: ""; position: absolute; top: 8px; inset-inline-end: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat; }
.tiles.small .tile { min-height: 70px; font-size: 13.5px; }
.tiles.small .tile .ic { width: 28px; height: 28px; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; width: 100%; }
.seg button { min-height: 48px; border: 0; border-radius: 11px; background: transparent; font-weight: 800; font-size: 15.5px; color: var(--muted); }
.seg button[aria-checked="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow-1); }
.yn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.yn-row:last-child { border-bottom: 0; }
.yn-row .label { font-weight: 700; color: var(--navy); }
.yn-row .seg { width: 150px; flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--bg); cursor: pointer; }
.check input { width: 24px; height: 24px; flex: none; accent-color: var(--navy); margin: 2px 0 0; }

.stepper { position: sticky; top: var(--header-h); z-index: 30; background: var(--bg); padding-block: 10px 8px; }
.stepper-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); font-weight: 700; }
.stepper-top b { color: var(--navy); font-size: 17px; }
.progress { margin-top: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.progress i { height: 6px; border-radius: 3px; background: var(--line); transition: background-color .25s; }
.progress i.done { background: var(--gold); }
.progress i.cur { background: var(--navy); }
.step-card { background: #fff; border-radius: 20px; padding: 18px 16px; box-shadow: var(--shadow-1); margin-top: 6px; }
.step-card h2 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.step-card h2 .ic { width: 28px; height: 28px; color: var(--gold-ink); }
.form-nav { display: flex; gap: 10px; margin-top: 16px; }
.form-nav .btn { flex: 1; }
.form-nav .btn-prev { flex: 0 0 auto; }
.form-alert { display: none; padding: 12px 14px; border-radius: 14px; background: #FCE8E6; color: var(--danger); font-weight: 700; margin-top: 12px; align-items: center; gap: 8px; }
.form-alert.show { display: flex; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

.money-preview { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.money-preview b { color: var(--navy); }

/* photos */
.photo-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 130px; border: 2px dashed #B7C3D1; border-radius: 18px;
  background: var(--bg); color: var(--navy); font-weight: 800; font-size: 16px; cursor: pointer; text-align: center; padding: 14px; }
.photo-drop .ic { width: 40px; height: 40px; color: var(--gold-ink); }
.photo-drop input { display: none; }
.photo-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.photo-item { position: relative; border-radius: 14px; overflow: hidden; background: #E3E9F0; aspect-ratio: 4 / 3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .cover-tag { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--gold); color: var(--navy-deep); font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.photo-item .tools { position: absolute; inset-inline: 0; bottom: 0; display: flex; justify-content: space-between; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.photo-item .tools button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--navy); display: grid; place-items: center; }
.photo-item .tools button .ic { width: 18px; height: 18px; }
.photo-item .tools .del { color: var(--danger); }
.photo-busy { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-weight: 700; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* review */
.review-list { display: grid; gap: 0; }
.review-group { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-group:last-child { border-bottom: 0; }
.review-group header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-group header b { color: var(--navy); }
.review-group header button { border: 0; background: none; color: var(--gold-ink); font-weight: 800; min-height: 40px; padding-inline: 8px; }
.review-group dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; }
.review-group dt { color: var(--muted); }
.review-group dd { margin: 0; font-weight: 700; word-break: break-word; }
.review-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.review-thumbs img { width: 70px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }

/* result */
.result { text-align: center; padding: 28px 18px; }
.result .big-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.result .big-ic .ic { width: 42px; height: 42px; }
.result.ok .big-ic { background: #E8F6EE; color: var(--ok); }
.result.fail .big-ic { background: #FCE8E6; color: var(--danger); }
.result h2 { font-size: 22px; color: var(--navy); }
.result p { color: var(--muted); margin-top: 6px; }
.ref-code { display: inline-block; margin-top: 12px; padding: 10px 18px; border-radius: 14px; background: var(--gold-soft); color: var(--navy); font-size: 24px; font-weight: 800; letter-spacing: 1px; direction: ltr; }
.result .btn { margin-top: 12px; }
.result .stack { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #C9D5E3; margin-top: 30px; padding-block: 28px 24px; }
.site-footer img { height: 70px; width: auto; }
.site-footer p { margin-top: 10px; font-size: 14.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px; }
.footer-links .ic { width: 20px; height: 20px; }
.copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #9FB0C4; }

/* ---------- toast ---------- */
#toast { position: fixed; inset-inline: 0; margin-inline: auto; bottom: calc(var(--bottom-h) + var(--safe-b) + 86px); width: max-content; max-width: calc(100% - 32px); z-index: 80;
  background: var(--navy-deep); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: none; }

/* ---------- install banner & splash ---------- */
.install-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1); margin-top: 16px; }
.install-banner img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-banner b { display: block; color: var(--navy); font-size: 15.5px; }
.install-banner small { display: block; color: var(--muted); font-size: 13.5px; }
.install-banner .btn { margin-inline-start: auto; min-height: 42px; padding-inline: 14px; font-size: 14.5px; }
#splash { position: fixed; inset: 0; z-index: 100; background: var(--navy); display: none; place-items: center; transition: opacity .35s; }
#splash img { width: min(62vw, 300px); }
@media (display-mode: standalone) { #splash { display: grid; } }
#splash.gone { opacity: 0; pointer-events: none; }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .carousel { grid-auto-columns: 46%; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .photo-list { grid-template-columns: repeat(3, 1fr); }
  .lang-btn .long { display: inline; }
  .lang-btn .short { display: none; }
}
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .fab-wa { bottom: 24px; inset-inline-end: 24px; }
  #toast { bottom: 100px; }
  .brand img { height: 50px; }
  .header-add { display: inline-flex; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .carousel { grid-auto-columns: calc((100% - 24px) / 3); margin-inline: 0; padding-inline: 0; }
  .hero .wrap { padding-block: 48px 52px; }
  .hero h1, html[lang="fr"] .hero h1 { font-size: 40px; }
  .hero p { font-size: 17.5px; }
  .hero-mark { width: 380px; inset-inline-end: 4%; top: 20px; }
  .search-box, .deal-tabs { max-width: 640px; }
  .deal-tab { min-height: 72px; }
  .add-card { padding: 30px; }
  .add-choices { grid-template-columns: 1.15fr 1fr; }
  .detail-wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; padding-top: 18px; }
  .detail-wrap .gallery { border-radius: var(--r); overflow: hidden; position: sticky; top: 76px; }
  .gallery .g-nav { display: grid; }
  .detail { padding-top: 0; }
  .action-bar { position: static; padding: 0; border: 0; box-shadow: none; background: none; margin-top: 16px; }
  body.view-detail { padding-bottom: 0; }
  .form-shell { max-width: 720px; margin-inline: auto; }
  .specs { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } .carousel { grid-auto-columns: calc((100% - 36px) / 4); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* direction helpers & small extras */
[dir="ltr"] .flip-inv { transform: scaleX(-1); }
.fav-inline[aria-pressed="true"] { color: #D23B4B; }
.fav-inline[aria-pressed="true"] .ic { fill: currentColor; }
.icon-btn[disabled] { opacity: .4; }
.action-bar .btn { min-width: 0; }
.action-bar .lbl-short { display: none; }
@media (max-width: 440px) {
  html[lang="fr"] .action-bar .lbl-long { display: none; }
  html[lang="fr"] .action-bar .lbl-short { display: inline; }
}

/* ---------- services ---------- */
.services-section { padding-block: 22px 4px; }
.services-page { padding-top: 18px; }
.services-section .section-head { align-items: flex-start; }
.svc-sub { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.link-more { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--gold-ink); font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.link-more .ic { width: 20px; height: 20px; }
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.svc { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); }
.svc-head { display: flex; align-items: center; gap: 12px; }
.svc-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--gold-soft); color: var(--gold-ink); }
.svc-ic .ic { width: 28px; height: 28px; }
.svc h3 { font-size: 18px; font-weight: 800; color: var(--navy); }
.svc-sum { font-size: 15.5px; color: var(--text); }
.svc-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.svc-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.svc-points .ic { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--ok); stroke-width: 2.6; }
.svc-cta { margin-top: auto; white-space: normal; text-align: center; line-height: 1.3; }
.svc-featured { background: var(--navy); color: #fff; border-top: 5px solid var(--gold); padding: 18px 16px; }
.svc-featured h3 { color: #fff; font-size: 20px; }
.svc-featured .svc-sum { color: #D4DEEA; font-size: 16px; }
.svc-featured .svc-ic { background: var(--gold); color: var(--navy-deep); }
.svc-featured .svc-points li { color: #fff; }
.svc-featured .svc-points .ic { color: var(--gold); }
.svc-featured .svc-cta { margin-top: 8px; }
@media (min-width: 560px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-featured { grid-column: 1 / -1; }
  .svc-featured .svc-points { grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
  .svc-featured .svc-cta { align-self: flex-start; }
}
@media (min-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .svc-featured { padding: 24px 28px; }
  .svc-featured .svc-points { grid-template-columns: repeat(3, 1fr); }
}

/* WhatsApp group banner (home) */
.group-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: inherit; text-decoration: none; }
.group-banner:active { transform: scale(.99); }
.group-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--wa) 12%, transparent); color: var(--wa); }
.group-ic .ic { width: 24px; height: 24px; }
.group-txt { min-width: 0; }
.group-txt b { display: block; color: var(--navy); font-size: 15.5px; }
.group-txt small { display: block; color: var(--muted); font-size: 13.5px; }
.group-btn { margin-inline-start: auto; flex: none; min-height: 42px; padding-inline: 14px; font-size: 14.5px; }

/* share button in the ad action bar: icon + label */
.action-bar .share-btn { flex: none; min-height: 54px; padding-inline: 14px; font-size: 16px; }
.install-note { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
@media (max-width: 420px) {
  .action-bar { gap: 6px; }
  .action-bar .btn { padding-inline: 10px; gap: 6px; font-size: 16px; }
}
@media (max-width: 350px) {
  .action-bar .lbl-long { display: none; }
  .action-bar .lbl-short { display: inline; }
}

.state-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
/* install banner: text gets the full width on phones, button on its own row */
.install-banner { position: relative; flex-wrap: wrap; padding-inline-end: 52px; }
.install-banner > span { flex: 1 1 0; min-width: 0; }
.install-banner [data-action="dismissInstall"] { position: absolute; top: 8px; inset-inline-end: 8px; }
@media (max-width: 560px) {
  .install-banner .btn { flex-basis: 100%; margin-inline-start: 0; justify-content: center; }
}
.state .state-actions .ic { width: 22px; height: 22px; margin: 0; color: inherit; opacity: 1; }
