/* Rubrique Challenge — Devil Performance (saison 2027)
   S'appuie sur css/evenements.css (couleurs de la salle, boutons, secours) ; chaque compétition a son univers,
   volontairement hors charte (choix de Charly) : course années 70 (crème), arcade années 90 (néon), flash de tatoueur. */

.ch-page { background: var(--nuit); }
.ch-page img { max-width: 100%; height: auto; display: block; }

/* ---------- haut de page ---------- */
.ch-hero { position: relative; padding: 128px 0 70px; overflow: hidden; text-align: center; }
.ch-hero::before { content: ''; position: absolute; inset: -20% -10% auto; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124, 58, 237, .28), transparent 70%); }
.ch-titre { position: relative; font: 900 clamp(58px, 12vw, 150px)/.86 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: -.01em; }
.ch-titre em { font-style: italic; color: transparent; -webkit-text-stroke: 2px var(--lilas); padding-right: .06em; }
.ch-sous { position: relative; margin: 22px auto 0; max-width: 56ch; color: rgba(245, 243, 255, .66); font-size: 18px; line-height: 1.65; font-weight: 300; }
.ch-sous strong { color: #fff; font-weight: 500; }

.ch-affiches { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; text-align: left; }
.ch-carte { display: block; color: inherit; border-radius: 18px; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.ch-carte:focus-visible { outline: 2px solid var(--lilas); outline-offset: 6px; }
.ch-carte__img { border-radius: 16px; overflow: hidden; aspect-ratio: 1856 / 2304; background: #111;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .45s; }
.ch-carte__img img { width: 100%; height: 100%; object-fit: cover; }
.ch-carte:hover { transform: translateY(-8px) rotate(-1deg); }
.ch-carte:nth-child(2):hover { transform: translateY(-8px) rotate(1deg); }
.ch-carte:hover .ch-carte__img { box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(167, 139, 250, .45), 0 0 60px rgba(124, 58, 237, .25); }
.ch-carte__pied { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 4px 0; }
.ch-carte__nom { font: 900 26px/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.ch-carte__fmt { font: 600 13px/1.3 'Barlow Condensed', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); text-align: right; }
.ch-bientot { display: inline-flex; align-items: center; gap: 8px; margin: 10px 4px 0; font: 700 11px/1 'Barlow Condensed', sans-serif; letter-spacing: .22em;
  text-transform: uppercase; color: var(--orange); }
.ch-bientot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(255, 122, 26, .6); animation: ch-pouls 2s infinite; }
@keyframes ch-pouls { 70% { box-shadow: 0 0 0 9px rgba(255, 122, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0); } }

/* ---------- une compétition ---------- */
.ch-comp { position: relative; padding: 110px 0; overflow: hidden; }
.ch-comp__grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.ch-comp__affiche { position: sticky; top: 110px; border-radius: 18px; overflow: hidden; aspect-ratio: 1856 / 2304; }
.ch-comp__affiche img { width: 100%; height: 100%; object-fit: cover; }
.ch-comp__ed { font: 700 12px/1 'Barlow Condensed', sans-serif; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 18px; }
.ch-comp__nom { font: 900 clamp(52px, 8vw, 104px)/.86 'Barlow Condensed', sans-serif; text-transform: uppercase; margin-bottom: 22px; }
.ch-comp__accroche { font-size: 19px; line-height: 1.6; max-width: 52ch; }
.ch-puces { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.ch-puces li { font: 700 13px/1 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 11px 15px; border-radius: 999px; }

.ch-statut { margin-top: 38px; padding: 26px; border-radius: 18px; }
.ch-statut__titre { font: 900 26px/1.05 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.ch-statut__txt { margin-top: 8px; font-size: 15px; line-height: 1.6; }
.ch-statut .ev-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* catégories, inclus, à gagner */
.ch-infos { margin: 30px 0 0; display: grid; gap: 0; max-width: 560px; }
.ch-infos div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid rgba(127, 127, 127, .28); }
.ch-infos dt { font: 800 13px/1.4 'Barlow Condensed', sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.ch-infos dd { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 500; }
.ch-comp--course .ch-infos dt { color: var(--rouge); }
.ch-comp--arcade .ch-infos dt { color: var(--cyan); font: 400 20px/1.1 'VT323', monospace; letter-spacing: .06em; }
.ch-comp--tatouage .ch-infos dt { color: var(--or); }
@media (max-width: 760px) { .ch-infos div { grid-template-columns: 1fr; gap: 4px; } }

/* programme (tableau de course) */
.ch-prog { margin-top: 44px; }
.ch-prog__titre { font: 900 30px/1 'Barlow Condensed', sans-serif; text-transform: uppercase; margin-bottom: 6px; }
.ch-prog__note { font-size: 13px; opacity: .75; margin-bottom: 18px; }
.ch-prog ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch-prog li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: start; padding: 16px 18px; border-radius: 14px; }
.ch-prog__n { font: 900 34px/1 'Barlow Condensed', sans-serif; font-style: italic; text-align: center; }
.ch-prog b { display: block; font: 800 19px/1.2 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.ch-prog span { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; }
.ch-prog i { display: block; margin-top: 6px; font-style: normal; font-size: 13.5px; line-height: 1.45; }

/* ===== Univers 1 : DEVIL RACE — affiche de course années 70, fond crème ===== */
.ch-comp--course { --creme: #FBF3E4; --bleu: #2F5DA8; --rouge: #D8322B; --jaune: #F2B630; --vert: #2BA39B; --encre: #1A1A22;
  background: var(--creme); color: var(--encre); }
.ch-comp--course::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: linear-gradient(var(--rouge) 0 33%, var(--jaune) 33% 66%, var(--vert) 66%); }
.ch-comp--course .ch-damier { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; opacity: .9;
  background: repeating-conic-gradient(var(--encre) 0 25%, var(--creme) 0 50%) 0 0 / 22px 22px; animation: ch-damier 6s linear infinite; }
@keyframes ch-damier { to { background-position: 44px 0; } }
.ch-comp--course .ch-comp__ed { color: var(--rouge); }
.ch-comp--course .ch-comp__nom { color: var(--bleu); font-style: italic; text-shadow: 4px 4px 0 var(--rouge); letter-spacing: -.01em; }
.ch-comp--course .ch-comp__accroche { color: rgba(26, 26, 34, .78); }
.ch-comp--course .ch-puces li { background: var(--encre); color: var(--creme); }
.ch-comp--course .ch-puces li:nth-child(4n+1) { background: var(--bleu); }
.ch-comp--course .ch-puces li:nth-child(4n+2) { background: var(--rouge); }
.ch-comp--course .ch-puces li:nth-child(4n+3) { background: var(--vert); }
.ch-comp--course .ch-comp__affiche { box-shadow: 10px 10px 0 var(--encre); border: 3px solid var(--encre); }
.ch-comp--course .ch-prog li { background: #fff; box-shadow: inset 0 0 0 2px var(--encre); }
.ch-comp--course .ch-prog__n { color: var(--rouge); }
.ch-comp--course .ch-prog i { color: var(--bleu); font-weight: 600; }
.ch-comp--course .ch-statut { background: var(--encre); color: var(--creme); }
.ch-comp--course .ch-statut__titre { color: var(--jaune); }
.ch-comp--course .ch-statut__txt { color: rgba(251, 243, 228, .78); }
.ch-comp--course .ev-btn { background: var(--rouge); }
.ch-comp--course .ev-btn:hover { background: #B9251F; box-shadow: 0 14px 34px rgba(216, 50, 43, .35); }
.ch-comp--course .ev-btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px rgba(251, 243, 228, .35); }

/* ===== Univers 2 : DPX GAMES — borne d'arcade années 90, néon sur noir ===== */
.ch-comp--arcade { --cyan: #22D3EE; --rose: #E040FB; --jaune: #FFE500; background: #030308; color: #EAF6FF; }
.ch-comp--arcade::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 4px); }
.ch-comp--arcade::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 42%; pointer-events: none; opacity: .35;
  background: linear-gradient(transparent, rgba(224, 64, 251, .25)), repeating-linear-gradient(90deg, rgba(34, 211, 238, .5) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(0deg, rgba(34, 211, 238, .5) 0 1px, transparent 1px 34px);
  transform: perspective(380px) rotateX(58deg); transform-origin: bottom; }
.ch-comp--arcade .ev-wrap { position: relative; z-index: 1; }
.ch-comp--arcade .ch-comp__ed { font: 400 26px/1 'VT323', monospace; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 12px rgba(34, 211, 238, .8); }
.ch-comp--arcade .ch-comp__nom { color: #fff; text-shadow: 0 0 6px #fff, 0 0 22px var(--rose), 0 0 48px var(--rose); animation: ch-neon 5s infinite; }
@keyframes ch-neon { 0%, 18%, 22%, 100% { opacity: 1; } 20% { opacity: .55; } 21% { opacity: .9; } }
.ch-comp--arcade .ch-comp__accroche { color: rgba(234, 246, 255, .75); }
.ch-comp--arcade .ch-puces li { font: 400 22px/1 'VT323', monospace; letter-spacing: .06em; padding: 9px 14px; border-radius: 6px; color: var(--jaune);
  box-shadow: inset 0 0 0 2px var(--jaune), 0 0 16px rgba(255, 229, 0, .25); background: rgba(255, 229, 0, .05); }
.ch-comp--arcade .ch-comp__affiche { box-shadow: 0 0 0 2px var(--cyan), 0 0 40px rgba(34, 211, 238, .35), 0 0 90px rgba(224, 64, 251, .25); }
.ch-comp--arcade .ch-statut { background: rgba(34, 211, 238, .06); box-shadow: inset 0 0 0 2px rgba(34, 211, 238, .55); }
.ch-comp--arcade .ch-statut__titre { font: 400 34px/1 'VT323', monospace; letter-spacing: .06em; color: var(--jaune); animation: ch-clignote 1.2s steps(1) infinite; }
@keyframes ch-clignote { 50% { opacity: .25; } }
.ch-comp--arcade .ch-statut__txt { color: rgba(234, 246, 255, .75); }
.ch-comp--arcade .ev-btn { background: var(--rose); color: #12001a; font-weight: 800; }
.ch-comp--arcade .ev-btn:hover { background: #F06BFF; box-shadow: 0 0 30px rgba(224, 64, 251, .55); }
.ch-comp--arcade .ev-btn--ghost { background: transparent; color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }

/* ===== Univers 3 : DEVIL ORIGIN — flash de tatoueur old school, noir / crème / rouge / or ===== */
.ch-comp--tatouage { --creme: #F3E6C8; --rouge: #C8102E; --or: #C9A227; --vert: #2F6B4F; background: #0B0907; color: var(--creme); }
.ch-comp--tatouage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background: radial-gradient(circle at 20% 20%, var(--creme) 0 1px, transparent 1.5px) 0 0 / 26px 26px; }
.ch-comp--tatouage .ch-comp__ed { color: var(--or); }
.ch-comp--tatouage .ch-comp__nom { font-family: 'Rye', 'Barlow Condensed', serif; font-weight: 400; font-size: clamp(46px, 7vw, 92px); line-height: .95; color: var(--creme);
  text-shadow: 3px 3px 0 var(--rouge); text-transform: none; }
.ch-comp--tatouage .ch-ruban { display: inline-block; position: relative; margin-bottom: 20px; padding: 10px 26px; background: var(--creme); color: #0B0907;
  font: 800 15px/1 'Barlow Condensed', sans-serif; letter-spacing: .26em; text-transform: uppercase; }
.ch-comp--tatouage .ch-ruban::before, .ch-comp--tatouage .ch-ruban::after { content: ''; position: absolute; top: 6px; width: 18px; height: 100%; background: #CDBE9C; z-index: -1; }
.ch-comp--tatouage .ch-ruban::before { left: -12px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ch-comp--tatouage .ch-ruban::after { right: -12px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.ch-comp--tatouage .ch-comp__accroche { color: rgba(243, 230, 200, .78); }
.ch-comp--tatouage .ch-puces li { background: transparent; color: var(--creme); box-shadow: inset 0 0 0 2px var(--or); }
.ch-comp--tatouage .ch-puces li::before { content: '✦'; margin-right: 8px; color: var(--rouge); }
.ch-comp--tatouage .ch-comp__affiche { box-shadow: 0 0 0 3px var(--creme), 0 0 0 7px #0B0907, 0 0 0 9px var(--or); }
.ch-comp--tatouage .ch-statut { background: var(--creme); color: #0B0907; }
.ch-comp--tatouage .ch-statut__titre { color: var(--rouge); }
.ch-comp--tatouage .ch-statut__txt { color: rgba(11, 9, 7, .75); }
.ch-comp--tatouage .ev-btn { background: var(--rouge); }
.ch-comp--tatouage .ev-btn:hover { background: #A50D26; box-shadow: 0 14px 34px rgba(200, 16, 46, .35); }
.ch-comp--tatouage .ev-btn--ghost { background: transparent; color: #0B0907; box-shadow: inset 0 0 0 2px rgba(11, 9, 7, .4); }

/* ---------- le principe ---------- */
.ch-principe { padding: 100px 0; text-align: center; }
.ch-etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; text-align: left; list-style: none; padding: 0; counter-reset: e; }
.ch-etapes li { counter-increment: e; padding: 26px; border-radius: 18px; background: var(--carte); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.ch-etapes li::before { content: counter(e, decimal-leading-zero); display: block; font: 900 40px/1 'Barlow Condensed', sans-serif; color: var(--violet); margin-bottom: 12px; }
.ch-etapes b { display: block; font: 800 21px/1.1 'Barlow Condensed', sans-serif; text-transform: uppercase; margin-bottom: 8px; }
.ch-etapes p { color: rgba(245, 243, 255, .6); font-size: 15px; line-height: 1.6; }
.ch-principe .ev-texte { margin: 0 auto; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .ch-comp__grille { grid-template-columns: 1fr; gap: 34px; }
  .ch-comp__affiche { position: relative; top: 0; max-width: 420px; }
  .ch-etapes { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ch-hero { padding: 112px 0 50px; }
  .ch-affiches { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 40px -16px 0; padding: 0 16px 18px; scrollbar-width: none; }
  .ch-affiches::-webkit-scrollbar { display: none; }
  .ch-carte { flex: 0 0 74%; scroll-snap-align: center; }
  .ch-carte:hover, .ch-carte:nth-child(2):hover { transform: none; }
  .ch-comp { padding: 80px 0; }
  .ch-comp__accroche { font-size: 17px; }
  .ch-prog li { grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; }
  .ch-prog__n { font-size: 28px; }
  .ch-statut .ev-btn { flex: 1 1 100%; }
}

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .ch-bientot::before, .ch-comp--course .ch-damier, .ch-comp--arcade .ch-comp__nom, .ch-comp--arcade .ch-statut__titre { animation: none; }
  .ch-carte, .ch-carte:hover, .ch-carte:nth-child(2):hover { transform: none; transition: none; }
}
