/* ═══════════════════════════════════════════════════════
   GR20 Roadbook — Design Premium v2
   ═══════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────────────── */

.gr20-page {
  display: grid;
  gap: 20px;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: clip;
}

/* ── Navigation inter-étapes ─────────────────────────── */

.gr20-stage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 0 4px;
}

.gr20-stage-nav-home {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eaf2fa;
  border: 1.5px solid #c8ddf0;
  color: #1760a8;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.gr20-stage-nav-home:hover {
  background: #d8ecfc;
  border-color: #1760a8;
}

.gr20-stage-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: #f4faff;
  border: 1.5px solid #d0e6f5;
  color: #334d66;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.gr20-stage-nav-item:hover {
  background: #e2f0fc;
  border-color: #1760a8;
  color: #1760a8;
}

.gr20-stage-nav-current {
  background: #1760a8;
  border-color: #1760a8;
  color: #fff;
  font-weight: 700;
}

.gr20-stage-nav-current:hover {
  background: #0f4e94;
  color: #fff;
}

.gr20-stage-nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

.gr20-stage-nav-item:not(.gr20-stage-nav-current) .gr20-stage-nav-num {
  background: #1760a8;
  color: #fff;
}

.gr20-stage-nav-label {
  font-size: 0.76rem;
}

@media (max-width: 640px) {
  .gr20-stage-nav {
    gap: 5px;
  }
  .gr20-stage-nav-label {
    display: none;
  }
  .gr20-stage-nav-item {
    padding: 5px;
  }
  .gr20-stage-nav-num {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}

/* ── Breadcrumb ──────────────────────────────────────── */

.gr20-breadcrumb {
  margin: 4px 0 0;
  color: #546d87;
  font-size: 0.88rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.gr20-breadcrumb a {
  color: #1760a8;
  text-decoration: none;
  font-weight: 600;
}

.gr20-breadcrumb a:hover {
  text-decoration: underline;
}

/* ── Hero ────────────────────────────────────────────── */

.gr20-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(24px, 3vw, 44px);
  background:
    linear-gradient(150deg, #071e38 0%, #0f4270 42%, #0a5944 100%);
  box-shadow:
    0 28px 64px rgba(6, 22, 46, 0.32),
    0 4px 12px rgba(6, 22, 46, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #fff;
  isolation: isolate;
}

.gr20-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 55% at 85% 110%, rgba(13, 124, 103, 0.30) 0%, transparent 55%),
    radial-gradient(circle at 4% 8%, rgba(255, 255, 255, 0.07) 0%, transparent 32%);
  pointer-events: none;
}

.gr20-hero::after {
  content: '⛰';
  position: absolute;
  right: -8px;
  bottom: -22px;
  font-size: 12rem;
  opacity: 0.055;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.gr20-hero > * {
  position: relative;
  z-index: 1;
}

.gr20-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 22px;
  align-items: start;
}

.gr20-hero-copy {
  display: grid;
  gap: 14px;
}

.gr20-hero-map {
  justify-self: end;
  width: min(100%, 360px);
}

.gr20-hero-map .strava-embed-placeholder {
  min-height: 240px;
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.gr20-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.gr20-hero h1 {
  margin: 16px 0 10px;
  color: #fff;
  font-size: clamp(1.85rem, 1.1rem + 2.4vw, 3.1rem);
  line-height: 1.07;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.gr20-hero p {
  max-width: 840px;
  margin: 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(0.97rem, 0.9rem + 0.3vw, 1.14rem);
  line-height: 1.72;
}

.gr20-stage-brief {
  border-left: 4px solid #f2a21d;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(247,250,255,0.98) 100%);
}

.gr20-stage-brief h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gr20-stage-brief h2::before {
  content: '🎯';
  font-size: 1.1rem;
}

.gr20-stage-brief p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #1f3147;
}

.gr20-stage-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: stretch;
}

.gr20-stage-identity,
.gr20-stage-map-card {
  height: 100%;
}

.gr20-stage-map-card {
  display: grid;
  gap: 14px;
}

.gr20-stage-map-card .strava-embed-placeholder {
  min-height: 100%;
  height: 100%;
  aspect-ratio: 1.08 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #edf4fb;
}

.gr20-stage-map-card-3d .strava-embed-placeholder {
  min-height: 460px;
  aspect-ratio: auto;
}

.gr20-stage-nav-hero {
  padding: 8px 0 0;
  gap: 8px;
}

.gr20-stage-nav-hero .gr20-stage-nav-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5fbff;
}

.gr20-stage-nav-hero .gr20-stage-nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.gr20-stage-nav-hero .gr20-stage-nav-num {
  background: rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
}

/* ── Buttons ─────────────────────────────────────────── */

.gr20-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.gr20-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

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

.gr20-btn-primary {
  background: linear-gradient(135deg, #f9a51a 0%, #e07e08 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(200, 110, 8, 0.38);
}

.gr20-btn-primary:hover {
  box-shadow: 0 16px 36px rgba(200, 110, 8, 0.50);
}

.gr20-btn-ghost {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.gr20-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.17);
}

.gr20-btn-muted {
  background: #f0f6ff;
  border-color: #cfe0f2;
  color: #3c5b7d;
}

/* ── Grids ───────────────────────────────────────────── */

.gr20-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

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

/* ── Base card surface ───────────────────────────────── */

.gr20-stat,
.gr20-card,
.gr20-stage-card,
.gr20-section-card,
.gr20-callout {
  background: #ffffff;
  border: 1px solid #d0e3f4;
  border-radius: 20px;
  box-shadow:
    0 2px 8px rgba(9, 38, 72, 0.06),
    0 6px 20px rgba(9, 38, 72, 0.07);
}

.gr20-card,
.gr20-stage-card {
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.gr20-card:hover,
.gr20-stage-card:hover {
  box-shadow:
    0 4px 14px rgba(9, 38, 72, 0.09),
    0 14px 36px rgba(9, 38, 72, 0.13);
  transform: translateY(-2px);
}

/* ── Stats ───────────────────────────────────────────── */

.gr20-stat {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 3px solid #1760a8;
}

.gr20-grid-4 .gr20-stat:nth-child(4n+1) { border-top-color: #1760a8; }
.gr20-grid-4 .gr20-stat:nth-child(4n+2) { border-top-color: #0d7c67; }
.gr20-grid-4 .gr20-stat:nth-child(4n+3) { border-top-color: #f5900a; }
.gr20-grid-4 .gr20-stat:nth-child(4n+4) { border-top-color: #7c3aed; }

.gr20-stat-label {
  margin: 0;
  color: #57708c;
  font-size: 0.77rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.gr20-stat-value {
  margin: 0;
  color: #0c2d52;
  font-size: clamp(1.28rem, 0.95rem + 1vw, 2.1rem);
  font-weight: 900;
  line-height: 1.1;
}

/* ── Cards ───────────────────────────────────────────── */

.gr20-card,
.gr20-callout {
  padding: 20px 22px;
}

.gr20-card h2 {
  margin: 0 0 14px;
  color: #0c2d52;
  font-size: 1.08rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gr20-card h2::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 4px;
  height: 1.1em;
  background: linear-gradient(to bottom, #1760a8, #0d7c67);
  border-radius: 3px;
}

.gr20-card p,
.gr20-card li {
  color: #1d3e5e;
  line-height: 1.68;
}

/* ── Pills ───────────────────────────────────────────── */

.gr20-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}

.gr20-pills:last-child {
  margin-bottom: 0;
}

.gr20-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e8f2ff;
  border: 1px solid #bdd5f0;
  color: #1a508e;
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.gr20-pills .gr20-pill:first-child {
  background: #e2f5f0;
  border-color: #a8ddd4;
  color: #0c5a4a;
}

/* ── Stage list (index) ──────────────────────────────── */

.gr20-stage-list {
  display: grid;
  gap: 14px;
}

.gr20-stage-card {
  padding: 20px 22px;
}

/* "Jour X" label gets a colored chip */
.gr20-stage-card .gr20-stat-label {
  display: inline-block;
  font-size: 0.73rem;
  color: #1760a8;
  background: #e8f2ff;
  border: 1px solid #bdd5f0;
  border-radius: 6px;
  padding: 2px 9px;
  margin-bottom: 4px;
}

/* Stage with link = "ready" → teal left accent */
.gr20-stage-card:has(.gr20-btn-primary) {
  border-left: 4px solid #0d7c67;
}

.gr20-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.gr20-stage-title {
  margin: 4px 0 0;
  color: #0c2d52;
  font-size: 1.18rem;
  font-weight: 800;
}

.gr20-stage-meta {
  margin: 5px 0 0;
  color: #52708b;
  font-size: 0.9rem;
}

.gr20-stage-summary {
  margin: 12px 0 0;
  color: #2a4a68;
  line-height: 1.65;
}

.gr20-passages-group + .gr20-passages-group {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #dbe8f5;
}

.gr20-passages-group-head {
  margin-bottom: 12px;
}

.gr20-passages-group-head .gr20-stat-label {
  display: inline-block;
  font-size: 0.73rem;
  color: #1760a8;
  background: #e8f2ff;
  border: 1px solid #bdd5f0;
  border-radius: 6px;
  padding: 2px 9px;
  margin-bottom: 6px;
}

.gr20-passages-group-head h3 {
  margin: 0;
  color: #0c2d52;
  font-size: 1.08rem;
  font-weight: 800;
}

.gr20-passages-total-row td {
  background: #f2f7fd;
  font-weight: 800;
  color: #123b63;
  border-top: 2px solid #c9ddef;
}

.gr20-stage-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Split layout ────────────────────────────────────── */

.gr20-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(256px, 0.7fr);
  gap: 16px;
}

.gr20-profile-wrap {
  overflow: hidden;
}

.gr20-profile-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.gr20-profile-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gr20-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4d6a82;
  font-size: 0.85rem;
}

.gr20-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.gr20-legend-swatch-line { background: #0d7c67; }
.gr20-legend-swatch-fill { background: #b2e4d8; }

/* ── Timeline ────────────────────────────────────────── */

.gr20-timeline {
  display: grid;
  gap: 0;
  counter-reset: section-step;
  position: relative;
  margin: 4px 0 0;
}

/* Vertical connector line */
.gr20-timeline::before {
  content: '';
  position: absolute;
  left: 29px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #c8ddf0 10%,
    #c8ddf0 90%,
    transparent 100%
  );
  border-radius: 2px;
  z-index: 0;
  pointer-events: none;
}

/* ── Section cards ───────────────────────────────────── */

.gr20-section-card {
  counter-increment: section-step;
  position: relative;
  z-index: 1;
  padding: 18px 18px 18px 60px;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #eaf2fa;
  box-shadow: none;
  transition: background 0.18s ease;
}

.gr20-section-card:hover {
  background: #f6fbff;
  transform: none;
  box-shadow: none;
}

.gr20-section-card:first-child { border-radius: 0; }
.gr20-section-card:last-child  { border-bottom: none; }

/* Letter badge */
.gr20-section-card::before {
  content: counter(section-step, upper-alpha);
  position: absolute;
  left: 16px;
  top: 17px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1760a8;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  line-height: 28px;
  letter-spacing: 0;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(23, 96, 168, 0.32);
}

/* Color rotation */
.gr20-timeline .gr20-section-card:nth-child(6n+1)::before { background: #1760a8; box-shadow: 0 3px 10px rgba(23,96,168,.30); }
.gr20-timeline .gr20-section-card:nth-child(6n+2)::before { background: #0d7c67; box-shadow: 0 3px 10px rgba(13,124,103,.30); }
.gr20-timeline .gr20-section-card:nth-child(6n+3)::before { background: #e07e08; box-shadow: 0 3px 10px rgba(220,126,8,.30); }
.gr20-timeline .gr20-section-card:nth-child(6n+4)::before { background: #7c3aed; box-shadow: 0 3px 10px rgba(124,58,237,.30); }
.gr20-timeline .gr20-section-card:nth-child(6n+5)::before { background: #0891b2; box-shadow: 0 3px 10px rgba(8,145,178,.30); }
.gr20-timeline .gr20-section-card:nth-child(6n+6)::before { background: #c2410c; box-shadow: 0 3px 10px rgba(194,65,12,.30); }

.gr20-section-card h3 {
  margin: 0 0 7px;
  color: #0d2e52;
  font-size: 0.97rem;
  font-weight: 800;
  line-height: 1.3;
}

/* Meta = pill chip */
.gr20-section-meta {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 11px;
  background: #edf5ff;
  border: 1px solid #c4dbf4;
  border-radius: 999px;
  color: #2558a0;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Label forte à l'intérieur des paragraphes */
.gr20-section-card p strong {
  color: #155a8a;
  font-weight: 800;
}

.gr20-section-card p {
  color: #1d3e5e;
  line-height: 1.65;
  margin: 0 0 8px;
}

.gr20-section-card p:last-child {
  margin-bottom: 0;
}

/* ── Checklist ───────────────────────────────────────── */

.gr20-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.gr20-checklist li {
  position: relative;
  padding-left: 26px;
  color: #1d3e5e;
  line-height: 1.62;
}

.gr20-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  color: #0d7c67;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.62;
}

/* ── Note box ────────────────────────────────────────── */

.gr20-note {
  display: block;
  background: #eaf3ff;
  border-left: 3px solid #1760a8;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px 10px 38px;
  color: #1a4872;
  font-size: 0.89rem;
  line-height: 1.62;
  position: relative;
  margin-bottom: 14px;
}

.gr20-note::before {
  content: 'ℹ';
  position: absolute;
  left: 12px;
  top: 10px;
  font-size: 1rem;
  color: #1760a8;
  line-height: 1;
}

/* ── Table ───────────────────────────────────────────── */

.gr20-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #d0e3f4;
  -webkit-overflow-scrolling: touch;
}

.gr20-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 860px;
}

.gr20-table thead tr {
  background: #f0f7ff;
}

.gr20-table th {
  padding: 11px 14px;
  border-bottom: 2px solid #d0e3f4;
  text-align: left;
  color: #1a4872;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.gr20-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e8f0f8;
  color: #1a3d5c;
  vertical-align: top;
}

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

.gr20-table tbody tr:hover {
  background: #f7fbff;
}

.gr20-table a {
  color: #1760a8;
  font-weight: 700;
  text-decoration: none;
}

.gr20-table a:hover {
  text-decoration: underline;
}

/* ── Callout ─────────────────────────────────────────── */

.gr20-callout {
  background: linear-gradient(138deg, #081f3c 0%, #0d3a64 55%, #0a4638 100%);
  border-color: transparent;
  box-shadow:
    0 18px 52px rgba(6, 20, 46, 0.28),
    0 3px 10px rgba(6, 20, 46, 0.14);
  position: relative;
  overflow: hidden;
}

.gr20-callout::after {
  content: '⛰';
  position: absolute;
  right: -4px;
  bottom: -18px;
  font-size: 10rem;
  opacity: 0.055;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.gr20-callout h2 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  margin: 0 0 12px;
  display: block;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.gr20-callout h2::before {
  display: none;
}

.gr20-callout p,
.gr20-callout li {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.72;
  font-size: 0.99rem;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 980px) {
  .gr20-hero-grid {
    grid-template-columns: 1fr;
  }

  .gr20-hero-map {
    justify-self: stretch;
    width: 100%;
  }

  .gr20-hero-map .strava-embed-placeholder {
    height: 220px;
    min-height: 220px;
  }

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

  .gr20-grid-3,
  .gr20-grid-2,
  .gr20-split-layout {
    grid-template-columns: 1fr;
  }

  .gr20-stage-top-grid {
    grid-template-columns: 1fr;
  }

  .gr20-stage-map-card .strava-embed-placeholder {
    aspect-ratio: 1.45 / 1;
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .gr20-page {
    gap: 14px;
  }

  .gr20-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .gr20-hero::after {
    font-size: 8rem;
    right: -4px;
    bottom: -14px;
  }

  .gr20-hero-map .strava-embed-placeholder {
    height: 190px;
    min-height: 190px;
  }

  .gr20-breadcrumb {
    font-size: 0.8rem;
    padding-bottom: 4px;
  }

  .gr20-stage-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

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

  .gr20-card,
  .gr20-callout,
  .gr20-stage-card {
    padding: 16px 18px;
    border-radius: 16px;
  }

  .gr20-section-card {
    padding: 16px 14px 16px 52px;
  }

  .gr20-section-card::before {
    left: 14px;
    top: 16px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 0.73rem;
  }

  .gr20-timeline::before {
    left: 25px;
    top: 32px;
    bottom: 32px;
  }

  .gr20-stage-head {
    flex-direction: column;
  }

  .gr20-callout h2 {
    font-size: 1.1rem;
  }

  .gr20-card h2 {
    font-size: 1rem;
  }

  .gr20-note {
    padding: 10px 12px 10px 34px;
    font-size: 0.84rem;
  }

  .gr20-table th,
  .gr20-table td {
    padding: 9px 10px;
  }
}

/* ══════════════════════════════════════════════════════════════
   SIMULATEUR INTERACTIF GR20
   ══════════════════════════════════════════════════════════════ */

.gr20-sim-loading {
  color: #59718a;
  padding: 24px;
  text-align: center;
  font-style: italic;
}

/* ── Config panel ──────────────────────────────────────────── */

.gr20-sim-config-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  align-items: flex-end;
  padding: 20px 24px;
  background: linear-gradient(135deg, #edf5ff 0%, #f0fbf7 100%);
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid #c8ddf0;
}

.gr20-sim-param {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gr20-sim-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3d6080;
}

.gr20-sim-param-help {
  margin: 0;
  color: #56708b;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 320px;
}

.gr20-sim-pace-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gr20-sim-pace-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #1760a8;
  background: #fff;
  color: #1760a8;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gr20-sim-pace-btn:hover {
  background: #1760a8;
  color: #fff;
}

.gr20-sim-pace-display {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1.5px solid #b8cfe6;
  border-radius: 8px;
  padding: 4px 8px;
}

.gr20-sim-pace-min,
.gr20-sim-pace-sec {
  width: 38px;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 700;
  color: #102a44;
  text-align: center;
  outline: none;
}

.gr20-sim-pace-unit {
  font-size: 0.78rem;
  color: #59718a;
  font-weight: 600;
  white-space: nowrap;
}

.gr20-sim-start-time {
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid #b8cfe6;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #102a44;
  background: #fff;
  cursor: pointer;
}

.gr20-sim-tech-level {
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid #b8cfe6;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #102a44;
  background: #fff;
  cursor: pointer;
  min-width: 200px;
}

/* ── Métriques résumées ───────────────────────────────────── */

.gr20-sim-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.gr20-sim-metric {
  flex: 1 1 120px;
  background: #f4faff;
  border: 1px solid #d0e6f5;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gr20-sim-metric--accent {
  background: linear-gradient(135deg, #e8f4ff 0%, #d4f0e8 100%);
  border-color: #1760a8;
}

.gr20-sim-metric-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0d2d4e;
  letter-spacing: -0.01em;
}

.gr20-sim-metric--accent .gr20-sim-metric-val {
  color: #1760a8;
}

.gr20-sim-metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #59718a;
  text-align: center;
}

/* ── Profil SVG ───────────────────────────────────────────── */

.gr20-sim-profile-wrap {
  position: relative;
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  background: #f4faff;
  border: 1px solid #d0e6f5;
}

.gr20-sim-profile-svg {
  display: block;
  width: 100%;
  height: auto;
}

.gr20-sim-profile-tooltip {
  position: absolute;
  top: 8px;
  left: 10px;
  background: rgba(10, 30, 55, 0.88);
  color: #fff;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 8px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: opacity 0.12s;
}

/* ── Tableau des passages ─────────────────────────────────── */

.gr20-sim-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid #d0e6f5;
  -webkit-overflow-scrolling: touch;
}

.gr20-sim-table-hint {
  font-size: 0.78rem;
  color: #59718a;
  padding: 8px 14px 4px;
  font-style: italic;
  margin: 0;
}

.gr20-sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 1080px;
}

.gr20-sim-table thead tr {
  background: #0f4270;
  color: #fff;
}

.gr20-sim-table thead th {
  padding: 10px 10px;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: none;
}

.gr20-sim-table tbody tr {
  border-bottom: 1px solid #eaf2fa;
  transition: background 0.12s;
}

.gr20-sim-table tbody tr:hover { background: #f2f8ff; }

.gr20-sim-row--start  { background: #f8fcff; }
.gr20-sim-row--finish { background: #f0fbf7; font-weight: 700; }
.gr20-sim-row--custom { background: #fff8ee; }

.gr20-sim-table td {
  padding: 9px 10px;
  vertical-align: middle;
  color: #1a2e42;
  white-space: nowrap;
}

.gr20-sim-name { font-weight: 600; min-width: 140px; white-space: normal; }
.gr20-sim-arr,
.gr20-sim-dept { font-weight: 700; color: #1760a8; }
.gr20-sim-row--finish .gr20-sim-arr { color: #0d7c67; }

.gr20-sim-stop-input {
  width: 52px;
  border: 1.5px solid #b8cfe6;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #102a44;
  text-align: center;
  background: #fff;
}

.gr20-sim-stop-input:focus {
  outline: none;
  border-color: #1760a8;
  box-shadow: 0 0 0 2px rgba(23, 96, 168, 0.15);
}

.gr20-sim-remove-wp {
  background: none;
  border: none;
  color: #e07e08;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.gr20-sim-remove-wp:hover { opacity: 1; background: #fff3e0; }

/* ── Carte ────────────────────────────────────────────────── */

.gr20-sim-map-section {
  margin-bottom: 24px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d0e6f5;
}

.gr20-sim-map-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #edf5ff;
  border-bottom: 1px solid #c8ddf0;
  flex-wrap: wrap;
}

.gr20-sim-map-style-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #214d7a;
  font-weight: 700;
  font-size: 0.92rem;
}

.gr20-sim-map-style-select {
  min-width: 180px;
  height: 38px;
  border: 1.5px solid #c8ddf0;
  border-radius: 10px;
  background: #fff;
  color: #173b60;
  padding: 0 12px;
  font: inherit;
  outline: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17, 67, 115, 0.05);
}

.gr20-sim-map-style-select:focus {
  border-color: #1760a8;
  box-shadow: 0 0 0 3px rgba(23, 96, 168, 0.15);
}

.gr20-sim-add-point-hint {
  font-size: 0.82rem;
  color: #e07e08;
  font-weight: 600;
  animation: gr20SimPulse 1.2s ease-in-out infinite alternate;
}

@keyframes gr20SimPulse {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

.gr20-sim-map {
  height: 420px;
  background: #eaf2fa;
}

.gr20-sim-map-stage {
  display: grid;
  padding: 16px;
}

.gr20-sim-map-3d {
  border-radius: 14px;
  overflow: hidden;
}

.gr20-sim-map3d-marker {
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.gr20-sim-map3d-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ── Dialogue ajout de point ──────────────────────────────── */

.gr20-sim-dialog {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 55, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.gr20-sim-dialog-inner {
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  min-width: 320px;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gr20-sim-dialog-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0d2d4e;
  margin: 0;
}

.gr20-sim-dialog-input {
  height: 42px;
  border: 1.5px solid #b8cfe6;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.95rem;
  color: #102a44;
  outline: none;
  transition: border-color 0.15s;
}

.gr20-sim-dialog-input:focus {
  border-color: #1760a8;
  box-shadow: 0 0 0 3px rgba(23, 96, 168, 0.15);
}

.gr20-sim-dialog-type {
  height: 40px;
  border: 1.5px solid #b8cfe6;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.92rem;
  color: #102a44;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.gr20-sim-dialog-type:focus {
  border-color: #1760a8;
  box-shadow: 0 0 0 3px rgba(23, 96, 168, 0.15);
}

.gr20-sim-dialog-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Colonne type dans le tableau ─────────────────────────── */

.gr20-sim-type { white-space: nowrap; }

.gr20-sim-type-select {
  border: 1.5px solid #c8ddf0;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.8rem;
  color: #102a44;
  background: #f4faff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  max-width: 160px;
}

.gr20-sim-type-select:focus {
  border-color: #1760a8;
  box-shadow: 0 0 0 2px rgba(23, 96, 168, 0.12);
}

/* ── Sauvegarde CMS ───────────────────────────────────────── */

.gr20-sim-save-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px solid #eaf2fa;
  margin-top: 8px;
}

.gr20-sim-save-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.gr20-sim-save-ok  { color: #0d7c67; }
.gr20-sim-save-err { color: #c2410c; }


/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  .gr20-map-grid {
    grid-template-columns: 1fr;
  }
  .gr20-map-grid .strava-embed-placeholder {
    min-height: 320px;
  }
  .gr20-stage-brief {
    border-left-width: 0;
    border-top: 4px solid #f2a21d;
  }
  .gr20-sim-config-panel {
    gap: 14px 20px;
    padding: 16px;
  }

  .gr20-sim-param {
    width: 100%;
  }

  .gr20-sim-pace-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .gr20-sim-pace-display {
    flex: 1 1 auto;
    justify-content: center;
  }

  .gr20-sim-start-time {
    width: 100%;
  }

  .gr20-sim-metrics {
    gap: 8px;
  }
  .gr20-sim-metric {
    flex: 1 1 100px;
    padding: 8px 10px;
  }
  .gr20-sim-metric-val {
    font-size: 0.95rem;
  }
  .gr20-sim-map {
    height: 280px;
  }

  .gr20-sim-map-toolbar {
    align-items: stretch;
    gap: 10px;
  }

  .gr20-sim-map-style-wrap {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .gr20-sim-map-style-select {
    width: 100%;
    min-width: 0;
  }

  .gr20-sim-add-point-btn,
  .gr20-sim-add-point-cancel {
    width: 100%;
    justify-content: center;
  }

  .gr20-sim-add-point-hint {
    width: 100%;
  }

  .gr20-sim-profile-tooltip {
    max-width: calc(100% - 20px);
    white-space: normal;
    line-height: 1.35;
  }

  .gr20-sim-tech-level {
    min-width: 0;
    width: 100%;
  }

  .gr20-sim-dialog {
    padding: 16px;
  }

  .gr20-sim-dialog-inner {
    width: min(100%, 100%);
    min-width: 0;
    padding: 20px 18px;
    border-radius: 14px;
  }

  .gr20-sim-dialog-btns {
    flex-direction: column;
  }

  .gr20-sim-dialog-btns .gr20-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gr20-grid-4 {
    grid-template-columns: 1fr;
  }

  .gr20-stat {
    padding: 14px 16px 12px;
  }

  .gr20-stage-map-card .strava-embed-placeholder,
  .gr20-hero-map .strava-embed-placeholder {
    min-height: 170px;
    height: 170px;
  }

  .gr20-sim-map {
    height: 240px;
  }
}
