/* Prixe — feuille de style de l'application et de l'administration. */

:root {
  --brand: #d6336c;
  --brand-dark: #b02a5b;
  --brand-soft: #fdeaf1;
  --accent: #ff8a3d;
  --ink: #101a33;
  --muted: #6b7590;
  --line: #e2e7f3;
  --bg: #f4f6fc;
  --card: #ffffff;
  --ok: #178a53;
  --warn: #b9760c;
  --danger: #c62b3d;
  --admin: #12203a;
  --admin-soft: #1d3055;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(16, 26, 51, 0.08);
  --shadow-sm: 0 4px 14px rgba(16, 26, 51, 0.06);
  --tabbar: 66px;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 22px);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 8px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 15.5px; }
h4 { font-size: 14px; }

p { margin: 0 0 10px; }

a {
  color: var(--brand);
  text-decoration: none;
}

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

.ico {
  flex: none;
}

.muted {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}

.link {
  color: var(--brand);
  font-weight: 600;
  font-size: 13.5px;
}

.link-muted {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
}

/* --------------------------------------------------------------- structure */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar-admin {
  background: var(--admin);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.topbar-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
}

.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-logo {
  background: transparent;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar-brand strong {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-brand small {
  font-size: 12px;
  color: var(--muted);
}

.topbar-admin .topbar-brand small {
  color: rgba(255, 255, 255, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: rgba(214, 51, 108, 0.08);
}

.topbar-admin .icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.icon-btn-primary {
  background: var(--brand);
  color: #fff;
}

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

.content {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 0 8px;
}

.block {
  padding: 14px 16px 4px;
  max-width: 920px;
  margin: 0 auto;
}

.block + .block {
  padding-top: 6px;
}

.page-head {
  margin-bottom: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.sub-title {
  margin: 18px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.block-head h2 {
  margin: 0;
}

/* ------------------------------------------------------------- barre du bas */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 6px);
  box-shadow: 0 -6px 18px rgba(16, 26, 51, 0.06);
}

.tabbar-admin {
  background: var(--admin);
  border-top-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.25);
}

.tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.16s ease, background 0.16s ease;
}

.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar-admin .tab {
  color: rgba(255, 255, 255, 0.62);
}

.tab.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.tabbar-admin .tab.is-active {
  color: #fff;
  background: var(--admin-soft);
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 26, 51, 0.25) 0%, rgba(16, 26, 51, 0.86) 78%);
}

.hero-body {
  position: relative;
  padding: 26px 20px 26px;
  color: #fff;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.hero-body h1 {
  font-size: 30px;
  margin: 10px 0 8px;
}

.pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-text {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
}

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

/* ----------------------------------------------------------------- boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

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

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  color: var(--danger);
}

.btn-ghost.btn-danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 11px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* -------------------------------------------------------------- statistiques */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- cartes */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--brand-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 14px 16px 16px;
}

.card-body h3 {
  margin: 8px 0 6px;
}

.card-body p {
  margin: 0 0 12px;
  color: #3d4763;
  font-size: 14px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-weight: 750;
  color: var(--brand);
  font-size: 15px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.who {
  font-weight: 600;
  color: var(--ink);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.author-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.author-line .when {
  margin-left: auto;
}

/* ------------------------------------------------------------------ listes */

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}

.row-link {
  color: inherit;
  transition: border-color 0.16s ease, transform 0.12s ease;
}

.row-link:hover {
  border-color: var(--brand);
}

.row-btn {
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.row-pinned {
  border-left: 4px solid var(--accent);
}

.row-muted {
  background: #fbfcfe;
}

.row-side {
  flex: none;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-main h3 {
  margin: 6px 0 4px;
}

.row-excerpt {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: #4a5470;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-meta {
  font-size: 12px;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.count {
  flex: none;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
}

/* ------------------------------------------------------------------ avatar */

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 56px; height: 56px; font-size: 18px; }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; }

.avatar-initials {
  background: var(--brand-soft);
  color: var(--brand);
}

/* -------------------------------------------------------------------- tags */

.chip {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip-soft {
  background: #eef1f7;
  color: #55607a;
}

.chip-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: #4a5470;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.chip-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.badge-ok { background: #e3f5ea; color: var(--ok); }
.badge-warn { background: #fdf0dc; color: var(--warn); }
.badge-info { background: var(--brand-soft); color: var(--brand); }
.badge-muted { background: #eef1f7; color: #55607a; }

/* --------------------------------------------------------- recherche / seg */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  color: var(--muted);
}

.search-bar input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  background: transparent;
  color: var(--ink);
}

.segmented {
  display: flex;
  gap: 6px;
  background: #e9edf8;
  border-radius: 14px;
  padding: 5px;
  margin-top: 12px;
  overflow-x: auto;
}

.seg {
  flex: 1;
  min-width: max-content;
  border: none;
  background: transparent;
  color: #4a5470;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.seg.is-active {
  background: var(--card);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------- formulaires */

.field {
  display: block;
  margin-bottom: 12px;
}

.field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: #46506b;
  margin-bottom: 6px;
}

.field > span em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  padding: 12px 13px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(214, 51, 108, 0.14);
}

.field textarea {
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.form-error {
  background: #fdecee;
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 0 0 12px;
}

.notice {
  background: #fdf0dc;
  color: var(--warn);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
}

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

/* --------------------------------------------------------------------- chat */

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  height: min(58vh, 460px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.bubble {
  max-width: 84%;
  background: #eef1f7;
  border-radius: 16px 16px 16px 6px;
  padding: 9px 12px;
}

.bubble-mine {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-radius: 16px 16px 6px 16px;
}

.bubble p {
  margin: 0;
  font-size: 14.5px;
  word-break: break-word;
}

.bubble-who {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 2px;
}

.bubble-time {
  display: block;
  text-align: right;
  font-size: 10.5px;
  opacity: 0.7;
  margin-top: 2px;
}

.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

.chat-form input:focus {
  border-color: var(--brand);
}

.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.thread-who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thread-who strong {
  display: block;
  font-size: 14.5px;
}

/* ------------------------------------------------------------------ voisins */

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, transform 0.12s ease;
}

.person:hover {
  border-color: var(--brand);
}

.person-static {
  cursor: default;
}

.person-name {
  font-size: 13.5px;
  font-weight: 650;
}

.person-app {
  font-size: 12px;
  color: var(--muted);
}

.person-sub {
  font-size: 11px;
  color: var(--muted);
}

.mini-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}

.mini-card img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.mini-card strong {
  display: block;
  font-size: 13.5px;
}

/* ------------------------------------------------------------------- profil */

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.profile-photo img,
.profile-photo .avatar-initials {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-id { min-width: 0; }
.profile-id h1 {
  margin: 0 0 4px;
  font-size: 21px;
}

.fiche-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.fiche-top h3 {
  margin: 0 0 2px;
}

.fiche-bio {
  font-size: 14px;
  color: #3d4763;
}

.fiche-infos {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fiche-infos li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
}

.fiche-infos span {
  color: var(--muted);
}

/* ------------------------------------------------------------------- forum */

.topic-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.topic-head h1 {
  margin: 10px 0 12px;
  font-size: 21px;
}

.topic-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.topic-author strong {
  display: block;
  font-size: 14px;
}

.topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.topic-body {
  font-size: 15px;
  color: #303a55;
  margin: 12px 0;
}

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

.replies-head h2 {
  margin: 18px 0 10px;
}

.replies {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply {
  display: flex;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.reply-body p {
  margin: 4px 0 0;
  font-size: 14.5px;
  color: #303a55;
}

.reply-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.reply-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

/* --------------------------------------------------------------------- fab */

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 42;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(214, 51, 108, 0.38);
  transition: transform 0.14s ease, background 0.16s ease;
}

.fab:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

/* ------------------------------------------------------------------ accueil */

.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.greeting-text { flex: 1; min-width: 0; }
.greeting-text h1 {
  margin: 2px 0 2px;
  font-size: 21px;
}

.greeting-avatar {
  flex: none;
}

.greeting-avatar img,
.greeting-avatar .avatar-initials {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.alert-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff5e9;
  border: 1px solid #ffd9b0;
  color: #8a4b06;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
}

.alert-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--brand);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, transform 0.12s ease;
}

.quick:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.quick span {
  color: var(--ink);
}

/* ---------------------------------------------------------------- installation */

.install-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: linear-gradient(135deg, #d6336c 0%, #8e2149 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.install-card h2 {
  color: #fff;
  margin-bottom: 6px;
}

.install-card p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  margin: 0 0 12px;
  max-width: 520px;
}

.install-card .btn-primary {
  background: #fff;
  color: var(--brand);
}

.install-card .btn-primary:hover {
  background: #eef1fd;
}

.install-text {
  flex: 1 1 260px;
}

.install-logos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.install-card-compact {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}

.install-card-compact h2 {
  color: var(--ink);
}

.install-card-compact p {
  color: var(--muted);
}

.steps {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 14px;
  color: #303a55;
}

.steps li {
  margin-bottom: 6px;
}

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

.store-logos .store-badge {
  border-color: var(--line);
  color: var(--muted);
}

.legal-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------------------------------------------- connexion */

.auth-hero {
  position: relative;
  height: 170px;
  overflow: hidden;
}

.auth-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-block {
  margin-top: -34px;
  position: relative;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 12px 0 6px;
  font-size: 21px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 700;
}

.brand-chip-dark {
  background: #e6eaf4;
  color: var(--admin);
}

.auth-alt {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.auth-admin {
  margin: 6px 0 0;
  text-align: center;
}

.admin-auth {
  border-top: 4px solid var(--admin);
}

/* ---------------------------------------------------------- administration */

.page-admin {
  background: #f2f4f9;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
}

.bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 170px;
  padding-top: 8px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}

.bar {
  width: 100%;
  max-width: 44px;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #e0559b 0%, #d6336c 100%);
  min-height: 6px;
}

.bar-value {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
}

.bar-label {
  font-size: 11px;
  color: var(--muted);
}

/* --------------------------------------------------------------- squelettes */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eef1f8;
  min-height: 68px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  animation: brillance 1.3s infinite;
}

.skeleton-row {
  height: 84px;
  border-radius: var(--radius-sm);
  background: #eef1f8;
  position: relative;
  overflow: hidden;
}

.skeleton-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  animation: brillance 1.3s infinite;
}

.skeleton-card {
  height: 220px;
}

@keyframes brillance {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* -------------------------------------------------------------------- toasts */

.toast-zone {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 460px);
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: apparition 0.24s ease;
}

.toast-success { background: #146c46; }
.toast-error { background: #a51f30; }

.toast-out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* ------------------------------------------------------------------ modales */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 17, 33, 0.55);
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
  box-shadow: 0 -12px 40px rgba(11, 17, 33, 0.25);
  animation: monter 0.24s ease;
}

@keyframes monter {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-form .field:last-of-type {
  margin-bottom: 14px;
}

.confirm-text {
  font-size: 14.5px;
  color: #303a55;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.confirm-actions .btn {
  flex: 1 1 140px;
}

/* ------------------------------------------------------------- responsive */

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .modal-layer {
    align-items: center;
  }

  .modal {
    border-radius: 22px;
  }
}

@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .people-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .row-actions {
    flex-direction: row;
  }
}

@media (max-width: 400px) {
  .hero-body h1 {
    font-size: 26px;
  }

  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab span {
    font-size: 10px;
  }
}
