/* Mise en page de Galowade® Life, pensée d'abord pour le téléphone. Couleurs : charte.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-body); }
a { color: var(--brand); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 104px; }
.topbar { position: sticky; top: 0; z-index: 10; }
header.top { background: var(--brand); color: var(--brand-ink); padding: 12px 16px; }
header.top .in { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
header.top .logo { font-family: var(--font-title); font-weight: 700; letter-spacing: .02em; font-size: 18px; color: var(--brand-ink); text-decoration: none; }
header.top .logo span { font-weight: 400; font-style: italic; }
header.top .who { margin-left: auto; font-size: 14px; opacity: .9; text-align: right; }
header.top .who span { font-size: 12px; }
nav.main { display: none; }
nav.main a, nav.tabbar a { text-decoration: none; color: inherit; }
nav.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: flex-end; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
nav.tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); padding: 4px 0; min-height: 48px; justify-content: center; }
nav.tabbar a.on { color: var(--brand); font-weight: 600; }
nav.tabbar svg { width: 24px; height: 24px; }
nav.tabbar .mic { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; margin-top: -26px; box-shadow: var(--shadow); }
@media (min-width: 760px) {
  nav.tabbar { display: none; }
  nav.main { display: flex; gap: 4px; margin-left: 16px; }
  nav.main a { padding: 6px 12px; border-radius: 8px; color: var(--brand-ink); opacity: .85; }
  nav.main a.on, nav.main a:hover { background: rgba(128,128,128,.25); opacity: 1; }
  .wrap { padding-bottom: 32px; }
}
h1, h2 { font-family: var(--font-title); }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
.muted { color: var(--muted); font-size: 14px; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.flash { background: var(--ok-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0; word-break: break-word; }
.pause { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); padding: 10px 16px; text-align: center; font-weight: 600; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
button, .btn { font: inherit; font-weight: 600; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.ko { color: var(--ko); border-color: var(--ko); background: transparent; }
button.small { min-height: 40px; padding: 6px 12px; font-size: 14px; }
button.wide, .btn.wide { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 4px; margin: 0 -16px; }
.chip { white-space: nowrap; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 14px; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.tag.horse { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.day { font-family: var(--font-title); font-size: 16px; margin: 20px 0 4px; color: var(--muted); }
.entry { display: grid; gap: 6px; }
.entry .head { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.entry .cost { margin-left: auto; font-weight: 600; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tools form { margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.recorder { text-align: center; padding: 24px 16px; }
.recorder .big { width: 132px; height: 132px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); border: 0; font-size: 15px; margin: 8px auto; flex-direction: column; }
.recorder .big svg { width: 44px; height: 44px; }
.recorder .big.live { background: #c62828; color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(198,40,40,.15); } }
@media (prefers-reduced-motion: reduce) { .recorder .big.live { animation: none; } }
.timer { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; }
.meter { height: 10px; background: var(--bg); border-radius: 5px; margin: 12px 0 6px; overflow: hidden; border: 1px solid var(--line); }
.meter > div { height: 100%; background: var(--brand); }
.big-number { font-family: var(--font-title); font-size: 40px; font-weight: 700; line-height: 1.1; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: .08em; padding: 8px 12px; border: 2px dashed var(--brand); border-radius: 10px; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stats .card { margin: 0; }
.stats b { display: block; font-size: 26px; font-family: var(--font-title); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; flex: none; }
.proposal { border-left: 4px solid var(--brand); }
.proposal.off { opacity: .55; border-left-color: var(--line); }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 8px 0; }
.segmented label { flex: 1; margin: 0; text-align: center; padding: 12px 8px; cursor: pointer; font-weight: 600; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented input:checked + span { text-decoration: underline; text-underline-offset: 6px; }
.segmented label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }
.ok { color: var(--ok); } .ko { color: var(--ko); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
details > summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 8px 0; min-height: 40px; }
/* Bouton d'arrêt d'urgence (administration) */
.emergency { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); margin: 0; }
.emergency .stop { background: #c62828; color: #fff; border-color: #c62828; width: 100%; max-width: 880px; font-size: 17px; letter-spacing: .03em; }
.emergency.on { background: #c62828; color: #fff; padding: 14px 16px; text-align: center; }
.emergency.on strong { font-size: 20px; width: 100%; }
.emergency.on button { background: #fff; color: #c62828; border-color: #fff; }
.emergency .confirm { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 600; margin: 0; color: inherit; }
.emergency .confirm input { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; }
