@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* =========================================================
   Rider Montréal — styles globaux
   Palette : carbone / graphite / rouge électrique (voir brand-2026.css)
   ========================================================= */

:root {
  --bg: #08090b;
  --bg-2: #0b0d10;
  --surface: #101310;
  --surface-2: #151915;
  --line: #222a23;
  --line-strong: #303a31;
  --text: #f5f7fa;
  --muted: #858b96;
  --green: #ff202e;
  --green-soft: rgba(255, 43, 43, 0.12);
  --green-glow: rgba(255, 43, 43, 0.3);
  --danger: #ff202e;
  --warning: #ff6a00;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

/* L’attribut hidden doit toujours l’emporter sur un display: grid/flex de classe. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(255, 43, 43, 0.12), transparent 65%),
    radial-gradient(700px 420px at 8% 18%, rgba(255, 43, 43, 0.05), transparent 70%),
    linear-gradient(180deg, #080a08 0%, #08090b 55%, #060708 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 78%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

::selection {
  background: var(--green);
  color: #08090b;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--green);
  color: #08090b;
  font-weight: 600;
  border-radius: 10px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Mise en page ---------- */

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section--tight {
  padding: 56px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
  max-width: 54ch;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  margin-top: 6px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(255, 43, 43, 0.14);
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--green);
  text-shadow: 0 0 34px rgba(255, 43, 43, 0.3);
}

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 6, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(34, 42, 35, 0.9);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(255, 43, 43, 0.22), rgba(255, 43, 43, 0.04));
  border: 1px solid rgba(255, 43, 43, 0.45);
  box-shadow: 0 0 24px rgba(255, 43, 43, 0.18);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: var(--green);
  filter: drop-shadow(0 0 6px rgba(255, 43, 43, 0.55));
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-text span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--green);
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a.nav-link:hover,
.site-nav a.nav-link[aria-current='page'] {
  color: var(--text);
}

.site-nav a.nav-link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.nav-user {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.nav-user:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle .bars {
  display: grid;
  gap: 4px;
}

.nav-toggle .bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded='true'] .bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--green);
  color: #060806;
  box-shadow: 0 10px 30px -10px rgba(255, 43, 43, 0.55);
}

.btn-primary:hover {
  background: #ff3a46;
  box-shadow: 0 16px 38px -12px rgba(255, 43, 43, 0.7);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(255, 43, 43, 0.04);
}

.btn-danger {
  background: transparent;
  border-color: rgba(255, 107, 107, 0.35);
  color: #ff8f97;
}

.btn-danger:hover {
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.08);
}

.btn-block {
  width: 100%;
}

.btn-small {
  padding: 10px 16px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.link-arrow::after {
  content: '→';
  transition: transform 0.18s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  padding: 78px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.6rem, 6.2vw, 4.7rem);
  line-height: 0.94;
}

.hero h1 span {
  display: block;
}

.hero .lede {
  margin-top: 24px;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-note strong {
  color: var(--green);
  font-weight: 500;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin: 46px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: grid;
  gap: 2px;
}

.hero-stats dt {
  order: 2;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-stats dd {
  margin: 0;
  order: 1;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green);
}

/* Visuel du héros */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  isolation: isolate;
}

.hero-photo {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 43, 43, 0.28);
  background: #05070c;
  box-shadow:
    0 40px 90px -35px rgba(0, 0, 0, 0.95),
    0 0 50px -22px rgba(255, 43, 43, 0.45);
  transform: rotate(-1.2deg);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 43, 43, 0.22), transparent 68%);
  filter: blur(12px);
  z-index: -1;
}

.emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 250px;
  height: 250px;
  border-radius: 34px;
  background: linear-gradient(155deg, rgba(255, 43, 43, 0.16), rgba(10, 12, 10, 0.9) 62%);
  border: 1px solid rgba(255, 43, 43, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 43, 43, 0.08) inset,
    0 30px 70px -30px rgba(255, 43, 43, 0.45);
  transform: rotate(-6deg);
  animation: float 7s ease-in-out infinite;
}

.emblem svg {
  width: 104px;
  height: 104px;
  fill: var(--green);
  filter: drop-shadow(0 0 26px rgba(255, 43, 43, 0.55));
}

.emblem::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 43, 43, 0.16);
}

.orbit {
  position: absolute;
  border: 1px dashed rgba(255, 43, 43, 0.22);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}

.orbit--one {
  width: 330px;
  height: 330px;
}

.orbit--two {
  width: 410px;
  height: 410px;
  border-color: rgba(255, 255, 255, 0.07);
  animation-direction: reverse;
  animation-duration: 38s;
}

.orbit::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(16, 19, 16, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.float-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.float-chip--one {
  top: 34px;
  left: 0;
  animation: floatChip 6s ease-in-out infinite;
}

.float-chip--two {
  right: 0;
  bottom: 120px;
  animation: floatChip 8s ease-in-out 0.8s infinite;
}

.float-chip--three {
  left: 22px;
  bottom: 26px;
  animation: floatChip 7s ease-in-out 0.4s infinite;
}

/* ---------- Cartes de sortie ---------- */

.ride-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ride-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ride-card {
  display: flex;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ride-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 43, 43, 0.4);
  box-shadow: 0 24px 50px -30px rgba(255, 43, 43, 0.4);
}

.ride-date {
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 74px;
  padding: 8px 0;
  border-radius: 12px;
  background: rgba(255, 43, 43, 0.07);
  border: 1px solid rgba(255, 43, 43, 0.22);
}

.ride-date .dow {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ride-date .day {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--green);
}

.ride-date .month {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ride-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ride-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag--debutant {
  color: var(--green);
  border-color: rgba(255, 43, 43, 0.35);
  background: rgba(255, 43, 43, 0.07);
}

.tag--intermediaire {
  color: var(--warning);
  border-color: rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.06);
}

.tag--avance {
  color: #ff8f97;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.06);
}

.tag--you {
  color: var(--green);
  border-color: rgba(255, 43, 43, 0.4);
}

.tag--past,
.tag--full {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.ride-body h3 {
  font-size: 1.12rem;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ride-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ride-desc {
  font-size: 0.87rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ride-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ride-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.riders {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: var(--muted);
}

.avatar-stack {
  display: flex;
}

.avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border-radius: 50%;
  background: #1c231d;
  border: 2px solid var(--surface);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--green);
}

.avatar:first-child {
  margin-left: 0;
}

.avatar--more {
  color: var(--muted);
  background: var(--line);
}

.empty-state {
  padding: 56px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

/* ---------- Comment ça marche ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 16, 0.6);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 43, 43, 0.3);
  background: rgba(255, 43, 43, 0.07);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green);
}

.step h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Bandeau CTA ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 62px 48px;
  border: 1px solid rgba(255, 43, 43, 0.25);
  border-radius: 26px;
  background:
    radial-gradient(600px 220px at 15% 20%, rgba(255, 43, 43, 0.16), transparent 70%),
    linear-gradient(130deg, #15171c, #0b0d10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}

.cta-band h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  max-width: 18ch;
}

.cta-band p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Pied de page ---------- */

.site-footer {
  margin-top: 80px;
  padding: 52px 0 32px;
  border-top: 1px solid var(--line);
  background: rgba(5, 6, 5, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Pages internes ---------- */

.page-head {
  padding: 56px 0 36px;
}

.page-head h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.page-head p {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Chat des membres ---------- */

.chat-page-head {
  padding-bottom: 26px;
}

.chat-shell {
  max-width: 920px;
  margin: 0 auto 84px;
}

.chat-card {
  display: flex;
  flex-direction: column;
  height: min(70vh, 680px);
  min-height: 460px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.chat-head h2 {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.chat-head p {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--muted);
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.chat-status.is-offline::before {
  background: var(--warning);
  box-shadow: none;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: radial-gradient(circle at 18% 0%, rgba(255, 43, 43, 0.055), transparent 46%);
}

.chat-empty {
  margin: auto;
  max-width: 34ch;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.chat-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: min(78%, 560px);
}

.chat-msg--own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 43, 43, 0.25);
  background: rgba(255, 43, 43, 0.1);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
}

.chat-msg--own .chat-avatar {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.chat-bubble-wrap {
  min-width: 0;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 2px 5px;
  font-size: 0.68rem;
  color: var(--muted);
}

.chat-meta strong {
  color: var(--text);
  font-weight: 500;
}

.chat-delete {
  margin-left: auto;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-delete:hover {
  color: var(--danger);
}

.chat-delete[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-msg--own .chat-meta {
  justify-content: flex-end;
}

.chat-bubble {
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  background: #161a20;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-msg--own .chat-bubble {
  border-color: rgba(255, 43, 43, 0.3);
  border-radius: 14px 14px 4px 14px;
  background: rgba(255, 43, 43, 0.1);
}

.chat-form {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: #090c09;
}

.chat-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #070907;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  resize: vertical;
}

.chat-form textarea::placeholder {
  color: #6a7568;
}

.chat-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.1);
}

.chat-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.chat-count {
  font-size: 0.68rem;
  color: var(--muted);
}

.chat-form .form-error {
  margin-top: 10px;
}

.notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  margin: 22px 0;
  border: 1px solid rgba(255, 200, 87, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 200, 87, 0.05);
  font-size: 0.88rem;
  color: #d8c9a5;
}

.notice strong {
  color: var(--warning);
}

.notice svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  stroke: var(--warning);
  fill: none;
  stroke-width: 1.8;
  margin-top: 2px;
}

/* ---------- Filtres ---------- */

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 16, 0.7);
}

.filter-advanced {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.filter-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0b0d10;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

.filter-toggle::after {
  content: '▾';
  color: var(--green);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.filter-toggle[aria-expanded='true']::after {
  transform: rotate(180deg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0b0d10;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 104px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #657066;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.12);
}

.field .hint {
  font-size: 0.74rem;
  color: var(--muted);
}

.field .error {
  min-height: 1em;
  font-size: 0.76rem;
  color: var(--danger);
}

input[type='datetime-local'] {
  color-scheme: dark;
}

.results-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Formulaires ---------- */

.form-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(21, 25, 21, 0.95), rgba(12, 15, 12, 0.95));
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-size: 1.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.form-grid .field--full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.form-foot {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--muted);
}

.form-foot a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-error {
  display: none;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.07);
  color: #ffb3b8;
  font-size: 0.85rem;
}

.form-error.is-visible {
  display: block;
}

.security-note {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(111, 255, 92, 0.22);
  border-radius: 10px;
  background: rgba(111, 255, 92, 0.04);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

.security-note strong {
  color: var(--green);
  font-weight: 600;
}

.form-note {
  margin-top: 18px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.form-forgot {
  margin: 8px 0 0;
  text-align: right;
  font-size: 0.82rem;
}

.form-forgot a {
  color: var(--green);
}

.form-forgot a:hover {
  text-decoration: underline;
}

.form-success {
  display: none;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 43, 43, 0.3);
  border-radius: 12px;
  background: rgba(255, 43, 43, 0.06);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #f5f7fa;
}

.form-success.is-visible {
  display: block;
}

.form-success strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
}

.form-success a {
  color: var(--green);
  text-decoration: underline;
}

.form-success:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}


/* ---------- Pages d'authentification ---------- */

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding: 56px 0;
}

.auth-visual {
  position: relative;
  padding: 44px;
  border: 1px solid rgba(255, 43, 43, 0.2);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(520px 300px at 85% 8%, rgba(255, 43, 43, 0.18), transparent 70%),
    linear-gradient(150deg, #15171c, #0a0b0e 70%);
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 43, 43, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 43, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 70% 20%, #000, transparent 75%);
  pointer-events: none;
}

.auth-visual .brand {
  position: relative;
}

.auth-visual h2 {
  position: relative;
  margin-top: 34px;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1;
}

.auth-visual p {
  position: relative;
  margin-top: 16px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-visual ul {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 12px;
}

.auth-visual li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: #c9cfd9;
}

.auth-visual li::before {
  content: '✓';
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1px solid rgba(255, 43, 43, 0.4);
  background: rgba(255, 43, 43, 0.1);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
}

.auth-form-wrap {
  width: 100%;
  max-width: 470px;
  justify-self: center;
}

.auth-form-wrap .form-card {
  padding: 34px;
}

.auth-form-wrap header {
  margin-bottom: 4px;
}

.auth-form-wrap header p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Profil ---------- */

.profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(500px 200px at 85% 0%, rgba(255, 43, 43, 0.1), transparent 70%),
    linear-gradient(150deg, var(--surface-2), var(--surface));
  margin-bottom: 22px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 24px;
  background: linear-gradient(150deg, var(--green), #3db61c);
  color: #071007;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 40px -16px rgba(255, 43, 43, 0.6);
}

.profile-identity {
  flex: 1;
  min-width: 220px;
}

.profile-identity h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
}

.profile-identity .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.profile-identity .bio {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #aab2be;
  max-width: 60ch;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 19, 16, 0.65);
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.1;
}

.stat-card .label {
  margin-top: 4px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.profile-columns h2 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.mini-ride {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 19, 16, 0.6);
}

.mini-ride h3 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}

.mini-ride .when {
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--muted);
}

.mini-ride .tag {
  flex-shrink: 0;
}

.profile-edit {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 16, 0.55);
}

.profile-edit summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  list-style: none;
}

.profile-edit summary::-webkit-details-marker {
  display: none;
}

.profile-edit summary::after {
  content: '+';
  color: var(--green);
  font-size: 1.2rem;
  line-height: 1;
}

.profile-edit[open] summary::after {
  content: '−';
}

.profile-edit .profile-edit-body {
  padding: 0 22px 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.auth-required {
  max-width: 620px;
  margin: 40px auto 80px;
  padding: 44px 34px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}

.auth-required .brand-mark {
  margin: 0 auto 20px;
  width: 52px;
  height: 52px;
}

.auth-required h2 {
  font-size: 1.5rem;
}

.auth-required p {
  margin-top: 10px;
  color: var(--muted);
}

.auth-required .form-actions {
  justify-content: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  transform: translate(-50%, 24px);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border: 1px solid rgba(255, 43, 43, 0.4);
  border-radius: 12px;
  background: #15171c;
  color: var(--text);
  font-size: 0.88rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.toast--error {
  border-color: rgba(255, 107, 107, 0.45);
}

.toast--error::before {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

/* ---------- Animations ---------- */

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-12px) rotate(-4deg);
  }
}

@keyframes floatChip {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Adaptatif ---------- */

@media (min-width: 1200px) {
  .ride-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .hero-grid {
    gap: 36px;
  }

  .ride-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-advanced {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px 24px 26px;
    background: #0b0d10;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a.nav-link,
  .site-nav .nav-user {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.82rem;
  }

  .site-nav a.nav-link[aria-current='page']::after {
    display: none;
  }

  .nav-auth {
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav-auth .btn {
    width: 100%;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    min-height: 0;
    order: 0;
  }

  .hero-photo {
    transform: none;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  .btn-small {
    min-height: 44px;
    padding: 12px 18px;
  }

  .nav-toggle {
    min-height: 44px;
  }

  .site-nav {
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .auth-visual {
    display: none;
  }

  .auth-layout {
    display: block;
    min-height: 0;
    padding: 32px 0 56px;
  }

  .auth-form-wrap {
    max-width: 520px;
    margin-inline: auto;
  }

  .emblem {
    width: 200px;
    height: 200px;
    transform: rotate(-4deg);
  }

  .emblem svg {
    width: 84px;
    height: 84px;
  }

  .orbit--one {
    width: 270px;
    height: 270px;
  }

  .orbit--two {
    width: 330px;
    height: 330px;
  }

  .ride-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-card {
    padding: 26px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(1180px, 100% - 32px);
  }

  .section {
    padding: 64px 0;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .hero-stats {
    gap: 16px 26px;
  }

  .ride-grid,
  .ride-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .ride-card {
    padding: 18px;
    gap: 14px;
  }

  .ride-date {
    flex-basis: 50px;
    height: 66px;
  }

  .ride-date .day {
    font-size: 1.35rem;
  }

  .filter-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .filter-toggle {
    display: inline-flex;
    min-height: 44px;
  }

  .filter-advanced {
    display: none;
  }

  .filter-advanced.is-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-band {
    padding: 40px 26px;
  }

  .cta-band .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 16px 12px;
  }

  .stat-card .value {
    font-size: 1.5rem;
  }

  .stat-card .label {
    font-size: 0.64rem;
    letter-spacing: 0.05em;
  }

  .profile-hero {
    padding: 24px;
  }

  .profile-avatar {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
    font-size: 1.4rem;
    border-radius: 18px;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .btn {
    flex: 1;
  }

  .float-chip--one {
    left: -4px;
    top: 12px;
  }

  .float-chip--two {
    right: -4px;
    bottom: 84px;
  }

  .float-chip--three {
    left: 6px;
    bottom: 12px;
  }

  .auth-form-wrap .form-card {
    padding: 24px;
  }

  .site-footer {
    margin-top: 56px;
  }
}

@media (max-width: 640px) {
  .chat-shell {
    margin-bottom: 56px;
  }

  .chat-card {
    height: calc(100dvh - var(--header-h) - 250px);
    min-height: 420px;
    border-radius: 16px;
  }

  .chat-head {
    padding: 14px 16px;
  }

  .chat-messages {
    padding: 16px;
    gap: 14px;
  }

  .chat-msg {
    max-width: 88%;
  }

  .chat-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0.6rem;
  }

  .chat-form {
    padding: 10px 12px 12px;
  }

  .chat-form textarea {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .ride-cta {
    width: 100%;
    margin-left: 0;
  }

  .ride-cta .btn {
    width: 100%;
  }
}

/* Sur les écrans tactiles, évite les effets de survol qui restent collés. */
@media (hover: none) {
  .ride-card:hover,
  .btn:hover {
    transform: none;
  }

  .ride-card:hover {
    box-shadow: none;
    border-color: var(--line);
  }
}

/* ---------- Rôles et administration ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--role.badge--owner {
  border-color: rgba(255, 43, 43, 0.55);
  background: rgba(255, 43, 43, 0.12);
  color: var(--green);
}

.badge--role.badge--admin {
  border-color: rgba(255, 200, 87, 0.45);
  background: rgba(255, 200, 87, 0.1);
  color: var(--warning);
}

.badge--role.badge--moderator {
  border-color: rgba(116, 184, 255, 0.45);
  background: rgba(116, 184, 255, 0.1);
  color: #c9cfd9;
}

.badge--role.badge--member {
  color: var(--muted);
}

.badge--status.badge--active {
  border-color: rgba(255, 43, 43, 0.25);
  color: var(--green);
}

.badge--status.badge--suspended {
  border-color: rgba(255, 200, 87, 0.35);
  color: var(--warning);
}

.badge--status.badge--banned {
  border-color: rgba(255, 107, 107, 0.35);
  color: var(--danger);
}

.badge--self {
  padding: 2px 7px;
  border-color: var(--line-strong);
  color: var(--muted);
  font-size: 0.55rem;
}

.admin-page-head {
  max-width: 820px;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 22px;
}

.admin-summary .stat-card {
  padding: 20px 22px;
}

.admin-role-note {
  margin-bottom: 22px;
  padding: 12px 15px;
  border-left: 2px solid var(--green);
  background: rgba(255, 43, 43, 0.04);
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-toolbar .field {
  margin: 0;
}

.admin-refresh {
  min-height: 45px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-member {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.admin-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 43, 43, 0.3);
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-member-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-member-text strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 500;
}

.admin-email {
  color: var(--muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.admin-reason {
  display: block;
  max-width: 230px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 250px;
}

.admin-role-edit,
.admin-sanctions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.78rem;
}

.admin-actions .btn {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 0.62rem;
}

.admin-empty {
  padding: 30px 16px !important;
  color: var(--muted);
  text-align: center !important;
}

.admin-legend {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-audit {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.admin-audit summary {
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.admin-audit-list {
  border-top: 1px solid var(--line);
  padding: 8px 18px 18px;
}

.admin-audit-entry {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.admin-audit-entry:last-child {
  border-bottom: 0;
}

.admin-audit-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-audit-head strong {
  font-weight: 500;
}

.admin-audit-head time,
.admin-audit-entry p {
  color: var(--muted);
  font-size: 0.76rem;
}

.admin-audit-details {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.owner-shell {
  max-width: 780px;
  margin: 40px auto 80px;
}

.owner-card {
  margin-top: 26px;
}

.owner-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.owner-current-label {
  width: 100%;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.owner-loading {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.owner-card .field {
  margin-top: 22px;
}

.owner-card .form-actions {
  margin-top: 20px;
}

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

  .admin-refresh {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .admin-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-refresh {
    grid-column: auto;
  }

  .owner-shell {
    margin-top: 24px;
  }

  .owner-card {
    padding: 24px 20px;
  }
}

/* ---------- Salons vocaux ---------- */

.voice-shell {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 64px;
}

.voice-room-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.voice-room {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.voice-room:last-child {
  border-bottom: 0;
}

.voice-room.is-current {
  background: rgba(255, 43, 43, 0.06);
}

.voice-room-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 150px;
}

.voice-room-info strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.voice-room-info span {
  font-size: 0.74rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.voice-room-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.voice-room-empty,
.voice-person-empty {
  padding: 20px 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.voice-create {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.voice-create input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0b0c10;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.voice-create input:focus {
  outline: none;
  border-color: var(--green);
}

.voice-hint {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--muted);
}

.voice-stage {
  min-width: 0;
}

.voice-participants {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: grid;
  gap: 4px;
}

.voice-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.voice-person.is-speaking {
  border-color: rgba(255, 43, 43, 0.45);
  background: rgba(255, 43, 43, 0.07);
}

.voice-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #161a20;
  font-size: 0.7rem;
}

.voice-person.is-speaking .voice-avatar {
  border-color: var(--green);
  color: var(--green);
}

.voice-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.voice-person-text strong {
  font-size: 0.86rem;
  font-weight: 500;
}

.voice-person-state {
  font-size: 0.7rem;
  color: var(--muted);
}

.voice-you {
  color: var(--muted);
  font-weight: 400;
}

.voice-speaking-dot {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--line-strong);
}

.voice-person.is-speaking .voice-speaking-dot {
  background: var(--green);
  box-shadow: 0 0 10px rgba(255, 43, 43, 0.8);
}

.voice-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.voice-controls .btn {
  flex: 1 1 140px;
  justify-content: center;
}

#voice-mute.is-muted {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ff8f97;
}

.voice-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 900px) {
  .voice-shell {
    grid-template-columns: 1fr;
  }
}

/* Bandeau d’aperçu du brouillon (propriétaire) */
.apercu-banner {
  position: sticky;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  background: #1c1400;
  border-top: 1px solid rgba(255, 200, 87, 0.45);
  color: #ff6a00;
  font-size: 0.85rem;
  text-align: center;
}

.apercu-banner a {
  color: #ff6a00;
  text-decoration: underline;
}

/* Annonce globale publiée depuis le tableau de bord */
.site-announcement {
  position: relative;
  z-index: 45;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) 18%, var(--bg)), var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--green) 45%, var(--line));
  color: var(--text);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
}

/* Signalement de message */
.chat-report {
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-report:hover {
  color: var(--warning);
}

.report-dialog {
  width: calc(100% - 2rem);
  max-width: 480px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.4rem;
}

.report-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.report-dialog h2 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.report-dialog p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.8rem;
}

.report-dialog textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  padding: 0.7rem;
  resize: vertical;
}

.report-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
