/* ====== HOMEPAGE ====== */

body.homepage #main-content {
  justify-content: start;
}

.homepage-page {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 0 0 auto;
  padding: 16px 12px 48px 24px;
}

/* ====== NAV TABS ====== */
/* Tabs are now in #nav via content_for :nav — match native btn shape */

.homepage-tab-btn {
  --btn-border-radius: 0.5em;
}

.homepage-nav-icon {
  font-size: 1rem;
  line-height: 1;
}

.homepage-nav-label {
  display: inline;
}

/* Mobile : icônes seules */
@media (max-width: 120ch) {
  .homepage-nav-label { display: none; }
}

/* ====== INFO TAB ====== */

.homepage-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.homepage-section {
  background: var(--color-message-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--color-border-dark);
}

.homepage-section--welcome {
  background: linear-gradient(135deg, rgba(168, 218, 220, 0.06) 0%, rgba(29, 53, 87, 0.2) 100%);
  border: 1px solid rgba(168, 218, 220, 0.12);
}

.homepage-section--warmup {
  border-left: 4px solid #F4A261;
  background: rgba(244, 162, 97, 0.08);
}

.homepage-section p {
  line-height: 1.7;
  color: var(--color-text-lighter);
  margin-top: 8px;
}

.homepage-section ul {
  margin-top: 10px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.homepage-section li {
  line-height: 1.6;
  color: var(--color-text-lighter);
}

.homepage-section-title {
  font-family: 'Sora', var(--font-family);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #A8DADC;
}

.homepage-subtitle {
  font-size: 0.88rem;
  color: var(--color-text-lighter);
  margin-bottom: 16px;
}

/* ====== CARDS ====== */

.homepage-card {
  background: var(--color-message-bg);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 12px;
  border: 1px solid var(--color-border-dark);
  border-left: 4px solid #457B9D;
}

.homepage-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.homepage-card p {
  margin-top: 4px !important;
}

.homepage-card ul {
  margin-top: 6px !important;
}

/* ====== WEATHER TABLE ====== */

.homepage-weather {
  padding-top: 4px;
}

.homepage-weather-invite {
  font-size: 0.88rem;
  color: var(--color-text-lighter);
  background: rgba(168, 218, 220, 0.1);
  border: 1px solid rgba(168, 218, 220, 0.2);
  border-left: 4px solid #A8DADC;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.weather-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  background: var(--color-message-bg);
  border: 1px solid var(--color-border-dark);
}

.weather-table thead th {
  background: rgba(29, 53, 87, 0.6);
  color: #A8DADC;
  font-family: 'Sora', var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.weather-table tbody tr:nth-child(even) {
  background: rgba(168, 218, 220, 0.05);
}

.weather-city {
  color: var(--color-text);
  font-weight: 700;
}

.weather-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.weather-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  color: var(--color-text-lighter);
  border-bottom: 1px solid var(--color-border-dark);
  white-space: nowrap;
  background: var(--color-border);
}

.weather-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.weather-table tbody tr:hover {
  background: var(--color-border);
}

.weather-table tbody tr:last-child td {
  border-bottom: none;
}

.weather-city {
  font-weight: 600;
  white-space: nowrap;
}

.weather-condition {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.weather-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.weather-temp {
  font-weight: 600;
  white-space: nowrap;
}

.weather-temp--cold {
  color: #457B9D;
}

.weather-temp--hot {
  color: #E63946;
}

.weather-best-hour {
  font-weight: 600;
  color: #2A9D8F;
  white-space: nowrap;
}

/* ====== CHANGELOG / NOUVEAUTES ====== */

.homepage-changelog {
  padding-top: 4px;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.changelog-entry {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--color-message-bg);
  border-left: 4px solid #A8DADC;
  transition: border-color 0.2s;
}

.changelog-entry:hover {
  border-left-color: #E63946;
}

.changelog-date {
  flex-shrink: 0;
  padding-top: 2px;
}

.changelog-date-badge {
  font-size: 0.85rem;
  font-weight: 400;
  color: #FFFFFF;
  background: #1D3557;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
}

.changelog-content {
  flex: 1;
  min-width: 0;
}

.changelog-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.changelog-content p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text-lighter);
  margin: 0;
}

/* ====== NEWS (placeholder) ====== */

.homepage-news {
  padding-top: 4px;
}

/* ====== IMPACT (Bebas Neue) ====== */

.mono {
  font-family: 'Bebas Neue', sans-serif;
}

/* ====== EMPTY STATE ====== */

.homepage-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--color-message-bg);
  border-radius: 12px;
  border: 1px dashed var(--color-border-darker);
}

.homepage-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.homepage-empty-text {
  font-family: 'Sora', var(--font-family);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.homepage-empty-hint {
  font-size: 0.88rem;
  color: var(--color-text-lighter);
  margin-top: 8px;
}

.homepage-link {
  color: oklch(var(--lch-blue));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.homepage-link:hover {
  opacity: 0.8;
}

/* ====== RESPONSIVE ====== */

@media (max-width: 600px) {
  .homepage-page {
    padding: var(--block-space-half, 0.4em) 8px 32px;
  }

  .homepage-section {
    padding: 16px;
    border-radius: 12px;
  }

  .weather-table {
    font-size: 0.78rem;
  }

  .weather-table th,
  .weather-table td {
    padding: 8px 10px;
  }

  .changelog-entry {
    flex-direction: column;
    gap: 6px;
  }
}
