  :root {
    /* Paddock : blanc cassé chaud, encre presque noire, rouge vibreur */
    --bg: #f4f3ef;
    --surface: #ffffff;
    --surface-alt: #ebe9e2;
    --border: #e1dfd8;
    --text: #14161a;
    --text-muted: #6a6e76;
    --accent: #c8261f;
    --accent-strong: #9e1d18;
    --accent-ink: #ffffff;
    --best: #1d8a4e;
    --best-bg: #e4f3ea;
    --danger: #b42318;
    --danger-bg: #fbe9e8;
    --kerb: repeating-linear-gradient(90deg, #c8261f 0 8px, #ffffff 8px 16px);
    --series-2: #2f6fed;
    --series-3: #8b3fd9;
    --series-4: #0e8f8f;
    --shadow: 0 1px 2px rgba(22,33,44,0.07), 0 6px 16px rgba(22,33,44,0.06);
    --radius: 10px;
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', 'Segoe UI', sans-serif;
    /* Chiffres (chronos, horaires) : même police haute et serrée que les titres, chiffres à chasse fixe */
    --font-mono: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    /* --header-h is a fallback for the first paint only -- app.js measures
       the real header and overwrites this via updateFixedHeaderOffset()
       on every render, since the header's height isn't constant (it wraps
       differently per view, and the status banner adds a row). */
    --header-h: 64px;
    --bottom-nav-h: 60px;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #10151b;
      --surface: #1a2129;
      --surface-alt: #212a33;
      --border: #2c3742;
      --text: #ecf1f5;
      --text-muted: #93a3b0;
      --accent: #f0544a;
      --accent-strong: #ff7a70;
      --accent-ink: #ffffff;
      --kerb: repeating-linear-gradient(90deg, #f0544a 0 8px, #f4f3ef 8px 16px);
      --best: #3fcf8e;
      --best-bg: rgba(63,207,142,0.14);
      --danger: #f0716a;
      --danger-bg: rgba(240,113,106,0.12);
      --series-2: #6ea8ff;
      --series-3: #c49bf5;
      --series-4: #35d0d0;
      --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 20px rgba(0,0,0,0.35);
    }
  }
  :root[data-theme="dark"] {
    --bg: #10151b;
    --surface: #1a2129;
    --surface-alt: #212a33;
    --border: #2c3742;
    --text: #ecf1f5;
    --text-muted: #93a3b0;
    --accent: #f0544a;
    --accent-strong: #ff7a70;
    --accent-ink: #ffffff;
    --kerb: repeating-linear-gradient(90deg, #f0544a 0 8px, #f4f3ef 8px 16px);
    --best: #3fcf8e;
    --best-bg: rgba(63,207,142,0.14);
    --danger: #f0716a;
    --danger-bg: rgba(240,113,106,0.12);
    --series-2: #6ea8ff;
    --series-3: #c49bf5;
    --series-4: #35d0d0;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 8px 20px rgba(0,0,0,0.35);
  }

  * { box-sizing: border-box; }
  html { color-scheme: light dark; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }

  .wrap {
    max-width: 880px;
    margin: 0 auto;
    /* Top padding clears the fixed header (see header.page-head) instead
       of scrolling underneath it, like a native app's content area below
       its title bar. Bottom padding only reserves space for the bottom
       nav once signed in -- see body.has-bottom-nav below -- since the
       login screen has none. */
    padding: calc(var(--header-h) + 1.2rem) 1.5rem 2rem;
  }
  body.has-bottom-nav .wrap {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 1.8rem);
  }

  header.page-head {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--bg);
    /* A bold accent line, not a hairline neutral border -- the header is
       the one element on screen at all times, worth carrying the brand
       colour instead of blending into the background. */
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    /* Installed as a standalone PWA (see manifest.json), there's no browser
       chrome left to push content below the device's own status bar/notch
       -- without this, the clock/signal icons render right on top of the
       title and header buttons. Padding (not just a top offset) so it's
       included in the offsetHeight updateFixedHeaderOffset() measures,
       and .wrap's padding-top -- driven by that same --header-h -- clears
       it automatically. A no-op on a normal browser tab (inset is 0). */
    padding-top: env(safe-area-inset-top);
  }
  .title {
    font-family: var(--font-display);
    letter-spacing: 0.01em;
  }
  /* Same max-width/centering as .wrap, kept separate since the header
     itself spans the full viewport width (position:fixed's containing
     block) -- only its content should line up with the page below it. */
  .page-head-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem 0.7rem;
  }
  @media (max-width: 480px) {
    .page-head-inner { padding: 0.75rem 1rem 0.55rem; }
  }
  .account-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
  }
  .account-bar-identity { white-space: nowrap; }
  .account-bar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .account-bar-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
  }
  .auth-screen { display: flex; justify-content: center; margin-top: 1.5rem; }
  .auth-card { width: 100%; max-width: 380px; }
  .auth-card label { margin-top: 0.9rem; }
  .auth-card label:first-of-type { margin-top: 0.9rem; }
  .auth-card input { margin-bottom: 0; }
  .auth-card .field-error { margin-top: 0.6rem; }
  .auth-role-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-top: 0.4rem;
    font-size: 0.9rem;
  }
  .auth-role-choice label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    margin-top: 0;
  }
  .auth-role-choice input { width: auto; }
  .auth-link {
    display: inline-block;
    margin-top: 0.3rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 500;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
  }
  .page-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .header-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }
  /* Stats/Coach icon buttons in the fixed header -- same round-pill
     language as .theme-toggle-btn, just standalone instead of grouped. */
  .header-icon-btn {
    position: relative;
    width: 2.1rem;
    height: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
  }
  .header-icon-btn:hover { background: var(--surface-alt); color: var(--text); }
  .header-icon-btn.active { color: var(--accent); background: var(--surface-alt); }
  .notif-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
  }
  .profile-badge-btn {
    border: none;
    background: none;
    padding: 0;
    margin-left: 0.15rem;
    cursor: pointer;
    line-height: 0;
    border-radius: 999px;
  }
  .profile-badge-btn .mini-avatar { width: 2.2rem; height: 2.2rem; }
  .profile-badge-btn:hover .mini-avatar { box-shadow: 0 0 0 2px var(--accent); }
  .notifications-panel { margin-bottom: 1.2rem; }
  .theme-toggle {
    display: inline-flex;
    gap: 0.2rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem;
    flex-shrink: 0;
  }
  .theme-toggle-btn {
    width: 1.9rem;
    height: 1.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
    opacity: 0.55;
  }
  .theme-toggle-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
  .theme-toggle-btn:hover { opacity: 0.85; }
  .theme-toggle-btn.active {
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 1;
  }
  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
  }
  /* Compact for the fixed header bar (see .page-head-row) rather than a
     page-hero title -- the app no longer has room to spare above the
     content once both the header and bottom nav are pinned. */
  h1.title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0;
    letter-spacing: -0.01em;
  }

  .last-outing {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1.5rem;
  }
  .last-outing strong { color: var(--text); font-weight: 600; }
  .last-outing-time {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--best);
    font-weight: 600;
  }

  .summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.75rem;
  }
  @media (max-width: 640px) {
    .summary-grid { grid-template-columns: 1fr; }
  }
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
  }
  .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 500;
  }
  .stat-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.3rem;
    color: var(--text);
  }
  .stat-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.3rem 1.4rem;
  }

  .section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
  }

  form#session-form { margin-bottom: 2rem; }
  .field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.9rem;
  }
  label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.32rem;
  }
  input[type="date"], input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.55rem 0.65rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
  }
  select { cursor: pointer; }
  input[type="date"]:focus-visible, input[type="text"]:focus-visible, input[type="email"]:focus-visible, input[type="password"]:focus-visible, input[type="url"]:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  textarea {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    min-height: 4.6rem;
    resize: vertical;
  }
  .help-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
  }
  .field-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.35rem;
    display: none;
  }
  .field-error.visible { display: block; }
  /* Softer than .field-error -- a nudge to double-check, not a blocking
     validation failure (the form still submits fine either way). */
  .field-warning {
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.35rem;
    display: none;
  }
  .field-warning.visible { display: block; }

  button {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 7px;
    border: 1px solid transparent;
    padding: 0.6rem 1.05rem;
    cursor: pointer;
  }
  button.primary {
    background: var(--accent);
    color: var(--accent-ink);
  }
  button.primary:hover { background: var(--accent-strong); }
  button.primary:disabled { opacity: 0.6; cursor: default; }
  /* Not full-width -- a button stretched edge-to-edge (especially once
     the page itself got wider on desktop) reads as an oversized banner
     rather than a button. Auto-sized to its label, like every other
     button in the app. */
  .add-chrono-btn { padding: 0.8rem 1.4rem; font-size: 0.95rem; font-weight: 600; }
  button.ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }
  button.ghost:hover { border-color: var(--danger); color: var(--danger); }
  button.ghost.confirm { border-color: var(--danger); color: var(--danger); }
  button.ghost.danger { border-color: var(--danger); color: var(--danger); }
  button.ghost.liked { border-color: var(--accent); color: var(--accent); }
  .danger-zone {
    margin-top: 1.2rem;
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
  }

  .banner {
    display: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.86rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-muted);
  }
  .banner.visible { display: block; }
  .email-reminder-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0.7rem 1rem;
    margin: 0 0 1rem;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--accent);
  }
  .email-reminder-banner button { flex: none; }
  .offline-banner {
    padding: 0.65rem 1rem;
    margin: 0 0 1rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.84rem;
    color: var(--text-muted);
  }

  .sessions-card { margin-bottom: 1.5rem; }
  .records-year-card { margin-bottom: 1.5rem; }
  .gain-cell { color: var(--best); font-weight: 600; font-variant-numeric: tabular-nums; }
  .circuit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
  }
  .circuit-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
  }
  .circuit-best {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--best);
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.session-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
  }
  @media (max-width: 480px) {
    .wrap { padding-left: 1rem; padding-right: 1rem; }
    .card { padding: 1rem 0.9rem 1.1rem; }
    table.session-table { font-size: 0.78rem; }
    table.session-table th, table.session-table td { padding: 0.4rem 0.35rem; }
    .record-pill { display: block; margin-left: 0; margin-top: 0.15rem; width: fit-content; }
    .icon-btn { width: 1.7rem; height: 1.7rem; font-size: 1rem; }
    button.primary { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
    button.ghost:not(.icon-btn) { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
  }
  table.session-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  table.session-table td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }
  table.session-table tr:last-child td { border-bottom: none; }
  .laps-cell {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
  }
  .laps-cell .best-lap {
    color: var(--best);
    background: var(--best-bg);
    border-radius: 5px;
    padding: 0.05rem 0.35rem;
    font-weight: 600;
  }
  .record-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--best);
    background: var(--best-bg);
    border-radius: 5px;
    padding: 0.12rem 0.4rem;
    margin-left: 0.4rem;
  }
  .verified-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 15%, var(--surface));
    border-radius: 5px;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
  }
  .my-group-letter { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
  .event-likes-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 15%, var(--surface));
    border-radius: 5px;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
  }
  .lap-delta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.3rem;
  }
  .daily-recap-better { color: #2e9e5b; font-weight: 600; }
  .daily-recap-worse { color: var(--danger); font-weight: 600; }
  .daily-recap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
  }
  .return-reminder {
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.9rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
  }
  .note-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.2rem;
    white-space: normal;
  }
  .row-actions { text-align: right; white-space: nowrap; }
  .location-actions {
    display: inline-flex;
    gap: 0.3rem;
    margin-left: 0.4rem;
    vertical-align: middle;
  }
  .location-actions .icon-btn {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.85rem;
  }
  .location-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem; }
  .icon-btn {
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
  }
  .bike-cell, .rider-cell { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }

  .rider-manager { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
  .rider-manager-list { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
  .friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .friend-row:last-child { border-bottom: none; }
  .friend-row-main { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
  /* Stacked, not the usual left/right friend-row split -- three role
     buttons plus Refuser never fit on one line next to a name. */
  .team-join-request-row { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .team-join-request-row:last-child { border-bottom: none; }
  .team-join-request-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.2rem; }
  /* Drag-and-drop a rider between groups (renderGroupsSection), mainly a
     desktop convenience -- the grab cursor and drop-target highlight. */
  [data-drag-rider] { cursor: grab; }
  .group-drop-zone { min-height: 1.5rem; border-radius: 8px; transition: background-color 0.12s ease; }
  .group-drop-zone-hover { background-color: color-mix(in srgb, var(--accent) 12%, transparent); }
  /* Badges legend (Profil > Aide > À propos) -- one row per badge/color,
     the same swatch (icon, or the badge/name class itself) next to its
     plain-language meaning. */
  .legend-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
  .legend-row:last-child { border-bottom: none; }
  .legend-swatch { flex-shrink: 0; min-width: 1.4rem; text-align: center; font-weight: 600; }
  .team-description { flex-basis: 100%; margin-top: 0.5rem; }
  .team-stats-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-muted);
  }
  .team-logo-frame { margin-top: 0.8rem; }
  .team-logo-img { display: block; width: 100%; height: 5.5rem; max-height: 5.5rem; object-fit: cover; border-radius: 8px; }
  .team-links-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
  .chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .team-link-chip {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    text-decoration: none;
  }
  .coach-availability-type-switch { display: inline-flex; gap: 0.3rem; }
  .coach-availability-type-btn {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
  }
  .coach-availability-type-btn.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
  /* Same green as the COACH badge -- a slot
     available for coaching reads green, for baptême piste orange, both at
     once gets its own purple rather than mixing the two. */
  .schedule-slot.slot-avail-coaching { background: color-mix(in srgb, #1c8f5a 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px #1c8f5a; }
  .schedule-slot.slot-avail-bapteme { background: color-mix(in srgb, var(--accent) 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px var(--accent); }
  .schedule-slot.slot-avail-both { background: color-mix(in srgb, var(--series-3) 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px var(--series-3); }
  /* The drag-paint surface (see attachHandlers) -- no text selection
     while dragging across the slot labels, and a crosshair-ish cursor as
     a hint that this grid behaves differently than the normal
     click-to-request one right next to it. */
  .coach-availability-painting { user-select: none; -webkit-user-select: none; touch-action: none; }
  .coach-availability-painting .schedule-slot[data-slot-start] { cursor: pointer; }
  .coach-slot-modal-options { max-height: 9rem; overflow-y: auto; margin-top: 0.3rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.6rem; }
  .crop-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }
  .crop-modal { background: var(--surface); border-radius: 12px; padding: 1.2rem; max-width: 360px; width: 100%; }
  .crop-modal-viewport {
    margin: 0.8rem auto 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    position: relative;
    touch-action: none;
    cursor: grab;
    max-width: 100%;
  }
  .crop-modal-viewport-rect { border-radius: 8px; }
  .crop-modal-viewport img { position: absolute; top: 50%; left: 50%; max-width: none; }
  .tutorial-modal { max-width: 400px; text-align: center; }
  .tutorial-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 0.4rem; }
  .tutorial-modal .help-text { font-size: 0.9rem; margin-top: 0.4rem; }
  .tutorial-dots { display: flex; justify-content: center; gap: 0.35rem; margin-top: 1rem; }
  .tutorial-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
  .tutorial-dot.active { background: var(--accent); }
  .feeling-modal { max-width: 360px; text-align: center; }
  .feeling-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  .feeling-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 4.4rem;
    padding: 0.6rem 0.3rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
  }
  .feeling-option-btn:hover { border-color: var(--accent); }
  .feeling-option-icon { font-size: 1.6rem; line-height: 1; }
  .feeling-option-label { font-size: 0.72rem; color: var(--text-muted); }
  .feeling-tag { font-size: 1.05rem; line-height: 1; }
  .mini-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mini-avatar-placeholder { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--text-muted); }
  .friend-name-plain { font-size: 0.9rem; }
  .account-role-tag {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
  }
  .friend-role-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--surface-alt);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
  }
  .friend-role-badge.adherent-badge {
    color: #7a5b00;
    background: #f5d78e;
  }
  .friend-row-actions { display: flex; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap; }
  /* Column labels for .participants-list on desktop -- meaningless on
     mobile's stacked rows, hidden there. */
  .participants-list-head { display: none; }
  .organizer-hub-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  /* Tappable on mobile (no hover for the title= explanation there) --
     see data-badge-info/attachHandlers, which pops the same text as a
     toast on click/tap. */
  .certified-badge, .personality-badge, .pro-badge, .organizer-badge,
  .coach-badge, .photographer-badge, .team-pro-badge, .verified-pill { cursor: pointer; }
  .certified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    background: var(--accent);
    color: var(--surface);
    font-size: 0.7em;
    font-weight: 700;
    vertical-align: middle;
  }
  .personality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    background: #d4a017;
    color: var(--surface);
    font-size: 0.65em;
    vertical-align: middle;
  }
  .pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.1em;
    border-radius: 4px;
    background: #1e5f8c;
    color: #fff;
    font-size: 0.72em;
    vertical-align: middle;
  }
  .organizer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.1em;
    border-radius: 4px;
    background: #6a4fa0;
    color: #fff;
    font-size: 0.72em;
    vertical-align: middle;
  }
  .coach-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.1em;
    border-radius: 4px;
    background: #1c8f5a;
    color: #fff;
    font-size: 0.72em;
    vertical-align: middle;
  }
  .photographer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.1em;
    border-radius: 4px;
    background: #b8420f;
    color: #fff;
    font-size: 0.72em;
    vertical-align: middle;
  }
  .coach-request-row {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }
  .coach-request-row:last-child { border-bottom: none; }
  .coach-request-row textarea { margin-top: 0.3rem; }
  .coach-message {
    background: var(--surface-alt);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    margin-bottom: 0.5rem;
    max-width: 85%;
  }
  .coach-message.mine {
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-alt));
    margin-left: auto;
  }
  .coach-message-head { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.72rem; }
  .coach-message-text { font-size: 0.86rem; margin-top: 0.15rem; white-space: pre-wrap; word-break: break-word; }
  .coach-message-form { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
  .coach-message-form input { flex: 1; }
  /* Blue check, like a verified badge on a social app -- was a gold
     "TEAM PRO ✓" pill, mismatched with the certified-badge/personality-
     badge/etc. family's small round icon shape right next to it. */
  .team-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    background: #1d7fd6;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 0.4rem;
  }
  .team-settings-disabled { opacity: 0.6; }
  .friend-name-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: transparent;
    cursor: pointer;
  }
  .friend-name-link:hover { text-decoration-color: var(--accent); color: var(--accent); }
  /* A Team PRO's own Team Leader's pseudo, wherever it shows up (see
     personNameHtml/nameLinkHtml/renderRiderLink in app.js) -- bold accent
     regardless of which element/color it's layered onto (a plain span, a
     clickable name button, the admin's account list...), hence
     !important rather than fighting each one's own specificity. */
  .pro-leader-name { color: #1d7fd6 !important; font-weight: 700; }
  /* Same blue as .team-pro-badge's coche, reused here so "blue = an
     official trust marker" reads consistently across the app. */
  .coach-name { color: #1d7fd6 !important; font-weight: 700; }
  .friend-fiche {
    margin: 0.4rem 0 0.8rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface-alt);
    border-radius: 8px;
  }
  .feed-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
  }
  .feed-entry:last-child { border-bottom: none; }
  .feed-entry-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
  .feed-entry-time { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
  .reaction-bar { display: flex; gap: 0.35rem; margin-top: 0.4rem; flex-wrap: wrap; }
  .reaction-btn {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    line-height: 1.4;
  }
  .reaction-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--surface-alt)); }
  .team-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 500;
    margin: 1.1rem 0 0.4rem;
  }
  .team-card .team-section-title:first-of-type { margin-top: 0.8rem; }
  /* Small, clean Team "encadrés" (see renderTeamTile) -- a compact grid
     instead of the old full-width list rows, per "épuré visuellement et
     joli". Two per row on a phone, more as space allows. */
  .team-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
  }
  .team-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
  }
  .team-tile-main {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: 100%;
    font: inherit;
    color: inherit;
    cursor: pointer;
  }
  .team-tile-main .mini-avatar { width: 2.6rem; height: 2.6rem; }
  .team-tile-main:hover .team-tile-name { color: var(--accent); }
  .team-tile-name { font-weight: 600; font-size: 0.9rem; }
  .team-tile-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .team-tile-stats { font-size: 0.72rem; color: var(--text-muted); }
  .team-tile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
  }
  .team-tile-actions button { font-size: 0.76rem; padding: 0.3rem 0.6rem; }
  /* Unified member-management panel (renderTeamMembersManagement) -- one
     row per person, four toggle pills reflecting Suivi/Membre/Adhérent/
     Team Leader status at a glance. */
  .team-manage-row {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }
  .team-manage-row:last-child { border-bottom: none; }
  .team-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
  }
  .team-status-pill {
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 600;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    cursor: pointer;
  }
  .team-status-pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .team-status-pill.confirm { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
  .team-manage-pending {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--accent);
  }
  .team-role-field {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.4rem;
  }
  .team-role-field input { font-size: 0.82rem; padding: 0.35rem 0.55rem; }
  .team-invite-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }
  .team-invite-form select { flex: 1; margin: 0; }
  .team-invite-form button { flex-shrink: 0; margin: 0; }
  .team-event-add-rider-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }
  .team-event-add-rider-form select { flex: 1; margin: 0; }
  .team-event-add-rider-form button { flex-shrink: 0; margin: 0; }
  .team-feed-form, .team-poll-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }
  .team-feed-form input, .team-poll-form input { margin: 0; }
  .poll-options { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
  .poll-option-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.45rem 0.7rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
  }
  .poll-option-btn.voted { border-color: var(--accent); }
  .poll-option-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--surface);
    opacity: 0.5;
    z-index: 0;
    transition: width 0.2s ease;
  }
  .poll-option-label, .poll-option-pct { position: relative; z-index: 1; }
  .poll-option-pct { color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
  .social-suggestions-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
  }
  .social-suggestions-row:last-child { margin-bottom: 0; }
  .social-suggestions-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-basis: 100%;
  }
  .suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface-alt);
    border-radius: 999px;
    padding: 0.25rem 0.4rem 0.25rem 0.7rem;
    font-size: 0.82rem;
  }
  .suggestion-chip .icon-btn { width: 1.4rem; height: 1.4rem; }
  .suggestion-profile-row {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    margin-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }
  .suggestion-profile-card {
    flex: 0 0 auto;
    width: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-alt);
    text-align: center;
  }
  .suggestion-profile-name {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .rider-manager-row { display: flex; align-items: center; gap: 0.5rem; }
  .rider-manager-row .rider-manager-name { flex: 1; font-size: 0.9rem; }
  .rider-manager-add-form, .rider-manager-rename-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
  .rider-manager-add-form input, .rider-manager-rename-form input { flex: 1; margin: 0; }
  .rider-manager-add-form button, .rider-manager-rename-form button { flex-shrink: 0; }
  .rider-manager-row-edit { width: 100%; }
  .account-manager-row { align-items: flex-start; padding: 0.3rem 0; }
  .account-manager-row > div:first-child { flex: 1; }

  .stats-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
  .rider-stat-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
  }
  .rider-stat-summaries {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .stat-summary-category {
    background: var(--surface-alt);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
  }
  .stat-summary-category summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }
  .stat-summary-category summary::-webkit-details-marker { display: none; }
  .stat-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 500;
  }
  .stat-summary-label::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
  }
  .stat-summary-category[open] .stat-summary-label::before { transform: rotate(90deg); }
  .stat-summary-value {
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    font-size: 1.3rem;
    font-weight: 700;
  }
  .stat-detail-list {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-height: 220px;
    overflow-y: auto;
  }
  .best-times-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.2rem;
  }
  .achievements-card .planning-section {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
  }
  .achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .achievement-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: var(--surface-alt);
    opacity: 0.55;
  }
  .achievement-row.earned {
    opacity: 1;
    border: 1px solid var(--accent);
  }
  .achievement-icon {
    font-size: 1.3rem;
    filter: grayscale(1);
    flex-shrink: 0;
  }
  .achievement-row.earned .achievement-icon { filter: none; }
  .achievement-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .achievement-title { font-weight: 600; font-size: 0.88rem; }
  .achievement-desc { font-size: 0.76rem; color: var(--text-muted); }
  .achievement-progress {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .achievement-row.earned .achievement-progress { color: var(--accent); }
  .wall-post {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
  }
  .wall-post:last-child { border-bottom: none; }
  .wall-post-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
  .wall-post-text { font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
  .wall-post-link {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--accent);
    word-break: break-all;
  }
  .wall-post-photo {
    display: block;
    margin-top: 0.5rem;
    max-width: 100%;
    max-height: 320px;
    border-radius: 8px;
    border: 1px solid var(--border);
  }
  .wall-post-photo-preview {
    display: block;
    max-width: 160px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
  }
  .horaires-photo-block {
    margin-top: 1.1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
  }
  .horaires-photo-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; }
  .horaires-photo-thumb {
    display: block;
    margin-top: 0.6rem;
    width: 100%;
    max-width: 100%;
    max-height: none;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    object-fit: contain;
  }
  .photo-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
    /* Lets a pinch/pan gesture on the photo itself scroll past the
       overlay's own bounds instead of the whole page moving underneath
       it -- overflow:auto plus this keeps the gesture contained here. */
    overflow: auto;
    touch-action: pinch-zoom pan-x pan-y;
  }
  .photo-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    display: block;
  }
  .photo-lightbox-close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 0.8rem);
    right: 0.8rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    z-index: 251;
  }
  .referral-panel {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.8rem;
    flex-wrap: wrap;
  }
  .referral-qr {
    border-radius: 8px;
    background: #fff;
    padding: 0.4rem;
    flex-shrink: 0;
  }
  .referral-actions { flex: 1; min-width: 180px; }
  .referral-link-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
    margin-bottom: 0.6rem;
  }
  .referral-milestones {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  .referral-milestone {
    font-size: 0.82rem;
    color: var(--text-muted);
  }
  .referral-milestone.reached { color: var(--accent); font-weight: 600; }
  .feedback-row {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-top: 0.6rem;
  }
  .feedback-row-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.3rem; }
  .feedback-row-text { font-size: 0.9rem; white-space: pre-wrap; }
  .best-time-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
  }
  .best-time-row:last-child { border-bottom: none; }
  .best-time-circuit { font-weight: 500; }
  .best-time-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--best);
    font-weight: 600;
  }
  .best-time-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
  }
  .empty-inline {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.3rem 0;
  }

  .empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.92rem;
  }

  .toast-stack {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 0.9rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
    width: min(92vw, 420px);
  }
  .toast {
    background: var(--text);
    color: var(--bg);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    box-shadow: var(--shadow);
  }
  .toast.success {
    background: var(--best-bg);
    color: var(--best);
    border: 1px solid var(--best);
    font-weight: 600;
  }

  .circuit-info-card { margin-bottom: 1.5rem; }
  .circuit-info-map-full { margin: 0.7rem 0 1.1rem; }
  .circuit-info-map-full .circuit-visual-frame { width: 100%; }
  .circuit-info-list { min-width: 0; }
  .info-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
  }
  .info-row:last-child { border-bottom: none; }
  .info-label { color: var(--text-muted); }
  .info-value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
  }
  .link-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
  }
  .circuit-visual-frame { width: 128px; flex-shrink: 0; }
  .circuit-visual-btn {
    display: block;
    width: 100%;
    padding: 0.4rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface-alt);
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
  }
  .circuit-visual-btn:hover { border-color: var(--accent); }
  .circuit-visual-btn img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
  .circuit-visual-caption {
    font-size: 0.66rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.3rem;
  }
  .circuit-visual-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
  }
  @media (max-width: 480px) {
    .circuit-visual-frame { width: 92px; }
  }
  .info-edit-form {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
  }
  .info-edit-form input { font-size: 0.88rem; }
  .info-edit-actions { margin-top: 0.65rem; display: flex; gap: 0.5rem; }

  /* Fixed to the bottom of the viewport like a native app's tab bar (see
     renderBottomNav()) -- full width, no max-width/centering the way
     .page-head-inner gets one, since an even-width row of tab buttons is
     the native pattern, not a centered content column. */
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.3rem 0.2rem calc(0.3rem + env(safe-area-inset-bottom));
  }
  .bottom-nav-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    background: none;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.35rem 0.1rem;
    cursor: pointer;
  }
  .bottom-nav-btn:hover { color: var(--text); }
  .bottom-nav-btn:active { background: var(--surface-alt); }
  .bottom-nav-btn.active { color: var(--accent); }
  .bottom-nav-icon { font-size: 1.3rem; line-height: 1; }
  .bottom-nav-label {
    font-size: 0.66rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  @media (max-width: 400px) {
    .bottom-nav-icon { font-size: 1.15rem; }
    .bottom-nav-label { font-size: 0.6rem; }
  }

  /* Desktop layout -- everything up to here was built and tested on
     mobile only, so a wide viewport just got the same narrow centered
     column with huge empty margins either side, and the tab bar sat
     oddly pinned to the bottom of an otherwise tall window. Past this
     breakpoint, .bottom-nav becomes a persistent left sidebar (own DOM,
     just repositioned/relaid-out -- renderBottomNav() itself doesn't
     change) and the content column gets real breathing room. Below the
     breakpoint every rule above still applies unchanged. */
  :root { --sidebar-w: 220px; }
  @media (min-width: 960px) {
    /* 5.5rem reads fine on a phone-width card but looks like a thin
       strip once the card itself is desktop-wide -- 2.2x taller keeps
       the same look, scaled to the room available. */
    .team-logo-img { height: 12.1rem; max-height: 12.1rem; }
    .wrap {
      /* Fluid, not a fixed 1100px -- on a genuinely wide monitor a flat
         cap left a dead strip of empty page down the right side (worse
         the wider the screen), which is the opposite of "plus d'espace =
         plus de confort". Grows with the viewport, capped at 1600px so
         a line of text never gets absurdly long on an ultrawide. */
      max-width: 1600px;
      margin: 0 0 0 var(--sidebar-w);
      padding: calc(var(--header-h) + 1.5rem) 2.2rem 2.5rem;
    }
    body.has-bottom-nav .wrap {
      /* No bottom-nav down there any more to reserve space for. */
      padding-bottom: 2.5rem;
    }
    header.page-head { left: var(--sidebar-w); }
    .page-head-inner { max-width: 1600px; margin: 0; padding: 1rem 2.2rem 0.8rem; }
    .bottom-nav {
      top: 0;
      bottom: 0;
      left: 0;
      right: auto;
      width: var(--sidebar-w);
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0.3rem;
      padding: calc(var(--header-h) + 1.2rem) 0.7rem 1rem;
      border-top: none;
      border-right: 1px solid var(--border);
      box-shadow: none;
    }
    .bottom-nav-btn {
      flex-direction: row;
      justify-content: flex-start;
      gap: 0.7rem;
      padding: 0.6rem 0.8rem;
      font-size: 0.92rem;
    }
    .bottom-nav-btn.active { background: var(--surface-alt); }
    .bottom-nav-icon { font-size: 1.15rem; }
    .bottom-nav-label { font-size: 0.86rem; overflow: visible; }
    .toast-stack { bottom: 1.2rem; }

    /* renderGroupsSection's board (Gestion des événements' Groupes) --
       the one screen this whole desktop pass is really for: an
       organisateur checking "les pilotes dans les bons groupes" at a
       glance instead of scrolling one long accordion. Each group stays
       its own <details data-planning-section>, already open by default
       (see renderGroupsSection), just laid out as a column instead of a
       full-width block -- still individually collapsible to free up
       horizontal room. Horizontal scroll rather than wrapping: a 6th
       group scrolling into view reads better than the board reflowing to
       two uneven rows.
    */
    .groups-board {
      display: flex;
      align-items: flex-start;
      gap: 0.9rem;
      overflow-x: auto;
      padding-bottom: 0.6rem;
      margin-top: 0.6rem;
    }
    /* Text fields shouldn't stretch to the same width as the wide
       .wrap around them -- a Pseudo/Circuit input spanning 1500px reads
       worse than the narrow-page version did. Dense flex/grid layouts
       (friend-row, groups-board, the participants table below) aren't
       affected, only bare form fields. */
    input[type="date"], input[type="text"], input[type="email"],
    input[type="password"], input[type="url"], textarea, select {
      max-width: 480px;
    }
    /* renderEventManagementScreen's Participants list -- same friend-row
       markup as everywhere else (mobile keeps the usual stacked rows),
       but here each row becomes a grid line: identité (nom, badges, rôle
       Team, #moto) / N° pour l'event / retirer, columns lined up across
       every row instead of a long stack of wrapped, differently-sized
       rows. Much faster to scan for an organiser checking 20-30 pilotes. */
    /* .circuit-visual-btn is a fixed 1:1 square (aspect-ratio: 1) sized
       off .circuit-visual-frame's width -- fine on mobile where that
       width tops out around 350-400px, but .circuit-info-map-full forces
       width:100%, and once the card itself can be 1500px+ wide (see
       .wrap above) that square grew taller than the viewport, cutting
       the bottom of the track plan off the screen. Size off viewport
       height instead of card width here, still capped so a narrower
       desktop window doesn't overflow sideways either. */
    /* Circuit + Chronos: le plan et la liste d'infos (distance, virages,
       dernier/prochain event, record) côte à côte au lieu de l'un sous
       l'autre -- il y a la place sur desktop, pas la peine de scroller
       pour lire la liste sous un grand plan. */
    .circuit-info-card {
      display: flex;
      gap: 1.8rem;
      align-items: flex-start;
    }
    .circuit-info-card .circuit-info-map-full { flex: 1 1 55%; margin: 0; min-width: 0; }
    .circuit-info-card .circuit-info-list { flex: 1 1 38%; min-width: 260px; }
    .circuit-info-map-full .circuit-visual-frame {
      width: auto;
      max-width: 100%;
      margin: 0 auto;
    }
    .circuit-info-map-full .circuit-visual-btn {
      width: auto;
      height: min(72vh, 900px);
      max-width: 100%;
    }
    .participants-list .friend-row {
      display: grid;
      grid-template-columns: 2fr 1fr auto;
      align-items: center;
      gap: 0.8rem;
    }
    .participants-list .team-role-field { margin-top: 0; }
    .participants-list-head {
      display: grid;
      border-bottom: 1px solid var(--border);
      padding-bottom: 0.4rem;
      margin-bottom: 0.2rem;
      font-size: 0.74rem;
      font-weight: 700;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      color: var(--text-muted);
    }
    .groups-board > .planning-section {
      flex: 0 0 260px;
      margin-top: 0;
      border-top: none;
      padding-top: 0;
      background: var(--surface-alt);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 0.8rem;
    }
  }

  .horaires-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.6rem;
    margin-top: 0.35rem;
  }
  .horaires-sublabel { font-size: 0.76rem; }

  .horaires-generator {
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-alt);
  }
  .horaires-generator summary {
    cursor: pointer;
    padding: 0.55rem 0.8rem;
    font-weight: 600;
    font-size: 0.86rem;
  }
  .horaires-generator-body { padding: 0 0.8rem 0.8rem; }
  .horaires-gen-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
  }
  .horaires-gen-row label { font-size: 0.8rem; white-space: nowrap; }
  .horaires-gen-row input[type="time"],
  .horaires-gen-row input[type="number"] {
    width: auto;
    flex: 1 1 90px;
    min-width: 0;
  }

  .rider-start-groups { display: flex; flex-direction: column; gap: 0.3rem; }

  /* The one card that says "this came from the Team, not from you" (see
     .personal-info-card right below it) -- a hairline border made that
     distinction too easy to miss. Thicker, and a warm accent wash instead
     of a flat surface, reads as a genuinely separate, organiser-owned
     panel rather than just another card with a tinted edge. */
  .today-schedule-card {
    border: 3px solid var(--accent);
    margin-bottom: 1rem;
  }
  .today-schedule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }
  .today-schedule-head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }
  /* Team badge, top-right of the orange card -- what distinguishes
     organizer-provided info from this account's own, in the grey card
     right below it (see .personal-info-card). Named separately from
     .team-pro-badge (the small blue-check trust badge, see above) --
     this one shows the organizing Team's own name, not "Team PRO". */
  .event-team-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-bg, rgba(200, 38, 31, 0.10));
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
  }
  .personal-info-card { background: var(--surface-alt); }
  .planning-big-clock {
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
  }
  .planning-section {
    margin-top: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
  }
  .planning-section summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
  }
  .planning-section summary::-webkit-details-marker { display: none; }
  .planning-section summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
  }
  .planning-section[open] summary::before { transform: rotate(90deg); }
  .planning-section-body { margin-top: 0.6rem; }
  .planning-countdown {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.9rem;
  }
  .planning-countdown-riders {
    color: var(--accent);
  }
  .planning-current-session {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
  }
  .planning-countdown-time {
    font-weight: 700;
    color: var(--accent);
  }

  .planning-group-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
  }
  .planning-group-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    cursor: pointer;
  }
  .planning-group-check input { width: auto; margin: 0; }

  .today-schedule-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
  }
  .today-schedule-group-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
  }
  .today-schedule-briefing .today-schedule-group-label { color: var(--accent); }
  .today-schedule-group-riders {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
  }
  .today-schedule-slots {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .schedule-slot {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: var(--surface-alt);
    color: var(--text);
  }
  .schedule-slot-label {
    font-family: var(--font-body);
    font-style: italic;
    background: transparent;
    padding-left: 0;
  }
  .schedule-slot.slot-past { opacity: 0.45; }
  .schedule-slot.slot-next {
    background: var(--best-bg);
    color: var(--best);
    font-weight: 600;
  }
  .schedule-slot.slot-current {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
  }
  .coach-planning-clickable .schedule-slot[data-slot-start] {
    cursor: pointer;
    border: 1px solid transparent;
  }
  .coach-planning-clickable .schedule-slot[data-slot-start]:hover {
    border-color: var(--accent);
  }

  .calendar-view-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
  }
  .calendar-view-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
  }
  .calendar-view-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }
  .calendar-zoom-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
  }

  .calendar-nav-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
  }
  .calendar-nav-card .icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.3rem;
    flex: none;
  }
  .calendar-year-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    min-width: 4ch;
    text-align: center;
  }
  #cal-today { margin-left: 0.25rem; }

  .calendar-filters-card { margin-bottom: 1.5rem; }

  .calendar-grid-card { margin-bottom: 1.5rem; touch-action: pan-y; }
  .calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.1rem;
  }
  .cal-month-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    text-align: center;
  }
  .cal-weekdays, .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
  }
  .cal-weekdays span {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
  }
  .cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text);
    background: none;
    border: none;
    border-radius: 4px;
    padding: 0;
    cursor: default;
  }
  .cal-day.empty { visibility: hidden; }
  button.cal-day { cursor: pointer; }
  .cal-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
  .cal-day.has-session:not(.has-event) {
    background: var(--best-bg);
    color: var(--best);
    font-weight: 600;
  }
  .cal-day.has-event {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
  }
  .cal-day.has-event.range-start { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
  .cal-day.has-event.range-end { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
  .cal-day.has-event.selected { box-shadow: inset 0 0 0 2px var(--text); }
  .cal-day-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--best);
  }
  .cal-day.has-event .cal-day-dot { background: var(--accent-ink); }

  .cal-month-large { max-width: 100%; }
  .cal-days-large { gap: 4px; }
  .cal-day-large {
    aspect-ratio: auto;
    min-height: 3.4rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.3rem 0.15rem;
    border-radius: 6px;
    gap: 0.15rem;
  }
  .cal-day-large .cal-day-dot { position: static; transform: none; width: 5px; height: 5px; }
  .cal-day-num { font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; }
  .cal-day-label {
    font-size: 0.6rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
  }
  @media (max-width: 700px) {
    .cal-week { grid-template-columns: 1fr; }
  }
  .cal-week-day {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem;
    min-height: 90px;
  }
  .calendar-cell.cal-week-day { cursor: pointer; }
  .cal-week-day.has-session:not(.has-event) { background: var(--best-bg); color: var(--best); }
  .cal-week-day.has-event { background: var(--accent); color: var(--accent-ink); }
  .cal-week-day.today { box-shadow: inset 0 0 0 2px var(--text); }
  .cal-week-day-head { font-family: var(--font-mono); font-weight: 600; font-size: 0.78rem; margin-bottom: 0.3rem; }
  .cal-week-event { font-weight: 600; font-size: 0.85rem; }
  .cal-week-riders { font-size: 0.72rem; opacity: 0.85; }
  .cal-week-session { font-size: 0.75rem; margin-top: 0.2rem; }

  .event-detail-card { margin-bottom: 1.5rem; }
  .event-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
  }
  .event-detail-header h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
  }
  .event-detail-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
  }

  .event-circuit-map { margin-top: 0.9rem; }
  .event-accordion-panel { margin: 0.6rem 0 1rem; }
  .event-checklist { margin-top: 0.9rem; }
  .event-checklist-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.3rem;
  }
  .profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
  }
  .profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .profile-avatar-placeholder {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-muted);
  }
  .profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
  .profile-followed-riders {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
  }
  .checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    padding: 0.3rem 0;
    cursor: pointer;
  }
  .checklist-item input { width: auto; cursor: pointer; }
  .checklist-item-row { display: flex; align-items: center; gap: 0.4rem; }
  .checklist-item-row .checklist-item { flex: 1; padding: 0.2rem 0; }
  .checklist-item-remove {
    flex-shrink: 0;
    opacity: 0.4;
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.85rem;
  }
  .checklist-item-remove:hover { opacity: 1; }
  .checklist-category { margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
  .checklist-category:last-of-type { border-bottom: none; }
  .checklist-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
  }
  .checklist-category-name { font-weight: 600; font-size: 0.9rem; }
  /* Group/subgroup headings inside the "Liste avant toute session"
     section (see renderAvantSessionChecklist) -- print once per group
     instead of repeating it on every item's own label. */
  .checklist-group-heading {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    margin-top: 0.9rem;
  }
  .checklist-group-heading:first-child { margin-top: 0; }
  .checklist-subgroup-heading {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.5rem;
  }
  .checklist-add-item-form, .checklist-add-category-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
  }
  .checklist-add-item-form input, .checklist-add-category-form input { flex: 1; margin: 0; }
  .checklist-add-item-form button, .checklist-add-category-form button { flex-shrink: 0; }
  .checklist-add-category-form { margin-top: 0.8rem; }
  .rider-groups-date-label { font-size: 0.76rem; color: var(--text-muted); font-weight: 500; margin: 0.5rem 0 0.2rem; }
  .rider-group-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
  .rider-group-row:last-child { border-bottom: none; }
  .rider-group-name { font-weight: 500; font-size: 0.88rem; min-width: 84px; }
  .rider-group-field { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--text-muted); }
  .rider-group-field select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.85rem; }
  .rider-group-common { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding: 0.4rem 0 0.6rem; margin-bottom: 0.3rem; border-bottom: 1px dashed var(--border); font-size: 0.82rem; color: var(--text-muted); }
  .rider-group-common select { width: auto; padding: 0.25rem 0.4rem; font-size: 0.85rem; }

  .event-linked-sessions { margin-top: 0.9rem; }
  .event-linked-session {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
  }
  .event-linked-session:last-child { border-bottom: none; }
  .event-linked-session > span:last-child { display: flex; align-items: center; gap: 0.5rem; }
  .event-linked-session-empty {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
  }

  .events-list-card { margin-top: 1.5rem; margin-bottom: 1.5rem; }
  .collapsible-card-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  .collapsible-card-summary::-webkit-details-marker { display: none; }
  .collapsible-card-title::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--text-muted);
    transition: transform 0.15s ease;
  }
  details[open] > .collapsible-card-summary .collapsible-card-title::before { transform: rotate(90deg); }
  .collapsible-card-summary .ghost { font-size: 0.82rem; padding: 0.35rem 0.7rem; }
  .collapsible-card-body { margin-top: 0.8rem; }
  .add-event-card { margin-bottom: 1.5rem; }
  .event-row {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
  }
  .event-row:last-child { border-bottom: none; }
  .event-row:hover { background: var(--surface-alt); }
  .event-row.selected { background: var(--best-bg); }
  .event-row-main {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.92rem;
    font-weight: 600;
  }
  .event-row-dates { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
  .event-row-checklist { margin-left: 0.5rem; color: var(--text-muted); font-weight: 500; }
  .event-row-riders { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

  .past-year-band { border-top: 1px solid var(--border); }
  .past-year-band:first-child { border-top: none; }
  .past-year-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0.7rem 0.4rem;
    cursor: pointer;
    font: inherit;
    color: var(--text);
    text-align: left;
  }
  .past-year-toggle:hover { background: var(--surface-alt); }
  .past-year-chevron { color: var(--text-muted); font-size: 0.72rem; width: 1em; flex-shrink: 0; }
  .past-year-label { font-weight: 600; font-size: 0.95rem; }
  .past-year-count { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
  .past-year-body .event-row:last-child { border-bottom: none; }

  .annot-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 100;
    display: none;
    flex-direction: column;
    /* Same PWA-standalone fix as header.page-head: this is its own
       separate full-screen fixed layer (not inside .wrap), so it needs
       the device status-bar/notch clearance again on its own -- without
       it, .annot-header sits right under the clock/camera housing once
       the app is installed. */
    padding-top: env(safe-area-inset-top);
  }
  .annot-overlay.open { display: flex; }
  .annot-overlay.force-landscape {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 100vh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
  }
  .annot-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .annot-title {
    font-family: var(--font-display);
    font-weight: 600;
    flex: 1;
    min-width: 90px;
  }
  #annot-session-select { max-width: 210px; width: auto; }
  .annot-orientation-hint {
    display: none;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
  }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-orientation-hint { display: block; }
  }
  .annot-body { flex: 1; display: flex; min-height: 0; }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-body { flex-direction: column; }
  }
  .annot-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.6rem;
    background: var(--surface);
    border-right: 1px solid var(--border);
    align-items: center;
  }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-toolbar { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
  }
  .annot-tool-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
  }
  .annot-tool-btn svg, #annot-clear svg, #annot-fullscreen svg, #annot-undo svg, #annot-export svg, .annot-zoom-btn svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: block;
  }
  .annot-tool-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }
  .annot-color-input {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: none;
    cursor: pointer;
  }
  .annot-size-group {
    display: flex;
    gap: 0.3rem;
    background: var(--surface-alt);
    border-radius: 8px;
    padding: 0.3rem;
  }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-size-group { flex-direction: row; }
  }
  .annot-size-btn {
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .annot-size-btn.active { border-color: var(--accent); background: var(--best-bg); }
  .annot-size-dot { display: block; border-radius: 50%; background: var(--text); }
  .annot-zoom-group {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--surface-alt);
    border-radius: 8px;
    padding: 0.3rem 0.35rem;
  }
  .annot-zoom-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-zoom-label { display: none; }
  }
  .annot-zoom-btn {
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
  }
  .annot-zoom-value {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.4rem 0.4rem;
    min-width: 2.6rem;
  }
  #annot-undo {
    margin-left: 0.15rem;
  }
  .annot-image-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8,12,16,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem;
  }
  .annot-image-preview-overlay img {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }
  .annot-image-preview-caption {
    color: #f2f5f8;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
  }
  .annot-image-preview-hint {
    color: #f2f5f8;
    font-size: 0.85rem;
    text-align: center;
    max-width: 340px;
    line-height: 1.4;
  }
  .annot-image-preview-close {
    position: absolute;
    top: calc(1rem + env(safe-area-inset-top));
    right: 1rem;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
  }
  .annot-save-btn { margin-top: auto; }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-save-btn { margin-top: 0; margin-left: auto; }
  }
  .annot-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    touch-action: none;
    background:
      linear-gradient(45deg, var(--surface-alt) 25%, transparent 25%, transparent 75%, var(--surface-alt) 75%) 0 0 / 20px 20px,
      linear-gradient(45deg, var(--surface-alt) 25%, var(--surface) 25%, var(--surface) 75%, var(--surface-alt) 75%) 10px 10px / 20px 20px;
  }
  /* A circuit plan is a white PNG/JPG -- the transparency checkerboard
     (meant for a blank canvas) just makes it look faded and hard to read
     underneath the dimmed basemap, so once a plan is loaded it sits on a
     plain white backdrop instead. */
  .annot-canvas-wrap.has-basemap { background: #fff; }
  .annot-canvas-inner {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
    will-change: transform;
  }
  .annot-basemap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
    pointer-events: none;
  }
  .annot-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
    display: block;
  }
  .annot-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
  }
  .annot-text-input {
    position: absolute;
    transform: translateY(-50%);
    z-index: 6;
    background: var(--surface);
    border: 1.5px dashed var(--accent);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 140px;
    outline: none;
  }
  .annot-text-label {
    position: absolute;
    transform: translateY(-50%);
    z-index: 6;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.1rem 0.3rem;
    border: 1.5px dashed var(--accent);
    border-radius: 4px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    cursor: move;
    touch-action: none;
    user-select: none;
    white-space: nowrap;
  }
  .annot-text-controls {
    position: absolute;
    z-index: 7;
    display: flex;
    gap: 0.25rem;
  }
  .annot-text-controls button {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid var(--border);
    cursor: pointer;
  }
  .annot-text-confirm { background: var(--best); color: #ffffff; border-color: var(--best); }
  .annot-text-delete { background: var(--surface); color: var(--text-muted); }
  .annot-text-smaller, .annot-text-bigger {
    width: 1.9rem;
    font-size: 0.68rem;
    background: var(--surface);
    color: var(--text);
  }
  .annot-fullscreen-btn {
    margin-left: auto;
  }
  @media (orientation: portrait) {
    body:not(.annot-forced-landscape) .annot-fullscreen-btn { margin-left: 0; }
  }
  @media (orientation: landscape) {
    .annot-fullscreen-btn { display: none; }
  }
  body.annot-forced-landscape .annot-orientation-hint { display: none !important; }
  .static-field {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0.55rem 0.65rem;
    font-size: 0.95rem;
    color: var(--text);
    box-sizing: border-box;
  }
  .progression-granularity {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
  }
  .progression-granularity button {
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
  }
  .progression-granularity button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }
  .progression-chart {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 0.8rem;
  }
  .progression-grid { stroke: var(--border); stroke-width: 1; }
  .progression-axis-label { fill: var(--text-muted); font-size: 14px; font-family: var(--font-body); }
  .progression-line { stroke: var(--accent); stroke-width: 2; fill: none; }
  .progression-point { fill: var(--surface); stroke: var(--accent); stroke-width: 3; cursor: pointer; }
  .progression-point:hover, .progression-point:focus-visible { stroke-width: 4; outline: none; }
  .progression-point.is-best { fill: var(--best); stroke: var(--best); }
  .progression-value-label { fill: var(--text-muted); font-size: 14px; font-weight: 500; font-family: var(--font-body); }
  .progression-value-label.is-best { fill: var(--best); font-weight: 700; }
  .progression-caption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
  }
  .progression-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1rem; margin-top: 0.7rem; }
  .progression-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--text-muted); }
  .progression-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

  /* A phone held in landscape has plenty of width but very little height
     (typically 320-430px) -- the mobile bottom tab bar was eating a
     meaningful slice of that, so here it becomes a slim icon-only rail
     down the left instead, the same idea as the desktop sidebar above but
     narrow enough to still leave the width to the content. Height alone
     (not width) is what marks "phone in landscape" here: a tablet/desktop
     in landscape is wide enough (>=960px) to already get the real desktop
     layout above regardless of height. Placed last in the file so it
     wins the cascade over every unconditional .bottom-nav/.wrap/
     .toast-stack rule earlier, all at equal specificity. */
  @media (orientation: landscape) and (max-width: 959px) and (max-height: 500px) {
    /* env(safe-area-inset-left) is the iPhone's notch/Dynamic Island (or
       front camera cutout) whenever it ends up on the left edge in
       landscape -- without it, the rail's own icons sat right under
       that cutout, invisible and unclickable. Folded into the rail's
       total width so .wrap/.page-head shift over by the same amount,
       then applied again as the rail's own left padding so its buttons
       sit clear of the cutout rather than just the rail's background. */
    :root { --landscape-rail-w: calc(54px + env(safe-area-inset-left)); }
    header.page-head { left: var(--landscape-rail-w); }
    .page-head-inner { padding: 0.4rem 1rem 0.35rem; }
    .wrap {
      margin: 0 0 0 var(--landscape-rail-w);
      padding: calc(var(--header-h) + 0.6rem) 1rem 1rem;
    }
    body.has-bottom-nav .wrap { padding-bottom: 1rem; }
    .bottom-nav {
      top: 0;
      bottom: 0;
      left: 0;
      right: auto;
      width: var(--landscape-rail-w);
      flex-direction: column;
      align-items: stretch;
      justify-content: flex-start;
      gap: 0.15rem;
      padding: calc(var(--header-h) + 0.4rem) 0.2rem 0.4rem calc(0.2rem + env(safe-area-inset-left));
      border-top: none;
      border-right: 1px solid var(--border);
      box-shadow: none;
      overflow-y: auto;
    }
    .bottom-nav-btn { padding: 0.35rem 0.1rem; }
    .bottom-nav-label { display: none; }
    .bottom-nav-icon { font-size: 1.15rem; }
    .toast-stack { bottom: 0.8rem; }

    /* Cards were sized/spaced for a tall portrait phone -- in landscape
       the viewport is barely 350-400px tall, so the same paddings ate a
       disproportionate share of it. Tightened across the board rather
       than tab by tab. */
    .card { padding: 0.8rem 0.9rem 0.9rem; }
    .section-title { margin-bottom: 0.5rem; }

    /* The circuit plan (see .circuit-visual-btn) is a perfect square
       sized off its container's *width* -- on a tall portrait phone
       that's a modest ~340px square, but .circuit-info-map-full forces
       that frame to the card's full width, which in landscape is nearly
       the whole screen. The square followed suit and blew straight past
       the bottom of the viewport. Driven by height instead here, so it
       shrinks to whatever room is actually left and stays fully visible,
       centered rather than stretched edge to edge. */
    .circuit-info-card { margin-bottom: 0.8rem; }
    .circuit-info-map-full { margin: 0.4rem 0 0.6rem; }
    .circuit-info-map-full .circuit-visual-frame {
      width: 100%;
      display: flex;
      justify-content: center;
    }
    .circuit-info-map-full .circuit-visual-btn {
      width: auto;
      height: min(58vh, 260px);
      max-width: 100%;
    }
  }
.import-chrono-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 0.4rem; }
.import-chrono-row button { flex: 1 1 11rem; }

/* ---- Mes repères ---- */
.track-mini-wrap { position: relative; display: block; width: 100%; height: 100%; }
.track-pin-mini { position: absolute; transform: translate(-50%, -50%); background: var(--accent); color: var(--accent-ink); border-radius: 50%; width: 14px; height: 14px; font-size: 9px; line-height: 14px; text-align: center; font-weight: 700; pointer-events: none; }
.link-btn { background: none; border: none; padding: 0.2rem 0; color: var(--accent); text-decoration: underline; cursor: pointer; width: 100%; }
.track-notes-overlay { position: fixed; inset: 0; z-index: 150; background: var(--bg); overflow-y: auto; padding: max(0.8rem, env(safe-area-inset-top)) 1rem 2rem; }
.track-notes-head { display: flex; align-items: center; gap: 0.6rem; }
.track-notes-title { flex: 1; font-weight: 700; font-size: 1.05rem; }
.track-notes-help { margin: 0.4rem 0 0.6rem; }
.track-notes-scroll { overflow: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; max-height: 70vh; }
.track-notes-map { position: relative; width: 100%; }
.track-notes-map.zoomed { width: 220%; }
.track-notes-map img { width: 100%; display: block; user-select: none; -webkit-user-select: none; }
.track-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.85rem; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.35); cursor: pointer; }
.track-pin.static { position: static; transform: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; font-size: 0.78rem; }
.track-notes-list { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; }
.track-note-row { display: flex; gap: 0.6rem; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem; width: 100%; color: inherit; cursor: pointer; }
.track-note-text { flex: 1; }
.track-note-line { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.35rem 0; }

/* ---- Mon carnet ---- */
.carnet-add-help { text-align: center; margin: 0.3rem 0 0.7rem; }
.carnet-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 0.6rem 0; color: inherit; cursor: pointer; }
.carnet-row:last-of-type { border-bottom: none; }
.carnet-row-main { display: flex; flex-direction: column; gap: 0.1rem; }
.carnet-time { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; font-style: italic; text-align: right; white-space: nowrap; }
.carnet-step { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.6rem 0; }
.carnet-today-card { border-left: 4px solid var(--accent); }
#carnet-add-chrono { width: 100%; padding: 0.9rem; font-size: 1.05rem; }

/* Historique des chronos compact (3 colonnes) */
.session-table-compact { width: 100%; table-layout: auto; }
.session-table-compact .date-cell { white-space: normal; min-width: 6.5rem; }
.session-table-compact .laps-cell { white-space: normal; }
.session-table-compact .other-lap { display: inline-block; margin: 0.1rem 0.25rem 0.1rem 0; font-size: 0.85em; color: var(--text-muted); }
.session-table-compact .best-lap { display: inline-block; margin: 0.1rem 0.25rem 0.1rem 0; }
.lap-delta-line { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.lap-delta-line.best { color: var(--accent); font-weight: 600; }
.bike-under { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.session-table-compact .row-actions { white-space: nowrap; text-align: right; width: 1%; }
.lap-delta-line { white-space: nowrap; }
.bike-under { font-family: var(--font-body); }
.session-table-compact .row-actions .icon-btn { margin-left: 0.15rem; }
.session-table-compact .date-cell { min-width: 5.6rem; }
.session-table-compact .row-actions .icon-btn { padding: 0.3rem 0.45rem; min-width: 0; width: auto; height: auto; }
.session-table-compact td, .session-table-compact th { padding-left: 0.3rem; padding-right: 0.3rem; }

/* Sous-onglets (Sorties, Communauté) et retour au carnet */
.subnav { display: flex; gap: 0.3rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; padding: 0.25rem; margin-bottom: 0.9rem; }
.subnav-btn { flex: 1; border: none; background: none; padding: 0.55rem 0.25rem; white-space: nowrap; border-radius: 9px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.subnav-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.back-link { width: auto; text-decoration: none; font-weight: 600; margin: 0 0 0.6rem; display: inline-block; }
.carnet-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.carnet-links button { flex: 1 1 10rem; }

/* En-tête « Bonjour » */
.header-hello { display: flex; align-items: center; gap: 0.6rem; background: none; border: none; padding: 0; cursor: pointer; color: inherit; min-width: 0; text-align: left; }
.header-hello .avatar, .header-hello img { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.hello-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.hello-small { font-size: 0.78rem; color: var(--text-muted); }
.hello-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.header-icon-btn svg { display: block; flex-shrink: 0; width: 20px; min-width: 20px; height: 20px; }
.invite-qr-modal { text-align: center; }
.invite-qr-box { margin: 0.9rem auto; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; color: #333; font-size: 0.85rem; }
.invite-qr-box svg { width: 100%; height: 100%; }
.invite-qr-link { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; }

/* Mes sorties : liste compacte */
.outings-card { padding-bottom: 0.4rem; }
.pill-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.25rem 0.65rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pill-btn.active { background: var(--text); border-color: var(--text); color: var(--surface); }
.outing-row { display: flex; align-items: center; gap: 0.65rem; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 0.55rem 0; color: inherit; cursor: pointer; }
.outing-row:last-of-type { border-bottom: none; }
.outing-thumb { width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.outing-thumb img { width: 100%; height: 100%; object-fit: contain; }
.outing-thumb-letter { font-weight: 800; font-size: 1rem; color: var(--accent); }
.outing-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.outing-row-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outing-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; font-size: 0.85rem; }
.outings-more-btn { width: 100%; text-align: center; text-decoration: none; font-weight: 600; padding: 0.6rem 0 0.3rem; font-family: inherit; }
.inline-link { width: auto; display: inline; padding: 0; font-family: inherit; }
.header-hello .mini-avatar { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: inline-flex; }
.header-hello .mini-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.header-hello .mini-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 12px; }

/* ---- Page d'une sortie ---- */
.outing-hero { margin-bottom: 0.9rem; }
.outing-title { font-family: var(--font-display); font-weight: 800; font-size: 2rem; text-transform: uppercase; margin: 0.2rem 0 0.3rem; letter-spacing: -0.01em; }
.outing-underline { width: 54px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 0.8rem; }
.outing-hero-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.outing-date-chip { border: 1px solid var(--accent); color: var(--accent); border-radius: 10px; padding: 0.4rem 0.7rem; font-weight: 600; }
.outing-org { display: flex; align-items: center; gap: 0.9rem; flex: 1 0 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.6rem 0.8rem; }
.outing-org .outing-org-logo { display: block; height: 64px; width: auto; max-width: 62%; object-fit: contain; object-position: left center; border-radius: 6px; flex-shrink: 0; }
.outing-group-card { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 0.8rem; }
.outing-group-main { flex: 1; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }
.outing-group-value { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.outing-group-status { width: 38%; background: var(--surface-alt); padding: 0.9rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.3rem; }
.outing-status-dash { font-size: 1.5rem; color: var(--text-muted); }
.outing-best-card { position: relative; display: flex; flex-direction: column; width: 100%; text-align: left; border: none; border-radius: 14px; padding: 1rem 1.2rem 1rem 1.6rem; margin-bottom: 0.8rem; color: #f3f4f6; cursor: pointer; background: #16181d; box-shadow: 0 6px 18px rgba(0,0,0,0.18); overflow: hidden; }
/* Bande de vibreur (rouge/blanc) sur le bord gauche : un clin d'œil piste, pas un drapeau à damier */
.outing-best-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: repeating-linear-gradient(180deg, #e3262b 0 12px, #ffffff 12px 24px); }
.outing-label.light { color: rgba(255,255,255,0.85); }
.outing-best-time { font-family: var(--font-mono); font-weight: 700; font-size: 2.8rem; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #fff; }
.outing-best-delta { font-size: 0.85rem; opacity: 0.95; }
.outing-best-arrow { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; z-index: 1; }
.outing-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.8rem; }
.outing-tile { display: flex; flex-direction: column; gap: 0.3rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 0.9rem; color: inherit; cursor: pointer; }
.outing-tile-icon { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 0.3rem; }
.outing-live { display: flex; align-items: center; gap: 0.8rem; background: #16191d; color: #fff; border-radius: 18px; padding: 0.9rem 1rem; margin-bottom: 0.8rem; text-decoration: none; }
.outing-live-dot { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
.outing-live span span { color: rgba(255,255,255,0.75); font-size: 0.85rem; }
.outing-live-arrow { margin-left: auto; font-size: 1.3rem; }
.outing-session { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.outing-session:last-of-type { border-bottom: none; }
.outing-session-laps { margin-top: 0.25rem; }
.outing-session-laps .best-lap, .outing-session-laps .other-lap { display: inline-block; margin: 0.1rem 0.3rem 0.1rem 0; font-variant-numeric: tabular-nums; }
.outing-session-laps .other-lap { color: var(--text-muted); font-size: 0.88em; }

.settings-block { padding-bottom: 0.9rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.settings-inline { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.9rem; }
.invite-qr-stats { margin-top: 0.6rem; font-size: 0.82rem; color: var(--text-muted); }

.first-outing-card { border-left: 4px solid var(--accent); }
.quick-outing { margin-top: 0.6rem; }
.quick-outing-more { margin-top: 0.6rem; }
.quick-outing-more summary { cursor: pointer; color: var(--text-muted); font-size: 0.88rem; }

/* ---- Mode jour J ---- */
.jourj-overlay { position: fixed; inset: 0; z-index: 300; background: #111418; color: #f3f5f7; overflow-y: auto; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 1rem; }
.jourj-top { display: flex; justify-content: space-between; align-items: flex-start; }
.jourj-circuit { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; text-transform: uppercase; }
.jourj-group { font-size: 1.15rem; color: #ff7a70; font-weight: 700; }
.jourj-close { background: rgba(255,255,255,0.1); color: #fff; border: none; border-radius: 50%; width: 46px; height: 46px; font-size: 1.2rem; cursor: pointer; }
.jourj-main { background: #1c2229; border-radius: 22px; padding: 1.3rem 1rem; text-align: center; }
.jourj-main.soon { background: #7a3511; }
.jourj-main.on-track { background: #1f5a2f; }
.jourj-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.7); }
.jourj-big { font-family: var(--font-display); font-weight: 800; font-size: 4.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 0.3rem 0; }
.jourj-sub { font-size: 1.3rem; font-weight: 600; }
.jourj-slots { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.jourj-slot { background: #1c2229; border-radius: 999px; padding: 0.35rem 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.jourj-slot.past { opacity: 0.4; text-decoration: line-through; }
.jourj-slot.current { background: #1f5a2f; }
.jourj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.jourj-btn { display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 64px; border-radius: 18px; border: none; background: #262d36; color: #fff; font-size: 1.05rem; font-weight: 700; cursor: pointer; text-decoration: none; padding: 0.6rem; margin-top: 0.6rem; }
.jourj-actions .jourj-btn { margin-top: 0; }
.jourj-btn.primary { background: var(--accent); color: #16120b; }
.jourj-btn span { background: rgba(255,255,255,0.15); border-radius: 999px; padding: 0 0.5rem; font-size: 0.85rem; }
.jourj-debriefs { background: #1c2229; border-radius: 18px; padding: 0.9rem; }
.jourj-debrief { margin-top: 0.4rem; }
.jourj-launch { width: 100%; padding: 0.9rem; font-size: 1.05rem; margin-bottom: 0.8rem; }
.debrief-feelings { display: flex; justify-content: space-between; gap: 0.3rem; }
.debrief-feel { font-size: 2rem; background: none; border: 2px solid transparent; border-radius: 14px; padding: 0.2rem 0.4rem; cursor: pointer; }
.debrief-feel.active { border-color: var(--accent); background: var(--surface-alt); }
.track-notes-overlay { z-index: 350; }

.timesheet-reminder { border-left: 4px solid var(--accent); }

.pill-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.pill-tabs .pill-btn { font-size: 0.88rem; padding: 0.35rem 0.85rem; }
.add-chrono-btn[data-action="quick-outing"] { width: 100%; padding: 0.9rem; font-size: 1.05rem; }

/* Pastilles (3e niveau) : grandes, pleine largeur, juste sous le sous-onglet */
.pill-tabs { display: flex; gap: 0; flex-wrap: nowrap; margin: -0.4rem 0 0.9rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.pill-tabs .pill-btn { flex: 1 0 auto; border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 0.7rem 0.45rem; font-size: 0.92rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.pill-tabs .pill-btn.active { background: none; color: var(--accent); border-bottom-color: var(--accent); }
/* Boutons d'action principaux : tous identiques */
.add-chrono-btn, .cta-btn, button.primary.add-chrono-btn, button.primary.cta-btn { display: block; width: 100%; padding: 0.9rem 1rem; font-size: 1.05rem; font-weight: 700; border-radius: 12px; }
.add-chrono-btn + .card, .cta-btn + .card { margin-top: 0.9rem; }
.card + .pill-tabs { margin-top: 0.9rem; }
.card > .planning-section:first-child { margin-top: 0; border-top: none; padding-top: 0; }
/* Retour compact : un chevron à gauche du titre, au lieu d'un lien « ← Retour » sur sa propre ligne */
.page-title-row { display: flex; align-items: center; gap: 0.5rem; }
.back-chevron { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.5rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.back-chevron:hover { color: var(--accent); border-color: var(--accent); }
.outing-page .card + .card { margin-top: 0.9rem; }
.team-card + .team-card, .add-chrono-btn + .team-card { margin-top: 0.9rem; }
.team-card .danger-zone { border-top: none; padding-top: 0; margin-top: 0; }
.planning-section.flat { margin-top: 0; border-top: none; padding-top: 0; }
.planning-section.flat > summary { display: none; }
.planning-section.flat > .planning-section-body { margin-top: 0; }
/* Espacement uniforme entre cartes successives, partout */
.card + .card { margin-top: 0.9rem; }
.circuit-picker { margin: 0 0 0.9rem; }
.circuit-picker select { font-weight: 700; }
.no-top-rule > .planning-section { border-top: none; margin-top: 0; }
/* Sous-pastilles (3e niveau) : petites puces arrondies sous une pastille */
.sub-pills { display: flex; gap: 0.45rem; overflow-x: auto; flex-wrap: nowrap; margin: 0.9rem 0 0.8rem; padding-bottom: 0.15rem; scrollbar-width: none; }
.sub-pills::-webkit-scrollbar { display: none; }
.sub-pill-btn { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.sub-pill-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-tabs + .sub-pills, .sub-pills:first-child { margin-top: 0; }
/* Cartes repliables affichées à plat sous une pastille */
.events-list-card.flat > summary { display: none; }
/* Groupes d'un roulage : titres de colonne seulement sur grand écran */
.group-col-title { display: none; }
@media (min-width: 960px) {
  .groups-board.as-pills { display: flex; align-items: flex-start; gap: 0.9rem; overflow-x: auto; flex-wrap: nowrap; }
  .groups-board.as-pills > .sub-pills { display: none; }
  .groups-board.as-pills > [data-cpill-section] { display: block !important; flex: 0 0 260px; }
  .groups-board.as-pills > [data-cpill-section] > .card { margin-top: 0; }
  .group-col-title { display: block; font-weight: 700; margin-bottom: 0.5rem; }
}
/* Coches des groupes alignées sur une ligne */
.planning-group-filter { display: flex; flex-wrap: nowrap; gap: 1.4rem; align-items: center; margin-top: 0; }
.planning-group-check { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 1rem; font-weight: 700; color: var(--text); }
.planning-group-check input { margin: 0; }
.card > .settings-block:last-child, [data-cpill-section] .settings-block { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.outing-best-card .outing-best-delta { color: #9ca3af; }
.outing-best-card .outing-best-arrow { color: #9ca3af; }
div.outing-best-card { cursor: default; }
/* Cartes « record » et « live timing » en clair : plus de noir, le vibreur en liseré du haut */
.outing-best-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 1.1rem 1.2rem 1rem; border-radius: 16px; }
.outing-best-card::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 5px; background: repeating-linear-gradient(90deg, #e3262b 0 14px, #ffffff 14px 28px); }
.outing-best-card .outing-label.light { color: var(--accent); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.outing-best-time { color: var(--text); }
.outing-best-card .outing-best-delta { color: var(--text-muted); }
.outing-best-card .outing-best-arrow { color: var(--text-muted); }
.outing-live { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.outing-live-dot { color: #fff; }
.outing-live span span { color: var(--text-muted); }
.feedback-row-actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }

/* Signature Paddock : le petit vibreur rouge/blanc marque ce qui est sélectionné */
.pill-tabs .pill-btn { position: relative; }
.pill-tabs .pill-btn.active { color: var(--text); border-bottom-color: transparent; }
.pill-tabs .pill-btn.active::after { content: ''; position: absolute; left: 0.45rem; right: 0.45rem; bottom: -1px; height: 3px; border-radius: 2px; background: var(--kerb); box-shadow: 0 0 0 1px rgba(200,38,31,0.15); }
.bottom-nav-btn { position: relative; }
.bottom-nav-btn.active { color: var(--text); }
.bottom-nav-btn.active::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 20px; margin-left: -10px; height: 3px; border-radius: 2px; background: var(--kerb); }
.sub-pill-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bottom-nav-btn.active::after { top: 0; bottom: auto; }
/* Carte du prochain roulage : filet fin + liseré vibreur, comme les autres cartes clés */
.today-schedule-card { border: 1px solid var(--border); position: relative; overflow: hidden; padding-top: 1.45rem; }
.today-schedule-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(90deg, #c8261f 0 14px, #ffffff 14px 28px); }

/* Polices Paddock : chiffres à chasse fixe partout pour que les chronos s'alignent */
body { font-variant-numeric: tabular-nums; }
/* Couleurs de groupe : une par niveau, les mêmes partout */
:root { --grp-A: #1d8a4e; --grp-B: #2f6fd6; --grp-C: #c98a12; --grp-D: #7b4fd0; --grp-R: #0e8f8f; --grp-ORGA: #6a6e76; --grp-X: #6a6e76; }
.grp-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; padding: 0.05em 0.45em; margin-right: 0.15em; border-radius: 6px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.95em; line-height: 1.35; vertical-align: middle; }
.grp-chip-big { font-size: 1.6rem; padding: 0.05em 0.5em; border-radius: 9px; }
.grp-A { background: var(--grp-A); } .grp-B { background: var(--grp-B); } .grp-C { background: var(--grp-C); } .grp-D { background: var(--grp-D); } .grp-R { background: var(--grp-R); } .grp-ORGA, .grp-X { background: var(--grp-ORGA); }
.planning-group-check .grp-chip { font-size: 1rem; }
.planning-group-check input:not(:checked) + .grp-chip { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--border); }
.today-schedule-group-label .grp-chip { font-size: 1.05rem; }
/* Coup de peps : titre de section en italique « course », onglet actif plein rouge */
.section-heading { display: flex; align-items: center; gap: 0.6rem; margin: 0.1rem 0 0.8rem; }
.section-heading-kerb { width: 28px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 7px, #ffffff 7px 14px); box-shadow: 0 0 0 1px rgba(200,38,31,0.25); transform: skewX(-20deg); flex-shrink: 0; }
.section-heading-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.3rem; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; color: var(--text); }
.bottom-nav-btn.active { color: var(--accent-ink); background: var(--accent); }
.bottom-nav-btn.active::after { display: none; }
@media (min-width: 960px) { .bottom-nav-btn.active { background: var(--accent); color: var(--accent-ink); } }
.outing-best-time, .outing-title { font-style: italic; font-weight: 800; }
.grp-chip-big { font-style: italic; }
.bottom-nav-btn { margin: 0 0.2rem; }
/* Plus de filet rouge/blanc : un aplat rouge franc, bien visible */
.pill-tabs .pill-btn.active::after { background: var(--accent); height: 4px; box-shadow: none; }
.today-schedule-card::before, .outing-best-card::before { background: var(--accent); height: 5px; }
.section-heading-kerb { width: 12px; height: 32px; border-radius: 3px; background: var(--accent); box-shadow: none; transform: skewX(-16deg); }
/* Sous-pastilles de groupes (gestion d'un roulage) : la couleur du groupe */
.sub-pill-btn.grp-sub { color: var(--grp-c); border-color: var(--grp-c); font-weight: 700; }
.sub-pill-btn.grp-sub.active { background: var(--grp-c); border-color: var(--grp-c); color: #fff; }
.grp-sub-A { --grp-c: var(--grp-A); } .grp-sub-B { --grp-c: var(--grp-B); } .grp-sub-C { --grp-c: var(--grp-C); } .grp-sub-D { --grp-c: var(--grp-D); } .grp-sub-R { --grp-c: var(--grp-R); } .grp-sub-ORGA { --grp-c: var(--grp-ORGA); }
/* Harmonisation : lignes de stats, lignes du calendrier, carte programme, navigation du calendrier */
.stat-summary-category { background: none; border-radius: 0; padding: 0.7rem 0.1rem; border-bottom: 1px solid var(--border); }
.stat-summary-category:last-child { border-bottom: none; }
.rider-stat-summaries { gap: 0; }
.stat-summary-category summary { align-items: center; }
.stat-summary-label { font-size: 0.98rem; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 600; }
.stat-summary-label::before { content: none; }
.stat-summary-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.stat-summary-value::after { content: '›'; margin-left: 0.6rem; color: var(--text-muted); font-family: var(--font-body); font-weight: 400; font-size: 1.2rem; display: inline-block; transition: transform 0.15s ease; }
.stat-summary-category[open] .stat-summary-value::after { transform: rotate(90deg); }
.event-row { padding: 0.8rem 0.2rem; }
.event-row-main { align-items: center; }
.event-row-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.event-row-circuit { font-size: 1.02rem; font-weight: 700; }
.event-row-dates { font-size: 0.85rem; }
.event-row-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.event-row-when { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.event-row-when.live { color: var(--accent); font-size: 1rem; }
.event-row-chevron { color: var(--text-muted); font-size: 1.3rem; }
.today-schedule-title { display: flex; flex-direction: column; gap: 0.1rem; }
.today-schedule-circuit { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.calendar-nav-card { gap: 0.5rem; }
.calendar-year-label { flex: 1; font-size: 1.05rem; line-height: 1.2; }
/* La barre du bas reste collée en bas même quand la page est courte (iPhone) */
html { height: 100%; }
body { min-height: 100%; min-height: 100dvh; }

/* Groupes en dégradé de niveau : du rouge profond (A, le plus rapide) au sable clair (D), R débutants en pointillé */
:root { --grp-A: #8e1b16; --grp-B: #c8261f; --grp-C: #e0602f; --grp-D: #efa25e; --grp-R: #f6dcc0; --grp-ORGA: #6a6e76; }
.grp-D, .grp-R { color: #14161a; }
.grp-R { box-shadow: inset 0 0 0 1.5px #d9a877; }
.grp-sub-D { --grp-c: #c67a2f; } .grp-sub-R { --grp-c: #b07a45; }
.sub-pill-btn.grp-sub-D.active { background: var(--grp-D); border-color: var(--grp-D); color: #14161a; }
.sub-pill-btn.grp-sub-R.active { background: var(--grp-R); border-color: #d9a877; color: #14161a; }
/* Groupes : dégradé bleu pétrole (complémentaire du rouge, qui reste réservé aux actions) — A foncé = rapide, D clair */
:root { --grp-A: #0d3b47; --grp-B: #17606f; --grp-C: #2d8797; --grp-D: #8cc3cc; --grp-R: #dcecee; --grp-ORGA: #6a6e76; }
.grp-A, .grp-B, .grp-C { color: #fff; }
.grp-D, .grp-R { color: #0d3b47; }
.grp-R { box-shadow: inset 0 0 0 1.5px #8cc3cc; }
.grp-sub-D { --grp-c: #3f8f9c; } .grp-sub-R { --grp-c: #4f8f99; }
.sub-pill-btn.grp-sub-D.active { background: var(--grp-D); border-color: var(--grp-D); color: #0d3b47; }
.sub-pill-btn.grp-sub-R.active { background: var(--grp-R); border-color: #8cc3cc; color: #0d3b47; }
/* Groupes : dégradé de bleu franc (opposé au rouge) — A marine = rapide, D bleu clair */
:root { --grp-A: #142a6b; --grp-B: #1f49c2; --grp-C: #3f78ea; --grp-D: #9cbcf6; --grp-R: #e1eafd; --grp-ORGA: #6a6e76; }
.grp-D, .grp-R { color: #142a6b; }
.grp-R { box-shadow: inset 0 0 0 1.5px #9cbcf6; }
.grp-sub-D { --grp-c: #4f7fd8; } .grp-sub-R { --grp-c: #5b7fc4; }
.sub-pill-btn.grp-sub-D.active { background: var(--grp-D); border-color: var(--grp-D); color: #142a6b; }
.sub-pill-btn.grp-sub-R.active { background: var(--grp-R); border-color: #9cbcf6; color: #142a6b; }
/* Page d'un roulage : même grammaire que les titres de section (pas de trait sous le titre, date neutre) */
.outing-underline { display: none; }
.outing-date-chip { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.carnet-add-help .inline-link { width: auto; }
/* Lien public d'un roulage */
.public-roulage { width: 100%; max-width: 560px; }
.public-roulage-going { margin-top: 0.6rem; font-size: 0.95rem; }
.public-roulage-day { font-weight: 700; margin: 0.8rem 0 0.3rem; text-transform: capitalize; }
.public-roulage-group { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-top: 1px solid var(--border); font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.public-roulage-group:first-child { border-top: none; }
.share-roulage-btn { margin: 0 0 0.9rem; }
.join-banner { border: 1px solid var(--accent); margin-bottom: 0.9rem; }
.join-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.public-roulage a.add-chrono-btn { display: block; background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 0.9rem 1rem; font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.public-roulage a.ghost { border: 1px solid var(--border); border-radius: 10px; padding: 0.45rem 0.8rem; color: var(--text); font-weight: 600; background: var(--surface); }
.lang-stats-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.lang-stats-row span:not(:first-child) { text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.lang-stats-head { border-top: none; color: var(--text-muted); font-size: 0.85rem; }
.lang-stats-head span:not(:first-child) { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; }
.card-action-inline { display: inline-block; margin: 0.5rem 0.4rem 0 0; }
.notifications-panel .friend-row + .help-text { margin: 0.1rem 0 0.6rem !important; }
/* Réglages par session */
.setup-summary { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.setup-link { width: auto; font-size: 0.88rem; margin-top: 0.25rem; display: inline-block; }
.setup-sheet { z-index: 460; }
.setup-modal { max-height: 88vh; overflow-y: auto; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.7rem; margin-top: 0.7rem; }
.setup-field { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; grid-column: 1 / -1; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.setup-field.setup-half { grid-column: auto; }
.setup-record-card { border-left: none; }
.setup-record-title { font-weight: 700; margin-bottom: 0.2rem; }
.card + .add-chrono-btn { margin-top: 0.9rem; }
/* Entre potes */
.battle-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.battle-head .section-title { margin: 0; }
.battle-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.2rem; border-top: 1px solid var(--border); }
.battle-row:first-of-type { border-top: none; }
.battle-row.me { background: var(--surface-alt); border-radius: 10px; padding-left: 0.6rem; }
.battle-rank { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.5rem; width: 1.4rem; }
.battle-row:first-of-type .battle-rank { color: var(--accent); }
.battle-name { flex: 1; font-weight: 700; min-width: 0; }
.battle-time { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.battle-gap { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.battle-gap.lead { color: var(--accent); }
.battle-line { margin-top: 0.6rem; font-weight: 600; }

/* Détail replié sous une explication courte (ex. Team amateur ou PRO ?) */
.more-details { margin-top: 0.5rem; }
.more-details > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.88rem; list-style: none; }
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::after { content: ' ›'; }
.more-details[open] > summary::after { content: ' ⌄'; }
.more-details > .help-text { margin-top: 0.4rem; }

/* Horaires style « Le Mans » : une ligne par session */
.today-schedule-groups { grid-template-columns: 1fr; gap: 1rem; }
.today-schedule-slots { gap: 0; }
.schedule-slot.sched-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.4rem; border-radius: 8px;
  border-top: 1px solid var(--border); background: transparent;
  font-family: var(--font-body);
}
.today-schedule-slots .schedule-slot.sched-row:first-child { border-top: 0; }
.sched-bar { width: 4px; height: 22px; border-radius: 2px; flex-shrink: 0; }
.sched-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.sched-time { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.schedule-slot.sched-row.slot-next { background: var(--best-bg); }
.schedule-slot.sched-row.slot-current { background: var(--accent); color: var(--accent-ink); }
.schedule-slot.sched-row.slot-current .sched-bar { background: var(--accent-ink) !important; }
.schedule-slot-label { display: block; padding: 0.35rem 0.4rem; font-size: 0.8rem; color: var(--text-muted); font-style: normal; font-weight: 600; border-top: 1px solid var(--border); }
.today-schedule-briefing .schedule-slot.sched-row { border-top: 0; }

/* Filtre de groupes : les lettres elles-mêmes servent de boutons */
.planning-group-filter[hidden] { display: none; }
.planning-group-filter .planning-group-check { position: relative; cursor: pointer; }
.planning-group-filter .planning-group-check input { position: absolute; opacity: 0; pointer-events: none; }
.planning-group-filter .planning-group-check:has(input:not(:checked)) .grp-chip { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }

/* Légende des disponibilités du coach (mêmes couleurs que les créneaux) */
.avail-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin-bottom: 0.5rem; }
.avail-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 0.3rem; vertical-align: -1px; }
.avail-sw:first-child { margin-left: 0; }
.avail-sw.sw-coaching { background: color-mix(in srgb, #1c8f5a 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px #1c8f5a; }
.avail-sw.sw-bapteme { background: color-mix(in srgb, var(--accent) 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px var(--accent); }
.avail-sw.sw-both { background: color-mix(in srgb, var(--series-3) 22%, var(--surface-alt)); box-shadow: inset 0 0 0 1px var(--series-3); }
.schedule-slot.sched-row.slot-avail-coaching { background: color-mix(in srgb, #1c8f5a 22%, var(--surface-alt)); }
.schedule-slot.sched-row.slot-avail-bapteme { background: color-mix(in srgb, var(--accent) 22%, var(--surface-alt)); }
.schedule-slot.sched-row.slot-avail-both { background: color-mix(in srgb, var(--series-3) 22%, var(--surface-alt)); }

/* Actions proposées sous un écran vide */
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }

/* Rappel du soir : ajouter le chrono du roulage */
.timesheet-reminder .ts-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.4rem; }
.timesheet-reminder .ts-head strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.timesheet-reminder .outing-thumb { width: 52px; height: 52px; }
.timesheet-reminder .add-chrono-btn { margin-top: 0.8rem; }
.timesheet-reminder .ts-later { display: block; margin: 0.5rem auto 0; }
.timesheet-reminder .ts-later { color: var(--text-muted); text-decoration: none; font-weight: 600; }

/* Actions d'un roulage, regroupées sous le bloc groupe/statut */
.outing-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.9rem; }
.outing-actions > button { flex: 0 0 auto; }
.outing-actions-help { margin: -0.5rem 0 0.9rem; }

/* Communauté, version sobre : un seul « Bravo », pas d'emojis */
.reaction-bar { display: flex; gap: 0.4rem; margin-top: 0; }
.reaction-btn { font-size: 0.82rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 999px; background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.reaction-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.feed-entry-foot { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.55rem; }
.feed-entry-foot .reaction-bar { margin-right: auto; }
.post-edit-links { display: flex; gap: 0.8rem; }
.post-edit-links .link-btn { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; font-weight: 600; padding: 0; }
.wall-post-link { display: inline-flex; align-items: baseline; gap: 0.45rem; margin-top: 0.4rem; font-weight: 700; text-decoration: none; color: var(--accent); }
.wall-post-link-host { font-weight: 500; font-size: 0.8rem; color: var(--text-muted); }
.feed-entry-muted { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.feed-entry-record .feed-entry-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.feed-record-label { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-right: 0.3rem; }
.feed-entry-record .feed-entry-text { display: flex; flex-direction: column; gap: 0.1rem; }
.feed-record-line { font-weight: 600; }
.feed-record-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.5rem; white-space: nowrap; }
.badge-text, .pro-badge.badge-text, .organizer-badge.badge-text, .coach-badge.badge-text, .photographer-badge.badge-text {
  display: inline-block; width: auto; height: auto; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; padding: 0.12rem 0.35rem;
  border-radius: 4px; background: var(--surface-alt); color: var(--text-muted); vertical-align: middle; line-height: 1.2; white-space: nowrap; flex-shrink: 0;
}

.team-composer-poll-link .link-btn { color: var(--text-muted); text-decoration: none; font-weight: 600; }

/* Notifications vivantes : une icône par type, nom en gras, point « nouveau » */
.notif-group-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.notifications-panel { padding: 0.3rem 0; overflow: hidden; }
.notifications-panel > .friend-row, .notifications-panel > .notif-group-title, .notifications-panel > .empty-state { margin-left: 1rem; margin-right: 1rem; }
.notifications-panel > .notif-group-title { margin-top: 0.8rem; }
.notif-row { display: flex; align-items: flex-start; gap: 0.85rem; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 0.95rem 1rem; color: var(--text); font: inherit; cursor: pointer; }
.notif-row:first-child { border-top: 0; }
.notif-row.unread { background: transparent; }
.notif-ico { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-alt); color: var(--text-muted); }
.notif-row.unread .notif-ico { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.notif-ico-trophy, .notif-ico-medal { color: #b07a0c; }
.notif-ico-calendar, .notif-ico-clock { color: var(--grp-B, #1f49c2); }
.notif-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.notif-text { font-size: 0.95rem; line-height: 1.35; font-weight: 500; }
.notif-row.unread .notif-text { font-weight: 600; }
.notif-chrono { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.notif-time { font-size: 0.8rem; color: var(--text-muted); }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 0.4rem; }

/* Fil : une carte par entrée, séparateurs par jour */
.feed-day { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.02em; margin: 1.2rem 0 0.5rem; color: var(--text); }
.feed-card + .feed-card { margin-top: 0.7rem; }
.feed-card .wall-post, .feed-card .feed-entry { border: 0; padding: 0; margin: 0; }
.feed-ride { display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left; margin-top: 0.7rem; padding: 0.75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); font: inherit; cursor: pointer; }
.feed-ride-thumb { width: 52px; height: 52px; }
.feed-ride-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.feed-ride-circuit { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.05; }
.feed-ride-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; }
.feed-ride-vs { font-size: 0.75rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.feed-ride-vs.ahead { color: #1d8a4e; }
.feed-entry-record .feed-entry-row { align-items: center; }
.feed-upcoming { display: flex; flex-direction: column; gap: 0.7rem; }
.feed-upcoming-row { display: flex; align-items: center; gap: 0.75rem; }
.feed-upcoming-row .outing-thumb { width: 48px; height: 48px; }
.feed-upcoming-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.feed-upcoming-main strong { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.05; }
.feed-upcoming-who { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.15rem; }
.feed-upcoming-who .mini-avatar { width: 22px; height: 22px; font-size: 0.65rem; margin-right: -0.45rem; border: 2px solid var(--surface); }
.feed-upcoming-who .help-text { margin-left: 0.6rem; }
.feed-upcoming-tag { font-size: 0.75rem; font-weight: 800; color: #1d8a4e; white-space: nowrap; }
.feed-line { margin: 0.7rem 0.3rem; }
.feed-line .feed-entry-muted { font-size: 0.82rem; }
.feed-line + .feed-card, .feed-card + .feed-line { margin-top: 0.7rem; }
#notifications-toggle svg { display: block; }

/* Fil v2 : récap du roulage, duels, paliers, photos, circuit du moment */
.feed-recap-head, .feed-photos, .feed-moment { display: flex; align-items: center; gap: 0.8rem; }
.feed-photos { margin-top: 0.6rem; }
.feed-moment .outing-thumb { width: 52px; height: 52px; }
.feed-recap-rows { margin-top: 0.7rem; border-top: 1px solid var(--border); }
.feed-recap-row { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--border); }
.feed-recap-row.me { background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.feed-recap-pos { width: 1.2rem; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.15rem; color: var(--text-muted); text-align: center; }
.feed-recap-row:first-child .feed-recap-pos { color: var(--accent); }
.feed-recap-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-recap-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.feed-recap-gap { width: 3.6rem; text-align: right; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.feed-recap-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.feed-highlight { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; font-size: 0.9rem; line-height: 1.35; }
.feed-highlight .notif-ico { width: 32px; height: 32px; }
.feed-highlight .notif-ico svg { width: 16px; height: 16px; }
.feed-highlight.duel { padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--surface-alt); }
.feed-highlight.duel .notif-ico { background: var(--accent); color: var(--accent-ink); }
.feed-upcoming-j { white-space: nowrap; font-family: var(--font-display); font-style: italic; font-size: 0.95rem; color: var(--accent); margin-left: 0.25rem; }

/* Trophées : résumé, prochain objectif, médailles par famille */
.trophy-summary { display: flex; align-items: center; gap: 0.9rem; }
.trophy-count { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.trophy-count span { font-size: 1.2rem; color: var(--text-muted); }
.trophy-summary-main { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.trophy-summary-label { font-weight: 700; font-size: 0.9rem; }
.trophy-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; }
.trophy-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.trophy-next { display: flex; gap: 0.8rem; align-items: flex-start; margin-top: 1rem; padding: 0.8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.trophy-next-main { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.trophy-next-main strong { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.05; }
.trophy-next-main .trophy-bar { margin-top: 0.3rem; }
.trophy-next-progress { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.trophy-family { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin: 1.1rem 0 0.5rem; }
.trophy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.trophy-tile { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.7rem 0.3rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font: inherit; cursor: pointer; text-align: center; }
.trophy-tile.earned { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.trophy-ico { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-alt); color: var(--text-muted); flex-shrink: 0; }
.trophy-ico.earned { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.trophy-next .trophy-ico { width: 52px; height: 52px; background: var(--surface-alt); color: var(--accent); }
.trophy-name { font-size: 0.78rem; font-weight: 700; line-height: 1.15; }
.trophy-progress { font-size: 0.7rem; font-weight: 600; }
.feed-month .feed-ride-circuit { display: block; margin: 0.15rem 0 0.2rem; }
.feed-gain { color: #1d8a4e; }
.feed-recap-name .help-text { font-weight: 500; }

/* Paliers : Bronze, Argent, Or, Platine */
:root { --tier-1: #b0743c; --tier-2: #8b95a1; --tier-3: #c9a227; --tier-4: #7b4fd6; --tier-5: #e8731a; --tier-6: #c8261f; }
.trophy-ico.earned.tier-1 { background: var(--tier-1); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-1) 25%, transparent); }
.trophy-ico.earned.tier-2 { background: var(--tier-2); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-2) 25%, transparent); }
.trophy-ico.earned.tier-3 { background: var(--tier-3); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-3) 30%, transparent); }
.trophy-ico.earned.tier-4 { background: var(--tier-4); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-4) 25%, transparent); }
.trophy-ico.earned.tier-5 { background: var(--tier-5); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-5) 25%, transparent); }
.trophy-ico.earned.tier-6 { background: var(--tier-6); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier-6) 25%, transparent); }
.trophy-ico.earned.single { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.trophy-tier { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.trophy-tier.tier-1 { color: var(--tier-1); } .trophy-tier.tier-2 { color: var(--tier-2); } .trophy-tier.tier-3 { color: #a8860f; } .trophy-tier.tier-4 { color: var(--tier-4); } .trophy-tier.tier-5 { color: var(--tier-5); } .trophy-tier.tier-6 { color: var(--tier-6); }
.tier-pips { display: flex; gap: 3px; }
.tier-pips span { width: 10px; height: 4px; border-radius: 2px; background: var(--surface-alt); }
.tier-pips span.on.tier-1 { background: var(--tier-1); } .tier-pips span.on.tier-2 { background: var(--tier-2); }
.tier-pips span.on.tier-3 { background: var(--tier-3); } .tier-pips span.on.tier-4 { background: var(--tier-4); }
.tier-pips span.on.tier-5 { background: var(--tier-5); } .tier-pips span.on.tier-6 { background: var(--tier-6); }
.trophy-tile.earned { border-color: var(--border); }

/* Légende des niveaux */
.tier-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin-top: 0.8rem; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.tier-legend-title { font-weight: 800; color: var(--text); margin-right: 0.1rem; }
.tier-legend-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.tier-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tier-dot.tier-1 { background: var(--tier-1); } .tier-dot.tier-2 { background: var(--tier-2); } .tier-dot.tier-3 { background: var(--tier-3); }
.tier-dot.tier-4 { background: var(--tier-4); } .tier-dot.tier-5 { background: var(--tier-5); } .tier-dot.tier-6 { background: var(--tier-6); }

/* Filtre des groupes, expliqué */
.planning-group-filter-label { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 0.5rem; }
.planning-group-filter-label strong { font-size: 0.85rem; }
.planning-group-filter { gap: 0.6rem !important; }
.planning-group-check .grp-chip { min-width: 2.2rem; text-align: center; padding: 0.3rem 0.6rem; font-size: 1rem; }

/* Pages légales et RGPD */
.legal { font-size: 0.9rem; line-height: 1.5; }
.legal p, .legal ul { margin: 0.3rem 0 0.6rem; }
.legal ul { padding-left: 1.1rem; }
.legal li { margin: 0.25rem 0; }
.legal-h { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin: 1.1rem 0 0.2rem; }
.legal-h:first-of-type { margin-top: 0.4rem; }
.legal-note { padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--surface-alt); }
.legal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 22, 26, 0.45); display: flex; justify-content: center; }
.legal-sheet { background: var(--bg); width: 100%; max-width: 640px; height: 100%; overflow-y: auto; padding: 1rem 1.1rem 3rem; box-sizing: border-box; }
.legal-sheet-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; font-size: 1.05rem; }
.my-data-block { margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: 0.9rem; }
.my-data-block:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.my-data-links { display: flex; gap: 1rem; margin-top: 0.7rem; }
.my-data-links .link-btn { font-size: 0.85rem; font-weight: 600; }
.consent-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.85rem; line-height: 1.35; margin-top: 0.4rem; }
.consent-check input { margin-top: 0.15rem; }
.auth-link.inline { display: inline; padding: 0; font-size: inherit; text-decoration: underline; }
.outing-role-value { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }

/* Fiche d'un roulage : organisateur sur la ligne de la date, actions sur une ligne */
.outing-hero-row { flex-wrap: nowrap; justify-content: space-between; }
.outing-org { flex: 0 1 auto; background: transparent; border: 0; padding: 0; justify-content: flex-end; min-width: 0; text-align: right; }
.outing-org .outing-org-logo { height: 46px; max-width: 150px; object-position: right center; }
.outing-actions { flex-wrap: nowrap; }
.outing-actions > button { flex: 1 1 0; min-width: 0; padding-left: 0.4rem; padding-right: 0.4rem; white-space: nowrap; }
.outing-actions > button.primary { flex: 1.7 1 0; }

/* Drapeau en fond d'avatar (sans photo) */
.mini-avatar.has-flag, .profile-avatar.has-flag { position: relative; overflow: hidden; }
.avatar-flag { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.9em; line-height: 1; transform: scale(1.6); opacity: 0.9; pointer-events: none; }
.mini-avatar.has-flag .avatar-flag { font-size: 1.6rem; }
.header-hello .mini-avatar.has-flag .avatar-flag { font-size: 2.2rem; }
.profile-avatar.has-flag .avatar-flag { font-size: 4.2rem; }
.mini-avatar.has-flag .mini-avatar-placeholder, .profile-avatar.has-flag .profile-avatar-placeholder {
  position: relative; color: #fff; font-weight: 800;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.6);
}
/* Statistiques des nationalités (admin) */
.nat-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-top: 1px solid var(--border); }
.nat-flag { width: 1.6rem; font-size: 1.2rem; text-align: center; }
.nat-name { flex: 0 0 9rem; font-weight: 600; font-size: 0.9rem; }
.nat-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-alt); overflow: hidden; }
.nat-bar > span { display: block; height: 100%; background: var(--accent); }
.nat-count { width: 2.4rem; text-align: right; font-weight: 700; }
.mini-avatar.has-flag .mini-avatar-placeholder, .profile-avatar.has-flag .profile-avatar-placeholder { text-shadow: 0 0 2px #000, 0 0 6px rgba(0, 0, 0, 0.85); }

/* Barre du bas : icônes dessinées */
.bottom-nav-icon { display: flex; align-items: center; justify-content: center; }
.bottom-nav-icon svg { display: block; }

/* Compteurs d'usage (admin) */
.usage-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.9rem; }
.usage-kpis > div { background: var(--surface-alt); border-radius: 10px; padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.15rem; }
.usage-kpis strong { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.usage-kpis span { font-size: 0.78rem; color: var(--text-muted); line-height: 1.25; }
.usage-row { display: grid; grid-template-columns: 1fr 3rem 3rem 3.4rem; gap: 0.4rem; align-items: center; padding: 0.35rem 0; border-top: 1px solid var(--border); font-size: 0.85rem; }
.usage-row > span:not(:first-child) { text-align: right; }
.usage-row.sub > span:first-child { padding-left: 0.8rem; color: var(--text-muted); }
.usage-head { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-top: 0; }

/* Fiche d'un pilote */
.person-head .page-title-row { align-items: center; gap: 0.75rem; }
.person-avatar .mini-avatar { width: 64px; height: 64px; }
.person-avatar .mini-avatar.has-flag .avatar-flag { font-size: 3.4rem; }
.person-avatar .mini-avatar-placeholder { font-size: 1.6rem; }
.person-id { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.person-name { font-family: var(--font-display); font-style: italic; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.person-head .outing-actions { margin: 0.9rem 0 0; }
.person-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.9rem; }
.person-kpis > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem 0.4rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem; }
.person-kpis strong { font-family: var(--font-display); font-style: italic; font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--accent); }
.person-kpis span { font-size: 0.75rem; color: var(--text-muted); }
.person-record { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.person-record:first-of-type { border-top: 0; }
.person-record-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.person-record-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.1rem; }
.person-cmp { font-size: 0.75rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.person-cmp.ahead { color: #1d8a4e; }
.friend-name-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: left; }

/* Country balls : un rond aux bandes du drapeau, avec un léger volume */
.cball { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 50%; vertical-align: -0.18em; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 26, 0.12), inset -0.12em -0.14em 0 rgba(20, 22, 26, 0.10); }
.cball.inline { margin-right: 0.1em; }
.cball.avatar-ball { position: absolute; inset: 0; width: 100%; height: 100%; vertical-align: 0;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 26, 0.12), inset -3px -4px 0 rgba(20, 22, 26, 0.10); }
.mini-avatar.has-flag, .profile-avatar.has-flag { border-color: transparent; }
.nat-flag .cball { width: 1.25rem; height: 1.25rem; }
.cball.lang-ball { width: 1.25rem; height: 1.25rem; vertical-align: middle; }

/* Passe design : respirations */
.today-schedule-date { font-size: 0.85rem; color: var(--text-muted); margin: 0.15rem 0 0.9rem; }
.today-schedule-card .card-action-inline { display: block; margin: 0 0 0.6rem; }
.feed-recap-row { padding-right: 0.5rem; }
.outing-actions > button.ghost, .planning-actions > button.ghost { color: var(--text); font-weight: 600; }
.planning-group-filter[hidden] { display: none !important; }
.person-head { margin-bottom: 0.9rem; }
.outing-status-best { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.3rem; }
.planning-group-filter[hidden] + .today-schedule-groups { margin-top: 0; }

/* Fiche personnalisée (aperçu Carnet+) : tout passe par --sig */
.person-hero { padding: 0; overflow: hidden; margin-bottom: 0.9rem; }
.ph-cover { position: relative; height: 140px; background: var(--surface-alt); overflow: hidden; }
.person-hero[data-cover="vibreur"] .ph-cover { background: repeating-linear-gradient(135deg, var(--sig) 0 22px, #fff 22px 44px); }
.person-hero[data-cover="damier"] .ph-cover { background-color: #14161a; background-image: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0); background-size: 26px 26px; }
.person-hero[data-cover="damier"] .ph-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, color-mix(in srgb, var(--sig) 85%, transparent)); }
.person-hero[data-cover="trace"] .ph-cover { background: var(--sig); }
.person-hero[data-cover="photo"] .ph-cover { background: #1b1d21; }
.person-hero[data-cover="none"] .ph-cover { height: 64px; background: linear-gradient(120deg, var(--sig), color-mix(in srgb, var(--sig) 55%, #14161a)); }
.ph-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-trace { position: absolute; right: 4%; top: 6%; height: 88%; max-width: 70%; object-fit: contain; filter: grayscale(1) invert(1) brightness(2); mix-blend-mode: screen; opacity: 0.95; }
.ph-back { position: absolute; left: 0.7rem; top: 0.7rem; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.ph-plate { position: absolute; right: 0.9rem; bottom: 0.7rem; z-index: 2; min-width: 4.2rem; height: 3.3rem; padding: 0 0.5rem; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.2rem; line-height: 1; box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.person-hero[data-plate="course"] .ph-plate { background: #fff; color: #14161a; border: 3px solid #14161a; }
.person-hero[data-plate="signature"] .ph-plate { background: var(--sig); color: var(--sig-ink); border: 3px solid #fff; }
.person-hero[data-plate="endurance"] .ph-plate { background: #f2c418; color: #14161a; border: 3px solid #14161a; }
.ph-body { padding: 0 1rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.ph-id { display: flex; align-items: flex-start; gap: 0.75rem; position: relative; z-index: 1; min-width: 0; }
.ph-avatar { margin-top: -38px; flex: none; }
.ph-avatar .mini-avatar { width: 72px; height: 72px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sig); background: var(--surface); }
.ph-id .person-id { padding-top: 0.6rem; }
.ph-bio { margin: 0; color: var(--text); font-size: 0.92rem; line-height: 1.45; }
.ph-feature { position: relative; overflow: hidden; background: var(--sig); color: var(--sig-ink); border: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.ph-feature-k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.ph-feature-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ph-feature-s { font-size: 0.8rem; opacity: 0.85; position: relative; z-index: 1; }
.ph-feature-trace { position: absolute; right: 0.6rem; top: 0.6rem; height: 64px; max-width: 34%; object-fit: contain; filter: grayscale(1) invert(1) brightness(2); mix-blend-mode: screen; opacity: 0.6; }
.ph-vitrine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.ph-trophy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; font-size: 0.8rem; line-height: 1.2; }
.ph-season { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.ph-season i { aspect-ratio: 1; border-radius: 3px; background: var(--surface-alt); }
.ph-season i.on { background: var(--sig); }
.person-kpis[style] strong { color: var(--sig); }
.mini-avatar.has-look { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ring); }
.my-fiche-cta { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.8rem 0.9rem; margin-bottom: 1rem; border-radius: 12px; background: var(--surface-alt); }
.my-fiche-cta > span { display: flex; flex-direction: column; min-width: 0; }
.my-fiche-cta button { flex: none; color: var(--text); font-weight: 600; }
/* Éditeur */
.look-editor { display: flex; flex-direction: column; gap: 0.9rem; border: 2px solid var(--text); }
.look-field { display: flex; flex-direction: column; gap: 0.45rem; }
.look-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.look-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.look-sw { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.look-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--text); }
.look-seg, .look-pins { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.look-seg button, .look-pins button { font: 600 0.85rem var(--font-body); padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.look-seg button[aria-pressed="true"], .look-pins button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.look-photo-row { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; }
.look-editor textarea { width: 100%; resize: vertical; }
.look-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

.ph-favs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.ph-favs-friends { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ph-fav-circuit, .ph-fav-team, .ph-fav-friend { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; min-width: 0; font-size: 0.85rem; }
.ph-fav-team, .ph-fav-friend { background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font: inherit; }
.ph-fav-circuit strong, .ph-fav-team strong, .ph-fav-friend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ph-fav-circuit .outing-thumb { width: 52px; height: 52px; }
.ph-fav-team .mini-avatar { width: 52px; height: 52px; }
.ph-fav-friend .mini-avatar { width: 44px; height: 44px; }
.ph-fav-friend span { font-size: 0.78rem; font-weight: 600; }

.ph-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; }
.ph-month { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ph-month-n { font-family: var(--font-display); font-weight: 800; font-size: 0.85rem; line-height: 1; min-height: 0.85rem; color: var(--sig); font-variant-numeric: tabular-nums; }
.ph-month-bar { width: 100%; height: 56px; border-radius: 4px; background: var(--surface-alt); display: flex; align-items: flex-end; overflow: hidden; }
.ph-month-bar i { display: block; width: 100%; background: var(--sig); border-radius: 4px 4px 0 0; }
.ph-month-l { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }
.ph-month.current .ph-month-l { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ph-months-help { margin-top: 0.4rem; }

.ph-feature { margin-bottom: 0.9rem; }
.ph-link { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ph-link:first-of-type { border-top: 0; }
.ph-link-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-logo { width: 100%; height: 100%; display: grid; place-items: center; }
.brand-logo.brand-link { background: var(--sig, var(--text)) !important; }
.ph-link-main, .look-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-link-main strong, .look-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-link-go { color: var(--text-muted); font-weight: 700; }
.ph-sponsors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.ph-sponsor { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; min-height: 74px; padding: 0.5rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #14161a; font: inherit; cursor: pointer; min-width: 0; }
span.ph-sponsor { cursor: default; }
.ph-sponsor img { max-width: 100%; max-height: 44px; object-fit: contain; }
.ph-sponsor-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; text-align: center; overflow-wrap: anywhere; }
.ph-sponsor-cap { font-size: 0.7rem; color: #6a6e76; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.look-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.look-item .ph-link-ico { width: 32px; height: 32px; background: var(--surface-alt); color: var(--text); }
.look-item-logo { width: 40px; height: 32px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--border); }
.look-add { display: flex; flex-direction: column; gap: 0.4rem; }
.look-add-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ph-plate.ph-logo { background: #fff; border: 3px solid #fff; min-width: 5rem; max-width: 9rem; padding: 0.3rem 0.5rem; }
.ph-plate.ph-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ph-date { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.6rem 0; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ph-date:first-of-type { border-top: 0; }
.ph-date-box { width: 44px; flex: none; border-radius: 10px; background: var(--sig); color: var(--sig-ink); text-align: center; padding: 0.25rem 0; line-height: 1.05; }
.ph-date-box b { display: block; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.3rem; }
.ph-date-box small { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ph-date-book { flex: none; font-size: 0.8rem; font-weight: 700; color: var(--sig-ink); background: var(--sig); border-radius: 999px; padding: 0.3rem 0.7rem; }
.person-hero .outing-actions > button { flex: 1 1 auto; }
/* En-tête d'un team : de l'air entre chaque bloc */
.team-head { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1.1rem; }
.team-head > * { margin: 0 !important; }
.team-head .team-stats-row { margin: 0; }
.team-head .team-logo-frame img { border-radius: 12px; }
.team-head .outing-actions { margin: 0; }
.team-slogan { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.35rem; line-height: 1.2; color: var(--text); text-wrap: balance; }
.team-head + .pill-tabs, .team-head + .subnav, .person-hero + .pill-tabs { margin-top: 1.2rem; }

/* Podium des potes */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 0.5rem; margin-top: 1rem; }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; min-width: 0; text-align: center; }
.podium-who { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; min-width: 0; max-width: 100%; }
.podium-who .mini-avatar { width: 40px; height: 40px; }
.podium-col.p1 .podium-who .mini-avatar { width: 48px; height: 48px; }
.podium-who strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.podium-col.me .podium-who strong { color: var(--accent); }
.podium-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.05rem; line-height: 1; font-variant-numeric: tabular-nums; }
.podium-col.p1 .podium-time { font-size: 1.25rem; }
.podium-gap { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.podium-step { width: 100%; margin-top: 0.35rem; border-radius: 10px 10px 0 0; display: grid; place-items: start center; padding-top: 0.15rem; color: #fff; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.15rem; }
.podium-col.p1 .podium-step { height: 54px; background: var(--tier-3); }
.podium-col.p2 .podium-step { height: 38px; background: var(--tier-2); }
.podium-col.p3 .podium-step { height: 26px; background: var(--tier-1); }
.podium-col.empty .podium-step { background: var(--surface-alt); color: var(--text-muted); }
.podium-rest { margin-top: 0.8rem; }
.podium-note { margin-top: 0.8rem; padding: 0.6rem 0.75rem; border-radius: 10px; background: var(--surface-alt); font-size: 0.9rem; }
.podium-chip { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; color: #fff; background: var(--text-muted); }
.podium-chip.p1 { background: var(--tier-3); } .podium-chip.p2 { background: var(--tier-2); } .podium-chip.p3 { background: var(--tier-1); }
.feed-highlight.podium-climb .notif-ico { background: var(--tier-3); color: #fff; } .feed-highlight.podium-climb.p2 .notif-ico { background: var(--tier-2); } .feed-highlight.podium-climb.p3 .notif-ico { background: var(--tier-1); }
.record-chip { display: inline-block; vertical-align: middle; margin-left: 0.3rem; font-family: var(--font-body); font-style: normal; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 999px; padding: 0.08rem 0.45rem; }
.tutorial-icon { color: var(--accent); }
.location-actions .icon-btn svg, #copy-referral-link-btn svg { display: block; }
.icon-btn svg { flex-shrink: 0; width: 18px; height: 18px; }
.link-btn.inline-link { display: inline; padding: 0; margin: 0; width: auto; }

/* Saisons */
.season-years { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.season-years button { font: 700 0.9rem var(--font-body); padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.season-years button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.season-hero { --sig: var(--accent); background: var(--sig, var(--accent)); color: var(--sig-ink, #fff); border: 0; display: flex; flex-direction: column; gap: 0.2rem; position: relative; overflow: hidden; }
.season-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 18px solid rgba(255,255,255,0.12); pointer-events: none; }
.season-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.season-year { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 4.6rem; line-height: 0.9; }
.season-who { font-weight: 700; font-size: 1.05rem; opacity: 0.95; }
.season-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.8rem; }
.season-stats > div { background: rgba(255,255,255,0.16); border-radius: 12px; padding: 0.55rem 0.7rem; display: flex; flex-direction: column; }
.season-stats b { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2rem; line-height: 1; }
.season-stats span { font-size: 0.78rem; opacity: 0.9; }
.season-share { margin-top: 0.9rem; align-self: flex-start; font: 700 0.9rem var(--font-body); padding: 0.55rem 1rem; border-radius: 999px; border: 0; background: var(--sig-ink, #fff); color: var(--sig, var(--accent)); cursor: pointer; }
.season-circuits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.season-circuit { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; min-width: 0; }
.season-circuit .outing-thumb { width: 60px; height: 60px; }
.season-circuit strong { font-size: 0.88rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.season-tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 0 0 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; overflow: hidden; min-width: 0; }
.season-tile > strong, .season-tile > span:not(.season-tile-map) { padding: 0 0.7rem; }
.season-tile > strong { font-size: 0.95rem; margin-top: 0.35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-tile-map { position: relative; height: 104px; display: grid; place-items: center; background: #fff; border-bottom: 3px solid var(--sig, var(--accent)); }
.season-tile-map img { max-width: 78%; max-height: 82px; object-fit: contain; }
.season-date { position: absolute; left: 0.45rem; top: 0.45rem; width: 38px; border-radius: 8px; background: var(--sig, var(--accent)); color: var(--sig-ink, #fff); text-align: center; line-height: 1.05; padding: 0.15rem 0; }
.season-date b { display: block; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.1rem; }
.season-date small { font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.05em; }
.season-tile-chip { position: absolute; right: 0.45rem; top: 0.45rem; margin: 0; }
.season-tile-chip.first { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); background: var(--surface-alt); border-radius: 999px; padding: 0.08rem 0.45rem; }
.season-tile-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Slogan sous le nom de l'appli (écran de connexion) */
.app-tagline { margin: 0.15rem 0 0; font-size: 0.95rem; color: var(--text-muted); }

/* Liens vers les guides PDF (Aide › À propos) */
.guide-links { margin-top: 1.1rem; display: grid; gap: 0.5rem; }
.guide-links-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.guide-link { display: inline-block; text-decoration: none; border: 1px solid var(--border); border-radius: 10px; padding: 0.45rem 0.8rem; color: var(--text); font-weight: 600; background: var(--surface); font-size: 0.9rem; }

/* Mes pneus (Carnet) */
.tyre-card { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.tyre-card-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.tyre-card-label { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; font-style: italic; text-transform: uppercase; }
.tyre-card-usage { font-weight: 600; font-variant-numeric: tabular-nums; }
.tyre-card-empty > div { flex: 1 1 14rem; min-width: 0; }
.tyre-history { margin-top: 0.9rem; display: grid; gap: 0.45rem; }
.tyre-history-row { border-top: 1px solid var(--border); padding-top: 0.4rem; }

/* Ma journée, session par session (page d'un roulage) */
.day-prog-chart { width: 100%; height: 70px; display: block; margin: 0.5rem 0 0.3rem; color: var(--text); }
.day-prog-dot { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.day-prog-best { fill: var(--accent); stroke: var(--accent); stroke-width: 2; }
.day-prog-rows { display: grid; gap: 0.15rem; }
.day-prog-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.5rem; align-items: baseline; gap: 0.6rem; padding: 0.35rem 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.day-prog-name { color: var(--text-muted); font-size: 0.9rem; }
.day-prog-time { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 1.05rem; }
.day-prog-time.best { color: var(--accent); }
.day-prog-delta { text-align: right; font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }
.day-prog-delta.faster { color: var(--best, #1d8a4e); }
.day-prog-delta.slower { color: var(--accent); }
.day-prog-changes { grid-column: 1 / -1; font-size: 0.82rem; color: var(--text-muted); }
.day-prog-hint { margin-top: 0.5rem; }
.add-cal-row { margin: -0.4rem 0 0.9rem; font-size: 0.9rem; }

/* Import de roulages (admin) */
.evimp-preview { margin-top: 0.7rem; display: grid; gap: 0.2rem; max-height: 22rem; overflow: auto; }
.evimp-row { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0 0.6rem; padding: 0.3rem 0; border-top: 1px solid var(--border); font-size: 0.88rem; }
.evimp-row .help-text { grid-column: 2; }
.evimp-row.error { color: var(--accent); }

/* Mon budget (onglet Carnet › Budget) */
.event-price-line { margin: -0.5rem 0 0.9rem; }
.budget-intro { margin: 0.2rem 0 0.8rem; }
.budget-year { padding: 0.75rem 0.9rem; }
.budget-year-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; font-family: var(--font-display); text-transform: uppercase; font-weight: 700; }
.budget-year-head strong { font-size: 1.45rem; font-weight: 800; font-style: italic; font-variant-numeric: tabular-nums; }
.budget-list { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.budget-row { border-top: 1px solid var(--border); padding: 0.55rem 0; }
.budget-row:first-child { border-top: 0; }
.budget-row-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.budget-row-head input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.budget-row-title { display: flex; flex-direction: column; min-width: 0; text-align: left; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.budget-row-total { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-row-off .budget-row-title strong { color: var(--text-muted); }
.budget-row-more { margin: 0.4rem 0 0 1.7rem; }
.budget-row-more summary { cursor: pointer; font-size: 0.88rem; color: var(--text-muted); }
.budget-row-more .setup-grid { margin-top: 0.4rem; }
.budget-paid { flex-direction: row; align-items: center; gap: 0.4rem; align-self: end; }
.budget-paid input { width: auto; }
.budget-row-name { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.budget-lines { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.budget-line { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem auto; gap: 0.4rem; align-items: center; }
.budget-line input { margin: 0; }
.budget-line-del { width: auto; background: none; border: 0; color: var(--text-muted); font-size: 1.3rem; line-height: 1; padding: 0.2rem 0.4rem; cursor: pointer; }
.budget-row-actions { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.5rem; font-size: 0.9rem; }
.budget-remove { color: var(--text-muted); }
.budget-extras { margin: 0.5rem 0 0; }
.budget-past-year + .budget-past-year { margin-top: 0.6rem; }
.budget-past-head { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0 0.2rem; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 1.1rem; text-transform: uppercase; font-variant-numeric: tabular-nums; border-bottom: 2px solid var(--text); }
.budget-past-head + .budget-row { border-top: 0; }
.budget-list input[type="number"], .budget-extras-card input[type="number"] { width: 100%; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 7px; padding: 0.55rem 0.65rem; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); font-variant-numeric: tabular-nums; }
.budget-list input[type="number"]:focus-visible, .budget-extras-card input[type="number"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Budget, vue saison (même vocabulaire que la fiche pilote) */
.budget-seasons { display: flex; gap: 0.45rem; overflow-x: auto; margin: 0 0 0.9rem; padding-bottom: 2px; scrollbar-width: none; }
.budget-seasons::-webkit-scrollbar { display: none; }
.budget-season { flex: 0 0 auto; width: auto; min-width: 5.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.45rem 0.75rem; color: var(--text-muted); cursor: pointer; font: inherit; text-align: left; }
.budget-season span { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; }
.budget-season strong { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-season.active { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.budget-season.active span { color: var(--accent); }
.budget-hero { min-height: 8.5rem; }
.budget-hero .ph-feature-time { font-size: 2.9rem; margin: 0.15rem 0; }
.budget-hero .ph-feature-trace { height: 78px; }
.budget-progress { position: relative; z-index: 1; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--sig-ink) 30%, transparent); margin-top: 0.7rem; overflow: hidden; }
.budget-progress i { display: block; height: 100%; background: var(--sig-ink); border-radius: 99px; }
.budget-progress-legend { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.budget-kpis strong { font-size: 1.35rem; white-space: nowrap; }
.budget-split .section-title, .budget-extras-card .section-title { margin: 0; }
.budget-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 0.7rem 0 0.6rem; }
.budget-bar i { display: block; min-width: 4px; }
.budget-legend { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.55rem; align-items: center; padding: 0.35rem 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.budget-legend:first-of-type { border-top: 0; }
.budget-legend strong { font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
.budget-legend-pct { color: var(--text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.budget-dot { width: 0.7rem; height: 0.7rem; border-radius: 3px; }
.bk-orga { background: var(--accent); }
.bk-travel { background: #14161a; }
.bk-hotel { background: #6b6f76; }
.bk-tyres { background: #a9adb3; }
.bk-other { background: #d6d8db; }
.bk-lines { background: #e58f8a; }
.bk-extras { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, #f4c9c6 3px 6px); }
.budget-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.budget-card-head strong { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.budget-intro { margin: 0.4rem 0 1rem; }
.budget-split { margin-bottom: 0.9rem; }

/* Mes pressions (Stats › Pneus) */
.pressures-card { margin-bottom: 0.9rem; }
.pressures-add { margin: 0.7rem 0 0.2rem; }
.pressure-circuit { border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 0.7rem; }
.pressure-circuit-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; margin-bottom: 0.35rem; }
.pressure-row { padding: 0.3rem 0 0.3rem calc(40px + 0.6rem); }
.pressure-vals { font-weight: 700; font-variant-numeric: tabular-nums; }
.pressure-more { padding-left: calc(40px + 0.6rem); }
.pressure-more .pressure-row { padding-left: 0; border-top: 1px solid var(--border); }
.pressure-more summary { cursor: pointer; font-size: 0.88rem; color: var(--text-muted); }
.pressure-error { color: var(--accent); margin-top: 0.5rem; }
.account-referrer { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.account-referrer input { width: auto; flex: 1; max-width: 11rem; padding: 0.25rem 0.45rem; font-size: 0.85rem; }
.account-row-wrap { flex-wrap: wrap; }
.account-row-wrap > div:first-child { flex: 1 1 100%; min-width: 0; }
.account-row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.15rem 0 0.2rem; }
.account-row-actions .icon-btn { width: auto; min-width: 2rem; height: 2rem; padding: 0 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.tyre-state { display: flex; gap: 1.2rem; margin: 0.7rem 0 0.2rem; font-weight: 600; }
.tyre-state label { display: flex; align-items: center; gap: 0.35rem; margin: 0; cursor: pointer; }
.tyre-state input { width: auto; accent-color: var(--accent); }
.tyre-sheet input[type="number"] { width: 100%; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 7px; padding: 0.55rem 0.65rem; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); }
.tyre-prior[hidden] { display: none; }

/* Mes sessions sur ces pneus */
.tyre-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tyre-days { display: grid; gap: 0.7rem; margin-top: 0.8rem; max-height: 58vh; overflow-y: auto; }
.tyre-day { border-top: 1px solid var(--border); padding-top: 0.6rem; }
.tyre-day-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; align-items: center; margin-bottom: 0.4rem; }
.tyre-slots { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tyre-slot { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.65rem; margin: 0; font-size: 0.85rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.tyre-slot input { width: auto; margin: 0; accent-color: var(--accent); }
.tyre-slot.has-chrono { cursor: default; opacity: 0.85; }
.tyre-slot-tag { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.tyre-extra { display: flex; align-items: center; gap: 0.5rem; margin: 0.45rem 0 0; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.tyre-extra input { width: 4.2rem; padding: 0.3rem 0.45rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 7px; font-size: 0.9rem; color: var(--text); }
.tyre-sessions-actions { margin-top: 0.8rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Fiche : tous les amis, rangée qui défile au doigt */
.ph-count { font-size: 0.8em; color: var(--text-muted); font-weight: 600; }
.ph-friends-row { display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding: 0.2rem 0.1rem 0.5rem; margin: 0 -0.1rem; scrollbar-width: thin; }
.ph-friends-row .ph-fav-friend { flex: 0 0 4.6rem; scroll-snap-align: start; }

/* Onglet Budget d'un roulage */
.outing-budget-hero { min-height: 0; }
.outing-budget-hero .ph-feature-time { font-size: 2.5rem; }
.outing-budget-all { display: block; width: 100%; margin: 0.6rem 0 1rem; text-align: center; }
label.budget-row-title { cursor: pointer; margin: 0; }
.team-rename-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.3rem; }
.team-rename-row input { flex: 1; min-width: 0; }
.team-rename-row button { flex: none; width: auto; }
.estimate-card { margin-bottom: 0.9rem; }
.estimate-none { margin-bottom: 0.9rem; }

/* Podium des potes : en-tête façon fiche (circuit, drapeau, tracé) */
.podium-card { padding: 0 0 0.9rem; overflow: hidden; }
.podium-card > *:not(.podium-head) { margin-left: 0.9rem; margin-right: 0.9rem; }
.podium-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.8rem; padding: 1rem 0.9rem 0.8rem; min-height: 7.6rem; background: var(--surface-alt); border-bottom: 3px solid var(--accent); }
.podium-trace { position: absolute; right: 0.5rem; top: 2.6rem; bottom: 0.4rem; width: 42%; height: calc(100% - 3rem); object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
.podium-head-text { position: relative; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; max-width: 58%; }
.podium-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.podium-circuit { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.45rem; overflow-wrap: anywhere; line-height: 1.05; text-transform: uppercase; display: flex; align-items: center; gap: 0.4rem; }
.podium-sub { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.podium-share { position: absolute; top: 0.6rem; right: 0.6rem; width: auto; padding: 0.3rem 0.7rem; font-size: 0.8rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .podium-trace { mix-blend-mode: screen; filter: grayscale(1) invert(1) brightness(2); } }
:root[data-theme="dark"] .podium-trace { mix-blend-mode: screen; filter: grayscale(1) invert(1) brightness(2); }
.moto-setup-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--border); }
.moto-setup-row:first-of-type { border-top: 0; }
.moto-setup-row button { flex: none; width: auto; }

/* Onglets en classeur : quand des sous-onglets suivent la barre d'onglets,
   l'onglet actif descend dans un panneau blanc qui les contient, pour
   qu'on voie qu'ils lui appartiennent. */
.subnav:has(+ .pill-tabs) { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; border-radius: 12px 12px 0 0; align-items: flex-end; }
.subnav:has(+ .pill-tabs) .subnav-btn { margin-bottom: 0.25rem; }
.subnav:has(+ .pill-tabs) .subnav-btn.active { position: relative; z-index: 1; margin-bottom: -1px; padding-bottom: calc(0.55rem + 0.25rem + 1px); border-radius: 9px 9px 0 0; box-shadow: none; border: 1px solid var(--border); border-bottom: 0; }
.subnav + .pill-tabs { margin: 0 0 0.9rem; padding: 0 0.35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0 0 12px 12px; box-shadow: var(--shadow); }
.subnav + .pill-tabs .pill-btn { padding: 0.6rem 0.45rem 0.55rem; }

/* Mes potes en piste (accompagnant) */
.friends-on-track { margin-bottom: 0.9rem; }
.fot-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; align-items: center; padding: 0.5rem 0; border-top: 1px solid var(--border); }
.fot-row:first-of-type { border-top: 0; }
.fot-main strong { font-size: 0.98rem; }
.fot-status { font-size: 0.86rem; color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.fot-row.on-track .fot-status { color: var(--best, #1d8a4e); }
.fot-row.soon .fot-status { color: var(--accent); }
.jourj-friends { margin: 1rem 0; text-align: left; }
.jourj-friends .section-title { color: inherit; }
.jourj-friends .fot-row { border-top-color: rgba(255,255,255,0.15); }
.jourj-friends .fot-status { color: inherit; opacity: 0.85; font-size: 1rem; }
.jourj-friends .fot-row.on-track .fot-status { color: #4ade80; opacity: 1; }
.jourj-friends .fot-row.soon .fot-status { color: #ff8a80; opacity: 1; }
.jourj-friends .fot-main strong { font-size: 1.15rem; }

/* Fiche : le tracé passe à gauche du badge (numéro ou logo) */
.ph-cover:has(.ph-plate) .ph-trace { right: auto; left: 3.4rem; max-width: calc(100% - 3.4rem - 6.4rem); }
.ph-cover:has(.ph-logo) .ph-trace { max-width: calc(100% - 3.4rem - 10.6rem); }
/* Team : engrenage des réglages en haut à droite de la fiche */
.person-hero:has(.team-gear) { position: relative; }
.team-gear { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 3; width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; }
.team-settings-title { margin: 0.2rem 0 0.6rem; }
.team-gear.team-gear-inline { position: static; flex: 0 0 auto; box-shadow: none; }
/* Albums photos d'un roulage (liens partagés) */
.album-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.album-row:last-of-type { border-bottom: 0; }
.album-name { flex: 1; min-width: 0; font-weight: 600; }
.album-open { white-space: nowrap; color: var(--accent); font-weight: 600; }
/* Onglets qui défilent : flèche + dégradé collés au bord tant qu'il en reste */
.pill-tabs, .sub-pills { scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs.more-right::after, .sub-pills.more-right::after, .pill-tabs.more-left::before, .sub-pills.more-left::before {
  content: '›'; position: sticky; right: 0; flex: 0 0 2.2rem; margin-left: -2.2rem; z-index: 2; pointer-events: none;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 0.1rem;
  font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--accent);
  background: linear-gradient(to right, rgba(244,243,239,0), var(--bg) 70%);
}
.pill-tabs.more-left::before, .sub-pills.more-left::before {
  content: '‹'; right: auto; left: 0; order: -1; margin-left: 0; margin-right: -2.2rem; justify-content: flex-start; padding: 0 0 0 0.1rem;
  background: linear-gradient(to left, rgba(244,243,239,0), var(--bg) 70%);
}
.pill-tabs.more-right .pill-btn:last-child, .sub-pills.more-right .sub-pill-btn:last-child { margin-right: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-tabs.more-right::after, :root:not([data-theme="light"]) .sub-pills.more-right::after { background: linear-gradient(to right, transparent, var(--bg) 70%); } :root:not([data-theme="light"]) .pill-tabs.more-left::before, :root:not([data-theme="light"]) .sub-pills.more-left::before { background: linear-gradient(to left, transparent, var(--bg) 70%); } }
:root[data-theme="dark"] .pill-tabs.more-right::after, :root[data-theme="dark"] .sub-pills.more-right::after { background: linear-gradient(to right, transparent, var(--bg) 70%); }
:root[data-theme="dark"] .pill-tabs.more-left::before, :root[data-theme="dark"] .sub-pills.more-left::before { background: linear-gradient(to left, transparent, var(--bg) 70%); }
/* Rôle sur un roulage : pilote ou accompagnant */
.ride-role-row { display: flex; align-items: center; gap: 0.4rem; margin: 0.2rem 0 0.7rem; flex-wrap: wrap; }
.ride-role-row .help-text { margin: 0 0.2rem 0 0; }
.ride-role-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.35rem 0.85rem; font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.ride-role-btn.active { background: var(--text); border-color: var(--text); color: var(--surface); }
/* Chrono : lien vidéo et heure de saisie */
.session-video-link { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.outing-session-meta { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; margin-top: 0.2rem; }
.outing-row-main .outing-entered, .outing-entered { display: block; font-size: 0.78rem; }
/* Records de la piste : MotoGP, Moto2, Moto3, FSBK, potes et moi */
.track-records .tr-row { display: grid; grid-template-columns: 1fr auto 4.6rem; gap: 0.6rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.track-records .tr-row:last-of-type { border-bottom: 0; }
.track-records .tr-label { display: flex; flex-direction: column; min-width: 0; }
.track-records .tr-label .help-text { font-size: 0.78rem; }
.track-records .tr-gap { text-align: right; font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.track-records .tr-pro .carnet-time { color: var(--text-muted); }
.track-records .tr-me { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 8px; padding-left: 0.4rem; padding-right: 0.4rem; }
.track-records .tr-me strong, .track-records .tr-me .carnet-time { color: var(--accent); }
.track-records .tr-foot { margin-top: 0.4rem; }
.ci-records { grid-column: 1 / -1; }
.ci-record-row { display: grid; grid-template-columns: 4rem 6.5rem 1fr; gap: 0.4rem; align-items: center; margin-top: 0.35rem; }
.ci-record-row span { font-weight: 700; font-size: 0.85rem; }
/* Onglet Chrono : gros bouton central dans la barre du bas */
.bottom-nav-btn.bottom-nav-main .bottom-nav-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-top: -1.3rem; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(200,38,31,0.35); border: 3px solid var(--surface); }
.bottom-nav-btn.bottom-nav-main { font-weight: 800; }
.bottom-nav-btn.bottom-nav-main.active { background: none; color: var(--accent); }
.bottom-nav-btn.bottom-nav-main.active::after { display: none; }
@media (min-width: 960px) { .bottom-nav-btn.bottom-nav-main .bottom-nav-icon { width: auto; height: auto; margin: 0; background: none; color: inherit; box-shadow: none; border: 0; } .bottom-nav-btn.bottom-nav-main.active { background: var(--accent); color: var(--accent-ink); } }
/* Écran Chrono : très simple, gros textes, gros boutons */
.chrono-hero { display: flex; flex-direction: column; gap: 0.15rem; margin: 0.2rem 0 0.9rem; }
.chrono-hero-label { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.chrono-hero-circuit { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.3rem; line-height: 1.05; text-transform: uppercase; }
.chrono-hero-sub { font-size: 1.05rem; font-weight: 600; }
.chrono-hero-off .chrono-hero-circuit { color: var(--text-muted); }
.chrono-big-btn { display: block; width: 100%; padding: 1.25rem 1rem; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-size: 1.35rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); }
.chrono-photo-btn { display: block; width: 100%; margin: 0.4rem 0 1rem; padding: 0.7rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 1rem; font-weight: 600; cursor: pointer; }
.chrono-progress .chrono-best { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 0.4rem; }
.chrono-best-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.4rem; line-height: 1.1; }
.chrono-sessions { margin-top: 0.4rem; }
.chrono-session { display: flex; justify-content: space-between; padding: 0.5rem 0; border-top: 1px solid var(--border); font-size: 1.05rem; }
.chrono-plan { display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left; cursor: pointer; color: var(--text); }
.chrono-plan img { width: 6rem; height: 4.2rem; object-fit: contain; flex: 0 0 auto; }
.chrono-plan-txt { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; font-size: 1.05rem; }
.chrono-plan-arrow { font-size: 1.6rem; color: var(--text-muted); }
.chrono-next { display: flex; flex-direction: column; gap: 0.25rem; }
.chrono-next-circuit { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; text-transform: uppercase; }
.chrono-next .primary { margin-top: 0.5rem; }
.chrono-later-btn { width: 100%; margin-top: 0.4rem; }
.chrono-hor-link { align-self: flex-start; margin-top: 0.3rem; font-weight: 700; color: var(--accent); }
/* Formulaire de chrono compact : résumé pré-rempli, Chronos, photo, ⋯ */
.chrono-form-card { padding-top: 0.9rem; }
.cf-summary { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.chrono-clock { margin-left: 0.5rem; color: var(--text); font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.chrono-hero, .card.has-clock { position: relative; }
.chrono-clock-corner { position: absolute; top: 0.1rem; right: 0; margin: 0; font-weight: 800; font-size: 1.15rem; font-family: var(--font-display); font-style: italic; }
.card.has-clock .chrono-clock-corner { top: 0.9rem; right: 1rem; }
.cf-confirm { border: 2px solid var(--accent); border-radius: 12px; padding: 0.7rem 0.8rem; margin: 0 0 0.8rem; display: flex; flex-direction: column; gap: 0.35rem; }
.cf-confirm-q { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.cf-confirm-slot { font-size: 1.15rem; font-weight: 600; }
.cf-confirm-actions { display: flex; gap: 0.5rem; margin-top: 0.2rem; }
.cf-confirm-actions button { flex: 1; width: auto; }
.cf-confirm.done { border-color: var(--border); padding: 0.45rem 0.8rem; }
.cf-confirm.done .cf-confirm-slot { font-size: 0.95rem; }
.imp-split { margin-top: 0.6rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; }
.imp-split label { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; }
.imp-split label input { width: auto; margin-top: 0.2rem; }
.imp-split-list { margin: 0.35rem 0 0; padding-left: 1.1rem; font-size: 0.9rem; }
.cf-label { font-size: 1.1rem; font-weight: 800; }
.cf-laps-row { display: flex; gap: 0.5rem; align-items: stretch; }
.cf-laps-row textarea { flex: 1; min-height: 4.6rem; font-size: 1.15rem; }
.cf-photo-btn { flex: 0 0 4.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-alt); color: var(--text); font-size: 0.72rem; font-weight: 700; cursor: pointer; padding: 0.3rem; }
.cf-submit { width: 100%; margin-top: 0.7rem; padding: 0.95rem; font-size: 1.15rem; font-weight: 800; }
.cf-more { margin-top: 0.7rem; }
.cf-more > summary { cursor: pointer; color: var(--text-muted); font-weight: 700; list-style: none; padding: 0.3rem 0; }
.cf-more > summary::-webkit-details-marker { display: none; }
.cf-sep { margin: 0.9rem 0 0.2rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.chrono-ev-btn { width: 100%; margin-top: 0.6rem; }
/* Mise à jour de l'appli */
.update-banner { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 0.6rem); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.65rem 1.2rem; border: 0; border-radius: 14px; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.25); font-size: 0.95rem; cursor: pointer; max-width: calc(100% - 32px); }
.update-banner span { font-size: 0.82rem; opacity: 0.9; }
.app-version-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.chrono-prog-where { margin: -0.3rem 0 0.5rem; }
/* ---- Communauté façon réseau social ---- */
.composer-teaser { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; }
.composer-teaser .mini-avatar { width: 2.4rem; height: 2.4rem; flex: 0 0 auto; }
.composer-teaser-btn { flex: 1; text-align: left; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted); border-radius: 999px; padding: 0.7rem 1rem; font-size: 1rem; cursor: pointer; }
.feed-sug-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; }
.feed-sug-head .link-btn { color: var(--accent); font-weight: 700; }
.follow-cards { display: flex; gap: 0.6rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.3rem; margin: 0 -0.2rem; scrollbar-width: none; }
.follow-cards::-webkit-scrollbar { display: none; }
.follow-card { flex: 0 0 8.4rem; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.8rem 0.5rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: center; }
.follow-card-who { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; border: 0; background: none; padding: 0; cursor: pointer; color: var(--text); min-width: 0; width: 100%; }
.follow-card-who .mini-avatar { width: 3.4rem; height: 3.4rem; font-size: 1.3rem; }
.follow-card-who strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-card-who .help-text { font-size: 0.76rem; line-height: 1.2; min-height: 1.9em; }
.follow-btn { border-radius: 999px; font-weight: 700; }
.follow-btn.small { padding: 0.35rem 0.9rem; font-size: 0.85rem; width: 100%; }
.wall-post-head .follow-btn.small { width: auto; }
.follow-btn.is-friend { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.8rem; padding: 0.35rem 0.9rem; cursor: default; }
.follow-btn.following { color: var(--text); }
.people-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.people-row:last-child { border-bottom: 0; }
.people-row-who { flex: 1; display: flex; align-items: center; gap: 0.6rem; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--text); min-width: 0; }
.people-row-who > span:last-child { display: flex; flex-direction: column; }
.people-row .follow-btn.small { width: auto; flex: 0 0 auto; }
.my-mini-profile { display: flex; flex-direction: column; gap: 0.6rem; }
.mmp-who { display: flex; align-items: center; gap: 0.7rem; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--text); }
.mmp-who .mini-avatar { width: 3.2rem; height: 3.2rem; font-size: 1.3rem; }
.mmp-who > span:last-child { display: flex; flex-direction: column; font-size: 1.1rem; }
.social-counts { display: flex; gap: 1.1rem; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.my-mini-profile .social-counts { margin: 0; }
.social-count { border: 0; background: none; padding: 0; color: var(--text-muted); font-size: 0.92rem; cursor: pointer; }
span.social-count { cursor: default; }
.social-count strong { color: var(--text); font-size: 1.05rem; }
.feed-section-title { margin: 1rem 0 0.5rem; }
.post-comments { margin-top: 0.6rem; border-top: 1px solid var(--border); padding-top: 0.5rem; display: flex; flex-direction: column; gap: 0.45rem; }
.comments-more { align-self: flex-start; color: var(--text-muted); font-weight: 600; }
.post-comment { display: flex; gap: 0.45rem; align-items: flex-start; }
.post-comment .mini-avatar { width: 1.8rem; height: 1.8rem; font-size: 0.8rem; flex: 0 0 auto; }
.post-comment-bubble { background: var(--surface-alt); border-radius: 14px; padding: 0.45rem 0.7rem; font-size: 0.92rem; line-height: 1.35; min-width: 0; }
.post-comment-author { border: 0; background: none; padding: 0; font-weight: 700; color: var(--text); cursor: pointer; }
.post-comment-time { display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 0.1rem; }
.post-comment-time .link-btn { font-size: inherit; color: inherit; text-decoration: underline; }
.post-comment-form { display: flex; gap: 0.4rem; }
.post-comment-form input { flex: 1; border-radius: 999px; padding: 0.5rem 0.9rem; }
.post-comment-form button { border-radius: 999px; flex: 0 0 auto; }
/* Republier */
.repost-btn { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.repost-count { font-size: 0.82rem; color: var(--text-muted); }
.repost-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; margin: 0.2rem 0 0.3rem; }
.repost-box { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem 0.7rem; background: var(--surface-alt); }
.feed-entry-foot { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
/* Demandes d'ami */
.friend-req-banner { display: block; width: 100%; text-align: left; font-weight: 700; color: var(--accent); cursor: pointer; }
/* Profil réseau */
.social-profile-head { padding: 0; overflow: hidden; }
.sp-cover { height: 5.5rem; background: linear-gradient(135deg, var(--sig, #c8261f), #14161a); }
.sp-id { display: flex; align-items: flex-end; gap: 0.7rem; padding: 0 1rem; margin-top: -1.8rem; }
.sp-id .mini-avatar { width: 4.4rem; height: 4.4rem; font-size: 1.7rem; border: 4px solid var(--surface); flex: 0 0 auto; }
.sp-id > div { display: flex; flex-direction: column; padding-top: 2rem; min-width: 0; }
.sp-name { font-size: 1.3rem; }
.sp-bio { margin: 0.6rem 1rem 0; }
.social-profile-head .social-counts { margin: 0.7rem 1rem 0.3rem; }
.social-profile-head .outing-actions { padding: 0 1rem 1rem; }
/* Stories */
.stories-row { display: flex; gap: 0.8rem; overflow-x: auto; padding: 0.2rem 0.1rem 0.7rem; scrollbar-width: none; }
.stories-row::-webkit-scrollbar { display: none; }
.story-bubble { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; border: 0; background: none; padding: 0; cursor: pointer; width: 4.4rem; color: var(--text); }
.story-ring { padding: 3px; border-radius: 50%; background: conic-gradient(#c8261f, #e8892a, #c8261f); }
.story-bubble.seen .story-ring { background: var(--border); }
.story-ring .mini-avatar { width: 3.6rem; height: 3.6rem; font-size: 1.4rem; border: 3px solid var(--bg); }
.story-name { font-size: 0.75rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-overlay { position: fixed; inset: 0; z-index: 9000; background: #14161a; color: #fff; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 0.6rem) 0.8rem 1rem; }
.story-bars { display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.3); }
.story-bars span.done { background: #fff; }
.story-bars span.now { background: linear-gradient(90deg, #fff 0, #fff 50%, rgba(255,255,255,0.3) 50%); background-size: 200% 100%; animation: storybar 6s linear forwards; }
@keyframes storybar { from { background-position: 100% 0; } to { background-position: 0 0; } }
.story-head { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.7rem; z-index: 2; }
.story-head .mini-avatar { width: 2.2rem; height: 2.2rem; }
.story-head span { opacity: 0.7; font-size: 0.85rem; }
.story-close { margin-left: auto; border: 0; background: none; color: #fff; font-size: 1.4rem; cursor: pointer; z-index: 3; }
.story-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; text-align: center; }
.story-trace { width: 82%; max-height: 40vh; object-fit: contain; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; margin-bottom: 1rem; }
.story-k { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #ff6a5f; font-size: 0.85rem; }
.story-circuit { font-family: var(--font-display); font-style: italic; font-size: 2.2rem; text-transform: uppercase; line-height: 1; }
.story-time { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 3.4rem; line-height: 1.1; }
.story-rec { background: #c8261f; padding: 0.25rem 0.8rem; border-radius: 999px; font-weight: 700; }
.story-date { opacity: 0.75; }
.story-photo img { max-width: 100%; max-height: 70vh; border-radius: 12px; object-fit: contain; }
.story-caption { margin-top: 0.6rem; font-size: 1.05rem; }
.story-nav { position: absolute; top: 15%; bottom: 15%; width: 35%; border: 0; background: none; cursor: pointer; z-index: 1; }
.story-nav.prev { left: 0; } .story-nav.next { right: 0; }
.story-profile { align-self: center; z-index: 2; border: 1px solid rgba(255,255,255,0.5); background: none; color: #fff; border-radius: 999px; padding: 0.5rem 1.2rem; font-weight: 700; cursor: pointer; }
/* Réactions : palette d'emojis */
.reaction-bar { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; }
.reaction-btn { border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.reaction-summary { font-size: 0.85rem; color: var(--text-muted); }
.reaction-picker { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; display: flex; gap: 0.15rem; padding: 0.3rem 0.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.reaction-picker[hidden] { display: none; }
.reaction-pick { border: 0; background: none; font-size: 1.5rem; line-height: 1; padding: 0.15rem 0.2rem; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.reaction-pick:hover, .reaction-pick.active { transform: scale(1.25); }
.reaction-pick.active { background: var(--surface-alt); }
.repost-ride { display: flex; align-items: center; gap: 0.6rem; }
.feed-card .mini-avatar[data-person], .feed-ride-circuit, .feed-ride-thumb { cursor: pointer; }
.audience-more { margin-top: 0.6rem; }
.card.has-close { position: relative; }
.card-close { position: absolute; top: 0.6rem; right: 0.6rem; width: 2rem; height: 2rem; min-width: 0; padding: 0; margin: 0; border-radius: 50%; border: 0; background: var(--surface-alt); color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.feed-upcoming-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.75rem; border: 0; background: none; padding: 0; margin: 0; text-align: left; color: var(--text); font: inherit; cursor: pointer; box-shadow: none; }
.feed-upcoming-open .feed-upcoming-main { min-width: 0; }
.name-link { cursor: pointer; text-decoration: none; }
.name-link:hover, .name-link:active { text-decoration: underline; }
.feed-month-title { display: block; font-family: var(--font-display); font-style: italic; font-size: 1.25rem; margin: 0.1rem 0; }
.feed-record-line .mini-avatar { width: 1.5rem; height: 1.5rem; font-size: 0.7rem; vertical-align: middle; }
/* Ligne d'actions identique sur tous les posts : Réagir · Commentaires · Republier */
.feed-entry-foot.social-row { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.social-row .reaction-bar { order: 1; }
.social-row .comment-btn { order: 2; }
.social-row .repost-btn, .social-row .repost-count { order: 3; }
.social-row .post-edit-links { order: 4; margin-left: auto; }
.comment-btn { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.comment-btn.active { background: var(--surface-alt); }
.feed-entry-foot.social-row { flex-wrap: nowrap; justify-content: flex-start; gap: 0.3rem; }
.social-row > * { flex: 0 1 auto; min-width: 0; }
.social-row .reaction-btn, .social-row .comment-btn, .social-row .repost-btn { padding: 0.3rem 0.6rem; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-row .reaction-summary { font-size: 0.78rem; white-space: nowrap; }
.social-row .post-edit-links { flex: 0 0 auto; }
.social-row .post-edit-links .link-btn { font-size: 0.78rem; }
/* Trois boutons égaux : Réagir · Commenter · Republier, toujours au même endroit */
.feed-entry-foot.social-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
.social-row .reaction-bar { grid-column: 1; display: block; }
.social-row .comment-btn { grid-column: 2; }
.social-row .repost-btn, .social-row .repost-count { grid-column: 3; }
.social-row .reaction-btn, .social-row .comment-btn, .social-row .repost-btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.3rem; font-size: 0.82rem; overflow: visible; text-overflow: clip; }
.social-row .repost-count { align-self: center; text-align: center; font-size: 0.75rem; }
.social-row .post-edit-links { grid-column: 1 / -1; justify-self: end; margin: 0; }
.reaction-top { letter-spacing: -0.1em; }
.social-row .reaction-bar { width: 100%; }
.social-row .reaction-bar .reaction-btn { width: 100% !important; margin: 0; }
.social-row svg { flex: 0 0 auto; }
/* Toutes les publications : le texte à gauche, l'image (tracé, vignette,
   photo) dans l'espace libre à droite. */
.feed-ride > .outing-thumb, .feed-recap-head > .outing-thumb, .feed-entry-row > .outing-thumb, .feed-moment > .outing-thumb,
.repost-ride > .outing-thumb, .feed-upcoming-open > .outing-thumb { order: 3; margin-left: auto; flex: 0 0 auto; }
.feed-ride > .feed-ride-main, .feed-recap-head > .feed-ride-main, .feed-moment > .feed-ride-main, .repost-ride > .feed-ride-main, .feed-upcoming-open > .feed-upcoming-main { order: 1; }
.feed-ride > .feed-ride-right, .repost-ride > .feed-record-time, .feed-entry-row > .feed-record-time { order: 2; }
.feed-entry-row > .feed-entry-text { order: 1; flex: 1; min-width: 0; }
.feed-ride-thumb, .feed-recap-head > .outing-thumb, .feed-moment > .outing-thumb, .feed-upcoming-open > .outing-thumb { width: 64px; height: 64px; }
.feed-moment, .feed-recap-head { display: flex; align-items: center; gap: 0.8rem; }
.feed-upcoming-open .feed-upcoming-main { flex: 1; }
.wall-post-photo.side { float: right; width: 42%; max-height: 11rem; object-fit: cover; margin: 0.15rem 0 0.5rem 0.8rem; border-radius: 10px; }
.clear { clear: both; }
.feed-photos { display: flex; align-items: center; gap: 0.8rem; }
.feed-photos > .feed-ride-main { order: 1; flex: 1; min-width: 0; }
.feed-photos > :first-child:not(.feed-ride-main) { order: 3; margin-left: auto; }
/* Carte de roulage : circuit, date puis chrono à gauche ; tracé à droite */
.feed-ride, .repost-ride { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main thumb" "right thumb"; column-gap: 0.8rem; row-gap: 0.2rem; align-items: center; }
.feed-ride > .feed-ride-main, .repost-ride > .feed-ride-main { grid-area: main; }
.feed-ride > .feed-ride-right, .repost-ride > .feed-record-time { grid-area: right; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; align-self: start; justify-self: start; }
.feed-ride > .outing-thumb, .repost-ride > .outing-thumb { grid-area: thumb; margin-left: 0; width: 72px; height: 72px; }
.feed-ride-right .feed-ride-vs { align-self: center; }
.feed-upcoming-row { flex-wrap: wrap; row-gap: 0.3rem; }
.feed-upcoming-row > .feed-upcoming-open { flex: 1 1 100%; }
.feed-upcoming-row > .feed-upcoming-open + * { margin-left: auto; }
/* « Ta story » : le logo de l'appli avec un + */
.story-ring-add { position: relative; background: var(--border); }
.story-ring-add img { width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 3px solid var(--bg); object-fit: cover; display: block; }
.story-plus { position: absolute; right: -2px; bottom: -2px; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.3rem; text-align: center; border: 2px solid var(--bg); }
.story-compose .story-text-input { margin: 0.6rem 0; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 0.7rem 1rem; }
.story-compose .story-publish { width: 100%; padding: 0.9rem; font-weight: 800; }
.story-ring-add { overflow: visible; }
.story-ring-add img { transform: scale(1); background: #fff; }
.story-ring-add { background: conic-gradient(var(--border), var(--border)); }
/* Nouveau record : avatar, nom et circuit bien espacés */
.feed-record-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.feed-record-line .mini-avatar { flex: 0 0 auto; margin: 0; }
/* Audience (Carnet+) */
.aud-head { display: flex; align-items: center; justify-content: space-between; }
.carnet-plus { font-weight: 800; font-size: 0.78rem; color: #fff; background: linear-gradient(135deg, #c8261f, #14161a); padding: 0.2rem 0.6rem; border-radius: 999px; }
.aud-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.4rem 0 0.9rem; }
.aud-tile { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem 0.7rem; display: flex; flex-direction: column; gap: 0.1rem; }
.aud-tile strong { font-family: var(--font-display); font-style: italic; font-size: 1.7rem; line-height: 1; }
.aud-tile span { font-weight: 700; font-size: 0.85rem; }
.aud-tile em { font-style: normal; font-size: 0.72rem; color: var(--text-muted); }
.aud-chart { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 0.3rem 0 0.9rem; border-bottom: 1px solid var(--border); }
.aud-bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; position: relative; min-height: 4px; }
.aud-bar i { position: absolute; top: -1.1rem; left: 0; right: 0; text-align: center; font-style: normal; font-size: 0.65rem; color: var(--text-muted); }
.aud-sub { font-size: 1rem; margin: 0.6rem 0 0.3rem; }
.aud-post { display: flex; flex-direction: column; padding: 0.45rem 0; border-top: 1px solid var(--border); }
.aud-post-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-post-nums { font-size: 0.8rem; color: var(--text-muted); }
.aud-kit { width: 100%; margin-top: 0.9rem; }
/* Republication : copie fidèle, cliquable vers l'original */
.repost-box { cursor: pointer; }
.repost-box .feed-entry-foot { display: none; }
.repost-open { margin-top: 0.4rem; font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.flash-original { animation: flashorig 1.8s ease; }
@keyframes flashorig { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }
/* Bientôt sur la piste, mis en avant */
.feed-upcoming { border: 2px solid var(--accent); }
.story-ring { position: relative; }
.story-left { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.62rem; font-weight: 800; padding: 0.05rem 0.4rem; border-radius: 999px; border: 2px solid var(--bg); white-space: nowrap; }
/* Zoom sur une photo de profil */
.photo-zoom { position: fixed; inset: 0; z-index: 9500; background: rgba(10,10,12,0.94); display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.photo-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; transition: transform 0.05s linear; user-select: none; -webkit-user-drag: none; }
.photo-zoom-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 0.8rem); right: 1rem; z-index: 2; border: 0; background: rgba(255,255,255,0.15); color: #fff; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.person-avatar .mini-avatar:has(img), .profile-avatar:has(img) { cursor: zoom-in; }

/* Bientôt sur la piste : les amis qui viennent, en petits cercles façon story. */
.upcoming-faces { order: 2; flex-basis: 100%; display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.1rem 0 0.15rem; scrollbar-width: none; }
.feed-upcoming-row > .ghost, .feed-upcoming-row > .feed-upcoming-tag { order: 3; }
.upcoming-faces::-webkit-scrollbar { display: none; }
.upcoming-face { flex: 0 0 auto; width: 3.1rem; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; border: 0; background: none; padding: 0; color: var(--text); cursor: pointer; font: inherit; }
.upcoming-ring { padding: 2px; }
.upcoming-ring.no-story { background: var(--border); }
.upcoming-ring .mini-avatar { width: 2.3rem; height: 2.3rem; font-size: 0.95rem; border: 2px solid var(--surface, var(--bg)); margin: 0; }
.upcoming-face-name { max-width: 100%; font-size: 0.68rem; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-face .group-chip, .upcoming-face .chip { transform: scale(0.75); margin-top: -0.15rem; }
.upcoming-face-role { font-size: 0.62rem; color: var(--text-muted, #888); }
.upcoming-more { justify-content: center; height: 2.7rem; font-size: 0.8rem; font-weight: 700; color: var(--text-muted, #888); }
.bientot-share { margin: 0.1rem 0 0.6rem; }
.bientot-share .inline-select { display: inline-block; width: auto; padding: 0.15rem 0.4rem; margin-left: 0.2rem; font-size: inherit; }

/* ===== Passe PC (≥ 960 px) =====
   Barre latérale : boutons empilés en haut, à leur taille (sur mobile ils
   s'étirent en barre du bas). Contenu : une colonne lisible de 920 px
   centrée dans l'espace à droite de la barre, plutôt qu'une page étirée
   sur tout l'écran. Boutons d'action à leur taille, plus de longues barres. */
@media (min-width: 960px) {
  :root { --content-w: 920px; }
  .bottom-nav { justify-content: flex-start; gap: 0.35rem; }
  .bottom-nav-btn, .bottom-nav-btn.bottom-nav-main { flex: 0 0 auto; margin: 0; min-height: 0; padding: 0.7rem 0.9rem; border-radius: 12px; }
  .bottom-nav-btn:not(.active):hover { background: var(--surface-alt); color: var(--text); }
  .wrap {
    max-width: none;
    margin: 0 0 0 var(--sidebar-w);
    padding-left: max(2.2rem, calc((100vw - var(--sidebar-w) - var(--content-w)) / 2));
    padding-right: max(2.2rem, calc((100vw - var(--sidebar-w) - var(--content-w)) / 2));
  }
  .page-head-inner { max-width: calc(var(--content-w) + 4.4rem); margin: 0 auto; }
  /* Actions d'un roulage, d'une fiche, d'un team : à leur taille, alignées à gauche. */
  .outing-actions, .planning-actions { flex-wrap: wrap; }
  .outing-actions > button, .planning-actions > button, .outing-actions > button.primary,
  .person-hero .outing-actions > button { flex: 0 0 auto; min-width: 7.5rem; padding-left: 1.1rem; padding-right: 1.1rem; }
  /* Enregistrer un chrono, et les gros boutons d'action pleine largeur. */
  #submit-btn, .chrono-hero button.primary, form > button.primary[type="submit"] { width: auto; min-width: 14rem; padding-left: 1.6rem; padding-right: 1.6rem; }
  #carnet-add-chrono, .add-chrono-btn, .cta-btn, button.primary.add-chrono-btn, button.primary.cta-btn, .add-chrono-btn[data-action="quick-outing"] { display: block; width: auto; min-width: 16rem; margin-left: auto; margin-right: auto; padding-left: 2rem; padding-right: 2rem; }
  .card { border-radius: 16px; }
}

/* Petite fenêtre de choix (date d'un chrono, déplacer / supprimer une journée). */
.mini-sheet-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 12, 16, 0.55); display: flex; align-items: flex-end; justify-content: center; padding: 1rem; }
.mini-sheet { width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border-radius: 18px; padding: 1.2rem 1.2rem 1rem; box-shadow: 0 20px 50px rgba(0,0,0,0.3); margin-bottom: env(safe-area-inset-bottom); }
.mini-sheet .section-title { margin-top: 0; }
.mini-sheet-choices { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.8rem 0; }
.mini-sheet-choices > button { width: 100%; text-align: left; justify-content: flex-start; }
.mini-sheet-choices > button.primary { text-align: center; justify-content: center; }
.mini-sheet-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; margin-top: 0.9rem; }
.mini-sheet .form-error { display: none; } .mini-sheet .form-error.visible { display: block; }
@media (min-width: 960px) { .mini-sheet-overlay { align-items: center; } }

/* Chronos rattachés à aucun roulage : signalés en rouge. */
.unlinked-tag { display: inline-block; align-self: flex-start; margin-top: 0.2rem; padding: 0.05rem 0.45rem; border-radius: 6px; font-size: 0.72rem; font-weight: 700; color: var(--accent); background: rgba(200, 38, 31, 0.1); }
.unlinked-warning { margin: 0 0 0.7rem; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid rgba(200, 38, 31, 0.35); background: rgba(200, 38, 31, 0.08); color: var(--text); font-size: 0.9rem; line-height: 1.35; }
.unlinked-warning strong { color: var(--accent); }

/* ===== PC façon Instagram =====
   Une seule barre à gauche : nom de l'app en haut, puis Carnet, Chrono,
   Communauté, Notifications, Inviter, Mon compte et ma fiche (l'en-tête du
   haut disparaît, ses boutons rejoignent la barre, avec leur nom).
   Au centre une colonne de lecture ; sur grand écran une colonne à droite
   (ma fiche, prochain roulage, pilotes à suivre). */
.nav-brand, .side-rail { display: none; }
@media (min-width: 960px) {
  :root { --sidebar-w: 244px; --content-w: 760px; --rail-w: 300px; }
  .bottom-nav { padding: 5rem 0.75rem 1rem; gap: 0.2rem; }
  .nav-brand { display: flex; position: fixed; z-index: 61; left: 0.75rem; top: 1.6rem; width: calc(var(--sidebar-w) - 1.5rem); align-items: center; gap: 0.6rem; padding: 0.2rem 0.8rem; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.01em; color: var(--text); text-transform: uppercase; white-space: nowrap; }
  .nav-brand img { border-radius: 7px; }
  button.nav-brand { background: none; border: 0; box-shadow: none; margin: 0; cursor: pointer; text-align: left; min-width: 0; height: auto; line-height: normal; }
  .bottom-nav-btn, .bottom-nav-btn.bottom-nav-main { padding: 0.75rem 0.9rem; font-size: 0.98rem; }
  .bottom-nav-label { font-size: 0.98rem; }
  .bottom-nav-btn .bottom-nav-icon svg, .bottom-nav-btn svg { width: 24px; height: 24px; }
  /* L'en-tête devient la suite de la barre de gauche. */
  header.page-head { left: 0; right: auto; top: var(--nav-end, calc(5rem + 3 * 3.25rem + 0.4rem)); width: var(--sidebar-w); background: transparent; border: 0; box-shadow: none; backdrop-filter: none; z-index: 60; }
  header.page-head .page-head-inner { max-width: none; margin: 0; padding: 0 0.75rem; }
  header.page-head .page-head-row { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  header.page-head .header-controls { display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem; }
  header.page-head .header-icon-btn { position: relative; width: 100%; height: auto; justify-content: flex-start; gap: 0.95rem; padding: 0.75rem 0.9rem; border-radius: 12px; background: none; color: var(--text-muted); font-weight: 600; font-size: 0.98rem; }
  header.page-head .header-icon-btn svg { width: 24px; height: 24px; flex: 0 0 auto; }
  header.page-head .header-icon-btn::after { content: attr(title); }
  header.page-head .header-icon-btn:hover, header.page-head .header-hello:hover { background: var(--surface-alt); color: var(--text); }
  header.page-head .notif-count { position: absolute; left: 1.95rem; right: auto; top: 0.35rem; width: auto; min-width: 1.1rem; height: 1.1rem; padding: 0 0.25rem; font-size: 0.65rem; line-height: 1.1rem; }
  header.page-head .header-hello { order: 2; width: 100%; justify-content: flex-start; gap: 0.8rem; padding: 0.6rem 0.9rem; border-radius: 12px; margin-top: 0.2rem; }
  header.page-head .header-hello .mini-avatar { width: 28px; height: 28px; font-size: 0.8rem; }
  header.page-head .hello-small { display: none; }
  header.page-head .hello-name { font-size: 0.98rem; font-weight: 600; font-family: var(--font-body); }
  header.page-head .banner:not(:empty) { margin-top: 0.6rem; }
  .wrap { padding-top: 2rem; }
  /* Sous-menus sous leur menu principal (les onglets de page sont masqués). */
  .nav-sub { display: flex; flex-direction: column; gap: 0.05rem; margin: 0.1rem 0 0.35rem 2.2rem; padding-left: 0.6rem; border-left: 2px solid var(--border); }
  .nav-sub-btn { width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 0.45rem 0.8rem; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
  .nav-sub-btn:hover { background: var(--surface-alt); color: var(--text); }
  .nav-sub-btn.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .subnav.main-subnav { display: none; }
  .pill-tabs.main-subnav-pills, .sub-pills.main-subnav-pills { display: none; }
  header.page-head .header-icon-btn.is-open { background: var(--accent); color: var(--accent-ink); }
  .nav-sub-btn.nav-sub4 { margin-left: 1.8rem; width: calc(100% - 1.8rem); font-size: 0.82rem; }
  .nav-sub-btn.nav-sub3 { margin-left: 0.9rem; width: calc(100% - 0.9rem); padding-top: 0.3rem; padding-bottom: 0.3rem; font-size: 0.86rem; font-weight: 500; }
  .nav-sub-btn.nav-sub3.active { background: none; font-weight: 700; }
  /* Colonne de droite : à partir de 1280 px. */
}
@media (min-width: 1280px) {
  .wrap {
    padding-left: max(2.2rem, calc((100vw - var(--sidebar-w) - var(--content-w) - var(--rail-w) - 3rem) / 2));
    padding-right: calc(max(2.2rem, calc((100vw - var(--sidebar-w) - var(--content-w) - var(--rail-w) - 3rem) / 2)) + var(--rail-w) + 3rem);
  }
  .side-rail { display: block; position: fixed; top: calc(2rem - 6px); padding: 6px 6px 0; bottom: 1rem; overflow-y: auto; width: var(--rail-w);
    left: calc(var(--sidebar-w) + max(2.2rem, calc((100vw - var(--sidebar-w) - var(--content-w) - var(--rail-w) - 3rem) / 2)) + var(--content-w) + 3rem); }
  .rail-me { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1.4rem; }
  .rail-me-who, .rail-person-who { flex: 1 1 auto; display: flex; align-items: center; gap: 0.7rem; border: 0; background: none; padding: 0; text-align: left; color: var(--text); cursor: pointer; min-width: 0; font: inherit; }
  .rail-me-who .mini-avatar { width: 48px; height: 48px; font-size: 1.1rem; }
  .rail-me-who span, .rail-person-who span { display: flex; flex-direction: column; min-width: 0; }
  .rail-me-who strong, .rail-person-who strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail-person-who .help-text, .rail-me-who .help-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
  .rail-link { flex: 0 0 auto; width: auto; display: inline; font-size: 0.82rem; font-weight: 700; }
  .rail-foot .link-btn { display: inline; width: auto; font-size: inherit; padding: 0; }
  .rail-section { margin-bottom: 1.5rem; }
  .rail-title { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.7rem; }
  .rail-next { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
  .rail-next > span:last-child { display: flex; flex-direction: column; }
  .rail-next .outing-thumb { width: 44px; height: 44px; }
  .rail-person { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
  .rail-person .mini-avatar { width: 36px; height: 36px; }
  .rail-person .follow-btn, .rail-person button.follow-btn.primary { flex: 0 0 auto; width: auto; min-width: 0; padding: 0.3rem 0.75rem; font-size: 0.8rem; border-radius: 8px; }
  .rail-foot { font-size: 0.75rem; }
}
/* Un seul trait au-dessus de « Version de l'appli ». */
.settings-block + .app-version-row { border-top: 0; }

/* ===== Carnet+ ===== */
.plus-badge { display: inline-flex; align-items: center; justify-content: center; padding: 0.02em 0.4em; border-radius: 6px; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 0.72em; line-height: 1.35; letter-spacing: 0.02em; color: #fff; background: linear-gradient(135deg, #c8261f, #e8892a); vertical-align: middle; cursor: help; }
.cp-hero { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(140deg, #14161a 0%, #2a1412 55%, #c8261f 130%); }
.cp-hero-top { display: flex; align-items: center; gap: 0.9rem; }
.cp-logo { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 14px; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, #c8261f, #e8892a); box-shadow: 0 6px 16px rgba(200,38,31,0.4); }
.cp-title { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.cp-sub { margin-top: 0.3rem; font-size: 0.92rem; opacity: 0.85; }
.cp-status { display: inline-block; margin: 1rem 0 0.2rem; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: rgba(255,255,255,0.12); }
.cp-status.on { background: #1d8a4e; }
.cp-prices { display: flex; gap: 0.7rem; margin: 0.9rem 0; }
.cp-price { position: relative; flex: 1; padding: 0.8rem 0.9rem; border-radius: 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); }
.cp-price.best { border-color: #e8892a; background: rgba(232,137,42,0.14); }
.cp-price strong { display: block; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.6rem; }
.cp-price span { font-size: 0.8rem; opacity: 0.85; }
.cp-tag { position: absolute; top: -0.6rem; right: 0.6rem; padding: 0.1rem 0.45rem; border-radius: 6px; font-size: 0.7rem !important; font-weight: 800; color: #fff; opacity: 1 !important; background: #e8892a; }
.cp-hero .cp-cta { width: 100%; margin-top: 0.2rem; background: #fff; color: #c8261f; border: 0; font-weight: 800; }
.cp-hero .cp-cta:disabled { opacity: 0.8; }
.cp-hero .cp-note { margin-top: 0.7rem; color: rgba(255,255,255,0.7); }
.cp-feat { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.cp-feat:last-child { border-bottom: 0; }
.cp-ico { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 0.1rem; color: var(--accent); }
.cp-feat.free .cp-ico { color: #1d8a4e; }
.cp-soon { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.4rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); background: var(--surface-alt); vertical-align: middle; }
.cp-team .ghost { margin-top: 0.7rem; }
/* Mon compte : 6 onglets, la rangée défile au doigt au lieu d'élargir la page. */
.subnav.profile-tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.subnav.profile-tabs::-webkit-scrollbar { display: none; }
.subnav.profile-tabs .subnav-btn { flex: 0 0 auto; padding-left: 0.7rem; padding-right: 0.7rem; }

/* État de la piste */
.track-cond { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 0.2rem 0 0.7rem; }
.track-cond .help-text { margin-right: 0.2rem; }
.track-opt { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.track-opt input { position: absolute; opacity: 0; pointer-events: none; }
.track-opt span { display: inline-block; padding: 0.3rem 0.65rem; line-height: 0; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.track-opt input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.track-opt input[value="pluie"]:checked + span { background: #2f6fd6; border-color: #2f6fd6; color: #fff; }
.track-opt input[value="humide"]:checked + span { background: #5b8fd6; border-color: #5b8fd6; color: #fff; }
.track-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.track-tag { display: inline-block; margin-left: 0.3rem; padding: 0.02rem 0.4rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700; color: #fff; background: #5b8fd6; vertical-align: middle; }
.track-tag.pluie { background: #2f6fd6; }
/* Chronos en attente d'envoi */
.pending-banner { margin: 0 0 0.7rem; padding: 0.55rem 0.8rem; border-radius: 12px; font-size: 0.88rem; font-weight: 600; color: #8a5a00; background: rgba(232, 137, 42, 0.14); border: 1px solid rgba(232, 137, 42, 0.4); }
/* QR paddock */
.paddock-qr-groups { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin: 0.7rem 0; }
.paddock-qr-caption { margin-top: 0.4rem; text-align: center; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.3rem; text-transform: uppercase; }
.paddock-qr-full { background: #fff; }
.paddock-qr-full .crop-modal { max-width: none; width: 100%; height: 100%; border-radius: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.paddock-qr-full .invite-qr-box { width: min(80vw, 70vh); }
.paddock-qr-full .paddock-qr-caption { font-size: 2.2rem; }
.avatar-presets { margin-top: 0.5rem; }
.avatar-preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.avatar-preset { width: 44px; height: 44px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); background: none; flex: none; }
.avatar-preset img { width: 100%; height: 100%; display: block; }
.avatar-preset.active { border-color: var(--accent); }
.mini-vitrine { margin-left: auto; align-self: center; display: inline-flex; gap: 0.15rem; padding: 0.15rem; background: none; border: 0; width: auto; flex: none; cursor: pointer; }
.mini-vitrine .trophy-ico { width: 30px; height: 30px; }
.mini-vitrine .trophy-ico svg { width: 16px; height: 16px; }
.ph-id .mini-vitrine { padding-top: 0.6rem; align-self: flex-start; }
.mini-vitrine .trophy-ico.earned { box-shadow: none; }
@media (min-width: 960px) and (max-height: 820px) {
  .bottom-nav { padding-top: 4.2rem; }
  .bottom-nav-btn, .bottom-nav-btn.bottom-nav-main { padding: 0.55rem 0.9rem; }
  .nav-sub-btn { padding: 0.3rem 0.8rem; }
  header.page-head .header-icon-btn { padding: 0.55rem 0.9rem; }
}
/* Abonnements, abonnés, amis : grille de cartes. */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.people-card { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; padding: 0.9rem 0.6rem 0.75rem; border: 1px solid var(--border); border-top: 3px solid var(--sig, var(--border)); border-radius: 14px; background: var(--surface); text-align: center; min-width: 0; }
.people-card-who { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; border: 0; background: none; padding: 0; cursor: pointer; color: var(--text); width: 100%; min-width: 0; font: inherit; }
.people-card-who .mini-avatar { width: 4rem; height: 4rem; font-size: 1.5rem; margin-bottom: 0.25rem; }
.people-card-who strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.98rem; }
.people-card-count { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.people-card-bio { font-size: 0.78rem; line-height: 1.3; color: var(--text-muted); min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.people-card .follow-btn.small { width: 100%; }
/* Badges en couleur, un sens par couleur :
   bleu = PRO (pilote PRO comme Team PRO), vert = COACH, violet = ORGA,
   magenta = PHOTO, or = personnalité, rouge = vérifié, dégradé = Carnet+. */
.pro-badge.badge-text, .legend-swatch.pro-badge { background: #1d7fd6; color: #fff; }
.coach-badge.badge-text, .legend-swatch.coach-badge { background: #1c8f5a; color: #fff; }
.organizer-badge.badge-text, .legend-swatch.organizer-badge { background: #6a4fa0; color: #fff; }
.photographer-badge.badge-text, .legend-swatch.photographer-badge { background: #c2185b; color: #fff; }
.legend-swatch.personality-badge { background: #d4a017; color: #14161a; }
.legend-swatch.certified-badge { background: var(--accent); color: var(--accent-ink); }
.legend-swatch.plus-badge { background: linear-gradient(135deg, #c8261f, #e8892a); color: #fff; }
.legend-swatch.team-pro-badge { background: #1d7fd6; color: #fff; }
.plus-badge.badge-text { font-size: 0.62rem; padding: 0.12rem 0.38rem; line-height: 1.2; border-radius: 4px; }
.legend-swatch.certified-badge, .legend-swatch.personality-badge, .legend-swatch.team-pro-badge { width: 1.5rem; height: 1.5rem; min-width: 1.5rem; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; line-height: 1; }
/* Agrandir sa photo / sa bannière : Recadrer, Changer. */
.photo-zoom.has-actions img { max-height: calc(100% - 9rem); }
.photo-zoom:not(.is-wide).has-actions img { max-width: min(80vw, 420px); border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.photo-zoom.is-wide img { width: min(96vw, 900px); border-radius: 10px; }
.photo-zoom-actions { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem); display: flex; gap: 0.6rem; justify-content: center; padding: 0 1rem; }
.photo-zoom-actions button { width: auto; min-width: 8rem; }
.photo-zoom-actions .ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }
.photo-zoom-close { display: grid; place-items: center; padding: 0; min-width: 0; line-height: 1; }
.ph-cover[data-own-cover] { cursor: pointer; }
/* Stories : vidéo et J'aime. */
.story-photo video { max-width: 100%; max-height: 70vh; border-radius: 14px; display: block; margin: 0 auto; background: #000; }
.story-like { position: absolute; left: 1rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem); z-index: 3; width: 3rem; height: 3rem; min-width: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,0.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.story-like.on { color: #ff4d5e; background: rgba(255,255,255,0.24); }
.story-likes { position: absolute; left: 1rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.4rem); z-index: 3; display: inline-flex; align-items: center; gap: 0.4rem; color: #fff; font-size: 0.85rem; font-weight: 600; }
.story-likes svg { color: #ff4d5e; fill: currentColor; }
.story-prep { color: #fff; text-align: center; margin-top: 40vh; font-weight: 600; }
/* Adhérent d'un Team PRO : bleu, famille PRO. */
.friend-role-badge.adherent-badge, .legend-swatch.adherent-badge { color: #1d7fd6; background: color-mix(in srgb, #1d7fd6 16%, var(--surface)); }
/* Réagir : discret dans le fil, même une fois cliqué. */
.reaction-btn.active { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent); }
/* Sondage : texte lisible sur le fond des options. */
.poll-option-btn { color: var(--text); }
.poll-option-btn .poll-option-label { font-weight: 600; }
/* Story : le nom de l'auteur mène à son profil. */
.story-head .story-author { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; width: auto; min-width: 0; }
/* Menu Bannière */
.banner-sheet-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 1; margin-bottom: 0.6rem; background: var(--surface-alt); }
.banner-sheet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-sheet-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.banner-sheet-actions button { width: auto; flex: 1; }
.look-hint { margin: 0.2rem 0 0.6rem; }
.story-prep-preview { display: flex; justify-content: center; margin-top: 12vh; }
.story-prep-canvas { max-width: 70vw; max-height: 45vh; border-radius: 12px; background: #000; }
.story-prep-preview + .story-prep { margin-top: 1rem; }
/* Publication : image entière sous le texte, plein écran au toucher. */
.wall-post-media { position: relative; margin-top: 0.6rem; border-radius: 10px; overflow: hidden; background: var(--surface-alt); display: flex; justify-content: center; cursor: zoom-in; }
.wall-post-media .wall-post-photo, .wall-post-media .wall-post-photo.side { float: none; display: block; width: auto; max-width: 100%; max-height: 560px; margin: 0; border: 0; border-radius: 0; object-fit: contain; }
.wall-post-media.is-video { cursor: pointer; }
.wall-post-play { position: absolute; inset: 0; margin: auto; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; display: grid; place-items: center; pointer-events: none; }
.wall-post-video { width: 100%; max-height: 560px; background: #000; display: block; }
.mention-link { display: inline; width: auto; min-width: 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.mention-wrap { position: relative; }
.mention-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 0.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); overflow: hidden; }
.mention-opt { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0.7rem; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.mention-opt:last-child { border-bottom: 0; }
.mention-opt:hover { background: var(--surface-alt); }
.mention-opt .mini-avatar { width: 28px; height: 28px; font-size: 0.8rem; }
.mention-opt .help-text { margin-left: auto; }
.story-mine-foot { position: absolute; left: 1rem; right: 1rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem); z-index: 3; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; color: #fff; font-size: 0.85rem; font-weight: 600; }
.story-mine-foot .story-likes { position: static; }
.story-views { display: inline-flex; align-items: center; gap: 0.35rem; }
.story-to-feed { margin-left: auto; width: auto; min-width: 0; padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.12); color: #fff; font-weight: 700; font-size: 0.82rem; cursor: pointer; }
.story-infeed { margin-left: auto; opacity: 0.8; }
.story-feed-opt { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 600; margin: 0.4rem 0 0.2rem; }
.story-feed-opt input { width: auto; }
.story-as-opt select { width: auto; flex: 1; min-width: 0; padding: 0.35rem 0.5rem; font: inherit; }
.story-head .story-as { margin-left: 0.4rem; font-weight: 600; opacity: 0.75; font-size: 0.78rem; }
.story-bubble.team-story .mini-avatar { border-radius: 0.6rem; }
/* PC : la colonne de contenu part juste après la barre de gauche (plus
   de vide à gauche), plus large ; la colonne de droite la suit. */
@media (min-width: 960px) {
  :root { --content-w: calc(100vw - var(--sidebar-w) - 4.4rem); }
  .wrap { padding-left: 2.2rem; padding-right: max(2.2rem, calc(100vw - var(--sidebar-w) - var(--content-w) - 2.2rem)); }
}
@media (min-width: 1280px) {
  :root { --rail-w: 320px; --content-w: calc(100vw - var(--sidebar-w) - var(--rail-w) - 7.5rem); }
  .side-rail { right: 2rem; left: auto !important; }
  .wrap { padding-left: 2.5rem; padding-right: calc(100vw - var(--sidebar-w) - 2.5rem - var(--content-w)); }
  .side-rail { left: calc(var(--sidebar-w) + 2.5rem + var(--content-w) + 3rem); width: var(--rail-w); }
}
/* Grille de rappels (colonne de droite) */
.rail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem; }
.rail-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-width: 0; width: 100%; }
.rail-tile .outing-thumb { width: 36px; height: 36px; }
.rail-tile strong { font-size: 0.88rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-tile .help-text { font-size: 0.75rem; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-tile .feed-upcoming-j { font-size: 0.78rem; }
.rail-faces { display: flex; margin-top: 0.15rem; }
.rail-faces .mini-avatar { width: 20px; height: 20px; font-size: 0.6rem; margin-right: -5px; border: 2px solid var(--surface); }
/* Story active : cercle rouge autour de la photo (gris une fois vue). */
.mini-avatar.has-story { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); cursor: pointer; }
.mini-avatar.has-story.story-seen { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--border); }
.story-ring .mini-avatar.has-story { box-shadow: none; }
.like-burst { position: absolute; z-index: 5; color: #ff4d5e; transform: translate(-50%, -50%) scale(0.4); opacity: 0; pointer-events: none; animation: like-burst 0.7s ease-out forwards; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25)); }
@keyframes like-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
/* Réagir, Commenter, Republier : taille fixe, en bas du post. */
.feed-entry-foot.social-row { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.feed-entry-foot.social-row > *, .feed-entry-foot.social-row .reaction-bar, .feed-entry-foot.social-row .reaction-btn, .feed-entry-foot.social-row > button, .feed-entry-foot.social-row .comment-toggle { flex: 0 0 auto; width: auto; min-width: 0; }
.feed-entry-foot.social-row .reaction-btn, .feed-entry-foot.social-row > button.ghost, .feed-entry-foot.social-row .comment-toggle { padding: 0.32rem 0.85rem; font-size: 0.84rem; }
.feed-entry-foot.social-row .post-trash { order: 9; margin-left: auto; width: 2.2rem; height: 2.2rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--danger, #c8261f); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.feed-entry-foot.social-row .post-trash:hover { background: color-mix(in srgb, #c8261f 12%, transparent); }
/* Carte : dessin libre / repères, deux icônes en haut au centre. */
.map-mode-switch { position: sticky; top: 0.4rem; z-index: 6; display: flex; gap: 0.3rem; justify-content: center; width: max-content; margin: 0.2rem auto 0.4rem; padding: 0.25rem; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.map-mode-switch button { width: 2.6rem; height: 2.6rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--text-muted); opacity: 0.75; cursor: pointer; }
.map-mode-switch button.on { background: var(--accent); color: var(--accent-ink); opacity: 1; }
#annot-overlay .map-mode-switch { position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 0.5rem); transform: translateX(-50%); margin: 0; z-index: 20; }
/* PC : le plan agrandi tient dans l'écran (marges, pas de défilement). */
@media (min-width: 960px) {
  .track-notes-scroll { max-height: none; overflow: visible; display: flex; justify-content: center; background: #fff; }
  .track-notes-map, .track-notes-map.zoomed { width: auto; display: inline-block; }
  .track-notes-map img { width: auto; max-width: min(100%, 900px); max-height: calc(100vh - 260px); }
  .track-notes-map img { height: min(56vh, 520px); }
  .track-notes-map.zoomed img { height: calc(100vh - 190px); max-height: none; max-width: 100%; }
  .track-notes-overlay { padding-left: 2rem; padding-right: 2rem; }
}
.share-elsewhere-opt { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-weight: 600; } .share-elsewhere-opt input { width: auto; }
/* Messagerie privée */
.dm-top { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.dm-top .primary { width: auto; }
.dm-convs { padding: 0.3rem; }
.dm-conv { display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.65rem 0.6rem; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; border-radius: 0; }
.dm-conv:last-child { border-bottom: 0; }
.dm-conv:hover { background: var(--surface-alt); }
.dm-conv .mini-avatar { width: 44px; height: 44px; flex: none; }
.dm-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-conv-main .help-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conv.unread .dm-conv-main strong, .dm-conv.unread .dm-conv-main .help-text { color: var(--text); font-weight: 700; }
.dm-conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; flex: none; }
.dm-time { font-size: 0.72rem; color: var(--text-muted); }
.dm-unread { min-width: 1.3rem; height: 1.3rem; padding: 0 0.3rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 800; display: grid; place-items: center; }
.dm-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dm-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
.dm-back-btn { width: 2.2rem; height: 2.2rem; min-width: 0; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.3rem; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.dm-who { display: flex; align-items: center; gap: 0.6rem; border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; width: auto; }
.dm-list { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 0.8rem; max-height: 60vh; min-height: 12rem; overflow-y: auto; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble { padding: 0.5rem 0.8rem; border-radius: 16px 16px 16px 4px; background: var(--surface-alt); white-space: pre-wrap; word-break: break-word; }
.dm-msg.mine .dm-bubble { background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
.dm-msg.mine .dm-bubble .mention-link { color: inherit; text-decoration: underline; }
.dm-sig { font-size: 0.72rem; font-weight: 600; opacity: 0.7; margin: 0 0.4rem 0.15rem; }
.dm-via { font-weight: 500; opacity: 0.7; font-size: 0.78rem; margin-left: 0.3rem; }
.dm-as { text-align: center; margin: 0.3rem 0 0; font-size: 0.8rem; }
.dm-bubble[data-dm-react] { cursor: pointer; }
.dm-react-picker { display: flex; gap: 0.15rem; padding: 0.25rem 0.4rem; margin-bottom: 0.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,0.15); }
.dm-react-picker button { background: none; border: 0; padding: 0.2rem 0.3rem; font-size: 1.35rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.dm-react-picker button:hover { background: var(--bg); }
.dm-reacts { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: -0.4rem; position: relative; z-index: 1; }
.dm-react { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.85rem; line-height: 1.4; color: var(--text); cursor: pointer; }
.dm-react.on { border-color: var(--accent); }
.dm-empty, .dm-closed { padding: 0.8rem; text-align: center; }
.dm-form { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.6rem 0.8rem; border-top: 1px solid var(--border); }
.dm-form textarea { flex: 1; min-height: 2.6rem; max-height: 8rem; resize: vertical; margin: 0; }
.dm-form .primary { width: auto; flex: none; }
.dm-pick-list { max-height: 50vh; overflow-y: auto; margin-top: 0.5rem; border: 1px solid var(--border); border-radius: 12px; }
.bottom-nav-icon { position: relative; }
.nav-dm-badge { position: absolute; top: -4px; right: -8px; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.62rem; font-weight: 800; display: grid; place-items: center; line-height: 1; }
/* Clavier ouvert (téléphone) : pas de barre du bas par-dessus. */
html.kb-open .bottom-nav { display: none !important; }
html.kb-open .wrap { padding-bottom: 1rem; }
/* Conversation : champ à 16 px (pas de zoom iOS), hauteur adaptée à l'écran. */
.dm-form textarea { font-size: 16px; }
@media (max-width: 959px) {
  .dm-list { max-height: calc(100dvh - 19rem); min-height: 9rem; }
  html.kb-open .dm-list { max-height: calc(100dvh - 22rem); }
}
.comp-other-row { display: flex; align-items: center; gap: 0.6rem; }
.comp-other-open { flex: 1; display: flex; align-items: center; gap: 0.7rem; min-width: 0; border: 0; background: none; padding: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.comp-other-row > .ghost { flex: none; width: auto; }
/* Conversation : l'en-tête (retour + nom) reste en haut pendant le défilement. */
.dm-thread { overflow: visible; }
.dm-head { position: sticky; top: calc(var(--header-h, 64px) + var(--subnav-h, 0px) + var(--subnav-gap, 0px) - 2px); z-index: 5; background: var(--surface); border-radius: 16px 16px 0 0; }
@media (min-width: 960px) { .dm-head { top: 0; } }
.dm-list { max-height: none; overflow: visible; }
@media (max-width: 959px) { .dm-list, html.kb-open .dm-list { max-height: none; } }
.dm-form { position: sticky; bottom: var(--nav-h, 74px); z-index: 5; background: var(--surface); border-radius: 0 0 16px 16px; }
html.kb-open .dm-form, .dm-form:focus-within { bottom: 0; }
@media (min-width: 960px) { .dm-form { bottom: 0; } }
/* Rien ne doit apparaître au-dessus de l'en-tête ni sous la saisie quand
   les messages défilent : on masque les bords avec le fond de la page. */
.dm-head { margin-top: -1px; }
.dm-head::before { content: ''; position: absolute; left: -2px; right: -2px; bottom: 100%; height: 1.2rem; background: var(--bg); pointer-events: none; }
.dm-form::after { content: ''; position: absolute; left: -2px; right: -2px; top: 100%; height: 1.2rem; background: var(--bg); pointer-events: none; }
.dm-head, .dm-form { box-shadow: 0 0 0 1px var(--border); }
.dm-head { border-radius: 0; }
.dm-form { border-radius: 0; }
/* Téléphone : les onglets (Profil, Fil, Messages, Teams / Roulages,
   Circuits…) restent fixés sous l'en-tête pendant le défilement. */
@media (max-width: 959px) {
  .subnav.main-subnav { position: sticky; top: calc(var(--header-h, 64px) - 1px); z-index: 8;
    /* Masque les côtés seulement (pas au-dessus : le titre de la page reste entier). */
    box-shadow: 0 0 0 1rem var(--bg); clip-path: inset(-1px -1rem calc(-1 * var(--subnav-gap, 0.5rem)) -1rem); }
  :root { --subnav-gap: 0.5rem; }
  .subnav.main-subnav::after { content: ''; position: absolute; left: -1rem; right: -1rem; top: 100%; height: var(--subnav-gap); background: var(--bg); pointer-events: none; }
}
/* Actions d'un post : tout à gauche (Réagir, Commenter, Republier), seule
   la corbeille à droite. Même rendu partout, avec ou sans photo. */
.feed-entry-foot.social-row, .social-row { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0.45rem; }
.social-row > *, .social-row .reaction-bar, .social-row .reaction-bar .reaction-btn { grid-column: auto; order: 0; flex: 0 0 auto; width: auto !important; margin-left: 0; }
.social-row .repost-count:empty { display: none; }
.feed-entry-foot.social-row .reaction-bar { margin-right: 0; }
.social-row .post-trash { order: 9; margin-left: auto !important; }
.social-row .post-edit-links { order: 9; margin-left: auto; }
.wall-post-head .feed-entry-time { margin-left: auto; }
.post-share { width: 2.1rem; height: 2.1rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-muted); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.post-share:hover { background: var(--surface-alt); color: var(--text); }
.share-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.4rem 0 0.6rem; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.6rem 0.3rem; border: 1px solid var(--border); border-radius: 0.8rem; background: var(--surface); color: var(--text); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.share-opt .brand-logo { width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; display: grid; place-items: center; }
.post-flash { animation: post-flash 1.6s ease-out; }
@keyframes post-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }
/* PC : bannière plus grande (format 3:1, comme sur les autres réseaux). */
@media (min-width: 960px) {
  .person-hero:not([data-cover="none"]) .ph-cover { height: auto; aspect-ratio: 3 / 1; max-height: none; min-height: 180px; }
}
/* Commentaires façon TikTok : cœur à droite, réponses en retrait. */
.post-comment-main { flex: 1; min-width: 0; }
.post-comment-bubble { display: inline-block; max-width: 100%; }
.post-comment-to { color: var(--accent); font-weight: 600; }
.post-comment-time .link-btn[data-action="reply-comment"] { font-weight: 700; text-decoration: none; }
.comment-like { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.05rem; min-width: 2rem; padding: 0.2rem 0; border: 0; background: none; color: var(--text-muted); font-size: 0.72rem; cursor: pointer; }
.comment-like.on { color: #ff3b5c; }
.post-comment-replies { margin-left: 2.25rem; display: flex; flex-direction: column; gap: 0.45rem; }
.post-comment.is-reply .mini-avatar { width: 1.5rem; height: 1.5rem; font-size: 0.7rem; }
.comment-replies-toggle { align-self: flex-start; margin-left: 2.25rem; font-size: 0.8rem; color: var(--text-muted); text-decoration: none; font-weight: 600; }
.post-comment-replies .comment-replies-toggle { margin-left: 0; }
.comment-reply-chip { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--text-muted); background: var(--surface-alt); border-radius: 999px; padding: 0.2rem 0.4rem 0.2rem 0.8rem; align-self: flex-start; }
.comment-reply-chip .link-btn { text-decoration: none; padding: 0 0.3rem; }
.post-comment-time .link-btn { display: inline; width: auto; min-width: 0; padding: 0; margin: 0; background: none; border: 0; }
.comment-replies-toggle { width: auto; text-align: left; padding: 0; background: none; border: 0; }
/* Plan & repères : choix dessin / repères dès l'arrivée ; sur grand écran,
   les repères à droite de la carte. */
.map-open-choice { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.7rem; }
.map-open-choice button { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px; padding: 0.45rem 0.95rem; font-size: 0.88rem; font-weight: 700; color: var(--text); }
@media (min-width: 960px) {
  .circuit-plan-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
}
@media (min-width: 1500px) {
  .circuit-plan-wrap { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
  .circuit-plan-wrap > .circuit-plan-map > .card, .circuit-plan-wrap > .circuit-plan-notes { margin-top: 0; }
  .circuit-plan-notes { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
}
.circuit-picker { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.circuit-picker select { flex: 1 1 14rem; min-width: 0; max-width: 30rem; }
.lap-video-link { margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.9rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.86rem; text-decoration: none; white-space: nowrap; }
.team-create-top { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 0.8rem; }
.team-create-top button { border-radius: 999px; padding: 0.5rem 1.1rem; font-weight: 700; }
.team-sec-title { margin: 1.2rem 0 0.6rem; }
/* Réponse à un commentaire : même boîte, « @Nom » grisé devant le texte. */
.comment-input-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.3rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-alt); padding: 0 0.4rem 0 0.3rem; }
.comment-input-wrap:focus-within { border-color: var(--accent); }
.comment-input-wrap input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0.5rem 0.4rem; }
.comment-reply-tag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.15rem; color: var(--text-muted); background: color-mix(in srgb, var(--text-muted) 14%, transparent); border-radius: 999px; padding: 0.15rem 0.2rem 0.15rem 0.55rem; font-size: 0.85rem; font-weight: 600; }
.comment-reply-tag button { border: 0; background: none; color: inherit; padding: 0 0.25rem; min-width: 0; font-size: 0.75rem; cursor: pointer; }

/* PC : la colonne de droite grandit avec l'écran (grille À venir comprise). */
@media (min-width: 1280px) {
  :root { --rail-w: clamp(320px, 24vw, 480px); }
}
@media (min-width: 1700px) {
  .rail-tile .outing-thumb { width: 44px; height: 44px; }
  .rail-tile strong { font-size: 0.95rem; }
}
.after-publish { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.after-publish button { border-radius: 999px; padding: 0.5rem 1.2rem; font-weight: 700; }
.after-publish .link-btn { margin-left: auto; }
/* Pneus */
.pneus-chip { display: inline-flex; align-items: center; gap: 0.3rem; height: 2.1rem; padding: 0 0.7rem 0 0.55rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 800; font-size: 0.88rem; cursor: pointer; position: relative; min-width: 0; }
.pneus-chip .tyre-ico { color: var(--text); }
.pneus-chip.can-collect { border-color: var(--accent); }
.pneus-chip.can-collect::before { content: ''; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.pneus-chip.gain::after { content: attr(data-gain); position: absolute; left: 50%; top: -0.2rem; transform: translate(-50%, 0); color: var(--accent); font-size: 0.78rem; font-weight: 800; animation: pneus-gain 1.2s ease-out forwards; pointer-events: none; }
@keyframes pneus-gain { 0% { opacity: 0; transform: translate(-50%, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -1.2rem); } }
.header-controls .pneus-chip { margin-right: 0.15rem; }
.rail-pneus { margin: -0.3rem 0 1rem; }
.pneus-sheet { max-width: 30rem; }
.pneus-total { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.pneus-total .tyre-ico { width: 30px; height: 30px; }
.pneus-total b { font-family: var(--font-display); font-style: italic; font-size: 2rem; line-height: 1; }
.pneus-total .help-text { flex-basis: 100%; }
.pneus-cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.pneus-cal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.3rem; }
.pneus-day { border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.3rem 0.1rem; text-align: center; background: var(--surface); display: flex; flex-direction: column; gap: 0.05rem; }
.pneus-day span { font-size: 0.68rem; color: var(--text-muted); }
.pneus-day b { font-size: 0.82rem; }
.pneus-day.big { border-width: 2px; }
.pneus-day.done { background: var(--surface-alt); opacity: 0.6; }
.pneus-day.done b { text-decoration: line-through; }
.pneus-day.today { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pneus-collect { width: 100%; margin-top: 0.7rem; border-radius: 999px; padding: 0.7rem; font-weight: 800; }
.pneus-how { margin-top: 0.8rem; font-size: 0.86rem; }
.pneus-how ul { margin: 0.4rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.pneus-board { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.3rem; }
.pneus-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.4rem; border-radius: 0.6rem; }
.pneus-row.me { background: var(--surface-alt); }
.pneus-rank { width: 1.2rem; text-align: center; font-weight: 800; color: var(--text-muted); }
.pneus-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .header-controls .pneus-chip { padding: 0 0.5rem 0 0.4rem; font-size: 0.8rem; } }
.mini-sheet.pneus-sheet { max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
/* Amis à la suite des stories : pastille de présence. */
.presence-ring { position: relative; }
.friend-bubble .story-ring { background: none; box-shadow: none; }
.presence-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--bg); background: #9aa0a6; }
.presence-dot.on { background: #22c55e; }
.presence-dot.recent { background: #f59e0b; }
/* Ajoute des amis (repliable) */
.fsug { padding: 0.6rem 0.8rem; }
.fsug-head { width: 100%; display: flex; align-items: center; gap: 0.6rem; background: none; border: 0; padding: 0.2rem 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.fsug-head .help-text { flex: 1; }
.fsug-chev { font-size: 0.9rem; color: var(--text-muted); }
.fsug-row { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.6rem 0 0.2rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.fsug-card { position: relative; flex: 0 0 9.5rem; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.8rem 0.5rem 0.6rem; border: 1px solid var(--border); border-radius: 0.9rem; background: var(--surface); text-align: center; }
.fsug-who { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; font: inherit; min-width: 0; width: 100%; }
.fsug-who .mini-avatar { width: 3.6rem; height: 3.6rem; font-size: 1.3rem; }
.fsug-who strong, .fsug-card > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.fsug-who .help-text, .fsug-card > .help-text { font-size: 0.75rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsug-add { width: 100%; border-radius: 999px; padding: 0.4rem 0.6rem; font-size: 0.82rem; font-weight: 700; margin-top: auto; }
.fsug-x { position: absolute; top: 0.25rem; right: 0.3rem; border: 0; background: none; color: var(--text-muted); font-size: 0.75rem; cursor: pointer; padding: 0.2rem; min-width: 0; }
.fsug-invite-ico { width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); color: var(--text); }
.fsug-req-count { color: var(--accent); font-weight: 700; }
.fsug-request { border-color: var(--accent); }
.fsug-req-acts { display: flex; gap: 0.3rem; width: 100%; margin-top: auto; }
.fsug-req-acts .fsug-add { flex: 1; }
.fsug-no { flex: 0 0 auto; border-radius: 999px; padding: 0.4rem 0.6rem; min-width: 0; }
.pneus-cal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pneus-why { background: var(--surface-alt); border-radius: 0.8rem; padding: 0.6rem 0.8rem; margin: 0 0 0.8rem; font-size: 0.86rem; }
.pneus-why p { margin: 0.25rem 0 0; line-height: 1.4; }
.pneus-fly { position: fixed; z-index: 9999; pointer-events: none; display: flex; align-items: center; gap: 0.2rem; padding: 0.25rem 0.55rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.85rem; box-shadow: 0 6px 18px rgba(0,0,0,0.25); transform: translate(-50%, -50%); }
.pneus-fly .tyre-ico { color: inherit; width: 16px; height: 16px; }
/* PC : un seul compteur, dans la colonne de droite. */
@media (min-width: 1280px) { .header-controls .pneus-chip { display: none; } }
.rail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.rail-pager { display: inline-flex; align-items: center; gap: 0.25rem; }
.rail-pager .help-text { font-size: 0.72rem; }
.rail-arrow { width: 1.6rem; height: 1.6rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--accent); font-size: 1.25rem; font-weight: 800; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.rail-arrow:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rail-arrow:disabled { opacity: 0.3; cursor: default; }
.rail-ad { position: relative; }
.rail-ad-tag { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.3rem; }
.rail-ad-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; min-height: 250px; padding: 1rem; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-alt); text-align: center; }
/* Dessin / Repères ouverts depuis Plan & repères : dans la page, sous
   l'en-tête et au-dessus du menu, pour passer de l'un à l'autre vite. */
.annot-overlay.map-docked:not(.force-landscape), .track-notes-overlay.map-docked {
  top: calc(var(--header-h, 64px) - 1px); bottom: var(--nav-h, 64px); left: 0; right: 0; z-index: 25; padding-top: 0;
}
@media (min-width: 960px) {
  .annot-overlay.map-docked:not(.force-landscape), .track-notes-overlay.map-docked { top: 0; bottom: 0; left: var(--sidebar-w); right: 0; z-index: 25; }
}
@media (min-width: 1280px) {
  .annot-overlay.map-docked:not(.force-landscape), .track-notes-overlay.map-docked { right: calc(var(--rail-w) + 2rem); }
}
@media (min-width: 960px) { .track-notes-overlay.map-docked { padding-top: 1rem; } .annot-overlay.map-docked:not(.force-landscape) { padding-top: 0.6rem; } }
.fav-circ-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.fav-circ-row .outing-thumb { width: 34px; height: 34px; flex: 0 0 auto; }
.fav-circ-row strong { flex: 1 1 auto; min-width: 0; overflow-wrap: normal; }
.fav-circ-row .link-btn { text-decoration: none; padding: 0.2rem 0.4rem; flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }
.fav-circ-add { margin-top: 0.45rem; }
.fav-circ-add input { width: 100%; }
.post-place-row { display: flex; gap: 0.4rem; }
.post-place-row input { flex: 1; min-width: 0; }
.post-place-row button { flex: 0 0 auto; border-radius: 999px; }
.post-place { display: inline-flex; align-items: center; gap: 0.25rem; margin: 0.15rem 0 0.35rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.post-place:hover { color: var(--accent); text-decoration: underline; }
.circuit-create-btn { flex: 0 0 auto; border-radius: 999px; padding: 0.45rem 0.9rem; font-weight: 700; color: var(--text); }
.annot-overlay.map-docked .map-mode-switch { position: static; transform: none; margin: 0.4rem auto 0.2rem; }
.fsug-top { display: flex; align-items: center; gap: 0.5rem; }
.fsug-top .fsug-head { flex: 1; cursor: default; }
.fsug-close { width: 2rem; height: 2rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--text-muted); cursor: pointer; display: grid; place-items: center; font-size: 0.85rem; }
.notes-copy-btn { margin: 0.2rem 0 0.4rem; border-radius: 999px; padding: 0.4rem 0.9rem; font-weight: 700; color: var(--text); }
.cf-incident { width: 100%; margin-top: 0.5rem; border-radius: 999px; font-weight: 700; color: var(--text); }
.cf-incident.on { border-color: var(--accent); color: var(--accent); }
.incident-types { margin: 0.2rem 0 0.4rem; }
.incident-map { position: relative; background: #fff; border-radius: 0.6rem; overflow: hidden; cursor: crosshair; }
.incident-map img { display: block; width: 100%; height: auto; }
.incident-x { position: absolute; width: 28px; height: 28px; transform: translate(-50%, -50%); pointer-events: none; }
.incident-x::before, .incident-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 5px; border-radius: 3px; background: #c8261f; box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%) rotate(45deg); }
.incident-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.incident-chip { display: inline-flex; align-items: center; margin-right: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: color-mix(in srgb, #c8261f 14%, transparent); color: #c8261f; font-size: 0.75rem; font-weight: 700; }
/* Passés : par circuit, puis par date */
.outing-search { display: flex; gap: 0.4rem; margin: 0 0 0.6rem; }
.outing-search input { flex: 1; min-width: 0; }
.outing-search button { flex: 0 0 auto; border-radius: 999px; font-weight: 700; }
.outing-search button.on { border-color: var(--accent); color: var(--accent); }
.outing-group { border-bottom: 1px solid var(--border); }
.outing-group:last-child { border-bottom: 0; }
.outing-group-head { width: 100%; display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.outing-group-chev { margin-left: 0.5rem; color: var(--text-muted); font-size: 0.85rem; }
.outing-group-body { padding: 0 0 0.4rem 1.2rem; border-left: 2px solid var(--surface-alt); margin-left: 1.1rem; }
.outing-row-wrap { display: flex; align-items: center; gap: 0.3rem; }
.outing-row-wrap > .outing-row { flex: 1; min-width: 0; }
.outing-album { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.spot-pin { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; background: #2563eb; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); pointer-events: none; }
.spot-pin.pro { background: #14161a; }
.spot-pin.new { background: var(--accent); }
.spot-pin.static { position: static; transform: none; flex: 0 0 auto; }
.spots-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.7rem; }
.spot-row { display: flex; align-items: center; gap: 0.6rem; }
.spot-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.spot-access { font-size: 0.75rem; color: #2563eb; font-weight: 600; }
.spot-access.pro { color: var(--text-muted); }
.spot-add { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.6rem; }
.reaction-picker:has(.reaction-who) { flex-wrap: wrap; border-radius: 14px; max-width: min(20rem, 86vw); }
.reaction-who { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.35rem 0.3rem 0.1rem; border-top: 1px solid var(--border); margin-top: 0.2rem; font-size: 0.8rem; color: var(--text-muted); max-height: 8rem; overflow-y: auto; }
.reaction-who b { font-weight: 400; margin-right: 0.2rem; }
.qr-oneline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sheet { position: relative; }
.mini-sheet-x { position: absolute; top: 0.6rem; right: 0.6rem; width: 2rem; height: 2rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--text-muted); font-size: 0.9rem; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.mini-sheet > .section-title:first-of-type { padding-right: 2.4rem; }
.pneus-more { display: block; margin: 0.2rem auto 0; font-size: 1.3rem; text-decoration: none; letter-spacing: 0.1em; }
.compte-switch { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding-bottom: 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.visited-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.visited-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; font: inherit; }
.visited-tile .outing-thumb { width: 44px; height: 44px; }
.visited-tile-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.visited-evs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.visited-ev { font: inherit; font-size: 0.78rem; padding: 0.2rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); cursor: pointer; }
.visited-ev:hover { border-color: var(--accent, #c8261f); }
/* Budget : monnaie dans la case, lignes plus longues sur PC, montants masquables */
.money-in { position: relative; display: block; }
.money-in input { width: 100%; padding-right: 1.8rem !important; text-align: right; }
.money-in i { position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-muted); pointer-events: none; font-size: 0.9rem; }
.budget-line { flex-wrap: wrap; }
.budget-line .money-in { flex: 0 0 7.5rem; }
.budget-line-cat { flex: 0 0 auto; max-width: 8.5rem; }
.budget-line-more { flex-basis: 100%; font-size: 0.82rem; margin: 0.1rem 0 0.3rem; }
.budget-line-more summary { color: var(--text-muted); cursor: pointer; }
.budget-line-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.4rem; margin-top: 0.35rem; }
.budget-line-extra label { display: flex; flex-direction: column; gap: 0.15rem; }
.budget-line-extra span { font-size: 0.75rem; color: var(--text-muted); }
@media (min-width: 960px) { .budget-line .money-in { flex-basis: 10rem; } .budget-row .setup-field .money-in { min-width: 9rem; } }
.budget-hero { position: relative; }
.budget-hide-btn { position: absolute; top: 0.8rem; right: 0.8rem; width: 2.2rem; height: 2.2rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,0.18); color: inherit; display: grid; place-items: center; cursor: pointer; z-index: 2; }
body.budget-masked .ph-feature-time, body.budget-masked .budget-kpis strong, body.budget-masked .budget-legend strong, body.budget-masked .budget-row-total, body.budget-masked .budget-progress-legend, body.budget-masked [data-yextra], body.budget-masked .ph-feature-s, body.budget-masked .money-in input { filter: blur(7px); user-select: none; }
.bk-rc { background: #6b7280; } .bk-fuel { background: #f59e0b; } .bk-coaching { background: #2563eb; } .bk-rental { background: #8b5cf6; } .bk-photos { background: #ec4899; } .bk-meals { background: #10b981; }
.auth-referral { margin: 0 0 0.8rem; padding: 0.55rem 0.8rem; border-radius: 0.7rem; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 0.9rem; }
/* Circuit du moment : texte à gauche, tracé à droite, boutons en bas (comme les autres posts). */
.card.feed-moment { display: flex !important; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem 0.8rem; }
.card.feed-moment > .feed-ride-main { flex: 1 1 0; min-width: 0; order: 0; }
.card.feed-moment > .outing-thumb { order: 1; flex: 0 0 auto; float: none !important; margin: 0 !important; }
.card.feed-moment > :not(.feed-ride-main):not(.outing-thumb) { flex-basis: 100%; order: 2; }
.post-aud-btn { border: 1px solid var(--border); background: none; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); cursor: pointer; min-width: 0; }
.garage-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; }
.garage-head .outing-label { flex-basis: 100%; }
.garage-bike { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; flex: 1; }
.garage-num { color: var(--accent); }
.day-bike-tyre { display: flex; flex-direction: column; gap: 0.1rem; padding-bottom: 0.6rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.podium-scope { display: flex; gap: 0.4rem; margin: 0 0 0.7rem; }
.podium-scope button { border-radius: 999px; padding: 0.4rem 1rem; font-weight: 700; }
.global-podium { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }
.global-podium-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.4rem; border-radius: 0.6rem; }
.global-podium-row.me { background: var(--surface-alt); }
.orga-ev-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.orga-ev-row:last-child { border-bottom: 0; }
.orga-ev-row .outing-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.orga-ev-row button { border-radius: 999px; }
.spot-fav { font-size: 1.2rem; text-decoration: none; color: var(--text-muted); } .spot-fav.on { color: #f59e0b; }
.look-sw.locked { opacity: 0.45; cursor: not-allowed; display: grid; place-items: center; color: #fff; }
.look-seg button.locked { opacity: 0.55; cursor: not-allowed; display: inline-flex; align-items: center; gap: 0.25rem; }
.person-hero[data-cover="carbone"] .ph-cover { background-color: #1b1e23; background-image: linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.06) 75%), linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.06) 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; box-shadow: inset 0 -40px 60px -30px var(--sig); }
/* Plan & repères mobile : les 4 boutons sur une ligne ; Dessin / Repères
   couvrent tout jusqu'en bas (le menu passe par-dessus), astuce visible. */
@media (max-width: 959px) {
  .map-open-choice { flex-wrap: nowrap; gap: 0.35rem; }
  .map-open-choice button, .map-open-choice .lap-video-link { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0.45rem 0.4rem; font-size: 0.8rem; gap: 0.25rem; white-space: nowrap; }
  .map-open-choice .lap-video-link { margin-left: 0; }
  .annot-overlay.map-docked:not(.force-landscape), .track-notes-overlay.map-docked { bottom: 0; padding-bottom: calc(var(--nav-h, 64px) + 1rem); background: var(--bg); }
}
@media (max-width: 380px) { .map-open-choice svg { display: none; } }
#annot-overlay.map-docked .map-mode-switch { position: static; left: auto; top: auto; transform: none; margin: 0.4rem auto 0.2rem; }
/* Story active : anneau doré bien visible (le rouge se confondait avec la charte). */
.story-ring { background: conic-gradient(from 200deg, #ffb703, #fb8500, #c8261f, #fb8500, #ffb703); padding: 3.5px; }
.story-bubble.seen .story-ring { background: var(--border); padding: 2px; }
.mini-avatar.has-story { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #fb8500; }
.outing-row-wrap > .album-chip { flex: 0 0 auto; padding: 0.45rem 0.6rem; }
.album-chip { display: inline-flex; align-items: center; gap: 0.25rem; min-width: 0; padding: 0.2rem 0.5rem; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 800; font-size: 0.8rem; text-decoration: none; cursor: pointer; }
.album-sheet-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.album-sheet-row svg { color: var(--accent); }
.comp-carnet-title { margin: 0 0 0.6rem; }
.post-extra-chips { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.post-extra-chip { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.post-extra-chip.on { border-color: var(--accent); color: var(--accent); }
/* Lien vidéo dans un post : lecteur intégré. */
.link-player { position: relative; margin: 0.5rem 0; border-radius: 12px; overflow: hidden; background: #14161a; aspect-ratio: 16 / 9; }
.link-player.tall { aspect-ratio: 9 / 16; max-height: 70vh; margin-inline: auto; }
.link-player-face { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: #14161a; cursor: pointer; display: block; }
.link-player-face img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.link-player-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #c8261f; color: #fff; box-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.link-player-host { position: absolute; left: 0.6rem; bottom: 0.5rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.75rem; font-weight: 700; }
.link-player-out { position: absolute; right: 0.5rem; top: 0.5rem; z-index: 2; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.link-player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.link-player:has(iframe) .link-player-out { display: none; }
.dm-app-av { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #fff; }
.dm-welcome { white-space: pre-line; }
/* Discussion d'un roulage */
.mini-sheet.ev-chat-sheet { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); }
.ev-chat-list { flex: 1 1 auto; min-height: 12rem; max-height: 55dvh; overflow-y: auto; margin: 0.6rem 0; }
.ev-chat-form { position: static; display: flex; gap: 0.4rem; align-items: flex-end; }
.ev-chat-form textarea { flex: 1; min-width: 0; resize: none; }
.mini-sheet.player-sheet { width: min(960px, calc(100vw - 1.5rem)); max-width: none; padding-top: 2.6rem; }
.link-player.in-sheet { margin: 0; }
body.budget-masked .budget-season strong, body.budget-masked .budget-row .carnet-time, body.budget-masked .budget-row strong { filter: blur(7px); user-select: none; }
/* Groupes de discussion */
.group-av { width: 2.4rem; height: 2.4rem; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #14161a; color: #f4f3ef; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; }
.dm-top { flex-wrap: wrap; }
.grp-teams { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.grp-teams button { border-radius: 999px; padding: 0.35rem 0.8rem; font-weight: 700; color: var(--text); }
.grp-list { max-height: 45dvh; overflow-y: auto; margin-top: 0.5rem; }
.grp-row { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.2rem; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font-weight: 600; text-align: left; cursor: pointer; }
.grp-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; flex: 0 0 auto; }
#grp-q { width: 100%; }
/* Réglages façon « Paramètres et activité » */
.settings-ig { display: flex; flex-direction: column; gap: 0.9rem; }
.set-search input { width: 100%; border-radius: 12px; padding: 0.65rem 0.9rem; }
.set-group-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); margin: 0 0 0.35rem 0.2rem; }
.card.set-card { padding: 0.2rem 0; }
.set-row { display: flex; align-items: center; gap: 0.8rem; width: 100%; min-height: 3.1rem; padding: 0.55rem 1rem; border: 0; border-radius: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font-weight: 600; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-row:hover { background: var(--surface-alt); }
.set-ico { flex: 0 0 auto; display: grid; place-items: center; color: var(--text); }
.set-label { flex: 1; min-width: 0; }
.set-value { flex: 0 1 auto; min-width: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-weight: 500; font-size: 0.88rem; }
.set-chev { color: var(--text-muted); font-size: 1.3rem; line-height: 1; }
.set-row.set-danger, .set-row.set-danger .set-ico { color: var(--accent); }
.settings-page-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; }
.settings-page-head .section-title { margin: 0; }
/* Éditeur de fiche : identité */
.look-identity input, .look-identity select { width: 100%; }
.look-id-pseudo { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0.7rem; border-radius: 10px; background: var(--surface-alt); margin-bottom: 0.5rem; }
.look-id-pseudo > span { display: flex; flex-direction: column; }
.look-id-row { display: flex; gap: 0.6rem; margin: 0.4rem 0; }
.look-id-row > div { flex: 1; min-width: 0; }
/* Cosmétiques débloqués avec les pneus */
.mini-avatar[class*="frame-"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--frame, #3a3f47); }
.mini-avatar.frame-carbone { --frame: #2b2f36; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #2b2f36, 0 0 0 5.5px #5a606a; }
.mini-avatar.frame-or { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #c9a227, 0 0 8px 3px rgba(201,162,39,0.45); }
.mini-avatar.frame-damier { box-shadow: 0 0 0 2px var(--surface); outline: 3px dashed #14161a; outline-offset: 2px; }
.mini-avatar.frame-flamme { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #fb8500, 0 0 10px 4px rgba(200,38,31,0.55); }
.story-ring .mini-avatar[class*="frame-"] { box-shadow: none; outline: none; }
.name-icon { display: inline-block; vertical-align: -2px; margin-left: 0.3rem; color: var(--sig, var(--accent)); }
.ph-title { display: inline-block; margin-right: 0.4rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: color-mix(in srgb, var(--sig, var(--accent)) 14%, transparent); color: var(--sig, var(--accent)); font-weight: 800; font-size: 0.78rem; }
.dm-msg[style*="--bub"] .dm-bubble { background: var(--bub); color: var(--bub-ink); }
.look-sub { display: block; margin: 0.6rem 0 0.25rem; font-size: 0.82rem; font-weight: 700; color: var(--text-muted); }
.bub-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: -1px; }
.unlock-chips button.locked { opacity: 0.55; }
/* Bannières débloquées */
.person-hero[data-cover="damier-anim"] .ph-cover { background-color: #14161a; background-image: linear-gradient(45deg, #f4f3ef 25%, transparent 25%, transparent 75%, #f4f3ef 75%), linear-gradient(45deg, #f4f3ef 25%, transparent 25%, transparent 75%, #f4f3ef 75%); background-size: 28px 28px; background-position: 0 0, 14px 14px; animation: flag-wave 6s ease-in-out infinite; box-shadow: inset 0 -40px 60px -30px var(--sig); }
@keyframes flag-wave { 0%, 100% { background-position: 0 0, 14px 14px; } 50% { background-position: 14px 6px, 28px 20px; } }
.person-hero[data-cover="nuit"] .ph-cover { background: radial-gradient(ellipse at 20% 120%, rgba(255,183,3,0.55), transparent 55%), radial-gradient(ellipse at 80% 120%, rgba(255,183,3,0.4), transparent 50%), linear-gradient(180deg, #05070c, #141a2b 70%, #1f2537); }
.person-hero[data-cover="nuit"] .ph-cover::after { content: ''; position: absolute; left: 0; right: 0; bottom: 18%; height: 3px; background: repeating-linear-gradient(90deg, #f4f3ef 0 18px, transparent 18px 36px); opacity: 0.7; animation: night-run 2.4s linear infinite; }
@keyframes night-run { from { background-position: 0 0; } to { background-position: 36px 0; } }
@media (prefers-reduced-motion: reduce) { .person-hero[data-cover="damier-anim"] .ph-cover, .person-hero[data-cover="nuit"] .ph-cover::after { animation: none; } }
.unlock-chips button.locked, .look-sw.locked, .look-seg button.locked { opacity: 0.8; cursor: pointer; }
.pneus-buy-price { display: flex; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0.6rem; font-size: 1.6rem; font-weight: 800; }
.pneus-buy-price svg { width: 1.6rem; height: 1.6rem; }
/* Cadre de bannière (acheté avec les pneus) : un liseré autour de toute la
   carte de la fiche, qui suit ses coins arrondis et ne passe jamais sur les photos. */
.person-hero[data-bframe="carbone"] { box-shadow: 0 0 0 2px #2b2f36, 0 0 0 3px #6b717b; }
.person-hero[data-bframe="or"] { box-shadow: 0 0 0 2px #c9a227, 0 4px 18px rgba(201,162,39,0.35); }
.person-hero[data-bframe="damier"] { outline: 3px dashed #14161a; outline-offset: 3px; }
.person-hero[data-bframe="neon"] { box-shadow: 0 0 0 1.5px #ff3d7f, 0 0 14px rgba(255,61,127,0.45); }
/* Moi : une page qui défile, avec raccourcis */
.moi-jumps { display: flex; gap: 0.4rem; margin: 0 0 0.6rem; flex-wrap: wrap; }
.moi-jump { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.moi-sec { scroll-margin-top: calc(var(--header-h, 64px) + 0.6rem); }
.moi-sec + .moi-sec { margin-top: 1.4rem; }
.moi-sec-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 0.5rem; }
.coach-entry { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; padding: 0.8rem 1rem; margin: 0 0 0.8rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.coach-entry > span { display: flex; flex-direction: column; }
/* ==== Passe visuelle : épurée ====
   Onglets principaux : texte souligné sur le fond de page (plus de bloc gris) ;
   pastilles juste dessous : petites puces (plus de carte) ; cartes plus plates. */
.subnav.main-subnav { background: var(--bg); border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; gap: 0; margin-bottom: 0.2rem; }
.subnav.main-subnav .subnav-btn { border-radius: 0; padding: 0.75rem 0.25rem 0.6rem; font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; box-shadow: none; }
.subnav.main-subnav .subnav-btn.active { background: none; box-shadow: none; color: var(--text); border-bottom-color: var(--accent); }
.subnav + .pill-tabs { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0.6rem 0 0.15rem; margin: 0 0 0.75rem; gap: 0.4rem; }
.subnav + .pill-tabs .pill-btn { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.95rem; font-size: 0.86rem; font-weight: 700; background: var(--surface); color: var(--text-muted); }
.subnav + .pill-tabs .pill-btn.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.subnav + .pill-tabs .pill-btn.active::after { display: none; }
.card { box-shadow: 0 1px 2px rgba(22,33,44,0.05); border-radius: 16px; }
.moi-jumps { margin-top: -0.2rem; }
@media (max-width: 959px) {
  .subnav.main-subnav { box-shadow: 0 0 0 1rem var(--bg); }
}
.subnav.main-subnav:has(+ .pill-tabs) .subnav-btn.active { border: 0; border-bottom: 3px solid var(--accent); border-radius: 0; padding-bottom: 0.6rem; margin-bottom: -1px; }
/* Raccourcis de Bilan : de simples liens, pas une rangée de pastilles de plus. */
.moi-jumps { gap: 1rem; margin: -0.2rem 0 0.4rem; }
.moi-jump { border: 0; background: none; padding: 0.2rem 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
.moi-jump:hover { color: var(--accent); }
/* Cadre de photo + story : le cadre reste, l'anneau de story passe autour. */
.mini-avatar.has-story.frame-carbone, .mini-avatar.has-story.story-seen.frame-carbone { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #2b2f36, 0 0 0 5.5px #5a606a; }
.mini-avatar.has-story.frame-or, .mini-avatar.has-story.story-seen.frame-or { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #c9a227, 0 0 8px 3px rgba(201,162,39,0.45); }
.mini-avatar.has-story.frame-flamme, .mini-avatar.has-story.story-seen.frame-flamme { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #fb8500, 0 0 10px 4px rgba(200,38,31,0.55); }
.mini-avatar.has-story[class*="frame-"]:not(.frame-damier) { outline: 2.5px solid #fb8500; outline-offset: 6px; }
.mini-avatar.has-story.story-seen[class*="frame-"]:not(.frame-damier) { outline-color: var(--border); }

/* Les onglets fixés ne mordent plus sur ce qui suit (cercles des stories). */
@media (max-width: 959px) { .subnav.main-subnav { margin-bottom: calc(var(--subnav-gap, 0.5rem) + 0.25rem); } }
/* Vibreurs des circuits : en liseré autour de la fiche (bordure rayée qui
   suit les coins) et en style de bannière. */
/* Vibreur seulement dans les 4 coins (les « virages ») : le milieu de chaque
   bord est recouvert par la couleur de la page. */
/* Vibreur seulement dans les 4 coins (les « virages ») : chaque virage
   commence et finit par un triangle blanc, pour tous les coloris ; le
   milieu des bords est recouvert par la couleur de la page. */
.person-hero[data-bframe^="k-"] { box-shadow: none; outline: 0; border: 6px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(var(--bg), var(--bg)) center / calc(100% - 124px) calc(100% + 4px) no-repeat border-box,
    linear-gradient(var(--bg), var(--bg)) center / calc(100% + 4px) calc(100% - 124px) no-repeat border-box,
    linear-gradient(120deg, transparent 6px, #ffffff 6px) left 44px top 0 / 18px 6px no-repeat border-box,
    linear-gradient(240deg, transparent 6px, #ffffff 6px) right 44px top 0 / 18px 6px no-repeat border-box,
    linear-gradient(60deg, transparent 6px, #ffffff 6px) left 44px bottom 0 / 18px 6px no-repeat border-box,
    linear-gradient(300deg, transparent 6px, #ffffff 6px) right 44px bottom 0 / 18px 6px no-repeat border-box,
    linear-gradient(150deg, transparent 6px, #ffffff 6px) left 0 top 44px / 6px 18px no-repeat border-box,
    linear-gradient(30deg, transparent 6px, #ffffff 6px) left 0 bottom 44px / 6px 18px no-repeat border-box,
    linear-gradient(210deg, transparent 6px, #ffffff 6px) right 0 top 44px / 6px 18px no-repeat border-box,
    linear-gradient(330deg, transparent 6px, #ffffff 6px) right 0 bottom 44px / 6px 18px no-repeat border-box,
    var(--kerb-f) border-box;
  background-origin: padding-box, border-box, border-box, border-box, border-box, border-box, border-box, border-box, border-box, border-box, border-box, border-box; }
.person-hero[data-bframe="k-classique"] { --kerb-f: repeating-linear-gradient(45deg, #c8261f 0 12px, #ffffff 12px 24px); }
.person-hero[data-cover="k-classique"] .ph-cover { background: repeating-linear-gradient(45deg, #c8261f 0 22px, #ffffff 22px 44px); }
.person-hero[data-bframe="k-lemans"] { --kerb-f: repeating-linear-gradient(45deg, #f2c500 0 12px, #1d4fb6 12px 24px); }
.person-hero[data-cover="k-lemans"] .ph-cover { background: repeating-linear-gradient(45deg, #f2c500 0 22px, #1d4fb6 22px 44px); }
.person-hero[data-bframe="k-mugello"] { --kerb-f: repeating-linear-gradient(45deg, #1f8a3b 0 12px, #ffffff 12px 24px, #c8261f 24px 36px); }
.person-hero[data-cover="k-mugello"] .ph-cover { background: repeating-linear-gradient(45deg, #1f8a3b 0 22px, #ffffff 22px 44px, #c8261f 44px 66px); }
.person-hero[data-bframe="k-ricard"] { --kerb-f: repeating-linear-gradient(45deg, #1d4fb6 0 12px, #c8261f 12px 24px, #14161a 24px 30px); }
.person-hero[data-cover="k-ricard"] .ph-cover { background: repeating-linear-gradient(45deg, #1d4fb6 0 22px, #c8261f 22px 44px, #14161a 44px 55px); }
.person-hero[data-bframe="k-misano"] { --kerb-f: repeating-linear-gradient(45deg, #0a7fc2 0 12px, #ffffff 12px 24px, #e2231a 24px 36px, #ffffff 36px 48px); }
.person-hero[data-cover="k-misano"] .ph-cover { background: repeating-linear-gradient(45deg, #0a7fc2 0 22px, #ffffff 22px 44px, #e2231a 44px 66px, #ffffff 66px 88px); }

/* En-tête de fiche : photo à gauche (sur la bannière), trophées à droite,
   puis nom, infos et bio alignés sur la même marge. */
.ph-id { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "av vit" "id id"; align-items: end; column-gap: 0.75rem; row-gap: 0.35rem; }
.ph-id > .ph-avatar { grid-area: av; }
.ph-id > .person-id { grid-area: id; padding-top: 0; }
.ph-id > .mini-vitrine { grid-area: vit; justify-self: end; align-self: end; padding-top: 0; margin-left: 0; }
.ph-id .person-name { font-size: 1.6rem; line-height: 1.1; }
.ph-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }
.ph-meta { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.ph-meta + .ph-meta::before, .friend-role-badge + .ph-meta::before { content: '·'; margin-right: 0.2rem; color: var(--border); font-weight: 800; }
.ph-num { display: inline-block; padding: 0 0.35rem; border-radius: 6px; background: var(--text); color: var(--bg); font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 0.85rem; }
.ph-bio { font-size: 0.95rem; }
/* Fil / Messages / Teams collé sous l'en-tête : pas de bande vide au-dessus. */
@media (max-width: 959px) { .page-head + .subnav.main-subnav { margin-top: -0.9rem; } }
/* ==== Onglets : maquette A « classeur allégé » ====
   Barre claire à fin contour ; l'onglet actif s'ouvre sur un panneau blanc
   qui porte ses sous-onglets (texte, l'actif souligné en rouge). */
.subnav.main-subnav { display: flex; gap: 3px; padding: 3px 3px 0; margin-bottom: 0; background: var(--surface-alt); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; }
.subnav.main-subnav .subnav-btn, .subnav.main-subnav:has(+ .pill-tabs) .subnav-btn.active { flex: 1; margin: 0; padding: 0.6rem 0.25rem; border: 0; border-radius: 9px 9px 0 0; background: none; box-shadow: none; font-family: inherit; font-size: 0.95rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text-muted); }
.subnav.main-subnav .subnav-btn.active { background: var(--surface); color: var(--text); font-weight: 800; box-shadow: 0 -1px 0 var(--border), 1px 0 0 var(--border), -1px 0 0 var(--border); }
/* Pas de sous-onglets : la barre se ferme sur elle-même. */
.subnav.main-subnav:not(:has(+ .pill-tabs)) { border-bottom: 1px solid var(--border); border-radius: 12px; padding-bottom: 3px; margin-bottom: 0.8rem; }
.subnav.main-subnav:not(:has(+ .pill-tabs)) .subnav-btn { border-radius: 9px; }
.subnav.main-subnav:not(:has(+ .pill-tabs)) .subnav-btn.active { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.subnav + .pill-tabs { display: flex; gap: 0; margin: 0 0 0.8rem; padding: 0 6px; background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: none; }
.subnav + .pill-tabs .pill-btn, .subnav + .pill-tabs .pill-btn.active { flex: 1 0 auto; border: 0; border-bottom: 2.5px solid transparent; border-radius: 0; background: none; padding: 0.6rem 0.4rem 0.5rem; font-size: 0.9rem; font-weight: 700; color: var(--text-muted); }
.subnav + .pill-tabs .pill-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.subnav + .pill-tabs .pill-btn.active::after { display: none; }
@media (max-width: 959px) {
  .subnav.main-subnav { margin-bottom: 0; }
  .subnav.main-subnav:not(:has(+ .pill-tabs)) { margin-bottom: 0.8rem; }
  .subnav.main-subnav::after { display: none; }
}
.subnav.main-subnav:has(+ .pill-tabs) .subnav-btn.active { background: var(--surface); color: var(--text); font-weight: 800; box-shadow: 0 -1px 0 var(--border), 1px 0 0 var(--border), -1px 0 0 var(--border); }
@media (max-width: 959px) { .page-head + .subnav.main-subnav { margin-top: -0.4rem; } }
/* Téléphone : le masque des côtés de la barre fixée ne déborde plus vers le
   bas (il dessinait une bande de la couleur de page entre l'onglet actif et
   ses sous-onglets). */
@media (max-width: 959px) {
  .subnav.main-subnav:has(+ .pill-tabs) { clip-path: inset(-1px -1rem 0 -1rem); }
  .subnav.main-subnav:has(+ .pill-tabs) .subnav-btn.active { margin-bottom: -1px; padding-bottom: calc(0.6rem + 1px); position: relative; z-index: 1; }
}
/* Les sous-onglets restent collés sous leur onglet pendant le défilement :
   le bloc onglet + sous-onglets ne se sépare plus. */
@media (max-width: 959px) {
  .subnav.main-subnav + .pill-tabs { position: sticky; top: calc(var(--header-h, 64px) - 1px + var(--subnav-h, 44px) - 1px); z-index: 7; box-shadow: 0 0 0 1rem var(--bg); clip-path: inset(0 -1rem calc(-1 * var(--subnav-gap, 0.5rem)) -1rem); }
  /* Le masque sous les sous-onglets ne mord plus sur la suite (pastilles
     Liste / Mois, cartes) : la suite commence sous lui. */
  .subnav.main-subnav + .pill-tabs + * { margin-top: calc(var(--subnav-gap, 0.5rem) + 0.45rem) !important; }
}
.subnav + .pill-tabs .pill-btn, .subnav + .pill-tabs .pill-btn.active { flex: 1 1 auto; min-width: 0; }
/* Icône et couleur selon le type de notification */
.notif-ico-flame { color: #e0701a; }
.notif-ico-comment, .notif-ico-mention { color: #1f4fb8; }
.notif-ico-follow { color: #2f8f3a; }
.notif-ico-duel { color: var(--accent); }
.notif-ico-ride { color: var(--text); }
.notif-ico-podium { color: #b07a0c; }
.notif-ico-camera { color: #6b3fc4; }
/* Avatars : un seul rond à la fois. Pas de bordure de base ; story active =
   anneau doré (gris une fois vue), qui remplace le cadre acheté le temps de
   la story ; sinon le cadre acheté s'il y en a un. */
.mini-avatar.has-look { box-shadow: none; }
.ph-avatar .mini-avatar { box-shadow: 0 0 0 3px var(--surface); }
.mini-avatar.has-story, .mini-avatar.has-story[class*="frame-"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px #fb8500 !important; outline: none !important; }
.mini-avatar.has-story.story-seen, .mini-avatar.has-story.story-seen[class*="frame-"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--border) !important; }
.ph-avatar .mini-avatar.has-story { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px #fb8500 !important; }
.ph-avatar .mini-avatar.has-story.story-seen { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--border) !important; }
.story-ring .mini-avatar.has-story, .story-ring .mini-avatar.has-story.story-seen { box-shadow: none !important; }
/* PC : onglets et sous-onglets aussi en haut de page (en plus de la barre de gauche). */
@media (min-width: 960px) {
  .pill-tabs.main-subnav-pills, .sub-pills.main-subnav-pills { display: flex; }
  /* Album photo d'un roulage : une colonne au milieu de la ligne. */
  .outing-row-wrap { position: relative; }
  .outing-row-wrap > .album-chip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
}
.story-goto-post { align-self: center; z-index: 2; border: 0; background: #fff; color: #14161a; border-radius: 999px; padding: 0.55rem 1.3rem; font-weight: 800; cursor: pointer; margin-bottom: 0.5rem; }
/* Lecteur vidéo posé sur le post (sous l'en-tête et les onglets fixés). */
.inline-player { position: absolute; z-index: 5; border-radius: 12px; overflow: hidden; background: #000; }
.inline-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.inline-player-x { position: absolute; top: 0.4rem; right: 0.4rem; width: 2rem; height: 2rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.85rem; cursor: pointer; }
/* Recherche globale */
.mini-sheet.gsearch-sheet { max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; }
#gsearch-q { width: 100%; border-radius: 12px; padding: 0.7rem 0.9rem; font-size: 1rem; }
.gsearch-results { overflow-y: auto; margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.7rem; }
.gsearch-title { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 0.25rem 0.2rem; }
.gsearch-row { display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.55rem 0.5rem; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.gsearch-row:hover, .gsearch-row:focus-visible { background: var(--surface-alt); }
.gsearch-ico { width: 2.1rem; height: 2.1rem; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); color: var(--text-muted); }
.gsearch-main { display: flex; flex-direction: column; min-width: 0; }
.gsearch-main .help-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-year-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.3rem; } .team-year-head .section-title { margin: 0; } .team-season-btn { border-radius: 999px; padding: 0.35rem 0.85rem; font-weight: 700; font-size: 0.85rem; color: var(--text); }
.story-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: 72px; height: 72px; min-width: 0; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: #c8261f; color: #fff; box-shadow: 0 6px 22px rgba(0,0,0,0.4); cursor: pointer; }
.story-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.story-card.story-photo { position: relative; }
.story-playing .story-nav { pointer-events: none; }
/* Ma bulle de story : photo + petit + */
.story-me { position: relative; flex: 0 0 auto; }
.story-me-btn { -webkit-touch-callout: none; user-select: none; }
.story-me-btn.no-story .story-ring { background: var(--border); }
.story-plus-btn { position: absolute; right: 2px; top: calc(3.6rem - 12px); width: 22px; height: 22px; min-width: 0; padding: 0; border: 2px solid var(--bg); border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; line-height: 1; display: grid; place-items: center; cursor: pointer; z-index: 2; }
/* Colonne de droite : À venir / Passés, tuiles compactes */
.rail-mode { display: inline-flex; gap: 0.8rem; }
.rail-mode button { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.rail-mode button.on { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.rail-tile { gap: 0.35rem; }
.rt-top { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-width: 0; }
.rt-top .outing-thumb { width: 36px; height: 36px; flex: 0 0 auto; }
.rt-id { display: flex; flex-direction: column; min-width: 0; }
.rt-id strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-dates { font-size: 0.8rem; }
.rt-who { display: flex; align-items: center; gap: 0.45rem; min-width: 0; width: 100%; }
.rt-who .rail-faces { margin-top: 0; flex: 0 0 auto; }
.rt-names { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* PC : champ de recherche dans la barre de gauche, résultats à côté */
.gsearch-inline { display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.35rem 0.6rem 0.35rem 0.85rem; border: 1.5px solid var(--accent); border-radius: 12px; background: var(--surface); color: var(--text-muted); }
.gsearch-inline input { flex: 1; min-width: 0; border: 0; background: none; padding: 0.35rem 0; font: inherit; font-size: 0.95rem; color: var(--text); outline: none; box-shadow: none; }
.gsearch-pop { position: fixed; z-index: 80; width: 380px; max-height: min(70vh, 560px); overflow-y: auto; padding: 0.7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; gap: 0.7rem; }
.dm-av-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.dm-av-wrap .presence-dot { right: -1px; bottom: -1px; width: 12px; height: 12px; border-width: 2px; }
/* Miniatures de circuit homogènes : même boîte, tracé centré ; en mode
   sombre, tracé blanc sur fond sombre. */
.outing-thumb { display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.outing-thumb img { width: 86%; height: 86%; object-fit: contain; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .outing-thumb { background: #1b1e24; } :root:not([data-theme="light"]) .outing-thumb img.trace-img { filter: invert(1) hue-rotate(180deg) brightness(1.1); } }
:root[data-theme="dark"] .outing-thumb { background: #1b1e24; }
:root[data-theme="dark"] .outing-thumb img.trace-img { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
/* Téléphone aussi : album photo au milieu de la ligne d'un roulage passé. */
.outing-row-wrap { position: relative; }
.outing-row-wrap > .album-chip { position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.outing-row-wrap .outing-row-main { max-width: 46%; }
/* Formulaire de publication : le champ prend toute la largeur (PC compris). */
#wall-post-form .mention-wrap, #wall-post-form textarea, #wall-post-form input[type="url"], #wall-post-form .post-place-row { width: 100%; max-width: none; }
.ph-body .outing-actions { display: flex; gap: 0.5rem; }
.ph-body .outing-actions > button { flex: 1 1 0; }
.look-team-media { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; } .look-team-av .mini-avatar { width: 48px; height: 48px; } .look-team-media button { border-radius: 999px; font-weight: 700; color: var(--text); }
.gsearch-filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.gsearch-filters button { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.gsearch-filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.gsearch-sortrow { display: flex; justify-content: flex-start; margin-top: 0.4rem; }
.gsearch-sortrow .gsearch-sort { border: 1px dashed var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.gsearch-hint { padding: 0.4rem 0.2rem; }
.gsearch-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; }
.gsearch-photo { padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--surface-alt); }
.gsearch-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.podium-more { display: block; margin: 0.6rem auto 0.2rem; font-weight: 700; }
/* Records : pastille de catégorie devant le nom */
.tr-cat { display: inline-block; align-self: flex-start; padding: 0.1rem 0.45rem; border-radius: 6px; font-family: 'Barlow Condensed', sans-serif; font-style: italic; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; color: #fff; background: #14161a; }
.tr-cat-motogp { background: #c8261f; }
.tr-cat-moto2 { background: #3a3f47; }
.tr-cat-moto3 { background: #e0701a; }
.tr-cat-wsbk { background: #1f4fb8; }
.tr-cat-fsbk { background: linear-gradient(90deg, #1f4fb8 0 33%, #ffffff 33% 66%, #c8261f 66%); color: #14161a; text-shadow: 0 0 3px #fff; }
.tr-cat-f1 { background: #e10600; }
.tr-cat-wec { background: #0b3d91; }
.tr-cat-gt3 { background: #6b3fc4; }
.tr-cat-app { background: var(--accent); }
.tr-app-sep { margin: 0.7rem 0 0.2rem; padding-top: 0.6rem; border-top: 1px dashed var(--border); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
/* Ajouter à mon agenda : choix de l'agenda */
.cal-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.cal-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.cal-choice:hover { border-color: var(--accent, #c8261f); }
/* Nouveautés (version de l'appli) */
.pn-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.patchnotes { max-height: 65vh; overflow-y: auto; font-size: 0.92rem; line-height: 1.45; }
.patchnotes .pn-date { font-family: 'Barlow Condensed', sans-serif; font-size: 1.05rem; text-transform: uppercase; margin: 1rem 0 0.3rem; color: var(--accent, #c8261f); }
.patchnotes ul { margin: 0.2rem 0 0.5rem; padding-left: 1.1rem; }
.patchnotes p { margin: 0.5rem 0 0.2rem; }
/* PC, colonne de droite : album photo du roulage, à droite de la tuile */
.rail-tile-wrap { position: relative; }
.rail-tile-wrap .rail-tile { width: 100%; }
.rail-tile-wrap .rail-album { position: absolute; top: 0.45rem; right: 0.45rem; left: auto; transform: none; }
/* Photo, logo, couverture du team : une seule ligne */
.look-team-media { flex-wrap: wrap; gap: 0.4rem; }
.look-team-media .ghost { flex: 1 1 0; min-width: 0; padding-left: 0.4rem; padding-right: 0.4rem; white-space: nowrap; }
.look-team-media .link-btn { flex: 0 0 auto; }
/* Post publié dans un team, vu dans le Fil : team en tête, auteur en citation */
.team-post-quote { margin-top: 0.4rem; border: 1px solid var(--border); border-left: 3px solid var(--accent, #c8261f); border-radius: 12px; padding: 0.55rem 0.7rem; background: var(--surface-alt); }
.team-post-by { display: flex; align-items: center; gap: 0.45rem; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.team-post-by .mini-avatar { width: 26px; height: 26px; font-size: 0.75rem; }
.team-post-quote .wall-post-text { margin-top: 0.15rem; }
/* Mode sombre : tous les tracés (miniatures, plan, saisons) en blanc sur fond
   noir, la ligne de départ reste rouge. Les plans importés (photos) restent tels quels. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.trace-img,
  :root:not([data-theme="light"]) img[data-track-plan] { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
  :root:not([data-theme="light"]) .season-tile-map { background: #000; }
}
:root[data-theme="dark"] img.trace-img,
:root[data-theme="dark"] img[data-track-plan] { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
:root[data-theme="dark"] .season-tile-map { background: #000; }
/* Infos du circuit : niveau et matériel */
.lvl-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.lvl { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-alt); }
.lvl-who { font-size: 0.78rem; color: var(--muted, #6b7079); text-transform: uppercase; letter-spacing: 0.03em; }
.lvl-bars { display: inline-flex; gap: 2px; }
.lvl-bars i { width: 5px; height: 12px; border-radius: 2px; background: var(--border); }
.lvl-1 .lvl-bars i.on { background: #2e9e5b; } .lvl-2 .lvl-bars i.on { background: #e0a21a; } .lvl-3 .lvl-bars i.on { background: #c8261f; }
.gear-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 0.7rem 0 0.3rem; }
@media (max-width: 520px) { .gear-cols { grid-template-columns: 1fr; } }
.gear-col ul { margin: 0.25rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; }
.gear-req .look-label { color: #2e9e5b; } .gear-no .look-label { color: #c8261f; }
/* Carte de chaleur des repères */
.track-mini-wrap { position: relative; }
.heat-layer { position: absolute; inset: 0; pointer-events: none; }
.heat-layer i { position: absolute; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(200,38,31,calc(0.25 + var(--k) * 0.6)) 0%, rgba(240,140,30,calc(var(--k) * 0.35)) 45%, transparent 70%); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .heat-layer i { mix-blend-mode: screen; } }
:root[data-theme="dark"] .heat-layer i { mix-blend-mode: screen; }
.heat-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.heat-ctl .ghost.on { border-color: var(--accent, #c8261f); color: var(--accent, #c8261f); }
.heat-ctl .link-btn { font-size: 0.82rem; color: var(--muted, #6b7079); text-decoration: underline; font-weight: 400; }
.spot-access { margin: 0.6rem 0; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt); } .spot-access p { margin: 0.2rem 0 0.25rem; font-size: 0.92rem; }
/* Mode simple (paddock) : plus grand, plus lisible, l'essentiel seulement */
html.simple-mode { font-size: 112%; }
.simple-mode .stories-row, .simple-mode .pneus-chip, .simple-mode #invite-qr-btn, .simple-mode .fsug,
.simple-mode .heat-ctl, .simple-mode .story-me, .simple-mode .rail-section + .rail-section { display: none !important; }
.simple-mode .primary, .simple-mode .ghost:not(.icon-btn):not(.small) { min-height: 48px; font-size: 1.02rem; }
.simple-mode .subnav-btn { font-size: 1.05rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.simple-mode .bottom-nav-btn { font-size: 0.85rem; }
.simple-mode .help-text { font-size: 0.95rem; }
.simple-mode .outing-thumb { width: 52px; height: 52px; }
.simple-mode .card { padding: 1.1rem; }
.simple-mode-opt { align-items: flex-start; }
/* Circuits visités sans rouler */
.add-visit-btn { margin-bottom: 0.7rem; }
.extra-visit-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.extra-visit-row select { flex: 1 1 140px; }
.visited-manual { display: inline-flex; align-items: center; gap: 0.25rem; cursor: default; border-style: dashed; }
.visited-manual .link-btn { font-size: 0.75rem; padding: 0 0.15rem; }
.circuit-picker select.circuit-sort { flex: 0 0 auto; width: auto; font-weight: 500; font-size: 0.88rem; }
/* Ligne de roulage passé : album pile au milieu, temps calé à droite */
.outing-row-wrap > .album-chip { left: 50%; }
.outing-row-wrap .outing-row-right { margin-left: auto; }
/* Miniatures de circuit : l'image cuite suit le thème (jour : foncé sur
   blanc ; nuit : blanc sur noir) ; jamais de filtre CSS dessus. */
.outing-thumb img.trace-img.baked, .season-tile-map img.trace-img.baked { filter: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .outing-thumb, :root:not([data-theme="light"]) .season-tile-map { background: #0d0f12; } }
:root[data-theme="dark"] .outing-thumb, :root[data-theme="dark"] .season-tile-map { background: #0d0f12; }
.circuit-rules { margin-top: 0.8rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-left: 3px solid var(--accent, #c8261f); border-radius: 12px; background: var(--surface-alt); } .circuit-rules ul { margin: 0.25rem 0 0.35rem; padding-left: 1.1rem; font-size: 0.92rem; }
.team-gear.is-open { background: var(--accent, #c8261f); color: #fff; border-color: var(--accent, #c8261f); }
.lvl-vote { margin: 0.6rem 0 0.2rem; } .lvl-vote .look-seg { margin-top: 0.3rem; }
.circuit-site { margin: 0.2rem 0 0.7rem; }
.circuit-site a.ghost { display: inline-flex; align-items: center; text-decoration: none; }
.lvl-vote-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.35rem; flex-wrap: wrap; }
.lvl-vote-row .lvl-who { min-width: 4.2rem; }
/* Liens du circuit et météo prévue */
.circuit-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.7rem; }
.circuit-links a.ghost { text-decoration: none; display: inline-flex; align-items: center; }
.forecast-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin-bottom: 0.4rem; }
.forecast-day { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt); }
.forecast-temp { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.2rem; }
/* Niveau : explication au survol ; vote façon pastille à barres */
.lvl-wrap { outline: none; }
.lvl-wrap .lvl-hint { display: none; }
.lvl-wrap:hover .lvl-hint, .lvl-wrap:focus .lvl-hint, .lvl-wrap:focus-within .lvl-hint { display: block; }
.lvl-bars-vote { gap: 4px; }
.lvl-bars-vote button { width: 14px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: var(--border); cursor: pointer; }
.lvl-bars-vote button:hover { outline: 2px solid var(--accent, #c8261f); }
.lvl-1 .lvl-bars-vote button.on { background: #2e9e5b; } .lvl-2 .lvl-bars-vote button.on { background: #e0a21a; } .lvl-3 .lvl-bars-vote button.on { background: #c8261f; }
.chrono-past .chrono-past-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0.2rem; }
.discipline-switch { margin-bottom: 0.7rem; }
/* Calque des repères calé sur l'image (voir fitPinLayers) */
.track-mini-wrap .pin-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
/* Dessin : repères et commentaires par-dessus, au choix */
.annot-layer-btn.on { border-color: var(--accent, #c8261f); color: var(--accent, #c8261f); }
.annot-pins { position: absolute; pointer-events: none; z-index: 3; }
.annot-pins.off { display: none; }
.annot-pin { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; }
.annot-pin b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent, #c8261f); color: #fff; font-size: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.annot-pin-note { display: none; position: absolute; left: 24px; top: 50%; transform: translateY(-50%); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; background: rgba(20,22,26,.85); color: #fff; padding: 2px 6px; border-radius: 6px; }
.annot-pins.with-notes .annot-pin-note { display: block; }
.footprint { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; } .footprint td { padding: 0.3rem 0.2rem; border-bottom: 1px solid var(--border); } .footprint td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.more-posts-btn { display: block; margin: 0.4rem auto 1rem; }
/* Message qui reste jusqu'à ce qu'on le ferme */
.toast.sticky { pointer-events: auto; padding-right: 2.6rem; position: relative; border-left: 4px solid var(--accent, #c8261f); max-width: min(92vw, 520px); }
.toast.sticky .toast-close { position: absolute; top: 0.35rem; right: 0.4rem; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; background: rgba(255,255,255,0.15); color: inherit; font-size: 0.9rem; cursor: pointer; }
.feed-entry-foot.social-row .post-inc-date { order: 8; margin-left: auto; min-width: 0; padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.feed-entry-foot.social-row .post-inc-date + .post-trash { margin-left: 0 !important; }
/* Masquer une carte du fil : petite croix discrète en haut à droite. */
.card.can-hide { position: relative; }
.feed-hide { position: absolute; top: 0.45rem; right: 0.45rem; z-index: 2; width: 1.8rem; height: 1.8rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-muted); opacity: 0.7; display: grid; place-items: center; cursor: pointer; }
.feed-hide:hover { opacity: 1; background: color-mix(in srgb, var(--text) 8%, transparent); }
.feed-hidden-reset { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--border); }
.story-prep-err { color: #fff; max-width: 30rem; margin: 1.2rem auto 0; padding: 0 1rem; text-align: center; line-height: 1.4; }
.story-prep-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
/* Place pour la croix : la miniature ou l'heure du haut se décalent. */
.card.can-hide .feed-entry-time, .card.can-hide .feed-ride-thumb, .card.can-hide .feed-recap-head > .outing-thumb, .card.feed-moment.can-hide > .outing-thumb { margin-right: 1.9rem !important; }
.card.can-hide .wall-post-head { padding-right: 1.9rem; }
.card.can-hide .wall-post-head .feed-entry-time { margin-right: 0 !important; }
/* Téléphone : l'appli tient toujours dans la largeur de l'écran (pas de
   zoom ni de défilement de côté). Un lien ou un mot très long passe à la
   ligne au lieu d'élargir la page ; pas de zoom au double-toucher. */
html, body { overflow-x: clip; max-width: 100%; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
@media (max-width: 959px) { input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); } }
/* Carte d'un incident : plan clair en mode jour, plan sombre en mode nuit
   (même image inversée : fond noir, tracé blanc, croix rouge gardée). */
:root[data-theme="dark"] .wall-post-media.is-incident img, :root[data-theme="dark"] .incident-map img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wall-post-media.is-incident img, :root:not([data-theme="light"]) .incident-map img { filter: invert(1) hue-rotate(180deg); } }
.chrono-friend-row { display: flex; gap: 0.5rem; justify-content: center; margin: 0.6rem 0; }
.chrono-friend-row .ghost { flex: 0 1 auto; padding: 0.4rem 0.9rem; font-size: 0.88rem; }
/* Story : publier reste atteignable clavier ouvert ; recadrage 9:16 ;
   circuit épinglé (!Jerez). */
.story-overlay.story-compose { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.story-compose .story-compose-media { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.story-compose .story-compose-media img, .story-compose .story-compose-media video { max-height: 58vh; }
.story-compose.typing .story-compose-media img, .story-compose.typing .story-compose-media video { max-height: 20vh; }
.story-compose.typing .story-compose-media.cropping { height: 20vh; }
.story-compose-media.cropping { position: relative; overflow: hidden; flex: 0 0 auto; height: 52vh; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 12px; background: #000; touch-action: none; cursor: grab; outline: 2px solid rgba(255,255,255,0.6); outline-offset: -2px; }
.story-crop-bar { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin-top: 0.5rem; }
.story-crop-btn { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 0.35rem 0.9rem; font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.story-crop-btn.on { background: #fff; color: #14161a; }
.story-crop-zoom { width: 9rem; accent-color: #c8261f; }
.story-mention-wrap { position: relative; }
.story-mention-wrap .story-text-input { width: 100%; }
.story-mention-wrap .mention-suggest { top: auto; bottom: 100%; margin: 0 0 0.3rem; max-height: 40vh; overflow-y: auto; }
.mention-circuit .mention-thumb { width: 28px; height: 28px; flex: 0 0 auto; }
.mention-circuit small { margin-left: auto; color: var(--text-muted); }
.story-photo.story-framed { position: relative; overflow: hidden; aspect-ratio: 9 / 16; height: min(70vh, 140vw); margin: 0 auto; border-radius: 12px; background: #000; padding: 0; }
.story-place { position: absolute !important; top: 0.7rem; left: 0.7rem; display: inline-flex; align-items: center; gap: 0.35rem; background: rgba(20,22,26,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; border: 0; border-radius: 999px; padding: 0.35rem 0.85rem; font: inherit; font-weight: 700; cursor: pointer; position: relative; z-index: 3; }
.story-caption .mention-link { color: inherit; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; position: relative; z-index: 3; }
.chrono-org { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0.35rem 0 0.1rem; padding: 0.2rem 0.7rem 0.2rem 0.25rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 0.88rem; cursor: pointer; max-width: 100%; }
.chrono-org .mini-avatar { width: 26px; height: 26px; font-size: 0.75rem; }
.chrono-org span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chrono-org-logo { height: 26px; max-width: 70px; object-fit: contain; border-radius: 6px; background: #fff; }
.add-cal-row [data-action="add-to-calendar"] { display: inline-flex; align-items: center; gap: 0.35rem; }
:root[data-theme="dark"] .photo-zoom.is-incident img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .photo-zoom.is-incident img { filter: invert(1) hue-rotate(180deg); } }
/* Mode sombre : le plan du circuit sur un fond noir uni (plus de cadre gris
   ni de bordure claire autour du tracé inversé). Dessin : fond noir, tracé
   blanc (les photos de plan officiel restent telles quelles). */
:root[data-theme="dark"] .circuit-info-card:has(img[data-track-plan]), :root[data-theme="dark"] .circuit-info-card:has(img[data-track-plan]) .circuit-visual-btn { background: #000; border-color: #000; }
:root[data-theme="dark"] .circuit-visual-btn:has(img[data-track-plan]) { padding: 0; border: 0; }
:root[data-theme="dark"] .annot-canvas-wrap.has-basemap.outline-base { background: #000; }
:root[data-theme="dark"] .annot-canvas-wrap.outline-base .annot-basemap { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .circuit-info-card:has(img[data-track-plan]), :root:not([data-theme="light"]) .circuit-info-card:has(img[data-track-plan]) .circuit-visual-btn { background: #000; border-color: #000; }
  :root:not([data-theme="light"]) .circuit-visual-btn:has(img[data-track-plan]) { padding: 0; border: 0; }
  :root:not([data-theme="light"]) .annot-canvas-wrap.has-basemap.outline-base { background: #000; }
  :root:not([data-theme="light"]) .annot-canvas-wrap.outline-base .annot-basemap { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
}
.link-player.is-x { aspect-ratio: 4 / 5; max-height: none; transition: height 0.2s; }
.x-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; color: #fff; font-weight: 700; font-size: 0.9rem; padding-bottom: 5rem; }
/* Roulage : actions en icônes sur une ligne (Gérer, discussion, inviter,
   agenda, modifier), seul « Je n'y vais plus » reste en texte. */
.outing-actions.outing-actions-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.outing-actions-icons > button { flex: 0 0 auto !important; width: auto; min-width: 0; }
.outing-actions-icons .icon-act { width: 2.75rem; height: 2.75rem; padding: 0; display: grid; place-items: center; border-radius: 12px; }
.outing-actions-icons .icon-act.ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.outing-actions-icons [data-action="leave-roulage"], .outing-actions-icons [data-action="incident-past"] { height: 2.75rem; padding: 0 0.9rem; white-space: nowrap; }
.outing-org-round { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 50%; padding: 0.25rem 0.75rem 0.25rem 0.25rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.outing-org-round .mini-avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.outing-org-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outing-actions-icons [data-action="leave-roulage"] { order: 9; margin-left: auto; }
/* Autour du circuit : boutons espacés, sur plusieurs lignes. */
.around-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0.6rem; }
.around-links a { flex: 0 0 auto; padding: 0.4rem 0.85rem; font-size: 0.9rem; text-decoration: none; }
/* Posts X, Instagram, TikTok : même fond que la carte (plus de bande noire). */
.link-player.is-auto, .link-player.is-auto .link-player-face { background: transparent; }
.inline-player.is-x, .inline-player.is-auto { background: transparent; }
.link-player.is-insta { aspect-ratio: 9 / 14; max-height: none; }
.link-player.is-tiktok { aspect-ratio: 9 / 16; max-height: 80vh; }
.link-player.is-auto .x-face { color: var(--text-muted); }
.social-face-name { font-size: 1.1rem; color: var(--text); }
.units-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.9rem; }
/* Repères en mode sombre : le cadre autour du plan inversé est noir aussi
   (plus de bandes blanches quand on agrandit sur PC). */
:root[data-theme="dark"] .track-notes-scroll:has(img[data-track-plan]) { background: #000 !important; border-color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .track-notes-scroll:has(img[data-track-plan]) { background: #000 !important; border-color: #000; } }
.visited-thumb-btn, .visited-name-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.visited-name-btn { display: flex; flex-direction: column; gap: 0.15rem; }
.visited-name-btn strong { text-decoration: underline; text-decoration-color: transparent; }
.visited-name-btn:hover strong { text-decoration-color: currentColor; }
.gsearch-adv-row { display: flex; margin-bottom: 0.4rem; }
.gsearch-adv-btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 0.3rem 0.8rem; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.gsearch-adv-btn.on, .gsearch-adv-btn.active { color: var(--text); border-color: var(--text); }
.gsearch-adv-row + .gsearch-filters { margin-top: 0.2rem; }
/* Photo en grand : croix blanche sur rond rouge, visible sur toutes les photos. */
.photo-zoom-close { background: #c8261f !important; color: #fff !important; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
/* Lecteurs intégrés (YouTube, X, Instagram, TikTok…) : même cadre partout,
   fond de la carte selon le thème. color-scheme « light » : le navigateur
   ne peint plus de fond blanc derrière le lecteur en mode sombre. */
.link-player, .inline-player { border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt, var(--surface)); }
.link-player.is-auto, .link-player.is-auto .link-player-face, .inline-player.is-auto { background: var(--surface); }
.inline-player iframe, .link-player-frame { color-scheme: light; background: transparent; }
.link-player.is-x, .link-player.is-insta { max-width: 550px; margin-left: auto; margin-right: auto; }
/* Messages : balayer vers la droite → Quitter / Supprimer. */
.dm-swipe { position: relative; overflow: hidden; }
.dm-swipe .dm-conv { position: relative; z-index: 1; background: var(--surface); transition: transform 0.2s; touch-action: pan-y; width: 100%; }
.dm-swipe.open .dm-conv { transform: translateX(6.5rem); }
.dm-swipe-act { position: absolute; left: 0; top: 0; bottom: 0; width: 6.5rem; border: 0; border-radius: 0; background: #c8261f; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.around-links { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.around-links .around-link { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.2rem !important; font-size: 0.78rem !important; border-radius: 12px; text-align: center; }
.around-links .around-link svg { color: var(--accent); }
.track-pin.dragging { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 4px rgba(200,38,31,0.35); z-index: 5; touch-action: none; }
.track-pin { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Échelle relative du tracé, discrète, en bas à gauche du plan. */
.plan-scale { position: absolute; left: 0; bottom: 3%; width: 100%; display: flex; align-items: flex-end; gap: 0.35rem; pointer-events: none; opacity: 0.55; z-index: 1; }
.plan-scale-bar { margin-left: 3%; height: 7px; border: 2px solid currentColor; border-top: 0; flex: 0 0 auto; }
.plan-scale-lbl { font-size: 0.72rem; font-weight: 700; line-height: 1; }
.pin-layer .plan-scale, .track-notes-map .plan-scale { color: #14161a; }
:root[data-theme="dark"] .plan-scale { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plan-scale { color: #fff; } }
.avenir-modes { align-items: center; }
.avenir-modes .avenir-add { margin-left: auto; flex: 0 0 auto; padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.88rem; font-weight: 700; }
.team-coach-link { margin: 0.4rem 0 0.8rem; }
.carnet-others-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.02em; margin: 1rem 0 0.4rem; opacity: 0.75; }
.outing-group-head .outing-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.outing-group-toggle { display: inline-block; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.outing-group.open .outing-group-toggle { background: var(--accent); color: var(--accent-ink); }
.team-seasons { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.verif-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; border-radius: 50%; font-size: 0.75em; font-weight: 800; line-height: 1; color: #fff; vertical-align: middle; }
.verif-badge.ok { background: #1f9d55; }
.verif-badge.wait { background: #2f6fd6; }
.podium-kicker.is-all { color: var(--accent); }
.verif-legend { margin: 0.2rem 0 0.6rem; }
.circuit-combo { position: relative; flex: 1 1 12rem; min-width: 10rem; }
.circuit-combo .circuit-find { width: 100%; font-weight: 700; padding-right: 2rem; }
.circuit-combo-chev { position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.circuit-combo-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 18rem; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.18); padding: 0.25rem 0; }
.circuit-combo-group { padding: 0.45rem 0.8rem 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.circuit-combo-opt { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0.5rem 0.8rem; font: inherit; color: var(--text); cursor: pointer; border-radius: 0; }
.circuit-combo-opt:hover, .circuit-combo-opt.on { background: rgba(127,127,127,0.12); }
.circuit-combo-opt.on { font-weight: 700; color: var(--accent); }
.circuit-combo-empty { padding: 0.6rem 0.8rem; color: var(--text-muted); }
.outings-card > .avenir-add { display: block; margin: 0.9rem auto 0.2rem; padding: 0.45rem 1.1rem; border-radius: 999px; font-weight: 700; }
/* Partage d'un post : toujours en haut à droite, même si l'en-tête passe à la ligne (« modifié »). */
.wall-post-head { position: relative; }
.wall-post-head > .post-share { position: absolute; top: -0.2rem; right: 0; }
/* « Préparer ce roulage » : un bouton à sa taille, pas sur toute la largeur. */
.chrono-next > button { align-self: flex-start; width: auto; margin-top: 0.5rem; padding: 0.5rem 1.1rem; }
.circuit-combo .circuit-find::-webkit-search-cancel-button { display: none; }
.card.can-hide .repost-box .wall-post-head { padding-right: 0; }
.repost-box .wall-post-photo.repost-photo { display: block; margin: 0.5rem auto 0; float: none; max-width: 100%; }
.dm-notif-row { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 0.7rem 0.4rem; font: inherit; color: var(--text); cursor: pointer; }
.dm-notif-ico { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-alt); color: var(--accent); flex: 0 0 auto; }
.dm-notif-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.dm-notif-row .dm-notif-count { position: static; margin-left: auto; }
.info-bubbles { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }
.info-bubble { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: none; border: 0; padding: 0; width: 4.6rem; color: var(--text); font: inherit; cursor: pointer; }
.info-bubble .ib-ico { width: 3.1rem; height: 3.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--border); color: var(--accent); }
.info-bubble.on .ib-ico { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.info-bubble .ib-lbl { font-size: 0.74rem; font-weight: 700; text-align: center; line-height: 1.15; }
.info-bubble-body { margin-top: 0.6rem; }
.team-icon-btn { width: 2.5rem; height: 2.5rem; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text-muted); display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.team-icon-btn:hover { background: var(--surface-alt); color: var(--text); }
.team-icon-btn.team-like.on { color: var(--accent); }
.circuit-combo-create { color: var(--accent); font-weight: 700; border-bottom: 1px solid var(--border) !important; }
/* Carnet : Roulages et Circuits en grand ; Teams et Bilan en glissant ou avec la flèche. */
@media (max-width: 959px) {
  .subnav.main-subnav.subnav-scroll { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex-wrap: nowrap; }
  .subnav.main-subnav.subnav-scroll::-webkit-scrollbar { display: none; }
  .subnav.main-subnav.subnav-scroll .subnav-btn { flex: 0 0 calc(50% - 1.6rem) !important; scroll-snap-align: start; font-size: 1.15rem; }
  .subnav-scroll.more-right::after, .subnav-scroll.more-left::before {
    content: '›'; position: sticky; right: 0; flex: 0 0 2.2rem; margin-left: -2.2rem; z-index: 2; pointer-events: none;
    display: flex; align-items: center; justify-content: flex-end; padding-right: 0.15rem;
    font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--accent);
    background: linear-gradient(to right, transparent, var(--surface-alt) 60%);
    top: auto; left: auto; height: auto; width: auto;
  }
  .subnav-scroll.more-left::before { content: '‹'; right: auto; left: 0; order: -1; margin-left: 0; margin-right: -2.2rem; justify-content: flex-start; padding: 0 0 0 0.15rem; background: linear-gradient(to left, transparent, var(--surface-alt) 60%); }
}
/* Podium : titre en haut (plus d'espace au-dessus), Partager en icône. */
.podium-head { align-items: center; min-height: 0; padding-top: 0.8rem; }
.podium-share.team-icon-btn { top: 0.35rem; right: 0.35rem; width: 2.2rem; height: 2.2rem; padding: 0; font-size: inherit; }
.verif-badge.wait { font-size: 0.95em; }

/* Pied d'un post façon Instagram : des icônes seules, sans cadre. */
.social-row .reaction-btn, .social-row .comment-btn, .social-row .repost-btn, .social-row .soc-ico-btn { border: 0; background: none; padding: 0.35rem 0.45rem; min-width: 0; width: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text); border-radius: 999px; box-shadow: none; }
.social-row .reaction-btn:hover, .social-row .comment-btn:hover, .social-row .repost-btn:hover, .social-row .soc-ico-btn:hover { background: var(--surface-alt); }
.social-row .reaction-btn.active { color: var(--accent); }
.social-row .soc-n { font-weight: 700; font-size: 0.9rem; }
.social-row .soc-ico-btn[data-action="share-post"] { margin-left: auto; }
.dmshare-list { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; margin-top: 0.5rem; }
.dmshare-row { display: flex; align-items: center; gap: 0.7rem; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 0.55rem 0.2rem; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.dmshare-row .dmshare-go { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.dmshare-row.sent .dmshare-go { color: var(--text-muted); }
.social-row { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.15rem; }
.social-row > .reaction-bar { order: 1; }
.social-row > .comment-btn { order: 2; margin-left: 0 !important; }
.social-row > .repost-btn, .social-row > .repost-count { order: 3; margin-left: 0 !important; }
.social-row > [data-action="dm-share-post"] { order: 4; }
.social-row > [data-action="share-post"] { order: 5; margin-left: auto !important; }
.social-row > .post-trash { order: 6; }
/* Barre du bas flottante façon Instagram (maquette C) : 5 onglets icône + mot, coins arrondis,
   fond translucide, le contenu défile dessous ; l'onglet actif a une pastille de couleur. */
@media (max-width: 959px) and (min-height: 501px), (max-width: 959px) and (orientation: portrait) {
  .bottom-nav { left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px; border: 1px solid var(--border); padding: 0.3rem 0.3rem; gap: 0.1rem;
    background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 8px 24px rgba(20,22,26,0.16); }
  .bottom-nav-btn { margin: 0; padding: 0.38rem 0.1rem 0.32rem; border-radius: 18px; gap: 0.1rem; }
  .bottom-nav-btn .bottom-nav-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.01em; }
  .bottom-nav-btn.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
  .bottom-nav-btn.active::after { display: none; }
  .bottom-nav-btn.bottom-nav-main .bottom-nav-icon { margin-top: -1.15rem; width: 3rem; height: 3rem; }
  .bottom-nav-btn.bottom-nav-main.active { background: none; }
  body.has-bottom-nav .wrap { padding-bottom: calc(6.2rem + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav-icon { position: relative; }
  .bottom-nav-icon .nav-dm-badge { position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
}
/* En-tête : le logo à gauche à la place de l'avatar. */
.header-logo { display: flex; align-items: center; gap: 0.5rem; background: none; border: 0; padding: 0.2rem 0; cursor: pointer; color: var(--text); font: inherit; margin-right: auto; }
.header-logo img { border-radius: 7px; }
.header-logo span { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.45rem; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
@media (min-width: 960px) { header.page-head .header-logo { display: none; } }
.person-gear { margin-left: auto; }
.pneus-chip.profile-pneus { width: auto; flex: 0 0 auto; }
.ph-links-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0 0.2rem; }
.ph-link-ico-btn { background: none; border: 0; padding: 0; width: auto; min-width: 0; cursor: pointer; border-radius: 50%; }
.ph-link-ico-btn .brand-logo { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; }
/* Barre du bas : disparaît quand on défile vers le bas, revient dès qu'on remonte (Alexis, Xav). */
@media (max-width: 959px) {
  .bottom-nav { transition: transform 0.25s ease, opacity 0.25s ease; }
  html.nav-mini .bottom-nav { transform: translateY(calc(100% + 1.5rem)); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .bottom-nav, .bottom-nav-btn .bottom-nav-label { transition: none !important; } }
/* Dessin simplifié : les outils avancés n'apparaissent qu'avec « Plus ». */
.annot-toolbar .annot-adv { display: none !important; }
.annot-toolbar.show-adv .annot-adv { display: inline-flex !important; }
.annot-toolbar.show-adv select.annot-adv { display: inline-block !important; }
.annot-more-btn { width: auto; padding: 0.4rem 0.8rem; font-weight: 700; }
/* En-tête : loupe, inviter un ami, cloche. */
.header-controls > #search-toggle, .header-controls > .gsearch-inline { order: 1; }
.header-controls > #invite-qr-btn { order: 2; }
.header-controls > #notifications-toggle { order: 3; }
/* Taille du texte « Grand » : tout grandit d'un cran (rem). */
html.text-lg { font-size: 112.5%; }
html.text-lg body { font-size: 1.06rem; }
/* Réglages : « Plus » replié sous l'essentiel. */
details.set-more { margin: 0.4rem 0 0.9rem; }
details.set-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.75rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--text); }
details.set-more > summary::-webkit-details-marker { display: none; }
details.set-more > summary::after { content: '▾'; color: var(--accent); }
details.set-more[open] > summary::after { content: '▴'; }
details.set-more[open] > summary { margin-bottom: 0.8rem; }
.mypage-title { margin: 1.1rem 0 0.5rem; }
/* Les 5 premières fois : le nom sous chaque icône du post. */
html.soc-labels .social-row > button[aria-label], html.soc-labels .social-row .reaction-btn[aria-label] { flex-direction: column; gap: 0.05rem; }
html.soc-labels .social-row > button[aria-label]::after, html.soc-labels .social-row .reaction-btn[aria-label]::after { content: attr(aria-label); font-size: 0.66rem; font-weight: 700; color: var(--text-muted); line-height: 1.1; }
.help-tip-btn { width: 2rem; height: 2rem; min-width: 0; padding: 0; border-radius: 50%; border: 1.5px solid var(--accent); background: none; color: var(--accent); font-weight: 800; font-size: 1rem; cursor: pointer; flex: 0 0 auto; display: inline-grid; place-items: center; }
[data-budget-root] > .help-tip-btn { float: right; margin: 0 0 0.4rem 0.6rem; }
.help-steps { list-style: none; padding: 0; margin: 0.4rem 0 0.6rem; display: flex; flex-direction: column; gap: 0.9rem; counter-reset: hs; }
.help-steps li { display: flex; gap: 0.8rem; align-items: center; }
.help-step-ico { width: 3.2rem; height: 3.2rem; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; }
.help-steps strong { display: block; }
.notif-level { display: flex; gap: 0.4rem; margin: 0.5rem 0 0.3rem; }
.notif-level button { flex: 1; width: auto; }
/* Saisie d'un chrono : étape 2 facultative, bien visible. */
details.cf-more > summary { list-style: none; cursor: pointer; display: block; text-align: center; padding: 0.7rem; margin-top: 0.6rem; border-radius: 12px; border: 1.5px dashed var(--border); color: var(--accent); font-weight: 700; }
details.cf-more > summary::-webkit-details-marker { display: none; }
details.cf-more[open] > summary { border-style: solid; margin-bottom: 0.6rem; }
/* Premier lancement */
.onb-modal { max-width: 440px; width: calc(100% - 32px); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.7rem; }
.onb-body { display: flex; flex-direction: column; gap: 0.55rem; }
.onb-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; width: 100%; text-align: left; padding: 0.85rem 1rem; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.onb-choice strong { font-size: 1.1rem; }
.onb-choice.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.onb-list { display: flex; flex-direction: column; gap: 0.3rem; max-height: 40vh; overflow-y: auto; }
.onb-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.onb-row > span:first-of-type { flex: 1; min-width: 0; font-weight: 700; }
.onb-row button { width: auto; }
.onb-nav { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 0.4rem; }
.onb-nav button { width: auto; min-width: 7rem; }
.onb-pneus { display: flex; justify-content: center; }
/* Pied d'un post : icônes seules, alignées, le nombre dessous (façon TikTok). */
.social-row { gap: 0.4rem; align-items: flex-start; }
.social-row > .reaction-bar .reaction-btn, .social-row > .comment-btn, .social-row > .repost-btn, .social-row > .repost-count, .social-row > .soc-ico-btn {
  flex-direction: column !important; align-items: center; justify-content: flex-start; gap: 0.1rem !important; min-width: 2.6rem; min-height: 2.6rem; padding: 0.3rem 0.35rem !important; }
.social-row .soc-n { font-size: 0.78rem; line-height: 1; }
.social-row > .repost-count { display: inline-flex; color: var(--text-muted); }
.social-row .reaction-top { font-size: 1.05rem; line-height: 1.2; }
html.soc-labels .social-row > button[aria-label]::after, html.soc-labels .social-row .reaction-btn[aria-label]::after { content: none; }
/* Plans : bouton Repères lisible (texte blanc sur rouge). */
.map-open-choice .primary, .map-open-choice .primary svg { color: var(--accent-ink, #fff) !important; }
.map-open-choice .help-tip-btn { flex: 0 0 2.2rem !important; width: 2.2rem !important; height: 2.2rem; padding: 0 !important; justify-content: center !important; align-items: center; line-height: 1; }

/* Fiche simplifiée (7 nov) : chiffres dans l'en-tête, bio au toucher,
   Quoi de neuf sous les compteurs, plus d'air entre les blocs. */
.person-page > .card, .person-page > .person-kpis, .person-page > .social-counts { margin-bottom: 1.1rem; }
.ph-kpis { margin: 0.8rem 0 0.2rem; gap: 0.4rem; }
.ph-kpis > div { padding: 0.5rem 0.3rem; background: var(--surface-alt); border-color: transparent; }
.ph-kpis strong { font-size: 1.45rem; }
.ph-kpis span { font-size: 0.7rem; line-height: 1.2; }
.ph-bio-edit { display: block; width: 100%; text-align: left; background: none; border: 1px dashed transparent; border-radius: 8px; padding: 0.25rem 0.35rem; margin: 0.1rem -0.35rem; font: inherit; color: var(--text); font-size: 0.95rem; line-height: 1.45; cursor: text; }
.ph-bio-edit:hover, .ph-bio-edit:focus-visible { border-color: var(--border); }
.ph-bio-edit.empty { color: var(--text-muted); border-color: var(--border); }
.mypage-composer { margin: 0.4rem 0 1.4rem; }
.look-more { margin: 0.6rem 0 0.4rem; border: 1px solid var(--border); border-radius: 12px; padding: 0.2rem 0.8rem; }
.look-more > summary { cursor: pointer; padding: 0.6rem 0; font-weight: 700; display: flex; flex-direction: column; gap: 0.1rem; list-style: none; }
.look-more > summary::-webkit-details-marker { display: none; }
.look-more > summary::after { content: '+'; position: absolute; right: 0.9rem; font-weight: 800; color: var(--text-muted); }
.look-more { position: relative; }
.look-more[open] > summary::after { content: '−'; }
.look-more > summary .help-text { font-weight: 400; font-size: 0.8rem; }
.pneus-style { margin: 0.4rem 0 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.pneus-preview { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.7rem; border-radius: 12px; background: var(--surface-alt); margin: 0.2rem 0 0.4rem; user-select: none; -webkit-user-select: none; }
.pneus-prev-banner { display: flex; align-items: center; gap: 0.6rem; margin: 0; padding: 0.6rem 0.7rem; min-height: 0; }
.pneus-prev-av .mini-avatar { width: 48px; height: 48px; }
.pneus-prev-name { font-weight: 700; }
.pneus-preview .dm-msg { align-self: flex-end; margin: 0; }
/* Photos de profil : pas d'appui long « Enregistrer l'image », pas de glisser. */
.mini-avatar img, .person-avatar img, .ph-cover img, .photo-zoom.is-protected img, .profile-avatar img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
/* Version D : Messages dans l'en-tête, à droite de la cloche. */
.header-controls > #messages-toggle { order: 4; position: relative; }
#messages-toggle svg { display: block; }
/* Fenêtre Pneus : tient dans l'écran ; croix et pied (Récolter, Fermer) toujours visibles. */
.mini-sheet.pneus-sheet { position: relative; max-height: calc(100vh - 2rem); max-height: calc(100svh - 2rem); padding-bottom: 0; }
.mini-sheet.pneus-sheet .mini-sheet-x { position: sticky; top: 0; float: right; margin: -0.4rem -0.4rem 0 0; z-index: 3; }
.mini-sheet.pneus-sheet .pneus-foot { position: sticky; bottom: 0; z-index: 3; background: var(--surface); margin: 0.6rem -1.2rem 0; padding: 0.7rem 1.2rem calc(0.7rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); justify-content: space-between; }
.mini-sheet.pneus-sheet .pneus-foot .pneus-collect { width: auto; flex: 1; margin: 0; }
.pneus-why > summary { cursor: pointer; font-weight: 700; }
/* 8 nov : 3 onglets, ma photo en haut à gauche, logo Pitbook (Kévin/Alexis). */
.logo-light, .logo-dark { display: block; height: 24px; width: auto; aspect-ratio: 440 / 96; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.header-logo { margin-right: auto; padding: 0.2rem 0.1rem; }
.header-me { display: flex; align-items: center; gap: 0.55rem; background: none; border: 0; padding: 0; margin-right: 0.55rem; cursor: pointer; color: var(--text); min-width: 0; flex: 0 0 auto; }
.header-me .mini-avatar { width: 34px; height: 34px; }
.header-me.is-open .mini-avatar { box-shadow: 0 0 0 2px var(--accent); border-radius: 50%; }
.header-me-name { display: none; font-weight: 700; }
.nav-brand .logo-light, .nav-brand .logo-dark { height: 28px; }
@media (min-width: 960px) {
  header.page-head .header-me { width: 100%; padding: 0.55rem 0.8rem; border-radius: 12px; margin: 0 0 0.2rem; order: 10; }
  header.page-head .header-me:hover, header.page-head .header-me.is-open { background: var(--surface-alt); }
  header.page-head .header-me-name { display: inline; }
}
.podium-scope { align-items: center; flex-wrap: wrap; }
.podium-scope .verif-legend { margin: 0 0 0 auto; white-space: nowrap; }
/* Ma page : fiche repliée (Alexis) ; engrenage en haut à droite de l'en-tête. */
.mypage-fiche { margin: 0 0 1.1rem; }
.mypage-fiche > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0.9rem 2.6rem 0.9rem 1rem; position: relative; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; font-style: italic; }
.mypage-fiche > summary::-webkit-details-marker { display: none; }
.mypage-fiche > summary .help-text { font-family: var(--font-body, inherit); font-style: normal; text-transform: none; font-weight: 400; font-size: 0.82rem; }
.mypage-fiche > summary::after { content: ''; position: absolute; right: 1.1rem; top: 50%; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.15s; }
.mypage-fiche[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.mypage-fiche[open] > summary { margin-bottom: 1.1rem; }
.person-page > .person-hero, .person-page > .person-head { position: relative; }
.person-page .person-gear { position: absolute; top: 0.6rem; right: 0.6rem; z-index: 3; background: var(--surface); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.person-page > .person-head:has(.person-gear) .mini-vitrine { margin-right: 2.7rem; }
/* PC : « Mon compte » dans la barre de gauche. */
.header-icon-btn.desk-only { display: none; }
@media (min-width: 960px) { header.page-head .header-icon-btn.desk-only { display: flex; } .header-controls > #settings-side { order: 5; } }
/* Roulage : le nom du circuit ouvre sa page. */
.outing-title-link { all: unset; cursor: pointer; font: inherit; color: inherit; text-transform: inherit; }
.outing-title-link span { color: var(--accent); font-style: normal; }
.outing-title-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.share-dm-ico { background: var(--accent); color: #fff; }
.dm-pick-list .mention-opt.picked { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent); border-radius: 12px; }
/* Roulage : les 5 onglets tiennent sur un téléphone. */
@media (max-width: 520px) { .pill-tabs:has(> [data-pill-group="outing"]) .pill-btn { font-size: 0.82rem; padding-left: 0.4rem; padding-right: 0.4rem; } }
/* Badge VIP et bons plans voyage. */
.vip-badge { display: inline-block; vertical-align: middle; margin-left: 0.35rem; padding: 0.05rem 0.42rem; border-radius: 6px; background: linear-gradient(135deg, #d4a937, #f2d27a); color: #14161a; font-family: var(--font-body, inherit); font-style: normal; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1.5; text-transform: uppercase; }
.outing-title .vip-badge { font-size: 0.85rem; vertical-align: 0.35em; }
.travel-tips-btn { width: 100%; margin: 0 0 0.8rem; justify-content: center; }
.schedule-note { margin-top: 0.7rem; line-height: 1.45; }
/* Roulage : Horaires et Chronos en texte, le reste en icônes (Xav). */
.outing-tabs { align-items: center; }
.outing-tabs .outing-tab-icons { margin-left: auto; display: inline-flex; gap: 0.15rem; }
.outing-tabs .pill-ico { width: 2.4rem; min-width: 0; padding-left: 0; padding-right: 0; display: inline-grid; place-items: center; }
.pill-euro { font-weight: 800; font-size: 1.1rem; line-height: 1; }
.hor-days { display: flex; gap: 0.4rem; margin: 0 0 0.7rem; flex-wrap: wrap; }
.hor-days button { border-radius: 999px; padding: 0.4rem 0.95rem; font-weight: 700; }
.hor-days button::first-letter { text-transform: uppercase; }
/* Pit lane ouverte, à côté des horaires. */
.pitlane-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; margin: 0 0 0.8rem; border-radius: 12px; background: var(--surface-alt); }
.pitlane-ico { width: 1.7rem; height: 1.7rem; border-radius: 6px; display: grid; place-items: center; background: #1f6fd1; color: #fff; font-weight: 800; flex: 0 0 auto; }
.evm-pit { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.evm-pit-groups { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.3rem; }
.evm-pit-groups .checklist-item { margin: 0; }
/* Engrenages ronds partout (PC compris). */
.team-gear, .person-page .person-gear { min-width: 0 !important; width: 2.2rem !important; height: 2.2rem !important; padding: 0 !important; flex: 0 0 2.2rem; border-radius: 50% !important; aspect-ratio: 1; }
.team-edit-page .page-title-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.team-edit-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.6rem; text-transform: uppercase; }
/* Team : Photo, Logo, Couverture sur une grille propre (mobile). */
.look-team-media { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.look-team-media > button { flex: 1 1 28%; min-width: 0; padding: 0.55rem 0.4rem; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-team-media > .link-btn { flex-basis: 100%; }
.team-site-btn { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.85rem; }
@media (max-width: 520px) {
  .look-team-media { gap: 0.35rem; }
  .look-team-media .look-team-av .mini-avatar { width: 38px; height: 38px; }
  .look-team-media > button { font-size: 0.8rem; padding: 0.55rem 0.2rem; }
}
/* 11 nov : Mon compte dans l'en-tête (mobile), QR code dans Mon compte, échelle, bulles d'infos ouvertes. */
.header-controls > #settings-side { order: 5; }
.section-heading { position: relative; }
.heading-qr { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; }
.heading-qr svg { width: 20px; height: 20px; }
.scale-toggle { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.scale-toggle.on { border-color: var(--accent, #c8261f); color: var(--accent, #c8261f); }
.info-bubble-body { scroll-margin-top: calc(var(--header-h, 64px) + 56px); }
.dm-bubble .dm-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; font-weight: 600; }
details.pneus-style > summary { cursor: pointer; font-weight: 700; padding: 0.6rem 0; }
details.pneus-style[open] > summary { margin-bottom: 0.4rem; }
/* Partager : toujours au bout à droite de sa rangée, PC comme mobile (Alexis). */
.ph-body .outing-actions > .team-icon-btn { flex: 0 0 2.4rem; width: 2.4rem; height: 2.4rem; }
.ph-body .outing-actions > [data-action="share-team"], .outing-actions.team-actions > [data-action="share-team"] { margin-left: auto; }
.ph-body .outing-actions.team-actions { align-items: center; }

/* Tableau de bord des roulages d'un team : état de chaque roulage. */
.team-ev-actions{display:flex;gap:0.5rem;flex-wrap:wrap;margin-bottom:0.6rem}
.team-ev-actions .add-chrono-btn{flex:1 1 auto;margin:0}
.todo-chips{display:flex;gap:0.35rem;flex-wrap:wrap;margin:-0.15rem 0 0.7rem;padding:0 0.2rem}
.todo-chip{font:600 0.72rem/1 'Barlow',sans-serif;padding:0.35rem 0.6rem;border-radius:99px;border:1px solid #c8261f;color:#c8261f;background:transparent;cursor:pointer;min-height:0;width:auto}
.todo-ok{font:600 0.72rem/1 'Barlow',sans-serif;color:var(--muted,#6b6e75)}
.team-event-add-rider-form input[type="search"]{flex:1 1 auto;min-width:0;margin:0}
.checkin-box{display:inline-flex;align-items:center;margin-right:0.2rem}
.checkin-box input{width:1.15rem;height:1.15rem;margin:0}
.outing-last-visit{margin-top:0.3rem}

/* Ma page : grille de boutons (une section à la fois). */
.mp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.45rem;margin:0.6rem 0 0.8rem}
@media (min-width:700px){.mp-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.mp-tab{font:600 0.85rem/1.15 'Barlow',sans-serif;padding:0.65rem 0.4rem;border-radius:12px;border:1px solid var(--border);background:var(--surface);color:var(--text);min-height:2.6rem;width:100%;margin:0;text-align:center}
.mp-tab.active{background:#c8261f;border-color:#c8261f;color:#fff}
.mp-sec[hidden]{display:none !important}
.fsug-reopen{margin:0.2rem 0 0.7rem}
.fsug-reopen button{width:auto}
.mp-grid.mp-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.mp-grid-4 .mp-tab{font-size:0.78rem;padding:0.6rem 0.2rem}
.mp-tab{font-size:0.8rem;padding-left:0.15rem;padding-right:0.15rem;overflow-wrap:normal;word-break:normal;hyphens:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vehicle-card.active{border-color:#c8261f}
.vehicle-acts{display:flex;gap:0.5rem;align-items:center;margin-top:0.4rem}
.vehicle-acts button{width:auto;margin:0}

/* Social : Partager toujours tout à droite, au même endroit ; la corbeille (mes posts) juste avant. */
.social-row > [data-action="share-post"] { order: 5; margin-left: auto !important; }
.feed-entry-foot.social-row > .post-trash, .social-row > .post-trash { order: 4; margin-left: auto !important; }
.social-row:has(> .post-trash) > [data-action="share-post"] { margin-left: 0 !important; }
.feed-entry-foot.social-row > .post-inc-date { order: 4; margin-left: 0 !important; }
.mp-vis{display:flex;align-items:center;gap:0.4rem;flex-wrap:wrap;margin:0 0 0.5rem;font-size:0.8rem}
.mp-vis .link-btn{width:auto;font-size:0.8rem}
/* Corbeille de mes posts : petite, en haut à droite, à côté de l'heure. */
.wall-post-head .post-trash-head { flex: 0 0 auto; width: 1.8rem; height: 1.8rem; min-width: 0; padding: 0; margin: 0 0 0 0.1rem; border: 0; border-radius: 50%; background: none; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; opacity: 0.7; }
.wall-post-head .post-trash-head:hover { opacity: 1; color: #c8261f; background: color-mix(in srgb, #c8261f 10%, transparent); }
.mp-vis > span{flex:1 1 auto;min-width:0}
.mp-edit{flex:0 0 auto;width:2rem;height:2rem;min-width:0;padding:0;margin:0;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--text);display:inline-flex;align-items:center;justify-content:center}
.mp-edit:hover{border-color:#c8261f;color:#c8261f}
.look-field-focus{outline:2px solid #c8261f;outline-offset:4px;border-radius:10px;transition:outline-color .3s}

/* Budget : le libellé prend la place, le montant une case courte (4 chiffres + €). */
.budget-row .setup-field.setup-half { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.budget-row .setup-field.setup-half > span:first-child { flex: 1 1 auto; min-width: 0; }
.budget-row .setup-field .money-in { flex: 0 0 6.6rem; width: 6.6rem; min-width: 0 !important; }
.budget-line { grid-template-columns: minmax(0, 1fr) 6.6rem auto; }
.budget-line .money-in { flex: 0 0 6.6rem; }
@media (min-width: 960px) { .budget-line .money-in { flex-basis: 6.6rem; } }
/* Véhicules : logo | modèle et numéro | actions, sans chevauchement. */
.vehicle-card { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
.vehicle-logo { width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--surface-alt, #ece9e2); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.vehicle-card.active .vehicle-logo { background: #c8261f; color: #fff; }
.vehicle-brand { font: 700 0.5rem/1 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.03em; max-width: 3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0.1rem; }
.vehicle-main { display: flex; flex-direction: column; min-width: 0; gap: 0.1rem; }
.vehicle-name { font: 700 1.05rem/1.2 'Barlow', sans-serif; overflow-wrap: anywhere; }
.vehicle-num { align-self: flex-start; position: static !important; }
.vehicle-card .vehicle-acts { flex-direction: column; align-items: flex-end; margin: 0; }
.mp-edit-btn{flex:0 0 auto;display:inline-flex;align-items:center;gap:0.3rem;width:auto;margin:0;padding:0.3rem 0.65rem;border:1px solid #c8261f;border-radius:99px;background:transparent;color:#c8261f;font:600 0.78rem/1 'Barlow',sans-serif}
.mp-edit-btn:hover{background:#c8261f;color:#fff}
.pick-pins{max-height:50vh;overflow:auto}
/* Logo véhicule : un vibreur autour (rouge et blanc pour le véhicule utilisé). */
.vehicle-logo { background: repeating-conic-gradient(#b9b6ae 0 22.5deg, #fff 22.5deg 45deg); padding: 4px; color: #fff; position: relative; }
.vehicle-card.active .vehicle-logo { background: repeating-conic-gradient(#c8261f 0 22.5deg, #fff 22.5deg 45deg); color: #fff; }
.vehicle-logo::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #14161a; }
.vehicle-logo > * { position: relative; z-index: 1; }
.vehicle-brand { color: #fff; }
.vehicle-logo { padding: 5px; }
.vehicle-logo::before { inset: 5px; }
/* Feuilles d'édition (sponsors…) : la ligne garde son nom et son site, la croix reste petite. */
.mini-sheet .look-item { display: flex; align-items: center; gap: 0.6rem; }
.mini-sheet .look-item .link-btn { width: auto; flex: 0 0 auto; margin: 0; padding: 0.3rem 0.5rem; }
.mini-sheet .look-item-main { flex: 1 1 auto; min-width: 0; }
.mini-sheet .look-item-main .help-text { overflow-wrap: anywhere; word-break: normal; }
.mini-sheet .look-add-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mini-sheet .look-add-row button { width: auto; flex: 1 1 auto; }

/* Ma page (option B) : tuiles vivantes, deux colonnes, « À venir » en large et foncé. */
.mp-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.6rem 0 0.9rem; }
@media (min-width: 700px) { .mp-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mp-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 0.15rem; min-height: 4.6rem; width: 100%; margin: 0; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; }
.mp-tile.wide { grid-column: 1 / -1; }
.mp-tile .mp-k { font: 700 0.66rem/1 'Barlow Condensed', 'Barlow', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mp-tile .mp-v { font: 700 italic 1.3rem/1.1 'Barlow Condensed', 'Barlow', sans-serif; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-tile .mp-s { font-size: 0.72rem; color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-tile .mp-j { color: #c8261f; }
.mp-tile.hot { background: #14161a; color: #f4f3ef; border-color: #14161a; background-image: linear-gradient(90deg, transparent 0 calc(100% - 10px), rgba(200,38,31,0.9) calc(100% - 10px)); }
.mp-tile.hot .mp-k, .mp-tile.hot .mp-s { color: rgba(244,243,239,0.7); }
.mp-tile.hot .mp-j { color: #ff6b5f; }
.mp-tile.active { border-color: #c8261f; box-shadow: inset 0 0 0 1px #c8261f; }
.mp-tile.hot.active { box-shadow: inset 0 0 0 2px #c8261f; }
.mp-logos { display: inline-flex; gap: 0.25rem; min-height: 1.3rem; align-items: center; }
.mp-logos img, .mp-logos i { width: 1.6rem; height: 1.2rem; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-alt); object-fit: contain; font: 700 normal 0.7rem/1.2rem 'Barlow', sans-serif; text-align: center; font-style: normal; }
@media (prefers-reduced-motion: no-preference) { .mp-tile { transition: transform .12s, border-color .12s; } .mp-tile:active { transform: scale(0.98); } }
/* Tuiles : Réseau en vitrine (icônes des réseaux, logos sponsors, teams). */
.mp-tile.hot .mp-logos { gap: 0.35rem; flex-wrap: wrap; }
.mp-tile .mp-ico { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.mp-tile .mp-ico .brand-logo { width: 100%; height: 100%; border-radius: 50%; }
.mp-tile .mp-ico svg { width: 15px; height: 15px; }
.mp-tile .mp-logo { width: 2.2rem; height: 1.7rem; border-radius: 5px; background: #fff; object-fit: contain; font: 700 normal 0.8rem/1.7rem 'Barlow', sans-serif; color: #14161a; text-align: center; font-style: normal; display: inline-block; }
.mp-tile .mp-team .mini-avatar { width: 1.7rem; height: 1.7rem; }
/* Crayon rond à côté d'un titre, ajouts discrets, blocs touchables. */
.mp-pen { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; min-width: 0; padding: 0; margin: 0 0 0 0.45rem; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); vertical-align: middle; flex: 0 0 auto; }
.mp-pen:hover { border-color: #c8261f; color: #c8261f; }
.section-title .mp-pen { font-size: 0; }
.mp-add { width: 100%; margin: 0.2rem 0 0; padding: 0.7rem; border: 1.5px dashed var(--border); border-radius: 12px; background: transparent; color: var(--text-muted); font-weight: 600; }
.mp-add:hover { border-color: #c8261f; color: #c8261f; }
.mp-editable { cursor: pointer; }
.ph-feature.mp-editable:hover, .mini-vitrine.mp-editable:hover { outline: 2px solid #c8261f; outline-offset: 2px; }
.mp-sec-title { margin: 0.4rem 0 0.4rem; display: flex; align-items: center; }
.mp-edit-btn { display: none; }

/* Mon garage › Véhicules : pass paddock. */
.vehicle-card.vehicle-pass { display: block; padding: 0; overflow: hidden; }
.vehicle-pass .pass-band { height: 10px; background: repeating-linear-gradient(90deg, #b9b6ae 0 16px, #fff 16px 32px); }
.vehicle-pass.active .pass-band { background: repeating-linear-gradient(90deg, #c8261f 0 16px, #fff 16px 32px); }
.vehicle-pass .pass-in { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.75rem 0.9rem 0.5rem; }
.vehicle-pass .vehicle-name { font: 700 1.15rem/1.15 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.01em; }
.vehicle-pass .pass-num { font: 700 italic 1.9rem/1 'Barlow Condensed', 'Barlow', sans-serif; color: #c8261f; font-variant-numeric: tabular-nums; }
.vehicle-pass .pass-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 0.9rem 0.5rem; }
.vehicle-pass .pass-chips span { font-size: 0.75rem; background: var(--surface-alt); border-radius: 99px; padding: 0.2rem 0.6rem; }
.vehicle-pass .vehicle-acts { flex-direction: row; justify-content: flex-end; align-items: center; gap: 0.6rem; padding: 0 0.9rem 0.7rem; }
/* Mon garage › Pneus : jauges d'usure. */
.tyre-gauges { display: grid; gap: 0.75rem; }
.tyre-gauge .tg-head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.tyre-gauge .tg-days { font: 700 italic 1.05rem 'Barlow Condensed', 'Barlow', sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tyre-gauge .tg-badge { font: 600 0.68rem/1 'Barlow', sans-serif; background: #c8261f; color: #fff; border-radius: 99px; padding: 0.15rem 0.45rem; vertical-align: middle; }
.tyre-gauge .tg-bar { height: 9px; border-radius: 99px; background: var(--surface-alt); overflow: hidden; margin: 0.3rem 0 0.2rem; }
.tyre-gauge .tg-bar i { display: block; height: 100%; border-radius: 99px; background: #b9b6ae; }
.tyre-gauge.cur .tg-bar i { background: #c8261f; }

/* Social : recherche de posts et #hashtags. */
.wall-search { display: flex; gap: 0.5rem; margin: 0.75rem 0; }
.wall-search input { flex: 1; min-width: 0; border: 1px solid var(--border, #dcd9d1); border-radius: 99px; padding: 0.6rem 1rem; background: var(--surface, #fff); font: inherit; }
.wall-search .ghost { border-radius: 99px; }
.wall-search-head { margin: 0 0 0.6rem; font-size: 0.9rem; }
.mention-link.hashtag { color: #c8261f; font-weight: 600; }

/* Fiche : ajouter un réseau (réseau choisi, adresse préremplie). */
.look-add-link { display: grid; gap: 0.5rem; }
.link-nets { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.link-net { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem 0.25rem 0.25rem; border-radius: 99px; border: 1px solid var(--border, #dcd9d1); background: var(--surface, #fff); font: 600 0.8rem 'Barlow', sans-serif; color: inherit; }
.link-net .brand-logo { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; }
.link-net .brand-logo svg { width: 15px; height: 15px; }
.link-net.active { border-color: #c8261f; box-shadow: 0 0 0 1px #c8261f inset; }
.link-handle { display: flex; align-items: center; border: 1px solid var(--border, #dcd9d1); border-radius: 10px; background: var(--surface, #fff); overflow: hidden; }
.link-handle .link-prefix { padding: 0 0 0 0.7rem; color: var(--muted, #6b6b6b); white-space: nowrap; font-size: 0.9rem; }
.link-handle input { flex: 1; min-width: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; padding-left: 0.15rem; }
.link-handle:focus-within { border-color: #c8261f; }

/* Ma page : réseaux en grand sous la bannière. */
.socials-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.6rem 0 0.4rem; align-items: stretch; }
.socials-bar.one { grid-template-columns: minmax(0, 1fr); }
.socials-bar .mp-add { grid-column: 1 / -1; }
.social-big { display: flex; align-items: center; gap: 0.6rem; width: 100%; margin: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-align: left; min-height: 3.4rem; }
.social-big .brand-logo { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-grid; place-items: center; }
.social-big .brand-logo svg { width: 22px; height: 22px; }
.social-big-main { display: flex; flex-direction: column; min-width: 0; }
.social-big-main strong { font: 700 0.98rem/1.1 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-big { gap: 0.5rem; padding: 0.5rem 0.6rem; }
.social-big .brand-logo { width: 2.2rem; height: 2.2rem; }
.social-big-main span { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-big:active { transform: scale(0.98); }
.socials-bar .social-pen { grid-column: 1 / -1; justify-self: end; margin: -0.1rem 0 0; }
/* Tuiles : on voit qu'on peut toucher. */
.mp-hint { margin: 0.5rem 0 0; font-size: 0.82rem; }
.mp-tile .mp-k { display: flex; width: 100%; justify-content: space-between; align-items: center; }
.mp-tile .mp-go { font: 700 normal 1.25rem/0.6 'Barlow', sans-serif; color: #c8261f; transition: transform .15s; }
.mp-tile.hot .mp-go { color: #ff6b5f; }
.mp-tile.active .mp-go { transform: rotate(90deg); }
.mp-tile { box-shadow: 0 1px 0 rgba(20,22,26,0.06), 0 2px 6px rgba(20,22,26,0.05); }

/* Carnet › Courses : explication (pas un roulage). */
.courses-intro { position: relative; overflow: hidden; padding-top: 1.2rem; }
.courses-band { position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, #c8261f 0 16px, #fff 16px 32px); }
.courses-intro p { margin: 0 0 0.6rem; line-height: 1.45; }
.courses-weekend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.4rem; }
.courses-weekend span { font: 700 0.85rem/1 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.4rem 0.6rem; border-radius: 8px; background: var(--surface-alt); }
.courses-weekend span.race { background: #14161a; color: #f4f3ef; }
.courses-weekend i { font-style: normal; color: var(--text-muted); }
.courses-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.5rem; }
.courses-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem; align-items: baseline; }
.courses-list strong { font: 700 0.95rem 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.03em; }
.courses-list span { font-size: 0.88rem; color: var(--text-muted); }
.courses-cta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.courses-cta button { width: auto; flex: 0 0 auto; }
/* Réseaux : une seule fois, en grand et lisibles, sous les tuiles (retour Xav). */
.socials-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; margin: 0.2rem 0 1rem; }
.socials-bar .section-title { display: flex; align-items: center; margin: 0.2rem 0 0; }
.social-big { gap: 0.85rem; padding: 0.75rem 0.9rem; min-height: 4.2rem; border-radius: 16px; }
.social-big .brand-logo { width: 3rem; height: 3rem; }
.social-big .brand-logo svg { width: 28px; height: 28px; }
.social-big-main strong { font-size: 1.25rem; line-height: 1.1; }
.social-big-main span { font-size: 1rem; color: var(--text); opacity: 0.75; }
.social-big::after { content: '›'; margin-left: auto; font: 700 1.6rem/1 'Barlow', sans-serif; color: #c8261f; }
/* Un réseau = une tuile, un sponsor = une tuile (sous la grille de Ma page). */
.net-tiles-wrap { margin: 0.2rem 0 1rem; }
.net-tiles-wrap .section-title { display: flex; align-items: center; margin: 0.3rem 0 0.5rem; }
.net-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
@media (min-width: 700px) { .net-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.net-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; width: 100%; margin: 0; padding: 0.8rem 0.85rem; min-height: 7.4rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); text-align: left; box-shadow: 0 1px 0 rgba(20,22,26,0.06), 0 2px 6px rgba(20,22,26,0.05); overflow: hidden; }
.net-tile .brand-logo { width: 3rem; height: 3rem; border-radius: 50%; display: inline-grid; place-items: center; margin-bottom: 0.15rem; }
.net-tile .brand-logo svg { width: 28px; height: 28px; }
.net-tile strong { font: 700 1.2rem/1.1 'Barlow Condensed', 'Barlow', sans-serif; text-transform: uppercase; letter-spacing: 0.01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-tile span { font-size: 0.95rem; color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-tile .net-sp-logo { width: 4.2rem; height: 3rem; border-radius: 8px; background: #fff; border: 1px solid var(--border); object-fit: contain; display: inline-block; font: 700 normal 1.3rem/3rem 'Barlow', sans-serif; text-align: center; color: #14161a; margin-bottom: 0.15rem; }
.net-tile.add { border-style: dashed; box-shadow: none; background: transparent; }
.net-tile.add b { width: 3rem; height: 3rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-alt); font: 700 1.6rem/1 'Barlow', sans-serif; color: #c8261f; }
.net-tile:active { transform: scale(0.98); }
/* Ma page : les posts toujours affichés, sous les tuiles. */
.mp-posts-all { margin-top: 1rem; }
.mp-posts-all > .section-title { margin: 0 0 0.5rem; }
/* Réglages d'un team : la fiche en aperçu, logo et bannière touchables. */
.team-edit-hero .ph-cover[data-team-cover], .person-avatar[data-team-avatar] { cursor: pointer; }
.team-edit-hero .ph-cover[data-team-cover]::after { content: '✎'; position: absolute; right: 0.6rem; bottom: 0.5rem; width: 2rem; height: 2rem; border-radius: 50%; background: rgba(20,22,26,0.7); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.team-edit-hero .ph-cover { position: relative; }
.look-tap-hint { margin-top: -0.2rem; }

/* Page d'un team : les news d'abord, repliées après 3 posts. */
.team-posts-first { margin-top: 0.4rem; }
.team-news.collapsed { max-height: 34rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.team-news-more { width: 100%; margin: 0.2rem 0 0.8rem; border-radius: 999px; font-weight: 700; }
.mp-posts-all + .mp-hint, .team-posts-first + .mp-hint { margin-top: 0.8rem; }
