/* ==========================================================
   Coursevélo — style « affiche rétro » (2026)
   Basé sur Bootstrap 5.3 + variables maison.
   ========================================================== */

:root {
  --cream: #f3e7cf;
  --cream-2: #ece0c4;
  --paper: #faf2e0;
  --ink: #221a12;
  --ink-2: #4a3a28;
  --red: #c8412a;
  --red-dark: #9c2f1e;
  --teal: #1f6f7a;
  --teal-dark: #155059;
  --mustard: #d9a441;
  --olive: #6b6a3a;
  --blue: #3a4470;
  --green: #4f7a2a;

  --bs-body-font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--cream);
  --bs-link-color-rgb: 200, 65, 42;
  --bs-link-hover-color-rgb: 156, 47, 30;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  -webkit-font-smoothing: antialiased;
  background-color: var(--cream);
  background-image:
    radial-gradient(rgba(34,26,18,.06) 1px, transparent 1px),
    radial-gradient(rgba(34,26,18,.04) 1px, transparent 1px);
  background-size: 4px 4px, 11px 11px;
  background-position: 0 0, 2px 2px;
}
.display-slab { font-family: 'Alfa Slab One', serif; font-weight: 400; }
.skip { position: absolute; z-index: 100; padding: .5rem 1rem; background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* ── Boutons ─────────────────────────────────────────────── */
.btn-cv {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--red); color: var(--paper); border: 2px solid var(--ink);
  font-weight: 700; padding: .55rem 1.1rem; border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; line-height: 1.3;
}
.btn-cv:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); color: var(--paper); background: var(--red-dark); }
.btn-cv:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-gold { background: var(--mustard); color: var(--ink); }
.btn-gold:hover { background: #c58f2e; color: var(--ink); }
.btn-lg-cv { padding: .8rem 1.5rem; font-size: 1rem; }
.btn-sm-cv { padding: .35rem .8rem; font-size: .78rem; box-shadow: 2px 2px 0 var(--ink); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 5px 0 0 var(--ink), 0 9px 0 0 var(--red);
}
.site-header .navbar { padding: .6rem 0; }
.brand { font-family: 'Rye', serif; font-size: 1.8rem; color: var(--red); line-height: 1; letter-spacing: .5px; }
.brand .v, .foot-brand .v { color: var(--teal); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; background: var(--red);
  display: inline-grid; place-items: center; color: var(--paper);
  border: 2px solid var(--ink); margin-right: .65rem; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .4s ease;
}
.navbar-brand:hover .brand-mark { transform: rotate(-20deg); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark--gold { background: var(--mustard); color: var(--ink); border-color: var(--paper); }
.navbar-toggler { border: 2px solid var(--ink); border-radius: 4px; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(200,65,42,.3); }

.nav-link.nav-cv { color: var(--ink); font-weight: 600; padding: .5rem .85rem !important; position: relative; }
.nav-link.nav-cv:hover, .nav-link.nav-cv.active { color: var(--red); }
.nav-link.nav-cv.active::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 3px; background: var(--red);
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--teal); color: var(--paper); font-family: 'Alfa Slab One', serif; font-size: .85rem;
  border: 2px solid var(--ink);
}
.dropdown-cv { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 var(--ink); }
.dropdown-cv .dropdown-item:hover { background: var(--cream-2); color: var(--red); }

.alert-cv { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); border-radius: 6px; font-weight: 500; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 4rem 0 5rem; overflow: hidden; }
.hero h1 {
  font-family: 'Rye', serif; color: var(--red);
  font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1; margin-bottom: 1.25rem;
  text-shadow: 3px 3px 0 var(--paper), 4px 4px 0 var(--ink);
}
.hero h1 .alt { color: var(--teal); display: block; }
.kicker {
  display: inline-block; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); padding: .35rem .8rem; font-size: .78rem;
  transform: rotate(-1.5deg); margin-bottom: 1.25rem;
}
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 40ch; }
.hero-note { color: var(--ink-2); font-size: .9rem; opacity: .85; }
.hero-poster {
  position: relative; max-width: 460px; margin: 0; transform: rotate(1.2deg);
  border: 6px solid var(--paper); outline: 2px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink), 18px 18px 0 var(--red);
  background: var(--paper);
}
.hero-poster img { display: block; width: 100%; height: auto; }
.stamp {
  position: absolute; top: -22px; right: -22px; width: 104px; height: 104px; border-radius: 50%;
  background: var(--mustard); color: var(--ink); border: 3px solid var(--ink);
  display: grid; place-items: center; text-align: center; font-family: 'Alfa Slab One', serif;
  transform: rotate(12deg); line-height: 1; box-shadow: 4px 4px 0 var(--ink);
}
.stamp .big { font-size: 2.4rem; }
.stamp .small { font-size: .72rem; letter-spacing: .12em; }

.dotline { height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px); opacity: .7; }

/* ── Bandeau en direct ──────────────────────────────────── */
.live-strip { background: var(--ink); color: var(--paper); border-top: 3px solid var(--red); border-bottom: 3px solid var(--red); }
.stat { padding: 1.8rem .75rem; text-align: center; }
.stat .num { font-family: 'Alfa Slab One', serif; font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--mustard); line-height: 1; }
.stat .lbl { text-transform: uppercase; letter-spacing: .15em; font-size: .76rem; opacity: .85; margin-top: .4rem; }
.stat + .stat { border-left: 1px dashed rgba(250,242,224,.25); }
.stat-live { text-align: left; padding-left: 2rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.live-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .15em; font-size: .76rem; color: var(--mustard); margin-bottom: .4rem;
}
.live-badge--off { color: rgba(250,242,224,.6); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #e5533a; box-shadow: 0 0 0 0 rgba(229,83,58,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(229,83,58,0); } 100% { box-shadow: 0 0 0 0 rgba(229,83,58,0); } }
.live-line { font-size: 1rem; }
.live-line strong { color: var(--mustard); }
.progress-cv { width: 100%; max-width: 420px; height: 10px; background: rgba(250,242,224,.15); border-radius: 0; }
.progress-cv .progress-bar { background: repeating-linear-gradient(45deg, var(--mustard) 0 8px, #e8b85a 8px 16px); }
.speaker { font-size: .85rem; opacity: .8; margin-top: .4rem; font-style: italic; }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 5rem 0; position: relative; }
.section-alt { background: var(--cream-2); border-top: 1px solid rgba(34,26,18,.12); border-bottom: 1px solid rgba(34,26,18,.12); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .75rem;
  font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; color: var(--red);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 24px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--mustard); }
.section h2, .cta-section h2 {
  font-family: 'Alfa Slab One', serif; font-weight: 400; color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; margin-bottom: .75rem;
}
.sub { color: var(--ink-2); max-width: 60ch; }
.small-note { color: var(--ink-2); font-size: .92rem; text-align: center; }

/* Étapes */
.step {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: 1.5rem 1.4rem 1.4rem; box-shadow: 4px 4px 0 var(--ink); position: relative; height: 100%;
}
.step .num {
  position: absolute; top: -22px; left: -12px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--mustard); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  display: grid; place-items: center; font-family: 'Alfa Slab One', serif; font-size: 1.3rem;
}
.step h3, .dice-card h3, .bonus-card h3, .sponsor-card h3 { font-family: 'Alfa Slab One', serif; font-weight: 400; }
.step h3 { margin: .3rem 0 .4rem; font-size: 1.15rem; }
.step p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* Dés */
.dice-grid { display: grid; gap: 1.4rem 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.dice-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: 1.2rem 1rem 1.1rem; position: relative; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.dice-card:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.dice-card .roll {
  position: absolute; top: -14px; left: 14px; background: var(--red); color: var(--paper);
  font-family: 'Alfa Slab One', serif; font-size: .95rem; padding: .1rem .55rem; border: 2px solid var(--ink); border-radius: 4px;
}
.dice-card--mid .roll  { background: var(--olive); }
.dice-card--good .roll { background: var(--teal); }
.dice-card--gold .roll { background: var(--mustard); color: var(--ink); }
.dice-card h3 { font-size: 1.15rem; margin: 0; }
.dice-card--bad h3  { color: var(--red-dark); }
.dice-card--good h3 { color: var(--teal-dark); }
.dice-card p { font-size: .9rem; color: var(--ink-2); margin: .3rem 0 0; }
.pair { display: flex; gap: 6px; margin: .4rem 0 .8rem; }
.die { width: 32px; height: 32px; }
.die rect { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.die circle { fill: var(--ink); }
.dice-card:hover .die:first-child { animation: roll .5s ease; }
.dice-card:hover .die:last-child { animation: roll .5s ease .05s; }
@keyframes roll { 50% { transform: rotate(-25deg) translateY(-4px); } }

.ornament { display: flex; align-items: center; gap: .75rem; color: var(--ink-2); }
.ornament .line { flex: 1; height: 1px; background: var(--ink); opacity: .25; }
.ornament-text { font-family: 'Rye', serif; color: var(--red); text-align: center; }

/* Musette */
.bonus-card {
  --accent: var(--teal);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
  padding: 1.5rem; box-shadow: 5px 5px 0 var(--ink); height: 100%;
  display: flex; flex-direction: column; gap: .5rem;
}
.bonus-card--blue  { --accent: var(--blue);  background: linear-gradient(180deg, var(--paper), #e3e3e0); }
.bonus-card--green { --accent: var(--green); background: linear-gradient(180deg, var(--paper), #e6ead4); }
.bonus-card--red   { --accent: var(--red);   background: linear-gradient(180deg, var(--paper), #f5dcd4); }
.bonus-card--teal  { background: linear-gradient(180deg, var(--paper), #f1e8d0); }
.bonus-card .tag {
  align-self: flex-start; font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  background: var(--accent); color: var(--paper); padding: .15rem .5rem; border-radius: 2px;
}
.bonus-icon {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--ink); background: rgba(255,255,255,.5);
}
.bonus-card h3 { margin: 0; font-size: 1.3rem; }
.bonus-card p { color: var(--ink-2); margin: 0; }

/* Classement */
.ranking { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.ranking-row {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .75rem;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: .55rem .9rem; margin-bottom: .55rem; box-shadow: 3px 3px 0 var(--ink);
}
.ranking-row .rank { font-family: 'Alfa Slab One', serif; font-size: 1.15rem; color: var(--ink-2); text-align: center; }
.ranking-row .who { font-weight: 700; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ranking-row .meta { font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.ranking-row.is-leader { background: #f7d65a; box-shadow: 4px 4px 0 var(--ink); }
.ranking-row.is-leader .rank { color: var(--ink); }
.jersey {
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  background: var(--ink); color: #f7d65a; padding: .1rem .45rem; border-radius: 2px;
}

/* Équipes */
.teams { list-style: none; padding: 0; margin: 0; }
.team {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: .35rem .7rem;
  padding: .6rem 0; border-bottom: 1px dashed rgba(34,26,18,.25);
}
.team-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--team); border: 2px solid var(--ink); }
.team-name { font-weight: 700; }
.team-score { font-family: 'Alfa Slab One', serif; font-size: .95rem; }
.team-bar { grid-column: 2 / 4; height: 6px; background: rgba(34,26,18,.1); }
.team-bar span { display: block; height: 100%; background: var(--team); }

.empty-card, .sponsor-card {
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 8px; padding: 1.25rem 1.4rem;
}
.sponsor-card { border-style: solid; box-shadow: 4px 4px 0 var(--ink); }
.sponsor-card h3 { font-size: 1.15rem; margin-bottom: .3rem; }

/* Appel final */
.cta-section {
  background: var(--teal); color: var(--paper); padding: 4.5rem 0; position: relative; overflow: hidden;
  border-top: 3px solid var(--ink);
}
.cta-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, rgba(217,164,65,.2), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(200,65,42,.25), transparent 45%);
}
.cta-section h2 { color: var(--paper); }
.cta-section .sub { color: rgba(250,242,224,.88); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--paper); padding: 3.5rem 0 1.5rem; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--mustard); }
.foot-brand { font-family: 'Rye', serif; color: var(--red); font-size: 1.6rem; }
.site-footer .foot-brand .v { color: var(--mustard); }
.foot-text { max-width: 38ch; color: rgba(250,242,224,.75); }
.foot-title { font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: .9rem; letter-spacing: .1em; color: var(--mustard); margin-bottom: 1rem; text-transform: uppercase; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin-bottom: .45rem; font-size: .95rem; }
.foot-muted { color: rgba(250,242,224,.55); font-size: .85rem; }
.foot-bottom { border-top: 1px dashed rgba(250,242,224,.25); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .82rem; opacity: .8; }

/* ── Modale connexion ───────────────────────────────────── */
.modal-cv { background: var(--paper); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--ink); }
.modal-cv .modal-header { border-bottom: 2px dashed rgba(34,26,18,.25); }
.modal-cv .modal-title { font-size: 1.4rem; color: var(--red); }
.modal-cv .form-label { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.modal-cv .form-control { border: 2px solid var(--ink); border-radius: 4px; background: var(--cream); padding: .6rem .8rem; }
.modal-cv .form-control:focus { border-color: var(--red); box-shadow: 0 0 0 .2rem rgba(200,65,42,.18); background: #fff; }
.nav-cv-tabs { gap: .5rem; }
.nav-cv-tabs .nav-link { color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; font-weight: 600; font-size: .9rem; padding: .35rem .8rem; }
.nav-cv-tabs .nav-link.active { background: var(--ink); color: var(--paper); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding: .75rem 0 .5rem; }
  .nav-link.nav-cv.active::after { display: none; }
}
@media (max-width: 767.98px) {
  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-poster { transform: none; max-width: 340px; box-shadow: 8px 8px 0 var(--ink), 12px 12px 0 var(--red); }
  .stamp { width: 80px; height: 80px; top: -14px; right: -10px; }
  .stamp .big { font-size: 1.8rem; }
  .stat:nth-child(2) { border-left: 1px dashed rgba(250,242,224,.25); }
  .stat-live { border-left: none !important; border-top: 1px dashed rgba(250,242,224,.25); padding-left: 1rem; align-items: center; text-align: center; }
  .ranking-row { grid-template-columns: 34px 1fr; }
  .ranking-row .meta { grid-column: 2; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Page de jeu ────────────────────────────────────────── */
.jeu { padding: 2rem 0 3.5rem; }
.jeu h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--ink); margin: 0; }
.jeu-invite { color: var(--ink-2); font-size: .92rem; max-width: 46ch; }
.jeu-grille { display: grid; grid-template-columns: minmax(0, 787px) minmax(240px, 1fr); gap: 1.25rem; margin-top: 1.25rem; align-items: start; }
.ecran-course {
  position: relative; overflow: hidden; background: #f7f7f2;
  border: 3px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink);
}
.ecran-course iframe { display: block; border: 0; width: 787px; height: 620px; transform-origin: 0 0; }
.chat {
  display: flex; flex-direction: column; height: 626px; background: #2d1000; color: #fff8e1;
  border: 3px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden;
}
.chat-entete { background: linear-gradient(to right, var(--red), #e05a3f); font-family: 'Alfa Slab One', serif; padding: .5rem .9rem; letter-spacing: .05em; }
.chat-messages { flex: 1; overflow-y: auto; padding: .6rem .8rem; font-size: .88rem; }
.chat-messages .msg { padding: .25rem 0; border-bottom: 1px solid rgba(255,255,255,.06); line-height: 1.35; overflow-wrap: anywhere; }
.msg-heure { color: rgba(255,248,225,.4); font-size: .72rem; }
.msg-pseudo { color: #ffca28; }
.msg-moi { color: #80cbc4; }
.msg-systeme { color: #b0a090; font-style: italic; font-size: .8rem; }
.chat-form { display: flex; gap: .4rem; padding: .6rem; background: #3e1500; border-top: 2px solid var(--mustard); }
.chat-form .form-control { background: #fff8e1; border: 2px solid var(--mustard); font-size: .88rem; padding: .35rem .6rem; }
.chat-pied { font-size: .75rem; color: #d7a574; padding: 0 .8rem .5rem; background: #3e1500; }
.chat-pied:empty { display: none; }
.aide-rapide { background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: .8rem 1.1rem; font-size: .92rem; }
.aide-rapide summary { font-family: 'Alfa Slab One', serif; cursor: pointer; }
@media (max-width: 1199.98px) {
  .jeu-grille { grid-template-columns: 1fr; }
  .chat { height: 380px; }
}

/* ── Type d'étape (badges) ──────────────────────────────── */
.type-etape { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; padding: .1rem .5rem; border-radius: 3px; color: #fff; background: var(--ink-2); vertical-align: 2px; font-weight: 700; }
.type-etape:empty { display: none; }
.type-etape.plaine { background: #3f7d3a; }
.type-etape.vallonne { background: var(--mustard); color: var(--ink); }
.type-etape.montagne { background: #6a1b9a; }

/* ── Carnet de route ────────────────────────────────────── */
.carnet h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.2rem; }
.tour-resume {
  display: grid; grid-template-columns: auto 1fr auto; gap: .6rem 1.5rem; align-items: center;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--ink); padding: 1rem 1.3rem;
}
.tour-resume .petit { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); }
.tour-compte .grand { font-family: 'Alfa Slab One', serif; font-size: 2.6rem; color: var(--red); line-height: 1; display: block; }
.tour-compte .grand small { font-size: .5em; color: var(--ink-2); }
.tour-compte .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; color: var(--ink-2); }
.tour-barre { height: 14px; background: var(--cream-2); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.tour-barre span { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--mustard) 0 10px, #e8b85a 10px 20px); }
.tour-chiffres { display: flex; gap: 1.5rem; text-align: center; }
.tour-chiffres b { display: block; font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.2rem; }
.tour-chiffres span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
@media (max-width: 767.98px) { .tour-resume { grid-template-columns: 1fr; } }

.etapes-grille { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 1.5rem; }
.etape-carte {
  position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink); padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem;
}
.etape-carte.a-faire { background: var(--cream-2); box-shadow: 4px 4px 0 rgba(34,26,18,.35); border-style: dashed; }
.etape-carte.faite::after {
  content: "✓"; position: absolute; top: -12px; right: -10px; width: 30px; height: 30px; border-radius: 50%;
  background: #3f7d3a; color: #fff; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--ink);
}
.etape-num { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; color: var(--red); }
.etape-carte h2 { font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.05rem; margin: 0; line-height: 1.2; }
.etape-region { font-size: .82rem; color: var(--ink-2); }
.etape-perf { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .3rem; }
.etape-perf .place { font-family: 'Alfa Slab One', serif; font-size: 1.6rem; color: var(--teal); line-height: 1; }
.etape-perf .place small { font-size: .5em; color: var(--ink-2); }
.etape-perf .temps { font-weight: 700; font-size: .9rem; }
.etape-perf em, .table-carnet em { font-size: .75em; color: var(--ink-2); }
.etape-date { font-size: .75rem; color: var(--ink-2); }
.etape-date .bientot { color: var(--red); font-weight: 700; }
.etape-afaire { margin-top: auto; font-weight: 700; color: var(--ink-2); font-style: italic; }
.h-section { font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.6rem; }
.table-carnet { background: var(--paper); border: 2px solid var(--ink); font-size: .9rem; }
.table-carnet th { background: var(--ink); color: var(--paper); font-weight: 600; }
.table-carnet td small { color: var(--ink-2); }
.table-carnet tr.ancienne td { opacity: .5; }

/* ── Équipes et sponsors ────────────────────────────────── */
.team-name a { color: inherit; text-decoration: none; }
.team-name a:hover { color: var(--red); text-decoration: underline; }
.team-name small { font-size: .75em; opacity: .7; }
.equipes-page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.equipes-grille { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.equipe-carte {
  position: relative; display: flex; flex-direction: column; gap: .6rem;
  background: var(--paper); border: 2px solid var(--ink); border-top: 8px solid var(--team); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink); padding: 1rem 1.1rem 1.1rem;
}
.equipe-carte.mienne { box-shadow: 6px 6px 0 var(--team); outline: 3px solid var(--team); outline-offset: 2px; }
.equipe-badge {
  position: absolute; top: -14px; right: 12px; background: var(--team); color: #fff; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; padding: .15rem .6rem; border: 2px solid var(--ink); border-radius: 4px;
}
.equipe-haut { display: flex; gap: .8rem; align-items: center; }
.equipe-haut img { flex: 0 0 auto; }
.equipe-haut h2 { font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.15rem; margin: 0 0 .2rem; color: var(--team); line-height: 1.15; }
.sponsor-lien { font-size: .85rem; font-weight: 700; color: var(--ink); }
.sponsor-lien:hover { color: var(--red); }
.equipe-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; text-align: center; }
.equipe-chiffres div { background: var(--cream); border-radius: 6px; padding: .35rem; }
.equipe-chiffres b { display: block; font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.2rem; }
.equipe-chiffres span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.equipe-carte .team-bar { height: 6px; background: rgba(34,26,18,.1); }
.equipe-carte .team-bar span { display: block; height: 100%; background: var(--team); }
.equipe-leaders { font-size: .82rem; color: var(--ink-2); }
.foot-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .45rem; border: 1px solid rgba(255,255,255,.5); }

/* ── Profil ─────────────────────────────────────────────── */
.avatar { background-size: cover; background-position: center; }
.profil-page h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.2rem; }
.profil-grille { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 767.98px) { .profil-grille { grid-template-columns: 1fr; } .profil-avatar { max-width: 240px; } }
.avatar-slot {
  position: relative; display: block; width: 100%; aspect-ratio: 1; cursor: pointer; overflow: hidden;
  border: 3px dashed var(--teal); border-radius: 10px; background: var(--cream) center / cover no-repeat;
  box-shadow: 4px 4px 0 var(--ink); transition: border-color .2s, transform .15s;
}
.avatar-slot:not(.vide) { border-style: solid; border-color: var(--ink); }
.avatar-slot:hover, .avatar-slot.survol { border-color: var(--red); transform: translate(-1px, -1px); }
.avatar-slot.survol { border-style: dashed; background-color: #fff3c4; }
.avatar-vide { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--teal); text-align: center; font-weight: 600; font-size: .9rem; }
.avatar-slot.vide .avatar-vide { display: flex; }
.avatar-survol { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; background: rgba(31, 111, 122, .55); opacity: 0; transition: opacity .2s; }
.avatar-slot:not(.vide):hover .avatar-survol { opacity: 1; }
.avatar-charge { position: absolute; inset: 0; display: none; background: rgba(250, 242, 224, .6); }
.avatar-slot.envoi .avatar-charge { display: block; }
.avatar-slot.envoi .avatar-charge::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%;
  border: 4px solid var(--teal); border-top-color: transparent; animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.avatar-msg { font-size: .85rem; font-weight: 600; margin-top: .6rem; min-height: 1.2em; }
.avatar-msg.ok { color: #2e7d32; } .avatar-msg.err { color: var(--red-dark); }
.profil-avatar .petit, .profil-page .petit { font-size: .82rem; color: var(--ink-2); }
.lien-discret { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: .85rem; }
.lien-discret:hover { color: var(--red); }
.profil-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.profil-chiffres > div { background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); padding: .7rem .9rem; }
.profil-chiffres b { display: block; font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.15rem; line-height: 1.2; }
.profil-chiffres span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.profil-desc .form-label { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.profil-desc textarea { border: 2px solid var(--ink); background: var(--paper); }
.profil-desc textarea:focus { border-color: var(--red); box-shadow: 0 0 0 .2rem rgba(200,65,42,.18); }

/* ── Classement général ─────────────────────────────────── */
.classement-page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.ma-position { background: #fff3c4; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); padding: .7rem 1rem; margin-top: 1rem; }
.table-classement { background: var(--paper); border: 2px solid var(--ink); font-size: .95rem; vertical-align: middle; }
.table-classement th { background: var(--ink); color: var(--paper); font-weight: 600; }
.table-classement .num { text-align: right; white-space: nowrap; }
.table-classement .rg { font-family: 'Alfa Slab One', serif; width: 3rem; }
.table-classement .coureur a { color: var(--ink); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.table-classement .coureur a:hover { color: var(--red); }
.table-classement .eq { font-size: .85rem; white-space: nowrap; }
.table-classement .team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--team); border: 1px solid var(--ink); }
.table-classement tr.podium:first-child td { background: #f7d65a; }
.table-classement tr.moi td { background: #fff3c4; }
.table-classement tr.separation td { text-align: center; color: var(--ink-2); }
.avatar.mini { width: 30px; height: 30px; font-size: .8rem; border-width: 2px; flex: 0 0 auto; }
.etape-points { font-weight: 800; color: var(--red); font-size: .9rem; }
.etape-points small { font-weight: 500; color: var(--ink-2); font-size: .75rem; }
.profil-email { margin-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; font-size: .92rem; }
.profil-email .lbl { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.badge-ok, .badge-attente { font-size: .72rem; font-weight: 800; padding: .1rem .45rem; border-radius: 10px; }
.badge-ok { background: #e8f5e9; color: #2e7d32; }
.badge-attente { background: #fff3c4; color: #8a5a00; }

/* ── Contact / support ──────────────────────────────────── */
.contact-page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.contact-page h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.contact-carte, .contact-aide { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); padding: 1.6rem; }
.contact-carte .form-label { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.contact-carte .facultatif { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.contact-carte .form-control, .contact-carte .form-select { border: 2px solid var(--ink); border-radius: 4px; background-color: var(--cream); padding: .6rem .8rem; }
.contact-carte .form-control:focus, .contact-carte .form-select:focus { border-color: var(--red); box-shadow: 0 0 0 .2rem rgba(200,65,42,.18); background-color: #fff; }
.contact-carte .form-control[readonly] { background-color: var(--cream-2); color: var(--ink-2); }
.contact-carte .petit, .contact-page .petit { font-size: .85rem; color: var(--ink-2); }
.contact-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-envoye { text-align: center; padding: 1.5rem .5rem; }
.contact-envoye-icone { font-size: 3.2rem; line-height: 1; margin-bottom: .6rem; }
.contact-aide ul { padding-left: 1.1rem; margin: 0; }
.contact-aide li { margin-bottom: .7rem; color: var(--ink-2); }
.contact-aide li strong { color: var(--ink); }
.contact-aide a, .contact-photo a { color: var(--red); font-weight: 600; }
.contact-photo { margin: 1.5rem 0 0; }
.contact-photo img { width: 100%; height: 200px; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); }
.contact-photo figcaption { font-size: .85rem; color: var(--ink-2); margin-top: .8rem; }

/* ── Boutique (achats.php, achats-statut.php) ───────────── */
.boutique-page h1 { font-size: clamp(2rem, 4vw, 3rem); }
.boutique-page h2 { font-size: 1.35rem; margin: 0; }
.offre-carte { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); padding: 1.6rem; }
.offre-entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.offre-entete h2 { font-size: 1.8rem; }
.offre-prix { font-family: 'Alfa Slab One', serif; font-size: 1.6rem; color: var(--paper); background: var(--red); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 3px 3px 0 var(--ink); padding: .2rem .8rem; white-space: nowrap; }
.offre-fruits { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
@media (max-width: 575.98px) { .offre-fruits { grid-template-columns: 1fr; } }
.offre-fruits li { display: flex; align-items: center; gap: .6rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; padding: .6rem .7rem; }
.offre-fruits img { width: 30px; height: auto; flex: 0 0 auto; }
.offre-fruits b { display: block; font-size: 1rem; }
.offre-fruits small { display: block; font-size: .78rem; color: var(--ink-2); line-height: 1.25; }
.boutique-page .petit { font-size: .85rem; color: var(--ink-2); }
.paiement-boutons { margin-top: 1.2rem; min-height: 60px; position: relative; z-index: 0; }
.paiement-attente { color: var(--ink-2); font-size: .9rem; }
.paiement-message { margin-top: .8rem; font-weight: 700; color: var(--teal-dark); }
.musette-stock { list-style: none; padding: 0; margin: 0; }
.musette-stock li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px dashed rgba(34,26,18,.2); color: var(--ink); }
.musette-stock img { width: 22px; height: auto; }
.musette-stock b { margin-left: auto; font-family: 'Alfa Slab One', serif; font-weight: 400; font-size: 1.15rem; }
.statut-carte { max-width: 640px; margin: 1rem auto 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); padding: 2rem 1.6rem; }
.statut { text-align: center; }
.statut h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
.statut.succes h1 { color: var(--teal-dark); } .statut.echec h1 { color: var(--red-dark); }
.statut-icone { font-size: 2.8rem; line-height: 1; margin-bottom: .6rem; }
.statut-stock { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.2rem; font-weight: 700; }
.statut-stock img { width: 20px; height: auto; vertical-align: -3px; }
.statut a:not(.btn-cv) { color: var(--red); font-weight: 600; }

/* ── Administration (admin.php) ───────────────────────── */
.admin-page { padding-top: 3rem; }
.admin-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.admin-tuile { background: var(--paper); border: 2px solid var(--ink); padding: .9rem 1rem; display: flex; flex-direction: column; }
.admin-tuile b { font-family: 'Alfa Slab One', serif; font-size: 2rem; line-height: 1.1; }
.admin-tuile span { font-size: .85rem; color: var(--ink-2); }
.admin-page h2.admin-titre { font-family: 'Alfa Slab One', serif; font-size: 1.3rem; margin-bottom: .8rem; }
.admin-table { font-size: .9rem; }
.admin-table a { color: var(--ink); }
.admin-table tr.banni td, .admin-chat li.banni { opacity: .45; text-decoration: line-through; }
.admin-badge { font-size: .7rem; background: var(--teal-dark, #1d6b63); color: #fff; padding: .05rem .4rem; border-radius: 3px; vertical-align: 1px; }
.admin-lien { background: none; border: 0; padding: 0 .2rem; color: var(--ink-2); font-size: .8rem; text-decoration: underline; cursor: pointer; }
.admin-lien:hover { color: var(--ink); } .admin-lien.rouge { color: var(--red); }
.admin-chat, .admin-blacklist { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 2px solid var(--ink); max-height: 32rem; overflow-y: auto; }
.admin-chat li, .admin-blacklist li { padding: .45rem .8rem; border-bottom: 1px solid rgba(0,0,0,.08); font-size: .9rem; }
.admin-chat .quand { color: var(--ink-2); font-size: .78rem; margin-right: .3rem; }
.admin-chat .texte { word-break: break-word; }
.admin-chat .outils { float: right; margin-left: .5rem; }
.admin-blacklist li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
