/* ---------- Espace admin ---------- */
.admin { font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 28px; }
.card h3 { margin: 0 0 14px; font-size: 22px; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 10px; z-index: 300; transition: all 0.3s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.muted { color: var(--muted); }
.login { min-height: 100svh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, #1f1b12, var(--bg) 60%); }
.login-card { width: 100%; max-width: 380px; }

.a-header { position: sticky; top: 0; z-index: 20; background: rgba(15,14,12,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
.a-brand { font-family: var(--serif); font-size: 20px; white-space: nowrap; }
.a-brand span { color: var(--gold); font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; margin-left: 6px; }
.a-tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.a-tabs button { background: none; border: 0; color: var(--muted); padding: 9px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; white-space: nowrap; font-size: 14px; }
.a-tabs button:hover { color: var(--text); }
.a-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--gold); }
.a-right { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; width: 38px; height: 38px; cursor: pointer; }
.icon-btn.off { opacity: 0.4; }
.pill { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
@media (max-width: 700px) { .a-tabs { order: 3; flex-basis: 100%; } .a-brand { flex: 1; } }

.a-main { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }
.a-main h2 { font-size: 26px; margin: 0 0 14px; }
.day-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.day-bar h2 { margin: 0 0 0 8px; font-size: 22px; flex: 1; min-width: 200px; }
.day-bar input[type="date"] { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 10px; color-scheme: dark; }
.day-actions { display: flex; gap: 8px; }
input[type="date"], input[type="time"] { color-scheme: dark; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--serif); font-size: 26px; color: var(--gold); }
.stat span { color: var(--muted); font-size: 13px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }

.svc-title { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 22px 0 8px; display: flex; justify-content: space-between; }
.resa { display: grid; grid-template-columns: 64px 54px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; transition: border-color 0.2s; }
.resa.new { border-color: var(--gold); animation: flash 1.2s ease 3; }
@keyframes flash { 50% { background: rgba(219,184,68,0.15); } }
.resa .time { font-family: var(--serif); font-size: 22px; }
.resa .guests { background: var(--surface-2); border-radius: 8px; text-align: center; padding: 6px 0; font-weight: 700; }
.resa .guests small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.resa .who b { font-size: 17px; }
.resa .who a { color: var(--text); }
.resa .who .meta { color: var(--muted); font-size: 13px; }
.resa .who .note { color: var(--gold-2); font-size: 14px; margin-top: 4px; }
.resa .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.resa .acts button { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; font-weight: 700; }
.resa .acts button:hover { border-color: var(--gold); }
.resa.st-arrivee { border-left: 4px solid var(--green); }
.resa.st-absent, .resa.st-annulee { opacity: 0.5; }
.resa.st-annulee .who b { text-decoration: line-through; }
.status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.status.confirmee { background: rgba(219,184,68,0.15); color: var(--gold); }
.status.arrivee { background: rgba(91,185,116,0.15); color: var(--green); }
.status.absent, .status.annulee { background: rgba(200,68,47,0.15); color: #ef8f7c; }
.src { font-size: 11px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 6px; padding: 0 6px; margin-left: 4px; }
@media (max-width: 640px) {
  .resa { grid-template-columns: 56px 1fr auto; }
  .resa .guests { grid-column: 3; grid-row: 1; padding: 4px 8px; }
  .resa .who { grid-column: 1 / -1; }
  .resa .acts { grid-column: 1 / -1; justify-content: flex-start; }
}
.empty { text-align: center; color: var(--muted); padding: 40px 10px; border: 1px dashed var(--line-soft); border-radius: 12px; }

.up-day { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; cursor: pointer; }
.up-day:hover { border-color: var(--line); }
.up-day .d { flex: 1; text-transform: capitalize; font-weight: 700; }
.up-day .n { color: var(--muted); font-size: 14px; }

.msg { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.msg.unread { border-color: var(--gold); }
.msg .head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg .body { white-space: pre-wrap; margin-top: 8px; }

.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 18px; }
.inline-form .field { min-width: 150px; }
.inline-form .grow { flex: 1; }
.closure { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 6px; }
.closure .d { flex: 1; text-transform: capitalize; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.settings-grid .full { grid-column: 1 / -1; }
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr 1fr; } }

.a-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(560px, calc(100% - 32px)); }
.a-dialog::backdrop { background: rgba(0,0,0,0.7); }

@media print {
  body.admin { background: #fff; color: #000; }
  .a-header, .day-bar button, .day-bar input, .resa .acts, .toast, .day-actions { display: none !important; }
  .a-main { padding: 0; }
  .resa, .stat { background: #fff; border: 1px solid #999; break-inside: avoid; }
  .resa .who a, .resa .who .meta, .stat span { color: #000; }
  .stat b, .svc-title, .resa .who .note { color: #000; }
  .view:not(#view-day) { display: none !important; }
}
