@import url('https://fonts.googleapis.com/css2?family=Geist:ital,wght@0,100..900;1,100..900&display=swap');

@import url('./lines.css');
@import url('./directions.css');
@import url('./disruptions.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

* {
  font-family: "Geist", sans-serif;
}

body {
  background: #f5f5f5;
  color: #1a1a1a;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
}

#app { padding: 1rem; }

#head {
  border-bottom: 1px solid black;
}

/* --- header --- */

header {
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.back {
  background: none;
  border: none;
  cursor: pointer;
  color: #0066cc;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 0.5rem;
}

.refresh-info {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}

/* --- listes --- */

.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-size: 17px;
  text-align: left;
}

.list-item:hover { background: #f0f0f0; }
.list-item:active { background: #e5e5e5; }

.ligne-numero {
  background: #0066cc;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 5px;
  min-width: 2.5rem;
  text-align: center;
}

.ligne-nom { flex: 1; }

.arrow { color: #bbb; }

/* --- horaires --- */

.horaires {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.horaire-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.875rem 1rem;
}

.horaire-heure {
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 4rem;
}

.horaire-retard {
  color: #cc4400;
  font-size: 0.85rem;
  font-weight: 600;
}

.horaire-dest {
  color: #666;
  font-size: 0.9rem;
  flex: 1;
  text-align: right;
}

/* --- états --- */

.loading, .empty {
  text-align: center;
  color: #888;
  padding: 3rem 1rem;
}

.error {
  text-align: center;
  color: #cc0000;
  padding: 3rem 1rem;
}
