@import url("responsive-guard.css");

/* Dashboard AfricaMenu (mobile-first) — aligné maquette SaaS */

:root {
  --dash-bg: #fafafa;
  --dash-page: #ffffff;
  --dash-card: #ffffff;
  --dash-text: #000000;
  --dash-muted: #757575;
  --dash-accent: #ff6b00;
  --dash-accent-soft: #fff0e6;
  --dash-dark: #000000;
  --dash-input-bg: #f4f4f5;
  --dash-icon-purple-bg: #e8eaf6;
  --dash-icon-orange-bg: #fff3e6;
  --dash-radius-card: 1.25rem;
  --dash-radius-sm: 0.75rem;
  --dash-shadow-card:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 18px rgba(0, 0, 0, 0.06);
  --dash-shadow-card-hover:
    0 8px 28px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  --dash-shadow-btn: 0 2px 8px rgba(0, 0, 0, 0.08);
  --dash-transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --dash-link-icon: #ffb020;
  /* Drawer */
  --drawer-width: 17.5rem;
  --drawer-surface: #dedede;
  --drawer-text: #111111;
  --drawer-radius: 0.75rem;
  --font-sans:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

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

body.dashboard-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: clip;
  background: var(--dash-page);
  color: var(--dash-text);
  font-family: var(--font-sans);
}

.dashboard-main {
  width: 100%;
  max-width: 30rem;
  min-width: 0;
  margin: 0 auto;
  overflow-x: clip;
  padding: 1.25rem 1.1rem max(1.75rem, env(safe-area-inset-bottom, 0px));
}

/* Entete principal du dashboard */
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.dash-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.dash-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  background: transparent;
}

.dash-brand__logo img {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* Glyphe blanc type fourchette / couteau (placeholder CSS) */
.dash-brand__logo-glyph {
  display: block;
  width: 0.65rem;
  height: 0.85rem;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-radius: 0 0 3px 3px;
  position: relative;
}

.dash-brand__logo-glyph::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 0;
  width: 2px;
  height: 100%;
  background: #fff;
  border-radius: 1px;
}

.dash-brand__name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dash-text);
}

.dash-menu-btn {
  position: relative;
  width: 2.85rem;
  height: 2.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: var(--dash-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    background var(--dash-transition),
    border-color var(--dash-transition),
    box-shadow var(--dash-transition),
    transform 0.18s ease;
}

.dash-menu-btn:hover {
  background: #fffaf6;
  border-color: rgba(255, 107, 0, 0.28);
  box-shadow:
    0 4px 14px rgba(255, 107, 0, 0.14),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-menu-btn:active {
  transform: scale(0.96);
}

.dash-menu-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-menu-btn.is-active,
.dash-menu-btn[aria-expanded="true"] {
  background: var(--dash-accent-soft);
  border-color: rgba(255, 107, 0, 0.35);
  box-shadow:
    0 4px 16px rgba(255, 107, 0, 0.18),
    inset 0 0 0 1px rgba(255, 107, 0, 0.08);
}

/* Hamburger animé → croix à l’ouverture */
.dash-menu-bars {
  position: relative;
  display: block;
  width: 1.125rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    background 0.22s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-menu-bars::before,
.dash-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.22s ease;
}

.dash-menu-bars::before {
  top: -6px;
}

.dash-menu-bars::after {
  top: 6px;
  width: 78%;
}

.dash-menu-btn:hover .dash-menu-bars::after {
  width: 100%;
}

.dash-menu-btn.is-active .dash-menu-bars,
.dash-menu-btn[aria-expanded="true"] .dash-menu-bars {
  background: transparent;
}

.dash-menu-btn.is-active .dash-menu-bars::before,
.dash-menu-btn[aria-expanded="true"] .dash-menu-bars::before {
  top: 0;
  width: 100%;
  transform: rotate(45deg);
}

.dash-menu-btn.is-active .dash-menu-bars::after,
.dash-menu-btn[aria-expanded="true"] .dash-menu-bars::after {
  top: 0;
  width: 100%;
  transform: rotate(-45deg);
}

.dash-hero {
  margin-top: 1.15rem;
}

.dash-hero__cta {
  display: none;
}

.dash-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    border-color var(--dash-transition);
}

.dash-hero-btn--primary {
  color: #fff;
  background: linear-gradient(145deg, #ff8f40 0%, var(--dash-accent) 100%);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.32);
}

.dash-hero-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.38);
}

.dash-hero-btn--ghost {
  color: var(--dash-text);
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--dash-shadow-btn);
}

.dash-hero-btn--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 0, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.dash-hero-btn:active {
  transform: translateY(0);
}

.dash-hero-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-hero-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Hero réutilisable — Mes plats, Catégories, QR, Paramètres, Abonnement */
.dash-page-hero {
  margin-top: 1.15rem;
}

.dash-page-hero .dash-hero__text {
  min-width: 0;
}

.dash-page-hero .dash-hero__cta {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
}

.dash-page-hero .dash-hero__cta .plats-add-btn,
.dash-page-hero .dash-hero__cta .cats-add-btn {
  margin-top: 0;
}

.dash-page-hero--actions-desktop .dash-hero__cta {
  display: none;
}

.dash-title {
  margin: 0;
  font-size: clamp(1.35rem, 4.8vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dash-text);
}

.dash-subtitle {
  margin: 0.5rem 0 0;
  color: var(--dash-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.dash-board {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-stat-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
}

.dash-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dash-text);
}

.dash-panel {
  margin: 0;
}

.dash-card-desc {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--dash-muted);
}

.dash-quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.dash-quick-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    border-color var(--dash-transition);
}

.dash-quick-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--dash-shadow-card-hover);
  border-color: rgba(255, 107, 0, 0.18);
}

.dash-quick-tile:active {
  transform: translateY(0);
}

.dash-quick-tile:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-quick-tile__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.dash-quick-tile__icon--accent {
  background: linear-gradient(145deg, #ff8f40 0%, var(--dash-accent) 100%);
}

.dash-quick-tile__icon--dark {
  background: linear-gradient(145deg, #3d3d3d 0%, #111 100%);
}

.dash-quick-tile__icon--qr {
  background: var(--dash-accent-soft);
}

.dash-quick-tile__icon--qr img {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.dash-quick-tile__icon--menu {
  background: linear-gradient(145deg, #374151 0%, #111827 100%);
  font-size: 0.95rem;
}

.dash-quick-tile__label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.dash-quick-grid--duo {
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .dash-quick-grid--duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-share-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-card--stat-muted .dash-value {
  color: var(--dash-muted);
  font-size: 1.2rem;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-board > * {
  animation: dashFadeUp 0.55s var(--dash-transition) both;
}

.dash-board > *:nth-child(1) {
  animation-delay: 0.04s;
}

.dash-board > *:nth-child(2) {
  animation-delay: 0.08s;
}

.dash-board > *:nth-child(3) {
  animation-delay: 0.12s;
}

/* Cartes blanches — ombre douce, arrondis premium */
.dash-card {
  background: var(--dash-card);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--dash-radius-card);
  padding: 0.95rem 1rem;
  box-shadow: var(--dash-shadow-card);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    border-color var(--dash-transition);
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--dash-shadow-card-hover);
  border-color: rgba(0, 0, 0, 0.06);
}

.dash-card--stat {
  padding: 0.85rem 0.95rem;
}

.dash-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dash-stat-copy {
  min-width: 0;
}

/* Tuiles d’icônes stats (placeholders remplaçables) */
.dash-icon-tile {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dash-transition);
}

.dash-card--stat:hover .dash-icon-tile {
  transform: scale(1.04);
}

.dash-icon-tile--purple {
  background: var(--dash-icon-purple-bg);
}

.dash-icon-tile--orange {
  background: var(--dash-icon-orange-bg);
}

.dash-icon-tile--blue {
  background: #e8f4fd;
}

.dash-icon-tile--green {
  background: #e8f8ef;
}

.dash-icon-tile img {
  display: block;
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dash-icon-tile__ph {
  display: block;
  opacity: 0.55;
}

/* Liste / puces (placeholder) */
.dash-icon-tile__ph--list {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #5c6bc0;
  box-shadow:
    0 0.45rem 0 0 #5c6bc0,
    0 0.9rem 0 0 #5c6bc0;
}

/* Assiette / plat (placeholder cercle) */
.dash-icon-tile__ph--meal {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #e65100;
  border-radius: 50%;
}

.dash-label {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dash-muted);
}

.dash-value {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 800;
  color: var(--dash-text);
}

/* Carte actions : deux lignes type « chip » modernes */
.dash-card--actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem;
}

.dash-action {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0.9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    border-color 0.2s ease,
    background 0.2s ease;
}

/* 1re action : teinte orange très légère */
.dash-card--actions > .dash-action:first-of-type {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, #ffffff 55%, #fafafa 100%);
  border-color: rgba(255, 107, 0, 0.14);
}

.dash-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Survol : ombre légèrement teintée orange sur « Ajouter un plat » */
.dash-card--actions > .dash-action:first-of-type:hover {
  border-color: rgba(255, 107, 0, 0.28);
  box-shadow:
    0 6px 22px rgba(255, 107, 0, 0.16),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

.dash-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition-duration: 0.1s;
}

.dash-action:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-action__disc {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  transition: transform var(--dash-transition);
}

.dash-action:hover .dash-action__disc {
  transform: scale(1.06);
}

.dash-action:active .dash-action__disc {
  transform: scale(1);
}

.dash-action__disc--accent {
  background: linear-gradient(145deg, #ff8f40 0%, #ff6b00 45%, #e85d00 100%);
  box-shadow:
    0 4px 14px rgba(255, 107, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.dash-action__disc--dark {
  background: linear-gradient(145deg, #3d3d3d 0%, #1a1a1a 55%, #000000 100%);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dash-action__label {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--dash-text);
}

.dash-action__label--accent {
  color: #e65f00;
}

.dash-action-divider {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .dash-menu-btn,
  .dash-menu-bars,
  .dash-menu-bars::before,
  .dash-menu-bars::after,
  .dash-drawer-close {
    transition-duration: 0.01ms;
  }

  .dash-menu-btn.is-active .dash-menu-bars::before,
  .dash-menu-btn.is-active .dash-menu-bars::after,
  .dash-menu-btn[aria-expanded="true"] .dash-menu-bars::before,
  .dash-menu-btn[aria-expanded="true"] .dash-menu-bars::after {
    transform: none;
  }

  .dash-grid > * {
    animation: none;
  }

  .dash-board > * {
    animation: none;
  }

  .dash-card,
  .dash-card:hover,
  .dash-qr-card,
  .dash-qr-card:hover {
    transform: none;
  }

  .dash-card--stat:hover .dash-icon-tile,
  .dash-copy-btn:hover,
  .dash-link-btn:hover,
  .dash-qr-btn:hover {
    transform: none;
  }

  .dash-copy-btn,
  .dash-link-btn,
  .dash-qr-btn {
    transition-duration: 0.01ms;
  }

  .dash-action,
  .dash-action__disc,
  .dash-quick-tile,
  .dash-hero-btn {
    transition-duration: 0.01ms;
  }

  .dash-action:hover,
  .dash-action:active,
  .dash-quick-tile:hover,
  .dash-quick-tile:active,
  .dash-hero-btn:hover,
  .dash-hero-btn:active {
    transform: none;
  }

  .dash-action:hover .dash-action__disc,
  .dash-action:active .dash-action__disc {
    transform: none;
  }
}

.dash-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dash-text);
}

.dash-link-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-top: 0.75rem;
}

.dash-link-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--dash-radius-sm);
  padding: 0.72rem 0.85rem;
  background: var(--dash-input-bg);
  color: var(--dash-text);
  font-size: 0.875rem;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.dash-link-input::placeholder {
  color: #9e9e9e;
}

.dash-link-input:focus {
  outline: none;
  border-color: rgba(255, 107, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
  background: #fff;
}

.dash-copy-btn {
  flex-shrink: 0;
  min-width: 5.25rem;
  min-height: 2.65rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 107, 0, 0.22);
  border-radius: var(--dash-radius-sm);
  background: linear-gradient(180deg, #fff8f3 0%, var(--dash-accent-soft) 100%);
  color: var(--dash-accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--dash-shadow-btn);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    background var(--dash-transition),
    border-color var(--dash-transition);
}

.dash-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.18);
  border-color: rgba(255, 107, 0, 0.35);
  background: linear-gradient(180deg, #fff 0%, #ffe8d6 100%);
}

.dash-copy-btn:active {
  transform: translateY(0);
}

.dash-copy-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-copy-btn.is-done {
  background: linear-gradient(180deg, #f1fbf3 0%, #e8f5e9 100%);
  border-color: #2e7d32;
  color: #2e7d32;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
}

.dash-copy-feedback {
  margin: 0.4rem 0 0;
  color: #2e7d32;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}

.dash-copy-feedback.is-error {
  color: #b00020;
}

/* Bouton noir premium + icône « lien externe » */
.dash-link-btn {
  position: relative;
  margin-top: 0.75rem;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 2.75rem 0.6rem 1rem;
  border-radius: var(--dash-radius-sm);
  background: linear-gradient(180deg, #2a2a2a 0%, var(--dash-dark) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: var(--dash-shadow-btn);
  transition:
    background var(--dash-transition),
    transform var(--dash-transition),
    box-shadow var(--dash-transition);
}

.dash-link-btn:hover {
  background: linear-gradient(180deg, #3a3a3a 0%, #141414 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.dash-link-btn:active {
  transform: scale(0.99);
}

.dash-link-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.dash-link-btn__icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--dash-link-icon);
  border-radius: 3px;
  box-sizing: border-box;
}

.dash-link-btn__icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--dash-link-icon);
  border-right: 2px solid var(--dash-link-icon);
}

/* Même style que le lien, en <button> (ex. « Voir le menu » + redirection JS) */
button.dash-link-btn {
  border: none;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}

/* Bloc QR — gradient orange premium + aperçu */
.dash-qr-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff8a26 0%, var(--dash-accent) 48%, #e85d00 100%);
  color: #fff;
  border-radius: var(--dash-radius-card);
  padding: 0;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 20px rgba(255, 107, 0, 0.28),
    0 1px 3px rgba(0, 0, 0, 0.06);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition);
}

.dash-qr-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.08) 0%, transparent 38%);
  pointer-events: none;
}

.dash-qr-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 32px rgba(255, 107, 0, 0.32),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.dash-qr-card__layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 1.05rem;
}

.dash-qr-card__body {
  flex: 1;
  min-width: 0;
}

.dash-qr-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.55rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dash-qr-card__icon img {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.dash-qr-title {
  margin: 0;
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-qr-text {
  margin: 0.45rem 0 0;
  max-width: none;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.dash-qr-preview {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

#dashboard-qr-preview {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.35rem;
}

.dash-qr-btn {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--dash-radius-sm);
  background: #fff;
  padding: 0.62rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition:
    box-shadow var(--dash-transition),
    transform var(--dash-transition);
}

a.dash-qr-btn {
  text-decoration: none;
  box-sizing: border-box;
}

.dash-qr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.dash-qr-btn:active {
  transform: scale(0.99);
}

.dash-qr-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.dash-qr-btn > img {
  display: block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

/* Icône QR placeholder (grille simplifiée) */
.dash-qr-btn__icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  background:
    linear-gradient(#ff6b00, #ff6b00) 0 0 / 40% 40% no-repeat,
    linear-gradient(#ff6b00, #ff6b00) 60% 0 / 40% 40% no-repeat,
    linear-gradient(#ff6b00, #ff6b00) 0 60% / 40% 40% no-repeat,
    linear-gradient(#ff6b00, #ff6b00) 60% 60% / 40% 40% no-repeat;
  opacity: 0.85;
}

.dash-qr-btn__label {
  color: var(--dash-accent);
}

/* ------------------------------------------------------------------
   Drawer mobile (off-canvas) — overlay + panneau ~280px + fermeture
   ------------------------------------------------------------------ */

/* Voile derrière le contenu */
.dash-overlay {
  position: fixed;
  inset: 0;
  /* Voile grisé derrière le panneau */
  background: rgba(0, 0, 0, 0.28);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.dash-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Bouton fermeture drawer — conservé pour accessibilité, masqué (fermeture via burger ×) */
.dash-drawer-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 60;
  width: 2.85rem;
  height: 2.85rem;
  border: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* Panneau latéral */
.dash-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--drawer-width);
  max-width: min(86vw, var(--drawer-width));
  background: var(--drawer-surface);
  border-radius: 0 var(--drawer-radius) var(--drawer-radius) 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem max(1.25rem, env(safe-area-inset-bottom, 0px)) 1rem;
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.dash-drawer.is-open {
  transform: translateX(0);
}

/* Header drawer */
.dash-drawer__header {
  padding-bottom: 0.5rem;
}

.dash-drawer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo AfricaMenu dans le menu latéral */
.dash-drawer__logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  background: transparent;
}

.dash-drawer__logo img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.dash-drawer__brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--drawer-text);
}

/* Navigation */
.dash-drawer__nav {
  flex: 1;
  margin-top: 1.25rem;
  min-height: 0;
}

.dash-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dash-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--drawer-radius);
  text-decoration: none;
  color: var(--drawer-text);
  font-size: 1rem;
  font-weight: 500;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.dash-drawer__link:hover {
  background: rgba(255, 255, 255, 0.45);
}

.dash-drawer__link:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

/* Lien actif (tableau de bord) */
.dash-drawer__link.is-active {
  background: var(--dash-accent-soft);
  color: var(--dash-accent);
}

/* Icônes menu : zone fixe + centrage (img ou placeholder) */
.dash-drawer__ico {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.dash-drawer__ico img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}

/* Fond discret seulement quand pas d’image (évite un cadre derrière le PNG) */
.dash-drawer__ico:has(img) {
  background: transparent;
}

.dash-drawer__link.is-active .dash-drawer__ico {
  background: rgba(255, 107, 0, 0.22);
}

.dash-drawer__link.is-active .dash-drawer__ico:has(img) {
  background: transparent;
}

.dash-drawer__label {
  line-height: 1.2;
}

/* Pied du drawer */
.dash-drawer__footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

.dash-drawer__resto {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--drawer-text);
}

.dash-drawer__email {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: #555;
}

.dash-drawer__logout {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dash-accent);
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.35rem;
}

.dash-drawer__logout:hover {
  text-decoration: underline;
}

.dash-drawer__logout:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 3px;
}

.dash-drawer__ico--logout {
  width: 1.35rem;
  height: 1.35rem;
  background: rgba(255, 107, 0, 0.22);
}

.dash-drawer__ico--logout img {
  width: 1rem;
  height: 1rem;
  max-width: 85%;
  max-height: 85%;
}

/* ------------------------------------------------------------------
   Pages sous-app : Mes plats, Catégories (même squelette UI)
   ------------------------------------------------------------------ */

.plats-page-head,
.cats-page-head {
  margin-top: 1.5rem;
}

.plats-page-title,
.cats-page-title {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--dash-text);
}

/* Maquette catégories : titre tout en minuscules */
.cats-page-title {
  text-transform: lowercase;
}

.plats-page-sub,
.cats-page-sub {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: var(--dash-muted);
  line-height: 1.45;
}

.qr-phone-scan-warning {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.95rem;
  border-radius: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}

.qr-phone-scan-warning code {
  font-size: 0.82em;
  word-break: break-all;
}

/* Bouton orange pleine largeur */
.plats-add-btn,
.cats-add-btn {
  margin-top: 1.35rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border: none;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #ff7a1a 0%, var(--dash-accent) 55%, #e85d00 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

/* Catégories : libellé court « + Ajouter », contenu aligné à gauche */
.cats-add-btn {
  justify-content: flex-start;
  padding-left: 1.1rem;
}

.plats-add-btn:hover,
.cats-add-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.42);
}

.plats-add-btn:active,
.cats-add-btn:active {
  transform: scale(0.98);
}

.plats-add-btn:focus-visible,
.cats-add-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 3px;
}

.plats-add-btn__plus,
.cats-add-btn__plus {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

/* Carte état vide (plats / catégories) */
.plats-empty,
.cats-empty {
  margin-top: 1.5rem;
  padding: 2.5rem 1.35rem 2rem;
  border: 1px solid #eeeeee;
  border-radius: 0.5rem;
  background: #fff;
  text-align: center;
  box-shadow: var(--dash-shadow-card);
}

/* Maquette catégories : carte un peu plus « nette » */
.cats-empty {
  border-radius: 0.25rem;
  box-shadow: none;
}

.plats-empty__icon-wrap,
.cats-empty__icon-wrap {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.plats-empty__icon-wrap img,
.cats-empty__icon-wrap img {
  display: block;
  max-width: 55%;
  max-height: 55%;
  object-fit: contain;
}

/* Fourchette / couteau en gris (placeholder) */
.plats-empty__glyph,
.cats-empty__glyph {
  display: block;
  width: 0.75rem;
  height: 1rem;
  border-left: 2px solid #757575;
  border-right: 2px solid #757575;
  border-bottom: 2px solid #757575;
  border-radius: 0 0 3px 3px;
  position: relative;
}

.plats-empty__glyph::after,
.cats-empty__glyph::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 0;
  width: 2px;
  height: 100%;
  background: #757575;
  border-radius: 1px;
}

.plats-empty__title,
.cats-empty__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dash-text);
}

.plats-empty__desc,
.cats-empty__desc {
  margin: 0.65rem auto 0;
  max-width: 18rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--dash-muted);
}

.plats-empty__cta,
.cats-empty__cta {
  margin-top: 1.35rem;
  padding: 0.4rem 0.75rem;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dash-accent);
  cursor: pointer;
  border-radius: 0.35rem;
  transition: opacity 0.15s ease;
}

.plats-empty__cta:hover,
.cats-empty__cta:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.plats-empty__cta:focus-visible,
.cats-empty__cta:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.cats-status,
.plats-status {
  min-height: 1.35rem;
  margin: 0.85rem 0 0;
  color: var(--dash-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.cats-status.is-error,
.plats-status.is-error {
  color: #b00020;
  font-weight: 600;
}

.cats-form,
.plats-form {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #eeeeee;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: var(--dash-shadow-card);
}

.cats-form__label,
.plats-form__label {
  display: block;
  margin: 0.85rem 0 0.45rem;
  color: var(--dash-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.cats-form__label:first-child,
.plats-form__label:first-child {
  margin-top: 0;
}

.cats-form__row {
  display: grid;
  gap: 0.65rem;
}

.cats-form__input,
.plats-form__input {
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 0.55rem;
  padding: 0.78rem 0.85rem;
  font: inherit;
  color: var(--dash-text);
  background: #ffffff;
}

.plats-form__textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.plats-form__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.9rem 0 1rem;
  color: var(--dash-text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.plats-form__check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.08rem;
  accent-color: var(--dash-accent);
}

.plats-variants {
  margin: 0.95rem 0 1rem;
  padding: 0.85rem;
  border: 1px dashed rgba(230, 94, 50, 0.35);
  border-radius: 0.8rem;
  background: #fff8f4;
}

.plats-variants[hidden] {
  display: none;
}

.plats-variants__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.plats-variants__title {
  margin: 0;
  color: var(--dash-text);
  font-size: 0.95rem;
}

.plats-variants__hint {
  margin: 0.25rem 0 0;
  color: var(--dash-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.plats-variants__add,
.plats-variant__remove {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  background: var(--dash-accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.plats-variants__list {
  display: grid;
  gap: 0.75rem;
}

.plats-variant {
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid rgba(230, 94, 50, 0.18);
  border-radius: 0.75rem;
  background: #ffffff;
}

.plats-variant__row {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 0.6rem;
}

.plats-variant__label {
  display: grid;
  gap: 0.3rem;
  color: var(--dash-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.plats-variant__input {
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 0.55rem;
  padding: 0.68rem 0.75rem;
  font: inherit;
}

.plats-variant__remove {
  justify-self: start;
  background: #f3f4f6;
  color: #b42318;
}

.cats-form__input:focus,
.plats-form__input:focus {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.cats-form__submit,
.cats-form__cancel,
.plats-form__submit,
.plats-form__cancel {
  border: none;
  border-radius: 0.55rem;
  padding: 0.78rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.plats-form__actions {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #eeeeee;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cats-form__submit,
.plats-form__submit {
  background: var(--dash-accent);
  color: #ffffff;
}

.cats-form__cancel,
.plats-form__cancel {
  background: #f2f2f2;
  color: var(--dash-text);
}

.cats-form__cancel {
  margin-top: 0.65rem;
}

.cats-list,
.plats-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.cats-item,
.plats-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid #eeeeee;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: var(--dash-shadow-card);
  min-width: 0;
}

.cats-item__copy {
  min-width: 0;
}

.cats-item__name,
.plats-item__name {
  margin: 0;
  color: var(--dash-text);
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.plats-item__meta {
  margin: 0.25rem 0 0;
  color: var(--dash-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.cats-item__actions,
.plats-item__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cats-item__btn,
.plats-item__btn {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  background: #f2f2f2;
  color: var(--dash-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
}

.cats-item__btn--danger,
.plats-item__btn--danger {
  background: #fff0f0;
  color: #b00020;
}

/* Grille PC / tablette : nom au-dessus, boutons côte à côte sans débordement */
@media (min-width: 48rem) {
  .cats-list .cats-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .cats-list .cats-item__copy {
    width: 100%;
    min-width: 0;
  }

  .cats-list .cats-item__actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: nowrap;
  }

  .cats-list .cats-item__btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plats-add-btn,
  .cats-add-btn {
    transition: none;
  }

  .plats-add-btn:active,
  .cats-add-btn:active {
    transform: none;
  }
}

/* Desktop : contenu un peu plus large ; drawer inchangé (mobile-first) */
@media (min-width: 48rem) {
  .dashboard-main {
    max-width: 38rem;
    padding: 1.75rem 1.25rem 2rem;
  }

  .dash-brand__name {
    font-size: 1.6rem;
  }

  .dash-card-title,
  .dash-qr-title {
    font-size: 1.35rem;
  }

}

/* ------------------------------------------------------------------
   Page « Votre QR Code »
   ------------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.qr-code-card {
  margin-top: 1.35rem;
  border-radius: var(--dash-radius-card);
  background: #fff;
  box-shadow: var(--dash-shadow-card);
  padding: 1.15rem 1rem 1.35rem;
}

.qr-code-card__inner {
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  padding: 1.15rem 0.9rem 1.2rem;
  text-align: center;
}

.qr-code-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.qr-code-card__hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #757575;
}

.qr-code-canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto 0;
  padding: 0.55rem;
  max-width: 13.5rem;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: 0.5rem;
}

#qr-code-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-code-download {
  margin-top: 1.1rem;
  width: 100%;
  border: none;
  border-radius: 0.65rem;
  padding: 0.88rem 1rem;
  background: linear-gradient(180deg, #ff8a26 0%, var(--dash-accent) 55%, #e85d00 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
  transition:
    filter 0.18s ease,
    transform 0.12s ease;
}

.qr-code-download:hover {
  filter: brightness(1.04);
}

.qr-code-download:active {
  transform: scale(0.99);
}

.qr-code-download:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 3px;
}

.qr-code-share {
  margin-top: 1.2rem;
  text-align: left;
}

.qr-code-share > p {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dash-text);
}

.qr-share-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.qr-share-input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  background: var(--dash-input-bg);
  font: inherit;
  font-size: 0.875rem;
  color: var(--dash-text);
}

.qr-share-input:focus {
  outline: 2px solid rgba(255, 107, 0, 0.45);
  outline-offset: 1px;
}

.qr-copy-btn {
  flex-shrink: 0;
  padding: 0.55rem 0.95rem;
  border: none;
  border-radius: 0.5rem;
  background: #e8e8e8;
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  color: #333;
  transition: background 0.2s ease;
}

.qr-copy-btn:hover {
  background: #dedede;
}

.qr-copy-btn.is-done {
  background: #d7f5df;
  color: #1b5e20;
}

.qr-copy-feedback {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dash-muted);
}

.qr-copy-feedback--ok {
  color: #2e7d32;
}

@media (prefers-reduced-motion: reduce) {
  .qr-code-download {
    transition: none;
  }

  .qr-code-download:active {
    transform: none;
  }
}

/* ------------------------------------------------------------------
   Page « Paramètres »
   ------------------------------------------------------------------ */

.parametres-form {
  margin-top: 1.35rem;
}

.parametres-card {
  border-radius: var(--dash-radius-card);
  background: #fff;
  border: 1px solid #ececec;
  box-shadow: var(--dash-shadow-card);
  padding: 1.25rem 1.1rem 1.35rem;
}

.parametres-card__title {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--dash-text);
}

.parametres-card__rule {
  height: 1px;
  margin: 0.75rem 0 1.1rem;
  background: linear-gradient(90deg, transparent, #e0e0e0 15%, #e0e0e0 85%, transparent);
  border: none;
}

.param-field {
  margin-bottom: 1.15rem;
}

.param-field:last-of-type {
  margin-bottom: 1.35rem;
}

.param-field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dash-text);
}

.param-field__input {
  width: 100%;
  border: none;
  border-radius: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: var(--dash-input-bg);
  color: var(--dash-text);
  font: inherit;
  font-size: 0.95rem;
}

.param-field__input::placeholder {
  color: #757575;
}

.param-field__input:focus {
  outline: 2px solid rgba(255, 107, 0, 0.45);
  outline-offset: 1px;
}

.plats-image-preview {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin-top: 0.65rem;
  object-fit: cover;
  border-radius: 0.8rem;
  border: 1px solid #eeeeee;
  background: #ffffff;
}

.param-dropzone {
  position: relative;
  margin-top: 0.5rem;
  border: 1.5px dashed rgba(255, 107, 0, 0.28);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--dash-transition),
    background var(--dash-transition),
    box-shadow var(--dash-transition);
}

.param-dropzone:focus-visible {
  outline: none;
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

.param-dropzone:hover,
.param-dropzone.is-dragover {
  border-color: var(--dash-accent);
  background: var(--dash-accent-soft);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.param-dropzone--logo {
  width: 100%;
  max-width: 11.5rem;
  aspect-ratio: 1;
  min-height: 11.5rem;
}

.param-dropzone--banner {
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 3 / 1;
}

.param-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.param-dropzone__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 100%;
  min-height: inherit;
  padding: 1.15rem 1rem;
  text-align: center;
  pointer-events: none;
}

.param-dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: rgba(255, 107, 0, 0.1);
  color: var(--dash-accent);
  margin-bottom: 0.2rem;
}

.param-dropzone__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--dash-text);
  max-width: 16rem;
}

.param-dropzone__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dash-muted);
}

.param-dropzone__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(1rem - 1px);
}

.param-dropzone.has-preview .param-dropzone__input {
  pointer-events: none;
}

.param-dropzone.has-preview:hover::after {
  content: "Cliquer pour remplacer";
  position: absolute;
  inset: auto 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.62) 100%);
  pointer-events: none;
}

.param-field__textarea {
  min-height: 6rem;
  resize: vertical;
}

.param-field--theme {
  margin-bottom: 1.5rem;
}

.param-theme-panel {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 1.35rem 1.4rem 1.45rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 28px rgba(15, 23, 42, 0.05);
}

.param-theme-panel__head {
  margin-bottom: 1.15rem;
}

.param-theme-panel__title {
  display: block;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.param-theme-panel__desc {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: #64748b;
}

.param-theme-choices {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
}

.param-theme-choice {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  margin: 0;
  border: 2px solid rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  background: var(--choice-color);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.param-theme-choice:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.1);
}

.param-theme-choice:focus-visible {
  outline: none;
  border-color: rgba(255, 107, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.param-theme-choice.is-active {
  border-color: #ff6b00;
  box-shadow:
    0 0 0 3px rgba(255, 107, 0, 0.22),
    0 4px 14px rgba(255, 107, 0, 0.18);
  transform: scale(1.06);
  animation: param-theme-select 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes param-theme-select {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
  }
  55% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(255, 107, 0, 0.16);
  }
  100% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 3px rgba(255, 107, 0, 0.22),
      0 4px 14px rgba(255, 107, 0, 0.18);
  }
}

.param-color-row {
  display: none;
}

.param-field__hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--dash-muted);
}

.param-save-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.88rem 1rem;
  border: none;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, #ff8a26 0%, var(--dash-accent) 55%, #e85d00 100%);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
  transition:
    filter 0.18s ease,
    transform 0.12s ease;
}

.param-save-btn:hover {
  filter: brightness(1.04);
}

.param-save-btn:active {
  transform: scale(0.99);
}

.param-save-btn:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 3px;
}

.param-save-btn__icon {
  display: flex;
  line-height: 0;
  color: #fff;
}

.parametres-feedback {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2e7d32;
}

.parametres-feedback.is-error {
  color: #b00020;
}

@media (prefers-reduced-motion: reduce) {
  .param-save-btn {
    transition: none;
  }

  .param-save-btn:active {
    transform: none;
  }

  .param-theme-choice,
  .param-theme-choice.is-active {
    animation: none;
    transition: none;
    transform: none;
  }
}

/* ------------------------------------------------------------------
   Responsive téléphone / tablette
   ------------------------------------------------------------------ */

@media (max-width: 47.99rem) {
  .dashboard-main {
    max-width: 100%;
    overflow-x: clip;
  }

  .plats-page-head,
  .cats-page-head {
    text-align: left;
  }

  .plats-add-btn,
  .cats-add-btn {
    min-height: 3rem;
  }

  .plats-form,
  .cats-form {
    width: 100%;
    padding: 0.95rem;
  }

  .plats-form__input,
  .cats-form__input {
    min-width: 0;
  }

  .cats-form__row {
    grid-template-columns: 1fr;
  }

  .plats-form__check {
    align-items: flex-start;
    line-height: 1.35;
  }

  .plats-variants__header,
  .plats-variant__row {
    grid-template-columns: 1fr;
  }

  .plats-variants__add {
    width: 100%;
    min-height: 2.65rem;
  }

  .plats-variant {
    padding: 0.85rem;
  }

  .plats-form__actions {
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    margin-inline: -0.15rem;
  }

  .plats-item,
  .cats-item {
    align-items: stretch;
    flex-direction: column;
  }

  .plats-item__actions,
  .cats-item__actions {
    width: 100%;
  }

  .plats-item__btn,
  .cats-item__btn {
    flex: 1;
    min-height: 2.45rem;
  }

  .cats-form__submit,
  .cats-form__cancel {
    width: 100%;
    min-height: 2.85rem;
  }

  .cats-form__cancel {
    margin-top: 0.65rem;
  }

  .cats-empty {
    padding-inline: 1rem;
  }
}

@media (max-width: 360px) {
  .dashboard-main {
    padding-inline: 0.85rem;
  }

  .dash-card,
  .qr-code-card,
  .parametres-card,
  .cats-form,
  .plats-form {
    padding-inline: 0.9rem;
  }

  .dash-title,
  .plats-page-title,
  .cats-page-title {
    font-size: 1.25rem;
  }

  .dash-link-btn,
  .dash-copy-btn,
  .dash-qr-btn,
  .cats-form__submit,
  .cats-form__cancel,
  .plats-form__submit,
  .plats-form__cancel,
  .param-save-btn {
    min-height: 2.85rem;
  }

  .cats-item,
  .plats-item {
    align-items: stretch;
    flex-direction: column;
  }

  .cats-item__actions,
  .plats-item__actions {
    width: 100%;
  }

  .cats-item__btn,
  .plats-item__btn {
    flex: 1;
    min-height: 2.4rem;
  }

  .dash-link-row,
  .qr-share-row,
  .plats-variant__row,
  .param-color-row {
    grid-template-columns: 1fr;
  }

  .dash-link-row {
    display: grid;
  }

  .dash-copy-btn {
    width: 100%;
    min-height: 2.65rem;
  }

  .qr-share-row {
    display: grid;
  }

  .qr-copy-btn {
    min-height: 2.65rem;
  }

  .dash-qr-card__layout {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-qr-preview {
    align-self: center;
  }

  .param-theme-choices {
    gap: 0.65rem;
  }
}

@media (min-width: 48rem) and (max-width: 80rem) {
  body.dashboard-page {
    background: var(--dash-bg);
  }

  .dashboard-main {
    max-width: 46rem;
    padding: 2rem 1.5rem 2.5rem;
  }

  .dash-topbar,
  .dash-hero {
    max-width: 100%;
  }

  .dash-title {
    font-size: 1.85rem;
  }

  .dash-board {
    gap: 1rem;
  }

  .dash-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .dash-panel--actions {
    padding: 1rem 1.1rem;
  }

  .dash-qr-card__layout {
    padding: 1.15rem 1.2rem;
    gap: 1.25rem;
  }

  #dashboard-qr-preview {
    width: 5.25rem;
    height: 5.25rem;
  }

  .plats-page-head,
  .cats-page-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
  }

  .plats-add-btn,
  .cats-add-btn {
    width: auto;
    min-width: 13rem;
  }

  .cats-list,
  .plats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cats-item,
  .plats-item {
    min-height: 5.25rem;
  }

  .cats-form,
  .plats-form,
  .parametres-card,
  .qr-code-card {
    padding: 1.5rem;
  }

  .cats-form,
  .plats-form,
  .parametres-form,
  .qr-code-card {
    max-width: none;
  }

  .plats-form__textarea,
  .param-field__textarea {
    min-height: 7.5rem;
  }

  .plats-variants__header {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .plats-variant__row {
    grid-template-columns: 1fr 0.8fr;
  }

  .plats-variant {
    padding: 1rem;
  }

  .plats-form__actions {
    grid-template-columns: 1fr 1fr;
  }

  .plats-image-preview {
    width: 7rem;
    height: 7rem;
  }

  .param-dropzone--logo {
    max-width: 12.5rem;
    min-height: 12.5rem;
  }

  .param-dropzone--banner {
    min-height: 16rem;
  }

  .qr-code-card__inner {
    padding: 1.5rem;
  }

  .qr-code-canvas-wrap {
    max-width: 15.5rem;
  }

  .qr-share-row {
    gap: 0.75rem;
  }

  .param-theme-choice {
    width: 1.85rem;
    height: 1.85rem;
    min-width: 1.85rem;
    min-height: 1.85rem;
    border-radius: 9px;
  }

  .param-theme-choices {
    gap: 0.55rem;
  }

  .param-save-btn,
  .qr-code-download,
  .plats-form__submit,
  .plats-form__cancel,
  .cats-form__submit,
  .cats-form__cancel {
    min-height: 3.15rem;
  }

  .dash-drawer {
    width: 20rem;
  }
}

/* ——— Bannière abonnement (essai / actif / expiré) ——— */
.dash-sub-banner {
  margin: clamp(1rem, 3vw, 1.75rem) auto 0;
  max-width: 48rem;
  width: 100%;
  padding: clamp(1rem, 3vw, 1.35rem);
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow:
    0 4px 18px rgba(15, 23, 42, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
  background: #fff;
}

.dash-sub-banner__title {
  margin: 0 0 0.45rem;
  font-size: 1.06rem;
  font-weight: 800;
}

.dash-sub-banner__lead {
  margin: 0 0 0.55rem;
  font-size: 0.925rem;
  line-height: 1.48;
}

.dash-sub-banner__muted {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: rgba(17, 24, 39, 0.5);
}

.dash-sub-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(234, 88, 12, 0.45);
  color: rgba(154, 52, 18, 1);
  background: rgba(255, 237, 213, 0.75);
}

.dash-sub-banner__cta:focus-visible {
  outline: 2px solid rgba(234, 88, 12, 0.9);
  outline-offset: 2px;
}

.dash-sub-banner--trial {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 55%);
}

.dash-sub-banner--active {
  border-color: rgba(34, 197, 94, 0.3);
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 54%);
}

.dash-sub-banner--active .dash-sub-banner__cta {
  border-color: rgba(34, 197, 94, 0.4);
  color: rgba(6, 78, 59, 1);
  background: rgba(209, 250, 229, 0.75);
}

.dash-sub-banner--expired {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 52%);
}

.dash-sub-banner--expired .dash-sub-banner__title {
  color: rgba(127, 29, 29, 1);
}

.dash-sub-banner--suspended {
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(248, 250, 252, 0.95);
  color: rgba(51, 65, 85, 1);
}

.dash-sub-banner--expired .dash-sub-banner__cta,
.dash-sub-banner--trial .dash-sub-banner__cta {
  border-color: rgba(251, 146, 60, 0.45);
  color: rgba(154, 52, 18, 1);
  background: rgba(255, 237, 213, 0.85);
}

/* ——— Bannière mode installation admin ——— */
.dash-admin-impersonation-banner {
  margin: 0 0 1rem;
  border-radius: var(--dash-radius-card);
  border: 1px solid rgba(255, 107, 0, 0.28);
  background: linear-gradient(135deg, #fff8f3 0%, #fff0e6 100%);
  box-shadow: 0 2px 12px rgba(255, 107, 0, 0.1);
}

.dash-admin-impersonation-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.dash-admin-impersonation-banner__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dash-text);
}

.dash-admin-impersonation-banner__text em {
  font-style: normal;
  font-weight: 700;
  color: var(--dash-accent);
}

.dash-admin-impersonation-banner__btn {
  flex-shrink: 0;
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: var(--dash-radius-sm);
  background: #fff;
  color: var(--dash-accent);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--dash-transition),
    box-shadow var(--dash-transition);
}

.dash-admin-impersonation-banner__btn:hover {
  background: #fffaf6;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.14);
}

/* ——— Bannière dashboard : essai / abonnement expiré → WhatsApp ——— */
.dash-trial-expired-banner {
  margin: clamp(0.85rem, 2.8vw, 1.35rem) auto 0;
  max-width: 48rem;
  width: 100%;
}

.dash-trial-expired-banner[hidden] {
  display: none !important;
}

.dash-trial-expired-banner__inner {
  display: flex;
  gap: clamp(0.85rem, 3vw, 1.25rem);
  align-items: flex-start;
  padding: clamp(1rem, 3.2vw, 1.4rem);
  border-radius: 18px;
  border: 1px solid rgba(239, 68, 68, 0.32);
  background: linear-gradient(145deg, #fef2f2 0%, #fffdfb 62%);
  box-shadow:
    0 6px 28px rgba(127, 29, 29, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dash-trial-expired-banner__glyph {
  margin: 0;
  flex-shrink: 0;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1;
}

.dash-trial-expired-banner__content {
  min-width: 0;
}

.dash-trial-expired-banner__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 800;
  color: rgb(127, 29, 29);
}

.dash-trial-expired-banner__subtitle {
  margin: 0 0 1rem;
  font-size: clamp(0.865rem, 2.9vw, 0.935rem);
  line-height: 1.52;
  color: rgba(17, 24, 39, 0.68);
}

.dash-trial-expired-banner__cta-wrap {
  display: flex;
  flex-wrap: wrap;
}

.dash-trial-expired-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.75rem clamp(1.35rem, 5vw, 2.25rem);
  border-radius: 999px;
  font-weight: 800;
  font-size: clamp(0.918rem, 3.2vw, 1rem);
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(160deg, #25d366 0%, #16a34a 100%);
  border: 1px solid rgba(22, 101, 52, 0.45);
  box-shadow:
    0 4px 18px rgba(22, 163, 74, 0.32),
    0 2px 0 rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.dash-trial-expired-banner__cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 26px rgba(22, 163, 74, 0.4),
    0 2px 0 rgba(255, 255, 255, 0.12) inset;
}

.dash-trial-expired-banner__cta:active {
  transform: translateY(0);
}

.dash-trial-expired-banner__cta:focus-visible {
  outline: 3px solid rgba(234, 88, 12, 0.55);
  outline-offset: 3px;
}

.dash-trial-expired-banner__footer {
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.81rem;
}

.dash-trial-expired-banner__link {
  color: rgba(154, 52, 18, 0.95);
  font-weight: 600;
}

.dash-trial-expired-banner__link:focus-visible {
  outline: 2px solid rgba(234, 88, 12, 0.7);
  outline-offset: 2px;
}

/* ——— Bannières prévention expiration abonnement ——— */
.dash-sub-expiry-banner {
  margin: clamp(0.85rem, 2.8vw, 1.35rem) auto 0;
  max-width: 48rem;
  width: 100%;
}

.dash-sub-expiry-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  min-width: 0;
  padding: clamp(0.95rem, 3vw, 1.25rem);
  border-radius: 18px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

.dash-sub-expiry-banner__text {
  margin: 0;
  flex: 1 1 14rem;
  font-size: clamp(0.9rem, 2.8vw, 0.975rem);
  font-weight: 600;
  line-height: 1.48;
}

.dash-sub-expiry-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.dash-sub-expiry-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  max-width: 100%;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.dash-sub-expiry-banner__btn:focus-visible {
  outline: 2px solid rgba(234, 88, 12, 0.85);
  outline-offset: 2px;
}

.dash-sub-expiry-banner__btn--whatsapp {
  color: #fff;
  background: linear-gradient(160deg, #25d366 0%, #16a34a 100%);
  border-color: rgba(22, 101, 52, 0.45);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}

.dash-sub-expiry-banner__btn--whatsapp:hover {
  transform: translateY(-1px);
}

.dash-sub-expiry-banner__btn--secondary {
  color: rgba(51, 65, 85, 1);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.45);
}

.dash-sub-expiry-banner--warning-yellow .dash-sub-expiry-banner__inner {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 58%);
}

.dash-sub-expiry-banner--warning-yellow .dash-sub-expiry-banner__text {
  color: rgb(146, 64, 14);
}

.dash-sub-expiry-banner--warning-orange .dash-sub-expiry-banner__inner {
  border-color: rgba(249, 115, 22, 0.38);
  background: linear-gradient(135deg, #fff7ed 0%, #fff 58%);
}

.dash-sub-expiry-banner--warning-orange .dash-sub-expiry-banner__text {
  color: rgb(154, 52, 18);
}

.dash-sub-expiry-banner--expired .dash-sub-expiry-banner__inner {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 58%);
}

.dash-sub-expiry-banner--expired .dash-sub-expiry-banner__text {
  color: rgb(127, 29, 29);
}

@media (max-width: 47.99rem) {
  .dash-sub-expiry-banner {
    margin-inline: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .dash-sub-expiry-banner__inner {
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
  }

  .dash-sub-expiry-banner__text {
    flex: none;
    width: 100%;
  }

  .dash-sub-expiry-banner__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .dash-sub-expiry-banner__btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding-inline: 0.85rem;
  }
}

/* ——— Carte « Mon abonnement » ——— */
.dash-my-sub {
  scroll-margin-top: clamp(72px, 12vw, 96px);
  margin: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.05rem)
    clamp(0.85rem, 2.5vw, 1rem);
}

.dash-my-sub__card {
  max-width: 48rem;
  border-radius: 20px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow:
    0 6px 24px rgba(15, 23, 42, 0.07),
    0 2px 0 rgba(255, 255, 255, 0.65) inset;
  background: #fff;
  padding: clamp(1.15rem, 3.5vw, 1.5rem);
}

.dash-my-sub--trial .dash-my-sub__card {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, #fffbeb 0%, #ffffff 62%);
}

.dash-my-sub--active .dash-my-sub__card {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(145deg, #ecfdf5 0%, #ffffff 62%);
}

.dash-my-sub--expired .dash-my-sub__card {
  border-color: rgba(239, 68, 68, 0.32);
  background: linear-gradient(145deg, #fef2f2 0%, #ffffff 65%);
}

.dash-my-sub--suspended .dash-my-sub__card {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(248, 250, 252, 0.98);
}

.dash-my-sub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.dash-my-sub__titlewrap {
  min-width: 0;
}

.dash-my-sub__titlewrap h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.dash-my-sub__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 0.35rem;
  line-height: 0;
}

.dash-my-sub__icon img {
  display: block;
  width: 1.42rem;
  height: 1.42rem;
  object-fit: contain;
}

.dash-my-sub__badge-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.dash-my-sub-badge {
  display: inline-flex;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.dash-my-sub-badge--active {
  color: rgb(21, 128, 61);
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.42);
}

.dash-my-sub-badge--trial {
  color: rgb(180, 83, 9);
  background: rgba(253, 230, 138, 0.45);
  border: 1px solid rgba(245, 158, 11, 0.52);
}

.dash-my-sub-badge--expired {
  color: rgb(153, 27, 27);
  background: rgba(254, 202, 202, 0.45);
  border: 1px solid rgba(239, 68, 68, 0.42);
}

.dash-my-sub-badge--warning {
  color: rgb(154, 52, 18);
  background: rgba(254, 215, 170, 0.55);
  border: 1px solid rgba(249, 115, 22, 0.48);
}

.dash-my-sub-badge--suspended {
  color: rgb(71, 85, 105);
  background: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.52);
}

.dash-my-sub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 520px) {
  .dash-my-sub__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dash-my-sub__item {
  border-radius: 14px;
  padding: 0.78rem 0.92rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.07);
}

.dash-my-sub__item-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(17, 24, 39, 0.45);
  margin-bottom: 0.28rem;
}

.dash-my-sub__item-val {
  font-size: 0.985rem;
  font-weight: 700;
}

.dash-my-sub__muted {
  font-size: 0.84rem;
  color: rgba(17, 24, 39, 0.55);
  line-height: 1.52;
}

.dash-my-sub__alert {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.895rem;
  line-height: 1.54;
}

.dash-my-sub__alert--trial {
  border: 1px solid rgba(245, 158, 11, 0.42);
  background: rgba(255, 247, 237, 0.85);
  color: rgb(146, 64, 14);
}

.dash-my-sub__alert--trial p {
  margin: 0;
}

.dash-my-sub__alert--trial p + p {
  margin-top: 0.4rem;
}

.dash-my-sub__trial-after-label {
  margin-top: 0.75rem !important;
  padding-top: 0.65rem !important;
  border-top: 1px dashed rgba(245, 158, 11, 0.35);
  font-weight: 600;
  font-size: 0.895rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(146, 64, 14, 0.88);
}

.dash-my-sub__trial-plan-line {
  margin-top: 0.35rem !important;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: rgb(124, 45, 18);
}

.dash-my-sub__trial-countdown {
  margin-top: 0.05rem !important;
  font-size: 0.88rem !important;
}

.dash-my-sub__alert--expired {
  border: 1px solid rgba(239, 68, 68, 0.42);
  background: rgba(254, 242, 242, 0.9);
  color: rgb(127, 29, 29);
}

.dash-my-sub__alert--muted {
  border: 1px dashed rgba(17, 24, 39, 0.12);
  background: rgba(249, 250, 251, 0.85);
}

.dash-my-sub__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.dash-my-sub__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.dash-my-sub__btn:hover {
  transform: translateY(-1px);
}

.dash-my-sub__btn:active {
  transform: translateY(0);
}

.dash-my-sub__btn:focus-visible {
  outline: 2px solid rgba(234, 88, 12, 0.85);
  outline-offset: 2px;
}

.dash-my-sub__btn--renew {
  color: rgb(154, 52, 18);
  background: rgba(255, 237, 213, 0.9);
  border-color: rgba(251, 146, 60, 0.5);
}

.dash-my-sub__btn--plans {
  color: rgba(51, 65, 85, 1);
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(148, 163, 184, 0.52);
}

.dash-my-sub__btn--plans[aria-expanded="true"] {
  border-color: rgba(234, 88, 12, 0.45);
  color: rgb(154, 52, 18);
}

.dash-my-sub__btn--whatsapp {
  color: rgb(255, 255, 255);
  background: #25d366;
  border-color: rgba(16, 120, 72, 0.45);
}

.dash-my-sub__btn-ico {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
  flex-shrink: 0;
}

.dash-my-sub__btn--whatsapp .dash-my-sub__btn-ico {
  filter: brightness(0) invert(1);
}

.dash-my-sub__btn--ghost {
  opacity: 0.55;
  cursor: not-allowed;
}

.dash-my-sub__plans-panel {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(17, 24, 39, 0.12);
}

.dash-my-sub__plans-panel[hidden] {
  display: none !important;
}

.dash-my-sub__plans-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.dash-my-sub__plans-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 620px) {
  .dash-my-sub__plans-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-my-sub__plan-mini {
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  padding: 0.78rem 0.92rem;
  background: rgba(249, 250, 251, 0.75);
}

.dash-my-sub__plan-mini-title {
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.dash-my-sub__plan-mini-id {
  font-size: 0.72rem;
  color: rgba(17, 24, 39, 0.45);
  margin-bottom: 0.4rem;
}

/* ==================================================================
   Shell desktop / tablette — sidebar fixe, header, grilles SaaS
   Mobile inchangé (< 64rem) : drawer overlay + topbar
   ================================================================== */

:root {
  --dash-sidebar-w: 17.5rem;
  --dash-content-max: 60rem;
  --dash-header-h: 4.25rem;
}

.dash-layout {
  min-height: 100vh;
  min-height: 100dvh;
}

.dash-desktop-header {
  display: none;
}

/* ——— Tablette (48rem – 63.99rem) : contenu élargi, drawer mobile ——— */
@media (min-width: 48rem) and (max-width: 63.99rem) {
  body.dashboard-page {
    background: var(--dash-bg);
  }

  .dashboard-main {
    max-width: 42rem;
    margin-inline: auto;
    padding: 1.5rem 1.35rem 2rem;
  }

  .dash-board {
    gap: 0.95rem;
  }

  .dash-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .dash-panel--actions {
    padding: 1rem 1.05rem;
  }

  .plats-list,
  .cats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plats-page-head,
  .cats-page-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
  }

  .plats-add-btn,
  .cats-add-btn {
    width: auto;
    min-width: 12rem;
  }

  .parametres-form,
  .qr-code-card {
    max-width: 42rem;
    margin-inline: auto;
  }

  .dash-sub-banner {
    max-width: 42rem;
    margin-inline: auto;
  }
}

/* ——— Desktop (≥ 64rem) : sidebar fixe + header + layout SaaS ——— */
@media (min-width: 64rem) {
  body.dashboard-page {
    background: var(--dash-bg);
  }

  .dash-overlay,
  .dash-drawer-close,
  .dash-topbar {
    display: none !important;
  }

  .dash-drawer {
    transform: translateX(0) !important;
    width: var(--dash-sidebar-w);
    max-width: none;
    border-radius: 0;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
    z-index: 300;
    padding: 1rem 0.875rem max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .dash-drawer__header {
    padding: 0.35rem 0.5rem 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.5rem;
  }

  .dash-drawer__nav {
    margin-top: 0.65rem;
  }

  .dash-drawer__link {
    padding: 0.62rem 0.72rem;
    font-size: 0.9rem;
    border-radius: 0.65rem;
    transition:
      background 0.18s ease,
      color 0.18s ease,
      transform 0.18s ease;
  }

  .dash-drawer__link:hover {
    background: rgba(255, 107, 0, 0.08);
    transform: translateX(2px);
  }

  .dash-drawer__link.is-active {
    background: var(--dash-accent-soft);
    color: var(--dash-accent);
    font-weight: 600;
  }

  .dash-drawer__footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
  }

  .dash-layout {
    margin-left: var(--dash-sidebar-w);
    width: calc(100% - var(--dash-sidebar-w));
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .dash-desktop-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 120;
    flex-shrink: 0;
    width: 100%;
    min-height: var(--dash-header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .dash-desktop-header__inner {
    width: min(100%, var(--dash-content-max));
    max-width: var(--dash-content-max);
    margin-inline: auto;
    padding: 0.85rem clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-sizing: border-box;
  }

  .dash-desktop-header__left {
    min-width: 0;
  }

  .dash-desktop-header__eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dash-muted);
  }

  .dash-desktop-header__title {
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dash-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-desktop-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .dash-desktop-header__icon-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.65rem;
    background: #fff;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    transition:
      background 0.18s ease,
      border-color 0.18s ease,
      transform 0.18s ease,
      box-shadow 0.18s ease;
  }

  .dash-desktop-header__icon-btn:hover {
    background: #fafafa;
    border-color: rgba(255, 107, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .dash-desktop-header__icon-btn.is-active {
    border-color: rgba(255, 107, 0, 0.35);
    background: var(--dash-accent-soft);
    color: var(--dash-accent);
  }

  .dash-desktop-header__dot {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--dash-accent);
    border: 2px solid #fff;
  }

  .dash-desktop-header__profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: 0.35rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
  }

  .dash-desktop-header__avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #ff8f40 0%, var(--dash-accent) 100%);
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.28);
  }

  .dash-desktop-header__profile-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 11rem;
  }

  .dash-desktop-header__profile-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dash-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dash-desktop-header__profile-email {
    font-size: 0.75rem;
    color: var(--dash-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-main {
    width: min(100%, var(--dash-content-max));
    max-width: var(--dash-content-max);
    margin-inline: auto;
    padding: 1.35rem clamp(1.5rem, 3vw, 2.5rem) 2.25rem;
    flex: 1;
    align-self: center;
    box-sizing: border-box;
  }

  .dash-sub-expiry-banner,
  .dash-trial-expired-banner,
  .dash-sub-banner {
    margin-inline: 0;
    max-width: none;
    width: 100%;
  }

  .dash-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 0.35rem;
  }

  .dash-hero__text {
    flex: 1;
    min-width: 0;
  }

  .dash-hero__cta {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.65rem;
  }

  .dash-page-hero .dash-hero__cta {
    width: auto;
    margin-top: 0;
  }

  .dash-page-hero--actions-desktop .dash-hero__cta {
    display: flex;
  }

  .dash-page-hero .dash-hero__cta .plats-add-btn,
  .dash-page-hero .dash-hero__cta .cats-add-btn {
    width: auto;
    min-width: 13rem;
    margin-top: 0;
    border-radius: 999px;
    justify-content: center;
    padding-left: 1.35rem;
  }

  .dash-page-hero .plats-page-sub,
  .dash-page-hero .cats-page-sub {
    max-width: 36rem;
  }

  .dash-title {
    font-size: 1.85rem;
  }

  .dash-subtitle {
    max-width: 36rem;
  }

  .dash-board {
    gap: 1.25rem;
    margin-top: 1.35rem;
  }

  .dash-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .dash-card--stat {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.95rem 1.05rem;
  }

  .dash-card--stat .dash-label {
    font-size: 0.8125rem;
  }

  .dash-card--stat .dash-value {
    font-size: 1.55rem;
  }

  .dash-panel--actions {
    padding: 1.2rem 1.35rem;
    background: var(--dash-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--dash-radius-card);
    box-shadow: var(--dash-shadow-card);
  }

  .dash-section-title {
    margin-bottom: 0.95rem;
    font-size: 1rem;
  }

  .dash-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .dash-quick-tile {
    padding: 1rem 1.05rem;
  }

  .dash-share-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
  }

  .dash-card--link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.2rem 1.35rem;
  }

  .dash-card--link .dash-link-btn {
    margin-top: auto;
  }

  .dash-qr-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .dash-qr-card__layout {
    flex: 1;
    align-items: center;
    padding: 1.35rem 1.5rem;
    gap: 1.5rem;
  }

  .dash-qr-preview {
    padding: 0.65rem;
  }

  #dashboard-qr-preview {
    width: 7rem;
    height: 7rem;
  }

  .plats-page-head,
  .cats-page-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-top: 0.5rem;
  }

  .mon-abonnement-root {
    margin-top: 0.25rem;
  }

  .qr-code-page .qr-code-card {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
    margin-top: 1.25rem;
  }

  .qr-code-page .qr-code-card__inner {
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    padding: 2rem 1.75rem;
  }

  .qr-code-page .qr-code-share {
    padding: 2rem 1.75rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .qr-code-page .qr-code-canvas-wrap {
    max-width: 16rem;
  }

  .qr-code-page .qr-code-card__inner .qr-code-download {
    display: none;
  }

  .plats-add-btn,
  .cats-add-btn {
    width: auto;
    min-width: 13rem;
  }

  .plats-list,
  .cats-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .plats-form,
  .cats-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    align-items: start;
  }

  .plats-form__label,
  .cats-form__label {
    grid-column: 1 / -1;
  }

  .plats-form__input,
  .cats-form__input,
  .plats-form__textarea {
    grid-column: span 1;
  }

  .plats-form__check,
  .plats-variants,
  .plats-form__actions,
  .cats-form__submit,
  .cats-form__cancel {
    grid-column: 1 / -1;
  }

  .plats-form__textarea {
    grid-column: 1 / -1;
  }

  .plats-form__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: static;
    box-shadow: none;
    padding: 0;
    margin-top: 0.5rem;
  }

  .parametres-form {
    max-width: var(--dash-content-max);
  }

  .parametres-card {
    padding: 1.35rem 1.5rem;
  }

  .qr-code-card {
    max-width: none;
  }

  .qr-code-canvas-wrap {
    max-width: 16rem;
  }

  .mon-abonnement-root .dash-my-sub {
    max-width: none;
    width: 100%;
    margin-inline: auto;
  }

  .dash-sub-banner {
    max-width: none;
    margin-top: 0;
  }

  .dash-trial-expired-banner {
    max-width: none;
  }
}

@media (min-width: 80rem) {
  .dashboard-main {
    padding-inline: clamp(1.75rem, 3vw, 2.75rem);
  }

  .dash-desktop-header__inner {
    padding-inline: clamp(1.75rem, 3vw, 2.75rem);
  }

  .plats-list,
  .cats-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-board {
    gap: 1.35rem;
  }

  .dash-stats-row {
    gap: 1.1rem;
  }

  .dash-share-row {
    gap: 1.15rem;
  }

  #dashboard-qr-preview {
    width: 7.5rem;
    height: 7.5rem;
  }
}

@media (min-width: 64rem) and (prefers-reduced-motion: reduce) {
  .dash-drawer__link:hover {
    transform: none;
  }

  .dash-desktop-header__icon-btn:hover {
    transform: none;
  }
}

/* =============================================================================
   Mes Plats — interface premium SaaS
   ============================================================================= */

.plats-page .plats-form {
  margin-top: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.plats-page .plats-form__section {
  padding: 1.25rem 1.15rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--dash-radius-card);
  background: var(--dash-card);
  box-shadow: var(--dash-shadow-card);
}

.plats-page .plats-form__section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.plats-page .plats-form__section-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dash-accent-soft);
}

.plats-page .plats-form__section-icon img {
  display: block;
  max-width: 1.35rem;
  max-height: 1.35rem;
  object-fit: contain;
}

.plats-page .plats-form__section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dash-text);
}

.plats-page .plats-form__section-desc {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--dash-muted);
}

.plats-page .plats-form__grid {
  display: grid;
  gap: 0.85rem;
}

.plats-page .plats-form__grid--duo {
  grid-template-columns: 1fr;
}

.plats-page .plats-form__field--full {
  margin-top: 0.85rem;
}

.plats-page .plats-form__field .plats-form__label {
  margin: 0 0 0.45rem;
}

.plats-page .plats-form__input,
.plats-page .plats-form__select {
  min-height: 2.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  padding: 0.72rem 0.9rem;
  background: var(--dash-input-bg);
  transition:
    border-color var(--dash-transition),
    box-shadow var(--dash-transition),
    background var(--dash-transition);
}

.plats-page .plats-form__input:hover,
.plats-page .plats-form__select:hover {
  border-color: rgba(0, 0, 0, 0.12);
}

.plats-page .plats-form__input:focus,
.plats-page .plats-form__select:focus {
  outline: none;
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14);
  background: #fff;
}

.plats-page .plats-form__textarea {
  min-height: 6.5rem;
}

.plats-page .plats-form__check {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
}

.plats-dropzone {
  position: relative;
  min-height: 9.5rem;
  border: 1.5px dashed rgba(255, 107, 0, 0.28);
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--dash-transition),
    background var(--dash-transition),
    box-shadow var(--dash-transition);
}

.plats-dropzone:hover,
.plats-dropzone.is-dragover {
  border-color: var(--dash-accent);
  background: var(--dash-accent-soft);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.plats-dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.plats-dropzone__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 9.5rem;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}

.plats-dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 107, 0, 0.1);
  color: var(--dash-accent);
  margin-bottom: 0.15rem;
}

.plats-dropzone__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dash-text);
}

.plats-dropzone__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dash-muted);
}

.plats-dropzone__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.85rem;
}

.plats-dropzone.has-preview .plats-dropzone__input {
  pointer-events: none;
}

.plats-page .plats-variants {
  margin: 0;
  padding: 1.15rem 1.1rem;
  border: 1px solid rgba(255, 107, 0, 0.12);
  border-radius: var(--dash-radius-card);
  background: linear-gradient(180deg, #fffaf6 0%, #ffffff 100%);
  box-shadow: var(--dash-shadow-card);
}

.plats-page .plats-variants__head-copy {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.plats-page .plats-variants__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 0, 0.12);
  color: var(--dash-accent);
}

.plats-page .plats-variants__title {
  font-size: 1rem;
  font-weight: 800;
}

.plats-page .plats-variants__hint {
  font-size: 0.8125rem;
  line-height: 1.45;
}

.plats-page .plats-variants__add {
  padding: 0.62rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.28);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    filter var(--dash-transition);
}

.plats-page .plats-variants__add:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.32);
}

.plats-page .plats-variant {
  padding: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.plats-page .plats-variant__input {
  min-height: 2.65rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--dash-input-bg);
}

.plats-page .plats-variant__input:focus {
  outline: none;
  border-color: var(--dash-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.plats-page .plats-form__actions {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.plats-page .plats-form__submit,
.plats-page .plats-form__cancel {
  min-height: 2.85rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    filter var(--dash-transition);
}

.plats-page .plats-form__submit {
  background: linear-gradient(145deg, #ff8f40 0%, var(--dash-accent) 100%);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.32);
}

.plats-page .plats-form__submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.36);
}

.plats-page .plats-form__cancel {
  background: #f4f4f5;
  color: var(--dash-text);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.plats-page .plats-form__cancel:hover {
  background: #ececee;
}

.plats-page .plats-list {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.plats-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--dash-radius-card);
  background: var(--dash-card);
  box-shadow: var(--dash-shadow-card);
  transition:
    transform var(--dash-transition),
    box-shadow var(--dash-transition),
    border-color var(--dash-transition);
}

.plats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--dash-shadow-card-hover);
  border-color: rgba(255, 107, 0, 0.12);
}

.plats-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f4f4f5;
  overflow: hidden;
}

.plats-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.plats-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4c4c4;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
}

.plats-card__body {
  flex: 1;
  padding: 1rem 1.05rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plats-card--no-media .plats-card__body {
  padding-top: 1.05rem;
}

.plats-card__category {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--dash-accent);
  background: var(--dash-accent-soft);
}

.plats-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--dash-text);
}

.plats-card__price {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dash-text);
}

.plats-card__desc {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dash-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plats-card--hidden {
  opacity: 0.82;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(248, 250, 252, 0.92);
}

.plats-card__hidden-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgb(100, 116, 139);
  background: rgba(226, 232, 240, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.plats-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid rgba(17, 24, 39, 0.06);
}

.plats-card__visible {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.72);
  cursor: pointer;
  user-select: none;
}

.plats-card__visible input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--dash-accent, #ff6b00);
  cursor: pointer;
}

.plats-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0 1.05rem 1.05rem;
}

.plats-card__btn {
  min-height: 2.45rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.65rem;
  background: #f8f8f8;
  color: var(--dash-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--dash-transition),
    border-color var(--dash-transition),
    transform var(--dash-transition);
}

.plats-card__btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.plats-card__btn--danger {
  background: #fff5f5;
  border-color: rgba(176, 0, 32, 0.12);
  color: #b00020;
}

.plats-card__btn--danger:hover {
  background: #ffecec;
}

.plats-page .plats-empty {
  margin-top: 1.35rem;
  border-radius: var(--dash-radius-card);
  border: 1px dashed rgba(0, 0, 0, 0.1);
  box-shadow: none;
}

.plats-page .plats-empty__icon-wrap {
  background: var(--dash-accent-soft);
}

@media (min-width: 48rem) {
  .plats-page .plats-form__grid--duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plats-page .plats-form__field--full {
    grid-column: 1 / -1;
  }

  .plats-page .plats-form__actions {
    grid-template-columns: 1fr 1fr;
  }

  .plats-page .plats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .plats-page .plats-form__section,
  .plats-page .plats-variants {
    padding: 1.35rem 1.35rem;
  }
}

@media (min-width: 64rem) {
  .plats-page .plats-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .plats-dropzone {
    min-height: 10.5rem;
  }

  .plats-dropzone__content {
    min-height: 10.5rem;
  }
}

/* Notifications toast — dashboard client */
.dash-toast-root {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.55rem;
  width: min(22rem, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  pointer-events: none;
}

.dash-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  background: #ffffff;
  color: var(--dash-text);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(0.75rem) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: auto;
}

.dash-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dash-toast.is-leaving {
  opacity: 0;
  transform: translateY(0.5rem) scale(0.98);
}

.dash-toast__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}

.dash-toast--success .dash-toast__icon {
  color: #15803d;
  background: #dcfce7;
}

.dash-toast--error .dash-toast__icon {
  color: #b91c1c;
  background: #fee2e2;
}

.dash-toast--info .dash-toast__icon {
  color: #1d4ed8;
  background: #dbeafe;
}

.dash-toast__text {
  margin: 0.15rem 0 0;
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.dash-toast__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.15rem -0.1rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dash-muted);
  cursor: pointer;
}

.dash-toast__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--dash-text);
}

@media (min-width: 64rem) {
  .dash-toast-root {
    left: auto;
    right: 1.25rem;
    top: 1.25rem;
    bottom: auto;
    transform: none;
    align-items: flex-end;
  }

  .dash-toast {
    min-width: 18rem;
    max-width: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-toast,
  .dash-toast.is-visible,
  .dash-toast.is-leaving {
    transition: none;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plats-card:hover,
  .plats-page .plats-form__submit:hover,
  .plats-page .plats-variants__add:hover,
  .plats-card__btn:hover {
    transform: none;
  }
}

