:root {
  --fond: #f6f5f1;
  --surface: #ffffff;
  --texte: #1b1f23;
  --discret: #57606a;
  --bord: #cfd0cb;
  --action: #ffcf33;
  --sur-action: #1b1f23;
  --alerte: #a32a12;
  --alerte-fond: #fdece6;
  --lien: #0b4f8a;
  --rayon: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #14171a;
    --surface: #1e2327;
    --texte: #f1f1ee;
    --discret: #aab2ba;
    --bord: #41484f;
    --alerte: #ffab94;
    --alerte-fond: #3a1e17;
    --lien: #8cc8ff;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 1.5rem 1rem 2rem;
  background: var(--fond);
  color: var(--texte);
  font: 1rem/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; line-height: 1.3; }
h3 { font-size: 1.125rem; line-height: 1.3; }
header p { margin-top: 0.5rem; color: var(--discret); }
a { color: var(--lien); }

:focus-visible { outline: 3px solid var(--lien); outline-offset: 2px; }
#resultats:focus { outline: none; }

button, input {
  min-height: 3rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--texte);
  font: inherit;
}
button { padding: 0.5rem 1rem; font-weight: 600; cursor: pointer; }

.actions { margin: 1.5rem 0; }
.principal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.5rem;
  border-color: var(--action);
  background: var(--action);
  color: var(--sur-action);
  font-size: 1.25rem;
}
.principal svg { width: 2rem; stroke: currentColor; stroke-width: 2; }
.lien {
  display: block;
  margin: 0.25rem auto 1rem;
  border: 0;
  background: none;
  color: var(--lien);
  font-weight: 400;
  text-decoration: underline;
}

label { display: block; margin-bottom: 0.25rem; }
.champ { display: flex; gap: 0.5rem; }
.champ input { flex: 1; min-width: 0; padding: 0 0.75rem; }

.message { padding: 1rem; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); }
.message p { margin-top: 0.5rem; }
.message button { margin-top: 0.75rem; }
.message.alerte { border: 2px solid var(--alerte); background: var(--alerte-fond); }
.message.alerte h2 { color: var(--alerte); }

.rappel { padding: 1.25rem 0; border-bottom: 1px solid var(--bord); }
.rappel .meta { color: var(--discret); }
.rappel dl { margin: 0.75rem 0; }
.rappel dt { margin-top: 0.5rem; font-weight: 600; }
.rappel ul { padding-left: 1.25rem; }
.suite { width: 100%; margin-top: 1rem; }

footer { margin-top: 2rem; color: var(--discret); font-size: 0.875rem; }
footer p + p { margin-top: 0.5rem; }

dialog {
  width: min(36rem, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--texte);
}
dialog::backdrop { background: rgb(0 0 0 / 0.7); }
.viseur { position: relative; margin: 1rem 0; overflow: hidden; border-radius: var(--rayon); background: #000; }
.viseur::after {
  content: "";
  position: absolute;
  inset: 30% 10%;
  border: 3px solid var(--action);
  border-radius: 0.25rem;
}
video { display: block; width: 100%; max-height: 60vh; min-height: 12rem; object-fit: cover; }
dialog button { width: 100%; margin-top: 0.75rem; }
