/* © Group Valérian — Tous droits réservés. */
:root {
  --bg: #f4f6fb; --card: #fff; --ink: #1d2433; --muted: #6b7488; --line: #e1e5ee;
  --brand: #1f4fd8; --brand-d: #173ba3; --ok: #1a8a4a; --warn: #b7791f; --err: #c0392b;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .75rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .85rem; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.topbar nav a { text-decoration: none; color: var(--muted); padding: .25rem .1rem; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a.active { color: var(--ink); border-color: var(--brand); }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
button.link:hover { color: var(--err); }
.container { width: 100%; max-width: 1040px; margin: 1.5rem auto; padding: 0 1rem; flex: 1; }
.footer { text-align: center; padding: 1.25rem 1rem; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); background: var(--card); }
.footer p { margin: 0; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { font-size: 1.9rem; font-weight: 700; }
.stat small { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.muted { color: var(--muted); }
.auth-box { max-width: 440px; margin: 3rem auto; }
label { display: block; font-weight: 600; margin: .8rem 0 .25rem; font-size: .92rem; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.btn { display: inline-block; padding: .6rem 1.1rem; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 1rem; }
.btn:hover { background: var(--brand-d); }
.btn.sm { padding: .3rem .7rem; font-size: .88rem; margin: 0; }
.btn.alt { background: #e9edf7; color: var(--ink); }
.btn.alt:hover { background: #dbe1f1; }
.btn.danger { background: var(--err); }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: #e8f6ee; border-color: #b6e2c7; color: #145c33; }
.alert-error { background: #fdecea; border-color: #f5c2bd; color: #8f2318; }
.alert-warning { background: #fff6e0; border-color: #f1d9a0; color: #7a5412; }
.alert-info { background: #e9f0ff; border-color: #bfd0fa; color: #1c3a8a; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e9edf7; color: var(--ink); }
.badge.ok { background: #dff3e7; color: #145c33; } .badge.warn { background: #fff0cc; color: #7a5412; } .badge.err { background: #fbdcd8; color: #8f2318; }
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.subnav a { padding: .35rem .8rem; border-radius: 999px; background: #e9edf7; color: var(--ink); text-decoration: none; font-size: .9rem; }
.subnav a.active { background: var(--brand); color: #fff; }
.meal { border-left: 4px solid var(--brand); }
.meal.done { border-left-color: var(--ok); } .meal.closed { border-left-color: var(--line); opacity: .85; }
.meal h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.meal ul { margin: .4rem 0; padding-left: 1.1rem; }
.meal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.secret { font: 600 1.1rem/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; word-break: break-all; background: #f1f4fb; padding: .6rem .8rem; border-radius: 8px; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; font: 600 1rem ui-monospace, Menlo, Consolas, monospace; }
.codes span { background: #f1f4fb; padding: .4rem .6rem; border-radius: 6px; text-align: center; }
#qrcode { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.code-input { font: 600 1.6rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .3em; text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pw-box { font: 700 1.25rem ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 2px dashed var(--warn); padding: .5rem .8rem; border-radius: 8px; display: inline-block; margin: .4rem 0; user-select: all; }
.brand-img { height: 36px; width: 36px; object-fit: contain; border-radius: 50%; }
.auth-logo { text-align: center; margin-bottom: 1rem; }
.auth-logo img { height: 110px; width: 110px; object-fit: contain; border-radius: 50%; }
.struct-tag { font-size: .72rem; font-weight: 600; background: #e9edf7; color: var(--muted); padding: .1rem .55rem; border-radius: 999px; margin-left: .25rem; }
.filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filter select, .filter input[type=text] { width: auto; min-width: 180px; }
@media (max-width: 600px) { .topbar { padding: .6rem .8rem; } h1 { font-size: 1.35rem; } }
@media print { .topbar, .footer, .no-print { display: none !important; } body { background: #fff; } .card { border: 0; } }
