/* Suivi tournoi — affichage public, aux couleurs du site (variables du thème,
   avec repli si le plugin est utilisé ailleurs). Une seule page lue de haut en bas ;
   les rondes en cases 1 / ½ / 0 ; chiffres en Cormorant (DESIGN.md). */
.suivi-direct {
  --sd-bleu: var(--bleu, #1E3A5F);
  --sd-or: var(--gold, #C9A84C);
  --sd-or-texte: var(--gold-text, #7E6420);
  --sd-or-pale: var(--gold-pale, #F5EDD4);
  --sd-texte: var(--text, #374151);
  --sd-muted: var(--muted, #4A4858);
  --sd-bord: var(--border, #E5E0D8);
  --sd-ivoire2: var(--ivoire2, #F0EDE6);
  --sd-serif: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  --sd-label: var(--font-label, 'Montserrat', sans-serif);
  --sd-card: var(--r-card, 14px);
  --sd-vert: #2E7D57;
  color: var(--sd-texte);
  font-size: 15px;
  line-height: 1.55;
}
.suivi-direct *, .suivi-direct *::before, .suivi-direct *::after { box-sizing: border-box; }
.suivi-direct p, .suivi-direct h3, .suivi-direct h4, .suivi-direct ul, .suivi-direct ol { margin: 0; padding: 0; }
.suivi-direct ul, .suivi-direct ol { list-style: none; }
.sd-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.suivi-direct a { color: var(--sd-or-texte); text-underline-offset: 3px; }
.suivi-direct button { font: inherit; color: inherit; }
.suivi-direct :focus-visible { outline: 2px solid var(--sd-or); outline-offset: 2px; border-radius: 6px; }

/* Barre : recherche + fraîcheur */
.sd-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: -4px 0 8px; }
.sd-barre .sd-maj { order: -1; font-size: 14px; }
.sd-cherche { flex: 0 1 340px; }
.sd-cherche label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sd-cherche-champ { position: relative; }
.sd-cherche-champ svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--sd-muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.sd-cherche input { width: 100%; height: 48px; padding: 0 44px; font: 16px/1 inherit; font-family: inherit; color: var(--sd-bleu); background: #fff; border: 1px solid var(--sd-bord); border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none; }
.sd-cherche input::-webkit-search-cancel-button { display: none; }
.sd-cherche input::placeholder { color: #8A8794; }
.sd-cherche input:focus { outline: none; border-color: var(--sd-or); box-shadow: 0 0 0 3px rgba(201, 168, 76, .22); }
.sd-effacer { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; font-size: 22px !important; line-height: 1; color: var(--sd-muted); cursor: pointer; border-radius: 10px; }
.sd-effacer:hover { background: var(--sd-ivoire2); }
.sd-maj { font-size: 13px; color: var(--sd-muted); }

.sd-resume { font-size: 17px; color: var(--sd-bleu); margin-bottom: 8px; text-wrap: pretty; }
.sd-resume b { font-weight: 700; }

/* Sections */
.sd-bloc { margin-top: 40px; }
.sd-titre { display: flex; align-items: center; gap: 10px; font: 700 26px/1.15 var(--sd-serif); color: var(--sd-bleu); margin-bottom: 16px; }
.sd-pastille { width: 10px; height: 10px; border-radius: 50%; background: var(--sd-vert); box-shadow: 0 0 0 0 rgba(46, 125, 87, .45); animation: sd-pouls 2.4s ease-out infinite; flex-shrink: 0; }
@keyframes sd-pouls { 0% { box-shadow: 0 0 0 0 rgba(46, 125, 87, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(46, 125, 87, 0); } }

/* Carte de tournoi en cours */
.sd-carte-h { margin-bottom: 6px; }
.sd-t-nom { display: block; font: 700 19px/1.25 var(--sd-serif); color: var(--sd-bleu); text-wrap: balance; }
.sd-t-meta { display: block; font-size: 13px; color: var(--sd-muted); margin-top: 3px; }

/* Ligne joueur : nom + détail | cases | score ; la partie du jour dessous */
.sd-joueurs { margin-top: 6px; }
.sd-joueur { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 1.5fr) 84px; grid-template-areas: "id cases score" "partie partie partie"; align-items: center; gap: 6px 20px; padding: 14px 0; border-top: 1px solid var(--sd-bord); }
.sd-joueurs > .sd-joueur:first-child { border-top: 0; }
.sd-j-id { grid-area: id; min-width: 0; }
.sd-j-nom { font-weight: 600; color: var(--sd-bleu); font-size: 15px; }
.sd-nom-f { letter-spacing: .02em; }
.sd-j-det { font-size: 13px; color: var(--sd-muted); font-variant-numeric: tabular-nums; }
.sd-score { grid-area: score; justify-self: end; font: 700 28px/1 var(--sd-serif); color: var(--sd-bleu); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.sd-score span { font: 600 14px/1 var(--font-sans, 'Inter', sans-serif); color: var(--sd-muted); }
.sd-j-cases { grid-area: cases; min-width: 0; }
.sd-partie { grid-area: partie; justify-self: start; font-size: 14px; line-height: 1.5; color: var(--sd-texte); background: var(--sd-ivoire2); border-radius: 10px; padding: 8px 12px 8px 10px; margin-top: 4px; }
.sd-partie .sd-etat { margin-right: 8px; vertical-align: 1px; }
.sd-elo { color: var(--sd-muted); font-size: .92em; }
.sd-etat { font: 600 12px/1 var(--sd-label); letter-spacing: .01em; color: var(--sd-bleu); background: #fff; border: 1px solid var(--sd-bord); border-radius: 999px; padding: 5px 9px; }
.sd-etat-live { color: #fff; background: var(--sd-vert); border-color: var(--sd-vert); }

/* Cases de rondes */
.sd-cases { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-case { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font: 700 14px/1 var(--sd-label); flex-shrink: 0; }
.sd-r-gagne { background: var(--sd-or); color: #0E1D33; }
.sd-r-nulle { background: #E3E8EF; color: var(--sd-bleu); }
.sd-r-perdu { background: var(--sd-ivoire2); color: var(--sd-muted); }
.sd-r-x { background: var(--sd-ivoire2); color: var(--sd-muted); }
.sd-r-encours { border: 1.5px dashed var(--sd-or); background: #fff; }
.sd-r-avenir { border: 1px solid var(--sd-bord); background: #fff; }


/* Listes (prochainement, terminés) */
.sd-liste { background: #fff; border: 1px solid var(--sd-bord); border-radius: var(--sd-card); overflow: hidden; }
.sd-ligne { border-top: 1px solid var(--sd-bord); }
.sd-ligne:first-child { border-top: 0; }
.sd-ligne-fixe, .sd-ligne-b { display: grid; grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1fr) 20px; align-items: center; gap: 4px 18px; padding: 16px 22px; width: 100%; text-align: left; }
.sd-ligne-b { background: none; border: 0; cursor: pointer; min-height: 64px; transition: background-color .15s ease; }
@media (hover: hover) { .sd-ligne-b:hover { background: #FCFBF8; } }
.sd-ligne-b:active { background: var(--sd-ivoire2); }
.sd-ligne-b:focus-visible { outline-offset: -2px; border-radius: 0; }
.sd-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10px; background: var(--sd-ivoire2); font: 600 12px/1 var(--sd-label); color: var(--sd-muted); text-transform: lowercase; }
.sd-date b { font: 700 22px/1 var(--sd-serif); color: var(--sd-bleu); margin-bottom: 2px; }
.sd-l-txt { min-width: 0; }
.sd-l-res { font-size: 14px; color: var(--sd-texte); }
.sd-l-qui { font-size: 14px; color: var(--sd-bleu); line-height: 1.5; }
.sd-l-qui .sd-nom-f { font-weight: 600; }
.sd-chev { width: 10px; height: 10px; border-right: 2px solid var(--sd-muted); border-bottom: 2px solid var(--sd-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; justify-self: end; }
.sd-ouvert .sd-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.sd-detail { padding: 4px 22px 18px 92px; }
.sd-note { font-size: 14px; color: var(--sd-muted); margin-bottom: 10px; }
.sd-lien { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; font-weight: 600; }

.sd-plus { display: block; margin: 14px auto 0; min-height: 44px; padding: 0 22px; background: #fff; border: 1px solid var(--sd-bord); border-radius: 999px; font-size: 14px !important; font-weight: 600; color: var(--sd-bleu) !important; cursor: pointer; transition: border-color .15s ease; }
.sd-plus { transition: border-color .15s ease, transform .12s ease-out; }
.sd-plus:hover { border-color: var(--sd-or); }
.sd-plus:active { transform: scale(.97); }
.sd-maj-err { color: #9A3B2E; }
.sd-vide { padding: 32px 24px; text-align: center; color: var(--sd-muted); background: #fff; border: 1px dashed var(--sd-bord); border-radius: var(--sd-card); }
.sd-vide b { color: var(--sd-bleu); }
.sd-vide p + p { margin-top: 6px; }

/* Téléphone */
@media (max-width: 720px) {
  .sd-joueur { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id score" "cases cases" "partie partie"; }
  .sd-case { width: 24px; height: 24px; font-size: 13px; }
  .sd-ligne-fixe, .sd-ligne-b { grid-template-columns: 48px minmax(0, 1fr) 16px; padding: 14px 16px; gap: 6px 14px; }
  .sd-date { width: 48px; height: 48px; }
  .sd-l-res, .sd-ligne-fixe .sd-l-qui { grid-column: 2 / -1; }
  .sd-ligne-b .sd-chev { grid-column: 3; grid-row: 1; }
  .sd-detail { padding: 0 16px 16px; }
  .sd-titre { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-pastille { animation: none; }
  .sd-chev, .sd-ligne-b, .sd-cherche input, .sd-plus { transition: none; }
  .sd-plus:active { transform: none; }
}


/* Le direct en bleu nuit, scores en or (« tableau d'affichage ») */
.sd-titre { font-size: 30px; }
/* En ce moment : une seule carte blanche ; chaque tournoi n'a qu'une ligne d'en-tête discrète */
.sd-direct { background: #fff; border-radius: var(--sd-card); padding: 6px 28px; box-shadow: 0 1px 2px rgba(14, 29, 51, .06), 0 8px 24px -14px rgba(14, 29, 51, .22); }
.sd-direct .sd-t-groupe { padding: 16px 0 4px; }
.sd-t-groupe + .sd-t-groupe { border-top: 1px solid var(--sd-bord); }
.sd-direct .sd-carte-h { margin-bottom: 0; }
.sd-direct .sd-t-nom { display: inline; font: 600 14px/1.4 var(--font-sans, 'Inter', sans-serif); color: var(--sd-bleu); }
.sd-direct .sd-t-meta { display: inline; margin: 0; }
.sd-direct .sd-t-meta::before { content: " · "; }
.sd-direct .sd-joueur { padding: 10px 0 12px; }
.sd-direct .sd-joueur:first-child { border-top: 0; }
.sd-r-encours { border-color: var(--sd-or); }
.sd-t-lien { margin-left: 4px; white-space: nowrap; }
.sd-t-lien::before { content: "· "; }
.sd-t-lien .sd-lien { display: inline; min-height: 0; font-size: 13px; color: var(--sd-or-texte); }
.sd-liste { border: 0; box-shadow: 0 1px 2px rgba(14, 29, 51, .06), 0 6px 20px -10px rgba(14, 29, 51, .12); }
.sd-date { background: none; height: auto; }
.sd-date b { font-size: 30px; color: var(--sd-or-texte); }

@media (max-width: 720px) {
  .sd-direct { padding: 4px 16px; }
}

/* Listes : noms de tournois en Inter (longs, souvent étrangers : le Cormorant y devient illisible) */
.sd-liste .sd-t-nom { font: 600 15px/1.35 var(--font-sans, 'Inter', sans-serif); color: var(--sd-bleu); }
.sd-ligne-fixe { grid-template-columns: 52px minmax(0, 1.3fr) minmax(0, 1fr) 20px; }
.sd-l-res { display: flex; flex-direction: column; gap: 2px; }
.sd-l-sur { font-size: 12px; color: var(--sd-muted); }
.sd-l-chiffres { color: var(--sd-muted); font-variant-numeric: tabular-nums; }
.sd-l-res .sd-lien { min-height: 32px; font-size: 13px; }
@media (max-width: 720px) {
  .sd-barre { flex-direction: column; align-items: stretch; }
  .sd-cherche { flex: 1 1 auto; }
  .sd-ligne-fixe { grid-template-columns: 48px minmax(0, 1fr) 16px; }
  .sd-ligne-fixe > .sd-l-qui, .sd-ligne-fixe > .sd-l-res { grid-column: 2 / -1; }
  .sd-ligne-fixe > span:last-child:empty { display: none; }
}
@media (max-width: 420px) {
  .sd-cases { gap: 3px; }
  .sd-case { width: 21px; height: 21px; font-size: 12px; border-radius: 5px; }
}

.sd-date-vide { visibility: hidden; }
.sd-l-sur { font-size: 13px; }

/* Ordinateur : le score juste après les cases (lu d'un seul coup d'œil avec le nom), pas au bord droit */
@media (min-width: 721px) {
  .sd-joueur { grid-template-columns: minmax(180px, 250px) auto auto 1fr; grid-template-areas: "id cases score ." "partie partie partie partie"; column-gap: 24px; }
  .sd-score { justify-self: start; min-width: 64px; }
}
