/* AlaGet — feuille de style unique.
   Mise en page : une colonne étroite façon tableau des départs ; barre d'onglets en bas sur téléphone, en haut sur ordinateur. */

@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-cyrillic-ext-700-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-ext-400-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-ext-600-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  --bg: #f6f4ef; --surface: #ffffff; --ink: #1d1a17; --muted: #6c655c; --line: #e3ddd2;
  --red: #c4161c; --red-ink: #ffffff; --sun: #f2b705; --sun-soft: #fdf1c7;
  --ok: #1f7a4d; --ok-soft: #e3f3ea; --wa: #128c4b; --danger: #b3261e;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Golos", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130f; --surface: #211d18; --ink: #f3eee6; --muted: #a59c90; --line: #383128;
    --red: #e8454a; --red-ink: #1a0505; --sun: #f5c534; --sun-soft: #3a3010;
    --ok: #5cc28f; --ok-soft: #173326; --wa: #3ccf7f; --danger: #ff6b61;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--f-body);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font: 700 22px/1 var(--f-display); text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--red); }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langs a { padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.langs a.is-active { background: var(--ink); color: var(--bg); }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--tabbar-h); text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--red); }
.is-admin .tabbar { display: none; }
.is-admin { padding-bottom: 0; }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabbar {
    position: fixed; top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%);
    padding: 0; background: transparent; border: 0; z-index: 30;
    grid-auto-columns: auto; gap: 4px; height: 56px; align-items: center;
  }
  .tab { flex-direction: row; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; gap: 6px; }
  .tab svg { width: 18px; height: 18px; }
  .tab.is-active { background: var(--sun-soft); color: var(--ink); }
  .top { min-height: 57px; }
}

/* ---------- Page ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 18px; }
.is-admin .page { max-width: 1100px; }
.page-title { font: 700 clamp(22px, 5.5vw, 30px)/1.15 var(--f-display); margin: 4px 0 0; text-wrap: balance; letter-spacing: -.01em; }
.section-title { font: 700 16px/1.2 var(--f-display); margin: 12px 0 0; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin: 0; }
.center { text-align: center; }
.tagline { margin: 0; color: var(--muted); font-size: 15px; max-width: 46ch; }

.flash { padding: 12px 14px; border-radius: 12px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.flash-info { background: var(--sun-soft); color: var(--ink); }
.flash-error { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--red); color: var(--red-ink); font: 600 15px var(--f-body);
  text-decoration: none; cursor: pointer;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; width: 100%; min-height: 52px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font: 600 14px var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-danger { color: var(--danger); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Choix du trajet ---------- */
.route {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.route-end { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-width: 0; }
.route-end .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.route-end select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink);
  font: 700 clamp(16px, 4.6vw, 20px)/1.2 var(--f-display); padding: 0; width: 100%; cursor: pointer;
  text-overflow: ellipsis;
}
.route-end .iata { font: 500 13px var(--f-mono); color: var(--red); letter-spacing: .06em; }
.swap { display: grid; place-items: center; width: 44px; border-inline: 1.5px dashed var(--line); color: var(--muted); }
.swap svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.swap:hover { color: var(--red); }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; text-decoration: none; }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Cartes d'annonce (billet avec talon) ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card {
  display: grid; grid-template-columns: 76px 1fr; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card:hover { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; border-right: 1.5px dashed var(--line); }
.stub .day { font: 700 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.stub .month { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; min-width: 0; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.iata-pair { font: 500 12px var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.who { font-weight: 600; }
.excerpt { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta b { color: var(--ink); font-weight: 600; }

.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.tag-trip { background: var(--sun-soft); color: var(--ink); }
.tag-parcel { border: 1px solid var(--red); color: var(--red); }
.tag-done { background: var(--ok-soft); color: var(--ok); }
.tag-removed { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }

.empty { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty strong { font: 700 17px/1.3 var(--f-display); text-wrap: balance; }
.empty p { margin: 0; color: var(--muted); max-width: 44ch; overflow-wrap: anywhere; }

.rules-teaser, .rules-box { background: var(--sun-soft); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.rules-teaser p { margin: 0; font-size: 14px; }
.rules-teaser a { font-weight: 600; font-size: 14px; }
.rules-box h2 { font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.rules-box ul { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.rules-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Détail d'une annonce ---------- */
.back { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.detail-tags { display: flex; gap: 6px; }
.detail-route { font: 700 clamp(22px, 6vw, 30px)/1.15 var(--f-display); margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; letter-spacing: -.01em; }
.detail-route .arrow { color: var(--red); }
.detail-date { margin: 0; font-weight: 600; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.facts div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-desc { margin: 0; overflow-wrap: anywhere; }
.person { display: flex; gap: 12px; align-items: center; }
.person small { display: block; color: var(--muted); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #1d1a17; font: 700 17px var(--f-display); flex: none; }
.contact { display: flex; flex-direction: column; gap: 10px; }
.phone { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.phone code { font: 500 15px var(--f-mono); user-select: all; }

.report summary, .danger summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.report form, .danger form { margin-top: 12px; }
.danger { border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Formulaires ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > p { margin: 0; }
.grid2, .grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 16px var(--f-body);
}
textarea { resize: vertical; min-height: 96px; }
.field-error { color: var(--danger); font-size: 14px; margin: 0; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--red); }
.kinds { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.kind-option { position: relative; display: flex; }
.kind-option input { position: absolute; opacity: 0; }
.kind-option span { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.kind-option input:checked + span { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.kind-option input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }

/* ---------- Mes annonces ---------- */
.mine-item { display: flex; flex-direction: column; gap: 6px; }
.mine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 0 4px; }
.mine-actions form { margin: 0; }
.finish { flex-basis: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.finish p { margin: 0 0 8px; font-weight: 600; }
.status { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--line); color: var(--ink); }
.status-active { background: var(--ok-soft); color: var(--ok); }
.status-removed { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }

/* ---------- Pages de texte ---------- */
.prose { max-width: 65ch; }
.prose h2 { font: 700 16px var(--f-display); margin: 22px 0 6px; }
.prose p, .prose li { color: var(--ink); }

/* ---------- Pied de page ---------- */
.foot { max-width: 720px; margin: 0 auto; padding: 8px 16px 28px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.is-admin .foot { max-width: 1100px; }

/* ---------- Invitation à installer (iPhone) ---------- */
.install {
  position: fixed; left: 12px; right: 12px; z-index: 25;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 10px);
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  background: var(--ink); color: var(--bg); padding: 14px 16px; border-radius: 14px;
}
.install p { margin: 2px 0 0; font-size: 14px; }
.install .link { color: var(--bg); }

/* ---------- Administration ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-nav a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.admin-nav a.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stats .num { font: 700 28px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.stats .lbl { font-weight: 600; }
.stats small { color: var(--muted); }
.stats .is-alert { border-color: var(--red); }
.stats .is-alert .num { color: var(--red); }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.admin-list p { margin: 0; overflow-wrap: anywhere; }
.admin-row-head { display: flex; justify-content: space-between; gap: 10px; }
.quote { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); }
.admin-list form { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td form { margin: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
tr.is-blocked td { opacity: .55; }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; }
.inline select { min-height: 34px; padding: 4px 8px; font-size: 14px; width: auto; }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: border-color .15s; }
}

/* ---------- Admin : visites ---------- */
.daychart { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.daybar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.daybar span { display: block; width: 100%; min-height: 2px; background: var(--red); border-radius: 3px 3px 0 0; }
.daychart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -8px; }
.bars { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; align-items: center; gap: 10px; font-size: 14px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); }
.bar-num { text-align: right; font-variant-numeric: tabular-nums; }
.small { font-size: 13px; }
