/* Dari Expo – scanner des hôtesses (smartphone). */
:root { --navy: #20325E; --ink: #1B2233; --soft: #5B6375; --line: #E3E6EE; --bg: #F3F4F8; --ok: #1F7A4D; --warn: #B76E00; --err: #B42318; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.sc-head { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff; padding: calc(env(safe-area-inset-top) + 12px) 16px 0; }
.sc-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sc-brand { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.sc-edition { font-size: 18px; font-weight: 700; }
.sc-out { color: #fff; opacity: .8; font-size: 13px; text-decoration: underline; }
.sc-live { margin: 12px 0 10px; background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; }
.sc-live__slot { display: flex; justify-content: space-between; font-size: 14px; }
.sc-live__slot strong { font-size: 18px; }
.sc-live__bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); margin: 8px 0 6px; overflow: hidden; }
.sc-live__bar i { display: block; height: 100%; width: 0; background: #7BD3A3; transition: width .4s; }
.sc-live__bar i.is-high { background: #F2B84B; }
.sc-live__bar i.is-full { background: #F07A6A; }
.sc-live__today { font-size: 13px; opacity: .85; }
.sc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
.sc-tabs button { appearance: none; border: 0; background: none; color: rgba(255,255,255,.7); padding: 12px 4px; font-weight: 700; border-bottom: 3px solid transparent; }
.sc-tabs button.is-on { color: #fff; border-color: #fff; }

.sc-panel { padding: 16px; }
.sc-cam { position: relative; background: #0d1426; border-radius: 16px; overflow: hidden; min-height: 280px; display: grid; place-items: center; }
#sc-reader { width: 100%; }
#sc-reader video { width: 100% !important; display: block; }
.sc-cam__idle { position: absolute; color: rgba(255,255,255,.6); margin: 0; }
.is-cam .sc-cam__idle { display: none; }
.sc-camctl { display: flex; gap: 10px; margin-top: 12px; }
.sc-camctl .sc-btn { flex: 1; }

.sc-btn { appearance: none; display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 12px 18px; border-radius: 12px; border: 2px solid var(--navy); background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.sc-btn[disabled] { opacity: .5; }
.sc-btn--ghost { background: #fff; color: var(--navy); }
.sc-btn--warn { background: var(--warn); border-color: var(--warn); }
.sc-btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.sc-btn--wide { width: 100%; margin-top: 12px; }

.sc-field { display: block; margin-bottom: 12px; }
.sc-field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.sc-field input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px; }
.sc-field input:focus { outline: none; border-color: var(--navy); }
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.sc-hint { color: var(--soft); font-size: 14px; margin: 0 0 14px; }

.sc-list { list-style: none; margin: 0; padding: 0; }
.sc-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.sc-list li span { display: block; color: var(--soft); font-size: 13px; }
.sc-in { color: var(--ok); white-space: nowrap; }
.sc-empty { color: var(--soft); display: block !important; }

/* Résultat */
.sc-result { position: fixed; inset: 0; z-index: 20; background: rgba(13,20,38,.55); display: flex; align-items: flex-end; }
.sc-result__card { width: 100%; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 18px calc(env(safe-area-inset-bottom) + 18px); border-top: 10px solid var(--ok); max-height: 92vh; overflow: auto; }
.sc-result__card[data-state="warn"] { border-color: var(--warn); }
.sc-result__card[data-state="error"] { border-color: var(--err); }
.sc-result__card[data-state="idle"] { border-color: var(--soft); }
.sc-result__badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: var(--ok); }
[data-state="warn"] .sc-result__badge { background: var(--warn); }
[data-state="error"] .sc-result__badge { background: var(--err); }
[data-state="idle"] .sc-result__badge { background: var(--soft); }
.sc-result__title { font-size: 26px; font-weight: 800; margin-top: 10px; }
[data-state="ok"] .sc-result__title { color: var(--ok); }
[data-state="warn"] .sc-result__title { color: var(--warn); }
[data-state="error"] .sc-result__title { color: var(--err); }
.sc-result__msg { color: var(--soft); margin-top: 2px; }
.sc-result__who { margin-top: 14px; }
.sc-result__who strong { display: block; font-size: 22px; }
.sc-result__who small { display: block; color: var(--soft); }
.sc-result__who span { display: block; color: var(--navy); font-weight: 600; margin-top: 2px; }
.sc-group { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.sc-group li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sc-group li b { color: var(--soft); font-weight: 600; font-size: 13px; white-space: nowrap; }
.sc-group li.is-in b { color: var(--ok); }
.sc-group em { font-style: normal; font-size: 12px; color: var(--soft); }
.sc-result__actions { display: grid; gap: 10px; margin-top: 16px; }
.sc-result__actions .sc-btn--wide { margin-top: 0; }

/* Connexion */
.sc-login { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 48px) 20px 40px; }
.sc-login .sc-brand { color: var(--navy); opacity: 1; }
.sc-login h1 { font-size: 26px; margin: 6px 0 8px; }
.sc-login p { color: var(--soft); }
.sc-login form p { margin: 0 0 12px; }
.sc-login label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 14px; }
.sc-login input[type=text], .sc-login input[type=password] { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 17px; }
.sc-login .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.sc-login input[type=submit] { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; font-size: 16px; }
.sc-warn { color: var(--err) !important; }
