/* The Shift Training · styles communs */

@font-face { font-family: 'Bespoke Sans'; src: url('/fonts/BespokeSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bespoke Sans'; src: url('/fonts/BespokeSans-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bespoke Sans'; src: url('/fonts/BespokeSans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bespoke Sans'; src: url('/fonts/BespokeSans-Extrabold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F3F5F7;
  --card: #FFFFFF;
  --ink: #0E1B2A;
  --muted: #56657A;
  --line: #DDE3E9;
  --field: #C3CDD8;
  --danger: #B3261E;
  --danger-bg: #FBE9E7;
  --ok: #14532D;
  --ok-bg: #E3F1E6;
  --radius: 14px;
  /* Santé (par défaut) */
  --brand: #0067BE;
  --brand-deep: #08233F;
  --brand-soft: #E5EFF8;
  --brand-ink: #00437C;
}
body[data-theme="perf"] {
  --brand: #53565A;
  --brand-deep: #2B2D30;
  --brand-soft: #ECEDEE;
  --brand-ink: #2E3033;
}
body[data-theme="coach"] {
  --brand: #0067BE;
  --brand-deep: #08233F;
  --brand-soft: #E5EFF8;
  --brand-ink: #00437C;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Bespoke Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.noscript { padding: 24px; }
.center-screen { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }

/* Mise en page téléphone */
.phone {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand-head { display: flex; align-items: center; gap: 12px; }
.brand-head img { width: 48px; height: 48px; flex-shrink: 0; }
.eyebrow { font-size: 14px; color: var(--muted); }
.title-xl { font-size: 30px; font-weight: 700; }
.title-l { font-size: 24px; font-weight: 700; }
.lead { font-size: 16px; color: var(--muted); }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.soft { background: var(--brand-soft); }
.card h2 { font-size: 18px; font-weight: 700; }

/* Écran de connexion */
.login-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 4px 18px; }
.login-logo { width: 64px; height: 64px; }
.login-phrase { width: 100%; max-width: 380px; height: auto; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.input {
  min-height: 48px; width: 100%; padding: 0 14px;
  border: 1px solid var(--field); border-radius: 10px; background: #fff;
  font-size: 16px; font-weight: 400;
}
.input:focus { border-color: var(--brand); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }

.btn {
  min-height: 50px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:disabled { background: #8A94A3; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-link { min-height: 44px; padding: 0; background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-align: left; }
.btn-block { width: 100%; }

.msg { border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.msg-error { background: var(--danger-bg); color: var(--danger); }
.msg-ok { background: var(--ok-bg); color: var(--ok); }
.msg:empty { display: none; }

.list-clean { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.small { font-size: 13px; color: var(--muted); }
.spacer { flex: 1; }

/* Espace coach (ordinateur) */
.coach-layout { min-height: 100dvh; display: flex; flex-wrap: wrap; }
.coach-nav {
  flex: 1 1 220px; background: var(--brand-deep); color: #fff; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.coach-nav .brand-head { margin-bottom: 18px; }
.coach-nav .brand-head img { width: 44px; height: 44px; }
.coach-nav .brand-head span { font-size: 22px; font-weight: 700; }
.coach-nav a, .coach-nav button {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: #fff; text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 16px; text-align: left;
}
.coach-nav [aria-current="page"] { background: var(--brand); font-weight: 600; }
.coach-nav .soon { opacity: .55; cursor: default; }
.coach-main { flex: 999 1 560px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 16px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; font-size: 14px; }
td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
td .input { min-height: 44px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg); }
.badge-wait { background: #FCE8D2; color: #6E2C00; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .coach-main { padding: 20px 16px; }
}
