/* Coquille : en-tête, vue, barre d'onglets. Rien d'autre.
   Les écrans vivent dans app/ecrans/ et n'apportent pas leur propre mise en page. */

.coquille {
  display: flex; flex-direction: column; height: 100%;
  max-width: 480px; margin: 0 auto; background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
}
.barre {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 14px;
  background: var(--panel); border-bottom: 1px solid var(--hair);
}
.barre .retour {
  width: 34px; height: 34px; flex: none; border: 0; background: none; cursor: pointer;
  color: var(--fg2); display: grid; place-items: center; border-radius: 8px;
}
.barre .retour:hover { background: var(--surf2); color: var(--fg); }
.barre .titre { min-width: 0; }
.barre .titre b {
  display: block; font-family: var(--disp); font-size: 16px; font-weight: 600;
  letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.barre .titre span { display: block; font-size: 11.5px; color: var(--fg3); margin-top: 1px; }
.barre .solde {
  margin-left: auto; flex: none; font-size: 11.5px; color: var(--fg2);
  background: var(--surf); border: 1px solid var(--hair); border-radius: 999px;
  padding: 4px 11px; font-variant-numeric: tabular-nums;
}
.barre .solde b { color: var(--fg); font-weight: 600; }

.vue { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
       padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }

.onglets {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--panel); border-top: 1px solid var(--hair);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.onglets button {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 10.5px;
  color: var(--fg3); min-height: 52px; display: grid; place-items: center; gap: 3px;
}
.onglets button[aria-current="page"] { color: var(--pap); }

/* Écran d'attente : ce que l'écran doit faire, et ce qui le gouverne.
   Il disparaît au fur et à mesure que les écrans sont écrits. */
.chantier { max-width: 34rem; }
.chantier h1 { font-family: var(--disp); font-size: 21px; font-weight: 600;
  letter-spacing: -.03em; margin: 2px 0 10px; text-wrap: balance; }
.chantier p { color: var(--fg2); margin: 0 0 14px; }
.chantier dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px;
  margin: 0; font-size: 12.5px; }
.chantier dt { color: var(--fg3); }
.chantier dd { margin: 0; color: var(--fg2); }
.chantier .jetons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chantier .jeton { font-size: 11px; color: var(--och2); background: var(--surf);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px;
  font-variant-numeric: tabular-nums; }
.chantier .sonde { margin-top: 22px; border-top: 1px solid var(--hair); padding-top: 14px;
  font-size: 12px; color: var(--fg3); }
.chantier .sonde b { color: var(--fg2); font-weight: 500; }

/* Un écran du prototype porte son en-tête et ses onglets : la vue ne les entoure plus de marges. */
.vue.ecran { padding: 0; overflow: hidden; }
