/* ProSelf by mySIS — Design system moderne v2 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@700;800&display=swap');

:root {
  --font-app: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mysis-brand: 'Outfit', var(--font-app);

  /* Palette */
  --color-primary:       #AB0209;
  --color-primary-dark:  #8a0207;
  --color-primary-soft:  rgba(171, 2, 9, 0.10);
  --color-primary-glow:  rgba(171, 2, 9, 0.18);

  --color-accent:        #3B82F6;
  --color-accent-soft:   rgba(59, 130, 246, 0.12);

  --color-bg:            #f0f0f8;
  --color-surface:       #ffffff;
  --color-surface-blur:  rgba(255, 255, 255, 0.82);
  --color-surface-2:     #f8f8fc;

  --color-text:          #1c1c1e;
  --color-text-muted:    #8e8e93;
  --color-text-light:    #aeaeb2;

  --color-border:        rgba(0, 0, 0, 0.07);
  --color-border-strong: rgba(0, 0, 0, 0.12);

  --color-success:       #34c759;
  --color-success-soft:  rgba(52, 199, 89, 0.12);
  --color-danger:        #ff3b30;
  --color-danger-soft:   rgba(255, 59, 48, 0.12);
  --color-warning:       #ff9f0a;
  --color-warning-soft:  rgba(255, 159, 10, 0.12);
  --color-info:          #5ac8fa;

  /* Radii */
  --radius-xs:  8px;
  --radius-sm:  12px;
  --radius:     18px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md:  0 6px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);

  /* Layout */
  --touch-min:          48px;
  --header-height:      60px;
  --bottom-bar-height:  76px;
  --nav-rail-width:     0px;
  --sidebar-width:      88px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-app);
  color: var(--color-text);
  background: var(--color-bg);
  padding-bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom) + 16px);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-font-smoothing: antialiased;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  line-height: 1;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  background: var(--color-surface-blur);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--color-border);
  z-index: 120;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

/* Logo pill */
.app-header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: 10px;
  flex-shrink: 0;
}

.app-header-logo .material-symbols-rounded {
  font-size: 1.2rem;
  color: #fff;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.app-header-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-vet {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-warning);
  background: var(--color-warning-soft);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.app-header-notifications-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.app-header-notifications-wrap[hidden] {
  display: none !important;
}

.app-header-notif-btn.dashboard-notif-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

.app-header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.app-header-ip { white-space: nowrap; }

.app-header-sep {
  opacity: 0.4;
  user-select: none;
}

.app-header-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
}

.app-header-net {
  display: inline-flex;
  align-items: center;
}

.app-header-net .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--color-success);
}

.app-header-net--offline .material-symbols-rounded {
  color: var(--color-danger);
}

.app-header-user {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 0;
  border-radius: 999px;
}

.app-header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease;
  min-height: 44px;
  box-sizing: border-box;
}

.app-header-user-trigger:hover,
.app-header-user-trigger:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}

.app-header-user.is-open .app-header-user-trigger {
  background: rgba(0, 0, 0, 0.06);
}

.app-header-user-trigger .material-symbols-rounded:first-of-type {
  font-size: 1.35rem;
  color: var(--color-text-muted);
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-header-user-chevron {
  font-size: 1.1rem !important;
  color: var(--color-text-muted);
  opacity: 0.75;
  transition: transform 180ms ease;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.app-header-user.is-open .app-header-user-chevron {
  transform: rotate(180deg);
}

.app-header-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.app-header-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.app-header-user-menu[hidden] {
  display: none !important;
}

.app-header-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: none;
  border-radius: var(--radius-md, 10px);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 140ms ease, color 140ms ease;
}

.app-header-menu-item .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.app-header-menu-item:hover,
.app-header-menu-item:focus-visible {
  background: var(--color-surface-2);
  outline: none;
}

.app-header-menu-item--link:last-child:hover,
.app-header-menu-item--link:last-child:focus-visible {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.app-header-menu-item--link:last-child:hover .material-symbols-rounded,
.app-header-menu-item--link:last-child:focus-visible .material-symbols-rounded {
  color: var(--color-danger);
}

@media (max-width: 480px) {
  .app-header-ip,
  .app-header-ip + .app-header-sep { display: none; }
  .app-header-status { display: none; }
  .app-header-name { max-width: min(42vw, 140px); }
  .app-header-user-menu { min-width: 200px; right: -4px; }
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════ */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 18px) 14px 16px;
}

/* ══════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION (mobile)
══════════════════════════════════════════════════════════════ */
.app-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  height: var(--bottom-bar-height);
  border-radius: var(--radius-xl);
  background: var(--color-surface-blur);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  z-index: 150;
}

.app-nav a {
  min-height: var(--touch-min);
  text-decoration: none;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  transition: color 160ms ease, transform 120ms ease;
  position: relative;
}

.app-nav a .nav-icon {
  font-size: 1.35rem;
  transition: font-variation-settings 160ms ease;
}

.app-nav a:hover,
.app-nav a.active {
  color: var(--color-primary);
}

.app-nav a.active .nav-icon {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* Active dot indicator */
.app-nav a.active::before {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0;
}

.app-nav a:active { transform: scale(0.94); }

/* ══════════════════════════════════════════════════════════════
   PAGE SECTIONS
══════════════════════════════════════════════════════════════ */
.page-section { display: none; }
.page-section.active { display: block; }

/* ══════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.card-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* Card with colored accent header */
.card--accent-red  { border-top: 3px solid var(--color-primary); }
.card--accent-blue { border-top: 3px solid var(--color-accent); }
.card--accent-green { border-top: 3px solid var(--color-success); }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--touch-min);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-app);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 4px 14px rgba(171, 2, 9, 0.28);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover { background: #efeff4; }

.btn-success {
  color: #fff;
  background: var(--color-success);
  box-shadow: 0 4px 14px rgba(52,199,89,0.28);
}

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

.btn-ghost {
  color: var(--color-text-muted);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.btn-block { width: 100%; }

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

.btn-icon {
  width: 40px;
  height: 40px;
  min-height: unset;
  padding: 0;
  border-radius: var(--radius-xs);
}

/* ══════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-app);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

input[type="checkbox"] { accent-color: var(--color-primary); }
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-success { background: var(--color-success-soft); color: #1a8a3a; }
.badge-danger  { background: var(--color-danger-soft);  color: #c0392b; }
.badge-warning { background: var(--color-warning-soft); color: #c47a00; }
.badge-info    { background: var(--color-accent-soft);  color: var(--color-accent); }
.badge-neutral { background: rgba(0,0,0,0.06);          color: var(--color-text-muted); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — Stat cards
══════════════════════════════════════════════════════════════ */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1rem 0.9rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
}

.stat-card-icon .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--color-primary);
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.stat-card-icon--success { background: var(--color-success-soft); }
.stat-card-icon--success .material-symbols-rounded { color: #1a8a3a; }

.stat-card-icon--warning { background: var(--color-warning-soft); }
.stat-card-icon--warning .material-symbols-rounded { color: var(--color-warning); }

.stat-card-icon--info { background: var(--color-accent-soft); }
.stat-card-icon--info .material-symbols-rounded { color: var(--color-accent); }

.stat-card-icon--danger { background: var(--color-danger-soft); }
.stat-card-icon--danger .material-symbols-rounded { color: var(--color-danger); }

.stat-card .stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
  line-height: 1;
}

.stat-card .stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* Stat card — variantes colorées */
.stat-card--all-ok {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
}

.stat-card--all-ok .stat-value {
  color: #16a34a;
}

.stat-card--all-ok .stat-card-icon {
  animation: stat-ok-bounce 1.8s ease-in-out infinite;
}

.stat-card--all-ok .stat-card-icon .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

@keyframes stat-ok-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40%       { transform: translateY(-4px) scale(1.08); }
  60%       { transform: translateY(-2px) scale(1.04); }
}

.stat-card--danger {
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
}

.stat-card--danger .stat-value {
  color: var(--color-danger);
}

.stat-card--warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fcd34d;
}

.stat-card--warning .stat-value {
  color: #b45309;
}

/* Stat card — cliquable */
.stat-card--clickable {
  cursor: pointer;
  position: relative;
}

.stat-card--clickable:active {
  transform: scale(0.96);
}

.stat-card-goto {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 0.35rem;
}

.stat-card-goto .material-symbols-rounded {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: transform 160ms ease, color 160ms ease;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
}

.stat-card--clickable:hover .stat-card-goto .material-symbols-rounded {
  transform: translateX(4px);
  color: var(--color-primary);
}

.stat-card--all-ok:hover .stat-card-goto .material-symbols-rounded {
  color: #16a34a;
}

.stat-card--danger:hover .stat-card-goto .material-symbols-rounded {
  color: var(--color-danger);
}

.stat-card--warning:hover .stat-card-goto .material-symbols-rounded {
  color: #b45309;
}

/* Info secondaire dans une stat-card (ex. rappels France) */
.stat-card-sub {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-muted);
  line-height: 1.3;
  margin-top: 0.25rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.35rem;
}

.stat-card-sub .material-symbols-rounded {
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.quick-actions .btn {
  min-height: 54px;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — Réservation agent
══════════════════════════════════════════════════════════════ */
.dash-resa-agent-card .card-title {
  display: flex;
  align-items: center;
}

.dash-resa-search-wrap { position: relative; }

.dash-resa-agent-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
}

.dash-resa-agent-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
}

.dash-resa-agent-item:hover,
.dash-resa-agent-item:focus { background: var(--color-primary-soft); }

.dash-resa-agent-item .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.dash-resa-agent-item small { color: var(--color-text-muted); }

.dash-resa-no-result {
  padding: 0.75rem 0.9rem;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.dash-resa-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.dash-resa-agent-badge .material-symbols-rounded { font-size: 1.1rem; }

.dash-resa-agent-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(171,2,9,0.12);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-left: 0.25rem;
}

.dash-resa-agent-remove:hover {
  background: var(--color-primary);
  color: #fff;
}

.dash-resa-plat-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.dash-resa-plat-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.4rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}

.dash-resa-plat-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dash-resa-plat-option .material-symbols-rounded {
  font-size: 1.5rem;
  color: var(--color-text-muted);
}

.dash-resa-plat-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.dash-resa-plat-option.selected .material-symbols-rounded { color: var(--color-primary); }

.dash-resa-agent-selected { margin-bottom: 1rem; }

.dash-resa-formation-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-xs);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.84rem;
  font-weight: 600;
}

.dash-resa-formation-hint .material-symbols-rounded { font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════
   MODALE « AJOUTER » — même esprit que l’action sheet (fond blanc flouté)
══════════════════════════════════════════════════════════════ */
.resa-add-agent-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.42rem 1rem !important;
  min-height: 40px;
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  box-shadow: 0 3px 14px rgba(171, 2, 9, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resa-add-agent-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(171, 2, 9, 0.32);
}

.resa-add-agent-open-btn:active {
  transform: scale(0.97);
}

.resa-add-agent-open-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  font-size: 1.28rem !important;
  line-height: 1;
  color: #fff;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18));
}

.resa-add-agent-open-btn--busy {
  pointer-events: none;
  animation: resa-add-agent-btn-pulse 0.17s ease;
}

@keyframes resa-add-agent-btn-pulse {
  0%   { transform: scale(1); }
  55%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}

body.resa-add-agent-modal-active {
  overflow: hidden;
}

.resa-add-agent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  min-height: 100dvh;
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  isolation: isolate;
  transform: translateZ(0);
}

.resa-add-agent-overlay--open {
  opacity: 1;
  visibility: visible;
}

.resa-add-agent-overlay--closing {
  opacity: 0;
  pointer-events: none;
}

.resa-add-agent-overlay__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.resa-add-agent-overlay__panel.resa-modal {
  position: absolute;
  left: 50%;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  z-index: 1;
  width: calc(100% - 1.5rem);
  max-width: 460px;
  max-height: calc(100dvh - 1.25rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translate(-50%, -0.75rem) scale(0.96);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.34, 1.15, 0.64, 1), opacity 0.28s ease;
  -webkit-overflow-scrolling: touch;
}

.resa-add-agent-overlay--open .resa-add-agent-overlay__panel.resa-modal {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

/* Modal service buffet (tableau de bord) — contraste + affichage fiable */
#service-dash-modal.resa-add-agent-overlay--open {
  display: block !important;
}
#service-dash-modal .resa-add-agent-overlay__backdrop {
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#service-dash-modal .resa-add-agent-overlay__panel.resa-modal {
  max-width: min(520px, calc(100% - 1.5rem));
}

.stat-card--service-loading .stat-value {
  color: var(--color-text-muted);
  font-weight: 600;
  animation: service-stat-pulse 1.2s ease-in-out infinite;
}
@keyframes service-stat-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.resa-add-agent-overlay--closing .resa-add-agent-overlay__panel.resa-modal {
  transform: translate(-50%, -0.5rem) scale(0.92);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.4, 0, 1, 1), opacity 0.22s ease;
}

.resa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.resa-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.resa-modal-title .material-symbols-rounded {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.resa-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--color-surface-2);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.resa-modal-close:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.resa-modal-body { padding: 1.25rem; }

/* Modale « Ajouter » : en-tête fixe, corps défilant ; résultats en flux (liste entière visible au scroll) */
.resa-add-agent-overlay__panel .resa-modal-header {
  flex-shrink: 0;
}

.resa-add-agent-overlay__panel .resa-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.resa-add-agent-overlay__panel .dash-resa-agent-results {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 0.45rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  border-top: 1px solid var(--color-border-strong);
  max-height: none;
}

/* ══════════════════════════════════════════════════════════════
   ACTION SHEET — Décompter (réservations)
══════════════════════════════════════════════════════════════ */
.resa-action-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  min-height: 100dvh;
  background: transparent;
  animation: resa-sheet-fade-in 0.22s ease forwards;
  /* Empêche le backdrop-filter de se mélanger aux stacking contexts du layout (header vs contenu). */
  isolation: isolate;
  transform: translateZ(0);
}

@keyframes resa-sheet-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fermeture : fondu global + panneau qui redescend */
.resa-action-sheet-overlay--closing {
  animation: resa-sheet-overlay-close 0.28s ease forwards;
  pointer-events: none;
}

@keyframes resa-sheet-overlay-close {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Voile plein écran : même flou / même teinte sur toute la page (évite la « ligne » header / contenu). */
.resa-action-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.92);
  /* Flou léger (lisibilité du fond) */
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}

.resa-action-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
  padding: 0.35rem 1rem max(1rem, env(safe-area-inset-bottom));
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  animation: resa-sheet-slide-up 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

@keyframes resa-sheet-slide-up {
  from { transform: translateY(100%); opacity: 0.9; }
  to   { transform: translateY(0);    opacity: 1; }
}

.resa-action-sheet-overlay--closing .resa-action-sheet-panel {
  animation: resa-sheet-slide-down 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes resa-sheet-slide-down {
  from { transform: translateY(0);  opacity: 1; }
  to   { transform: translateY(100%); opacity: 0.88; }
}

.resa-action-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-border-strong);
  margin: 0.35rem auto 0.75rem;
}

.resa-action-sheet-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--color-text);
}

.resa-action-sheet-agent {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  text-align: left;
}

.resa-action-sheet-agent-mat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.resa-action-sheet-agent-mat .material-symbols-rounded {
  font-size: 1rem;
  opacity: 0.85;
}

.resa-action-sheet-agent-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  margin-bottom: 0.65rem;
}

.resa-action-sheet-agent-name > strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.resa-action-sheet-agent-prenom {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.resa-action-sheet-agent-plat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--color-border);
}

.resa-action-sheet-agent-k {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.resa-action-sheet-agent-v {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.resa-action-sheet-hint {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
}

.resa-action-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resa-action-sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-app);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.resa-action-sheet-btn:active {
  transform: scale(0.98);
}

.resa-action-sheet-btn .material-symbols-rounded {
  font-size: 1.25rem;
}

.resa-action-sheet-btn--danger {
  background: #DC2626;
  color: #fff;
  border-color: #DC2626;
}

.resa-action-sheet-btn--danger:hover {
  background: #B91C1C;
}

.resa-action-sheet-btn--warning {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FDBA74;
}

.resa-action-sheet-btn--warning:hover {
  background: #FFEDD5;
}

.resa-action-sheet-btn--cancel {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  margin-top: 0.25rem;
}

.resa-action-sheet-btn--cancel:hover {
  background: #e8e8ed;
}

@media (min-width: 600px) {
  .resa-action-sheet-panel {
    border-radius: var(--radius-lg);
    margin-bottom: max(1rem, env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg);
  }
}

/* ══════════════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════════════ */
.alert-list { list-style: none; margin: 0; padding: 0; }

.alert-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-left: 3px solid var(--color-danger);
  background: var(--color-danger-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.dashboard-notif-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-2);
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.dashboard-notif-btn:hover {
  background: #efeff4;
  border-color: var(--color-primary);
}

.dashboard-notif-btn:active {
  transform: scale(0.96);
}

.dashboard-notif-btn .material-symbols-rounded {
  font-size: 1.35rem;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.dashboard-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 4px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  box-shadow: 0 0 0 2px var(--color-surface);
}

body.dashboard-notif-drawer-open {
  overflow: hidden;
}

.dashboard-notifications-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.dashboard-notifications-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.dashboard-notifications-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 241;
  width: min(100%, 420px);
  max-width: 100vw;
  background: var(--color-surface);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.dashboard-notifications-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.dashboard-notifications-drawer-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.dashboard-notifications-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -0.35rem -0.35rem -0.35rem 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.dashboard-notifications-drawer-close:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

.dashboard-notifications-drawer-close .material-symbols-rounded {
  font-size: 1.35rem;
}

.dashboard-notifications-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.dashboard-notifications-drawer-empty {
  flex: 1;
  padding: 1.5rem 1.25rem 1.75rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.dashboard-notif-panel-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}

.dashboard-notif-panel-icon {
  flex-shrink: 0;
  font-size: 1.35rem;
  color: var(--color-danger);
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.dashboard-notif-panel-body {
  flex: 1;
  min-width: 0;
}

.dashboard-notif-panel-text {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--color-text);
}

.dashboard-notif-panel-body .btn {
  margin-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border-radius: var(--radius-sm);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.app-table th,
.app-table td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--color-border);
}

.app-table th {
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-surface-2);
}

.card .table-responsive {
  max-height: 360px;
  overflow-y: auto;
}

.card .table-responsive .app-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface-2);
}

/* ══════════════════════════════════════════════════════════════
   RECEPTION / STEPS
══════════════════════════════════════════════════════════════ */
.steps-indicator {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.steps-indicator .step {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: background 0.2s, color 0.2s;
}

.steps-indicator .step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  font-size: 0.7rem;
  margin-right: 2px;
}

.steps-indicator .step.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.steps-indicator .step.active .step-num { background: rgba(255,255,255,0.25); }
.steps-indicator .step.done { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.steps-indicator .step.done .step-num { background: rgba(255,255,255,0.25); }

.reception-summary {
  font-size: 0.86rem;
  padding: 0.75rem 1rem;
  background: var(--color-accent-soft);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.product-form-card {
  background: var(--color-surface-2);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.product-card { margin-bottom: 0.5rem; padding: 0.75rem; }

.product-card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-card-info {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.product-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.photo-input { padding: 0.5rem; }

.photo-preview { margin-top: 0.5rem; }

.photo-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Checklist lots */
.stock-lots-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.stock-lot-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--touch-min);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}

.stock-lot-option:hover { background: var(--color-surface-2); border-color: var(--color-primary); }

.stock-lot-option input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
}

/* ══════════════════════════════════════════════════════════════
   EMPTY / LOADING
══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem 1rem;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(58vh, 520px);
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem;
  color: var(--color-text-muted);
  text-align: center;
}

.loading--tall {
  min-height: min(72vh, 680px);
  padding: clamp(2rem, 5vh, 4rem) 1.25rem;
}

.loading-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 3vh, 2rem);
}

.loading-ring {
  width: clamp(52px, 12vw, 72px);
  height: clamp(52px, 12vw, 72px);
  border-radius: 50%;
  border: 4px solid var(--color-primary-soft);
  border-top-color: var(--color-primary);
  border-right-color: var(--color-primary-dark);
  animation: mysis-load-spin 0.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 0 0 1px rgba(171, 2, 9, 0.06) inset;
  flex-shrink: 0;
}

.loading-brand {
  font-family: var(--font-mysis-brand);
  font-weight: 800;
  font-size: clamp(2.85rem, 11vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-primary);
  animation: mysis-load-breathe 2s ease-in-out infinite;
}

@keyframes mysis-load-spin {
  to { transform: rotate(360deg); }
}

@keyframes mysis-load-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(0.98); }
}

.empty-state p { margin: 0.5rem 0; font-size: 0.9rem; }

/* ══════════════════════════════════════════════════════════════
   RÉSA — GÉNÉRAL
══════════════════════════════════════════════════════════════ */
.resa-jours-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resa-jour-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: var(--touch-min);
  box-shadow: var(--shadow-xs);
}

.resa-jour-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.resa-jour-card:active { transform: scale(0.99); }

.resa-jour-header { margin-bottom: 0.4rem; font-size: 0.94rem; font-weight: 600; }
.resa-jour-date { color: var(--color-text); }

.resa-jour-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.83rem;
  color: var(--color-text-muted);
}

.resa-stat b { color: var(--color-text); font-weight: 700; }

#resa-detail-mount { margin-top: 1rem; }

.resa-jour-card--active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.resa-detail-panel { display: flex; flex-direction: column; gap: 1rem; }

.resa-repas-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.resa-repas-header .material-symbols-rounded { font-size: 1.15rem; color: var(--color-primary); }

.resa-repas-total {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.resa-choix-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.resa-choix-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.resa-choix-pill b { color: var(--color-text); font-weight: 700; }

.resa-row-muted td { opacity: 0.45; text-decoration: line-through; }

.resa-groupes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.resa-groupe-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
}

.resa-groupe-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.87rem;
  min-width: 0;
}

.resa-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.55rem 1rem;
}

.resa-menu-item { display: flex; flex-direction: column; gap: 0.1rem; }

.resa-menu-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.resa-menu-value { font-size: 0.9rem; color: var(--color-text); }

/* Banner modifications */
.resa-banner {
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.resa-banner-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #5B21B6;
  margin-bottom: 0.5rem;
}

.resa-banner-list { display: flex; flex-direction: column; gap: 0.4rem; }

.resa-banner-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.resa-banner-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* Tableau principal résa */
.resa-table-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

.resa-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.resa-nav-btn {
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
}

.resa-nav-btn .material-symbols-rounded { font-size: 1.2rem; }

.resa-nav-range {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
  text-align: center;
}

.resa-nav-range--clickable {
  cursor: pointer;
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.6rem;
  transition: background 0.15s;
}

.resa-nav-range--clickable:hover { background: var(--color-accent-soft); }

.resa-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.resa-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  flex-shrink: 0;
}

.resa-main-table td, .resa-main-table th { font-size: 0.86rem; }

.resa-th-dots,
.resa-td-dots {
  width: 28px;
  min-width: 28px;
  padding-right: 0 !important;
  white-space: nowrap;
}

.resa-td-date { white-space: nowrap; }

.resa-td-total {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 44px;
  border-radius: 4px;
}

.resa-today-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.resa-jour-row { cursor: pointer; transition: background 0.1s; }
.resa-jour-row:hover { background: #F0F4FF !important; }
.resa-jour-row--active { background: var(--color-primary-soft) !important; outline: 2px solid var(--color-primary); outline-offset: -2px; }

/* Vue jour */
.resa-day-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
}

/* Barre jour : carte navigation + bouton « Ajouter » (hors de la .card) */
.resa-day-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.resa-day-toolbar > .card {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Par défaut : à droite de la carte (flux flex), pas au-dessus du contenu */
.resa-day-toolbar-add-slot {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

/* Après scroll : fixé en pastille pour rester accessible */
.resa-day-toolbar-add-slot--compact {
  position: fixed;
  top: calc(var(--header-height) + 0.5rem);
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 110;
  align-self: auto;
  pointer-events: none;
}

.resa-day-toolbar-add-slot--compact .resa-day-toolbar-add-btn {
  pointer-events: auto;
}

@media (min-width: 900px) {
  .resa-day-toolbar-add-slot--compact {
    right: max(28px, env(safe-area-inset-right, 0px));
  }
}

.resa-day-toolbar-add-btn {
  flex: 1;
  min-width: 8.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-width 0.2s ease, padding 0.2s ease, border-radius 0.2s ease, width 0.2s ease, min-height 0.2s ease, gap 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .resa-day-toolbar-add-btn {
    transition: none;
  }
}

.resa-day-toolbar .resa-add-agent-open-btn {
  gap: 0.45rem;
  min-height: 0 !important;
  padding: 0.5rem 1.15rem !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(171, 2, 9, 0.22);
}

.resa-day-toolbar .resa-add-agent-open-btn:hover {
  transform: none;
  box-shadow: 0 3px 12px rgba(171, 2, 9, 0.28);
}

.resa-day-toolbar .resa-add-agent-open-btn:active {
  transform: scale(0.97);
}

.resa-day-toolbar .resa-add-agent-open-btn__icon {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 1.1rem !important;
}

/* Mode compact au scroll : pastille icône seule (après les règles de base avec !important) */
.resa-day-toolbar-add-slot--compact .resa-day-toolbar-add-btn {
  flex: none;
  min-width: 3rem !important;
  width: 3rem;
  min-height: 3rem !important;
  padding: 0 !important;
  border-radius: 999px !important;
  gap: 0 !important;
  box-shadow: 0 4px 18px rgba(171, 2, 9, 0.32);
}

.resa-day-toolbar-add-slot--compact .resa-add-agent-open-btn {
  position: relative;
}

.resa-day-toolbar-add-slot--compact .resa-add-agent-open-btn__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.resa-day-toolbar-add-slot--compact .resa-add-agent-open-btn__icon {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 1.22rem !important;
}

.resa-day-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.6rem;
  transition: background 0.15s;
}

.resa-day-label:hover { background: var(--color-accent-soft); }

/* Vue calendrier */
#section-resa #resa-mount.resa-mount--calendar {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--header-height) - 2.75rem);
}

#section-resa #resa-mount.resa-mount--calendar > .card.resa-cal-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.35rem;
}

.resa-cal-header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.resa-cal-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.resa-cal-month-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  flex: 1;
  text-align: center;
}

.resa-cal-card .resa-cal-grid-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}

.resa-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.resa-cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
}

.resa-cal-weekday:nth-child(6),
.resa-cal-weekday:nth-child(7) {
  background: #e4e8ef;
  color: #475569;
  border-radius: var(--radius-xs);
}

.resa-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  flex: 1;
  min-height: 0;
}

.resa-cal-empty {
  min-height: 0;
  background: #f1f3f6;
  border-radius: var(--radius-xs);
}

.resa-cal-day {
  min-height: 0;
  padding: 0.35rem 0.4rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s, filter 0.12s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #fff;
}

.resa-cal-day:hover { background: var(--color-accent-soft); box-shadow: var(--shadow-xs); }

.resa-cal-day--weekend:not(.resa-cal-day--holiday):hover:not(.resa-cal-day--nodata) {
  background: #d0d6e2;
}

.resa-cal-day--holiday:hover:not(.resa-cal-day--nodata) {
  background: #b5bfce;
  box-shadow: var(--shadow-xs);
}

.resa-cal-day--holiday.resa-cal-day--weekend:hover:not(.resa-cal-day--nodata) {
  background: #a3aebf;
}
.resa-cal-day--today { border-color: var(--color-primary); border-width: 2px; background: #FFF0F0; }
.resa-cal-day--past { background: var(--color-surface-2); }
.resa-cal-day--past .resa-cal-daynum { color: var(--color-text-muted); }
.resa-cal-day--nodata { background: var(--color-surface-2); cursor: default; }
.resa-cal-day--active { background: var(--color-primary-soft) !important; box-shadow: 0 0 0 2px var(--color-primary); }

/* Week-ends (samedi / dimanche) : fond plus foncé */
.resa-cal-day--weekend:not(.resa-cal-day--holiday):not(.resa-cal-day--today) {
  background: #dde2eb;
  border-color: #c9d0dc;
}

.resa-cal-day--past.resa-cal-day--weekend:not(.resa-cal-day--holiday):not(.resa-cal-day--today) {
  background: #cdd4e0;
}

.resa-cal-day--nodata.resa-cal-day--weekend:not(.resa-cal-day--holiday) {
  background: #d5dbe6;
}

/* Jours fériés français (métropole) : encore plus foncé */
.resa-cal-day--holiday:not(.resa-cal-day--today) {
  background: #c5ccd8;
  border-color: #a8b2c2;
}

.resa-cal-day--holiday.resa-cal-day--weekend:not(.resa-cal-day--today) {
  background: #aeb7c7;
  border-color: #939eb2;
}

.resa-cal-day--today.resa-cal-day--holiday {
  background: #fde8ea;
}

.resa-cal-daynum-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
}

.resa-cal-daynum { font-size: 0.8rem; font-weight: 800; color: var(--color-text); line-height: 1; flex-shrink: 0; }
.resa-cal-day--today .resa-cal-daynum { color: var(--color-primary); }

.resa-cal-ferie {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  flex-shrink: 0;
  line-height: 1;
}

.resa-cal-values { display: flex; gap: 0.3rem; flex: 1; align-items: flex-end; }
.resa-cal-values--empty { align-items: center; justify-content: center; }

.resa-cal-val { flex: 1; text-align: center; border-radius: 4px; padding: 0.15rem 0.2rem; }
.resa-cal-val-label { display: block; font-size: 0.6rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.resa-cal-val-num { display: block; font-size: 0.86rem; font-weight: 800; color: var(--color-text); line-height: 1.2; }

@media (max-width: 640px) {
  #section-resa #resa-mount.resa-mount--calendar {
    min-height: calc(100dvh - var(--header-height) - 5.5rem);
  }

  .resa-cal-day { padding: 0.25rem; }
  .resa-cal-val-label { font-size: 0.5rem; }
  .resa-cal-val-num { font-size: 0.72rem; }
  .resa-cal-daynum { font-size: 0.7rem; }
  .resa-cal-ferie { font-size: 0.52rem; }
}

/* Stat cards résa */
.resa-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}

.resa-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.9rem 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 2px solid;
  text-align: center;
}

.resa-stat-card--clickable {
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.resa-stat-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.resa-stat-card--clickable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.resa-stat-card--clickable.is-expanded {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.resa-stat-card--intol {
  min-height: 11.5rem;
  /* Fond plein sur toute la carte (complète le style inline border/background du JS) */
  background-color: #fffbeb;
}

.resa-stat-card--intol.is-expanded {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

/* Pied de carte : libellé « Voir » sans zone séparée — le clic = toute la carte */
.resa-intol-card-footer {
  margin-top: auto;
  align-self: stretch;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.5rem;
}

.resa-intol-voir-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  pointer-events: none;
}

.resa-intol-none {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.35rem 0.25rem 0;
  pointer-events: none;
}

.resa-intol-detail-card .section-header-flex {
  align-items: center;
}

.resa-stat-card-value { font-size: 1.65rem; font-weight: 800; line-height: 1.1; color: var(--color-text); }
.resa-stat-card-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.resa-stat-card-detail { display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; justify-content: center; margin-top: 0.3rem; }
.resa-stat-card-detail span { font-size: 0.75rem; color: var(--color-text-muted); }
.resa-stat-card-detail--large span { font-size: 1rem; font-weight: 600; }

/* Carte stat badgés (grille résa) — anneau de pourcentage type donut */
.resa-stat-card--badge .resa-stat-card-label {
  margin-top: 0.15rem;
}

.resa-badge-pct-ring {
  position: relative;
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 50%;
  margin: 0.25rem 0 0.1rem;
  flex-shrink: 0;
  background: conic-gradient(
    #10b981 calc(var(--resa-badge-pct, 0) * 1%),
    rgba(16, 185, 129, 0.2) 0
  );
  display: grid;
  place-items: center;
  transition: background 0.45s ease;
}

.resa-badge-pct-ring::before {
  content: '';
  position: absolute;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: var(--resa-badge-hole, #f0fdf4);
  z-index: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.resa-badge-pct-ring__value {
  position: relative;
  z-index: 1;
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Titres sections */
.resa-section-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.resa-section-title .material-symbols-rounded { font-size: 1.15rem; color: var(--color-primary); }

.resa-subsection-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  margin: 1.2rem 0 0.5rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-sm);
  box-shadow: inset 4px 0 0 var(--color-primary), 0 3px 10px rgba(0,0,0,0.22);
  font-size: 0;
}

.resa-subsection-icon { font-size: 1.15rem; color: var(--color-primary); flex-shrink: 0; }
.resa-subsection-time { flex-shrink: 0; font-size: 0.8rem; font-weight: 800; color: #fff; background: var(--color-primary); padding: 0.15rem 0.55rem; border-radius: 999px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.resa-subsection-label { font-size: 0.86rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resa-subsection-info { font-size: 0.76rem; font-weight: 500; color: rgba(255,255,255,0.55); text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.resa-subsection-count { margin-left: auto; flex-shrink: 0; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 0.78rem; font-weight: 800; padding: 0.15rem 0.65rem; border-radius: 999px; letter-spacing: 0.02em; }

/* Badge sans résa */
.resa-sans-resa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.55rem;
  background: #FEF3C7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid #FDE68A;
  flex-shrink: 0;
}

.resa-sans-resa-section {
  margin-top: 0.35rem;
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.resa-sans-resa-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  color: #FEF3C7;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.resa-sans-resa-header .material-symbols-rounded { font-size: 1rem; color: #FCD34D; }

/* Intolérances */
.resa-intol-list { list-style: none; padding: 0; margin: 0.25rem 0 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.87rem; }

/* Grille compacte */
.resa-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 5px 8px;
  margin-top: 0.35rem;
}

.resa-compact-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.8rem;
  line-height: 1.2;
  transition: opacity 0.15s;
}

/* Ligne entière cliquable → décompte (au lieu du bouton sports_score) */
.resa-compact-row--decompter {
  cursor: pointer;
  transition: opacity 0.15s, transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.resa-compact-row--decompter:hover {
  box-shadow: 0 0 0 2px rgba(171, 2, 9, 0.12);
}

.resa-compact-row--decompter:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.resa-compact-row--decompter.resa-compact-row--selecting {
  animation: resa-compact-row-select 0.22s ease;
}

@keyframes resa-compact-row-select {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(171, 2, 9, 0.3);
  }
  50% {
    transform: scale(0.985);
    box-shadow: 0 0 0 5px rgba(171, 2, 9, 0.14), 0 4px 14px rgba(171, 2, 9, 0.1);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(171, 2, 9, 0);
  }
}

.resa-compact-row--muted { opacity: 0.45; text-decoration: line-through; }

/* Colonne droite : matricule au-dessus du plat, calée au bord droit de la ligne */
.resa-compact-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  gap: 0.18rem;
  width: max-content;
  max-width: 100%;
  padding: 0.2rem 0 0.2rem 0.5rem;
  text-align: right;
}

.resa-compact-mat {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.resa-compact-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  line-height: 1.2;
}
.resa-compact-name__row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.resa-compact-name__row > strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.resa-compact-name > strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.resa-compact-prenom {
  display: block;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.resa-compact-prenom:empty {
  display: none;
}
.resa-compact-repas { flex-shrink: 0; display: flex; align-items: center; color: var(--color-text-muted); }
.resa-compact-plat {
  flex-shrink: 0;
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resa-compact-repas .material-symbols-rounded { font-size: 1rem; }

/* Legacy table groupes */
.resa-resa-table td, .resa-resa-table th { font-size: 0.82rem; }
.resa-th-badge { width: 26px; min-width: 26px; padding-right: 0 !important; }
.resa-badge-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }

.resa-statut-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Action décompte */
.resa-action-wrap { white-space: nowrap; }

.resa-confirm {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.3rem 0.5rem;
  background: #FFF7ED;
  border-radius: var(--radius-xs);
  border: 1px solid #FED7AA;
}

/* Colonne actions groupes */
.resa-groupe-actions {
  white-space: nowrap;
  min-width: 130px;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Formulaire menu */
.resa-menu-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem 1rem;
}

/* ══════════════════════════════════════════════════════════════
   MENUS — VUE MENSUELLE
══════════════════════════════════════════════════════════════ */
.menu-month-shell { display: flex; flex-direction: column; gap: 1rem; }

.menu-month-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.menu-month-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu-month-nav-label {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: capitalize;
  min-width: 140px;
  text-align: center;
}

.menu-month-summary,
.menu-month-legend,
.menu-month-actions,
.menu-month-form-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu-month-summary { margin-top: 0.9rem; }
.menu-month-legend { margin-top: 0.75rem; font-size: 0.8rem; color: var(--color-text-muted); }

.menu-month-pill,
.menu-month-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
}

.menu-month-pill--filled,
.menu-month-status--filled { background: #D1FAE5; color: #065F46; }

.menu-month-pill--empty,
.menu-month-status--empty { background: #FEE2E2; color: #991B1B; }

.menu-month-pill--error,
.menu-month-status--error { background: #E5E7EB; color: #374151; }

.menu-month-dot { width: 9px; height: 9px; display: inline-block; border-radius: 999px; margin-right: 0.35rem; vertical-align: middle; }
.menu-month-dot--filled { background: #10B981; }
.menu-month-dot--empty  { background: #EF4444; }
.menu-month-dot--error  { background: #9CA3AF; }

.menu-month-calendar-wrap { overflow-x: auto; }
.menu-month-calendar { min-width: 700px; }

.menu-month-weekdays,
.menu-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.menu-month-weekdays { margin-bottom: 0.55rem; }

.menu-month-weekday {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
}

.menu-month-empty,
.menu-month-day { min-height: 112px; border-radius: var(--radius); }

.menu-month-empty { border: 1.5px dashed var(--color-border); background: rgba(240,240,248,0.45); }

.menu-month-day {
  width: 100%;
  border: 1.5px solid var(--color-border);
  background: #fff;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 160ms ease, box-shadow 160ms ease;
  box-shadow: var(--shadow-xs);
}

.menu-month-day:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.menu-month-day--selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.menu-month-day--filled { background: #F0FDF4; border-color: #BBF7D0; }
.menu-month-day--empty  { background: #FFF7F7; border-color: #FECACA; }
.menu-month-day--error  { background: var(--color-surface-2); border-color: #D1D5DB; }

.menu-month-daynum { font-size: 1.05rem; font-weight: 800; color: var(--color-text); }
.menu-month-daylabel, .menu-month-meta, .menu-month-current-empty { font-size: 0.8rem; color: var(--color-text-muted); }

.menu-month-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.menu-month-detail-date { font-size: 1rem; font-weight: 700; color: var(--color-text); }
.menu-month-current { margin: 1rem 0; }

/* ══════════════════════════════════════════════════════════════
   POS — POINTAGES
══════════════════════════════════════════════════════════════ */
.pos-shell { display: flex; flex-direction: column; gap: 0.75rem; }

.pos-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.pos-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  animation: pos-blink 1.4s ease-in-out infinite;
}

.pos-live-dot--off { background: #6B7280; animation: none; }

@keyframes pos-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,199,89,0.6); }
  50%       { opacity: 0.5; box-shadow: 0 0 0 5px rgba(52,199,89,0); }
}

.pos-header-title { font-size: 0.95rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.pos-header-date { font-size: 0.8rem; color: rgba(255,255,255,0.55); }

.pos-nav-bar { display: flex; align-items: center; gap: 0.4rem; flex: 1; justify-content: center; }

.pos-nav-btn {
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

.pos-nav-btn:disabled { opacity: 0.3; }
.pos-nav-btn .material-symbols-rounded { font-size: 1.1rem; }
.pos-nav-date { font-size: 0.84rem; font-weight: 700; color: #fff; white-space: nowrap; }

.pos-total-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.pos-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.pos-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius);
  border: 2px solid;
  text-align: center;
}

.pos-stat-card .material-symbols-rounded { font-size: 1.25rem; }
.pos-stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--color-text); }
.pos-stat-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }

.pos-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pos-cat-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.pos-cat-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1.5px solid;
  background: transparent;
}

.pos-row {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.75rem 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text-light);
  font-size: 0.84rem;
  flex-wrap: wrap;
  min-width: 0;
}

.pos-row--new { animation: pos-flash 1.2s ease-out; background: #F0FDF4; border-color: #86EFAC; }

@keyframes pos-flash {
  0%   { background: #DCFCE7; border-color: #4ADE80; }
  100% { background: #F0FDF4; border-color: #86EFAC; }
}

.pos-row--cancel { opacity: 0.45; text-decoration: line-through; }

.pos-row-time { font-size: 0.76rem; font-weight: 700; color: var(--color-text-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; min-width: 62px; }
.pos-row-time--heure { color: var(--color-text); font-size: 0.84rem; letter-spacing: 0.02em; }
.pos-row-agent { flex: 1; min-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-row-grade { font-size: 0.7rem; color: var(--color-text-muted); font-style: italic; }
.pos-row-prenom { color: var(--color-text-muted); font-size: 0.78rem; }
.pos-row-mat { font-size: 0.68rem; color: var(--color-text-muted); }
.pos-row-plage { font-size: 0.76rem; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; flex-shrink: 0; }
.pos-row-context { font-size: 0.73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; flex-shrink: 0; }
.pos-row-context--formation { color: var(--color-accent); }
.pos-row-context--event { color: #8B5CF6; }
.pos-facturation { font-size: 0.73rem; margin-left: auto; flex-shrink: 0; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════════ */
.text-muted   { color: var(--color-text-muted); }
.text-danger  { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════
   TOASTS
══════════════════════════════════════════════════════════════ */
.app-toast-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100% - 2rem);
  pointer-events: none;
}

.app-toast {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(.34,1.56,.64,1);
}

.app-toast--success { background: var(--color-success); color: #fff; }
.app-toast--error   { background: var(--color-danger);  color: #fff; }
.app-toast--info    { background: var(--color-surface);  color: var(--color-text); border: 1px solid var(--color-border); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet portrait (768px–899px)
══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --bottom-bar-height: 80px; }

  .app-main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .dashboard-stats {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .card { padding: 1.35rem; }

  .app-nav a { font-size: 0.65rem; }
  .app-nav a .nav-icon { font-size: 1.45rem; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Desktop (900px+) — SIDEBAR RAIL
══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  :root {
    --sidebar-width:      88px;
    --nav-rail-width:     88px;
    --bottom-bar-height:  0px;
  }

  body {
    padding-bottom: 0;
    padding-left: calc(var(--sidebar-width) + env(safe-area-inset-left));
  }

  .app-header {
    left: var(--sidebar-width);
    height: var(--header-height);
  }

  .app-main {
    padding: calc(var(--header-height) + 24px) 28px 28px;
    max-width: none;
  }

  /* Sidebar rail */
  .app-nav {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--sidebar-width);
    height: 100dvh;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(9, auto) 1fr;
    gap: 0;
    padding: calc(var(--header-height) + 16px) 0 20px;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    box-shadow: 1px 0 0 var(--color-border);
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .app-nav a {
    flex-direction: column;
    min-height: 64px;
    font-size: 0.62rem;
    letter-spacing: 0.01em;
    border-radius: var(--radius-sm);
    margin: 2px 10px;
    padding: 0.5rem 0.25rem;
    width: calc(var(--sidebar-width) - 20px);
    transition: background 160ms ease, color 160ms ease, transform 120ms ease;
  }

  .app-nav a .nav-icon {
    font-size: 1.55rem;
    transition: font-variation-settings 160ms ease;
  }

  .app-nav a:hover {
    background: var(--color-surface-2);
    color: var(--color-primary);
  }

  .app-nav a.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
  }

  .app-nav a.active::before { display: none; }

  .app-nav a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

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

  .app-toast-container {
    bottom: 24px;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — Large desktop (1024px+)
══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .app-main {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .card { padding: 1.5rem; }

  .form-group--inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   TEMPÉRATURES — MATRICE HACCP
══════════════════════════════════════════════════════════════ */
.temp-matrix-card {
  padding-bottom: 0;
  overflow: hidden;
}

.temp-legend {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.temp-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
  border-top: 1px solid var(--color-border);
}

.temp-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: auto;
}

.temp-matrix-table th,
.temp-matrix-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  vertical-align: middle;
  white-space: nowrap;
}

.temp-matrix-table th:last-child,
.temp-matrix-table td:last-child {
  border-right: none;
}

.temp-date-header {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 110px;
}

.temp-eq-header {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  min-width: 120px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.temp-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.temp-matrix-table thead .temp-date-header {
  z-index: 3;
}

.temp-range {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.temp-date-cell {
  font-size: 0.83rem;
  color: var(--color-text);
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
  border-right: 2px solid var(--color-border-strong);
}

.temp-cell {
  text-align: center;
  min-width: 110px;
}

.temp-row-today {
  background: var(--color-primary-soft);
}

.temp-row-today .temp-date-cell {
  background: var(--color-primary-soft);
}

.temp-row-past {
  background: var(--color-surface);
}

.temp-row-past:hover {
  background: var(--color-surface-2);
}

.temp-row-past .temp-date-cell {
  background: inherit;
}

.temp-badge-today {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  display: inline-block;
  margin-top: 0.2rem;
}

.temp-badge-compact {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
}

.temp-value-display {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
}

.temp-agent {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.15rem;
}

.temp-missing {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.temp-input {
  width: 80px;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.3rem 0.4rem;
  min-height: 0;
  height: 2rem;
  margin: 0 auto;
  display: block;
}


.temp-save-btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.temp-save-btn .material-symbols-rounded {
  font-size: 1.1em;
}

/* Colonne Actions */
.temp-action-header {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  width: 160px;
  min-width: 160px;
}

.temp-action-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  width: 160px;
  min-width: 160px;
}

.temp-action-btns {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-icon .material-symbols-rounded {
  font-size: 1.05em;
}

.temp-btn-danger:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.temp-btn-act {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.temp-btn-act .material-symbols-rounded {
  font-size: 1em;
}

.temp-edit-input {
  width: 80px;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.3rem 0.4rem;
  height: 2rem;
  min-height: 0;
  margin: 0 auto;
  display: block;
}

/* ══════════════════════════════════════════════════════════════
   RÉCEPTION — HISTORIQUE & WIZARD
══════════════════════════════════════════════════════════════ */

/* Historique */
.recep-history-card { padding-bottom: 0; overflow: hidden; }
.recep-new-btn { display: inline-flex; align-items: center; gap: 0.25rem; }
.recep-table .recep-date-cell { white-space: nowrap; }
.recep-temp-val { font-weight: 700; }

/* Indicateur d'étapes */
.recep-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.recep-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.recep-step.active {
  color: var(--color-primary);
}

.recep-step.done {
  color: var(--color-success);
}

.recep-step-icon {
  font-size: 1.2em;
}

.recep-step-sep {
  flex: 1;
  min-width: 1.5rem;
  height: 1px;
  background: var(--color-border);
  margin: 0 0.5rem;
  flex-shrink: 0;
}

/* Barre récapitulative */
.recep-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  background: var(--color-accent-soft);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text);
}

.recep-summary-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.recep-summary-bar .material-symbols-rounded {
  font-size: 1.05em;
  color: var(--color-accent);
}

/* Carte formulaire */
.recep-form-card { padding-bottom: 1.25rem; }

.recep-form-card .card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recep-subtitle {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}

/* Grille de saisie */
.recep-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 540px) {
  .recep-form-grid { grid-template-columns: 1fr; }
}

/* Barre agent (non éditable) */
.recep-agent-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  margin-bottom: 1rem;
}

.recep-agent-bar .material-symbols-rounded {
  font-size: 1.1em;
}

/* Rangée de boutons */
.recep-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.recep-btn-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Formulaire produit */
.recep-product-form {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.recep-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

/* Liste produits ajoutés */
.recep-product-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.recep-product-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
}

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

.recep-product-main strong {
  display: block;
  font-size: 0.88rem;
  color: var(--color-text);
}

.recep-product-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.1rem;
}

.recep-product-item .product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* Ligne cliquable */
.recep-row:hover { background: var(--color-surface-2); }
.recep-row-icon { font-size: 1.2em; color: var(--color-text-light); vertical-align: middle; }

/* ── Vue détail plein écran ─────────────────────────────── */
.recep-detail-wrap { display: flex; flex-direction: column; gap: 1rem; }

.recep-detail-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.recep-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.recep-detail-breadcrumb {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grille infos réception */
.recep-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .recep-detail-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .recep-detail-grid { grid-template-columns: 1fr; }
}

.recep-detail-field { display: flex; flex-direction: column; gap: 0.15rem; }
.recep-detail-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.recep-detail-value { font-size: 0.9rem; color: var(--color-text); }

.recep-detail-notes {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

/* Grille produits */
.recep-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.recep-product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
}

.recep-product-photo {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-surface-2);
}

.recep-product-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}

.recep-product-no-photo .material-symbols-rounded { font-size: 2.5rem; }

.recep-product-card-body {
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.recep-product-card-name { font-size: 0.88rem; color: var(--color-text); line-height: 1.3; }

/* Boutons photo */
.recep-photo-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.recep-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.recep-photo-btn:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.recep-photo-btn .material-symbols-rounded { font-size: 1.15em; }

.recep-photo-btn-secondary { color: var(--color-text-muted); }

.photo-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Rangée stockage */
.recep-storage-row {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.5rem;
}

.recep-storage-row .form-group {
  max-width: 240px;
}

/* Bouton terminer */
.recep-finish-btn {
  background: var(--color-success);
  border-color: var(--color-success);
}

.recep-finish-btn:hover {
  background: #2aac49;
  border-color: #2aac49;
}

/* ══════════════════════════════════════════════════════════════
   ALERTES RAPPEL — Page complète
══════════════════════════════════════════════════════════════ */
.recall-page { display: flex; flex-direction: column; gap: 1rem; }

/* Mes rappels */
.recall-mine-icon {
  color: var(--color-danger);
  vertical-align: middle;
  margin-right: 0.4rem;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.recall-mine-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recall-mine-list--ack { margin-top: 0.5rem; }

.recall-mine-item {
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.recall-mine-item--ack {
  background: var(--color-surface-2);
  border-color: var(--color-border);
  opacity: 0.65;
}

.recall-mine-item__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.recall-mine-badge {
  display: inline-flex;
  align-items: center;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.recall-mine-badge--danger { background: #fee2e2; color: #b91c1c; }

.recall-mine-name { font-weight: 700; font-size: 0.95rem; flex: 1; min-width: 0; }

.recall-mine-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.recall-mine-reason {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #b91c1c;
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  line-height: 1.4;
}

.recall-mine-reason .material-symbols-rounded {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 20;
}

.recall-mine-link { margin-top: 0.4rem; font-size: 0.85rem; }
.recall-mine-link a { color: var(--color-accent); font-weight: 600; }

.recall-mine-ack { margin-top: 0.75rem; }
.recall-mine-ack summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  list-style: none;
}

.recall-none-msg {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #16a34a;
  font-weight: 600;
  padding: 0.75rem 0;
  margin: 0;
  font-size: 0.95rem;
}

.recall-none-msg .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Barre de recherche */
.recall-search-bar {
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
}

.recall-search-bar__row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.recall-search-field { display: flex; flex-direction: column; gap: 0.25rem; }
.recall-search-field--wide { grid-column: span 1; }

.recall-search-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recall-search-label .material-symbols-rounded {
  font-size: 0.8rem;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
}

.recall-search-bar__actions { display: flex; gap: 0.5rem; }

/* Header résultats */
.recall-results-header { margin-bottom: 0.6rem; }

.recall-results-count { font-size: 0.85rem; color: var(--color-text-muted); }
.recall-results-count strong { color: var(--color-text); font-size: 1rem; font-weight: 800; }

/* Liste nationale */
.recall-national-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.recall-national-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface);
}

.recall-national-item__header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 120ms;
}

.recall-national-item__header:hover { background: var(--color-surface-2); }

.recall-national-item__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.recall-national-item__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recall-national-item__brand {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recall-national-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  max-width: 55%;
  flex-shrink: 0;
}

.recall-national-item__chevron {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 200ms ease;
  margin-top: 0.05rem;
}

/* Badges */
.recall-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.67rem;
  font-weight: 600;
  padding: 0.17rem 0.45rem;
  border-radius: 99px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recall-badge--cat  { background: var(--color-accent-soft); color: var(--color-accent); }
.recall-badge--motif { background: #fff7ed; color: #92400e; border: 1px solid #fde68a; }
.recall-badge--date  { background: var(--color-surface-2); color: var(--color-text-muted); border: 1px solid var(--color-border); }

/* Corps développable */
.recall-national-item__body {
  padding: 0.75rem 1rem 1rem;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
}

.recall-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.recall-detail-col { display: flex; flex-direction: column; }

.recall-detail-section {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  height: 100%;
}

.recall-detail-section__title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.recall-detail-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.22rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.81rem;
}

.recall-detail-row:last-child { border-bottom: none; }

.recall-detail-label {
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-top: 0.1rem;
  line-height: 1.3;
}

.recall-detail-val { color: var(--color-text); line-height: 1.4; }
.recall-detail-val--danger { color: #b91c1c; font-weight: 600; }
.recall-detail-val--hl { font-weight: 800; font-size: 0.9rem; color: var(--color-text); }

.recall-conduites { display: flex; flex-direction: column; gap: 0.2rem; }

.recall-detail-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }

.recall-tag {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.recall-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.recall-detail-img { margin-top: 0.6rem; }
.recall-detail-img img {
  max-width: 100%;
  max-height: 150px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  object-fit: contain;
  display: block;
}

/* Pagination */
.recall-pagination { margin-top: 1rem; }

.recall-pagination__inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.recall-pagination__info {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Animation sync button */
@keyframes rc-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive recall */
@media (max-width: 767px) {
  .recall-search-bar__row { grid-template-columns: 1fr 1fr; }
  .recall-search-field--wide { grid-column: 1 / -1; }
  .recall-detail-grid { grid-template-columns: 1fr; }
  .recall-national-item__meta { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   STOCK
══════════════════════════════════════════════════════════════ */
.stock-shell {
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stock-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stock-title .material-symbols-rounded {
  color: var(--color-primary);
  font-size: 1.5rem;
}

/* Stats cards */
.stock-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stock-stat-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stock-stat-card__value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mysis-brand);
  line-height: 1;
}

.stock-stat-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stock-stat-card--ok    .stock-stat-card__value { color: var(--color-success); }
.stock-stat-card--warn  .stock-stat-card__value { color: var(--color-warning); }
.stock-stat-card--danger .stock-stat-card__value { color: var(--color-danger); }
.stock-stat-card--total  .stock-stat-card__value { color: var(--color-accent); }

/* Filters */
.stock-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.stock-filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 99px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: var(--font-app);
}

.stock-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.stock-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.stock-search {
  margin-left: auto;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.85rem;
  font-family: var(--font-app);
  color: var(--color-text);
  min-width: 180px;
  outline: none;
  transition: border-color 150ms;
}

.stock-search:focus { border-color: var(--color-primary); }

/* List */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stock-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  transition: box-shadow 150ms;
}

.stock-item:hover { box-shadow: var(--shadow-sm); }

.stock-item--expired { border-left: 3px solid var(--color-danger); }
.stock-item--expiring { border-left: 3px solid var(--color-warning); }
.stock-item--consumed { opacity: 0.55; }
.stock-item--jete     { opacity: 0.45; }

.stock-item__main { display: flex; flex-direction: column; gap: 0.25rem; }

.stock-item__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.stock-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.stock-item__lot {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-family: monospace;
  background: var(--color-surface-2);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--color-border);
}

.stock-item__dlc {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.stock-item__dlc--ok     { background: var(--color-success-soft); color: #15803d; }
.stock-item__dlc--warn   { background: var(--color-warning-soft); color: #92400e; }
.stock-item__dlc--danger { background: var(--color-danger-soft);  color: #b91c1c; }
.stock-item__dlc--none   { background: var(--color-surface-2);    color: var(--color-text-muted); border: 1px solid var(--color-border); }

.stock-item__date {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.stock-item__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}

.stock-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
}

.stock-status-badge--en_stock { background: var(--color-success-soft); color: #15803d; }
.stock-status-badge--consomme { background: var(--color-surface-2); color: var(--color-text-muted); border: 1px solid var(--color-border); }
.stock-status-badge--jete     { background: var(--color-danger-soft); color: #b91c1c; }

.stock-action-btn {
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-app);
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 140ms;
  white-space: nowrap;
}

.stock-action-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.stock-action-btn--consomme:hover { border-color: var(--color-success); color: var(--color-success); }
.stock-action-btn--jete:hover     { border-color: var(--color-danger);  color: var(--color-danger); }
.stock-action-btn--restore:hover  { border-color: var(--color-accent);  color: var(--color-accent); }

.stock-action-btn .material-symbols-rounded { font-size: 0.9rem; }

.stock-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.stock-empty .material-symbols-rounded {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

/* Photo miniature */
.stock-item__photo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .stock-stats { grid-template-columns: repeat(2, 1fr); }
  .stock-search { min-width: 120px; width: 100%; margin-left: 0; }
  .stock-item { grid-template-columns: 1fr; }
  .stock-item__actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — STATISTIQUES RÉSA 30 DERNIERS JOURS
══════════════════════════════════════════════════════════════ */
.dash-resa-30d {
  margin-top: 1.05rem;
  padding-top: 0.9rem;
  border-top: 1.5px solid rgba(0, 0, 0, 0.07);
}

.dash-resa-30d--loading .dash-resa-30d__header {
  color: var(--color-text-light);
  animation: dash30d-pulse 1.5s ease-in-out infinite;
}

@keyframes dash30d-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.dash-resa-30d__header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.8rem;
}

.dash-resa-30d__header .material-symbols-rounded { font-size: 0.95rem; }

.dash-resa-30d__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.dash-resa-30d__kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.65rem 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.dash-resa-30d__kpi .material-symbols-rounded { font-size: 1rem; opacity: 0.8; }

.dash-resa-30d__kpi--blue   { background: #EFF6FF; }
.dash-resa-30d__kpi--green  { background: #F0FDF4; }
.dash-resa-30d__kpi--orange { background: #FFF7ED; }

.dash-resa-30d__kpi--blue   .material-symbols-rounded { color: #3B82F6; }
.dash-resa-30d__kpi--green  .material-symbols-rounded { color: #10B981; }
.dash-resa-30d__kpi--orange .material-symbols-rounded { color: #F97316; }

.dash-resa-30d__kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.dash-resa-30d__kpi-lbl {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.dash-resa-30d__kpi-pct {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.08rem;
}

.dash-resa-30d__spark {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0.85rem;
}

.dash-resa-30d__spark-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.dash-resa-30d__spark-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
}

.dash-resa-30d__spark-legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sleg {
  display: inline-block;
  width: 14px;
  height: 2.5px;
  border-radius: 2px;
  margin-right: 0.1rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.sleg--blue   { background: #3B82F6; }
.sleg--orange { background: repeating-linear-gradient(90deg, #F97316 0, #F97316 4px, transparent 4px, transparent 7px); }

.dash-resa-30d__spark-chart {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.dash-resa-30d__spark-chart > svg {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
}

.dash-resa-30d__spark-axis {
  position: relative;
  height: 1.15rem;
  flex-shrink: 0;
}

.dash-resa-30d__spark-axis > span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
  line-height: 1.15rem;
}

/* Crosshair vertical */
.dash-resa-30d__crosshair {
  position: absolute;
  top: 0;
  bottom: 1.15rem;
  width: 1px;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transform: translateX(-50%);
}

/* Tooltip hover/touch */
.dash-resa-30d__tooltip {
  position: absolute;
  top: 0.25rem;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 7px;
  padding: 0.22rem 0.5rem 0.28rem;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.dtt-date  { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.75); }
.dtt-val   { font-size: 0.76rem; font-weight: 800; line-height: 1.2; }
.dtt-val--blue   { color: #93C5FD; }
.dtt-val--orange { color: #FED7AA; }

/* Layout côte à côte : stats du jour (gauche) + stats 30 j (droite) */
.dashboard-resa-today__body {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.dashboard-resa-today__body > .resa-stat-cards {
  flex-shrink: 0;
}

.dashboard-resa-today__body > .dash-resa-30d {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  padding-left: 1.25rem;
  border-left: 1.5px solid rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .dashboard-resa-today__body {
    flex-direction: column;
  }
  .dashboard-resa-today__body > .resa-stat-cards {
    width: 100%;
  }
  .dashboard-resa-today__body > .dash-resa-30d {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1.5px solid rgba(0, 0, 0, 0.07);
    padding-left: 0;
    border-left: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   TAGS STATUT LIGNES RÉSA (F = Facturé, MDC = Mis de côté)
══════════════════════════════════════════════════════════════ */
.resa-statut-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1.3;
  white-space: nowrap;
}

.resa-statut-tag--f {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.resa-statut-tag--mdc {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

/* ══════════════════════════════════════════════════════════════
   NOTIFICATIONS POINTAGE
══════════════════════════════════════════════════════════════ */
#badge-notif-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-height, 76px) + max(10px, env(safe-area-inset-bottom, 0px)) + 0.75rem);
  right: 1.25rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  width: 310px;
}

@media (min-width: 768px) {
  #badge-notif-container {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

.badge-notif {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  pointer-events: all;
  opacity: 0;
  transform: translateX(calc(100% + 2rem));
  transition: opacity 0.35s cubic-bezier(.22,1,.36,1), transform 0.35s cubic-bezier(.22,1,.36,1);
  font-family: var(--font-app);
}

.badge-notif--visible {
  opacity: 1;
  transform: translateX(0);
}

.badge-notif--removing {
  opacity: 0;
  transform: translateX(calc(100% + 2rem));
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── En-tête sombre ── */
.badge-notif__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem 0.6rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.badge-notif__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.badge-notif__header-text {
  flex: 1;
  min-width: 0;
}

.badge-notif__label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}

.badge-notif__label .material-symbols-rounded {
  font-size: 0.8rem !important;
}

.badge-notif__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #f1f5f9;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-notif__close {
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}

.badge-notif__close:hover {
  color: #f1f5f9;
  background: rgba(255,255,255,0.15);
}

.badge-notif__close .material-symbols-rounded {
  font-size: 1rem !important;
}

/* ── Corps ── */
.badge-notif__body {
  padding: 0.6rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.badge-notif__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.22rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.badge-notif__row:last-child {
  border-bottom: none;
}

.badge-notif__row-icon {
  color: #94a3b8;
  font-size: 0.85rem !important;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

.badge-notif__row-value {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.badge-notif__row-value code {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-notif__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
}

.badge-notif__chip--green {
  background: #dcfce7;
  color: #166534;
}

.badge-notif__chip--blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-notif__chip--purple {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-notif__chip--orange {
  background: #fff7ed;
  color: #c2410c;
}

/* ── Barre de progression timer ── */
.badge-notif__timer {
  height: 3px;
  background: #e2e8f0;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.badge-notif__timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #34d399);
  border-radius: inherit;
  transform-origin: left;
  animation: notif-timer linear forwards;
}

@keyframes notif-timer {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS ENTRÉE
══════════════════════════════════════════════════════════════ */
.page-section.active {
  animation: section-in 0.24s ease-out;
}

@keyframes section-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
