/* 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; }

/* Aide repliable (Face ID indisponible) */
.help summary { cursor: pointer; color: var(--muted); padding: 10px 0; text-align: center; }
.help[open] summary { margin-bottom: 8px; }

/* Onglet Chantier */
.tabs { grid-template-columns: repeat(4, 1fr); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plain-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.plain-list .qty { font-family: var(--font-sign); font-size: 20px; white-space: nowrap; }
.docs a { font-weight: 700; word-break: break-word; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-flat.stack > .group { margin-top: 0; }
.request .row { width: 100%; }
.request .row .btn { flex: 1 1 0; }
.choice-radio { display: flex; align-items: center; gap: 12px; }
.choice-radio input { width: 24px; height: 24px; accent-color: var(--verdigris); }
.choice-radio .choice-name { font-size: 20px; }
.choice-radio:has(input:checked) { border-color: var(--verdigris); box-shadow: inset 6px 0 0 var(--verdigris); }
fieldset.plain { border: none; margin: 0; padding: 0; }
.tab { font-size: 16px; padding: 0 2px; }

/* Mise à jour disponible, version, nouveautés */
.update-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff4d6; border-bottom: 2px solid #f2b33d; font-weight: 700;
}
.update-banner .btn { min-height: 44px; }
.version { text-align: center; }
.changelog { display: grid; gap: 4px; }
.changelog h3 { font-size: 20px; }
.changelog-date { font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--muted); }
.changelog-title { font-weight: 700; margin: 0; }
.changelog ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.changelog-dialog { max-height: 88vh; overflow-y: auto; }

/* Ouvrir le bureau sur un ordinateur */
.pair-input { font-family: var(--font-sign); font-size: 34px; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.pair-device .entry-title { font-size: 22px; }

/* Planning */
.plan-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 6px; }
.plan-card.is-today { border-color: var(--verdigris); box-shadow: inset 6px 0 0 var(--verdigris); }
.plan-day { font-size: 22px; }
.plan-chantier { font-family: var(--font-sign); font-size: 24px; font-weight: 700; line-height: 1.15; margin: 0; }
.plan-chantier.small-title { font-size: 19px; }
.plan-affect { display: grid; gap: 2px; }
.plan-affect p { margin: 0; }
.plan-type { font-weight: 700; font-size: 19px; margin: 0; }
.plan-conges, .plan-absent { color: #8a6a12; }
.plan-intemperies { color: #4a6680; }
.plan-others { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 4px; }
.planned { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.planned p { margin: 0; }

/* Logo de la société (Bureau → Apparence) sur l'écran de connexion */
.company-logo { display: block; max-width: 220px; max-height: 110px; width: auto; height: auto; margin: 4px auto 8px; border-radius: 4px; }
.company-name { margin: 4px 0 10px; text-align: center; font-size: 1.15rem; font-weight: 700; color: var(--anthracite); }
