/* Site getdispo.app — couleurs de la marque (constants/theme.ts). */
:root {
  --bg: #faf8f4;
  --card: #ffffff;
  --text: #231f35;
  --muted: #6e6c7e;
  --primary: #5e48e8;
  --primary-soft: #ece8fd;
  --free: #2fbf71;
  --free-soft: #e3f6ec;
  --danger: #e5484d;
  --border: #e9e5dc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161f;
    --card: #222030;
    --text: #f3f1fa;
    --muted: #9b97ac;
    --primary: #6c57f0;
    --primary-soft: #2c2750;
    --free-soft: #1d3a2b;
    --border: #322f43;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 18px;
}

.brand-name {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 22px;
}

h1 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
}

.muted { color: var(--muted); }
.small { font-size: 14px; }
.when { color: var(--primary); font-weight: 700; margin: 4px 0; }
.place { margin: 4px 0; overflow-wrap: anywhere; }

.status {
  border-left: 4px solid var(--free);
  background: var(--free-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  margin: 12px 0 0;
}

.status.off { border-color: var(--muted); background: var(--primary-soft); }

label { display: block; font-weight: 700; margin-bottom: 6px; }

input[type='text'] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.buttons { display: flex; gap: 10px; margin-top: 14px; }

button, .button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.primary { background: var(--primary); color: #fff; }
.secondary { background: var(--primary-soft); color: var(--primary); }
.selected { outline: 3px solid var(--free); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: default; }

.message { margin-top: 12px; font-weight: 600; }
.message.error { color: var(--danger); }

.stack { display: flex; flex-direction: column; gap: 10px; }

.code {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

[hidden] { display: none !important; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 10px;
}
.legal-links a { color: var(--muted); }

.lang-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; }
.lang-links a { color: var(--primary); font-weight: 700; text-decoration: none; }

.doc h2 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: var(--primary);
  margin: 28px 0 8px;
}
.doc p, .doc li { margin: 0 0 10px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 10px; }
.doc .highlight {
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
}
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 28px; }

/* Sans JavaScript : seule la version française des pages longues. */
html:not(.js) [data-lang]:not([data-lang='fr']) { display: none; }

/* Tableau de bord (étape 42, réservé à l'administrateur). */
input[type='email'] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.dashboard main { max-width: 1100px; }
.dashboard #login { max-width: 480px; margin: 0 auto 16px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dash-actions { display: flex; gap: 10px; }
.dash-actions button { min-height: 40px; flex: none; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.dash-grid .card { margin: 0; }
.dash-wide { grid-column: 1 / -1; }
.dash-title {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 6px;
}
.dash-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; }
.dash-stat { background: var(--primary-soft); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.dash-stat strong { font-family: 'Nunito', system-ui, sans-serif; font-weight: 900; font-size: 24px; color: var(--primary); }
.dash-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 10px 0 0; }
.dash-lines dt { color: var(--text); }
.dash-lines dd { margin: 0; font-weight: 800; text-align: right; }
.dash-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 10px; }
.dash-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.dash-bar { width: 100%; border-radius: 6px; background: var(--primary); }
.dash-bar-value { font-size: 12px; color: var(--muted); min-height: 15px; }
.dash-bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; align-self: flex-start; min-height: 15px; }
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th, .dash-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dash-table th:first-child, .dash-table td:first-child { text-align: left; }
.dash-table th { color: var(--muted); font-weight: 700; }
