/*
 * Socle du back-office : tokens (ex-globals.css shadcn) + composants simples qui
 * remplaçaient Tailwind/shadcn côté Next (bouton, carte, badge, modale, champs).
 * Les écrans utilisent parcours.css (classes v-*), copié tel quel depuis le frontend Next.
 */
:root {
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --border: 214.3 31.8% 91.4%;
  --destructive: 0 84.2% 60.2%;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: hsl(var(--foreground)); background: #f4f6f9; -webkit-font-smoothing: antialiased; }
a { color: hsl(var(--primary)); }
h1, h2, h3, h4 { font-weight: 700; }
input, select, textarea, button { font: inherit; color: inherit; }
input.v-input, select.v-input { width: 100%; }
textarea.v-textarea { width: 100%; resize: vertical; }
input.v-chip { border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bouton */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-outline { background: #fff; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
.btn-outline:hover { background: hsl(var(--muted)); filter: none; }
.btn-danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* Carte */
.card { background: #fff; border: 1px solid hsl(var(--border)); border-radius: 14px; padding: 18px; }

/* Badge */
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.badge-secondary { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.badge-outline { background: transparent; color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); }
.badge-destructive { background: #fee2e2; color: #b91c1c; }

/* Messages */
.alert { padding: 10px 14px; border-radius: 10px; font-size: 14px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }

/* Modale : <dialog> natif */
dialog.modal { border: 0; border-radius: 16px; padding: 22px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(15, 23, 42, .2); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .4); }
dialog.modal h3 { margin: 0 0 14px; font-size: 18px; }

/* Menus déroulants de la barre du haut : <details> natif */
details.dropdown { position: relative; }
details.dropdown > summary { list-style: none; cursor: pointer; }
details.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); overflow: hidden; }
.dropdown-panel .head { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; }
.dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 14px; text-align: left; text-decoration: none; color: inherit; }
.dropdown-item:hover { background: hsl(var(--muted)); }
.dropdown-item.unread { background: #f0f7ff; }
.dropdown-item.danger { color: #b91c1c; }

/* Interrupteur (checkbox stylée en v-switch) */
input.v-switch { appearance: none; -webkit-appearance: none; margin: 0; }
input.v-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
input.v-switch:checked { background: hsl(var(--primary)); }
input.v-switch:checked::after { left: 19px; }
