/* Colours and type taken from the TUA site */
:root {
  --azul-barra: #013c7e;
  --azul: #004595;
  --gris-panel: #e7e8e9;
  --gris-barra: #535b64;
  --texto: #494a4b;
  --texto-oscuro: #35393c;
  --texto-nav: #2c2f32;
  --texto-suave: #7b7b7c;
  --naranja: #ec743d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.2px/1.45 roboto, Arial, Verdana, Helvetica, sans-serif; color: var(--texto); background: #fff; overflow-x: hidden; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; font-weight: 400; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.entete { background: var(--azul-barra); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 20px 12px; position: sticky; top: 0; z-index: 10; }
.entete-ligne { display: flex; align-items: center; max-width: 640px; margin: 0 auto; }
.entete h1 { font: 24px/32px roboto-medium, Arial, sans-serif; }
.btn-rafraichir { margin-left: auto; width: 40px; height: 40px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.chargement .btn-rafraichir svg { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.etat { max-width: 640px; margin: 2px auto 0; font-size: 12.16px; opacity: .85; }

main { max-width: 640px; margin: 0 auto; padding: 0 20px 10px; }

.recherche { display: flex; margin-top: 19px; height: 44px; border: 1px solid #bbb; border-radius: 3px; background: #fff; }
.recherche input { flex: 1; min-width: 0; border: 0; padding: 0 20px; font: 16px roboto, Arial, sans-serif; color: var(--texto-nav); background: none; outline: none; -webkit-appearance: none; }
.recherche input::placeholder { color: var(--texto-nav); }
.recherche button { width: 50px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }

.resultats { margin-top: 4px; border: 1px solid #ddd; border-radius: 3px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.12); max-height: 60vh; overflow-y: auto; }
.resultats li + li { border-top: 1px solid #eee; }
.resultats button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; background: none; text-align: left; color: var(--texto-oscuro); }
.resultats button:active { background: #f5f5f5; }
.r-code { font: 15.2px roboto-bold, Arial, sans-serif; min-width: 40px; }
.r-nom { flex: 1; min-width: 0; }
.r-lignes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.r-etoile { font-size: 24px; color: var(--azul); line-height: 1; }
.deja .r-etoile { color: #b49a3d; }
.r-rien { padding: 12px 14px; color: var(--texto-suave); }

.pastille { display: inline-block; min-width: 25px; height: 25px; padding: 0 4px; text-align: center; color: #fff; font: 13.68px/25px roboto-bold, Arial, sans-serif; flex: none; }
.pastille.fonce { color: #1a171c; }

.favoris { margin-top: 15px; }
.carte { background: var(--gris-panel); padding: 22px 20px 12px 25px; margin-bottom: 15px; }
.carte-tete { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #d3d4d5; }
.carte h2 { flex: 1; color: var(--texto-oscuro); font: 20px/28px roboto, Arial, sans-serif; }
.carte h2 .code { display: block; font-family: roboto-bold, Arial, sans-serif; font-weight: 400; }
.actions { display: flex; gap: 4px; }
.actions button { width: 36px; height: 36px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.btn-retirer { font-size: 24px; color: #b49a3d; }

.passages li { padding: 14px 0; }
.passages li + li { border-top: 1px solid #d9dadb; }
.passage { display: flex; align-items: center; gap: 12px; }
.passage .pastille { min-width: 32px; height: 32px; line-height: 32px; font-size: 15px; }
.vers { flex: 1; min-width: 0; color: var(--texto-oscuro); font: 15.2px/20px roboto-medium, Arial, sans-serif; }
.vers small { display: block; font: 12.16px/17px roboto, Arial, sans-serif; color: var(--texto-suave); }
.temps { text-align: right; color: var(--azul); white-space: nowrap; }
.temps b { font: 30px/32px roboto-bold, Arial, sans-serif; font-weight: 400; font-variant-numeric: tabular-nums; }
.temps b.mot { font-size: 20px; }
.temps i { font: 13px roboto-medium, Arial, sans-serif; font-style: normal; margin-left: 3px; }
.proche .temps { color: var(--naranja); }
.proche .temps b { animation: battre 1.2s ease-in-out infinite; }
@keyframes battre { 50% { opacity: .55; } }
.sans .vers { color: var(--texto-suave); }
.attente { color: var(--texto-suave); font-size: 13.68px; }
.en-erreur .passages { opacity: .6; }

.vide { margin-top: 20px; padding: 22px 25px; background: var(--gris-panel); color: var(--texto); }
.vide p + p { margin-top: 8px; }
.pied { max-width: 640px; margin: 0 auto; padding: 0 20px calc(30px + env(safe-area-inset-bottom)); text-align: center; }
.astuce, .source { font-size: 12.16px; color: var(--texto-suave); }
.liens { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 8px; }
.liens a { color: var(--azul); font-size: 15.2px; text-decoration: none; }

@media (prefers-reduced-motion: reduce) { .proche .temps b, .chargement .btn-rafraichir svg { animation: none; } }
