/* ══ Carte concours (ConcoursCard.razor) — 24/10/2026 ═══════════════════════════
   Une seule carte pour la liste publique « Concours » et l'espace cavalier connecté
   (audit des pages publiques, E). Remplace les deux définitions qui se recouvraient
   (site.css et public-v2.css sous .pub2). Langage de la vitrine : blanc, angles droits,
   filets plutôt qu'ombres, marine pour l'action principale, rouge réservé au direct.
   Couleurs : jetons uniquement (tokens.css ← design/tokens.json). Bascule à 720 px. */

.concours-liste { display: grid; gap: 16px; }

.cc { border: 1px solid var(--eq-border); background: var(--eq-paper-0); transition: border-color .15s ease; }
.cc:hover { border-color: var(--eq-rule-field); }

.cc__head { display: flex; align-items: flex-start; gap: 18px; padding: 22px 24px 20px; }
.cc__logo { flex: none; width: 48px; height: 48px; object-fit: contain; padding: 4px; border: 1px solid var(--eq-border); background: var(--eq-paper-0); }
.cc__ident { flex: 1; min-width: 0; }
.cc__cat {
  margin: 0; color: var(--eq-sky-700);
  font: 500 12px/1.3 var(--eq-font-mono); letter-spacing: .12em; text-transform: uppercase;
}
.cc__name {
  margin: 6px 0 8px; color: var(--eq-text-primary);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; font-size: 22px; font-weight: 700; font-stretch: 104%;
  letter-spacing: -.015em; line-height: 1.15;
}
.cc__name a { color: inherit; text-decoration: none; }
.cc__name a:hover { color: var(--eq-sky-700); text-decoration: underline; text-underline-offset: 3px; }
.cc__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 15px; color: var(--eq-text-secondary); }
.cc__sep { color: var(--eq-text-meta); }
.cc__date { font-variant-numeric: tabular-nums; }
html[dir='rtl'] .cc__cat, html[dir='rtl'] .cc__name { letter-spacing: 0; }
html[dir='rtl'] .cc__name { font-family: 'Tajawal', 'Archivo', Arial, sans-serif; font-weight: 800; }

/* ── Contexte public : deux boutons, une seule action primaire ── */
.cc__actions { display: flex; border-top: 1px solid var(--eq-border); }
.cc__btn {
  flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 22px;
  color: var(--eq-text-primary); background: var(--eq-paper-0); text-decoration: none; font-size: 15px; font-weight: 600;
  border-inline-end: 1px solid var(--eq-border);
}
.cc__btn:last-child { border-inline-end: 0; }
.cc__btn:hover { background: var(--eq-surface-hover); }
.cc__fleche { margin-inline-start: auto; transition: transform .14s ease; }
.cc__btn:hover .cc__fleche { transform: translateX(3px); }
html[dir='rtl'] .cc__btn:hover .cc__fleche { transform: translateX(-3px); }
.cc__btn--primaire { background: var(--eq-button-primary-bg); color: var(--eq-paper-0); }
.cc__btn--primaire:hover { background: var(--eq-sky-700); }
/* « ● Direct » : le seul rouge de la carte (signal-err-strong : 4,5:1 au moins sur blanc). */
.cc__btn--direct { background: var(--eq-signal-err-strong); }
.cc__btn--direct:hover { background: var(--eq-signal-live); }
.cc__point { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; animation: cc-pouls 1.6s ease-in-out infinite; }
@keyframes cc-pouls { 50% { opacity: .3; } }
/* Désactivé : pas de lien (aucune page vide derrière), raison en clair. */
.cc__btn--off { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; color: var(--eq-text-meta); background: var(--eq-paper-25); cursor: default; }
.cc__btn--off:hover { background: var(--eq-paper-25); }
.cc__btn--off small { font-size: 12px; font-weight: 500; color: var(--eq-text-meta); }
.cc__veille { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; padding: 16px 24px; border-top: 1px solid var(--eq-border); color: var(--eq-text-secondary); font-size: 14px; }
.cc__veille a { color: var(--eq-sky-700); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.cc__veille a:hover { text-decoration: underline; }

/* ── Contexte espace cavalier : pastille, échéance, tuiles (dont « S'engager ») ── */
.cc__status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; white-space: nowrap;
  font: 500 12px/1 var(--eq-font-mono); letter-spacing: .06em; text-transform: uppercase;
}
html[dir='rtl'] .cc__status { letter-spacing: 0; text-transform: none; font-size: 13px; }
/* Arabe : Plex Mono n'a pas de glyphes arabes ; le repli monospace espaçait chaque lettre (24/10/2026). */
html[dir='rtl'] .cc__cat, html[dir='rtl'] .cc__status { font-family: 'Tajawal', 'Archivo', Arial, sans-serif; font-weight: 600; }
.cc__status .dot { width: 7px; height: 7px; background: currentColor; }
.cc__status--open { color: var(--eq-signal-ok); background: var(--eq-signal-ok-bg); }
.cc__status--warn { color: var(--eq-signal-warn); background: var(--eq-signal-warn-bg); }
.cc__status--results, .cc__status--avenir { color: var(--eq-sky-700); background: var(--eq-sky-100); }
.cc__status--live { color: var(--eq-signal-err-strong); background: var(--eq-signal-live-bg); }
.cc__status--live .dot { border-radius: 50%; }
.cc__status--done { color: var(--eq-badge-neutral); background: var(--eq-badge-neutral-bg); }
.cc__echeance { margin-top: 6px; font-size: 14px; }
.cc__echeance--warn { color: var(--eq-signal-warn); }

.cc__tiles { display: flex; border-top: 1px solid var(--eq-border); }
/* « S'engager » (espace cavalier seulement) : ciel foncé, blanc lisible (5,2:1). */

@media (prefers-reduced-motion: reduce) { .cc__point { animation: none; } .cc__fleche { transition: none; } }

@media (max-width: 720px) {
  .cc__head { gap: 14px; padding: 18px 16px 16px; }
  .cc__logo { width: 40px; height: 40px; }
  .cc__name { font-size: 20px; }
  .cc__actions, .cc__tiles { flex-direction: column; }
  .cc__btn, .cc__tile { flex: none; padding: 0 16px; border-inline-end: 0; border-bottom: 1px solid var(--eq-border); }
  .cc__btn:last-child, .cc__tile:last-child { border-bottom: 0; }
  .cc__btn--off { padding-block: 10px; }
  .cc__veille { padding: 14px 16px; }
  /* Téléphone (26/10/2026, simulation de concours) : l'en-tête passe en grille. Avant, en
     flex-wrap, .cc__ident (flex: 1 → base 0) ne passait jamais à la ligne : la pastille
     « Engagements ouverts » (nowrap, order: -1) restait sur la même ligne et le titre, le lieu
     et la clôture s'écrasaient mot par mot dans ce qui restait (≈ 60 px à 360 px).
     Désormais : pastille / compte à rebours seuls en haut, puis [logo] + identité. */
  .cc__head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px 14px; }
  .cc__head--logo { grid-template-columns: 40px minmax(0, 1fr); }
  .cc__status, .cc__compte { grid-column: 1 / -1; grid-row: 1; justify-self: start; max-width: 100%; white-space: normal; }
  .cc__ident { overflow-wrap: anywhere; }
}

/* ── Carte vivante (25/10/2026, maquettes A et B validées) ─────────────────────
   Survol et appui, bandeau « en direct » marine (couple en piste et chrono quand Pro pousse le
   direct, avancement « n/N »), compte à rebours d'un concours à venir, mini-podium d'un
   concours terminé. Couleurs : jetons uniquement. */
.cc { transition: border-color .18s ease, transform .18s ease, background-color .18s ease; }
.cc:hover { border-color: var(--eq-sky-600); transform: translateY(-2px); }
.cc:active { transform: none; }
.cc__direct {
  display: flex; flex-direction: column; gap: 10px; padding: 14px 24px; color: var(--eq-paper-0);
  background: radial-gradient(color-mix(in srgb, var(--eq-sky-300) 16%, transparent) 1px, transparent 1.2px) 0 0 / 14px 14px, var(--eq-navy-600);
}
.cc__direct p { margin: 0; }
.cc__direct-sur { display: flex; align-items: center; gap: 8px; font: 500 12px/1.3 var(--eq-font-mono); letter-spacing: .1em; text-transform: uppercase; }
html[dir='rtl'] .cc__direct-sur { font: 600 13px/1.3 'Tajawal', sans-serif; letter-spacing: 0; }
.cc__direct .cc__point { width: 8px; height: 8px; background: var(--eq-signal-err-night); }
.cc__direct-nb { margin-inline-start: auto; color: var(--eq-night-text-2); font-family: var(--eq-font-mono); font-variant-numeric: tabular-nums; }
.cc__direct-piste { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cc__direct-piste[hidden] { display: none; }
.cc__direct-piste p { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc__direct-lib { font-size: 12px; color: var(--eq-night-text-2); }
.cc__direct-cav { font-weight: 600; font-size: 16px; }
.cc__direct-che { font-size: 13px; color: var(--eq-sky-300); }
.cc__chrono { font: 500 30px/1 var(--eq-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc__barre { height: 4px; background: var(--eq-navy-line); }
.cc__barre span { display: block; height: 100%; background: var(--eq-signal-err-night); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.cc__compte { flex: none; font: 500 12px/1.4 var(--eq-font-mono); color: var(--eq-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc__podium { padding: 0 24px 18px; }
.cc__podium-ep { margin: 0 0 8px; font: 500 11px/1.3 var(--eq-font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--eq-text-meta); }
html[dir='rtl'] .cc__podium-ep { font: 600 13px/1.3 'Tajawal', sans-serif; letter-spacing: 0; }
.cc__podium ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cc__podium li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cc__rang--1 { background: var(--eq-podium-or); }
.cc__rang--2 { background: var(--eq-podium-argent); }
.cc__rang--3 { background: var(--eq-podium-bronze); }
.cc__podium-cav { font-weight: 600; }
.cc__podium-che { color: var(--eq-text-meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cc, .cc__barre span { transition: none; } .cc:hover { transform: none; } }
@media (max-width: 720px) {
  .cc__direct { padding: 14px 16px; }
  .cc__podium { padding: 0 16px 16px; }
  .cc__compte { order: -1; width: 100%; }
}

/* ── Éléments de la maquette « cartes B » (25/10/2026) ─────────────────────────
   Date en grand bloc façon affiche (jour en Archivo, mois en Plex Mono, marine à trame) en
   colonne de tête, et mini-podium en marches (2-1-3, or/argent/bronze). La carte A reste la
   base : bandeau du direct, boutons « Ordre de passage » / « Résultats ». */
.cc--affiche { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.cc--affiche > :not(.cc__affiche) { grid-column: 2; }
.cc__affiche {
  grid-column: 1; grid-row: 1 / span 6; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 8px; text-align: center; color: var(--eq-paper-0);
  background: radial-gradient(color-mix(in srgb, var(--eq-sky-300) 16%, transparent) 1px, transparent 1.2px) 0 0 / 14px 14px, var(--eq-navy-600);
}
.cc__affiche-jour {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-stretch: 104%;
  font-size: 40px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cc__affiche-mois { font: 500 13px/1.2 var(--eq-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--eq-sky-300); }
.cc__affiche-an { font: 500 12px/1 var(--eq-font-mono); color: var(--eq-night-text-2); }
html[dir='rtl'] .cc__affiche-mois { font: 600 15px/1.2 'Tajawal', sans-serif; letter-spacing: 0; text-transform: none; }
/* Plage de plusieurs jours (« 12–14 ») : le chiffre se resserre pour tenir dans la colonne. */
.cc__affiche-jour[data-plage] { font-size: 30px; }

/* Podium en marches : lu 1-2-3 (ordre du DOM), montré 2-1-3. */
.cc__podium .cc__marches { max-width: 520px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.cc__podium .cc__marche { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.cc__marche--1 { order: 2; }
.cc__marche--2 { order: 1; }
.cc__marche--3 { order: 3; }
.cc__marche .cc__podium-cav { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.cc__marche .cc__podium-che { font-size: 12px; max-width: 100%; }
.cc__marche-bloc {
  width: 100%; margin-top: 6px; display: flex; align-items: center; justify-content: center;
  font: 500 14px/1 var(--eq-font-mono); color: var(--eq-navy-600);
}
.cc__marche--1 .cc__marche-bloc { height: 64px; }
.cc__marche--2 .cc__marche-bloc { height: 44px; }
.cc__marche--3 .cc__marche-bloc { height: 32px; }
@media (max-width: 720px) {
  .cc--affiche { grid-template-columns: 84px minmax(0, 1fr); }
  .cc__affiche { padding: 14px 4px; }
  .cc__affiche-jour { font-size: 34px; }
  .cc__affiche-jour[data-plage] { font-size: 24px; }
}
