/* ============================================================
   Écran « Analyse · Semaine » (cf. js/pages/semaine.js)
   ============================================================ */

/* ---------------- Les compétitions ---------------- */
.sem-comps { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.sem-comps::-webkit-scrollbar { display: none; }
.sem-comp {
  flex: none; display: grid; grid-template-columns: 52px auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  min-width: 190px; padding: 12px 18px 12px 12px; border-radius: 18px; border: 1px solid var(--ligne); color: var(--texte);
  background: linear-gradient(150deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  transition: transform .4s var(--ressort), border-color .25s, box-shadow .35s;
}
.sem-comp img, .sem-comp .sem-comp-tout { grid-row: 1 / 3; width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); transition: transform .45s var(--ressort); }
.sem-comp .sem-comp-tout { display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, var(--bleu), #1d47c9); font: 600 15px var(--titre); text-transform: uppercase; filter: none; }
.sem-comp b { font: 600 18px/1.05 var(--titre); text-transform: uppercase; letter-spacing: .02em; }
.sem-comp small { font-size: 12px; color: var(--texte-3); font-weight: 650; }
.sem-comp:hover { transform: translate3d(0, -3px, 0); border-color: var(--ligne-2); }
.sem-comp:hover img { transform: scale(1.08) rotate(-3deg); }
.sem-comp.est-actif { border-color: rgba(143, 179, 255, .6); background: linear-gradient(150deg, rgba(47, 107, 255, .3), rgba(47, 107, 255, .06)); box-shadow: var(--ombre-bleue); }

/* ---------------- La frise des journées ---------------- */
.sem-frise { display: flex; align-items: stretch; gap: 14px; margin: 6px 0 4px; }
.sem-rail { position: relative; flex: 1; display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: none; }
.sem-rail::-webkit-scrollbar { display: none; }
.sem-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 33px; height: 2px; background: linear-gradient(90deg, var(--ligne-2), rgba(143, 179, 255, .05)); }
.sem-j {
  position: relative; flex: none; min-width: 92px; display: grid; justify-items: center; gap: 2px; padding: 8px 12px 10px; border-radius: 16px; border: 1px solid transparent;
  background: none; color: var(--texte-2); transition: transform .35s var(--ressort), background .25s, border-color .25s, color .2s;
}
.sem-j i { width: 16px; height: 16px; margin: 3px 0 8px; border-radius: 50%; background: var(--nuit-3); border: 2px solid var(--bleu-2);
  box-shadow: 0 0 0 calc(var(--n) * 7px) rgba(91, 140, 255, .18); transition: transform .35s var(--ressort); }
.sem-j b { font: 600 20px var(--titre); color: var(--texte); }
.sem-j small { font-size: 11.5px; color: var(--texte-3); font-weight: 650; }
.sem-j:hover { transform: translateY(-2px); color: var(--texte); }
.sem-j:hover i { transform: scale(1.2); }
.sem-j.est-actif { background: rgba(47, 107, 255, .14); border-color: rgba(143, 179, 255, .35); }
.sem-j.est-actif i { background: var(--bleu-2); box-shadow: 0 0 0 calc(4px + var(--n) * 7px) rgba(91, 140, 255, .28), 0 0 18px var(--bleu); }
.sem-j-tout { align-self: center; min-width: 0; border-color: var(--ligne); background: var(--surface-2); }
.sem-j-tout b { font-size: 16px; }

/* ---------------- Les journées et les matchs ---------------- */
.sem-journee .section h2 { white-space: nowrap; }
.sem-section-logo { width: 32px; height: 32px; object-fit: contain; align-self: center; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.sem-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.sem-match {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--ligne);
  background: linear-gradient(170deg, #10204f 0%, #0a1433 45%, #070d22 100%); box-shadow: var(--ombre);
}
.sem-match.est-gros { border-color: rgba(245, 196, 81, .45); box-shadow: 0 24px 60px -28px rgba(245, 196, 81, .45), var(--ombre); }
.sem-match.est-gros::before { /* un reflet doré qui passe de temps en temps */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 220, 140, .1) 48%, transparent 60%);
  transform: translateX(-120%); animation: sem-reflet 7s var(--doux) infinite;
}
@keyframes sem-reflet { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.sem-match > * { position: relative; z-index: 1; }
.sem-match-tete { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3); }
.sem-match-tete img { width: 22px; height: 22px; object-fit: contain; }
.sem-match-tete span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-gros { margin-left: auto; flex: none; font-style: normal; padding: 3px 10px; border-radius: 999px; color: #241800; letter-spacing: .04em;
  background: linear-gradient(90deg, #f5c451, #ffe08a); box-shadow: 0 6px 18px -6px rgba(245, 196, 81, .7); }

.sem-affiche { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px 16px 16px; }
.sem-equipe { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sem-equipe b { font: 600 17px/1.05 var(--titre); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.sem-ext { flex-direction: row-reverse; text-align: right; }
.sem-logo { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .7); }
.sem-logo img { width: 40px; height: 40px; object-fit: contain; }
.sem-logo span { display: none; font: 600 16px var(--titre); color: var(--marine); }
.sem-logo.est-ko span, .sem-logo:not(:has(img)) span { display: block; }
.sem-score { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 14px; background: rgba(4, 8, 22, .55); border: 1px solid var(--ligne); }
.sem-score b { font: 600 30px/1 var(--titre); font-variant-numeric: tabular-nums; color: var(--texte-2); }
.sem-score i { font-style: normal; color: var(--texte-3); }
.sem-score small { font-size: 12px; font-weight: 750; color: var(--texte-3); text-transform: uppercase; letter-spacing: .08em; }
.gagne-dom .sem-score b:first-child, .gagne-ext .sem-score b:last-child { color: #fff; text-shadow: 0 0 18px rgba(143, 179, 255, .6); }

.sem-camps { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ligne); }
.sem-camp { padding: 10px 10px 12px; min-width: 0; }
.sem-camp + .sem-camp { border-left: 1px solid var(--ligne); }
.sem-camp-t { display: flex; justify-content: space-between; gap: 8px; padding: 0 4px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); }
.sem-camp-t span { color: var(--texte-2); }
.sem-aucun { padding: 8px 4px; font-size: 12.5px; color: var(--texte-3); }
.sem-joueur {
  display: grid; grid-template-columns: 26px 36px minmax(0, 1fr) auto; grid-template-areas: "num av id droite" "num av comm comm";
  align-items: center; column-gap: 8px; padding: 6px; border-radius: 12px; transition: background .2s, transform .3s var(--ressort);
}
.sem-joueur.est-fiche { cursor: pointer; }
.sem-joueur.est-fiche:hover { background: rgba(47, 107, 255, .14); transform: translateX(3px); }
.sem-num { grid-area: num; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--marine); border: 1px solid rgba(143, 179, 255, .3); font: 600 13px var(--titre); color: #fff; }
.sem-av { grid-area: av; width: 36px; height: 36px; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font: 600 13px var(--titre); color: var(--texte-3); }
.sem-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.sem-id { grid-area: id; min-width: 0; }
.sem-id b { display: block; font-size: 13px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-id small { display: block; font-size: 11px; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-droite { grid-area: droite; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.sem-droite .puce { padding: 1px 8px; font-size: 10.5px; }
.sem-comm { grid-area: comm; font-size: 12px; font-style: italic; color: var(--ciel); line-height: 1.35; }

@media (max-width: 760px) {
  .sem-comp { min-width: 160px; grid-template-columns: 40px auto; padding: 10px 14px 10px 10px; }
  .sem-comp img, .sem-comp .sem-comp-tout { width: 40px; height: 40px; }
  .sem-comp b { font-size: 15px; }
  .sem-frise { flex-direction: column; gap: 6px; }
  .sem-j-tout { align-self: flex-start; }
  .sem-journee .section h2 { white-space: normal; font-size: 20px; }
  .sem-journee .section { flex-wrap: wrap; }
  .sem-affiche { padding: 12px; gap: 6px; }
  .sem-equipe { flex-direction: column; text-align: center; gap: 6px; }
  .sem-ext { flex-direction: column; text-align: center; }
  .sem-equipe b { font-size: 13.5px; }
  .sem-logo { width: 44px; height: 44px; border-radius: 13px; }
  .sem-logo img { width: 34px; height: 34px; }
  .sem-score b { font-size: 24px; }
  .sem-camps { grid-template-columns: 1fr; }
  .sem-camp + .sem-camp { border-left: 0; border-top: 1px solid var(--ligne); }
}
