:root {
  --night: #071b35;
  --navy: #0b2d57;
  --blue: #1468b8;
  --sky: #46a9ff;
  --green: #268653;
  --orange: #f28c28;
  --red: #c92828;
  --paper: #f5f9fc;
  --card: #ffffff;
  --line: #d8e8f5;
  --text: #102033;
  --muted: #607185;
  --shadow: 0 18px 48px rgba(7, 27, 53, .14);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--night);
}

body {
  min-height: 100%;
  margin: 0;
  padding: env(safe-area-inset-top) 0 calc(74px + env(safe-area-inset-bottom));
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(7, 27, 53, .96) 0, rgba(11, 45, 87, .92) 220px, var(--paper) 221px),
    var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
}

.phone-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.app-hero {
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(90deg, rgba(7, 27, 53, .88), rgba(7, 27, 53, .32)),
    url("/assets/bus-scolaire-connect-autocar.png") center / cover;
  box-shadow: var(--shadow);
}

.kicker,
.section-label {
  margin: 0 0 6px;
  color: var(--sky);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-hero h1,
.panel h2,
.weather-card h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.app-hero h1 {
  max-width: 520px;
  font-size: clamp(32px, 8vw, 54px);
  overflow-wrap: anywhere;
}

.app-hero p:not(.kicker) {
  max-width: 430px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: 17px;
  line-height: 1.45;
}

.install-btn,
.icon-btn,
.route-action,
.push-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.install-btn {
  padding: 0 16px;
  color: var(--night);
  background: var(--sky);
}

.push-btn {
  margin-top: 12px;
  padding: 0 14px;
  color: white;
  background: var(--navy);
}

.weather-card,
.panel,
.ios-install-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(20, 104, 184, .08);
}

.ios-install-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff, #edf7ff);
}

.ios-install-card h2 {
  margin: 0 0 6px;
  color: var(--night);
  font-size: 23px;
  line-height: 1.12;
}

.ios-install-card p:not(.section-label) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.ios-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  font-size: 34px;
  font-weight: 900;
}

.weather-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  color: white;
  background: linear-gradient(135deg, #4aa8f0, #16629a);
}

.weather-card.rain { background: linear-gradient(135deg, #385c73, #172d45); }
.weather-card.cloud { background: linear-gradient(135deg, #8ea9ba, #496678); }
.weather-card.snow { background: linear-gradient(135deg, #d9edf7, #7daac1); color: var(--night); }
.weather-card.fog { background: linear-gradient(135deg, #b9c8cf, #6d7f89); color: var(--night); }
.weather-card.ice { background: linear-gradient(135deg, #bdefff, #57a7c1); color: var(--night); }

.weather-card .section-label,
.weather-card p {
  color: inherit;
}

.weather-card h2 {
  font-size: 42px;
  font-weight: 950;
}

.weather-card p {
  margin: 6px 0 0;
  font-size: 17px;
}

.weather-art {
  position: relative;
  width: 120px;
  height: 108px;
}

.sun {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8b8 0 34%, #ffd54d 36% 66%, #ff9e1b 70%);
  box-shadow: 0 0 28px rgba(255, 213, 77, .72);
}

.cloud {
  position: absolute;
  left: 28px;
  top: 48px;
  width: 78px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 18px rgba(7, 27, 53, .16);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 12px;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 10px;
  width: 34px;
  height: 34px;
}

.cloud::after {
  right: 12px;
  width: 42px;
  height: 42px;
}

.cloud-b {
  left: 2px;
  top: 68px;
  transform: scale(.72);
  opacity: .68;
}

.rain {
  position: absolute;
  top: 84px;
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: #c7f0ff;
  transform: rotate(16deg);
  opacity: .92;
}

.rain-a { left: 40px; }
.rain-b { left: 62px; height: 28px; }
.rain-c { left: 86px; }

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title h2 {
  color: var(--night);
  font-size: 24px;
}

.pill {
  min-width: 42px;
  padding: 8px 10px;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  text-align: center;
  font-weight: 900;
}

.search span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #f9fcff;
  font: inherit;
  font-size: 16px;
}

.route-list,
.alert-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.route-item,
.alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
}

.route-item h3,
.alert-item h3 {
  margin: 0 0 5px;
  color: var(--night);
  font-size: 17px;
}

.route-item p,
.alert-item p,
.small,
.panel li {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.route-action {
  padding: 0 12px;
  color: var(--night);
  background: #dcefff;
}

.route-action.active {
  color: white;
  background: var(--green);
}

.icon-btn {
  width: 44px;
  color: var(--night);
  background: #edf6ff;
  font-size: 22px;
}

.alert-item.warning {
  border-color: rgba(242, 140, 40, .36);
  background: #fff7eb;
}

.alert-item.danger {
  border-color: rgba(201, 40, 40, .38);
  background: #fff0f0;
}

.subtle {
  background: #f8fbff;
}

.subtle ol {
  padding-left: 22px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.tabbar a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.tabbar a[aria-current="page"] {
  color: white;
  background: var(--navy);
}

@media (max-width: 560px) {
  .phone-shell { padding: 12px; }
  .app-hero {
    min-height: 188px;
    padding: 18px;
    align-items: flex-end;
  }
  .app-hero h1 {
    max-width: 310px;
    font-size: clamp(36px, 10vw, 44px);
  }
  .app-hero p:not(.kicker) {
    max-width: 310px;
    font-size: 16px;
  }
  .ios-install-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .ios-icon {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
  .weather-card { grid-template-columns: 92px minmax(0, 1fr); }
  .weather-art { width: 92px; transform: scale(.78); transform-origin: left center; }
  .route-item,
  .alert-item { grid-template-columns: 1fr; }
  .route-action { width: 100%; }
}
