/* Enduros : cartes événement, avec thèmes clair et sombre. */
body.page-enduros .enduros-page {
 --ed-card:rgba(10,26,40,.96);--ed-text:#f4f7fa;--ed-muted:#bdcbd4;
 --ed-border:rgba(175,201,216,.28);--ed-soft:rgba(255,255,255,.05);
}
html[data-theme="light"] body.page-enduros .enduros-page {
 --ed-card:rgba(255,255,255,.97);--ed-text:#142637;--ed-muted:#536475;
 --ed-border:#d6dfe3;--ed-soft:#f1f5f6;
}
body.page-enduros .enduros-page .enduros-list-card {
 background:transparent!important;border:0!important;box-shadow:none!important;
 border-radius:0!important;overflow:visible!important;max-height:none!important;
 padding:0!important;
}
body.page-enduros .ed-list-heading {
 display:flex;align-items:flex-end!important;justify-content:space-between;gap:20px!important;
 background:transparent!important;border:0!important;padding:8px 10px 26px!important;
}
body.page-enduros .ed-list-heading .eyebrow {
 color:#f4cc78!important;-webkit-text-fill-color:#f4cc78!important;
 font-size:11px;letter-spacing:.13em;text-transform:uppercase;
}
body.page-enduros .ed-list-heading .eyebrow > span {display:none}
body.page-enduros .ed-list-heading h2 {
 color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important;
 font-size:clamp(30px,3.2vw,44px)!important;font-weight:850;letter-spacing:-1.3px;
 line-height:1.12;margin:10px 0!important;text-shadow:0 2px 18px #00192299!important;
}
body.page-enduros .ed-list-heading p,
body.page-enduros .ed-list-heading small {
 color:#fff!important;font-size:14px!important;line-height:1.6;margin:0;
 text-shadow:0 1px 9px #001922;opacity:1!important;
}
body.page-enduros .ed-list-heading small {flex-shrink:0;padding-bottom:2px;white-space:nowrap}
body.page-enduros .enduros-page .enduros-list {padding:0!important;gap:20px!important}
body.page-enduros .enduros-page .ed-event-card {
 display:block!important;grid-template-columns:none!important;grid-template-rows:none!important;
 min-height:0!important;height:auto!important;padding:26px!important;width:100%!important;
 border:1px solid var(--ed-border)!important;border-radius:24px!important;
 background:var(--ed-card)!important;color:var(--ed-text)!important;
 box-shadow:0 14px 40px #0015221f!important;overflow:hidden!important;
 text-align:left!important;cursor:default;box-sizing:border-box;
}
body.page-enduros .enduros-page .ed-event-card:hover {transform:none!important;border-color:#d6ad61!important}
body.page-enduros .enduros-page .ed-event-card.active {border-color:#d6ad61!important;box-shadow:0 0 0 2px #d6ad6140!important}
body.page-enduros .ed-card-head {
 display:grid;grid-template-columns:76px minmax(0,1fr) auto;grid-template-rows:auto auto;
 gap:5px 18px;align-items:center;
}
body.page-enduros .ed-logo-status {display:contents}
body.page-enduros .ed-logo {
 grid-column:1;grid-row:1/3;display:flex;align-items:center;justify-content:center;
 width:76px;height:76px;border-radius:20px;overflow:hidden;background:#111126;border:1px solid var(--ed-border);
}
body.page-enduros .ed-logo img {display:block;width:100%;height:100%;object-fit:contain}
body.page-enduros .ed-logo > span {font-size:28px}
body.page-enduros .ed-club-name {
 grid-column:2;grid-row:1;font-size:23px;font-weight:850;line-height:1.2;align-self:end;
 color:var(--ed-text)!important;overflow-wrap:anywhere;min-width:0;
}
body.page-enduros .ed-event-name {grid-column:2;grid-row:2;align-self:start;min-width:0}
body.page-enduros .ed-event-name h3 {
 color:var(--ed-muted)!important;-webkit-text-fill-color:var(--ed-muted)!important;
 font-size:15px!important;line-height:1.4;margin:0!important;font-weight:500;letter-spacing:0;overflow-wrap:anywhere;
}
body.page-enduros .ed-status-row {
 grid-column:3;grid-row:1/3;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:8px;align-self:start;
}
body.page-enduros .enduros-page .ed-status-row .enduro-status {
 position:static!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-width:98px!important;height:auto!important;min-height:30px!important;padding:6px 12px!important;
 border:1px solid #e5ab42!important;border-radius:999px!important;
 background:#ffe2aa!important;color:#252d34!important;font-size:10px!important;line-height:1.2!important;
 font-weight:850;text-transform:uppercase;white-space:nowrap;box-sizing:border-box;
}
body.page-enduros .enduros-page .ed-status-row .enduro-status.en_cours {background:#d9f5e5!important;color:#14633f!important;border-color:#75b58b!important}
body.page-enduros .ed-event-info {
 display:grid;grid-template-columns:1fr;gap:10px;margin:20px 0 24px;padding:20px 0 0;
 border-top:1px solid var(--ed-border);color:var(--ed-text);font-size:14px;line-height:1.5;
}
body.page-enduros .ed-date-label {color:var(--ed-muted);margin-right:5px}
body.page-enduros .ed-event-actions {display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0}
body.page-enduros .enduros-page .ed-event-card .enduro-btn {
 position:static!important;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
 width:auto!important;max-width:100%!important;height:auto!important;min-height:46px!important;
 padding:12px 16px!important;border-radius:13px!important;border:1px solid #d8b56a!important;
 background:transparent!important;color:var(--ed-text)!important;-webkit-text-fill-color:var(--ed-text)!important;
 font-size:13px!important;font-weight:750;line-height:1.4!important;text-decoration:none;
 box-shadow:none!important;animation:none!important;cursor:pointer;text-align:center;white-space:normal;box-sizing:border-box;
}
body.page-enduros .ed-event-actions > .enduro-btn {flex:1 1 160px}
body.page-enduros .enduros-page .ed-event-card .enduro-btn[data-follow-competition] {
 background:linear-gradient(180deg,#ffe1a0,#ebba55)!important;border-color:#e8b65a!important;
 color:#16212b!important;-webkit-text-fill-color:#16212b!important;
}
body.page-enduros .enduros-page .ed-status-row .enduro-status-ranking {min-height:30px!important;padding:5px 8px!important;font-size:10px!important;background:var(--ed-soft)!important}
body.page-enduros .ed-event-card .enduro-btn:hover {filter:brightness(.96);transform:translateY(-1px)}
body.page-enduros .ed-event-card :is(a,button):focus-visible {outline:3px solid #dda940;outline-offset:4px}
body.page-enduros .enduros-page .ed-event-card .enduro-info-panel {background:var(--ed-soft)!important;color:var(--ed-text)!important;border-color:var(--ed-border)!important;border-radius:14px;margin-top:16px}
body.page-enduros .enduros-page .ed-event-card .enduro-info-panel :is(.enduro-programme-title,.enduro-programme-label,.enduro-programme-time) {color:var(--ed-text)!important}
@media(max-width:640px){
 body.page-enduros .ed-list-heading {flex-wrap:wrap;gap:8px;padding:4px 2px 20px!important}
 body.page-enduros .ed-list-heading small {font-size:12px!important}
 body.page-enduros .enduros-page .ed-event-card {padding:20px!important;border-radius:20px!important}
 body.page-enduros .ed-card-head {grid-template-columns:58px minmax(0,1fr);gap:6px 12px}
 body.page-enduros .ed-logo {width:58px;height:58px;border-radius:16px}
 body.page-enduros .ed-club-name {font-size:20px}
 body.page-enduros .ed-status-row {grid-column:1/-1;grid-row:3;flex-direction:row;justify-content:space-between;align-items:center;margin-top:10px}
 body.page-enduros .ed-event-info {margin:16px 0 20px;padding-top:16px;font-size:13px}
 body.page-enduros .ed-event-actions {flex-direction:column}
 body.page-enduros .ed-event-actions > .enduro-btn {flex:0 0 auto;width:100%!important}
}
@media(prefers-reduced-motion:reduce){body.page-enduros .ed-event-card *{animation:none!important;transition:none!important}}
/* Neutraliser les anciennes contraintes de la liste sur mobile. */
body.page-enduros .enduros-page .enduros-list-card {min-width:0!important}
body.page-enduros .ed-list-heading small {margin-top:0!important}
body.page-enduros .enduros-page .ed-event-card .ed-event-actions .enduro-btn[data-following="1"] {
 background:#d9f5e5!important;color:#14633f!important;-webkit-text-fill-color:#14633f!important;border-color:#75b58b!important;
}
@media(max-width:640px){body.page-enduros .ed-list-heading {align-items:flex-start!important}}

/* Priorité sur public-light.css : le titre reste sur la photographie. */
html[data-theme] body.mpc-public.page-enduros .enduros-page .ed-list-heading,
html[data-theme] body.mpc-public.page-enduros .enduros-page .enduros-list-card {
    background:transparent!important;
    background-image:none!important;
    border:0!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
}
html[data-theme] body.mpc-public.page-enduros .ed-list-heading::before,
html[data-theme] body.mpc-public.page-enduros .ed-list-heading::after,
html[data-theme] body.mpc-public.page-enduros .enduros-list-card::before,
html[data-theme] body.mpc-public.page-enduros .enduros-list-card::after {display:none!important}

/* Disposition de la page : titre dégagé, carte entière et liste compacte. */
html body.page-enduros .enduros-page {padding-top:0!important;overflow:visible!important}
html body.page-enduros .enduros-premium-hero {
    padding:calc(var(--header-h,82px) + 30px) 0 24px!important;
    margin:0!important;min-height:0!important;height:auto!important;
}
html body.page-enduros .enduros-hero-shell {
    display:block!important;width:min(1380px,calc(100% - 48px))!important;
    max-width:none!important;padding:0!important;margin:0 auto!important;
}
html body.page-enduros .enduros-hero-copy {
    padding:0!important;margin:0!important;width:100%!important;max-width:780px!important;
    transform:none!important;background:none!important;box-shadow:none!important;
}
html body.page-enduros .enduros-hero-copy h1 {
    font-size:clamp(30px,3.5vw,46px)!important;line-height:1.15!important;
    margin:12px 0!important;max-width:none!important;
}
html body.page-enduros .enduros-hero-copy p {max-width:680px!important;font-size:15px!important;line-height:1.6!important}
html body.page-enduros .enduros-layout {
    display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr)!important;
    width:min(1380px,calc(100% - 48px))!important;max-width:none!important;
    gap:28px!important;margin:0 auto 40px!important;padding:0!important;align-items:start!important;
    overflow:visible!important;
}
html body.page-enduros .enduros-map-card,
html body.page-enduros #endurosMap {
    background:transparent!important;background-image:none!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    box-shadow:none!important;border:0!important;border-radius:0!important;
    filter:none!important;clip-path:none!important;
    width:100%!important;height:650px!important;min-height:0!important;
    margin:0!important;padding:0!important;
}
html body.page-enduros .enduros-map-card::before,
html body.page-enduros .enduros-map-card::after {display:none!important}
html body.page-enduros .enduros-page .enduros-list-card {width:100%!important;margin:0!important}
html body.page-enduros .ed-list-heading {
    background:none!important;backdrop-filter:none!important;box-shadow:none!important;border:0!important;
    padding:0 0 18px!important;gap:12px!important;
}
html body.page-enduros .ed-list-heading h2 {font-size:30px!important;margin:8px 0!important}
html body.page-enduros .ed-list-heading p {font-size:13px!important}
html body.page-enduros #endurosList {
    max-height:620px;overflow-y:auto;overflow-x:hidden;padding:2px 8px 8px 2px;
    scrollbar-width:thin;scrollbar-color:#c9a663 transparent;scrollbar-gutter:stable;
}
html body.page-enduros .enduros-page .enduros-list {gap:12px!important}
html body.page-enduros .enduros-page .ed-event-card {padding:16px!important;border-radius:18px!important}
html body.page-enduros .ed-card-head {grid-template-columns:52px minmax(0,1fr) auto;gap:4px 12px}
html body.page-enduros .ed-logo {width:52px;height:52px;border-radius:14px}
html body.page-enduros .ed-club-name {font-size:18px;line-height:1.25}
html body.page-enduros .ed-event-name h3 {font-size:13px!important;line-height:1.4!important}
html body.page-enduros .ed-status-row {gap:6px}
html body.page-enduros .enduros-page .ed-status-row .enduro-status {min-width:76px!important;min-height:25px!important;padding:5px 8px!important;font-size:9px!important}
html body.page-enduros .ed-event-info {
    grid-template-columns:1fr 1fr;gap:6px 12px;margin:12px 0;padding:12px 0 0;
    font-size:12px;line-height:1.5;
}
html body.page-enduros .ed-event-info > span:first-child {grid-column:1/-1}
html body.page-enduros .ed-event-actions {gap:8px}
html body.page-enduros .enduros-page .ed-event-card .ed-event-actions .enduro-btn {
    min-height:38px!important;padding:8px 10px!important;font-size:12px!important;border-radius:10px!important;
    flex:1 1 130px;
}
@media(max-width:1000px){
    html body.page-enduros .enduros-layout {grid-template-columns:minmax(0,1fr) minmax(320px,1fr)!important;gap:18px!important}
    html body.page-enduros .enduros-map-card,html body.page-enduros #endurosMap {height:560px!important}
    html body.page-enduros .ed-card-head {grid-template-columns:44px minmax(0,1fr);gap:4px 10px}
    html body.page-enduros .ed-logo {width:44px;height:44px}
    html body.page-enduros .ed-status-row {grid-column:1/-1;grid-row:3;flex-direction:row;justify-content:space-between;margin-top:6px}
}
@media(max-width:800px){
    html body.page-enduros .enduros-hero-shell,html body.page-enduros .enduros-layout {width:calc(100% - 32px)!important}
    html body.page-enduros .enduros-premium-hero {padding-top:calc(var(--header-h,72px) + 22px)!important}
    html body.page-enduros .enduros-layout {display:flex!important;flex-direction:column!important;gap:24px!important}
    html body.page-enduros .enduros-map-card,html body.page-enduros #endurosMap {height:440px!important}
    html body.page-enduros #endurosList {max-height:none;overflow:visible;padding:0;scrollbar-gutter:auto}
    html body.page-enduros .ed-event-info {grid-template-columns:1fr}
    html body.page-enduros .ed-event-actions {flex-direction:row}
    html body.page-enduros .enduros-page .ed-event-card .ed-event-actions .enduro-btn {width:auto!important;min-height:44px!important;flex:1 1 130px}
}

/* Contraste de l'en-tête sur les détails de la photographie. */
html body.page-enduros .ed-list-heading {
    position:relative;isolation:isolate;
    padding:18px 16px 20px!important;
    margin-bottom:14px;
    border-radius:16px;
}
html[data-theme] body.mpc-public.page-enduros .ed-list-heading::before {
    content:"";display:block!important;position:absolute;inset:0;z-index:-1;
    border-radius:inherit;pointer-events:none;
    background:linear-gradient(100deg,rgba(3,20,30,.88),rgba(3,20,30,.70));
}
html body.page-enduros .ed-list-heading .eyebrow {
    color:#ffe0a0!important;-webkit-text-fill-color:#ffe0a0!important;
    font-size:11px;line-height:1.5;letter-spacing:.08em;
}
html body.page-enduros .ed-list-heading h2 {
    color:#fff!important;-webkit-text-fill-color:#fff!important;
    font-size:30px!important;line-height:1.2!important;text-shadow:none!important;
}
html body.page-enduros .ed-list-heading p,
html body.page-enduros .ed-list-heading small {
    color:#fff!important;-webkit-text-fill-color:#fff!important;
    font-size:14px!important;line-height:1.6!important;text-shadow:none!important;
}
html body.page-enduros .ed-list-heading small {
    padding:4px 9px;background:rgba(255,255,255,.12);border-radius:8px;
}
@media(max-width:640px){
    html body.page-enduros .ed-list-heading {display:block!important;padding:16px!important}
    html body.page-enduros .ed-list-heading small {display:inline-block;margin-top:12px!important}
}

/* En-tête conforme aux autres pages publiques : texte noir et titre violet en clair. */
html[data-theme] body.mpc-public.page-enduros .ed-list-heading::before {
    display:none!important;
}
html body.page-enduros .ed-list-heading {
    padding:8px 0 20px!important;
    border-radius:0;
}
html[data-theme="light"] body.mpc-public.page-enduros .ed-list-heading h2 {
    background:linear-gradient(90deg,#45108a 0%,#8c168b 48%,#bc245b 100%)!important;
    background-clip:text!important;
    -webkit-background-clip:text!important;
    color:transparent!important;
    -webkit-text-fill-color:transparent!important;
    width:fit-content;
    padding-bottom:.12em;
    text-shadow:none!important;
}
html[data-theme="light"] body.mpc-public.page-enduros .ed-list-heading p,
html[data-theme="light"] body.mpc-public.page-enduros .ed-list-heading small {
    color:#101820!important;
    -webkit-text-fill-color:#101820!important;
    text-shadow:none!important;
}
html[data-theme="light"] body.mpc-public.page-enduros .ed-list-heading .eyebrow {
    color:#4c1d75!important;
    -webkit-text-fill-color:#4c1d75!important;
}
html body.page-enduros .ed-list-heading small {
    background:transparent!important;
    padding:0;
}

/* Footer en bas sur les pages courtes, dans le flux sur les pages longues. */
html body.page-enduros {
    display:flex!important;
    flex-direction:column!important;
    min-height:100vh!important;
    min-height:100dvh!important;
}
html body.page-enduros > .site-header {flex-shrink:0!important}
html body.page-enduros > main.enduros-page {
    flex:1 0 auto!important;
    width:100%!important;
}
html body.page-enduros > .site-footer {
    position:relative!important;
    inset:auto!important;
    flex-shrink:0!important;
    width:100%!important;
}

/* Tablette et Fold ouverts : une seule colonne, sans étirer les événements. */
@media(min-width:601px) and (max-width:1100px){
 html body.page-enduros .enduros-layout {
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  width:calc(100% - 40px)!important;max-width:940px!important;
  gap:24px!important;margin:0 auto 28px!important;
 }
 html body.page-enduros .enduros-hero-shell {
  width:calc(100% - 40px)!important;max-width:940px!important;
 }
 html body.page-enduros .enduros-premium-hero {
  padding:calc(var(--header-h,82px) + 28px) 0 22px!important;
 }
 html body.page-enduros .enduros-hero-copy {
  padding:0!important;max-width:100%!important;
 }
 html body.page-enduros .enduros-hero-copy h1 {max-width:none!important}
 html body.page-enduros .enduros-map-card,
 html body.page-enduros #endurosMap {
  width:100%!important;height:390px!important;min-height:0!important;
  max-height:390px!important;flex:0 0 auto!important;
 }
 html body.page-enduros .enduros-page .enduros-list-card {
  width:100%!important;max-width:none!important;margin:0!important;
 }
 html body.page-enduros #endurosList {
  max-height:none!important;overflow:visible!important;padding:0!important;
  scrollbar-gutter:auto!important;
 }
 html body.page-enduros .enduros-page .enduros-list {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;align-items:start!important;width:100%!important;
 }
 html body.page-enduros .enduros-page .ed-event-card {
  width:100%!important;max-width:none!important;min-width:0!important;padding:16px!important;
 }
 html body.page-enduros .enduros-page .ed-event-card:last-child:nth-child(odd) {
  grid-column:1 / -1!important;width:min(100%,430px)!important;
  justify-self:center!important;
 }
 html body.page-enduros .ed-event-info {
  grid-template-columns:minmax(0,1fr)!important;gap:5px!important;
 }
 html body.page-enduros .ed-event-info > span {white-space:normal!important;overflow-wrap:anywhere}
 html body.page-enduros .ed-card-head {grid-template-columns:44px minmax(0,1fr)!important}
 html body.page-enduros .ed-event-actions {display:flex!important;flex-wrap:wrap!important}
 html body.page-enduros .enduros-page .ed-event-card .ed-event-actions .enduro-btn {
  flex:1 1 120px!important;min-width:0!important;min-height:44px!important;
 }
 html body.page-enduros .site-footer {margin-top:auto!important}
}

/* Fold et tablette : carte à gauche, événements compacts à droite. */
@media(min-width:601px) and (max-width:1100px){
 html body.page-enduros .enduros-layout {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(280px,.9fr)!important;
  gap:20px!important;
  align-items:center!important;
 }
 html body.page-enduros .enduros-map-card,
 html body.page-enduros #endurosMap {
  height:390px!important;max-height:390px!important;
 }
 html body.page-enduros .enduros-page .enduros-list {
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
 }
 html body.page-enduros .enduros-page .ed-event-card:last-child:nth-child(odd) {
  grid-column:auto!important;width:100%!important;justify-self:stretch!important;
 }
 html body.page-enduros .enduros-page .ed-event-card {padding:14px!important}
 html body.page-enduros .ed-club-name {font-size:16px!important}
 html body.page-enduros .ed-event-info {font-size:12px!important}
 html body.page-enduros .enduros-page .ed-event-card .ed-event-actions .enduro-btn {
  flex:1 1 100px!important;font-size:11px!important;padding:8px!important;
 }
}
@media(min-width:601px) and (max-width:720px){
 html body.page-enduros .enduros-layout {
  width:calc(100% - 24px)!important;
  grid-template-columns:minmax(0,1fr) minmax(270px,1fr)!important;
  gap:12px!important;
 }
 html body.page-enduros .enduros-map-card,
 html body.page-enduros #endurosMap {height:330px!important;max-height:330px!important}
}

/* Carte des postes sous le classement dans le groupe de statut. */
html body.page-enduros .ed-status-row {flex-direction:column;align-items:flex-end}
html body.page-enduros .enduros-page .ed-status-row .enduro-status-ranking {
 width:140px!important;min-height:36px!important;box-sizing:border-box;
 margin:0!important;white-space:nowrap;
}
html body.page-enduros .ed-status-row .enduro-status {order:0}
html body.page-enduros .ed-status-row .enduro-status-ranking {order:1}
html body.page-enduros .ed-status-row .enduro-postes-link {order:2}

/* Contour et halo rouges uniquement sur le bouton de classement actif. */
html body.page-enduros .enduros-page .ed-event-card .enduro-status-ranking.ranking-blink {
 border-color:#ef4444!important;
 position:relative!important;overflow:visible!important;
}
html body.page-enduros .enduros-page .ed-event-card .enduro-status-ranking.ranking-blink::after {
 content:"";display:block!important;position:absolute;inset:-2px;
 border:1px solid #ef4444;border-radius:inherit;pointer-events:none;
 box-shadow:0 0 10px rgba(239,68,68,.7),0 0 18px rgba(239,68,68,.4);
 animation:ed-ranking-pulse 1.2s ease-in-out infinite!important;
}
@keyframes ed-ranking-pulse {
 0%,100%{opacity:.25;transform:scale(1)}
 50%{opacity:1;transform:scale(1.04,1.08)}
}
@media(prefers-reduced-motion:reduce){
 html body.page-enduros .enduros-page .ed-event-card .enduro-status-ranking.ranking-blink::after {
  animation:none!important;opacity:.6;transform:none;
 }
}
