/* ApéroGO — feuille de style de l'application et de l'administration */

:root {
  --brand: #FF631A;
  --brand-dark: #D94E0B;
  --brand-light: #FF8A47;
  --accent: #FFB020;
  --accent-dark: #E09410;
  --ok: #2E7D54;
  --warn: #B7791F;
  --danger: #C0392B;
  --ink: #2A2320;
  --ink-soft: #6B5F5A;
  --ink-mute: #93867F;
  --line: #F0DCD0;
  --surface: #FFFFFF;
  --page: #FFF9F5;
  --page-2: #FFF0E7;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 4px 16px rgba(120, 45, 10, 0.07);
  --shadow-lg: 0 12px 32px rgba(120, 45, 10, 0.12);
  --nav-h: 66px;
  --admin: #A63D0A;
  --admin-dark: #7E2D05;
  --admin-page: #FFF7F2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.admin-body {
  background: var(--admin-page);
}

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

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

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

h1 {
  font-size: 26px;
}

h2 {
  font-size: 21px;
}

h3 {
  font-size: 17px;
}

p {
  margin: 0 0 10px;
}

/* Écran d'ouverture */
#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--page);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.admin-body #app-splash {
  background: var(--admin-page);
  color: var(--ink);
}

#app-splash img {
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#app-splash.show {
  display: flex;
  animation: splashOut 0.4s ease 1.2s forwards;
}

@keyframes splashOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Barre supérieure */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(255, 249, 245, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.admin-body .topbar {
  background: rgba(255, 247, 242, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
}

.brand-mark {
  border-radius: 10px;
  flex: none;
}

.brand-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 13px;
}

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

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.admin-body .btn-install {
  border-color: var(--admin);
  color: var(--admin);
}

.btn-install:active {
  transform: scale(0.97);
  background: rgba(255, 99, 26, 0.10);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.94);
  background: var(--page-2);
}

.avatar-btn {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brand);
  transition: transform 0.12s ease;
}

.avatar-btn:active {
  transform: scale(0.94);
}

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

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--brand);
  color: #2A1508;
  font-size: 14px;
  font-weight: 700;
}

/* Mise en page */
.page {
  padding: 14px 14px calc(var(--nav-h) + 34px);
  max-width: 100%;
}

.section {
  margin-bottom: 22px;
}

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

.section-title {
  margin: 0;
  font-size: 19px;
}

.section-sub {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.link-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  flex: none;
}

.admin-body .link-all {
  color: var(--admin);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

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

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

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

.admin-body .btn-primary {
  background: var(--admin);
  color: #FFFFFF;
}

.btn-accent {
  background: var(--accent);
  color: #3A2606;
}

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

.btn-soft {
  background: rgba(255, 99, 26, 0.12);
  color: var(--brand-dark);
  border-color: transparent;
}

.admin-body .btn-soft {
  background: rgba(166, 61, 10, 0.12);
  color: var(--admin);
}

.btn-danger {
  background: transparent;
  border-color: rgba(192, 57, 43, 0.4);
  color: var(--danger);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 9px 14px;
  font-size: 14px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Cartes */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  max-width: 100%;
}

.card.soft {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--page-2) 100%);
}

.card.tight {
  padding: 14px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 19px;
}

.card-subtitle {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 600;
}

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

.card-list {
  display: grid;
  gap: 12px;
}

/* Formulaires */
.form {
  display: grid;
  gap: 12px;
}

.form-row {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFDFB;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 99, 26, 0.16);
}

.admin-body .field input:focus,
.admin-body .field select:focus,
.admin-body .field textarea:focus {
  border-color: var(--admin);
  box-shadow: 0 0 0 3px rgba(166, 61, 10, 0.16);
}

.field-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.field-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.1);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
}

.form-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-mute);
}

.form-alt {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.form-alt a {
  font-weight: 600;
}

/* Pastilles, badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 99, 26, 0.16);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pill.accent {
  background: rgba(255, 176, 32, 0.22);
  color: #8A5A12;
}

.pill.light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-dark);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--page-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.badge-open {
  background: rgba(46, 125, 84, 0.14);
  color: var(--ok);
}

.badge-full {
  background: rgba(183, 121, 31, 0.16);
  color: var(--warn);
}

.badge-past {
  background: rgba(107, 95, 90, 0.14);
  color: var(--ink-soft);
}

.badge-cancel {
  background: rgba(192, 57, 43, 0.14);
  color: var(--danger);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  margin: 0 -14px;
  padding-left: 14px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #2A1508;
}

.admin-body .chip.active {
  background: var(--admin);
  border-color: var(--admin);
  color: #FFFFFF;
}

/* Hero */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(42, 35, 32, 0) 0%, rgba(74, 28, 4, 0.86) 72%);
  color: #FFFFFF;
}

.hero-content h1 {
  margin: 8px 0 6px;
  font-size: 27px;
  color: #FFFFFF;
}

.hero-content p {
  margin: 0;
  font-size: 14.5px;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.auth-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-hero.short .auth-hero-img {
  height: 170px;
}

.auth-hero-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.auth-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(180deg, rgba(42, 35, 32, 0) 0%, rgba(74, 28, 4, 0.88) 70%);
  color: #FFFFFF;
}

.auth-hero-overlay h1 {
  margin: 8px 0 4px;
  font-size: 24px;
  color: #FFFFFF;
}

.auth-hero-overlay p {
  margin: 0;
  font-size: 13.5px;
  opacity: 0.9;
}

/* Statistiques */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border-top: 4px solid var(--brand);
}

.stat-card.accent {
  border-top-color: var(--accent);
}

.stat-card.ok {
  border-top-color: var(--ok);
}

.stat-card.admin {
  border-top-color: var(--admin);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
}

.admin-body .stat-value {
  color: var(--admin);
}

.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--page);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.mini-item svg {
  color: var(--brand-dark);
  flex: none;
}

.admin-body .mini-item svg {
  color: var(--admin);
}

/* Listes d'éléments */
.item {
  display: grid;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
  transition: transform 0.12s ease;
}

.item:active {
  transform: scale(0.99);
}

.item-img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.item-title {
  margin: 0 0 2px;
  font-size: 17px;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.item-meta svg {
  color: var(--ink-mute);
}

.item-text {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

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

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--page-2);
}

.avatar.sm {
  width: 34px;
  height: 34px;
}

.avatar.lg {
  width: 84px;
  height: 84px;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #2A1508;
  font-weight: 700;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack img,
.avatar-stack .avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
}

.avatar-stack > *:first-child {
  margin-left: 0;
}

/* Notes */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--warn);
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--accent);
}

.stars svg {
  width: 14px;
  height: 14px;
}

.stars-input {
  display: flex;
  gap: 6px;
}

.stars-input button {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--line);
  transition: transform 0.12s ease;
}

.stars-input button.on {
  color: var(--accent);
}

.stars-input button:active {
  transform: scale(0.9);
}

/* Filtres */
.filters {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.search-row svg {
  color: var(--ink-mute);
  flex: none;
}

.search-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 10px 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}

.search-row input:focus {
  outline: none;
}

/* Résultats */
.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.empty {
  padding: 28px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.empty svg {
  color: var(--ink-mute);
  margin-bottom: 8px;
}

/* Onglets */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  border-radius: 999px;
  background: var(--page-2);
  margin-bottom: 14px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  padding: 9px 15px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.tab:active {
  transform: scale(0.96);
}

.tab.active {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: var(--shadow);
}

.admin-body .tab.active {
  color: var(--admin);
}

/* Progression */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--page-2);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
}

.admin-body .progress > span {
  background: var(--admin);
}

/* Navigation basse */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2px;
  padding: 8px 6px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 245, 240, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(240, 220, 208, 0.9);
}

.admin-body .bottom-nav {
  background: rgba(255, 247, 242, 0.86);
}

.nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 14px;
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 26px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item.active {
  color: var(--brand-dark);
}

.nav-item.active .nav-icon {
  background: rgba(255, 99, 26, 0.16);
  color: var(--brand-dark);
}

.admin-body .nav-item.active {
  color: var(--admin);
}

.admin-body .nav-item.active .nav-icon {
  background: rgba(166, 61, 10, 0.18);
  color: var(--admin);
}

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

/* Notifications */
.toast-stack {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + 16px);
  z-index: 200;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(42, 35, 32, 0.94);
  color: #FFFFFF;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
}

.toast.success {
  background: rgba(46, 125, 84, 0.96);
}

.toast.error {
  background: rgba(192, 57, 43, 0.96);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Fenêtre modale */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 20, 18, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.modal-card h2 {
  padding-right: 44px;
}

/* Chargement */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, #FFE9DC 25%, #FFF6F0 37%, #FFE9DC 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  height: 96px;
  margin-bottom: 12px;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}

/* Formules d'abonnement */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  border-top: 4px solid var(--brand);
}

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

.plan-name {
  margin: 0;
  font-size: 19px;
}

.plan-price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
  display: flex;
  flex-direction: column;
}

.plan-price small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0;
}

.plan-desc {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.plan-features {
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-features li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  flex: none;
}

.plan-card .btn-block {
  margin-top: auto;
}

/* Administration : tableaux et lignes */
.admin-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-count {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.admin-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}

.admin-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-item-title {
  margin: 0;
  font-size: 16px;
}

.admin-item-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.admin-item-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 8px 0 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.admin-item-grid b {
  color: var(--ink);
  font-weight: 600;
}

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

.bar-chart {
  display: grid;
  gap: 8px;
}

.bar-chart-row {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.bar-chart-track {
  height: 10px;
  border-radius: 999px;
  background: var(--page-2);
  overflow: hidden;
}

.bar-chart-track > span {
  display: block;
  height: 100%;
  background: var(--admin);
  border-radius: 999px;
}

/* Page verrou mot de passe */
.lock-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 20px;
  text-align: center;
}

.lock-card .lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(166, 61, 10, 0.14);
  color: var(--admin);
  margin-bottom: 12px;
}

/* Pied de page */
.page-footer {
  padding: 20px 14px calc(var(--nav-h) + 30px);
  text-align: center;
  color: var(--ink-mute);
  font-size: 12.5px;
}

.page-footer a {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ≥ 768px — tablettes et ordinateurs */
@media (min-width: 768px) {
  .page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 24px calc(var(--nav-h) + 46px);
  }

  .page-footer {
    padding: 24px;
    padding-bottom: calc(var(--nav-h) + 40px);
  }

  h1 {
    font-size: 32px;
  }

  .hero-img {
    height: 340px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

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

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

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

  .filters {
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
  }

  .item {
    grid-template-columns: 200px 1fr;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }

  .item-img {
    height: 100%;
    min-height: 148px;
  }

  .card {
    padding: 22px;
  }

  .chips {
    margin: 0;
    padding-left: 0;
    flex-wrap: wrap;
    overflow: visible;
  }

  .bottom-nav {
    max-width: 620px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    border-radius: 22px;
    border: 1px solid rgba(240, 220, 208, 0.9);
    box-shadow: var(--shadow-lg);
  }

  .admin-item-grid {
    grid-template-columns: 1fr 1fr;
  }

  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    align-items: start;
  }

  .admin-toolbar {
    grid-template-columns: 2fr 1fr auto;
    align-items: center;
  }

  .admin-actions {
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .item {
    grid-template-columns: 220px 1fr;
  }
}

@media print {
  .topbar,
  .bottom-nav,
  .toast-stack {
    display: none !important;
  }
}
