/* Derniers articles : carrousel en perspective. */
.cf { position: relative; isolation: isolate; overflow: hidden; padding: 34px 0 26px; border-radius: 22px; background: #161514; outline: none; }
/* Fond d'ambiance : la couverture de l'article du centre, floue et assombrie. */
.cf-ambience { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cf-ambience img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: brightness(.3) blur(34px) saturate(1.1); opacity: 0; transition: opacity 900ms ease; }
.cf-ambience img.is-on { opacity: 1; }
.cf-ambience::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #16151433 0%, #161514eb 78%); }

.cf-stage { position: relative; z-index: 1; height: 500px; perspective: 1400px; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.cf .story { position: absolute; width: 340px; height: 480px; margin: 0; padding: 0; overflow: hidden; border: 1px solid #ffffff1f; border-radius: 18px; background: #1f1d1b; box-shadow: 0 15px 35px #0008; transform-origin: center; transition: transform 800ms cubic-bezier(.25,1,.5,1), opacity 800ms cubic-bezier(.25,1,.5,1), filter 800ms, box-shadow 800ms, border-color 800ms; will-change: transform; cursor: pointer; }
.cf .story:is(:hover,:focus-within) { background: #1f1d1b; transform: none; }
.cf .story[data-pos="1"] { filter: brightness(.72); }
.cf .story[data-pos="2"] { filter: brightness(.5) blur(1px); }
.cf .story[data-pos="off"] { pointer-events: none; }
.cf .story[data-center] { cursor: default; border-color: #278ca5aa; box-shadow: 0 25px 60px #000e, 0 0 38px #278ca540; }
.cf .story-link { position: relative; display: block; height: 100%; min-height: 0; padding: 0; border-radius: inherit; color: #fff; }
.cf .story-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: inherit; }
.cf .story-cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 900ms ease; }
.cf .story[data-center] .story-cover img { transform: scale(1.06); }
.cf .story-link::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, #16151466 0%, #16151410 24%, #161514a8 58%, #161514f5 100%); }

/* Format de l'article, en haut à droite. */
.cf-tag { position: absolute; top: 16px; right: 16px; z-index: 3; padding: 4px 8px; border: 1px solid #ffffff38; border-radius: 6px; background: #16151499; color: #fff; font: 600 .78rem/1.2 Barlow, sans-serif; letter-spacing: .02em; opacity: 0; transition: opacity 400ms; }
.cf .story[data-center] .cf-tag { opacity: 1; }

/* Texte : visible seulement sur la carte du centre. */
.cf .story-copy { position: absolute; inset: auto 0 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 22px 22px 22px; text-align: center; background: none; opacity: 0; transform: translateY(16px); transition: opacity 450ms ease, transform 450ms ease; pointer-events: none; }
.cf .story[data-center] .story-copy { opacity: 1; transform: none; transition-delay: 150ms; pointer-events: auto; }
.cf .story-meta { justify-content: center; color: #90dff2; font-size: .8rem; line-height: 1.25; }
.cf .story-index, .cf .story-rule, .cf .story-copy > p { display: none; }
.cf .story h3 { margin: 10px 0 0; font-size: 1.6rem; line-height: 1.04; text-shadow: 0 3px 12px #000c; hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cf-rule { width: 34px; height: 2px; margin: 14px auto 12px; border-radius: 2px; background: #278ca5; box-shadow: 0 0 10px #278ca5b3; }
.cf .story-bottom { flex-direction: column; align-items: center; gap: 6px; width: 100%; padding-top: 0; border: 0; }
.cf .story-source { color: #d7d5d3; font-size: .82rem; }
.cf .story-cta { color: #90dff2; font-weight: 600; }
.cf .story-link:is(:hover,:focus-visible) .story-cta { color: #fff; }
.cf .story:focus-within { outline: 2px solid #90dff2; outline-offset: -4px; }
.cf .story-link:focus-visible { outline: none; }

/* Commandes : flèches de chaque côté sur ordinateur, sous la scène sur mobile. */
.cf-controls { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.cf .cf-nav { width: 46px; height: 46px; padding: 0; }
.cf .cf-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: block; margin: auto; }
@media (min-width: 701px) {
  .cf .cf-nav { position: absolute; top: calc(-250px - 18px - 23px); background: #161514b3; backdrop-filter: blur(8px); }
  .cf .cf-prev { left: 24px; } .cf .cf-next { right: 24px; }
}
.cf-dots { display: flex; align-items: center; gap: 6px; }
.cf-dot { width: 18px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: #ffffff40; cursor: pointer; transition: width 300ms ease, background 300ms ease; }
.cf-dot::before { content: ''; display: block; height: 22px; margin-top: -9px; }
.cf-dot[aria-current="true"] { width: 34px; background: #278ca5; box-shadow: 0 0 10px #278ca5b3; }
.cf-dot:hover { background: #ffffff80; }
.cf-dot:focus-visible { outline: 2px solid #90dff2; outline-offset: 4px; }
.cf-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 700px) {
  .cf { padding: 22px 0 18px; border-radius: 14px; }
  .cf-stage { height: 430px; }
  .cf .story { width: min(74vw, 300px); height: 410px; }
  .cf .story h3 { font-size: 1.35rem; }
  .cf .story-copy { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cf .story, .cf .story-copy, .cf .story-cover img, .cf-ambience img, .cf-dot { transition: none; }
}

/* Thème clair : scène claire. La couverture du centre garde un voile sombre en bas pour que le titre blanc reste lisible. */
html[data-theme="light"] .cf { background: #ecebea; }
html[data-theme="light"] .cf-ambience img { filter: brightness(1.15) blur(34px) saturate(.9); }
html[data-theme="light"] .cf-ambience img.is-on { opacity: .45; }
html[data-theme="light"] .cf-ambience::after { background: radial-gradient(circle at 50% 45%, #f9f8f880 0%, #f2f1f0f0 75%); }
html[data-theme="light"] .cf .story { background: #dfdddb; border-color: #0f0f0f1a; box-shadow: 0 14px 30px #0b222826; }
html[data-theme="light"] .cf .story:is(:hover,:focus-within) { background: #dfdddb; }
html[data-theme="light"] .cf .story[data-pos="1"] { filter: brightness(.97) saturate(.85); }
html[data-theme="light"] .cf .story[data-pos="2"] { filter: brightness(1.02) saturate(.7) blur(1px); }
html[data-theme="light"] .cf .story:not([data-center]) .story-link::after { background: linear-gradient(180deg, #f9f8f81a 0%, #f9f8f840 100%); }
html[data-theme="light"] .cf .story[data-center] { border-color: #226474; box-shadow: 0 24px 50px #0b22283d, 0 0 30px #22647440; }
html[data-theme="light"] .cf .story-copy { color: #fff; background: none; }
html[data-theme="light"] .cf .story-meta { color: #90dff2; }
html[data-theme="light"] .cf .story-source { color: #e6e3df; }
html[data-theme="light"] .cf .story-cta { color: #90dff2; }
html[data-theme="light"] .cf .story-link:is(:hover,:focus-visible) .story-cta { color: #fff; }
html[data-theme="light"] .cf .story p:not(.gfg-0) { color: #fff; }
html[data-theme="light"] .cf-rule { background: #90dff2; box-shadow: 0 0 10px #90dff280; }
html[data-theme="light"] .cf-dot { background: #0f0f0f2e; }
html[data-theme="light"] .cf-dot:hover { background: #0f0f0f59; }
html[data-theme="light"] .cf-dot[aria-current="true"] { background: #226474; box-shadow: 0 0 8px #22647466; }
html[data-theme="light"] .cf-dot:focus-visible { outline-color: #06252d; }
html[data-theme="light"] .cf .story:focus-within { outline-color: #06252d; }

/* Flèches : même carré arrondi que celles du classement UCI et du calendrier (sans le glissement du libellé). */
.cf .cf-nav::before { display: none !important; }
.cf .cf-nav > .slide-button__label { transform: none !important; opacity: 1 !important; }
.cf .cf-nav > .slide-button__hover { display: none !important; }
.cf .cf-nav { border-radius: 10px !important; background: #161514b3 !important; border: 1px solid #ffffff24 !important; color: #d5d3d1; }
.cf .cf-nav:hover { border-color: #278ca5 !important; color: #fff; }
html[data-theme="light"]:root .cf .cf-nav { background: #fff !important; border-color: #adcfd7 !important; color: #373430; }
html[data-theme="light"]:root .cf .cf-nav:hover { border-color: #226474 !important; color: #161514; }
