/* Page téléphone "Ajout rapide" : blanc et orange, comme l'application bureau. Toujours en clair.
   Polices du système uniquement : aucune ressource externe (CSP stricte, voir _headers). */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --fg: #10233f; --muted: #6b7a90; --line: #e6e9f0;
  --accent: #ee580c; --accent-dark: #c9450a; --accent-soft: #fff3ec;
  --ok: #15803d; --ok-soft: #e9f7ef; --danger: #dc2626; --danger-soft: #fdecec;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent }
html, body { margin: 0 }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; min-height: 100vh; }

/* Bandeau orange en haut, comme la barre de l'application */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 190px; z-index: -1;
  background: linear-gradient(135deg, #f26a1f 0%, var(--accent) 55%, var(--accent-dark) 100%);
  border-radius: 0 0 28px 28px; }

.wrap { max-width: 460px; margin: 0 auto; padding-block: max(18px, env(safe-area-inset-top, 0px)) 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 16px; }
#scrAdd { display: flex; flex-direction: column; gap: 16px; }
#scrAdd[hidden], [hidden] { display: none !important; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .02em; }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; padding: 3px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

h1 { font-size: 22px; margin: 0; }
.center { text-align: center; align-items: center; }
.center p { color: var(--muted); line-height: 1.5; margin: 0; }
.big-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); display: grid; place-items: center; }
.big-icon svg { width: 34px; height: 34px; fill: var(--accent); }

header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; padding: 4px 2px 6px; }
.shop { display: flex; flex-direction: column; min-width: 0; }
.shop small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.shop strong { font-size: 24px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ok);
  background: #fff; padding: 7px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.10); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live.off { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 10px 30px rgba(16, 35, 63, .08); }

.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; border: 2px dashed #f6b48f;
  background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: transform .1s; }
.photo:active { transform: scale(.99); }
.photo.has { border: 0; background: #000; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .cta { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--accent-dark); font-weight: 800; font-size: 17px; padding: 12px; }
.photo .cta .ring { width: 68px; height: 68px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(238, 88, 12, .35); }
.photo .cta svg { width: 32px; height: 32px; fill: #fff; }
.photo .retake { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.95); color: var(--accent-dark); font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 999px; }

label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
input[type=text] { font: inherit; font-size: 18px; font-weight: 600; color: var(--fg); background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input[type=text]::placeholder { color: #a7b1c2; font-weight: 500; }
input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(238, 88, 12, .15); }
button:focus-visible, .photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { margin: -8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.err { color: var(--danger); background: var(--danger-soft); font-size: 14px; font-weight: 700; margin: 0; padding: 10px 12px; border-radius: 12px; }
.center .err { margin-top: 4px; }

button.add { font: inherit; font-size: 18px; font-weight: 800; color: #fff; border: 0; border-radius: 16px; padding: 17px; cursor: pointer;
  background: linear-gradient(135deg, #f26a1f, var(--accent-dark)); box-shadow: 0 10px 24px rgba(238, 88, 12, .35); transition: transform .1s, box-shadow .1s; }
button.add:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(238, 88, 12, .3); }
button.add:disabled { opacity: .6; cursor: progress; }

.toast { display: flex; gap: 10px; align-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 700; border-radius: 14px; padding: 13px 14px; border: 1px solid #c7ebd4; }
.toast::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 14px; }

.list-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 10px; }
.list-head h2 { font-size: 17px; margin: 0; }
.count { font-weight: 800; font-size: 14px; color: var(--accent-dark); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }
ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; box-shadow: 0 4px 14px rgba(16, 35, 63, .05); }
.thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--accent-soft) center / cover no-repeat; }
.txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.txt b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt .meta { color: var(--fg); font-size: 14px; font-weight: 700; }
.txt .meta span { color: var(--muted); font-weight: 600; }
.txt .state { font-size: 12px; font-weight: 800; color: var(--ok); }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 18px; border: 1.5px dashed var(--line); border-radius: 16px; background: var(--surface); }

footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: pop .25s ease-out } @keyframes pop { from { transform: translateY(-4px); opacity: .4 } } }
