/* Mood Levain — compléments à Pico.css. Mobile-first, aucune ressource externe. */

:root {
  --pico-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ml-max-width: 40rem;
}

body > header,
body > main,
body > footer {
  max-width: var(--ml-max-width);
}

body > header {
  padding-block: 1.25rem 0.5rem;
}

body > footer {
  padding-block: 1.5rem 2.5rem;
  font-size: 0.8125rem;
  color: var(--pico-muted-color);
}

.ml-brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pico-contrast);
}

.ml-lede {
  font-size: 1.0625rem;
  color: var(--pico-muted-color);
}

/* Arguments de la page d'accueil */
.ml-arguments {
  list-style: none;
  padding-left: 0;
  margin-block: 1.5rem;
}

.ml-arguments li {
  border-left: 3px solid var(--pico-primary);
  padding-left: 0.875rem;
  margin-bottom: 1rem;
}

/* Questionnaire */
.ml-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.25rem;
}

.ml-question {
  margin-bottom: 2rem;
}

.ml-question > legend,
.ml-question-label {
  font-weight: 600;
  margin-bottom: 0.625rem;
}

.ml-hint {
  font-size: 0.8125rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.5rem;
}

.ml-error {
  color: var(--pico-del-color);
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

.ml-info-block {
  background: var(--pico-code-background-color);
  border-radius: var(--pico-border-radius);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
}

/* Échelle 1 à 5 : radios horizontales */
.ml-scale {
  display: flex;
  gap: 0.25rem;
  justify-content: space-between;
}

.ml-scale label {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.875rem;
  margin: 0;
  cursor: pointer;
}

.ml-scale input[type="radio"] {
  display: block;
  margin: 0 auto 0.25rem;
}

.ml-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--pico-muted-color);
  margin-top: 0.25rem;
}

.ml-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ml-nav > * {
  flex: 1 1 0;
  margin-bottom: 0;
}

/* Espace personnel */
.ml-points {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.ml-qr {
  display: block;
  width: 15rem;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: var(--pico-border-radius);
}

.ml-link-box {
  word-break: break-all;
  font-family: var(--pico-font-family-monospace, monospace);
  font-size: 0.875rem;
}

.ml-code {
  font-family: var(--pico-font-family-monospace, monospace);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.ml-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ml-actions > * {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.ml-hidden {
  display: none;
}

/* Pot-de-miel : hors écran plutôt que display:none, pour piéger les robots */
.ml-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Back-office : tableaux larges défilables */
.ml-admin {
  --ml-max-width: 72rem;
}

.ml-table-scroll {
  overflow-x: auto;
}

.ml-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ml-stat {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 0.75rem 0.875rem;
}

.ml-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.ml-stat-label {
  font-size: 0.75rem;
  color: var(--pico-muted-color);
}

.ml-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ml-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.ml-filters > * {
  flex: 1 1 10rem;
  margin-bottom: 0;
}
