/* ── RESET & VARIABLES ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ── Couleurs principales ── */
    --red:         #D72B2B;
    --red-dark:    #b81f1f;
    --red-light:   #fdf2f2;
    --red-mid:     #fce4e4;

    /* ── Disciplines ── */
    --route:       #185FA5;
    --route-light: #eff6ff;
    --gravel:      #c4610a;
    --gravel-light:#fff7ed;
    --vtt:         #1a6b1a;
    --vtt-light:   #f0fdf4;

    /* ── Allures ── */
    --allure-a:    #D72B2B;
    --allure-b:    #E8943A;
    --allure-c:    #4B8FD4;
    --allure-d:    #5BAD6F;

    /* ── Food truck ── */
    --orange:      #ea580c;
    --orange-mid:  #fb923c;
    --orange-light:#fff7ed;

    /* ── Facebook ── */
    --facebook:    #1877F2;

    /* ── Neutres ── */
    --black:       #111827;
    --dark:        #1f2937;
    --white:       #fff;
    --gray-bg:     #F9FAFB;
    --gray-light:  #F3F4F6;
    --gray-mid:    #E5E7EB;
    --gray-text:   #6B7280;
    --gray-subtle: #9CA3AF;

    /* ── Typographie ── */
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    /* Legacy aliases — à ne plus utiliser en nouveau code */
    --fd: var(--font);
    --fb: var(--font);

    /* ── Border radius ── */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-xl:   18px;
    --radius-full: 9999px;

    /* ── Ombres ── */
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-md:   0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    --shadow-lg:   0 8px 28px rgba(0,0,0,0.13);

    /* ── Transitions ── */
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;
}

html {
    scroll-behavior: smooth;
}

/* ── Focus visible global (accessibilité) ── */
:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Ne pas afficher l'outline sur les clics souris */
:focus:not(:focus-visible) {
    outline: none;
}

body {
    font-family: var(--fb);
    background: var(--gray-bg);
    color: var(--black);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

.seo {
    display: none !important;
}

/* ── NAV ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-mid);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--fd);
    font-size: 22px;
    font-weight: 900;
    color: var(--black);
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo span {
    color: var(--red);
}

.nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--gray-text);
  transition: color var(--transition), background var(--transition);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  justify-content: center;
}

.nav-link:hover {
    background: var(--gray-light);
    color: var(--black);
}

.nav-link:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.nav-link.active {
  background: none;
  color: var(--red);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--red);
  border-radius: 2px;
  margin-top: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
    transition: .3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 60px 0 0;
    background: #fff;
    z-index: 99;
    padding: 20px 24px;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--black);
    border-bottom: 1px solid var(--gray-light);
}

.mobile-link.active {
    color: var(--red);
}

/* ═══ Nav auth ═══ */
.nav-auth {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 9px;
  border: 2px solid var(--red);
  color: var(--red);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
.btn-login:hover {
  background: var(--red);
  color: #fff;
}

/* Avatar */
.user-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--red);
}

.user-avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 100;
}

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-dropdown-header strong {
    font-size: 14px;
}

.user-dropdown-header span {
    font-size: 12px;
    color: #888;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: #f5f5f5;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

.user-dropdown-logout {
    color: var(--orange);
}

/* ── DIVIDER ── */
.divider {
    height: 3px;
    background: linear-gradient(90deg, var(--red), transparent);
}

/* ── HERO (index) ── */
.hero {
    position: relative;
    min-height: 520px;
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.15) 100%), url('../img/banner_fb.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 0;
}

.hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    z-index: 2;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.hero-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stat-ico {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.stat-ico svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

.stat-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2px;
}

.stat-val {
    font-family: var(--fd);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.stat-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 1px;
}

/* ── PROFILE HERO (mon-compte) ── */
.profile-hero {
    background: var(--gray-bg);
    border-bottom: 1px solid var(--gray-mid);
    padding: 48px 0 40px;
}

.profile-hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.ph-avatar-wrap {
    flex-shrink: 0;
}

.ph-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--red);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ph-avatar-initials {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red) 0%, #c0392b 100%);
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    font-family: var(--fd);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    letter-spacing: -1px;
}

.ph-identity {
    flex: 1;
    min-width: 180px;
}

.ph-name {
    font-family: var(--fd);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--black);
    line-height: 1.1;
    margin-bottom: 4px;
}

.ph-email {
    font-size: 14px;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.ph-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ph-counters {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 1px solid var(--gray-mid);
    border-radius: var(--radius-xl);
    padding: 20px 28px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.ph-counter {
    text-align: center;
}

.ph-counter-val {
    font-family: var(--fd);
    font-size: 28px;
    font-weight: 800;
    color: var(--black);
    line-height: 1;
}

.ph-counter-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-text);
    margin-top: 4px;
}

.ph-counter-sep {
    width: 1px;
    height: 36px;
    background: var(--gray-mid);
}

@media (max-width: 768px) {
    .profile-hero-inner {
        padding: 0 24px;
        gap: 20px;
    }

    .ph-avatar-img,
    .ph-avatar-initials {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }

    .ph-counters {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-hero {
        padding: 32px 0 28px;
    }

    .ph-name {
        font-size: 22px;
    }
}

/* ── PAGE HERO (inscription — format bannière Facebook 1200×628) ── */
.page-hero {
    position: relative;
    width: 100%;
    height: 350px;
    min-height: 220px;
    background-color: #000;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Gradient de lisibilité sur le bas — séparé de l'image pour ne pas affecter contain */
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0.15) 70%, transparent 100%);
    pointer-events: none;
}

.page-hero-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

.ph-title {
    font-family: var(--fd);
    font-size: clamp(22px, 4vw, 46px);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 20px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.ph-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.ph-stat {
    display: flex;
    flex-direction: column;
}

.ph-stat-val {
    font-family: var(--fd);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.ph-stat-lbl {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

/* ── PAGE HEADER (sorties) ── */
.page-header {
    background: linear-gradient(135deg, var(--dark), #2a2a2a);
    padding: 48px 0 40px;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.ph-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 6px;
}

.ph-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ph-count-val {
    font-family: var(--fd);
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.ph-count-lbl {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
}

/* ── CAGNOTTE BANNER (sorties + inscription) ── */
.cagnotte-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-top: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
    padding: 28px 0;
}

.cagnotte-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cagnotte-icon {
    width: 44px;
    height: 44px;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cagnotte-icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

.cagnotte-body {
    flex: 1;
}

.cagnotte-title {
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 3px;
}

.cagnotte-text {
    font-size: 13px;
    color: #a16207;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .cagnotte-inner {
        padding: 0 20px;
    }

    .ph-count {
        display: none;
    }
}

.ph-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ph-eyebrow::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--red);
}

.ph-count {
    font-family: var(--fd);
    font-size: 72px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    line-height: 1;
    user-select: none;
}

/* ── LEGEND BAR ── */
.legend-bar {
    background: #fff;
    border-bottom: 1px solid var(--gray-mid);
    padding: 16px 0;
}

.legend-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-a { background: var(--allure-a); }
.dot-b { background: var(--allure-b); }
.dot-c { background: var(--allure-c); }
.dot-d { background: var(--allure-d); }

.legend-speed {
    color: var(--gray-text);
}

/* ── FILTERS (index & sorties) ── */
.filters-bar {
    background: #fff;
    border-bottom: 1px solid var(--gray-mid);
    padding: 20px 0;
    position: sticky;
    top: 60px;
    z-index: 90;
}

.filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.filters-label svg {
    width: 14px;
    height: 14px;
    stroke: var(--red);
    fill: none;
    stroke-width: 2;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fg label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 6px;
}

.fg select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 7px;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--black);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    transition: border-color .2s;
}

.fg select:focus {
    outline: none;
    border-color: var(--red);
}

.fil-select {
    padding: 9px 32px 9px 12px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 7px;
    font-family: var(--fb);
    font-size: 13px;
    color: var(--black);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    transition: .2s;
}

.fil-select:focus {
    outline: none;
    border-color: var(--red);
}

.fil-sep {
    width: 1px;
    height: 24px;
    background: var(--gray-mid);
    flex-shrink: 0;
}

.count-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-text);
    margin-left: auto;
}

/* ── FILTER PANEL (traces) ── */
.filter-panel {
    background: #fff;
    border-bottom: 2px solid var(--gray-mid);
    padding: 0;
}

.filter-panel-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.filter-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--gray-mid);
}

.ftab {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-text);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: .2s;
    user-select: none;
    white-space: nowrap;
}

.ftab:hover {
    color: var(--black);
}

.ftab.active {
    color: var(--red);
    border-bottom-color: var(--red);
}

.filter-body {
    padding: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.fg-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
}

/* ── CHIP FILTERS ── */
.chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-mid);
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    background: #fff;
    color: var(--black);
    user-select: none;
    white-space: nowrap;
}

.chip:hover {
    border-color: #aaa;
}

.chip.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.chip-route.active  { background: var(--route);  border-color: var(--route); }
.chip-gravel.active { background: var(--gravel); border-color: var(--gravel); }
.chip-vtt.active    { background: var(--vtt);    border-color: var(--vtt); }

/* ── RANGE SLIDER ── */
.range-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-val {
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

input[type=range] {
    width: 100%;
    accent-color: var(--red);
    height: 4px;
    cursor: pointer;
}

/* ── SORT ── */
.sort-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sort-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
    white-space: nowrap;
}

.sort-select {
    padding: 8px 30px 8px 12px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 7px;
    font-family: var(--fb);
    font-size: 13px;
    color: var(--black);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--red);
}

/* ── SECTION (index) ── */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-family: var(--fd);
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title svg {
    width: 22px;
    height: 22px;
    stroke: var(--red);
    fill: none;
    stroke-width: 2;
}

.see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
    border: 1.5px solid var(--red);
    padding: 8px 16px;
    border-radius: 7px;
    transition: .2s;
}

.see-all:hover {
    background: var(--red);
    color: #fff;
}

.see-all svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* ── RESULTS HEADER (traces) ── */
.results-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-count {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 700;
}

.res-count span {
    color: var(--red);
}

/* ── MAIN / RIDES (sorties) ── */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 60px;
}

.month-group {
    margin-bottom: 48px;
}

.month-label {
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-mid);
}

.rides-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── RIDE CARD ── */
.ride-card {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: none;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.ride-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* APRÈS */
.rc-date-sidebar {
  flex-shrink: 0;
  width: 76px;
  background: var(--red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
  gap: 2px;
}

.date-day {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

.date-month {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.date-time {
  font-size: 0.90rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
  margin-top: 8px;
  opacity: 0.9;
}

.rc-pending {
    color: var(--gray-text);
}

.rc-title-row {
    display: flex;
    align-items: center;
    /* Aligne verticalement le logo et le texte sur la même ligne */
    gap: 12px;
    /* Espace entre le titre et le logo */
    margin-bottom: 4px;
    /* Espace avec la ligne du lieu dessous */
}

.rc-title {
    margin: 0;
    /* On enlève les marges par défaut pour un alignement précis */
    font-size: 1.4rem;
    font-weight: 800;
}

.rc-fb-link {
    color: var(--facebook);
    display: flex;
    transition: transform var(--transition);
}

.rc-fb-link:hover {
    transform: scale(1.15);
}

.rc-main {
    flex: 1;
    padding: 20px;
}

.rc-inscrits-box {
    width: 100%;
}

.rc-foodtruck-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px 4px 8px;
    background: linear-gradient(135deg, var(--orange-light), #ffedd5);
    border: 1.5px solid var(--orange-mid);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--orange);
}

.rc-foodtruck-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--orange-mid);
    flex-shrink: 0;
}

.rc-food-note {
    display: flex;
    align-items: flex-start;
    background: #fff9e6;
    color: var(--gray-text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 0;
    border-left: 3px solid #f1c40f;
}

.rc-food-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Kirbytext génère des balises <p>, on retire la marge du dernier pour éviter les trous */
.rc-food-text p:last-child {
    margin-bottom: 0;
}

/* Chaque groupe discipline (pill + stats + GPX) dans sa propre case */
.discipline-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.discipline-group:last-child { margin-bottom: 0; }

.track-row {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: none;
  padding: 0;
  gap: 16px;
}

/* Stats parcours */
.m-item strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.3px;
  line-height: 1;
}

.m-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gray-subtle);
  margin-top: 2px;
  display: block;
}

/* Bouton GPX aligné à droite */
.discipline-group .btn-ghost {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  color: #374151;
  background: #fff;
}
.discipline-group .btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fff5f5;
}

.track-metrics {
    display: flex;
    gap: 20px;
    flex: 1;
}

/* .m-item — défini plus haut, pas de doublon */

.rc-actions {
    width: 180px;
    background: var(--gray-bg);
    border-left: 1px solid var(--gray-mid);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn-red-main {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  width: 100%;
  text-align: center;
  min-height: 48px;
  border: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-red-main:hover { background: var(--red-dark); }
.btn-red-main:active { transform: scale(0.97); }

.cal-icons {
    display: inline-flex;
    gap: 10px;
}

/* Anciennes classes ride card supprimées (orphelines) */

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.pill-route  { background: var(--route);  color: #fff; }
.pill-gravel { background: var(--gravel); color: #fff; }
.pill-vtt    { background: var(--vtt);    color: #fff; }

/* .ride-metrics, .metric, .metric-val, .metric-lbl — utilisés dans trace-card */
.ride-metrics {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-val {
    font-family: var(--font);
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
}

.metric-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-top: 1px;
}

/* .ride-actions (legacy, non utilisé dans les nouvelles ride-cards) */
.ride-actions {
    padding: 20px 24px;
    border-left: 1px solid var(--gray-mid);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    min-width: 200px;
}

.ride-cta {
    padding: 18px 22px;
    border-left: 1px solid var(--gray-mid);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    min-width: 160px;
}

.ride-types-container {
    display: flex;
    justify-content: flex-start;
    gap: 80px;
    padding: 10px 0;
}

.ride-type {
    align-items: center;
    gap: 15px;
}

.divider-v {
    width: .5px;
    height: 80px;
    background-color: var(--gray-mid);
}

.pop-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 6px;
}

.avatars {
    display: flex;
}

.av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--gray-light);
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--gray-text);
}

.av:first-child {
    margin-left: 0;
}

.views {
    font-size: 12px;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.views svg {
    width: 13px;
    height: 13px;
    stroke: var(--gray-text);
    fill: none;
    stroke-width: 2;
}

.ride-mobile-btn {
    display: none;
    margin-top: 10px;
}

.ride-mobile-cta {
    display: none;
    margin-top: 8px;
}

/* ── BUTTONS ── */
.btn-red {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-family: var(--fd);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: .2s;
    white-space: nowrap;
    text-align: center;
    width: auto;
}

.btn-red:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-red:active {
    transform: translateY(0);
}

.btn-ghost {
    border: 1.5px solid var(--gray-mid);
    background: #fff;
    color: var(--black);
    padding: 9px;
    border-radius: 7px;
    font-family: var(--fb);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: .2s;
    text-decoration: none;
}

.btn-ghost:hover {
    border-color: var(--black);
    background: var(--gray-light);
}

.btn-ghost svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn-download {
    border-color: var(--red);
    color: var(--red);
}

.btn-download:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* ── MAP THUMB ── */
.map-thumb {
    background: linear-gradient(135deg, #e4ede4, #cddacd);
    border-radius: 8px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
}

/* ── TRACES WRAP & GRID ── */
.traces-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px 60px;
}

.traces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── TRACE CARD ── */
.trace-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  position: relative;
}
.trace-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Rating : pill jaune opaque */
.trace-rating-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: #fef9c3;
  border: none;
  box-shadow: none;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex; align-items: center; gap: 3px;
  z-index: 2;
}
.trace-rating-badge .star { font-size: 11px; color: #d1d5db; }
.trace-rating-badge .star.filled { color: #f59e0b; }
.trace-rating-badge .rating-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: #713f12;
  margin-left: 2px;
}

.trace-rank {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 15px;
    font-weight: 900;
    z-index: 1;
}

.rank-1 {
    background: var(--red);
    color: #fff;
}

.rank-2 {
    background: #777;
    color: #fff;
}

.rank-3 {
    background: #C8833A;
    color: #fff;
}

.rank-other {
    background: rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 12px;
}

.trace-type-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
}

.trace-map {
    height: 150px;
    background: linear-gradient(135deg, #dde8dd, #c5d5c5);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trace-map-area {
    height: 220px;
    background: linear-gradient(135deg, #e0ebe0, #ccd8cc);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trace-difficulty {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 3px;
}

.diff-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.diff-dot.filled {
    background: #fff;
}

.trace-body {
    padding: 18px;
}

.trace-name {
    font-family: var(--fd);
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 2px;
}

.trace-loc {
    font-size: 12px;
    color: var(--gray-text);
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trace-loc svg {
    width: 12px;
    height: 12px;
    stroke: var(--gray-text);
    fill: none;
    stroke-width: 2;
}

.trace-type {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 10px;
}

.trace-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--gray-bg);
    border-radius: 8px;
}

.ts-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ts-val {
    font-family: var(--fd);
    font-size: 17px;
    font-weight: normal;
    line-height: 1;
}

.ts-lbl {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-top: 2px;
}

.trace-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.trace-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-text);
}

.trace-views svg {
    width: 13px;
    height: 13px;
    stroke: var(--gray-text);
    fill: none;
    stroke-width: 2;
}

.trace-dl {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-text);
}

.trace-dl svg {
    width: 13px;
    height: 13px;
    stroke: var(--gray-text);
    fill: none;
    stroke-width: 2;
}

.trace-btns .btn-ghost,
.trace-body .btn-red {
  display: block;
  width: 100%;
  text-align: center;
  padding: 11px;
  border: 2px solid var(--red);
  border-radius: 10px;
  color: var(--red);
  font-weight: 700;
  font-size: 0.82rem;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  margin-top: 20px;
}
.trace-btns .btn-ghost:hover,
.trace-body .btn-red:hover {
  background: var(--red);
  color: #fff;
}

.trace-rating-badge:empty {
    display: none;
}

.star.half-filled {
    background: linear-gradient(90deg, #f1c40f 50%, #e0e0e0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ── EMPTY STATE ── */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-text);
    grid-column: 1/-1;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-family: var(--fd);
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

/* ── INSCRIPTION PAGE ── */
.inscription-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
}

.form-card {
    background: #fff;
    border: 1.5px solid var(--gray-mid);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.form-card-head {
    background: var(--gray-bg);
    padding: 18px 24px;
    border-bottom: 1.5px solid var(--gray-mid);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-card-title {
    font-family: var(--fd);
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
}

.form-card-sub {
    font-size: 12px;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--gray-light);
    border: 1px solid var(--gray-mid);
    border-radius: 20px;
    padding: 4px 10px;
    white-space: nowrap;
}

.form-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 7px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--black);
    background: #fff;
    transition: .2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--red);
}

.form-select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--black);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    transition: .2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--red);
}

.btn-submit {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: var(--fd);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: .2s;
    margin-top: 4px;
    grid-column: span 2;
}

.btn-submit:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.form-hint {
    font-size: 12px;
    color: var(--gray-text);
    line-height: 1.5;
    font-style: italic;
    grid-column: span 2;
}

.form-group.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    /* Empêche de cliquer */
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.form-group {
    opacity: 1;
    pointer-events: auto;
    filter: none;
}

/* ── RESULTS PANEL ── */
.results-panel {
    display: flex;
    flex-direction: column;
}

/* ── ALLURE BANNER ── */
.disciplines-grid {
    display: grid;
    gap: 40px;
}

.allure-banner {
    background: #fff;
    border-bottom: 1px solid var(--gray-mid);
    padding: 20px 24px;
}

.ab-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 12px;
}

.allure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.allure-chip {
    border-radius: 8px;
    padding: 12px 14px;
    border: 1.5px solid transparent;
}

.ac-a {
    background: #FFF0F0;
    border-color: #f0b0b0;
}

.ac-b {
    background: #FFF6EC;
    border-color: #f0c88a;
}

.ac-c {
    background: #EEF4FF;
    border-color: #96b8e8;
}

.ac-d {
    background: #EEF8F0;
    border-color: #90ca9f;
}

.ac-label {
    font-family: var(--fd);
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 2px;
}

.ac-a .ac-label { color: var(--allure-a); }
.ac-b .ac-label { color: var(--gravel); }
.ac-c .ac-label { color: var(--route); }
.ac-d .ac-label { color: var(--vtt); }

.ac-speed {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
}

/* ── ITINERARY CARD ── */
.itin-card {
    background: #fff;
    border: 1.5px solid var(--gray-mid);
    border-radius: 14px;
    overflow: hidden;
}

.itin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-mid);
}

.itin-badge {
    width: 36px;
    height: 36px;
    background: var(--dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.itin-name {
    font-family: var(--fd);
    font-size: 22px;
    font-weight: normal;
    text-transform: uppercase;
}

.itin-votes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    border-bottom: 1px solid var(--gray-mid);
}

.vote-col {
    padding: 16px 8px;
    border-right: 1px solid var(--gray-mid);
}

.vote-col:last-child {
    border-right: none;
}

.vote-allure-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-text);
    margin-bottom: 6px;
}

.vote-count {
    font-family: var(--fd);
    font-size: 36px;
    font-weight: normal;
    color: var(--black);
    line-height: 1;
}

.vote-count.has-votes {
    color: var(--red);
}

.itin-footer {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.see-inscrits {
    background: none;
    border: none;
    font-family: var(--fb);
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.see-inscrits svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: .3s;
}

.see-inscrits.open svg {
    transform: rotate(180deg);
}

.inscrits-list {
    display: none;
    padding: 0 24px 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.inscrits-list.open {
    display: flex;
}

.inscrit-tag {
    background: var(--gray-light);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.inscrit-allure {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
}

.ia-a { background: var(--allure-a); }
.ia-b { background: var(--allure-b); }
.ia-c { background: var(--allure-c); }
.ia-d { background: var(--allure-d); }


/* ── TIP BOX ── */
.tip-box {
    background: #fff;
    border: 1.5px solid var(--gray-mid);
    border-radius: 14px;
    padding: 20px 24px;
}

.tip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-title::before {
    content: '💡';
}

.tip-text {
    font-size: 13px;
    color: var(--gray-text);
    line-height: 1.6;
}

.tip-text em {
    color: var(--red);
    font-style: normal;
    font-weight: 600;
}

/* ── SUCCESS BANNER ── */
#successBanner {
    height: auto;
    margin-bottom: 20px;
    display: none;
}

#successBanner.show {
    display: block;
}

.success-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.success-title {
    font-family: var(--fd);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.success-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

/* ── FOOTER ── */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 28px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-logo {
    font-family: var(--fd);
    font-size: 20px;
    font-weight: 900;
    color: #fff;
}

.footer-logo span {
    color: var(--red);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.shop-name {
    font-family: var(--fd);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: .5px;
}

.shop-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.shop-row svg {
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.35);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.shop-row a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.shop-row a:hover {
    color: var(--red);
}

.socials {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.soc {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: .2s;
}

.soc:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── SCROLL ANIMATIONS ── */
.will-animate {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.will-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Délais en cascade pour les grilles */
.traces-grid .trace-card:nth-child(2)  { transition-delay: 0.07s; }
.traces-grid .trace-card:nth-child(3)  { transition-delay: 0.14s; }
.traces-grid .trace-card:nth-child(4)  { transition-delay: 0.07s; }
.traces-grid .trace-card:nth-child(5)  { transition-delay: 0.14s; }
.traces-grid .trace-card:nth-child(6)  { transition-delay: 0.21s; }

/* Respect des préférences de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
    .will-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── MOBILE ENROLL ── */
.mobile-enroll-container {
    display: none;
}

/* ── RESPONSIVE ── */
@media(max-width:1000px) {
    .traces-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:900px) {
    .nav-links {
        display: none;
    }

    .nav-auth {
        margin-left: auto;
        margin-right: 8px;
        align-self: center;
    }

    .user-dropdown {
        right: 0;
        left: auto;
    }

    .hamburger {
        display: flex;
    }

    .hero-inner {
        padding: 40px 24px;
    }

    .page-header-inner,
    .filters-inner,
    .main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .ph-count {
        display: none;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 36px 24px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ride-card {
        grid-template-columns: 72px 1fr;
    }

    .ride-actions,
    .ride-cta {
        display: none;
    }

    .ride-mobile-btn {
        display: flex;
        width: 100%;
    }

    .ride-mobile-cta {
        display: flex;
    }

    .traces-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-inner {
        padding: 0 24px;
    }

    .hero-stats {
        gap: 20px;
    }

    .mobile-enroll-container {
        display: block;
    }

    .ride-types-container {
        flex-direction: column;
        gap: 30px;
    }

    .divider-v {
        display: none;
    }

    .inscription-wrap {
        grid-template-columns: 1fr;
    }

    .form-card {
        position: static;
    }

    .allure-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .itin-votes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vote-col:nth-child(2) {
        border-right: none;
    }

    .vote-col:nth-child(3) {
        border-top: 1px solid var(--gray-mid);
        border-right: 1px solid var(--gray-mid);
    }

    .vote-col:nth-child(4) {
        border-top: 1px solid var(--gray-mid);
    }

    /* ── RIDE CARD responsive (tablet) ── */
    .ride-card {
        flex-direction: column;
    }

    .rc-date-sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        padding: 12px 16px;
    }

    .date-time {
        margin-top: 0;
        margin-left: 4px;
        padding-left: 16px;
    }

    .rc-actions {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        gap: 12px;
    }

    .rc-inscrits-box {
        width: auto;
    }

    .pop-label {
        text-align: left;
    }

    .btn-red-main {
        width: auto;
        padding: 10px 20px;
    }

    .rc-calendar-group {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .rc-calendar-group .pop-label {
        margin-bottom: 0;
    }
}

@media(max-width:700px) {

    .page-hero-inner,
    .filter-panel-inner,
    .results-header,
    .traces-wrap,
    .footer-bottom {
        padding-left: 20px;
        padding-right: 20px;
    }

    .traces-grid {
        grid-template-columns: 1fr;
    }

    .filter-body {
        gap: 16px;
    }

    .filter-group {
        min-width: 0;
        width: 100%;
    }

    .range-wrap {
        min-width: 0;
        width: 100%;
    }

    .sort-wrap {
        margin-left: 0;
        width: 100%;
    }

    .ph-stats {
        gap: 20px;
    }

    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-top: 20px;
    }
}

@media(max-width:600px) {
    .hero {
        min-height: 420px;
    }

    .hero-inner {
        padding: 32px 20px;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .page-hero {
        height: 420px;
    }

    .page-header-inner,
    .legend-inner,
    .inscription-wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding: 28px 20px;
    }

    .filters-inner {
        padding: 0 20px;
    }

    .footer-inner {
        padding: 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .ride-body {
        padding: 16px;
    }

    .ride-metrics {
        gap: 12px;
    }

    .allure-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .itin-votes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .legend-inner {
        gap: 12px;
    }

    .legend-item {
        font-size: 12px;
    }

    .form-body {
        grid-template-columns: 1fr;
    }

    .btn-submit,
    .form-hint {
        grid-column: span 1;
    }

    /* ── RIDE CARD responsive (mobile) ── */
.rc-main {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header de la card */
.rc-header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.rc-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

/* AfterRide banner */
.rc-food-note {
  margin: 12px 20px;  /* ← marges latérales cohérentes */
  padding: 11px 15px;
  background: #fefce8;
  border-left: 3px solid #eab308;
  border-radius: 0 10px 10px 0;
  font-size: 0.8rem;
  color: #713f12;
  line-height: 1.5;
}
.rc-food-text p:last-child { margin-bottom: 0; }

/* Tracks list */
.rc-tracks-list {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
    .track-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .track-metrics {
        gap: 14px;
    }

    .rc-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-red-main {
        width: 100%;
        text-align: center;
    }

    .rc-calendar-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .rc-calendar-group .pop-label {
        margin-bottom: 0;
    }

    .cal-icons {
        width: 100%;
    }

    .cal-icons .btn-ghost {
        flex: 1;
        justify-content: center;
    }

    .rc-inscrits-box {
        width: 100%;
    }

    .rc-food-note {
        font-size: 12px;
    }

    /* ── User ride row responsive ── */
    .user-ride-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .curr-actions {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .curr-actions .btn-action {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .curr-actions .btn-edit {
        margin-left: auto;
    }

    .rc-calendar-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .rc-calendar-group .btn-ghost {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .curr-badges {
        flex-wrap: wrap;
    }
}

/* ═══ Login page ═══ */
.login-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 2rem;
    line-height: 1.5;
}

.login-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 1.5rem;
}

.login-providers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.btn-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    border: 1.5px solid transparent;
}

.btn-provider:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-provider:active {
    transform: translateY(0);
}

.btn-google {
    background: #fff;
    color: #333;
    border-color: rgba(0, 0, 0, 0.15);
}

.btn-strava {
    background: #fc4c02;
    color: #fff;
}

.login-legal {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

.login-legal a {
    color: #666;
    text-decoration: underline;
}

/* ─── Magic link form ─── */
.magic-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.magic-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
}

.magic-row {
    display: flex;
    gap: 8px;
}

.magic-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--fb);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.magic-input:focus {
    border-color: var(--red);
}

.magic-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 18px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--fb);
    transition: background 0.15s;
}

.magic-btn:hover {
    background: var(--red-dark);
}

.push-btn-active {
    background: #16a34a;
}

.push-btn-active:hover {
    background: #15803d;
}

/* ─── Divider ─── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #bbb;
    font-size: 12px;
    margin: 4px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-mid);
}

/* ─── Magic sent state ─── */
.login-magic-sent {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 8px;
    gap: 10px;
}

.login-magic-sent-icon {
    width: 56px;
    height: 56px;
    background: var(--red-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
}

.login-magic-sent-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

.login-magic-sent-sub {
    font-size: 14px;
    color: var(--gray-text);
    line-height: 1.6;
    max-width: 320px;
}

.login-magic-retry {
    margin-top: 4px;
    font-size: 13px;
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

.login-magic-retry:hover {
    text-decoration: underline;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.register-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.register-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    min-width: 0;
}

@media (max-width: 480px) {
    .magic-row {
        flex-direction: column;
    }
    .magic-btn {
        justify-content: center;
    }
    .register-row {
        grid-template-columns: 1fr;
    }
}

/* ═══ Mon compte — profil form ═══ */
.profil-form {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.profil-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profil-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.profil-label svg {
    stroke: var(--gray-text);
    flex-shrink: 0;
}

.profil-checkboxes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profil-checkbox-input {
    display: none;
}

.profil-checkbox-chip {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--gray-mid);
    background: #fff;
    color: var(--gray-text);
    transition: all .2s;
    user-select: none;
}

.profil-checkbox-input:checked+.profil-checkbox-chip {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

.profil-checkbox-chip:hover {
    border-color: var(--red);
    color: var(--red);
}

.profil-checkbox-input:checked+.profil-checkbox-chip:hover {
    color: #fff;
}

.profil-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--black);
    background: #fff;
    transition: border-color .2s;
}

.profil-input:focus {
    outline: none;
    border-color: var(--red);
}

.profil-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid var(--gray-mid);
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 14px;
    color: var(--black);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    transition: border-color .2s;
}

.profil-select:focus {
    outline: none;
    border-color: var(--red);
}

.profil-hint {
    font-size: 12px;
    color: var(--gray-text);
}

/* Toggle */
.profil-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-mid);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background .2s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked~.toggle-slider {
    background: var(--red);
}

.toggle-input:checked~.toggle-slider::after {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

/* Submit */
.profil-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--fb);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    align-self: flex-start;
}

.profil-submit:hover {
    background: var(--red-dark);
}

.profil-submit:active {
    transform: scale(0.98);
}

/* Alerts */
.account-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.account-alert-success {
    background: #f0faf4;
    border: 1px solid #a8dbb9;
    color: #1a6b3a;
}

.account-alert-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
}

.account-alert-warning {
    background: #fff8e1;
    border: 1px solid #f9a825;
    color: #e65100;
}

/* Champ readonly quand connecté */
.form-input-readonly {
    background: var(--gray-light);
    color: var(--gray-text);
    cursor: not-allowed;
    border-color: var(--gray-mid);
}

.form-hint-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--gray-text);
    margin-top: 4px;
}

/* Badge "toi" sur son inscription */
.inscrit-tag-own {
    border-color: var(--red);
    background: rgba(215, 43, 43, 0.04);
}

.inscrit-you {
    display: inline-block;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    text-transform: uppercase;
    vertical-align: middle;
}

.user-ride-row {
    background: #fff;
    border: 1px solid var(--gray-mid);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.curr-ride-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.curr-date {
    text-align: center;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.curr-date .d {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--red);
}

.curr-date .m {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.curr-details h3 {
    font-size: 15px;
    margin: 0 0 5px;
}

.curr-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge-disc {
    font-size: 10px;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.badge-allure {
    font-size: 10px;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.allure-a {
    background: #d72b2b;
}

/* Rouge pour les costauds */
.track-name {
    font-size: 11px;
    color: var(--gray-text);
}

.curr-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--black);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--gray-mid);
    text-decoration: none;
}

.btn-edit {
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    padding: 8px;
    text-decoration: none;
}

/* ============================================================
   BIKE4ALL — PATCH UI/UX GLOBAL (toutes pages)
   Complément au patch sorties.css
   ============================================================ */


/* ── ACCUEIL : hero watermark overflow masqué ── */
.hero {
  overflow: hidden; /* empêche le watermark de déborder */
}

/* Stats hero : meilleure lisibilité */
.stat-lbl {
  font-size: 11px;       /* était 10px */
  color: rgba(255, 255, 255, 0.60); /* était 0.45 */
}

.stat-sub {
  color: rgba(255, 255, 255, 0.55); /* était 0.45 */
}


/* ── ACCUEIL : CTA "Voir toutes les sorties" — plein plutôt que fantôme ── */
/*
  Ce bouton centré entre les sections a moins de poids qu'un CTA principal.
  On le rend plein pour qu'il capture l'attention.
*/
.section > .see-all,
.section-end .see-all {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  padding: 13px 28px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(215, 43, 43, 0.30);
}

.section > .see-all:hover,
.section-end .see-all:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: 0 4px 16px rgba(215, 43, 43, 0.40);
  transform: translateY(-1px);
}

/* Le see-all dans .section-head reste en outline (contexte secondaire) */
.section-head .see-all {
  background: transparent;
  color: var(--red);
}

.section-head .see-all:hover {
  background: var(--red);
  color: #fff;
}


/* ── TRACES : bouton GPX — transition + shadow ── */
.trace-btns .btn-ghost,
.trace-body .btn-red {
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  font-weight: 700;
}

.trace-btns .btn-ghost:hover,
.trace-body .btn-red:hover {
  background: var(--red);
  color: #fff;
  box-shadow: 0 3px 12px rgba(215, 43, 43, 0.30);
  transform: translateY(-1px);
}

.trace-btns .btn-ghost:active,
.trace-body .btn-red:active {
  transform: translateY(0);
  box-shadow: none;
}


/* ── TRACES : badge rating — taille réduite ── */
.trace-rating-badge {
  padding: 3px 8px; /* était 4px 10px */
  border-radius: 20px;
  gap: 2px;
}

.trace-rating-badge .rating-num {
  font-size: 0.68rem;
}

.trace-rating-badge .star {
  font-size: 10px;
}


/* ── TRACES : sort-select — apparence améliorée ── */
.sort-wrap {
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-text);
}

.sort-select {
  border: 1.5px solid var(--gray-mid);
  border-radius: 8px;
  padding: 8px 28px 8px 12px;
  font-size: 13px;
  transition: border-color 0.15s;
}

.sort-select:hover {
  border-color: #9ca3af;
}

.sort-select:focus {
  outline: none;
  border-color: var(--red);
}


/* ── MON COMPTE : profile-hero — séparation fond ── */
.profile-hero {
  background: #ffffff; /* fond blanc pour se distinguer du body gray-bg */
  border-bottom: 1px solid var(--gray-mid);
  padding: 40px 0 36px;
}


/* ── MON COMPTE : compteur "0 SORTIE À VENIR" ── */
/*
  Quand la valeur est 0, le widget paraît creux.
  On réduit son impact visuel en le rendant plus discret.
  Pour le masquer si val=0, ajouter .ph-counters--empty via JS/template.
*/
.ph-counters {
  background: #fff;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-xl);
  padding: 16px 24px; /* légèrement réduit */
  box-shadow: var(--shadow-sm);
}

.ph-counters--empty {
  /* Optionnel : masquer si 0 inscription */
  display: none;
}

.ph-counter-val {
  font-size: 26px; /* légèrement réduit : 28px → 26px */
}


/* ── MON COMPTE : labels de section formulaire ── */
.profil-label {
  color: var(--gray-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.profil-label svg {
  width: 14px;
  height: 14px;
  stroke: var(--gray-subtle); /* un peu plus visible */
  flex-shrink: 0;
}


/* ── MON COMPTE : bouton "Désactiver notifications push" — style neutre ── */
/*
  Remplace le vert #16a34a par un style ghost rouge pour rester dans la charte.
  Le vert "actif" était logique sémantiquement mais incohérent avec le design system.
*/
.push-btn-active {
  background: transparent !important;
  border: 1.5px solid var(--gray-mid) !important;
  color: var(--gray-text) !important;
  box-shadow: none !important;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.push-btn-active:hover {
  border-color: var(--black) !important;
  color: var(--black) !important;
  background: var(--gray-light) !important;
}


/* ── MON COMPTE : bouton "Enregistrer mon profil" ── */
.profil-submit {
  min-width: 200px; /* plus de largeur minimale pour équilibrer */
  padding: 12px 28px;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(215, 43, 43, 0.25);
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
}

.profil-submit:hover {
  box-shadow: 0 4px 14px rgba(215, 43, 43, 0.35);
  transform: translateY(-1px);
}

.profil-submit:active {
  transform: scale(0.98);
  box-shadow: none;
}


/* ── INSCRIPTION : form-card — meilleure hiérarchie ── */
.form-card {
  background: #fff;
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius-xl); /* 16px → 18px, cohérent avec ride-card */
  box-shadow: var(--shadow-md); /* ajout d'ombre pour le séparer du fond */
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.form-card-head {
  background: var(--dark);  /* fond sombre pour ancrer le titre */
  padding: 16px 24px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff; /* blanc sur fond sombre */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Eyebrow INSCRIPTION déjà bien stylé — léger ajustement */
.ph-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}


/* ── INSCRIPTION : itin-card (section discipline) ── */
.itin-card {
  border-radius: var(--radius-lg); /* 14px — homogène */
}

/* Titre de discipline (ex: "ROUTE") plus de poids */
.itin-name {
  font-weight: 700; /* était "normal" — trop léger */
  letter-spacing: 1px;
  font-size: 20px;
}

/* Compteurs d'allures : chiffre plus expressif */
.vote-count {
  font-size: 32px; /* était 36px — légèrement réduit */
  font-weight: 700; /* était "normal" */
}

.vote-count.has-votes {
  color: var(--red);
}


/* ── INSCRIPTION : allure-chips — réduction saturation ── */
/*
  Les 4 chips A/B/C/D utilisent des couleurs pastels différentes.
  On unifie légèrement les bordures et fonds pour moins saturer.
*/
.allure-chip {
  border-radius: 10px; /* était 8px */
  padding: 12px 16px;
  border-width: 1px; /* réduit de 1.5px à 1px */
}

/* Labels dans les chips */
.ac-label {
  font-size: 16px; /* était 18px */
  font-weight: 700; /* était normal */
}

.ac-speed {
  font-size: 11px;
}


/* ── ANCIENNES SORTIES : cartes archivées — opacité réduite sur date ── */
/*
  Ajouter la classe .ride-card--past côté template Kirby sur les sorties passées.
  CSS prêt à l'emploi :
*/
.ride-card--past .rc-date-sidebar {
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
  opacity: 0.75;
}

.ride-card--past .rc-main {
  opacity: 0.85;
}

.ride-card--past:hover {
  transform: none; /* pas d'effet lift sur les sorties passées */
  box-shadow: var(--shadow-md);
}


/* ── GLOBAL : divider rouge en bas du hero ── */
/*
  Uniformise le divider rouge qui sépare le header des pages.
  Présent sur /traces et /anciennes-sorties mais pas sur /sorties.
  Le patch sorties.css ajoute déjà border-bottom sur .page-header.
*/
.page-header {
  position: relative; /* assure le positionnement du divider */
}


/* ── GLOBAL : focus-visible cohérent sur tous les boutons ── */
.btn-red:focus-visible,
.btn-red-main:focus-visible,
.btn-ghost:focus-visible,
.see-all:focus-visible,
.chip:focus-visible,
.profil-submit:focus-visible,
.btn-submit:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}


/* ── GLOBAL : responsive complémentaire ── */
@media (max-width: 900px) {
  .profile-hero-inner {
    padding: 0 24px;
  }

  .ph-counters {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  /* Stats hero — lisibilité améliorée sur mobile */
  .stat-lbl {
    font-size: 10px;
  }

  .stat-val {
    font-size: 22px;
  }

  /* Form card inscription — sans sticky sur mobile */
  .form-card {
    position: static;
  }

  /* Profile hero sur mobile */
  .profile-hero {
    padding: 28px 0 24px;
  }
}