:root {
  --shadow: 0 10px 28px rgba(17, 38, 59, .07);
}

html { color-scheme: light; }
body { background: #fff; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-nav {
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}
.app-nav a {
  transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.app-nav a:hover { transform: translateY(-1px); }
.app-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, #21a9b8, #0785a1);
  box-shadow: 0 7px 16px rgba(8, 133, 161, .2);
}

.hero {
  border-color: #d6ecef;
  box-shadow: var(--shadow);
}
.filters, .panel, .empty {
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}
.ride {
  box-shadow: 0 7px 20px rgba(20, 33, 61, .045);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ride:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.list > h2, .list > .empty { grid-column: 1 / -1; }
.list > h2 { margin-top: 6px; }
.list .ride { min-width: 0; margin: 0; }
.ride h3 { flex-wrap: wrap; }
.department-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #087f96;
  background: #e8f8fa;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
  transition: filter .18s ease, transform .18s ease;
}
.department-badge:hover { filter: brightness(.96); transform: translateY(-1px); }
.ride-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #344054;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.ride-author img {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .14);
}
.ride-author:hover span { color: #087f96; text-decoration: underline; }

.button, .contact {
  background: linear-gradient(135deg, #21a9b8, #0785a1);
  box-shadow: 0 8px 18px rgba(8, 133, 161, .2);
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:hover, .contact:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.filters input, .filters select,
.panel input:not([type=radio]):not([type=checkbox]), .panel select, .panel textarea {
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.filters input:focus, .filters select:focus,
.panel input:not([type=radio]):not([type=checkbox]):focus, .panel select:focus, .panel textarea:focus {
  border-color: #67bdca;
  box-shadow: 0 0 0 3px rgba(21, 150, 168, .12);
}
.filters { grid-template-columns: minmax(220px, 2fr) minmax(180px, 1.35fr) auto; }
.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .list { grid-template-columns: 1fr; }
}

/* Cartes de trajets inspirées de l’interface Petites annonces. */
.list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ride {
  --ride-accent: #0b86a0;
  --ride-soft: #e9f7f5;
  display: flex;
  min-height: 0;
  padding: 16px 16px 0;
  overflow: hidden;
  flex-direction: column;
  border-color: #dfe5ec;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 55%, #fbfdff);
}
.ride--offre { --ride-accent: #1762d6; --ride-soft: #edf3ff; }
.ride--recherche { --ride-accent: #138a80; --ride-soft: #eaf8f5; }
.ride--offre.paused {
  --ride-accent: #c64178;
  --ride-soft: #fff0f6;
  opacity: 1;
  border-color: #f0cfdd;
}
.ride--offre.paused .badge.pause { color: #a82f62; background: #fde3ee; }
.ride.paused, .ride:has(.badge.pause) {
  --ride-accent: #c64178;
  --ride-soft: #fff0f6;
  opacity: 1;
  border-color: #f0cfdd;
}
.ride-top { gap: 10px; flex-wrap: wrap; }
.ride-top .badge, .ride-top .department-badge {
  min-height: 29px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--ride-accent);
  background: var(--ride-soft);
  font-size: .7rem;
  letter-spacing: .015em;
}
.ride-icon { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -3px; }
.ride-top .badge, .ride-top .department-badge { display: inline-flex; align-items: center; gap: 7px; }
.ride-top time { margin-left: auto; color: #344054; font-size: .82rem; }
.ride .ride-author {
  order: initial;
  width: 100%;
  margin: auto 0 0;
  padding: 12px 0;
  border-top: 2px dashed color-mix(in srgb, var(--ride-accent) 20%, transparent);
  font-size: .82rem;
}
.ride .ride-author img { width: 36px; height: 36px; }
.ride h3 {
  margin: 14px 0 10px;
  color: #101a36;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.18;
  letter-spacing: -.025em;
}
.ride h3 b { color: var(--ride-accent); }
.ride .meta { gap: 6px 11px; color: #344054; font-size: .82rem; }
.ride .meta span { display: inline-flex; align-items: center; gap: 7px; }
.ride .meta .ride-icon { color: var(--ride-accent); }
.ride > p { margin: 12px 0 14px; color: #344054; font-size: .84rem; }
.ride > p { display: flex; align-items: flex-start; gap: 10px; }
.ride > p .ride-icon { width: 20px; height: 20px; color: var(--ride-accent); }
.ride footer {
  width: calc(100% + 32px);
  min-height: 52px;
  margin: 0 -16px 0;
  padding: 10px 16px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border-top: 1px solid color-mix(in srgb, var(--ride-accent) 18%, #e4e9ef);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ride-soft) 65%, #fff), #fff);
}
.ride footer > * { padding: 0 12px; }
.ride footer > *:first-child { padding-left: 0; }
.ride footer > * + * { border-left: 1px solid #dbe3ec; }
.ride footer a, .ride footer button { color: var(--ride-accent); font-weight: 850; text-decoration: none; }
.ride footer .contact {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--ride-accent) !important;
  background: transparent;
  box-shadow: none;
}
.ride footer .contact:hover { filter: none; transform: none; }
.ride footer .delete-button { color: #c73555; }
.ride footer a, .ride footer button { display: inline-flex; align-items: center; gap: 8px; }
.ride footer .ride-icon { width: 18px; height: 18px; }

@media (max-width: 700px) {
  .list { grid-template-columns: 1fr; gap: 12px; }
  .ride { min-height: 0; padding: 14px 14px 0; }
  .ride footer { width: calc(100% + 28px); margin-inline: -14px; padding-inline: 14px; }
  .ride footer > * { padding-inline: 12px; }
  .three { grid-template-columns: 1fr; }
}
