/* Page de partage : sombre par défaut, claire si le système le demande. */
:root {
  color-scheme: dark;
  --fond: #111214;
  --surface: #1c1e22;
  --bordure: #30333a;
  --bordure-forte: #5a5e67;
  --texte: #ececee;
  --texte-doux: #a3a6ad;
  --actif-fond: #ececee;
  --actif-texte: #111214;
  --focus: #8ab4ff;
  --rouge: #ff5a4f;
  --bandeau-fond: #33201e;
  --bandeau-texte: #ffd7d2;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --fond: #f5f5f3;
    --surface: #ffffff;
    --bordure: #dcdde0;
    --bordure-forte: #9a9da4;
    --texte: #17181b;
    --texte-doux: #5d6169;
    --actif-fond: #17181b;
    --actif-texte: #ffffff;
    --focus: #2f6fdb;
    --rouge: #d63a2f;
    --bandeau-fond: #fcebe8;
    --bandeau-texte: #7a1f17;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

@media (max-width: 640px) {
  .page { padding: 16px 16px 32px; }
}

.cadre {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  background: #000;
}

.bandeau {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bandeau-fond);
  color: var(--bandeau-texte);
  font-size: 15px;
}

.bandeau[hidden], .erreur[hidden], [hidden] { display: none; }

.point {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rouge);
  animation: pulsation 1.6s ease-in-out infinite;
}

@keyframes pulsation { 50% { opacity: 0.3; } }

.erreur {
  margin: 12px 0 0;
  color: var(--rouge);
}

.commandes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.vitesses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bouton {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--surface);
  color: var(--texte);
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.bouton:hover { border-color: var(--bordure-forte); }

.bouton[aria-pressed="true"] {
  background: var(--actif-fond);
  border-color: var(--actif-fond);
  color: var(--actif-texte);
}

.bouton:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1 {
  margin: 20px 0 4px;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.infos {
  margin: 0;
  color: var(--texte-doux);
}

#duree:not(:first-child)::before {
  content: "·";
  margin: 0 0.5em;
}

.aide {
  margin: 28px 0 0;
  color: var(--texte-doux);
  font-size: 13px;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border: 1px solid var(--bordure);
  border-radius: 4px;
  font: inherit;
  text-align: center;
}

@media (hover: none) {
  .aide { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .point { animation: none; }
}

/* Pages « rien à voir ici » et erreurs */
.vide {
  padding-top: 18vh;
  text-align: center;
}

.vide p { color: var(--texte-doux); }
