/* =====================================================================
   site_v2.css — habillage "Moderne vert" JF-Chronotrail
   Chargé par top.php après style.css. Les pages refondues (accueil, infos)
   ajoutent la classe "page-v2" sur <body> (variable $body_class avant top.php)
   pour sortir de la carte grise ; les autres pages gardent leur mise en page,
   mais profitent du nouvel en-tête, du menu mobile et du pied de page.
   Couleurs : #008c8c (accent), #007070 (boutons, texte blanc lisible),
   #004d4d, #e4f1f1, #27406b (troc), #b3265f / #8a1d48 (alertes, contact).
   ===================================================================== */

:root {
    --j-teal: #008c8c;
    --j-teal-dark: #007070;
    --j-teal-deep: #004d4d;
    --j-teal-soft: #e4f1f1;
    --j-bg: #f4f7f7;
    --j-ink: #2b2d2f; /* gris foncé du lettrage du logo */
    --j-muted: #44585d;
    --j-line: #d9e4e4;
    --j-indigo: #27406b;
    --j-rasp: #c4260f; /* rouge du logo (JF + chronomètre), contraste blanc 5,4:1 */
    --j-rasp-dark: #a31f0c;
    --j-navy: #34495e;
    --j-red: #c0392b;
    --j-font: Inter, 'Segoe UI', system-ui, sans-serif;
}

html body { background-color: var(--j-bg) !important; font-family: var(--j-font) !important; color: var(--j-ink); }

.site-container { max-width: 1440px; box-shadow: 0 0 30px rgba(0, 60, 60, .06); }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--j-navy);
    outline-offset: 2px;
}

/* ---------- EN-TÊTE FIXE (PC) ---------- */
.jf-hdr {
    padding-bottom: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 3px solid var(--j-teal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.jf-hdr-in {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}
.jf-hdr-logo img { height: 56px; width: auto; display: block; }
.jf-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 24px;
    font-size: 16px;
    font-weight: 600;
}
.jf-nav > a,
.jf-nav .jf-dd-btn {
    color: var(--j-ink);
    text-decoration: none;
    padding: 10px 2px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.jf-nav > a:hover,
.jf-nav .jf-dd-btn:hover { color: var(--j-teal-dark); border-bottom-color: var(--j-line); }
.jf-nav > a.actif { color: var(--j-ink); border-bottom-color: var(--j-rasp); }

.jf-dd { position: relative; }
.jf-dd-btn { padding: 10px 10px !important; margin: 0 -8px; border-radius: 8px 8px 0 0; }
.jf-dd.ouvert .jf-dd-btn,
.jf-dd:hover .jf-dd-btn { color: var(--j-teal-dark); background: var(--j-teal-soft); border-bottom-color: var(--j-teal-dark); }
.jf-dd-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 3px;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid var(--j-line);
    border-radius: 12px 0 12px 12px;
    box-shadow: 0 14px 34px rgba(0, 60, 60, .2);
    overflow: hidden;
    z-index: 1200;
}
.jf-dd.ouvert .jf-dd-menu,
.jf-dd:hover .jf-dd-menu,
.jf-dd:focus-within .jf-dd-menu { display: block; }
.jf-dd-titre {
    padding: 12px 16px;
    background: var(--j-teal-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--j-teal-deep);
}
.jf-dd-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    min-height: 44px;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--j-ink);
    border-top: 1px solid #e3ebeb;
    font-size: 15px;
    font-weight: 600;
}
.jf-dd-menu a:hover { background: #f4f7f7; color: var(--j-teal-dark); }
.jf-dd-menu a span.d { font-size: 13px; font-weight: 400; color: var(--j-muted); white-space: nowrap; }
.jf-dd-vide { padding: 14px 16px; font-size: 14px; color: var(--j-muted); font-style: italic; }
.jf-dd svg, .jf-nav svg { flex: none; }

/* ---------- PAGES REFONDUES : on sort de la carte grise ---------- */
body.page-v2 .page-content { padding: 0 !important; display: block !important; min-height: 0; }
body.page-v2 .col-main { max-width: none !important; }
body.page-v2 .card-white {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0;
}
.v2-wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* ---------- BANDEAU D'ALERTE ---------- */
.v2-alerte { background: #fde7e2; color: #8f1a08; }
.v2-alerte-in {
    max-width: 1440px; margin: 0 auto; padding: 10px 32px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 8px 16px; font-size: 15px;
}
.v2-alerte a {
    color: #fff; background: var(--j-rasp-dark); text-decoration: none; font-weight: 700;
    padding: 6px 14px; border-radius: 999px; min-height: 32px; display: inline-flex; align-items: center;
}
.v2-alerte a:hover { background: #7d1807; }

/* ---------- CALENDRIER ---------- */
.v2-cal-head { background: var(--j-teal-soft); border-bottom: 1px solid var(--j-line); }
.v2-cal-head .v2-wrap {
    padding-top: 22px; padding-bottom: 18px;
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px;
}
.v2-cal-head h1 { margin: 0; font-size: 28px; line-height: 1.15; color: var(--j-teal-deep); font-weight: 800; }
.v2-cal-head p { margin: 4px 0 0; font-size: 15px; color: var(--j-muted); }
.v2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-chip {
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    border: 1.5px solid var(--j-teal-dark); background: #fff; color: var(--j-teal-dark);
}
.v2-chip[aria-pressed="true"] { background: var(--j-teal-dark); color: #fff; }

.v2-grid {
    max-width: 1440px; margin: 0 auto; padding: 24px 32px 8px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(max(250px, calc((100% - 66px) / 4)), 1fr)); gap: 22px; /* 4 cartes max par ligne */
}
.cc {
    background: #fff; border: 1px solid var(--j-line); border-left: 5px solid var(--j-teal);
    border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 60, 60, .06);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cc:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 60, 60, .14); }
.cc[data-statut="later"], .cc[data-statut="tbc"], .cc[data-statut="closed"], .cc[data-statut="soon"] { border-left-color: #9fb3b3; }
.cc[data-statut="open"] { border-left-color: var(--j-teal); }
.cc[data-statut="annulee"], .cc[data-statut="complet"] { border-left-color: var(--j-red); }
.cc[hidden] { display: none; }

.cc-poster { text-decoration: none; position: relative; display: block; aspect-ratio: 1 / .88; background: var(--j-teal-soft); overflow: hidden; }
.cc-poster img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.cc-ph {
    width: 100%; height: 100%; box-sizing: border-box; padding: 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
    background: linear-gradient(160deg, #008c8c 0%, #004d4d 100%); color: #fff;
    font-weight: 800; font-size: 20px; line-height: 1.2;
}
.cc-ph svg { opacity: .85; }
.cc-poster img.cc-full { display: none; }
@media (hover: hover) and (min-width: 601px) {
    /* Survol : l'affiche apparaît en entier (fondu + léger zoom arrière) ; le clic ouvre la page de la course */
    .cc-poster { cursor: pointer; }
    .cc-poster img.cc-full {
        display: block; position: absolute; inset: 0; object-fit: contain; object-position: center;
        background: var(--j-teal-soft); opacity: 0; transform: scale(1.06);
        transition: opacity .3s ease, transform .35s ease;
    }
    .cc:hover .cc-poster img.cc-full, .cc-poster:focus-visible img.cc-full { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .cc-poster img.cc-full { transition: none; transform: none; } }
.cc-poster .pill { position: absolute; left: 10px; top: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.cc-body { padding: 14px 16px 6px; flex: 1; }
.cc-body .pill { margin-bottom: 8px; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v2-chips[hidden] { display: none; }
.cc-date { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--j-teal-dark); }
.cc-nom { display: block !important; border: 0 !important; padding: 0 !important; margin: 0 0 6px; font-size: 19px; line-height: 1.2; font-weight: 800; }
.cc-nom a { color: var(--j-ink); text-decoration: none; }
.cc-nom a:hover { color: var(--j-teal-dark); text-decoration: underline; }
.cc-lieu { margin: 0 0 6px; font-size: 14px; color: var(--j-muted); display: flex; align-items: center; gap: 6px; }
.cc-com { margin: 0; font-size: 14px; color: var(--j-muted); font-style: italic; line-height: 1.4; }
.cc-dist { list-style: none; margin: 0; padding: 0; font-size: 14px; font-style: italic; line-height: 1.4; color: var(--j-muted); }
.cc-dist li { display: inline; }
.cc-dist li:not(:last-child)::after { content: ", "; color: var(--j-muted); text-decoration: none; display: inline-block; white-space: pre; }
.cc-dist li.d-complet { color: #c4260f; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.cc-note { margin: 6px 0 0; font-size: 13px; color: var(--j-muted); }
.cc-fin { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--j-red); }
.cc-actions { padding: 12px 16px 16px; display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
    display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.pill-open { background: #1e7a46; color: #fff; }
.pill-soon { background: var(--j-rasp-dark); color: #fff; }
.pill-later, .pill-tbc, .pill-closed { background: #e6ecec; color: #33474c; }
.pill-annulee, .pill-complet { background: #fbe9e7; color: #922b21; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 16px; border-radius: 8px; box-sizing: border-box;
    font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
    border: 2px solid var(--j-teal-dark);
}
.btn-primary { background: var(--j-teal-dark); color: #fff !important; }
.btn-primary:hover { background: var(--j-teal-deep); border-color: var(--j-teal-deep); }
.btn-ghost { background: #fff; color: var(--j-teal-dark) !important; }
.btn-ghost:hover { background: var(--j-teal-soft); }
.btn-troc { background: var(--j-indigo); border-color: var(--j-indigo); color: #fff !important; }
.btn-troc:hover { background: #1c2f50; border-color: #1c2f50; }
.cc-actions .btn { flex: 1 1 auto; }
/* Cartes compactes : une carte entière tient dans un écran 16/9 */
.cc-actions { padding: 8px 14px 12px; gap: 6px; }
.cc-actions .btn { min-height: 36px; padding: 0 12px; font-size: 14px; flex: 1 1 100%; }
.cc-body { padding: 12px 14px 4px; }

.v2-vide { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--j-muted); background: #fff; border-radius: 12px; border: 1px dashed var(--j-line); }

/* ---------- SECTIONS ACCUEIL ---------- */
.v2-section { max-width: 1440px; margin: 0 auto; padding: 28px 32px 0; }
.v2-section h2 { margin: 0 0 14px; font-size: 22px; font-weight: 800; color: var(--j-teal-deep); }
.v2-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.v2-res a {
    display: block; background: #fff; border: 1px solid var(--j-line); border-radius: 12px; padding: 16px 18px;
    text-decoration: none; color: var(--j-ink); min-height: 44px; box-sizing: border-box;
}
.v2-res a:hover { border-color: var(--j-teal); box-shadow: 0 6px 16px rgba(0, 60, 60, .12); }
.v2-res .m { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--j-teal-dark); }
.v2-res .n { display: block; font-size: 17px; font-weight: 800; margin: 4px 0; }
.v2-res .l { display: block; font-size: 14px; color: var(--j-muted); }
.v2-res .go { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--j-teal-dark); }
.v2-plus { margin-top: 12px; }
.v2-plus a { color: var(--j-teal-dark); font-weight: 700; }

.v2-troc {
    background: var(--j-indigo); color: #fff; border-radius: 14px; padding: 24px 26px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.v2-troc h2 { color: #fff; margin: 0 0 6px; }
.v2-troc p { margin: 0; font-size: 16px; line-height: 1.5; max-width: 640px; color: #e6ebf5; }
.v2-troc .btn { background: #fff; color: var(--j-indigo) !important; border-color: #fff; }
.v2-troc .btn:hover { background: #e6ebf5; }

.v2-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.v2-tuile {
    background: #fff; border: 1px solid var(--j-line); border-radius: 12px; padding: 16px;
    text-decoration: none; color: var(--j-ink); display: flex; gap: 12px; align-items: flex-start; min-height: 44px; box-sizing: border-box;
}
.v2-tuile:hover { border-color: var(--j-teal); }
.v2-tuile svg { flex: none; margin-top: 2px; }
.v2-tuile strong { display: block; font-size: 16px; }
.v2-tuile span { display: block; font-size: 14px; color: var(--j-muted); margin-top: 2px; }

/* ---------- PAGE INFOS & ORGA ---------- */
.v2-titre { padding-top: 28px; }
.v2-titre h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; color: var(--j-teal-deep); }
.v2-titre p { margin: 0; color: var(--j-muted); font-size: 16px; }
.v2-ancres { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.v2-ancres a { text-decoration: none; }
.v2-bloc-titre { display: flex; align-items: center; gap: 12px; margin: 34px 0 6px; padding-bottom: 8px; border-bottom: 3px solid var(--j-teal); }
.v2-bloc-titre h2 { margin: 0; font-size: 24px; font-weight: 800; color: var(--j-teal-deep); }
.v2-infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.v2-info {
    background: #fff; border: 1px solid var(--j-line); border-left: 5px solid var(--j-teal); border-radius: 12px;
    padding: 16px 18px; text-decoration: none; color: var(--j-ink); display: block; box-sizing: border-box;
}
a.v2-info:hover { box-shadow: 0 6px 16px rgba(0, 60, 60, .12); border-color: var(--j-teal); }
.v2-info h3 { margin: 6px 0 4px; font-size: 17px; font-weight: 800; }
.v2-info p { margin: 0; font-size: 14.5px; color: var(--j-muted); line-height: 1.5; }
.v2-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--j-teal-soft); color: var(--j-teal-deep); }
.v2-intro-asso { font-size: 16px; line-height: 1.6; color: var(--j-muted); margin: 14px 0 0; max-width: 820px; }
.v2-benevoles {
    margin-top: 18px; padding: 20px; background: #f4fdfd; border: 2px dashed var(--j-teal); border-radius: 12px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px;
}
.v2-benevoles > div { flex: 1; min-width: 240px; }
.v2-benevoles strong { display: block; font-size: 17px; color: var(--j-ink); margin-bottom: 4px; }
.v2-benevoles span { font-size: 14.5px; color: var(--j-muted); line-height: 1.5; }
.v2-benevoles .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-pied-infos { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 28px 0 0; }
.v2-pay { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--j-line); border-radius: 12px; padding: 12px 18px; min-height: 64px; box-sizing: border-box; }
.v2-pay span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5a6b70; }
.v2-pay img { height: 36px; width: auto; display: block; }
.btn-navy { background: var(--j-navy); border-color: var(--j-navy); color: #fff !important; min-height: 64px; padding: 0 28px; font-size: 16px; }
.btn-navy:hover { background: var(--j-teal-dark); border-color: var(--j-teal-dark); }

/* ---------- PIED DE PAGE ---------- */
.footer-light.jf-foot { border-top: 4px solid var(--j-rasp) !important; background: #12303a; color: #d6e6e8; padding: 28px 32px; text-align: left; font-size: 14px; }
.jf-foot-in { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.jf-foot p { margin: 0; color: #d6e6e8; }
.jf-foot a { color: #fff; }
.jf-foot .btn-contact-foot {
    background: var(--j-rasp-dark); color: #fff !important; text-decoration: none; font-weight: 700;
    min-height: 44px; padding: 0 20px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px;
}
.jf-foot .btn-contact-foot:hover { background: #7d1807; }
.jf-foot-liens { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.jf-foot-liens a { font-size: 14px; }
.jf-foot small { display: block; margin-top: 4px; color: #a9c3c6; font-size: 12.5px; }

/* ---------- MOBILE ---------- */
@media (max-width: 992px) {
    .jf-hdr { display: none !important; }
    .v2-cal-head h1 { font-size: 24px; }
    .v2-grid { padding: 16px 14px 4px; gap: 14px; }
    .v2-section { padding: 22px 14px 0; }
    .v2-wrap, .v2-cal-head .v2-wrap, .v2-alerte-in { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 600px) {
    .v2-grid { grid-template-columns: 1fr; }
    .cc { display: grid; grid-template-columns: 96px 1fr; align-items: start; border-radius: 10px; }
    .cc-poster { grid-row: 1; grid-column: 1; aspect-ratio: 88 / 124; margin: 12px 0 0 12px; border-radius: 6px; width: 84px; }
    .cc-poster .pill { display: none; }
    .cc-body { grid-row: 1; grid-column: 2; padding: 12px 12px 4px 10px; }
    .cc-body .pill { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: inline-flex; }
    .cc-ph { font-size: 11px; padding: 6px; gap: 6px; }
    .cc-ph svg { width: 20px; height: 20px; }
    .cc-actions { grid-column: 1 / -1; padding-top: 8px; }
    .cc-actions .btn { flex: 1 1 100%; }
    .v2-troc { padding: 20px 18px; }
}

/* ---------- Un peu de fun : résultats, troc, infos pratiques ---------- */
.v2-section h2 { display: flex; align-items: center; gap: 10px; }
.v2-section h2::before { font-size: 26px; line-height: 1; }
#titre-resultats::before { content: "🏆"; }
#titre-pratique::before { content: "💡"; }
.v2-res a { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, border-color .2s ease; }
.v2-res a::after { content: "🏅"; position: absolute; right: 12px; top: 10px; font-size: 24px; opacity: .85; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.v2-res a:hover { transform: translateY(-4px) rotate(-.5deg); }
.v2-res a:hover::after { transform: rotate(18deg) scale(1.25); }
.v2-res .go { transition: transform .2s ease; }
.v2-res a:hover .go { transform: translateX(6px); }
/* troc : bandeau plus vivant */
.v2-troc { position: relative; overflow: hidden; }
.v2-troc::before { content: "🔄"; position: absolute; right: -8px; top: -22px; font-size: 130px; opacity: .1; transform: rotate(-12deg); pointer-events: none; }
.v2-troc h2::before { content: "🎽"; font-size: 28px; }
.v2-troc .btn { box-shadow: 0 4px 0 rgba(0, 0, 0, .18); transition: transform .15s ease, box-shadow .15s ease, background .2s ease; }
.v2-troc .btn::before { content: "🔄"; margin-right: 8px; display: inline-block; transition: transform .45s ease; }
.v2-troc .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .18); }
.v2-troc .btn:hover::before { transform: rotate(180deg); }
.v2-troc .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
/* infos pratiques : tuiles qui réagissent */
.v2-tuile { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, border-color .2s ease; }
.v2-tuile:hover { transform: translateY(-4px) rotate(.4deg); box-shadow: 0 8px 18px rgba(0, 112, 112, .18); border-color: var(--j-teal); }
.v2-tuile svg { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.v2-tuile:hover svg { transform: scale(1.25) rotate(-8deg); }
@media (prefers-reduced-motion: reduce) {
    .v2-res a, .v2-res a:hover, .v2-tuile, .v2-tuile:hover, .v2-troc .btn, .v2-troc .btn:hover { transform: none; transition: none; }
    .v2-res a::after, .v2-res a:hover::after, .v2-tuile:hover svg, .v2-troc .btn::before { transform: none; transition: none; }
}
.v2-troc h2 { border-bottom: 0; padding-bottom: 0; }

/* ---------- Page INFOS : coureurs d'abord, plus vivante ---------- */
body.page-infos .v2-titre h1 { font-size: 34px; }
body.page-infos .v2-emoji { display: inline-block; animation: jfCours 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes jfCours { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(8px) rotate(-6deg); } }
body.page-infos .v2-bloc-titre { border-bottom: 0; margin-top: 30px; padding-bottom: 0; }
body.page-infos .v2-bloc-titre h2 { font-size: 26px; }
body.page-infos .v2-infos-run { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

body.page-infos .v2-run {
    --cc: #007070; display: flex; flex-direction: column; align-items: flex-start; padding: 20px 20px 18px; border-left: 1px solid var(--j-line);
    border-top: 5px solid var(--cc); border-radius: 16px; position: relative; overflow: hidden;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
body.page-infos .v2-c-teal { --cc: #008c8c; --cs: #e4f1f1; }
body.page-infos .v2-c-indigo { --cc: #27406b; --cs: #e6ebf5; }
body.page-infos .v2-c-amber { --cc: #e08a1e; --cs: #fff1dc; }
body.page-infos .v2-c-blue { --cc: #3498db; --cs: #e4f1fb; }
body.page-infos .v2-c-slate { --cc: #7a8d92; --cs: #edf1f2; }
body.page-infos .v2-badge { width: 54px; height: 54px; border-radius: 16px; background: var(--cs, #e4f1f1); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
body.page-infos .v2-run h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
body.page-infos .v2-run p { flex: 1 1 auto; font-size: 15px; }
body.page-infos .v2-go { margin-top: 14px; font-size: 14px; font-weight: 800; color: var(--cc); }
body.page-infos .v2-go b { display: inline-block; transition: transform .2s ease; }
body.page-infos a.v2-run:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 14px 26px rgba(0, 60, 60, .16); border-color: var(--j-line); }
body.page-infos a.v2-run:hover .v2-badge { transform: scale(1.12) rotate(-8deg); }
body.page-infos a.v2-run:hover .v2-go b { transform: translateX(6px); }
body.page-infos a.v2-run:active { transform: translateY(1px) scale(.985); }
body.page-infos div.v2-run .v2-go { color: var(--j-muted); }

/* partie organisateurs : plus discrète, en bande douce */
body.page-infos .v2-orga { margin-top: 48px; padding: 6px 28px 28px; background: #e9f1f1; border: 1px solid var(--j-line); border-radius: 18px; }
body.page-infos .v2-orga .v2-bloc-titre h2 { font-size: 22px; }
body.page-infos .v2-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
body.page-infos .v2-service { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--j-line); border-radius: 12px; padding: 12px 14px; }
body.page-infos .v2-badge-s { width: 40px; height: 40px; border-radius: 12px; margin: 0; flex: none; background: var(--j-teal-soft); }
body.page-infos .v2-service h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 800; }
body.page-infos .v2-service p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--j-muted); }
body.page-infos .v2-benevoles { background: #fff; border: 1px solid var(--j-line); border-left: 5px solid var(--j-teal); }
@media (max-width: 850px) { body.page-infos .v2-orga { padding: 4px 14px 20px; border-radius: 14px; } body.page-infos .v2-titre h1 { font-size: 28px; } }
@media (prefers-reduced-motion: reduce) {
    body.page-infos .v2-emoji { animation: none; }
    body.page-infos .v2-run, body.page-infos a.v2-run:hover, body.page-infos .v2-badge, body.page-infos .v2-go b { transform: none !important; transition: none; }
}
body.page-infos .v2-bloc-titre h2 { border: 0 !important; text-decoration: none !important; padding: 0 !important; }

/* ---------- Page CATÉGORIES D'ÂGE ---------- */
body.page-categories .cat-page { max-width: 1100px; }
body.page-categories .cat-finder { margin: 18px 0 22px; padding: 22px 24px; border-radius: 18px; background: linear-gradient(110deg, var(--j-teal-dark), #0a9a9a); color: #fff; box-shadow: 0 8px 22px rgba(0, 90, 90, .22); }
body.page-categories .cat-finder-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
body.page-categories .cat-finder-form { flex: 0 1 280px; }
body.page-categories .cat-finder h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; color: #fff; border: 0; padding: 0; }
body.page-categories .cat-finder label { display: block; font-size: 14px; font-weight: 600; opacity: .92; margin-bottom: 6px; }
body.page-categories .cat-finder input {
    width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 16px; font: 800 22px var(--j-font); color: var(--j-teal-deep);
    border: 3px solid transparent; border-radius: 14px; outline: none; background: #fff; transition: box-shadow .2s ease, border-color .2s ease;
}
body.page-categories .cat-finder input:focus { border-color: #ffd36b; box-shadow: 0 0 0 4px rgba(255, 211, 107, .35); }
body.page-categories .cat-resultat { flex: 1 1 320px; display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 14px 18px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); border-radius: 14px; }
body.page-categories .cat-resultat-vide { opacity: .9; font-size: 15px; }
body.page-categories .cat-badge { flex: none; min-width: 66px; padding: 10px 14px; text-align: center; border-radius: 16px; background: #fff; color: var(--j-teal-deep); font-size: 26px; font-weight: 800; animation: jfPop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes jfPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
body.page-categories .cat-resultat strong { display: block; font-size: 19px; }
body.page-categories .cat-resultat span { display: block; font-size: 14px; opacity: .95; margin-top: 2px; }
body.page-categories .cat-resultat .cat-trail { margin-top: 6px; font-weight: 700; }

body.page-categories .cat-regle { margin: 0 0 8px; padding: 14px 18px; background: #fff; border: 1px solid var(--j-line); border-left: 5px solid var(--j-teal); border-radius: 12px; line-height: 1.6; color: var(--j-muted); }
body.page-categories .cat-h2 { margin: 34px 0 4px; font-size: 22px; font-weight: 800; color: var(--j-teal-deep); border: 0; padding: 0; }
body.page-categories .cat-h2 small { font-size: 13px; font-weight: 700; color: var(--j-teal-dark); background: var(--j-teal-soft); padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
body.page-categories .cat-note { margin: 0 0 12px; color: var(--j-muted); font-size: 14.5px; line-height: 1.5; }
body.page-categories .cat-table-wrap { background: #fff; border: 1px solid var(--j-line); border-radius: 14px; overflow: hidden; }
body.page-categories .cat-table { width: 100%; border-collapse: collapse; }
body.page-categories .cat-table thead th { background: var(--j-teal-soft); color: var(--j-teal-deep); text-align: left; padding: 12px 16px; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; }
body.page-categories .cat-table tbody td { padding: 11px 16px; border-top: 1px solid var(--j-line); font-size: 15px; }
body.page-categories .cat-table tbody tr { transition: background .15s ease; }
body.page-categories .cat-table tbody tr:hover { background: #f3f9f9; }
body.page-categories .cat-code { display: inline-block; min-width: 36px; text-align: center; padding: 3px 10px; border-radius: 999px; background: #fdebe5; color: var(--j-rasp-dark); font-weight: 800; font-size: 13px; }
body.page-categories .cat-dist { color: var(--j-muted); }
body.page-categories .cat-table tbody tr.is-moi { background: #fff4cf; box-shadow: inset 5px 0 0 #f0a81c; }
body.page-categories .cat-table tbody tr.is-moi td { font-weight: 700; }
body.page-categories .cat-details { margin-top: 30px; background: #fff; border: 1px solid var(--j-line); border-radius: 14px; padding: 4px 18px 14px; }
body.page-categories .cat-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 800; font-size: 17px; color: var(--j-teal-deep); }
body.page-categories .cat-source { margin: 30px 0 0; text-align: center; font-size: 13px; color: var(--j-muted); }
body.page-categories .cat-source a { color: var(--j-teal-dark); font-weight: 700; }
@media (max-width: 700px) {
    body.page-categories .cat-finder { padding: 18px 16px; }
    body.page-categories .cat-finder-form { flex-basis: 100%; }
    body.page-categories .cat-table thead { display: none; }
    body.page-categories .cat-table, body.page-categories .cat-table tbody, body.page-categories .cat-table tr, body.page-categories .cat-table td { display: block; }
    body.page-categories .cat-table tbody tr { padding: 8px 0; border-top: 1px solid var(--j-line); }
    body.page-categories .cat-table tbody tr:first-child { border-top: 0; }
    body.page-categories .cat-table tbody td { border: 0; padding: 3px 16px; }
    body.page-categories .cat-table tbody td::before { content: attr(data-label) " : "; font-weight: 700; color: var(--j-teal-dark); }
}
@media (prefers-reduced-motion: reduce) { body.page-categories .cat-badge { animation: none; } }

/* bloc repliable : flèche + libellé "Afficher" qui indiquent qu'on peut déplier */
body.page-categories .cat-details summary { list-style: none; gap: 10px; }
body.page-categories .cat-details summary::-webkit-details-marker { display: none; }
body.page-categories .cat-details summary::after {
    content: "Afficher"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--j-teal-dark);
}
body.page-categories .cat-details summary::before {
    content: ""; flex: none; order: 2; margin-left: 8px; width: 9px; height: 9px; border: solid var(--j-teal-dark); border-width: 0 3px 3px 0;
    transform: rotate(45deg) translateY(-2px); transition: transform .25s ease;
}
body.page-categories .cat-details summary > * { order: 0; }
body.page-categories .cat-details[open] summary::after { content: "Masquer"; }
body.page-categories .cat-details[open] summary::before { transform: rotate(-135deg) translateY(-2px); }
body.page-categories .cat-details summary:hover { color: var(--j-teal-dark); }

/* ---------- Page CONTACT ---------- */
body.page-contact .ct-page { max-width: 900px; margin-left: auto; margin-right: auto; }
body.page-contact .ct-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 18px 0 24px; }
body.page-contact .ct-carte {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--j-line); border-radius: 16px;
    text-decoration: none; color: var(--j-ink); min-height: 44px; box-sizing: border-box;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, border-color .2s ease;
}
body.page-contact .ct-badge { flex: none; width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; background: var(--j-teal-soft); color: var(--j-teal-dark); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
body.page-contact .ct-tel .ct-badge { background: #fff1dc; color: #c26a0a; }
body.page-contact .ct-txt { flex: 1; min-width: 0; }
body.page-contact .ct-txt small { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--j-muted); }
body.page-contact .ct-txt strong { display: block; font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
body.page-contact .ct-go { font-size: 22px; color: var(--j-teal-dark); transition: transform .2s ease; }
body.page-contact .ct-carte:hover { transform: translateY(-4px) rotate(-.3deg); border-color: var(--j-teal); box-shadow: 0 12px 24px rgba(0, 90, 90, .16); }
body.page-contact .ct-carte:hover .ct-badge { transform: scale(1.1) rotate(-8deg); }
body.page-contact .ct-carte:hover .ct-go { transform: translateX(6px); }

body.page-contact .ct-form { background: #fff; border: 1px solid var(--j-line); border-top: 5px solid var(--j-teal); border-radius: 18px; padding: 26px 28px 28px; box-shadow: 0 2px 8px rgba(0, 60, 60, .05); }
body.page-contact .ct-form h2 { margin: 0 0 20px; font-size: 22px; font-weight: 800; color: var(--j-teal-deep); border: 0; padding: 0; }
body.page-contact .ct-form h2 i { color: var(--j-teal); margin-right: 8px; }
body.page-contact .ct-objets { border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 10px; }
body.page-contact .ct-objets legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--j-muted); }
body.page-contact .ct-objets label { position: relative; cursor: pointer; }
body.page-contact .ct-objets input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
body.page-contact .ct-objets span {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; font-size: 15px; color: var(--j-teal-dark);
    background: #fff; border: 1.5px solid var(--j-teal); border-radius: 999px; transition: background .15s ease, color .15s ease, transform .15s ease;
}
body.page-contact .ct-objets label:hover span { background: var(--j-teal-soft); transform: translateY(-2px); }
body.page-contact .ct-objets input:checked + span { background: var(--j-teal-dark); color: #fff; border-color: var(--j-teal-dark); }
body.page-contact .ct-objets input:focus-visible + span { outline: 3px solid #ffd36b; outline-offset: 2px; }
body.page-contact .ct-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body.page-contact .ct-champ { margin-bottom: 18px; }
body.page-contact .ct-champ label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--j-muted); }
body.page-contact .ct-champ input, body.page-contact .ct-champ textarea {
    width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px; font: 500 16px var(--j-font); color: var(--j-ink);
    background: #f8fbfb; border: 1.5px solid var(--j-line); border-radius: 12px; outline: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
body.page-contact .ct-champ textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
body.page-contact .ct-champ input:focus, body.page-contact .ct-champ textarea:focus { background: #fff; border-color: var(--j-teal); box-shadow: 0 0 0 4px rgba(0, 140, 140, .15); }
body.page-contact .ct-envoi {
    width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 14px; cursor: pointer;
    background: var(--j-teal-dark); color: #fff; font: 800 17px var(--j-font); box-shadow: 0 4px 0 rgba(0, 60, 60, .28); transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
body.page-contact .ct-envoi:hover { background: var(--j-teal); transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 60, 60, .28); }
body.page-contact .ct-envoi:hover i { transform: translateX(4px) rotate(-8deg); }
body.page-contact .ct-envoi i { transition: transform .2s ease; }
body.page-contact .ct-envoi:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 60, 60, .28); }
@media (max-width: 700px) {
    body.page-contact .ct-duo { grid-template-columns: 1fr; gap: 0; }
    body.page-contact .ct-form { padding: 20px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    body.page-contact .ct-carte, body.page-contact .ct-carte:hover, body.page-contact .ct-badge, body.page-contact .ct-go, body.page-contact .ct-envoi, body.page-contact .ct-envoi:hover, body.page-contact .ct-envoi i { transform: none !important; transition: none; }
}
body.page-contact .v2-titre { max-width: 900px; margin-left: auto; margin-right: auto; }


/* =====================================================================
   PAGE BOURSE AUX DOSSARDS (body.page-bourse) — identité "troc" indigo
   ===================================================================== */
body.page-bourse .bz-page { max-width: 1240px; margin: 0 auto; padding: 24px 32px 44px; }
body.page-bourse .bz-titre { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; text-align: center; }
body.page-bourse .bz-logo-col { text-align: left; }
body.page-bourse .bz-logo { height: 60px; width: auto; }
body.page-bourse .bz-titre h1 { margin: 0 0 4px; font-size: 30px; font-weight: 800; color: var(--j-teal-deep); }
body.page-bourse .bz-titre p { margin: 0; color: var(--j-muted); font-size: 16px; }
body.page-bourse .bz-intro { margin: 18px auto 24px; max-width: 820px; text-align: center; font-size: 15.5px; line-height: 1.55; color: var(--j-muted); }
body.page-bourse .bz-intro strong { color: var(--j-ink); }

/* cartes courses : 4 colonnes sur PC */
body.page-bourse .bz-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
body.page-bourse .bz-carte {
    display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid var(--j-line); border-top: 4px solid #b9cccc;
    border-radius: 14px; padding: 16px 18px 18px; box-shadow: 0 2px 8px rgba(0, 60, 60, .06);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
body.page-bourse .bz-carte.bz-dispo { border-top-color: var(--j-teal); }
body.page-bourse .bz-carte:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 12px 24px rgba(39, 64, 107, .16); }
body.page-bourse .bz-entete { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
body.page-bourse .bz-date { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--j-teal); }
body.page-bourse .bz-entete h2 { display: block; margin: 0; font-size: 18px; line-height: 1.25; font-weight: 800; color: var(--j-teal-dark); border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; }
body.page-bourse .bz-etat { display: flex; flex-wrap: wrap; gap: 6px; }
body.page-bourse .bz-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; }
body.page-bourse .bz-vert { background: var(--j-teal-soft); color: var(--j-teal-dark); }
body.page-bourse .bz-orange { background: #fdf0e6; color: #a8480f; }
body.page-bourse .bz-bleu { background: #e8eef0; color: #3d5560; }
body.page-bourse .bz-gris { background: #f1f3f3; color: #5b6769; }

/* boutons */
body.page-bourse .bz-btn {
    margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; box-sizing: border-box;
    background: var(--j-indigo); color: #fff !important; text-decoration: none !important; font-weight: 800; font-size: 15px; border-radius: 12px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .2); transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
}
body.page-bourse .bz-dispo .bz-btn { background: var(--j-teal-dark); }
/* bourse fermée : carte grisée */
body.page-bourse .bz-fermee { background: #f3f5f5; border-top-color: #c9d1d1; box-shadow: none; }
body.page-bourse .bz-fermee .bz-date, body.page-bourse .bz-fermee .bz-entete h2 { color: #7b8789 !important; }
body.page-bourse .bz-fermee:hover { transform: none; box-shadow: none; }
body.page-bourse .bz-btn-off { background: #e1e6e6 !important; color: #6b7678 !important; border-color: #e1e6e6 !important; box-shadow: none !important; cursor: not-allowed; }
body.page-bourse .bz-btn-off:hover { transform: none !important; }
body.page-bourse .bz-btn b { transition: transform .2s ease; }
body.page-bourse .bz-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .2); }
/* survol et clic : couleurs inversées (fond blanc, texte et contour de la couleur du bouton) */
body.page-bourse .bz-btn:not(.bz-btn-off) { border: 2px solid var(--j-indigo); }
body.page-bourse .bz-dispo .bz-btn { border-color: var(--j-teal-dark); }
body.page-bourse .bz-btn:not(.bz-btn-off):hover, body.page-bourse .bz-btn:not(.bz-btn-off):active, body.page-bourse .bz-btn:not(.bz-btn-off):focus-visible { background: #fff; color: var(--j-indigo) !important; }
body.page-bourse .bz-dispo .bz-btn:hover, body.page-bourse .bz-dispo .bz-btn:active, body.page-bourse .bz-dispo .bz-btn:focus-visible { color: var(--j-teal-dark) !important; }
body.page-bourse .bz-btn:hover b { transform: translateX(6px); }
body.page-bourse .bz-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }

/* état vide */
body.page-bourse .bz-vide { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 44px 20px; background: #fff; border: 2px dashed var(--j-line); border-radius: 16px; color: var(--j-muted); }
body.page-bourse .bz-vide strong { font-size: 19px; color: var(--j-ink); }
body.page-bourse .bz-vide-ico { font-size: 48px; }
body.page-bourse .bz-vide .bz-btn { margin-top: 8px; width: auto; }

@media (max-width: 900px) {
    body.page-bourse .bz-titre { grid-template-columns: 1fr; gap: 10px; }
    body.page-bourse .bz-logo-col { text-align: center; }
    body.page-bourse .bz-titre-vide { display: none; }
}
@media (max-width: 640px) {
    body.page-bourse .bz-page { padding: 20px 16px 36px; }
    body.page-bourse .bz-titre h1 { font-size: 25px; }
    body.page-bourse .bz-grille { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    body.page-bourse .bz-carte, body.page-bourse .bz-btn, body.page-bourse .bz-btn b { transition: none; }
    body.page-bourse .bz-carte:hover, body.page-bourse .bz-btn:hover { transform: none; }
}
