/* Web app des compagnons : un écran par geste, de gros boutons utilisables avec des gants, en plein soleil. */

body { background: var(--zinc-bg); }
.app { min-height: 100vh; min-height: 100dvh; }

.top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-family: var(--font-sign); font-size: 24px; font-weight: 700; line-height: 1; display: grid; }
.brand-sub { font-family: var(--font-body); font-size: 13px; font-weight: 400; opacity: 0.8; margin-top: 2px; }
.who { margin-left: auto; font-weight: 700; }
.badge {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: #f2b33d; color: var(--ink); font-weight: 700; display: grid; place-items: center;
}

.screen { max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; display: grid; gap: 16px; }
.screen.with-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.title { font-size: 34px; }
.lead { font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-big { min-height: 60px; font-size: 19px; }
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }

.pin { font-size: 28px; letter-spacing: 0.4em; text-align: center; font-family: var(--font-sign); }

/* Chantier sélectionné */
.site { display: grid; gap: 10px; }
.site-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--surface); border-radius: var(--r-md); border: 2px solid var(--line-soft); }
.site-card h2 { font-size: 28px; }
.site-icon { width: 30px; height: 30px; color: var(--verdigris); margin-top: 2px; }
.for-who select { font-weight: 700; }

/* Les deux gestes du métier */
.punch { display: grid; gap: 14px; margin-top: 6px; }
.punch-btn {
  display: grid; justify-items: start; gap: 2px;
  min-height: 112px; padding: 18px 22px;
  border: none; border-radius: var(--r-md); cursor: pointer; color: #fff; text-align: left;
}
.punch-btn:active { transform: translateY(1px); }
.punch-in { background: var(--verdigris); }
.punch-out { background: var(--anthracite); }
.punch-btn[disabled] { background: #9aa4ab; cursor: not-allowed; }
.punch-word { font-family: var(--font-sign); font-weight: 700; font-size: 46px; line-height: 1; }
.punch-hint { font-size: 15px; opacity: 0.9; }

/* Choix du chantier */
.group { font-size: 20px; color: var(--muted); margin-top: 6px; }
.choice {
  display: grid; gap: 2px; text-align: left; width: 100%;
  padding: 16px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); cursor: pointer;
}
.choice.is-selected { border-color: var(--verdigris); box-shadow: inset 6px 0 0 var(--verdigris); }
.choice-name { font-family: var(--font-sign); font-size: 24px; font-weight: 700; }
.choice-sub { color: var(--muted); font-size: 15px; }

/* Confirmation */
.preview { width: 100%; max-height: 46vh; object-fit: cover; border-radius: var(--r-md); background: var(--anthracite); }
.position { display: grid; gap: 6px; justify-items: start; }
.chip-big { font-size: 19px; padding: 6px 14px; }

/* Pointage enregistré */
.done { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 24px 8px; }
.done-icon { width: 72px; height: 72px; padding: 12px; border-radius: 50%; background: var(--verdigris); color: #fff; }
.done-offline .done-icon { background: #8a5300; }
.done h1 { font-size: 34px; }
.done-time { font-family: var(--font-sign); font-size: 64px; font-weight: 700; line-height: 1; }

.pending { display: grid; gap: 10px; }

/* Historique */
.day { display: grid; gap: 8px; }
.entry {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 12px; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line-soft);
}
.entry-time { font-family: var(--font-sign); font-weight: 700; font-size: 28px; line-height: 1; min-width: 64px; }
.entry-main { display: grid; gap: 6px; }
.entry-title { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-link { border: none; background: none; padding: 0; color: var(--verdigris-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; font-size: 15px; }
.thumb { padding: 0; border: none; border-radius: var(--r-sm); overflow: hidden; width: 64px; height: 64px; cursor: pointer; background: var(--line-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.request { display: grid; gap: 6px; justify-items: start; padding: 12px; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line-soft); }
.photo-dialog img { width: 100%; }
.pad { padding: 12px; }

/* Plus */
.panel { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line-soft); }
.panel > summary { padding: 16px; font-weight: 700; cursor: pointer; font-size: 18px; }
.panel > :not(summary) { padding: 0 16px 16px; }
.panel-flat { padding: 12px; }
.transparency, .install { display: grid; gap: 6px; }
.transparency h3, .install h3 { font-size: 21px; margin-top: 8px; }
.transparency ul, .install ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.logout { margin-top: 8px; }

/* Navigation du bas, à portée de pouce */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 2px solid var(--line);
}
.tab { min-height: 56px; border: none; background: none; font-weight: 700; font-size: 17px; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); }
.tab.is-active { color: var(--ink); background: var(--zinc-bg); box-shadow: inset 0 -4px 0 var(--verdigris); }

.toast { top: calc(78px + env(safe-area-inset-top)); bottom: auto; }
