/* ===== Version de test : vraies bornes, adresses, GPS, minuteur ===== */

/* Appli installée : le contenu passe sous la barre d'état et au-dessus de la barre d'accueil */
.screen { padding-top: max(18px, env(safe-area-inset-top, 0px)); }
.screen.has-tabs { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.tabs { padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
.sheet { padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
.drive-top { top: max(12px, env(safe-area-inset-top, 0px)); }
.drive-panel { padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }

/* Conseil d'installation */
.install {
  display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 14px; border-radius: 12px;
  background: var(--soft); font-size: 13.5px; line-height: 1.35;
}
.install p { flex: 1; min-width: 0; }
.install .icon-btn { flex: none; width: 44px; height: 44px; }
.install .link { flex: none; }

/* Outils sous la borne choisie */
.borne-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: -4px; flex-wrap: wrap; }
.borne-tools .link { align-self: auto; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* Adresses avec suggestions */
.dest label { display: block; }
.dest label + .ac { margin-bottom: 10px; }
.ac { position: relative; }
.ac input { width: 100%; box-sizing: border-box; }
.ac-list {
  position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface); border-radius: 12px; box-shadow: 0 10px 30px var(--shadow); border: 0.5px solid var(--line);
  max-height: 260px; overflow-y: auto;
}
.ac-list li { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; min-height: 44px; box-sizing: border-box; cursor: pointer; justify-content: center; }
.ac-list li + li { border-top: 0.5px solid var(--line); }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--soft); }
.ac-list .muted { font-size: 12.5px; color: var(--muted); }
#route-hint { min-height: 1.4em; }

/* Origine du prix */
.src { font-weight: 600; }
.src-base { color: var(--good); }
.src-reseau { color: var(--fg); }
.src-estime { color: var(--warn); font-style: italic; }
.sheet .seg.small { margin-top: 10px; }
.other-borne { margin-top: 14px; }
.other-title { font-weight: 600; font-size: 15px; padding: 12px 16px 4px; }
.other-borne .btn { margin: 8px 16px 14px; width: calc(100% - 32px); }

/* Message bref en bas de l'écran */
.toast {
  position: absolute; z-index: 40; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--fg); color: var(--bg);
  font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px var(--shadow);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.toast.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Minuteur de charge */
#s-remind { margin-top: 4px; }
.sim { font-variant-numeric: tabular-nums; }

/* Copilote en GPS */
.gps { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.soc-fix {
  font: inherit; color: var(--accent); background: none; border: 0; padding: 0 0 2px; min-height: 32px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer;
}

/* Journal et réglages */
.j-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.link.inline { display: inline; padding: 10px 4px; margin: -10px 0; font-size: inherit; }
.list-row.danger span { color: var(--crit); font-weight: 500; }
.field-col { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; font-size: 15px; }
.field-col textarea {
  font: inherit; font-size: 16px; color: var(--fg); background: var(--soft); border: 1px solid var(--field-border, var(--line));
  border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 110px;
}
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 16px 12px; font-size: 13.5px; color: var(--muted); }
.check-row input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
#avis-form .btn { margin: 4px 16px 14px; width: calc(100% - 32px); }
/* Champs de saisie : 16 px au moins, sinon Safari zoome à chaque toucher */
input, select, textarea { font-size: max(16px, 1em); }
