/* Page du téléphone : mêmes couleurs que l'appli PC (bleu nuit, bleu MediaVior) */
:root {
  color-scheme: dark;
  --ink: #121821;
  --surface: #1B232E;
  --raised: #212B38;
  --line: #3A4453;
  --accent: #3B8CC2;
  --accent-bright: #58A3D6;
  --accent-dim: #2C6690;
  --paper: #E9ECF1;
  --dim: #9BA3B0;
  --muted: #5D6676;
  --ok: #57A98F;
  --danger: #E0674F;
  --c-son: #E8B54A;
  --c-video: #E0674F;
  --c-zip: #3B8CC2;
  --r: 12px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ink: #F3F5F8;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --line: #D5DBE3;
    --accent: #2F7CAC;
    --accent-bright: #256A95;
    --accent-dim: #8DB4CF;
    --paper: #17202B;
    --dim: #5E6876;
    --muted: #98A2AF;
    --ok: #2F8F73;
    --danger: #C4533A;
    --c-son: #C98A12;
    --c-video: #C4533A;
    --c-zip: #2F7CAC;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--paper); }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
}
[hidden] { display: none !important; }
a { color: var(--accent); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.pill {
  font-size: 0.78rem; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--dim); white-space: nowrap;
}
.pill::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); margin-right: 6px; vertical-align: 1px;
}
.pill.is-on { color: var(--paper); }
.pill.is-on::before { background: var(--ok); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; margin-bottom: 14px;
}
h1 { font-size: 1.2rem; margin: 0 0 12px; }
h2 { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; }
.label { display: block; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.hint { font-size: 0.85rem; line-height: 1.5; color: var(--dim); margin: 10px 0 0; }
.error { color: var(--danger); font-size: 0.9rem; margin: 12px 0 0; }

.steps { margin: 0; padding-left: 22px; line-height: 1.6; }
.steps li { margin: 4px 0; }
.ios-share {
  width: 20px; height: 20px; vertical-align: -4px; fill: none; stroke: var(--accent);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.row { display: flex; gap: 8px; }
input[type="url"] {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; /* 16px : pas de zoom sur iPhone */
  padding: 12px 14px; color: var(--paper); background: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
}
input[type="url"]:focus { outline: none; border-color: var(--accent); }

.seg { display: flex; gap: 8px; margin-top: 12px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); color: var(--dim); font-size: 0.92rem;
}
.seg input:checked + span { border-color: var(--accent); color: var(--paper); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn {
  font: inherit; font-size: 0.95rem; font-weight: 500; padding: 12px 16px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn--solid { width: 100%; margin-top: 14px; background: var(--accent); color: #fff; font-weight: 600; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent-dim); }
.btn--sm { padding: 7px 11px; font-size: 0.84rem; }
.btn-link {
  background: none; border: 0; padding: 6px 2px; font: inherit; font-size: 0.85rem;
  color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.install__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.install__head img { border-radius: 10px; }
.install__head .hint { margin-top: 2px; }
.install .btn--solid { margin-top: 4px; }
.install .steps { margin-top: 4px; }

.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list:first-child .item:first-child { border-top: 0; }
.item__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--c-video); }
.item__dot--audio { background: var(--c-son); }
.item__dot--archive { background: var(--c-zip); }
.item__body { flex: 1; min-width: 0; }
.item__title { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__meta { font-size: 0.78rem; color: var(--dim); margin-top: 2px; }
.item__meta.is-error { color: var(--danger); }
.bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }
.item__actions { display: flex; gap: 6px; flex: none; }

.foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding: 4px 2px; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 528px; margin: 0 auto; padding: 12px 16px; border-radius: 10px;
  background: var(--raised); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 0.92rem;
}
