/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8efe6 100%);
  background-attachment: fixed;
  color: #1a2332;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

:root {
  --green-900: #0a3d2a;
  --green-700: #146c43;
  --green-600: #198754;
  --green-500: #28a745;
  --green-50:  #ecf7f0;
  --orange:    #f97316;
  --orange-50: #fff4ed;
  --red:       #dc2626;
  --red-50:    #fef2f2;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 10px 25px rgba(15,23,42,.10);
  --radius:    10px;
  --radius-lg: 14px;
}

/* === Header === */
.topbar {
  background: linear-gradient(120deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-600) 100%);
  color: white;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ball {
  font-size: 1.6rem;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.subtitle {
  font-size: .8rem;
  font-weight: 400;
  opacity: .8;
  padding-left: .75rem;
  border-left: 1px solid rgba(255,255,255,.25);
}
.tabs {
  display: flex;
  gap: .25rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  color: rgba(255,255,255,.85);
  border: 1px solid transparent;
  padding: .5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
  transition: all .15s ease;
}
.tabs button:hover {
  background: rgba(255,255,255,.12);
  color: white;
}
.tabs button.active {
  background: white;
  color: var(--green-900);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* === Layout === */
.content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}

/* === Typo === */
h2 {
  margin: 0 0 1.25rem 0;
  color: var(--green-900);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h3 {
  margin: 0 0 1rem 0;
  color: var(--slate-900);
  font-size: 1.2rem;
  font-weight: 600;
}
h4 {
  color: var(--slate-700);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.8rem 0 .8rem 0;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--green-50);
}
p { margin: 0 0 .8rem 0; color: var(--slate-700); }
ol { padding-left: 1.4rem; color: var(--slate-700); }
ol li { margin-bottom: .5rem; }
a {
  color: var(--green-600);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
a:hover { color: var(--green-700); text-decoration: underline; }
a.danger { color: var(--red); }
a.danger:hover { color: #b91c1c; }

/* === Forms === */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.field label {
  font-size: .82rem;
  color: var(--slate-600);
  margin-bottom: .35rem;
  font-weight: 500;
}
input, select, button, textarea {
  font-family: inherit;
  font-size: .92rem;
}
.field input, .field select {
  padding: .6rem .75rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: white;
  color: var(--slate-900);
  transition: all .15s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, .15);
}
.field input::placeholder { color: var(--slate-400); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* === Buttons === */
button {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  padding: .6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  font-family: inherit;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
button:hover:not(:disabled) {
  background: var(--slate-200);
  border-color: var(--slate-300);
}
button:disabled { opacity: .5; cursor: not-allowed; }

button.primary, a.primary.button {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 100%);
  color: white;
  border: none;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
button.primary:hover:not(:disabled),
a.primary.button:hover {
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

a.primary.button {
  padding: .65rem 1.3rem;
  display: inline-block;
  margin: .5rem .5rem .5rem 0;
}

/* === Upload form === */
.upload-form {
  max-width: 640px;
}
.upload-form input[type="file"] {
  padding: .6rem;
  width: 100%;
  border: 2px dashed var(--slate-300);
  border-radius: 8px;
  background: var(--slate-50);
  cursor: pointer;
  transition: all .15s ease;
}
.upload-form input[type="file"]:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

/* === Validation form === */
.validate-form .grid { margin-bottom: 1.5rem; }
.actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--slate-200);
}

/* === Alerts & status === */
.error {
  color: var(--red);
  background: var(--red-50);
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-top: .8rem;
  border-left: 4px solid var(--red);
  font-size: .9rem;
}
.success {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(135deg, var(--green-50), white);
  border-radius: var(--radius-lg);
}
.success h3 {
  font-size: 1.8rem;
  color: var(--green-700);
  margin-bottom: .5rem;
}

/* === Tables === */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--slate-200);
}
th, td {
  padding: .7rem .9rem;
  text-align: left;
  font-size: .9rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--slate-100);
}
th {
  background: var(--slate-50);
  font-weight: 600;
  color: var(--slate-700);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:hover { background: var(--slate-50); }
tbody tr:last-child td { border-bottom: none; }

/* Tableaux matchs / classement avec inputs */
.matches input, .matches select, .standings input {
  padding: .35rem .5rem;
  font-size: .85rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  background: white;
  transition: all .15s ease;
}
.matches input:focus, .matches select:focus, .standings input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, .15);
}
.matches input.small { width: 105px; margin: 2px; }
.matches input.tiny  { width: 44px; margin: 1px; text-align: center; font-weight: 600; color: var(--green-700); }
.standings input.tiny { width: 70px; text-align: center; }
.pair { display: flex; gap: 4px; margin-bottom: 4px; }

/* === Inline form === */
/* ===== MODALE D'ÉDITION CHAMPIONNAT ===== */
.champ-toolbar {
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-start;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: modalFadeIn .15s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn .2s ease;
}
@keyframes modalSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--slate-200);
}
.modal-header h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.25rem;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--slate-500);
  cursor: pointer;
  padding: 0 .4rem;
  line-height: 1;
}
.modal-close:hover { color: var(--red); background: transparent; }
.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.modal-field.full { grid-column: 1 / -1; }
.modal-field label {
  font-size: .8rem;
  color: var(--slate-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.modal-field input, .modal-field select {
  padding: .55rem .75rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  font-size: .95rem;
  background: white;
}
.modal-field input:focus, .modal-field select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, .15);
}
.modal-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.modal-grid-4 {
  display: grid;
  grid-template-columns: 100px 100px 1fr 1fr;
  gap: 1rem;
}
.modal-colors {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  background: var(--slate-50);
  margin: 0;
}
.modal-colors legend {
  padding: 0 .5rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--green-900);
}
.modal-color-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.modal-color-field label {
  font-size: .8rem;
  color: var(--slate-700);
  font-weight: 600;
}
.modal-color-field .hint {
  color: var(--slate-500);
  font-weight: 400;
  font-size: .75rem;
}
.color-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.color-row input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  cursor: pointer;
  background: white;
}
.color-row input[type="text"] {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .85rem;
  padding: .45rem .55rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
}
.btn-mini {
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  border-radius: 4px;
  font-size: .75rem;
  padding: .3rem .55rem;
  cursor: pointer;
}
.btn-mini:hover { background: var(--slate-200); }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding-top: .8rem;
  border-top: 1px solid var(--slate-200);
  margin-top: .5rem;
}

@media (max-width: 700px) {
  .modal-grid-3 { grid-template-columns: 1fr; }
  .modal-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Color pickers compacts dans le form championnat */
.color-field {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .55rem;
  background: white;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  font-size: .82rem;
  color: var(--slate-700);
}
.color-field input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.color-reset {
  background: transparent;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 0 .25rem;
  font-size: 1rem;
  line-height: 1;
}
.color-reset:hover { color: var(--red); background: transparent; }
.color-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--slate-300);
  margin-right: 3px;
  vertical-align: middle;
}

.inline-form {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--slate-50);
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
}
.inline-form input, .inline-form select {
  padding: .5rem .75rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  background: white;
  font-size: .9rem;
}
.inline-form input:focus, .inline-form select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, .15);
}
.inline-form label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  color: var(--slate-700);
  cursor: pointer;
}

/* === Misc === */
.logo-thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--slate-200);
  padding: 3px;
}
.muted { color: var(--slate-400); font-style: italic; }
.note {
  font-size: .82rem;
  color: var(--slate-500);
  font-style: italic;
  margin-top: .5rem;
  padding: .5rem .75rem;
  background: var(--orange-50);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
}

.row-actions { white-space: nowrap; }
.row-actions .sep { color: var(--slate-300); margin: 0 .35rem; }

.settings-row {
  display: flex;
  gap: .5rem;
  margin: .5rem 0;
}
.settings-row input {
  flex: 1;
  padding: .55rem .8rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: .92rem;
  font-family: 'Inter', sans-serif;
}
.settings-row input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25,135,84,.15);
}
code {
  background: var(--slate-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .85em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--slate-900);
}
/* === Bookmarklet + bannière import tenup === */
.bookmarklet-link {
  display: inline-block;
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
  color: white !important;
  padding: .7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 1rem;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(132,204,22,.30);
  user-select: none;
}
.bookmarklet-link:hover {
  background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%);
  box-shadow: 0 6px 16px rgba(132,204,22,.45);
}

.pending-import-banner {
  background: linear-gradient(135deg, #ecfccb 0%, #d9f99d 100%);
  border: 2px solid #84cc16;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 4px 10px rgba(132,204,22,.2);
}
.pi-icon { font-size: 2rem; }
.pi-title { font-weight: 700; color: #365314; font-size: 1rem; }
.pi-meta { color: #4d7c0f; font-size: .92rem; margin-top: 2px; }
.pi-meta strong { color: #166534; font-weight: 800; }
.pi-actions { display: flex; gap: .5rem; }
.pi-actions button.muted {
  background: transparent;
  color: var(--slate-600);
}

.success-inline {
  color: var(--green-700);
  font-weight: 600;
  font-size: .9rem;
  margin-top: .5rem;
}

/* Bulk import des équipes */
.bulk-import { margin-bottom: 1.2rem; }
.bulk-toggle {
  background: var(--slate-100);
  color: var(--slate-800);
  border: 1px solid var(--slate-300);
  padding: .55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 500;
}
.bulk-toggle:hover { background: var(--slate-200); }
.bulk-panel {
  margin-top: .8rem;
  padding: 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}
.bulk-help {
  margin: 0 0 .8rem 0;
  font-size: .88rem;
  color: var(--slate-700);
  line-height: 1.5;
}
.bulk-help code {
  background: white;
  border: 1px solid var(--slate-200);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .85em;
  color: var(--green-700);
}
.bulk-textarea {
  width: 100%;
  padding: .6rem .8rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .9rem;
  resize: vertical;
  box-sizing: border-box;
}
.bulk-textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25,135,84,.15);
}
.bulk-actions { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.bulk-result {
  margin-top: .6rem;
  padding: .55rem .8rem;
  background: white;
  border-left: 4px solid var(--green-600);
  border-radius: 4px;
  font-size: .88rem;
  color: var(--slate-800);
}

.actions-row {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* === Choice cards (CSV vs Affiche) === */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 600px;
  margin: 1rem auto;
}
.choice-card {
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  color: var(--slate-900);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: center;
}
.choice-card:hover {
  border-color: var(--green-600);
  background: linear-gradient(135deg, var(--green-50), white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.choice-icon { font-size: 2.5rem; }
.choice-title { font-weight: 700; font-size: 1.1rem; color: var(--green-900); }
.choice-desc { font-size: .85rem; color: var(--slate-600); }

@media (max-width: 600px) {
  .choice-grid { grid-template-columns: 1fr; }
}

/* === Design visuel exporté en PNG === */
.design-section {
  margin-top: 1rem;
  text-align: center;
}
.design-toolbar {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}
.design-section-title {
  color: var(--green-900);
  margin: 0;
}
.design-wrapper {
  width: 540px;
  height: 540px;
  margin: 1rem auto;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.30);
  background: #0c1e3a;
}

/* L'affiche : 1080×1080 carré, affichée à 540×540 via transform.
   html2canvas retire le transform avant la capture. */
.result-design {
  /* Couleurs paramétrables via championnat (override par inline style) */
  --rd-primary: #84cc16;      /* vert lime par défaut */
  --rd-secondary: #fbbf24;    /* or par défaut */
  --rd-bg: #0a1f3d;           /* navy par défaut */
  width: 1080px;
  height: 1080px;
  position: relative;
  color: white;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 36px;
  box-sizing: border-box;
  gap: 6px;
  background-color: var(--rd-bg);
  background-image: var(--rd-bg-image, linear-gradient(135deg,
    transparent 0%,
    rgba(255,255,255,.06) 50%,
    transparent 100%));
  background-size: cover;
  background-position: center;
  transform: scale(.5);
  transform-origin: top left;
}

.rd-court-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* === HEADER === */
.rd-header {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 4px 20px;
}
.rd-resultats {
  grid-column: 1;
  grid-row: 1;
  font-family: 'Bowlby One', 'Anton', sans-serif;
  font-size: 110px;
  letter-spacing: -.01em;
  color: var(--rd-primary);
  text-shadow:
    4px 4px 0 var(--rd-secondary),
    8px 8px 0 rgba(0,0,0,.40);
  line-height: 0.95;
  font-style: italic;
  transform: skewX(-8deg);
  font-weight: normal;
}
.rd-cat-badge {
  grid-column: 2;
  grid-row: 1;
  background: var(--rd-bg);
  color: var(--rd-primary);
  padding: 10px 26px 8px;
  font-weight: 800;
  font-family: 'Bowlby One', sans-serif;
  border-radius: 14px;
  font-size: 40px;
  letter-spacing: .04em;
  transform: rotate(-3deg);
  box-shadow: 4px 5px 0 rgba(0,0,0,.40);
  white-space: nowrap;
  align-self: start;
  margin-top: 22px;
  border: 4px solid var(--rd-primary);
}
.rd-ball-svg {
  grid-column: 4;
  grid-row: 1 / span 2;
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.40));
  justify-self: end;
}
.rd-date {
  grid-column: 1 / span 3;
  grid-row: 2;
  font-size: 72px;
  font-family: 'Bowlby One', sans-serif;
  color: var(--rd-secondary);
  letter-spacing: .02em;
  text-shadow: 4px 4px 0 rgba(0,0,0,.25);
  font-style: italic;
  transform: skewX(-6deg);
  justify-self: end;
  padding-right: 20px;
}

/* === SCOREBOARD : 3 lignes (nom haut gauche / logos+score / nom bas droite) === */
.rd-scoreboard {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.rd-sb-middle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 4px 0;
}
.rd-team-logo-home { justify-self: start; }
.rd-team-logo-away { justify-self: end; }
.rd-score-block    { justify-self: center; }
.rd-team-name {
  font-family: 'Bowlby One', sans-serif;
  font-size: 58px;
  letter-spacing: .02em;
  line-height: 1;
  color: #ffffff;
  /* Outline stroke (4 directions) + ombre verte + ombre noire profonde */
  text-shadow:
    -3px -3px 0 #0a1f3d,
     3px -3px 0 #0a1f3d,
    -3px  3px 0 #0a1f3d,
     3px  3px 0 #0a1f3d,
     5px  5px 0 var(--rd-primary),
     8px  8px 0 rgba(0,0,0,.55);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: visible;
  padding: 2px 0;
}
.rd-team-name-home {
  text-align: left;
  align-self: flex-start;
}
.rd-team-name-away {
  text-align: right;
  align-self: flex-end;
}
.rd-team-logo-wrap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.40);
  overflow: hidden;
  box-sizing: border-box;
}
.rd-team-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rd-team-logo-ph {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  font-size: 60px;
}
/* Anneau lime (équipe locale) — toujours présent */
.rd-team-logo-home {
  box-shadow: 0 0 0 5px var(--rd-primary), 0 6px 18px rgba(0,0,0,.40);
}
/* Anneau secondaire (équipe visiteuse) — toujours présent */
.rd-team-logo-away {
  box-shadow: 0 0 0 5px var(--rd-secondary), 0 6px 18px rgba(0,0,0,.40);
}
/* Halo amplifié pour le vainqueur (glow plus fort) */
.rd-team-logo-home.winner {
  box-shadow: 0 0 0 8px var(--rd-primary), 0 0 35px rgba(0,0,0,.0), 0 6px 22px rgba(0,0,0,.50);
}
.rd-team-logo-away.winner {
  box-shadow: 0 0 0 8px var(--rd-secondary), 0 0 35px rgba(0,0,0,.0), 0 6px 22px rgba(0,0,0,.50);
}
.rd-score-block {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 28px;
}
.rd-score-home, .rd-score-away {
  font-family: 'Bowlby One', sans-serif;
  font-size: 130px;
  line-height: 0.85;
  color: #ffffff;
  text-shadow:
    3px 3px 0 #0a3d2a,
    6px 6px 0 rgba(0,0,0,.55);
}
.rd-vs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
}
.rd-vs-ball {
  position: absolute;
  inset: 0;
  width: 150px;
  height: 150px;
}
.rd-vs-text {
  position: relative;
  font-family: 'Bowlby One', sans-serif;
  font-size: 64px;
  color: #0b1d3a;
  font-style: italic;
  letter-spacing: .04em;
  line-height: 1;
  text-shadow:
    3px 3px 0 #fff,
    -1px -1px 0 rgba(255,255,255,.5);
}

/* === MATCHES EN 2 COLONNES + DOUBLE PLEINE LARGEUR === */
.rd-matches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.rd-mcol { display: flex; flex-direction: column; gap: 10px; }

.rd-doubles-full {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.rd-fullwidth { width: 100%; }

.rd-match-block {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: stretch;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  border: 2px solid rgba(255,255,255,.08);
}
.rd-double-block {
  background: rgba(132,204,22,.14);
  border-color: rgba(132,204,22,.45);
}
.rd-mtag {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e2b52;
  color: white;
  font-family: 'Bowlby One', sans-serif;
  font-size: 22px;
  letter-spacing: .02em;
  border-right: 2px solid rgba(255,255,255,.10);
}
.rd-double-block .rd-mtag {
  background: var(--rd-primary);
}
.rd-mlines {
  display: flex;
  flex-direction: column;
}
.rd-mline {
  display: grid;
  grid-template-columns: 40px 1fr 24px auto;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  background: transparent;
  min-height: 42px;
}
.rd-mline:first-child { border-bottom: 1px solid rgba(255,255,255,.10); }
.rd-mline.won {
  background-color: var(--rd-primary);
  background-image: linear-gradient(90deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.15) 50%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.rd-mlogo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px rgba(255,255,255,.4), 0 2px 4px rgba(0,0,0,.3);
}
.rd-mlogo-ph { background: rgba(255,255,255,.15); }
/* Anneau lime sur logo équipe locale (1ère ligne du match-block) */
.rd-mlines > .rd-mline:nth-child(1) .rd-mlogo {
  box-shadow: 0 0 0 3px var(--rd-primary), 0 2px 4px rgba(0,0,0,.4);
}
/* Anneau gold sur logo équipe visiteuse (2ème ligne du match-block) */
.rd-mlines > .rd-mline:nth-child(2) .rd-mlogo {
  box-shadow: 0 0 0 3px var(--rd-secondary), 0 2px 4px rgba(0,0,0,.4);
}
.rd-mname {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.rd-mname-double { font-size: 18px; }
.rd-mvd {
  font-family: 'Bowlby One', sans-serif;
  font-size: 24px;
  color: white;
  text-align: center;
  width: 24px;
}
.rd-mline.won .rd-mvd { color: #fef3c7; }
.rd-mline:not(.won) .rd-mvd { color: rgba(255,255,255,.55); }

.rd-msets { display: flex; gap: 6px; flex-shrink: 0; }
.rd-mset {
  font-family: 'Bowlby One', sans-serif;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0f172a;
  background: #e6d5a8;
  border-radius: 4px;
}
.rd-mline.won .rd-mset {
  background: white;
  color: #0b1d3a;
}

/* === STANDINGS EN 2 COLONNES === */
.rd-standings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  position: relative;
  z-index: 1;
  margin-top: 6px;
}
.rd-standing {
  display: grid;
  grid-template-columns: 40px 40px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,.06);
  border-radius: 6px;
}
.rd-pos {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rd-primary);
  color: var(--rd-bg);
  font-family: 'Bowlby One', sans-serif;
  border-radius: 6px;
  font-size: 24px;
}
.rd-st-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--rd-primary), 0 2px 4px rgba(0,0,0,.3);
}
.rd-st-logo-ph { background: rgba(255,255,255,.20); }
.rd-st-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
  text-align: left;
}
.rd-st-pts {
  font-family: 'Bowlby One', sans-serif;
  font-size: 26px;
  color: white;
}

/* === Section label === */
.section-label {
  font-size: .82rem;
  color: var(--slate-600);
  margin-bottom: .5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* === Champion selector (cards) === */
.champ-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.champ-card {
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-height: 88px;
}
.champ-card:hover {
  border-color: var(--green-600);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.champ-card.selected {
  border-color: var(--green-600);
  background: linear-gradient(135deg, var(--green-50), white);
  box-shadow: 0 0 0 3px rgba(25,135,84,.15), var(--shadow-md);
}
.champ-card.no-champ { background: var(--slate-50); }
.champ-card.no-champ .champ-card-title { color: var(--slate-500); font-weight: 500; }
.champ-card.empty {
  border-style: dashed;
  cursor: default;
  background: var(--slate-50);
  color: var(--slate-500);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.champ-card-title {
  font-weight: 600;
  color: var(--slate-900);
  font-size: .95rem;
  line-height: 1.3;
}
.champ-card-badges { display: flex; gap: .35rem; flex-wrap: wrap; }
.champ-card-meta { font-size: .78rem; color: var(--slate-500); margin-top: auto; }

.badge {
  display: inline-block;
  padding: .15rem .55rem;
  font-size: .72rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-saison { background: var(--slate-900); color: white; }
.badge-cat-senior { background: #dcfce7; color: #166534; }
.badge-cat-35     { background: #dbeafe; color: #1e40af; }
.badge-cat-45     { background: #e0e7ff; color: #4338ca; }
.badge-cat-55     { background: #f3e8ff; color: #6b21a8; }
.badge-cat-65     { background: #fce7f3; color: #9d174d; }
.badge-cat-junior { background: #fef3c7; color: #92400e; }
.badge-cat-other  { background: var(--slate-200); color: var(--slate-700); }
.badge-sexe-h { background: #cffafe; color: #155e75; }
.badge-sexe-f { background: #fce7f3; color: #9d174d; }
.badge-sexe-m { background: #f3e8ff; color: #6b21a8; }

/* === Scoreboard (validation header) === */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, #0a3d2a 0%, #146c43 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.scoreboard-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  position: relative;
  padding: .5rem;
}
.scoreboard-team.home { order: 1; }
.scoreboard-team.away { order: 3; }
.scoreboard-score    { order: 2; display: flex; align-items: center; gap: .8rem; }
.scoreboard-team.winner::after {
  content: "🏆";
  position: absolute;
  top: -10px;
  right: 0;
  font-size: 1.3rem;
}
.team-logo-big {
  width: 90px; height: 90px;
  object-fit: contain;
  background: white;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-md);
}
.team-logo-placeholder {
  width: 90px; height: 90px;
  background: rgba(255,255,255,.12);
  border: 2px dashed rgba(255,255,255,.4);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  cursor: pointer;
  transition: all .15s ease;
}
.team-logo-placeholder:hover { background: rgba(255,255,255,.2); border-color: white; }
.team-name-input {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  padding: .45rem .8rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  max-width: 280px;
}
.team-name-input::placeholder { color: rgba(255,255,255,.5); }
.team-name-input:focus { outline: none; background: rgba(255,255,255,.2); border-color: white; }
.score-input {
  width: 64px;
  height: 64px;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  background: white;
  color: var(--green-900);
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.score-input:focus { outline: 3px solid var(--orange); }
.vs {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .7;
}

/* Barre d'info "Championnat lié + épreuve" en haut de la validation */
.champ-link-bar {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1rem;
  background: linear-gradient(135deg, var(--green-50), white);
  border: 2px solid var(--green-500);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
}
.champ-link-info {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.champ-link-label {
  font-size: .78rem;
  color: var(--slate-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.champ-link-epreuve {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92rem;
  color: var(--green-900);
  font-weight: 600;
  background: white;
  padding: .35rem .55rem;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
}
.champ-link-select {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.champ-link-select label {
  font-size: .78rem;
  color: var(--slate-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.champ-link-select select {
  padding: .5rem .65rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  font-size: .92rem;
  background: white;
}
.champ-link-status {
  font-size: .85rem;
  margin-top: .15rem;
}
.champ-link-status.ok { color: var(--green-700); font-weight: 600; }
.champ-link-status.warn { color: #b45309; font-style: italic; }

@media (max-width: 700px) {
  .champ-link-bar { grid-template-columns: 1fr; }
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--slate-50);
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
}
.meta-field { display: flex; flex-direction: column; }
.meta-label {
  font-size: .75rem;
  color: var(--slate-600);
  margin-bottom: .3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.meta-field input, .meta-field select {
  padding: .5rem .75rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: .95rem;
  background: white;
}
.meta-field input:focus, .meta-field select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, .15);
}

/* === Match cards === */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.match-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
.match-card:hover { box-shadow: var(--shadow-md); }
.match-card.double { border-left: 4px solid var(--orange); }
.match-card-header {
  background: var(--slate-50);
  padding: .5rem 1rem;
  border-bottom: 1px solid var(--slate-200);
}
.match-card-num {
  font-size: .82rem;
  font-weight: 700;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.match-card-side {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: .6rem;
  align-items: center;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--slate-100);
  transition: background .15s ease;
}
.match-card-side:nth-child(2) { background: rgba(0,0,0,.01); }
.match-card-side.winner {
  background: linear-gradient(90deg, var(--green-50) 0%, transparent 60%);
  border-left: 3px solid var(--green-600);
}
.team-logo-sm {
  width: 36px; height: 36px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 3px;
}
.team-logo-sm-ph {
  width: 36px; height: 36px;
  background: var(--slate-100);
  border: 1px dashed var(--slate-300);
  border-radius: 8px;
}
.player-inputs { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.player-inputs input.small {
  width: 100px;
  padding: .3rem .5rem;
  font-size: .85rem;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  background: white;
}
.player-inputs .pair { display: flex; gap: 3px; flex-basis: 100%; }
.sets-inputs { display: flex; gap: 3px; }
.sets-inputs input.tiny {
  width: 36px;
  padding: .35rem .25rem;
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  color: var(--green-700);
  background: white;
}
.match-card-side.winner .sets-inputs input.tiny {
  background: var(--green-600);
  color: white;
  border-color: var(--green-700);
}
.match-card-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  background: var(--slate-50);
  font-size: .85rem;
}
.match-card-footer select {
  padding: .3rem .5rem;
  font-size: .85rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  background: white;
}
.winner-label { color: var(--slate-600); font-weight: 500; }

/* === Standings (classement) === */
.standings-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.standing-row {
  display: grid;
  grid-template-columns: 48px 48px 1fr 110px;
  gap: .6rem;
  align-items: center;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: .4rem .7rem;
  transition: all .15s ease;
}
.standing-row:hover { box-shadow: var(--shadow-sm); }
.standing-row.empty  { opacity: .5; }
.standing-row.beyond { background: var(--slate-50); opacity: .55; }
.standing-pos input.pos {
  width: 40px;
  font-weight: 700;
  text-align: center;
  font-size: 1rem;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid var(--green-500);
}
.standing-name input {
  width: 100%;
  padding: .35rem .55rem;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font-size: .95rem;
  background: transparent;
}
.standing-name input:focus { background: white; border-color: var(--green-600); outline: none; box-shadow: 0 0 0 2px rgba(25,135,84,.15); }
.standing-points { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.standing-points input.tiny { width: 64px; text-align: center; font-weight: 700; }
.pts { font-size: .8rem; color: var(--slate-500); font-weight: 500; }

@media (max-width: 768px) {
  .scoreboard { grid-template-columns: 1fr; }
  .scoreboard-team.home { order: 1; }
  .scoreboard-score    { order: 2; justify-content: center; padding: .5rem 0; }
  .scoreboard-team.away { order: 3; }
  .team-logo-big, .team-logo-placeholder { width: 70px; height: 70px; }
  .score-input { width: 56px; height: 56px; font-size: 1.8rem; }
  .standing-row { grid-template-columns: 40px 40px 1fr 90px; }
}

/* === Dropzone (upload PDF + xlsx) === */
.dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  padding: 1.25rem;
  margin: 1rem 0;
  transition: all .15s ease;
}
.dropzone.active {
  border-color: var(--green-600);
  background: var(--green-50);
  box-shadow: 0 0 0 4px rgba(25, 135, 84, .12);
}
.dropzone.ready { border-color: var(--green-500); background: linear-gradient(135deg, var(--green-50), white); }
.dz-hint { margin: 0 0 1rem 0; color: var(--slate-600); font-size: .9rem; text-align: center; }
.dz-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.dz-file {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: white;
  padding: .7rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  position: relative;
}
.dz-file.ok { border-color: var(--green-500); background: linear-gradient(135deg, white, var(--green-50)); }
.dz-icon { font-size: 1.6rem; }
.dz-label { font-size: .8rem; color: var(--slate-500); font-weight: 500; }
.dz-name { font-size: .92rem; color: var(--slate-900); font-weight: 500; }
.dz-file.ok .dz-name { color: var(--green-700); }
.dz-clear {
  position: absolute;
  top: 4px; right: 6px;
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 .4rem;
  line-height: 1;
}
.dz-clear:hover { color: var(--red); background: transparent; }
.dz-buttons { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

/* Boutons "wrapper" autour des <input type=file hidden> */
.btn-file {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: white;
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
  padding: .5rem .9rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: all .15s ease;
}
.btn-file:hover { background: var(--green-50); border-color: var(--green-600); color: var(--green-700); }
.btn-file.small { padding: .3rem .65rem; font-size: .82rem; }

/* Cellule logo équipe (drag & drop + paste) */
.logo-cell {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  min-width: 220px;
}
.dz-hint-small {
  font-size: .72rem;
  color: var(--slate-400);
  font-style: italic;
  padding: .2rem .5rem;
  border-radius: 4px;
  transition: all .15s ease;
}
.dz-hint-small.active {
  color: var(--green-700);
  background: var(--green-50);
  font-style: normal;
  font-weight: 600;
}

/* === Formulaire équipe (nom + alias + checkboxes) === */
.equipe-form {
  background: var(--slate-50);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.equipe-form-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.equipe-form-name { flex: 1; min-width: 240px; padding: .5rem .75rem; border: 1px solid var(--slate-300); border-radius: 6px; }
.equipe-form-aliases {
  width: 100%;
  padding: .55rem .75rem;
  font-family: inherit;
  font-size: .9rem;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  resize: vertical;
  min-height: 60px;
}
.equipe-form-aliases:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(25,135,84,.15);
}
.hint {
  font-size: .78rem;
  color: var(--slate-500);
  font-style: italic;
  display: block;
  margin-top: .25rem;
}
.equipe-form-actions { display: flex; gap: .5rem; }

.aliases-cell { max-width: 240px; }
.aliases-list {
  font-size: .82rem;
  color: var(--slate-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Indicateurs de match dans le classement */
.standing-row.unmatched { background: #fff8e1; border-color: #f59e0b; }
.standing-name {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.standing-name input { flex: 1; min-width: 0; }
.standing-warn {
  font-size: .72rem;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
  cursor: help;
}
.standing-match {
  font-size: .72rem;
  color: var(--green-700);
  background: var(--green-50);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 500;
  cursor: help;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.team-logo-sm-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  font-size: 12px;
  font-weight: 600;
}

/* === Panneau de gestion du connecteur Meta === */
.meta-status-card {
  background: var(--slate-50);
  border-left: 4px solid;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.meta-status-card.ok { border-left-color: #16a34a; background: #f0fdf4; }
.meta-status-card.ko { border-left-color: #f59e0b; background: #fffbeb; }
.meta-status-line {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  margin-bottom: .8rem;
}
.meta-status-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.meta-status-sub {
  color: var(--slate-600);
  font-size: .9rem;
  margin-top: .2rem;
}
.meta-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.meta-actions button { font-size: .9rem; padding: .4rem .9rem; }

.reconfigure-steps {
  background: var(--slate-50);
  padding: 1rem 1rem 1rem 2.5rem;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}
.reconfigure-steps code {
  background: rgba(0,0,0,.07);
  padding: .1rem .35rem;
  border-radius: 3px;
  font-size: .85rem;
}
.reconfigure-token-input {
  width: 100%;
  padding: .6rem;
  font-family: monospace;
  font-size: .8rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  word-break: break-all;
}
.reconfigure-app-creds {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
}
.reconfigure-app-creds h5 { margin: 0 0 .8rem; color: var(--slate-700); }

/* === Publication Facebook === */
.publish-btn {
  background: #1877f2 !important;
  border-color: #1877f2 !important;
  color: white !important;
}
.publish-btn:hover {
  background: #166fe5 !important;
}
.publish-targets {
  display: flex;
  gap: .8rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.publish-target {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1rem;
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  transition: border-color .15s;
}
.publish-target:has(input:checked) {
  border-color: var(--green-700);
  background: #f0fdf4;
}
.publish-target.disabled {
  opacity: .5;
  cursor: not-allowed;
  background: var(--slate-50);
}
.publish-target input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.publish-target.disabled input { cursor: not-allowed; }
.pt-icon { width: 32px; height: 32px; flex-shrink: 0; }
.published-cell {
  white-space: nowrap;
  text-align: center;
}
.published-badge {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 2px;
}
.result-icon { width: 20px; height: 20px; vertical-align: middle; margin-right: .35rem; }
.result-platform { display: inline-flex; align-items: center; gap: .2rem; }
.pt-label { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; }
.pt-sub { font-size: .8rem; font-weight: 400; color: var(--slate-600); margin-top: .15rem; }
.pt-sub.warn { color: #b45309; }
.publish-result-row {
  padding: .6rem .8rem;
  margin: .4rem 0;
  border-radius: var(--radius-sm);
}
.publish-result-row .result-ok { color: var(--green-700); }
.publish-result-row .result-ko { color: #dc2626; }

.publish-caption {
  width: 100%;
  min-height: 220px;
  padding: .8rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  line-height: 1.4;
  resize: vertical;
}
.publish-success {
  text-align: center;
  padding: 1.5rem 0;
}
.publish-success h4 {
  color: var(--green-700);
  font-size: 1.4rem;
  margin: 0 0 .5rem;
}
.primary-link {
  display: inline-block;
  padding: .6rem 1.2rem;
  background: #1877f2;
  color: white !important;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  margin: 1rem 0;
}
.primary-link:hover { background: #166fe5; }

/* === Responsive === */
@media (max-width: 768px) {
  .topbar { padding: .6rem 1rem; }
  .content { padding: 1rem; }
  .card { padding: 1.2rem; }
  .tabs { gap: .15rem; }
  .tabs button { padding: .4rem .7rem; font-size: .8rem; }
  .matches { font-size: .8rem; }
  .matches input.small { width: 80px; }
}

/* ===== RENCONTRES (onglet refactorisé) ===== */
.rencontres-toolbar {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}
.rencontres-toolbar .field { min-width: 280px; flex: 1; }
.rencontres-toolbar .field label { display: block; font-size: .8rem; color: var(--slate-600); margin-bottom: .3rem; font-weight: 600; }
.rencontres-toolbar .field select { width: 100%; padding: .5rem; border: 1px solid var(--slate-300); border-radius: var(--radius-sm); background: white; }
.rencontres-import { display: flex; gap: .6rem; align-items: center; }
.btn-file.disabled { opacity: .5; cursor: not-allowed; }
.btn-refresh { padding: .55rem 1rem; background: white; border: 1px solid var(--slate-300); border-radius: var(--radius-sm); cursor: pointer; }
.btn-refresh:hover { background: var(--slate-100); }
/* 10 colonnes : marges réduites et actions sur 2 lignes si besoin, pour tenir dans la carte */
.rencontres-scroll { overflow-x: auto; }
.rencontres-table th, .rencontres-table td { padding: .6rem .5rem; }
.rencontres-table .row-actions { white-space: normal; min-width: 150px; }
.rencontres-table tbody tr.r-pending { background: rgba(251, 191, 36, .06); }
.status-played { color: var(--green-700); font-weight: 600; font-size: .85rem; }
.status-pending { color: #b45309; font-weight: 600; font-size: .85rem; }

/* ===== CALENDRIER ===== */
.modal-wide { max-width: 1100px; }
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cal-help { color: var(--slate-600); font-size: .85rem; flex: 1; min-width: 200px; }
.cal-busy { color: var(--green-700); font-weight: 600; }
.cal-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.cal-table th,
.cal-table td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--slate-200); }
.cal-table th {
  background: var(--slate-50);
  font-weight: 600;
  color: var(--slate-700);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.cal-table tbody tr:hover { background: var(--slate-50); }
.cal-table tr.cal-played { color: var(--slate-500); }
.cal-table tr.cal-played td { font-style: italic; }
.r-champ { min-width: 150px; }
.r-champ-cat {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--cat, var(--slate-300));
  color: var(--cat, inherit);
  background: color-mix(in srgb, var(--cat, transparent) 14%, transparent);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.r-champ-eq {
  display: block;
  margin-top: .2rem;
  font-size: .72rem;
  color: var(--slate-500);
}
.cal-date {
  padding: .3rem .4rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.cal-date-manuelle {
  display: block;
  font-size: .72rem;
  color: var(--slate-500);
}
.cal-heure {
  width: 80px;
  padding: .3rem .5rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
}

/* ===== ANNONCE (visuel 1080x1080) ===== */
.annonce-design {
  --rd-primary: #84cc16;
  --rd-secondary: #fbbf24;
  --rd-bg: #0a1f3d;
  position: relative;
  width: 1080px;
  height: 1080px;
  background-color: var(--rd-bg);
  background-image: var(--rd-bg-image,
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.10) 0%, transparent 55%));
  background-size: cover;
  background-position: center;
  color: white;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  transform: scale(.5);
  transform-origin: top left;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
/* .design-wrapper consolidé plus haut (~ligne 802) */

.ann-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.ann-band-primary { fill: var(--rd-primary); }
.ann-band-secondary { fill: var(--rd-secondary); }

/* ===== Header ===== */
.ann-header {
  position: relative;
  z-index: 2;
  padding: 50px 60px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ann-title-pre {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: .35em;
  font-size: 22px;
  color: var(--rd-secondary);
  text-transform: uppercase;
  opacity: .9;
}
.ann-title {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 80px;
  line-height: 1;
  color: var(--rd-primary);
  text-transform: uppercase;
  text-shadow: 0 6px 18px rgba(0,0,0,.55), 0 2px 0 rgba(255,255,255,.15);
}
.ann-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--rd-secondary);
  background-image: linear-gradient(135deg, transparent 0%, rgba(255,255,255,.30) 100%);
  color: var(--rd-bg);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .12em;
  padding: 10px 32px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4);
  text-transform: uppercase;
}

/* ===== Row centrale : teams + VS ===== */
.ann-vs-row {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 40px 40px 0;
  gap: 0;
}
.ann-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}
.ann-team-label {
  font-family: 'Anton', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .35em;
  text-transform: uppercase;
  padding: 6px 22px;
  border-radius: 999px;
  border: 2px solid currentColor;
}
.ann-team-home .ann-team-label { color: var(--rd-primary); }
.ann-team-away .ann-team-label { color: var(--rd-secondary); }

.ann-team-logo-wrap {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ann-team-home .ann-team-logo-wrap {
  box-shadow:
    0 0 0 8px var(--rd-bg),
    0 0 0 16px var(--rd-primary),
    0 18px 40px rgba(0,0,0,.55),
    inset 0 0 0 4px rgba(255,255,255,.5);
}
.ann-team-away .ann-team-logo-wrap {
  box-shadow:
    0 0 0 8px var(--rd-bg),
    0 0 0 16px var(--rd-secondary),
    0 18px 40px rgba(0,0,0,.55),
    inset 0 0 0 4px rgba(255,255,255,.5);
}
.ann-team-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.ann-team-logo-ph {
  font-size: 110px;
  background: transparent;
  color: var(--rd-bg);
}
.ann-team-name {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 40px;
  text-align: center;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: white;
  line-height: 1.05;
  max-width: 380px;
  text-shadow: 0 3px 8px rgba(0,0,0,.7);
}

/* ===== VS central : hexagone double anneau ===== */
.ann-vs {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.55));
}
.ann-vs::before {
  content: '';
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.18) 0%, transparent 65%);
  z-index: -1;
}
.ann-vs-hex {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ann-hex-outer { fill: var(--rd-secondary); }
.ann-hex-inner { fill: var(--rd-primary); stroke: var(--rd-bg); stroke-width: 3; }
.ann-vs-text {
  position: relative;
  font-family: 'Anton', 'Bowlby One', sans-serif;
  font-weight: 900;
  font-size: 120px;
  color: var(--rd-bg);
  letter-spacing: -.02em;
  z-index: 1;
  line-height: 1;
}

/* ===== Footer (date + heure HERO) ===== */
.ann-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 40px 50px;
  text-align: center;
}
.ann-journee-pill {
  font-family: 'Anton', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--rd-bg);
  background: var(--rd-primary);
  padding: 8px 32px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.4), inset 0 -3px 0 rgba(0,0,0,.18);
  text-transform: uppercase;
}
.ann-date-hero {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 72px;
  letter-spacing: .03em;
  color: white;
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 4px 14px rgba(0,0,0,.65);
  padding-bottom: 8px;
  border-bottom: 6px solid var(--rd-secondary);
  margin-bottom: 4px;
}
.ann-heure-hero {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--rd-secondary);
  color: var(--rd-bg);
  padding: 10px 40px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.ann-heure-icon {
  font-size: 40px;
  line-height: 1;
}
.ann-heure-val {
  font-family: 'Anton', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 56px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

/* === Écran de connexion === */
.login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
  z-index: 1000;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.login-card label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--slate-700);
  margin: .6rem 0 .25rem;
}
.login-card input {
  padding: .65rem .8rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--slate-900);
}
.login-card input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-50);
}
.login-submit { margin-top: 1.2rem; justify-content: center; }
.login-error {
  color: var(--red);
  background: var(--red-50);
  border-radius: 8px;
  padding: .5rem .7rem;
  margin: .8rem 0 0;
  font-size: .85rem;
}
.logout-btn { color: var(--slate-600); }
.logout-btn:hover:not(:disabled) { color: var(--red); border-color: var(--red); }
.user-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--slate-700);
  padding: .3rem .6rem;
  background: var(--slate-100);
  border-radius: 999px;
}
.role-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--white);
  background: var(--orange);
  padding: .1rem .4rem;
  border-radius: 6px;
}
.user-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.user-create-form input,
.user-create-form select {
  padding: .55rem .7rem;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--slate-900);
}
.user-create-form input { min-width: 180px; }

/* ============================================================
   TOURNOIS — visuel journée (feuille de pointage MOJA)
   ============================================================ */

/* --- Écran de validation --- */
.trn-edit-scroll { overflow-x: auto; }
.trn-edit-table { width: 100%; min-width: 780px; }
.trn-edit-table input { padding: 4px 6px; font-size: .85rem; }
.trn-edit-table td { vertical-align: middle; }
.trn-edit-table th, .trn-edit-table td { padding: .45rem .35rem; }
.trn-edit-player {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4px;
  min-width: 200px;
}
/* Les inputs remplissent leur colonne de grille au lieu de garder leur
   largeur intrinsèque (~170px) qui faisait déborder la table de la carte. */
.trn-edit-player input { width: 100%; min-width: 0; }
.trn-edit-clt { max-width: 4.5rem; }
.trn-edit-club { font-size: .78rem; }
.trn-row-excluded { opacity: .45; }
.trn-win-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1.1rem;
  filter: grayscale(1) opacity(.45);
  cursor: pointer;
  padding: 2px 6px;
}
.trn-win-btn.on {
  filter: none;
  border-color: var(--accent, #84cc16);
  background: rgba(132, 204, 22, .12);
}
.trn-mode-toggle { display: inline-flex; gap: 6px; }

/* --- Saisie des scores (tournois) --- */
.trn-scores-table td { vertical-align: middle; }
.trn-scores-table input { padding: 4px 6px; font-size: .9rem; }
.trn-sc-right { text-align: right; }
.trn-sc-won { color: #4d7c0f; }

/* --- Le visuel 1080×1080 ---
   Les tailles de la zone matchs sont multipliées par --ts (1 par défaut) :
   le JS mesure le débordement après rendu et abaisse --ts pour que tous les
   matchs tiennent dans le cadre, quel que soit leur nombre. */
.trn-design {
  --rd-primary: #84cc16;
  --rd-secondary: #fbbf24;
  --rd-bg: #0a1f3d;
  --ts: 1;
  width: 1080px;
  height: 1080px;
  position: relative;
  color: white;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 48px 32px;
  box-sizing: border-box;
  background-color: var(--rd-bg);
  /* --trn-bg-image : image uploadée + voile couleur (cf. tournoiColorVars) */
  background-image: var(--trn-bg-image, linear-gradient(135deg,
    transparent 0%,
    rgba(255,255,255,.06) 50%,
    transparent 100%));
  background-size: cover;
  background-position: center;
  transform: scale(.5);
  transform-origin: top left;
}

.trn-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.trn-kicker {
  font-family: 'Anton', sans-serif;
  font-size: 30px;
  letter-spacing: .28em;
  color: var(--rd-secondary);
  text-transform: uppercase;
}
.trn-title {
  font-family: 'Bowlby One', 'Anton', sans-serif;
  font-size: 96px;
  line-height: .95;
  color: var(--rd-primary);
  text-shadow:
    4px 4px 0 var(--rd-secondary),
    8px 8px 0 rgba(0,0,0,.40);
  font-style: italic;
  transform: skewX(-8deg);
  margin: 6px 0 10px;
}
/* Différenciation des modes : titre PROGRAMME aux couleurs inversées
   (secondaire + ombre primaire), RÉSULTATS garde primaire + ombre secondaire. */
.trn-mode-programme .trn-title {
  color: var(--rd-secondary);
  text-shadow:
    4px 4px 0 var(--rd-primary),
    8px 8px 0 rgba(0,0,0,.40);
}
.trn-date {
  font-family: 'Anton', sans-serif;
  font-size: 38px;
  letter-spacing: .06em;
  color: white;
}
.trn-header-right { flex-shrink: 0; margin-left: 24px; }
.trn-logo, .trn-ball-svg {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.40));
}
.trn-tournoi-name {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  border-bottom: 3px solid var(--rd-primary);
  padding-bottom: 14px;
  margin-top: 4px;
}

.trn-matches {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--ts) * 14px);
  margin-top: 18px;
  min-height: 0;
}
.trn-match {
  display: grid;
  grid-template-columns: calc(var(--ts) * 135px) minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: calc(var(--ts) * 14px) calc(var(--ts) * 22px);
  gap: 0 14px;
}
.trn-mtime {
  text-align: center;
  border-right: 2px solid rgba(255,255,255,.18);
  padding-right: 12px;
}
.trn-mheure {
  font-family: 'Anton', sans-serif;
  font-size: calc(var(--ts) * 34px);
  color: var(--rd-secondary);
  line-height: 1.05;
}
.trn-mepreuve {
  font-size: calc(var(--ts) * 17px);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-top: 3px;
}
.trn-player { min-width: 0; }
.trn-player-a { text-align: right; }
.trn-player-b { text-align: left; }
.trn-pname {
  font-weight: 700;
  font-size: calc(var(--ts) * 27px);
  line-height: 1.15;
  overflow-wrap: break-word;
}
.trn-player.won .trn-pname { color: var(--rd-primary); font-weight: 800; }
.trn-player.lost { opacity: .55; }
.trn-pclass {
  font-size: calc(var(--ts) * 18px);
  font-weight: 600;
  color: rgba(255,255,255,.60);
  background: rgba(255,255,255,.10);
  border-radius: 8px;
  padding: 1px 8px;
  vertical-align: 2px;
}
.trn-pclub {
  font-size: calc(var(--ts) * 17px);
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trn-cup { font-size: calc(var(--ts) * 24px); }
.trn-mcenter { text-align: center; min-width: calc(var(--ts) * 110px); padding: 0 10px; }
.trn-mvs {
  font-family: 'Bowlby One', 'Anton', sans-serif;
  font-size: calc(var(--ts) * 30px);
  color: var(--rd-secondary);
  opacity: .9;
}
.trn-mscore {
  font-family: 'Anton', sans-serif;
  font-size: calc(var(--ts) * 31px);
  letter-spacing: .03em;
  color: white;
  white-space: nowrap;
}
.trn-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  font-size: 25px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  border-top: 3px solid var(--rd-primary);
  padding-top: 16px;
  margin-top: 16px;
}
.trn-footer-lieu { color: var(--rd-secondary); }

/* --- Densités : point de départ selon le nombre de matchs affichés
   (l'auto-ajustement --ts affine ensuite si ça déborde) --- */
.trn-density-xl .trn-matches { gap: calc(var(--ts) * 22px); }
.trn-density-xl .trn-match { padding: calc(var(--ts) * 24px) calc(var(--ts) * 26px); }
.trn-density-xl .trn-mheure { font-size: calc(var(--ts) * 42px); }
.trn-density-xl .trn-mepreuve { font-size: calc(var(--ts) * 20px); }
.trn-density-xl .trn-pname { font-size: calc(var(--ts) * 34px); }
.trn-density-xl .trn-pclass { font-size: calc(var(--ts) * 21px); }
.trn-density-xl .trn-pclub { font-size: calc(var(--ts) * 20px); }
.trn-density-xl .trn-mvs { font-size: calc(var(--ts) * 38px); }
.trn-density-xl .trn-mscore { font-size: calc(var(--ts) * 38px); }
.trn-density-xl .trn-cup { font-size: calc(var(--ts) * 30px); }

.trn-density-lg .trn-matches { gap: calc(var(--ts) * 16px); }
.trn-density-lg .trn-match { padding: calc(var(--ts) * 18px) calc(var(--ts) * 24px); }
.trn-density-lg .trn-mheure { font-size: calc(var(--ts) * 38px); }
.trn-density-lg .trn-pname { font-size: calc(var(--ts) * 30px); }
.trn-density-lg .trn-mvs, .trn-density-lg .trn-mscore { font-size: calc(var(--ts) * 34px); }

.trn-density-sm .trn-matches { gap: calc(var(--ts) * 8px); }
.trn-density-sm .trn-match { padding: calc(var(--ts) * 7px) calc(var(--ts) * 18px); border-radius: 12px; }
.trn-density-sm .trn-mheure { font-size: calc(var(--ts) * 26px); }
.trn-density-sm .trn-mepreuve { font-size: calc(var(--ts) * 14px); }
.trn-density-sm .trn-pname { font-size: calc(var(--ts) * 21px); }
.trn-density-sm .trn-pclass { font-size: calc(var(--ts) * 14px); }
.trn-density-sm .trn-pclub { font-size: calc(var(--ts) * 13px); margin-top: 1px; }
.trn-density-sm .trn-mvs { font-size: calc(var(--ts) * 22px); }
.trn-density-sm .trn-mscore { font-size: calc(var(--ts) * 23px); }
.trn-density-sm .trn-cup { font-size: calc(var(--ts) * 17px); }
.trn-density-sm .trn-title { font-size: 76px; }

/* --- Pagination du visuel tournoi --- */
.trn-page-nav { display: inline-flex; align-items: center; gap: 6px; }
.trn-page-nav button { min-width: 2rem; }
.trn-page-label { font-weight: 600; white-space: nowrap; }
.trn-footer-right { display: inline-flex; align-items: center; gap: 18px; }
.trn-page-ind {
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 3px 14px;
  letter-spacing: .08em;
}

.trn-psize { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.trn-psize select { padding: 4px 6px; }

/* ============================================================
   ACCUEIL — tableau de bord
   ============================================================ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 1.6rem;
}
.dash-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 10px;
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.dash-stat:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-1px); }
.dash-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent, #65a30d);
  line-height: 1.1;
}
.dash-stat-label { font-size: .8rem; color: var(--slate-500, #64748b); }
.dash-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.6rem;
}
.dash-col h3 { margin-bottom: .6rem; }
.dash-col table td { padding: .4rem .5rem; }
.dash-date { white-space: nowrap; color: var(--slate-500, #64748b); font-size: .85rem; }
.dash-vs { color: var(--slate-400, #94a3b8); font-size: .8rem; margin: 0 .15rem; }
.dash-actions { white-space: nowrap; text-align: right; }
.dash-actions a { cursor: pointer; margin-left: .4rem; }

/* --- Accueil v2 : bandeau + sections --- */
.dash-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 1.8rem;
}
.dash-info {
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 12px;
  padding: 12px 16px;
}
.dash-info-connect { cursor: pointer; }
.dash-info-connect:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.dash-info-title { font-weight: 700; margin-bottom: .35rem; }
.dash-info-list { margin: 0; padding-left: 1.1rem; }
.dash-info-list li { margin: .15rem 0; }
.dash-info-list a { cursor: pointer; font-weight: 600; }
.dash-info-empty { color: var(--slate-500, #64748b); margin: 0; line-height: 1.5; }
.dash-section { margin-bottom: 2rem; }
.dash-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--slate-200, #e2e8f0);
  padding-bottom: .5rem;
  margin-bottom: .9rem;
}
.dash-section-head h3 { margin: 0; flex-shrink: 0; }
.dash-section-head button { margin-left: auto; }
.dash-champ-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dash-chip { cursor: pointer; }
.dash-col h4 { margin: 0 0 .5rem; font-size: .95rem; color: var(--slate-600, #475569); }

/* --- Fichier du tournoi (import Liste des matchs) --- */
.trn-file-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: .6rem 0; }
.trn-import-btn { background: var(--accent, #65a30d); color: white; border-color: var(--accent, #65a30d); }
.trn-import-btn:hover { filter: brightness(1.05); }
.trn-maj { font-size: .88rem; color: var(--slate-600, #475569); }
.trn-maj.stale { color: #b45309; font-weight: 600; }
.trn-today-row { background: rgba(132, 204, 22, .10); }
.trn-today-row td:first-child { border-left: 3px solid var(--accent, #65a30d); }

/* --- Navigateur de journées --- */
.trn-daynav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: .4rem 0 1rem;
}
.trn-daynav-btn {
  min-width: 2.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  padding: .45rem 0;
}
.trn-daysel {
  font-size: 1.05rem;
  font-weight: 700;
  padding: .45rem .8rem;
  text-align: center;
  min-width: 300px;
}
.trn-daycard {
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 12px;
  padding: 14px 18px;
  max-width: 760px;
  margin: 0 auto;
}
.trn-daycard.today { border-color: var(--accent, #65a30d); box-shadow: 0 0 0 2px rgba(132, 204, 22, .18); }
.trn-daycard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: .5rem;
}
.trn-daycard-head a.danger { cursor: pointer; }
.trn-daycard-table { width: 100%; }
.trn-daycard-table td { padding: .35rem .5rem; }
.trn-daycard-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: .9rem;
  border-top: 1px solid var(--slate-200, #e2e8f0);
  padding-top: .9rem;
}

/* ============================================================
   PODIUMS — visuel de fin de tournoi
   ============================================================ */
.pod-edit-table input { padding: 4px 6px; font-size: .85rem; width: 100%; box-sizing: border-box; }
.pod-edit-table td { vertical-align: middle; }

.pod-grid {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px;
  margin-top: 22px;
  align-content: center;
  min-height: 0;
}
.pod-card {
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 22px 26px;
}
.pod-epreuve {
  font-family: 'Anton', sans-serif;
  font-size: 27px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--rd-secondary);
  border-bottom: 2px solid rgba(255,255,255,.18);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.pod-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 700;
  font-size: 25px;
  margin: 9px 0;
}
.pod-line .pod-medal { font-size: 28px; flex-shrink: 0; }
.pod-line.pod-1 { font-size: 30px; }
.pod-line.pod-1 .pod-nom { color: #ffd76a; }
.pod-line.pod-2 .pod-nom { color: #e3e6ea; }
.pod-line.pod-3 .pod-nom { color: #e8a86e; }
.pod-line .pod-nom { overflow-wrap: break-word; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,.35); }

/* 5-6 épreuves : resserre */
.pod-compact .pod-grid { gap: 12px; margin-top: 14px; }
.pod-compact .pod-card { padding: 14px 20px; }
.pod-compact .pod-epreuve { font-size: 21px; padding-bottom: 6px; margin-bottom: 8px; }
.pod-compact .pod-line { font-size: 20px; margin: 5px 0; }
.pod-compact .pod-line.pod-1 { font-size: 24px; }
.pod-compact .pod-line .pod-medal { font-size: 22px; }

/* --- Vrais logos FB/IG (data-URI) pour les indicateurs de publication --- */
.icon-fb, .icon-ig {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  background-size: contain;
  background-repeat: no-repeat;
}
.icon-fb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z' fill='%231877F2'/%3E%3C/svg%3E"); }
.icon-ig { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='100%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23fdc468'/%3E%3Cstop offset='25%25' stop-color='%23fa7e1e'/%3E%3Cstop offset='50%25' stop-color='%23d62976'/%3E%3Cstop offset='75%25' stop-color='%23962fbf'/%3E%3Cstop offset='100%25' stop-color='%234f5bd5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='2' y='2' width='20' height='20' rx='5' fill='url(%23g)'/%3E%3Ccircle cx='12' cy='12' r='4.5' fill='none' stroke='white' stroke-width='2'/%3E%3Ccircle cx='17.5' cy='6.5' r='1.2' fill='white'/%3E%3C/svg%3E"); }

/* --- Personnalisation des visuels (modale tournoi) --- */
.trn-perso-toggles { display: flex; gap: 22px; flex-wrap: wrap; margin-top: .5rem; }
.trn-perso-toggles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.trn-fond-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trn-fond-preview {
  height: 52px;
  width: 92px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--slate-200, #e2e8f0);
}
.trn-voile-label { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; white-space: nowrap; }
.trn-voile-label input[type=range] { width: 140px; }

/* --- Sous-navigation du groupe Championnats --- */
.subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.subtabs button {
  background: white;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 999px;
  padding: .45rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--slate-600, #475569);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.subtabs button:hover { border-color: var(--accent, #65a30d); color: var(--accent, #65a30d); }
.subtabs button.active {
  background: var(--accent, #65a30d);
  border-color: var(--accent, #65a30d);
  color: white;
}

/* --- Format Story (1080×1920) --- */
.design-wrapper-story { height: 960px !important; }
.trn-design.trn-story {
  height: 1920px;
  padding: 60px 52px 44px;
}
.trn-story .trn-title { font-size: 110px; }
.trn-story .trn-matches { gap: calc(var(--ts) * 24px); }
.trn-story .trn-footer { font-size: 28px; }
.trn-story .pod-grid { grid-template-columns: 1fr; align-content: center; gap: 26px; }

/* --- Programmation de publication (modale) --- */
.publish-when { display: flex; flex-direction: column; gap: 6px; }
.publish-when-opt { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.publish-when-opt input[type=datetime-local] { padding: 4px 8px; }

/* ============================================================
   BILAN DE SAISON — visuel championnat
   ============================================================ */
.bln-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  margin: 26px 0 10px;
}
.bln-stat, .bln-position { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bln-stat-num {
  font-family: 'Anton', sans-serif;
  font-size: 96px;
  line-height: 1;
  color: var(--rd-primary);
}
.bln-stat-num.bln-def { color: rgba(255,255,255,.75); }
.bln-stat-label { font-size: 24px; font-weight: 700; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .06em; }
.bln-position {
  background: rgba(255,255,255,.10);
  border: 3px solid var(--rd-secondary);
  border-radius: 20px;
  padding: 16px 30px 12px;
}
.bln-pos-num {
  font-family: 'Anton', sans-serif;
  font-size: 84px;
  line-height: 1;
  color: var(--rd-secondary);
}
.bln-pos-num sup { font-size: 34px; }
.bln-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 34px;
  margin-top: 16px;
  min-height: 0;
  align-content: start;
}
.bln-col-title {
  font-family: 'Anton', sans-serif;
  font-size: 30px;
  letter-spacing: .05em;
  color: var(--rd-secondary);
  border-bottom: 2px solid rgba(255,255,255,.18);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.bln-ligne {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 24px;
  font-weight: 600;
  margin: 7px 0;
}
.bln-res { font-weight: 800; width: 28px; text-align: center; }
.bln-V .bln-res { color: var(--rd-primary); }
.bln-D { opacity: .65; }
.bln-D .bln-res { color: #f87171; }
.bln-score { font-family: 'Anton', sans-serif; letter-spacing: .04em; min-width: 74px; }
.bln-adv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bln-joueur {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin: 9px 0;
}
.bln-jstat { color: var(--rd-primary); font-family: 'Anton', sans-serif; font-size: 22px; white-space: nowrap; }
.trn-story .bln-body { grid-template-columns: 1fr; align-content: center; gap: 44px; }
.trn-story .bln-hero { margin-top: 40px; }

/* --- Aperçu du voile sur la vignette de fond --- */
.trn-fond-preview-wrap { position: relative; display: inline-block; line-height: 0; }
.trn-fond-voile {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
}

/* --- Alignement noms + classements sur les visuels tournoi ---
   Chaque cellule joueur = [nom (1-2 lignes)] + [colonne classement fixe] :
   les classements forment une colonne alignée de part et d'autre du centre,
   quelle que soit la longueur des noms. */
.trn-prow {
  display: flex;
  align-items: center;
  gap: calc(var(--ts) * 10px);
  min-width: 0;
}
.trn-player-a .trn-prow { justify-content: flex-end; }
.trn-player-b .trn-prow { flex-direction: row-reverse; justify-content: flex-end; }
.trn-prow .trn-pname { min-width: 0; }
.trn-player-a .trn-pname { text-align: right; }
.trn-player-b .trn-pname { text-align: left; }
.trn-pclass {
  flex: 0 0 auto;
  min-width: calc(var(--ts) * 64px);
  text-align: center;
}
.trn-pclass-vide { visibility: hidden; }

/* Visuel Résultats : horaires et VS dans la couleur du titre (primaire) —
   sur le Programme ils restent en secondaire, comme son titre inversé. */
.trn-mode-resultats .trn-mheure,
.trn-mode-resultats .trn-mvs { color: var(--rd-primary); }
/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   THÃˆME CLUB â€” US Le Luart Tennis (interface sombre marine, accents bleu/orange)
   Couche de surcharge : ne touche PAS aux classes des affiches gÃ©nÃ©rÃ©es
   (.result-design, .annonce-design, .trn-design, .pod-*, .bln-*).
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

:root,
html[data-theme="clair"] :is(.design-wrapper, .tv, .champ-demo-wrap) {
  /* Palette applicative (thème sombre). Les visuels (affiches, mode TV, aperçus) la gardent quel que soit
     le thème choisi : ils doivent sortir identiques pour tout le monde. */
  --accent-txt: #7fd0f5;
  --champ-bg:  #0d1929;
  --topbar-bg: rgba(10, 20, 36, .82);
  --bg:        #0a1424;
  --surface:   #101d31;
  --surface-2: #16263e;
  --surface-3: #1d3049;
  --border:    #223752;
  --border-2:  #2d4666;
  --text:      #e9eff8;
  --accent:    #19a5e1;
  --accent-soft: rgba(25, 165, 225, .14);
  --cta-1:     #e17319;
  --cta-2:     #f59a3e;

  /* Remappage des anciens jetons (toutes les rÃ¨gles existantes basculent) */
  --slate-900: #e9eff8;
  --slate-700: #c6d3e4;
  --slate-600: #9db0c9;
  --slate-500: #8095b1;
  --slate-400: #5f7691;
  --slate-300: #2d4666;
  --slate-200: #223752;
  --slate-100: #16263e;
  --slate-50:  #101d31;
  --green-900: #cfe9f9;
  --green-700: #55bdea;
  --green-600: #19a5e1;
  --green-500: #19a5e1;
  --green-50:  #12283f;
  --orange:    #f59a3e;
  --orange-50: #2b1d10;
  --red:       #ff7b6b;
  --red-50:    #331a17;
  --shadow-sm: 0 1px 2px rgba(2, 8, 18, .5);
  --shadow-md: 0 6px 18px rgba(2, 8, 18, .45);
  --shadow-lg: 0 16px 40px rgba(2, 8, 18, .5);
}

/* â”€â”€ Fond gÃ©nÃ©ral : marine profond + halos colorÃ©s discrets (rÃ©f. maquette) â”€â”€ */
body {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(25, 165, 225, .16), transparent 60%),
    radial-gradient(820px 460px at 96% 14%, rgba(225, 115, 25, .10), transparent 55%),
    radial-gradient(700px 520px at 55% 108%, rgba(18, 73, 145, .28), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

/* â”€â”€ Barre supÃ©rieure â”€â”€ */
.topbar {
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  padding: .7rem 2rem;
}
.brand { font-size: 1.06rem; letter-spacing: .01em; }
.brand strong { font-weight: 700; }
.ball { width: 22px; height: 22px; animation: none; }
.subtitle {
  color: var(--slate-500);
  border-left-color: var(--border-2);
}
.tabs { gap: .3rem; }
.tabs button {
  color: var(--slate-600);
  font-weight: 500;
  padding: .48rem 1rem;
  border-radius: 999px;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active {
  background: var(--accent-soft);
  color: var(--accent-txt);
  border-color: rgba(25, 165, 225, .35);
  box-shadow: none;
  font-weight: 600;
}
.user-chip {
  color: var(--slate-600);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .82rem;
}
.role-badge {
  background: var(--accent-soft);
  color: var(--accent-txt);
  border-radius: 6px;
  padding: .05rem .4rem;
  margin-left: .45rem;
  font-size: .72rem;
}
.logout-btn {
  background: transparent;
  border-color: transparent;
  color: var(--slate-500);
}
.logout-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); color: var(--text); }

/* â”€â”€ Cartes & sections â”€â”€ */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 120px), var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
h2 { color: var(--text); font-size: 1.45rem; font-weight: 700; letter-spacing: -.015em; }
h3 { color: var(--text); font-weight: 650; }
h4 {
  color: var(--slate-500);
  font-size: .8rem;
  letter-spacing: .09em;
  border-bottom: 1px solid var(--border);
}
a { color: var(--accent); }
a:hover { color: #5cc2ee; }
a.danger { color: var(--red); }
a.danger:hover { color: #ff9a8d; }
.dash-section-head {
  border-bottom: 1px solid var(--border);
}
.dash-section-head h3 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
}

/* â”€â”€ Formulaires â”€â”€ */
input, select, textarea {
  color: var(--text);
}
.content input, .content select, .content textarea,
.modal input, .modal select, .modal textarea,
.field input, .field select,
.rencontres-toolbar .field select, .btn-refresh {
  background: var(--champ-bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: 10px;
}
.content input::placeholder, .modal input::placeholder { color: var(--slate-400); }
.content input:focus, .content select:focus, .content textarea:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 165, 225, .18);
  background: var(--champ-bg);
}
input[type="color"] { padding: 2px; background: var(--champ-bg); height: 2.2rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); }
fieldset.modal-colors {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.015);
}
fieldset.modal-colors legend {
  color: var(--slate-500);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 .5rem;
}

/* â”€â”€ Boutons â”€â”€ */
button {
  background: var(--surface-2);
  color: var(--slate-700);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  font-weight: 550;
}
button:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: #3a577c;
  color: var(--text);
}
button.primary, a.primary.button, .trn-import-btn {
  background: linear-gradient(135deg, var(--cta-1), var(--cta-2));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(225, 115, 25, .28);
}
button.primary:hover:not(:disabled), a.primary.button:hover, .trn-import-btn:hover {
  background: linear-gradient(135deg, #ef8226, #f8ab58);
  filter: none;
  box-shadow: 0 6px 18px rgba(225, 115, 25, .38);
}
.btn-file {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--slate-700);
  border-radius: 10px;
}
.btn-file:hover { background: var(--surface-3); color: var(--text); }
.btn-mini { background: var(--surface-2); border: 1px solid var(--border-2); color: var(--slate-600); }
.dz-clear { background: var(--surface-3); color: var(--slate-600); border-color: var(--border-2); }

/* â”€â”€ Tableaux â”€â”€ */
.card table { border-color: var(--border); }
thead th, .card th {
  background: transparent !important;
  color: var(--slate-500) !important;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--border-2) !important;
}
.card td { border-color: var(--border) !important; }
tbody tr:hover { background: rgba(25, 165, 225, .05); }

/* â”€â”€ Badges & puces â”€â”€ */
.badge {
  background: var(--surface-3);
  color: var(--slate-700);
  border: 1px solid var(--border-2);
}
.badge-saison { background: var(--accent-soft); color: var(--accent-txt); border-color: rgba(25,165,225,.3); }
.color-chip { border: 1px solid var(--border-2); }
.dash-chip:hover { border-color: var(--accent); color: var(--accent-txt); }

/* â”€â”€ Sous-navigation (groupe Championnats) â”€â”€ */
.subtabs { margin-bottom: 1.2rem; }
.subtabs button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--slate-600);
}
.subtabs button:hover { border-color: var(--accent); color: var(--accent-txt); background: transparent; }
.subtabs button.active {
  background: var(--accent-soft);
  border-color: rgba(25, 165, 225, .4);
  color: var(--accent-txt);
}

/* â”€â”€ Accueil : cartes du bandeau â”€â”€ */
.dash-top { gap: 14px; }
.dash-info {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)), var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.dash-info::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: .8;
}
.dash-info:nth-child(2)::before { background: linear-gradient(90deg, var(--cta-2), transparent 70%); }
.dash-info:nth-child(3)::before { background: linear-gradient(90deg, var(--accent-txt), transparent 70%); }
.dash-info-title {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
  margin-bottom: .5rem;
}
.dash-info-empty { color: var(--slate-600); }
.dash-info-connect:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.dash-stat { background: var(--surface-2); border-color: var(--border); }
.dash-date { color: var(--slate-500); }
.dash-vs { color: var(--slate-400); }

/* â”€â”€ Ã‰cran tournoi : navigateur de journÃ©e & carte du jour â”€â”€ */
.trn-daysel {
  background: var(--champ-bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-weight: 650;
}
.trn-daynav-btn { border-radius: 10px; }
.trn-daycard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.trn-daycard.today {
  border-color: rgba(25, 165, 225, .5);
  box-shadow: 0 0 0 3px rgba(25, 165, 225, .12);
}
.trn-daycard-actions { border-top-color: var(--border); }
.trn-today-row { background: rgba(25, 165, 225, .07); }
.trn-today-row td:first-child { border-left-color: var(--accent); }
.trn-maj { color: var(--slate-600); }
.trn-maj.stale { color: var(--cta-2); }
.trn-sc-won { color: #6fe0a8; }
.trn-win-btn.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.trn-fond-preview { border-color: var(--border-2); }

/* â”€â”€ Zones de dÃ©pÃ´t / import â”€â”€ */
.dropzone {
  background: rgba(255, 255, 255, .015);
  border: 1.5px dashed var(--border-2);
  border-radius: 14px;
}
.dropzone.active { border-color: var(--accent); background: var(--accent-soft); }
.dz-file { background: var(--surface-2); border: 1px solid var(--border); }
.dz-file.ok { border-color: rgba(25, 165, 225, .45); }
.dz-hint { color: var(--slate-600); }

/* â”€â”€ Choix championnat (cartes) â”€â”€ */
.champ-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--slate-700);
}
.champ-card:hover { border-color: var(--border-2); }
.champ-card.selected {
  background: var(--accent-soft);
  border-color: rgba(25, 165, 225, .45);
  color: var(--text);
}
.champ-card.no-champ, .champ-card.empty { background: transparent; }

/* â”€â”€ Messages & Ã©tats â”€â”€ */
.note {
  background: rgba(25, 165, 225, .07);
  border-left: 3px solid rgba(25, 165, 225, .5);
  color: var(--slate-700);
  border-radius: 8px;
  padding: .6rem .9rem;
}
.hint { color: var(--slate-500); }
.error {
  background: var(--red-50);
  color: var(--red);
  border: 1px solid rgba(255, 123, 107, .3);
  border-radius: 10px;
  padding: .55rem .8rem;
}
.success-inline { color: #6fe0a8; }
.pending-import-banner {
  background: rgba(225, 115, 25, .1);
  border: 1px solid rgba(225, 115, 25, .35);
  color: var(--text);
  border-radius: 12px;
}
.meta-status-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.meta-status-card.ok { border-color: rgba(25, 165, 225, .3); }
.meta-status-card.ko { border-color: rgba(225, 115, 25, .4); }
.meta-status-sub { color: var(--slate-500); }

/* â”€â”€ Modales â”€â”€ */
.modal-backdrop { background: rgba(4, 10, 20, .72); backdrop-filter: blur(3px); }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.modal-header { border-bottom: 1px solid var(--border); }
.modal-header h3 { color: var(--text); }
.modal-close { background: transparent; border: none; color: var(--slate-500); }
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-footer { border-top: 1px solid var(--border); }
.publish-caption { background: var(--champ-bg) !important; }
.publish-success h4 { color: var(--text); }
.result-ok { color: var(--slate-700); }
.result-ko { color: var(--red); }
.pt-sub { color: var(--slate-500); }
.pt-sub.warn { color: var(--cta-2); }

/* â”€â”€ Connexion â”€â”€ */
.login-overlay {
  background:
    radial-gradient(900px 480px at 15% 0%, rgba(25, 165, 225, .16), transparent 60%),
    radial-gradient(800px 460px at 95% 100%, rgba(225, 115, 25, .12), transparent 55%),
    var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.login-card label { color: var(--slate-600); }
.login-card input {
  background: var(--champ-bg);
  border: 1px solid var(--border-2);
  color: var(--text);
}
.login-error { color: var(--red); }

/* â”€â”€ Divers chrome â”€â”€ */
.settings-row input { background: var(--champ-bg); border-color: var(--border-2); color: var(--text); }
.bookmarklet-link {
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  color: var(--accent);
  border-radius: 10px;
  padding: .5rem .9rem;
  display: inline-block;
}
.standing-row.beyond { opacity: .5; }
.status-pending { color: var(--slate-500); }
.cal-help { color: var(--slate-500); }
hr { border-top-color: var(--border) !important; }

/* Barre de dÃ©filement discrÃ¨te */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }


/* Correctifs lisibilité tableaux (couleurs codées en dur dans les règles d'origine) */
.card td, .card table, tbody td { color: var(--slate-700); }
.card td strong, tbody td strong { color: var(--text); }
td a { color: var(--accent); }

/* Derniers restes du thème clair */
.content table, .modal table { background: transparent; }
.meta-status-card.ok, .meta-status-card.ko { background: var(--surface-2); }
.logo-thumb { border-radius: 10px; border: 1px solid var(--border-2); }

.modal .modal-field input, .modal .modal-field select, .modal .modal-field textarea,
.modal .modal-color-field input[type="text"], .modal .color-row input[type="text"] {
  background: var(--champ-bg);
  border-color: var(--border-2);
  color: var(--text);
}

/* ═══════════ ACCUEIL v3 — hero, indicateurs, fil d'activité ═══════════ */
.home-card { padding: 2.2rem 2.4rem; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 2rem;
  margin-bottom: 1.6rem;
  border-radius: 16px;
  background:
    radial-gradient(560px 220px at 0% 0%, rgba(25, 165, 225, .14), transparent 60%),
    radial-gradient(480px 240px at 100% 100%, rgba(225, 115, 25, .10), transparent 55%),
    var(--surface-2);
  border: 1px solid var(--border);
}
.hero-date {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.hero-title {
  margin: 0 0 .3rem;
  font-size: 1.9rem;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--text);
}
.hero-statut { color: var(--slate-600); margin: 0 0 1.1rem; font-size: .95rem; max-width: 560px; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero-right { flex-shrink: 0; }
.hero-logo-halo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(closest-side, rgba(25, 165, 225, .22), transparent);
}
.hero-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 6px 18px rgba(2, 8, 18, .6));
}

.home-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 1.8rem;
}
.kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
  transition: border-color .15s, transform .15s;
}
.kpi:hover { border-color: var(--border-2); transform: translateY(-1px); background: var(--surface-2); }
.kpi-num {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.1;
}
.kpi-alerte .kpi-num { color: var(--cta-2); }
.kpi-reseaux { display: inline-flex; gap: 8px; align-items: center; }
.kpi-reseaux .icon-fb, .kpi-reseaux .icon-ig { width: 22px; height: 22px; }
.kpi-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
}
.kpi-sub { font-size: .8rem; color: var(--slate-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.home-scheduled { margin: -0.6rem 0 1.6rem; display: flex; flex-direction: column; gap: 6px; }
.home-scheduled-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: .55rem .9rem;
  background: rgba(225, 115, 25, .07);
  border: 1px solid rgba(225, 115, 25, .25);
  border-radius: 10px;
  font-size: .88rem;
}
.home-scheduled-item .feed-side { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }

.home-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 2rem;
  margin-bottom: 1.6rem;
}
.home-col-title {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--slate-500);
  padding-bottom: .55rem;
  margin-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .65rem .2rem;
  border-bottom: 1px solid rgba(34, 55, 82, .55);
}
.feed-item:last-child { border-bottom: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-v { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, .5); }
.dot-d { background: #f87171; }
.dot-n { background: var(--accent); }
.feed-corps { display: flex; flex-direction: column; min-width: 0; }
.feed-titre { color: var(--slate-700); font-weight: 550; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-time { color: var(--slate-500); font-size: .78rem; }
.feed-side { margin-left: auto; flex-shrink: 0; font-size: .85rem; }
.feed-date-pill {
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
  padding: .3rem .45rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-txt);
  font-weight: 700;
  font-size: .8rem;
}
.home-vide { color: var(--slate-500); font-size: .9rem; }

.home-tournoi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.4rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(420px 130px at 100% 0%, rgba(25, 165, 225, .10), transparent 60%),
    var(--surface-2);
  margin-bottom: .8rem;
}
.home-tournoi-nom { font-weight: 700; color: var(--text); font-size: 1.02rem; display: block; }
.badge-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  animation: pulse-live 1.8s ease-in-out infinite;
}
@keyframes pulse-live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 720px) {
  .home-card { padding: 1.4rem; }
  .hero { flex-direction: column; align-items: flex-start; padding: 1.2rem 1.4rem; }
  .hero-right { display: none; }
}

/* Confirmation de suppression en 2 clics */
a.danger.confirming {
  color: #ff9a8d;
  font-weight: 700;
  text-decoration: underline;
  animation: conf-pulse 1s ease-in-out infinite;
}
@keyframes conf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ── Archivage (clôture de saison / tournois terminés) ── */
.champ-toolbar { gap: .6rem; align-items: center; flex-wrap: wrap; }
.archives-toggle {
  margin-left: auto;
  color: var(--slate-500);
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
}
.archives-toggle:hover { color: var(--accent, #19a5e1); text-decoration: underline; }
button.confirming {
  background: #e17319 !important;
  border-color: #e17319 !important;
  color: #fff !important;
  animation: conf-pulse 1s ease-in-out infinite;
}

/* ── Sauvegardes de la base (Aide & Paramètres) ── */
.backup-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: .8rem 0 1rem;
}
.backups-table { margin-top: .4rem; }
.backups-table td, .backups-table th { padding: .45rem .7rem; }
.backup-name { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; }
.backup-picked { color: var(--slate-600); font-size: .88rem; }
.danger-solid {
  background: #b3363c;
  border: 1px solid #b3363c;
  color: #fff;
  border-radius: var(--radius-sm, 8px);
  padding: .55rem 1rem;
  cursor: pointer;
}
.danger-solid:hover { background: #cf4249; }
.danger-solid:disabled { opacity: .6; cursor: wait; }

/* ══ Bandeau partenaires sur les AFFICHES (couleurs fixes, hors thème) ══ */
.ptn-strip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  height: 84px;
  padding: 12px 48px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .94);
}
.ptn-logo {
  max-height: 58px;
  max-width: 180px;
  object-fit: contain;
  flex: 0 1 auto;
}
/* Réserve la place du bandeau dans chaque affiche */
.result-design.has-ptn { padding-bottom: 100px; }
.trn-design.has-ptn { padding-bottom: 104px; }
.annonce-design.has-ptn .ann-footer { padding-bottom: 120px; }

/* ── Gestion des partenaires (Aide & Paramètres) ── */
.ptn-table td { vertical-align: middle; }
.ptn-thumb-cell { width: 96px; }
.ptn-thumb {
  height: 40px;
  max-width: 84px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
}
.ptn-move a { padding: 0 .3rem; font-size: 1rem; cursor: pointer; }
.ptn-off td { opacity: .45; }
.ptn-off .ptn-thumb { filter: grayscale(1); }

/* ── Recherche globale (Accueil) ── */
.home-search-wrap { position: relative; margin: -0.4rem 0 1.4rem; }
.home-search {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--surface-2, #fff);
  border: 1px solid var(--border-2, var(--slate-300));
  border-radius: 999px;
  padding: .55rem 1.1rem;
}
.home-search:focus-within { border-color: var(--accent, #19a5e1); }
.home-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text, var(--slate-700));
  font-size: .95rem;
}
.search-ico { width: 18px; height: 18px; color: var(--slate-500); flex: 0 0 auto; }
.search-clear {
  color: var(--slate-500);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .2rem;
}
.search-clear:hover { color: var(--text, var(--slate-700)); }
.search-results {
  margin-top: .6rem;
  border: 1px solid var(--border-2, var(--slate-200));
  border-radius: 14px;
  padding: .5rem .9rem .7rem;
  background: var(--surface-2, #fff);
}
.search-group-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
  margin: .7rem 0 .3rem;
}
.search-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .4rem .4rem;
  border-radius: 10px;
  cursor: pointer;
}
.search-row:hover { background: var(--surface-3, var(--slate-100)); }
.sr-winner { color: var(--green-600, #84cc16); }

/* ── « Le week-end du club » (Accueil) ── */
.home-weekend { margin: 0 0 1.6rem; }
.weekend-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem;
  margin-top: .6rem;
}
.wk-card {
  border-radius: 16px;
  padding: 1rem 1.1rem .8rem;
  background: var(--surface-2, #fff);
  border: 1px solid var(--border-2, var(--slate-200));
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}
.wk-win { border-color: rgba(132, 204, 22, .5); background: linear-gradient(160deg, rgba(132, 204, 22, .12), transparent 55%) var(--surface-2, #fff); }
.wk-loss { border-color: rgba(225, 65, 65, .45); background: linear-gradient(160deg, rgba(225, 65, 65, .10), transparent 55%) var(--surface-2, #fff); }
.wk-trn { border-color: rgba(25, 165, 225, .45); background: linear-gradient(160deg, rgba(25, 165, 225, .12), transparent 55%) var(--surface-2, #fff); }
.wk-badge {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--slate-500);
}
.wk-win .wk-badge { color: var(--green-600, #65a30d); }
.wk-loss .wk-badge { color: #e05252; }
.wk-trn .wk-badge { color: var(--accent, #19a5e1); }
.wk-score {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text, var(--slate-800));
  display: flex;
  align-items: baseline;
  gap: .35rem;
}
.wk-sep { color: var(--slate-500); font-weight: 600; }
.wk-score-unit { font-size: .85rem; font-weight: 600; color: var(--slate-500); }
.wk-teams {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text, var(--slate-700));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.wk-meta { font-size: .78rem; color: var(--slate-500); }
.wk-foot { margin-top: .35rem; font-size: .85rem; }
.wk-pub { color: var(--green-600, #65a30d); font-weight: 600; }

/* ── Liens du club ── */
.club-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border, var(--slate-200));
}
.club-links-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
  margin-right: .3rem;
}
.club-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border-2, var(--slate-300));
  background: var(--surface-2, #fff);
  color: var(--text, var(--slate-700));
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.club-link:hover { border-color: var(--accent, #19a5e1); color: var(--accent, #19a5e1); }
.club-link .icon-fb, .club-link .icon-ig { width: 16px; height: 16px; }
.cl-ico { width: 16px; height: 16px; color: var(--slate-500); }
.club-links-aide { border-top: none; padding-top: 0; margin-top: .8rem; }
.cl-remove { font-size: 1.05rem; line-height: 1; padding-left: .1rem; }

.kpi-num-accent { color: #e17319 !important; }

/* ── Base joueurs du tournoi (Liste des joueurs MOJA) ── */
.trn-joueurs-block {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--border-2, var(--slate-200));
}
.trn-maj-warn { color: #e8a33d; }
.trn-joueurs-manquants .btn-file { border-color: #e8a33d; }

/* ── Synchronisation MOJA (écran tournoi) ── */
.trn-moja-block {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px dashed var(--border-2, var(--slate-200));
}
.trn-moja-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate-500);
}
/* ── Accueil « tableau de bord » ── */
.home-alerts { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.3rem 0 1.2rem; }
.home-alert {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem;
  border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-2, var(--slate-300)); color: var(--slate-600); background: var(--surface-2, #fff);
}
.home-alert.todo { border-color: rgba(225, 115, 25, .55); color: #f0a35c; background: rgba(225, 115, 25, .10); }
.home-alert.warn { border-color: rgba(225, 65, 65, .5); color: #ff9a8d; background: rgba(225, 65, 65, .10); }
.home-alert:hover { filter: brightness(1.15); }
.home-block { margin-bottom: 1.5rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .9rem; margin-top: .6rem; }
.team-card {
  border-radius: 16px; padding: 1rem 1.1rem .7rem; background: var(--surface-2, #fff);
  border: 1px solid var(--border-2, var(--slate-200)); display: flex; flex-direction: column; gap: .5rem; min-width: 0;
}
.trn-home-card { margin-top: .6rem; }
.team-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.team-id { min-width: 0; }
.team-nom { font-size: 1.05rem; font-weight: 800; color: var(--text, var(--slate-800)); }
.team-champ { font-size: .8rem; color: var(--slate-500); margin-top: .1rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.team-rank {
  display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; text-decoration: none;
  padding: .35rem .7rem; border-radius: 12px; background: var(--surface-3, var(--slate-100)); border: 1px solid var(--border-2, var(--slate-200));
}
.team-rank:hover { border-color: var(--accent, #19a5e1); }
.rank-pos { font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--text, var(--slate-800)); }
.rank-pos sup { font-size: .6rem; font-weight: 700; margin-left: 1px; }
.rank-1 .rank-pos { color: #fac056; } .rank-2 .rank-pos { color: #cfd8e3; } .rank-3 .rank-pos { color: #d29a5b; }
.rank-sub { font-size: .7rem; color: var(--slate-500); white-space: nowrap; }
.team-line { display: flex; align-items: center; gap: .6rem; font-size: .9rem; min-width: 0; }
.team-line.team-muted { color: var(--slate-500); }
.team-tag {
  flex: 0 0 auto; min-width: 66px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--slate-500); padding: .2rem .5rem; border-radius: 6px; background: var(--surface-3, var(--slate-100)); text-align: center;
}
.team-tag.res-V { color: #7ee08a; background: rgba(101, 196, 102, .14); }
.team-tag.res-D { color: #ff9a8d; background: rgba(225, 65, 65, .14); }
.team-tag.res-N { color: #fac056; background: rgba(250, 192, 86, .14); }
.team-txt { flex: 1 1 auto; min-width: 0; color: var(--text, var(--slate-700)); overflow: hidden; text-overflow: ellipsis; }
.team-soon { margin-left: .35rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #e17319; }
.team-act { flex: 0 0 auto; font-size: .85rem; font-weight: 600; cursor: pointer; }
.team-act-todo { color: #f0a35c; }
.team-standings { margin-top: .3rem; padding: .5rem .6rem; border-radius: 10px; background: var(--surface-3, var(--slate-100)); }
.standing { display: flex; align-items: center; gap: .6rem; font-size: .85rem; padding: .15rem 0; }
.standing.nous { font-weight: 800; color: var(--accent-txt); }
.st-pos { width: 1.4rem; text-align: right; color: var(--slate-500); }
.st-eq { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pts { font-variant-numeric: tabular-nums; }
.st-foot { margin-top: .3rem; font-size: .72rem; color: var(--slate-500); }
details.avance { margin-top: 2rem; border-top: 1px solid var(--border, var(--slate-200)); padding-top: 1rem; }
details.avance > summary { cursor: pointer; font-weight: 700; color: var(--slate-500); font-size: .95rem; list-style: none; }
details.avance > summary::before { content: "▸ "; }
details.avance[open] > summary::before { content: "▾ "; }

/* ── Publication libre : photos ── */
.photo-pick { margin-bottom: .6rem; }
.photo-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .5rem; }
.photo-thumb { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-2, var(--slate-300)); background: #0a1424; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: 15px; line-height: 22px; text-align: center; cursor: pointer;
}
.photo-del:hover { background: #b3363c; }
.badge-auto {
  display: inline-block; margin-left: .45rem; padding: .1rem .45rem;
  border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-txt); background: rgba(25, 165, 225, .14);
  border: 1px solid rgba(25, 165, 225, .35); vertical-align: middle;
}
.note-list { margin: .4rem 0 1rem; padding-left: 1.2rem; }
.note-list li { margin: .25rem 0; color: var(--slate-600); }
.auto-grid { display: flex; flex-direction: column; gap: .7rem; margin: .6rem 0 .9rem; }
.auto-row { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; }
.auto-row input[type="checkbox"] { margin-top: .25rem; }
.auto-libelle { display: flex; flex-direction: column; gap: .15rem; }
.auto-sub { font-size: .85rem; color: var(--slate-500); font-weight: 400; }
.auto-heures { align-items: center; flex-wrap: wrap; padding-left: 1.7rem; cursor: default; }
.auto-heures input { max-width: 200px; }
.auto-presets { font-size: .85rem; color: var(--slate-500); }
.auto-presets a { cursor: pointer; }
.auto-off { opacity: .5; }
.trn-moja-select { max-width: 100%; min-width: 220px; }
.trn-moja-auto { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; cursor: pointer; }

/* ── « Données du tournoi » : bloc compact (MOJA en premier, import manuel replié) ── */
.trn-data-summary { margin-left: auto; font-size: .84rem; color: var(--slate-500); }
.trn-data-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .45rem 0; }
.trn-data-label {
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 64px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--slate-500);
}
.trn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--slate-400, #94a3b8); }
.trn-dot.on { background: #65c466; box-shadow: 0 0 0 3px rgba(101, 196, 102, .18); }
.trn-dot.off { background: #e8a33d; }
.trn-manuel-toggle {
  display: inline-block; margin-top: .45rem;
  font-size: .84rem; color: var(--slate-500); cursor: pointer; user-select: none;
}
.trn-manuel-toggle:hover { color: var(--accent, #19a5e1); }
.trn-manuel {
  margin-top: .35rem; padding: .35rem .8rem .5rem;
  border: 1px dashed var(--border-2, var(--slate-200)); border-radius: 10px;
}
.trn-manuel-note { margin: .3rem 0 0; }

/* ═══════════════════ VERSION MOBILE (consultation par les membres) ═══════════════════
   Les affiches elles-mêmes (.rd-/.ann-/.trn-/.pod-/.bln-) ne changent JAMAIS :
   seul leur APERÇU est réduit (le code de capture force ses styles inline → les
   PNG restent en 1080). */

@media (max-width: 760px) {
  /* Filet de sécurité : quoi qu'il arrive, la PAGE ne défile jamais
     horizontalement — un élément trop large est clippé, pas la mise en page.
     (Posé sur html, pas body, pour ne pas casser la topbar sticky.) */
  html { overflow-x: hidden; }

  /* Chrome général : récupère l'espace perdu */
  .content { padding: .8rem .6rem; }
  .card { padding: 1.1rem .9rem; margin-bottom: 1rem; border-radius: 14px; }
  .card h2 { font-size: 1.25rem; }
  .topbar { padding: .55rem .7rem; gap: .6rem; }
  .tabs { gap: .2rem; }
  .tabs button { padding: .42rem .7rem; font-size: .82rem; }
  .logout-btn { padding: .35rem .6rem; }

  /* Toutes les tables de données défilent horizontalement dans la carte
     au lieu de faire déborder la page — et en plus compact. */
  .card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    font-size: .85rem;
  }
  .card th, .card td { padding: .5rem .55rem; }

  /* Accueil */
  .hero { padding: 1.1rem 1rem; gap: 1rem; margin-bottom: 1.1rem; }
  .hero-title { font-size: 1.45rem; }
  .home-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 1.2rem; }
  .kpi { padding: .8rem .9rem; }
  .kpi-sub { white-space: normal; }
  .home-cols { gap: 1.2rem; }
  .home-card { padding: 1.1rem .9rem; }
  .club-links { gap: .45rem; }

  /* Écrans tournoi / rencontres : les barres d'outils se resserrent */
  .rencontres-toolbar { padding: .7rem; gap: .7rem; }
  .design-toolbar { gap: .5rem; }
  .champ-toolbar .archives-toggle { margin-left: 0; }
  .trn-daynav select { max-width: 100%; }
  .settings-row { flex-wrap: wrap; }
  .settings-row input { min-width: 0; flex: 1 1 100%; }

  /* Modales plein écran ou presque */
  .modal-backdrop { padding: .5rem; align-items: flex-start; }
  .modal { max-height: 96vh; margin-top: .5rem; }
  .modal-header { padding: .9rem 1rem; }
  .modal-body { padding: 1rem; gap: .9rem; }
}

@media (max-width: 640px) {
  /* Aperçu des visuels : 1080 affiché à ×0.3 (324px) au lieu de ×0.5 (540px).
     Le PNG capturé/publié reste strictement identique. */
  .design-wrapper { width: 324px; height: 324px; }
  .design-wrapper-story { height: 576px !important; }
  .result-design, .annonce-design, .trn-design { transform: scale(.3); }

  /* Nav compacte */
  .brand { gap: .4rem; }
  .user-chip { display: none; }
}

@media (max-width: 420px) {
  .subtitle { display: none; }
  .tabs button { padding: .4rem .55rem; font-size: .78rem; }
  .hero-actions button { flex: 1 1 auto; }
}


/* ══════════════ MODE TV (télé du club) ══════════════ */
body.mode-tv { background: #0a1424; }
body.mode-tv .topbar, body.mode-tv .subtabs, body.mode-tv .partenaires-bandeau { display: none !important; }
body.mode-tv .content { max-width: none; padding: 0; margin: 0; }
.tv {
  min-height: 100vh; display: flex; flex-direction: column; box-sizing: border-box;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(25, 165, 225, .18), transparent 60%),
              radial-gradient(900px 500px at 100% 100%, rgba(225, 115, 25, .16), transparent 55%), #0a1424;
  color: #e9eff8; padding: 2.2vh 3vw; font-size: clamp(16px, 1.75vw, 30px);
}
.tv-top { display: flex; align-items: center; gap: 2vw; }
.tv-brand { display: flex; align-items: center; gap: 1vw; }
.tv-logo { height: clamp(40px, 6vw, 96px); width: auto; border-radius: 50%; }
.tv-club { font-weight: 800; font-size: 1.15em; letter-spacing: .02em; }
.tv-clock { margin-left: auto; font-size: 1.4em; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-txt); }
.tv-controls { display: flex; gap: .4vw; }
.tv-controls button {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15); color: #cfd8e6;
  border-radius: 999px; padding: .3em .8em; font-size: .55em; cursor: pointer; box-shadow: none;
}
.tv-controls button.active { background: rgba(25, 165, 225, .25); color: #fff; border-color: rgba(25, 165, 225, .6); }
.tv-stage { flex: 1; display: flex; align-items: stretch; padding: 3vh 0 2vh; }
.tv-panel { flex: 1; display: flex; flex-direction: column; gap: 2.5vh; min-width: 0; animation: tvFade .6s ease; }
@keyframes tvFade { from { opacity: .6; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tv-h1 { font-size: 2.1em; font-weight: 800; line-height: 1.1; display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; }
.tv-h1-sub { font-size: .45em; font-weight: 600; color: #9fb0c8; }
.tv-cat { font-size: .42em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #19a5e1; padding: .25em .7em; border: 2px solid currentColor; border-radius: 999px; white-space: nowrap; }
.tv-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3vw; flex: 1; }
.tv-col { display: flex; flex-direction: column; gap: 3vh; min-width: 0; }
.tv-block { display: flex; flex-direction: column; gap: .6vh; }
.tv-label { font-size: .62em; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #9fb0c8; }
.tv-big { font-size: 1.55em; font-weight: 800; line-height: 1.15; }
.tv-sub { font-size: .85em; color: #cfd8e6; }
.tv-score { font-variant-numeric: tabular-nums; }
.tv-score.res-V { color: #7ee08a; }
.tv-score.res-D { color: #ff8a8a; }
.tv-score.res-N { color: #cfd8e6; }
.tv-classement { width: 100%; border-collapse: collapse; font-size: .95em; }
.tv-classement td { padding: .35em .5em; border-bottom: 1px solid rgba(255, 255, 255, .10); }
.tv-classement tr.nous td { background: rgba(25, 165, 225, .18); font-weight: 800; }
.tv-pos { width: 2em; color: #9fb0c8; text-align: center; }
.tv-pts { text-align: right; white-space: nowrap; font-weight: 700; }
.tv-unit { font-size: .6em; color: #9fb0c8; margin-left: .25em; font-weight: 600; }
.tv-match-list { display: flex; flex-direction: column; gap: 1.2vh; }
.tv-match {
  display: grid; grid-template-columns: 7em 1fr auto 1fr; align-items: center; gap: 1.5vw;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); border-radius: .5em; padding: .55em .9em;
}
.tv-match.termine { border-color: rgba(101, 196, 102, .35); }
.tv-m-heure { display: flex; flex-direction: column; font-weight: 800; color: var(--accent-txt); font-size: 1.05em; }
.tv-m-ep { font-size: .5em; color: #9fb0c8; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-m-j { font-weight: 700; display: flex; align-items: baseline; gap: .5em; min-width: 0; }
.tv-m-j2 { justify-content: flex-end; text-align: right; }
.tv-m-j.gagnant { color: #7ee08a; }
.tv-m-clt { font-size: .6em; color: #9fb0c8; font-weight: 600; }
.tv-m-vs { font-weight: 800; color: #f59a3e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-podiums { display: grid; grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); gap: 2vw; }
.tv-podium { background: rgba(255, 255, 255, .06); border-radius: .5em; padding: 1em; display: flex; flex-direction: column; gap: .3em; }
.tv-pod-line { font-weight: 700; }
.tv-idle { align-items: center; justify-content: center; text-align: center; }
.tv-bottom { display: flex; align-items: center; gap: 2vw; }
.tv-dots { display: flex; gap: .5vw; }
.tv-dot { width: .6em; height: .6em; border-radius: 50%; background: rgba(255, 255, 255, .25); cursor: pointer; }
.tv-dot.on { background: #19a5e1; }
.tv-progress { flex: 1; height: 4px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.tv-progress-bar { height: 100%; background: #19a5e1; transition: width .45s linear; }
.tv-hint { font-size: .5em; color: #6f819b; white-space: nowrap; }
@media (max-width: 900px) {
  .tv { font-size: 15px; padding: 1.2rem 1rem; }
  .tv-cols { grid-template-columns: 1fr; }
  .tv-match { grid-template-columns: 4.5em 1fr auto 1fr; gap: .6rem; }
  .tv-club, .tv-hint { display: none; }
}


/* ── Logo du club dans la barre et sur l'écran de connexion ── */
img.ball { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; animation: none; display: block; }
.topbar img.ball { width: 32px; height: 32px; }
.login-card img.ball { width: 60px; height: 60px; }


/* ── Accueil : état des synchronisations ── */
.sync-card { gap: 0; padding-top: .3rem; padding-bottom: .3rem; }
.sync-row { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sync-row:last-of-type { border-bottom: none; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex: none; background: #6f819b; }
.sync-dot.sync-ok { background: #65c466; box-shadow: 0 0 0 3px rgba(101, 196, 102, .18); }
.sync-dot.sync-warn { background: #e8a33d; box-shadow: 0 0 0 3px rgba(232, 163, 61, .18); }
.sync-dot.sync-ko { background: #e05252; box-shadow: 0 0 0 3px rgba(224, 82, 82, .18); }
.sync-dot.sync-off { background: #4a5568; }
.sync-body { flex: 1; min-width: 0; }
.sync-titre { font-weight: 700; font-size: .92rem; }
.sync-etat { font-weight: 500; color: #8a98ad; margin-left: .4rem; }
.sync-sub { font-size: .8rem; color: #8a98ad; margin-top: .1rem; line-height: 1.35; }
.sync-act { font-size: .85rem; white-space: nowrap; margin-top: .2rem; }
.sync-act.busy { opacity: .5; pointer-events: none; }
.sync-msg { margin: .2rem 0 .4rem; font-size: .82rem; color: #ff9a8d; }


/* ── Championnats : ajout depuis un lien tenup ── */
.tenup-lien { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .2rem 0 1rem; }
.tenup-lien input { flex: 1; min-width: 260px; }
.tenup-lien .note { flex-basis: 100%; margin: 0; }
.tenup-lien-msg { margin: -.4rem 0 1rem; }
a.badge-auto { text-decoration: none; }
a.badge-auto[href]:hover { filter: brightness(1.2); text-decoration: underline; }


/* ── Mode TV : bilan de saison ── */
.tv-bilan-hero { display: flex; align-items: flex-end; gap: 4vw; padding: 1vh 0; }
.tv-bilan-stat { display: flex; flex-direction: column; align-items: center; gap: .2vh; }
.tv-bilan-num { font-size: 3.2em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-bilan-num.res-V { color: #7ee08a; }
.tv-bilan-num.res-D { color: #ff8a8a; }
.tv-bilan-num.res-N { color: #cfd8e6; }
.tv-bilan-pos .tv-bilan-num { color: #f5c542; }
.tv-bilan-pos sup { font-size: .35em; margin-left: .1em; }
.tv-bilan-lignes { display: flex; flex-direction: column; gap: .6vh; }
.tv-bilan-ligne { display: grid; grid-template-columns: 1.4em 3.6em 1fr auto; align-items: baseline; gap: .8em; font-size: .9em; padding: .25em .6em; border-radius: .4em; background: rgba(255, 255, 255, .05); }
.tv-bilan-ligne.res-V { border-left: .25em solid #7ee08a; }
.tv-bilan-ligne.res-D { border-left: .25em solid #ff8a8a; }
.tv-bilan-ligne.res-N { border-left: .25em solid #cfd8e6; }
.tv-bilan-res { font-weight: 800; }
.tv-bilan-ligne.res-V .tv-bilan-res { color: #7ee08a; }
.tv-bilan-ligne.res-D .tv-bilan-res { color: #ff8a8a; }
.tv-bilan-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-bilan-adv { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-bilan-date { color: #9fb0c8; font-size: .8em; white-space: nowrap; }
.tv-bilan-joueur { display: grid; grid-template-columns: 1.6em 1fr auto; align-items: baseline; gap: .8em; padding: .35em .6em; border-bottom: 1px solid rgba(255, 255, 255, .10); }
.tv-bilan-jrang { color: #9fb0c8; font-weight: 700; }
.tv-bilan-jnom { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-bilan-jstat { color: #cfd8e6; white-space: nowrap; font-size: .9em; }
.tv-bilan-jstat strong { color: #7ee08a; }
@media (max-width: 900px) { .tv-bilan-hero { gap: 2rem; } .tv-bilan-num { font-size: 2.4em; } }


/* ══════════════ ACCUEIL : Nos équipes (v2) ══════════════ */
.home-col-title-row { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.home-jc { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--slate-500); }
.home-jc:first-of-type { margin-left: auto; }
.home-jc-act { font-weight: 700; cursor: pointer; white-space: nowrap; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: .9rem; margin-top: .6rem; }
.tm-card {
  border-radius: 16px; padding: .95rem 1.05rem .85rem; background: var(--surface-2, #fff);
  border: 1px solid var(--border-2, var(--slate-200)); display: flex; flex-direction: column; gap: .75rem; min-width: 0;
}
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.tm-id { min-width: 0; display: flex; flex-direction: column; gap: .32rem; }
.tm-nom { font-size: 1.1rem; font-weight: 800; color: var(--text, var(--slate-800)); line-height: 1.1; }
.tm-pill {
  align-self: flex-start; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-txt); background: rgba(25, 165, 225, .13); border: 1px solid rgba(25, 165, 225, .25);
  border-radius: 999px; padding: .18rem .6rem; white-space: nowrap;
}
.tm-rank {
  display: flex; flex-direction: column; align-items: flex-end; cursor: pointer; text-decoration: none; flex: none;
  padding: .3rem .65rem; border-radius: 12px; background: var(--surface-3, var(--slate-100)); border: 1px solid var(--border-2, var(--slate-200));
}
.tm-rank:hover { border-color: var(--accent, #19a5e1); }
.tm-next { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.tm-next.tm-empty { color: var(--slate-500); font-size: .88rem; padding: .3rem 0; }
.tm-date {
  flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .35rem 0;
  border-radius: 12px; background: var(--surface-3, var(--slate-100)); border: 1px solid var(--border-2, var(--slate-200)); line-height: 1;
}
.tm-date.hot { border-color: rgba(225, 115, 25, .6); background: rgba(225, 115, 25, .12); }
.tm-dow, .tm-mon { font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-500); }
.tm-day { font-size: 1.5rem; font-weight: 800; color: var(--text, var(--slate-800)); margin: .14rem 0; }
.tm-date.hot .tm-day { color: #f0a35c; }
.tm-next-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .22rem; }
.tm-kicker { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--slate-500); }
.tm-kicker .team-soon { margin-left: .4rem; }
.tm-vs { font-size: .98rem; font-weight: 700; color: var(--text, var(--slate-800)); line-height: 1.25; display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.tm-where { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .45rem; border-radius: 6px; flex: none; }
.tm-where.dom { color: #7ee08a; background: rgba(101, 196, 102, .14); }
.tm-where.ext { color: #f0a35c; background: rgba(225, 115, 25, .14); }
.tm-act { flex: none; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tm-last { display: flex; align-items: center; gap: .6rem; font-size: .88rem; padding-top: .6rem; border-top: 1px dashed var(--border-2, var(--slate-200)); min-width: 0; }
.tm-res { flex: none; width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; }
.tm-res.res-V { color: #7ee08a; background: rgba(101, 196, 102, .16); }
.tm-res.res-D { color: #ff9a8d; background: rgba(225, 65, 65, .16); }
.tm-res.res-N { color: #fac056; background: rgba(250, 192, 86, .16); }
.tm-last-txt { flex: 1 1 auto; min-width: 0; color: var(--text, var(--slate-700)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-when { color: var(--slate-500); }
@media (max-width: 640px) { .tm-last-txt { white-space: normal; } .home-jc:first-of-type { margin-left: 0; } }

/* ══════════════ JOURNÉES DU CLUB : liste ══════════════ */
.jc-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .8rem; }
.jc-row { display: flex; align-items: flex-start; gap: 1rem; padding: .85rem 1rem; border-radius: 14px; background: var(--surface-2, #fff); border: 1px solid var(--border-2, var(--slate-200)); }
.jc-row.passee { opacity: .8; }
.jc-row.prochaine, .jc-row.auj { border-color: rgba(25, 165, 225, .55); }
.jc-date { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; padding: .4rem 0; border-radius: 12px; background: var(--surface-3, var(--slate-100)); border: 1px solid var(--border-2, var(--slate-200)); line-height: 1; }
.jc-dow, .jc-mon { font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-500); }
.jc-day { font-size: 1.55rem; font-weight: 800; margin: .15rem 0; color: var(--text, var(--slate-800)); }
.jc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.jc-titre { font-weight: 800; font-size: .95rem; display: flex; align-items: center; gap: .5rem; }
.jc-line { display: flex; align-items: center; gap: .55rem; font-size: .88rem; min-width: 0; }
.jc-pill { flex: none; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-txt); background: rgba(25, 165, 225, .13); border-radius: 999px; padding: .12rem .5rem; white-space: nowrap; }
.jc-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-score { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.jc-score.res-V { color: #7ee08a; } .jc-score.res-D { color: #ff9a8d; } .jc-score.res-N { color: #fac056; }
.jc-actions { flex: none; display: flex; flex-direction: column; gap: .4rem; }
.jc-toggle { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; white-space: nowrap; }
@media (max-width: 640px) { .jc-row { flex-wrap: wrap; } .jc-actions { flex-direction: row; width: 100%; } .jc-txt { white-space: normal; } }

/* ── Masquer des rencontres / journées (Publication) : œil barré + interrupteur ── */
.voir-masquees { display: inline-flex; align-items: center; gap: .55rem; font-size: .88rem; font-weight: 600; color: var(--slate-500); cursor: pointer; user-select: none; white-space: nowrap; }
.voir-masquees.on { color: var(--text); }
.voir-masquees input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.vm-piste { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3, var(--slate-200)); border: 1px solid var(--border-2, var(--slate-300)); transition: background .15s, border-color .15s; }
.vm-bouton { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--slate-400); transition: transform .15s, background .15s; }
.voir-masquees.on .vm-piste { background: var(--accent, #19a5e1); border-color: var(--accent, #19a5e1); }
.voir-masquees.on .vm-bouton { transform: translateX(16px); background: #fff; }
.voir-masquees input:focus-visible + .vm-piste { outline: 2px solid var(--accent, #19a5e1); outline-offset: 2px; }
.rencontres-toolbar .voir-masquees { align-self: center; }
.jc-outils { display: flex; justify-content: flex-end; margin-top: .4rem; }
.btn-oeil { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: 8px; background: transparent; border: 1px solid transparent; color: var(--slate-500); cursor: pointer; }
.btn-oeil svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-oeil:hover { color: var(--text); border-color: var(--border-2, var(--slate-300)); background: var(--surface-3, var(--slate-100)); }
.btn-oeil.masquee { color: var(--accent-txt, #19a5e1); }
.rencontres-table th.r-oeil, .rencontres-table td.r-oeil { width: 40px; padding-left: 0; padding-right: .3rem; text-align: center; }
.rencontres-table tbody tr.r-masquee > td:not(.r-oeil) { opacity: .45; }
.jc-row.masquee { opacity: .55; border-style: dashed; }
.jc-row.masquee .jc-oeil { opacity: 1; }
.jc-oeil { margin-left: auto; margin-top: -.3rem; }
.tag-masquee { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); border: 1px solid var(--border-2, var(--slate-300)); border-radius: 999px; padding: .1rem .45rem; }

/* ══════════════ VISUEL « résultats de la journée du club » (1080 px) ══════════════ */
/* Une rencontre par page (le programme utilise l'affiche, plus bas) */
.jc-design { --jc-logo: 170px; --jc-name: 46px; --jc-vs: 64px; --jc-cap: 22px; --jc-tag: 18px; --jc-m: 24px; }
.jc-design.trn-story { --jc-logo: 220px; --jc-name: 54px; --jc-vs: 76px; --jc-cap: 26px; --jc-tag: 20px; --jc-m: 28px; }
/* La date : plus grosse et de la couleur secondaire */
.jc-design .trn-date { font-size: 54px; color: var(--rd-secondary); letter-spacing: .04em; margin-top: 2px; }
.jc-design.trn-story .trn-date { font-size: 62px; }
.jc-rows { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; gap: 14px; margin-top: 18px; min-height: 0; }
.jc-r {
  flex: 1 1 0; max-height: 360px; display: flex; flex-direction: column; justify-content: center;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.14); border-radius: 22px; padding: 14px 26px;
}
.jc-r.res-V { border-color: rgba(132, 204, 22, .6); }
.jc-r.res-D { border-color: rgba(239, 68, 68, .5); }
.jc-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: var(--jc-cap); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-secondary); margin-bottom: 10px; }
.jc-cap-right { color: rgba(255,255,255,.85); white-space: nowrap; }
.jc-r.res-V .jc-cap-right { color: var(--rd-primary); }
.jc-r.res-D .jc-cap-right { color: #ff8a8a; }
.jc-design .jc-line { display: grid; grid-template-columns: var(--jc-logo) minmax(0, 1fr) auto minmax(0, 1fr) var(--jc-logo); align-items: center; gap: 0 20px; }
.jc-nous-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.jc-tag {
  font-family: 'Anton', sans-serif; font-size: var(--jc-tag); letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; color: var(--rd-bg); background: var(--rd-primary); white-space: nowrap; line-height: 1.2;
}
.jc-tag.ext { background: var(--rd-secondary); }
.jc-logo { width: var(--jc-logo); height: var(--jc-logo); border-radius: 50%; background: white; object-fit: contain; padding: 4px; box-sizing: border-box; flex: none; }
.jc-logo-ph { display: inline-flex; align-items: center; justify-content: center; font-family: 'Anton', sans-serif; font-size: calc(var(--jc-logo) * .36); color: var(--rd-bg); letter-spacing: .04em; }
.jc-nous, .jc-adv { font-size: var(--jc-name); font-weight: 800; line-height: 1.08; color: white; text-transform: uppercase; min-width: 0; }
.jc-nous.jc-long, .jc-adv.jc-long { font-size: calc(var(--jc-name) * .82); }
.jc-nous.jc-xlong, .jc-adv.jc-xlong { font-size: calc(var(--jc-name) * .68); }
.jc-adv { text-align: right; }
.jc-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: calc(var(--jc-vs) * 1.3); text-align: center; }
.jc-score { font-family: 'Anton', sans-serif; font-size: calc(var(--jc-vs) * 1.15); line-height: 1; letter-spacing: .04em; color: white; white-space: nowrap; }
.jc-r.res-V .jc-score { color: var(--rd-primary); }
.jc-r.res-D .jc-score { color: #ff8a8a; }
.jc-score-attente { color: rgba(255,255,255,.45); }
/* Détail des matchs (résultats) */
.jc-r-matchs { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.jc-m { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; gap: 12px; font-size: var(--jc-m); line-height: 1.3; }
.jc-m-num { font-weight: 800; color: rgba(255,255,255,.55); }
.jc-m-nous { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-m.gagne .jc-m-nous { color: var(--rd-primary); }
.jc-m.perdu .jc-m-nous { color: rgba(255,255,255,.7); }
.jc-m-sets { font-family: 'Anton', sans-serif; letter-spacing: .05em; color: white; white-space: nowrap; }
.jc-m-eux { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.85); }
.jc-m.gagne .jc-m-eux { color: rgba(255,255,255,.6); }
.jc-design.jc-detail .jc-r { max-height: none; }
.trn-story .jc-rows { gap: 26px; margin-top: 36px; }
.trn-story .jc-r { padding: 24px 30px; max-height: 520px; }
/* Pied de page : réseaux du club */
.jc-footer { justify-content: center; gap: 56px; }
.jc-social { display: inline-flex; align-items: center; gap: 14px; }
.jc-footer .jc-social-ico { display: inline-block; width: 46px; height: 46px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.jc-social-txt { font-size: 26px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .02em; }

.jc-subline { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.jc-page-ind { font-family: 'Anton', sans-serif; font-size: 26px; color: var(--rd-secondary); letter-spacing: .06em; text-transform: none; }

/* ══════════════ Programme de la journée : « affiche de match » (classes a4-*) ══════════════
   Née pour l'écran lumineux de la mairie — A4 portrait, 1080 × 1527 px à l'écran, capturé en PNG
   2480 × 3508 (A4 à 300 dpi), tout le week-end — et reprise pour les réseaux : Post 1080 × 1080 et
   Story 1080 × 1920 (les équipes du jour, 4 par page). Tailles par format et par nombre de matchs.
   Style « affiche de match », lisible de loin sur le panneau de la commune : « TENNIS » évidé
   dans le bleu ciel du logo du club ; les matchs du week-end centrés sur la page (grille 1fr /
   auto / 1fr : un match seul est au milieu, et si la place manque les cartes descendent au lieu
   de chevaucher le titre) ; une carte « verre dépoli » par match — division · journée à gauche et
   catégorie en pastille à droite (couleur de la catégorie), les noms (bleu marine sur fond blanc,
   soulignés d'un trait vert) au-dessus des deux
   grands logos (sans fond blanc), alignés de part et d'autre du VS sur un éclair ; en pied de carte,
   le lieu en onglet collé au coin bas-gauche du cadre (même couleur que lui) et la date + l'heure (doré).
   4 équipes au plus par page (jc-n1 … jc-n4). Noms ajustés sur une ligne en JS. */
.design-wrapper-a4 { height: 764px !important; }
.trn-design.jc-affiche {
  --a4-ciel: #08a8f8;   /* bleu ciel du logo du club */
  padding: 40px 48px;
  display: grid; grid-template-rows: 1fr auto 1fr; grid-template-columns: minmax(0, 1fr);
  background-image: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 40%, rgba(0,0,0,.35) 100%);
}
.trn-design.jc-affiche.trn-story { padding: 180px 56px 200px; }   /* hors des zones couvertes par l'interface des stories */
.trn-design.jc-affiche.trn-a4 { height: 1527px; padding: 50px 56px; }
.a4-deco { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.a4-sport, .a4-rows { position: relative; z-index: 1; }

/* Titre « TENNIS » (en haut) */
.a4-sport {
  align-self: start; text-align: center; font-family: 'Anton', sans-serif; font-size: var(--a4-titre); line-height: .92; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(8, 168, 248, .14); -webkit-text-stroke: 7px var(--a4-ciel);
}

/* Les matchs, centrés sur la page : une carte « verre dépoli » par match */
.a4-rows { grid-row: 2; align-self: center; display: flex; flex-direction: column; gap: var(--a4-gap); margin: 18px 0; }
.a4-match {
  border-radius: 28px; padding: var(--a4-pad) calc(var(--a4-pad) + 8px) 0;   /* en bas : le pied touche le cadre */
  background: rgba(255,255,255,.07); border: 3px solid rgba(255,255,255,.38); box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.a4-match.dom { border-color: var(--rd-primary); }
/* En-tête : division · journée à gauche et catégorie en pastille à droite, dans la couleur de la catégorie */
.a4-cap { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--a4-cap); margin-bottom: calc(var(--a4-in) * 1.4); }
.a4-divj { font-weight: 800; line-height: 1.15; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-secondary); white-space: nowrap; }
.a4-cat {
  margin-left: auto; font-family: 'Anton', sans-serif; line-height: 1.15; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--rd-secondary); padding: .22em .8em; border-radius: 999px; background: rgba(0,0,0,.28); border: 2px solid currentColor;
}
/* Noms au-dessus des logos (soulignés), les deux logos alignés de part et d'autre du VS sur un éclair */
.a4-duel {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--a4-vsw) minmax(0, 1fr); grid-template-rows: auto var(--a4-L);
  align-items: center; justify-items: center; column-gap: 12px; row-gap: var(--a4-in);
}
.a4-nom {
  justify-self: stretch; display: flex; flex-direction: column; align-items: center; white-space: nowrap;
  font-family: 'Anton', sans-serif; font-size: var(--a4-F); line-height: 1; letter-spacing: .03em; text-transform: uppercase;
}
.a4-nom-txt {   /* nom du club en bleu marine sur fond blanc ; capitales centrées (Anton : ascendante 1,18, descendante ,33, capitales ,86 em) */
  padding: .17em .34em .16em; border-radius: .16em; background: #ffffff; color: var(--rd-ink, var(--rd-bg)); box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.a4-nom::after {   /* petit trait vert sous le nom (taille de base : l'ajustement JS ne le change pas) */
  content: ""; width: calc(var(--a4-F) * 1.6); height: calc(var(--a4-F) * .1); margin-top: calc(var(--a4-F) * .16);
  border-radius: 99px; background: var(--rd-primary);
}
.a4-nom-nous { grid-row: 1; grid-column: 1; }
.a4-nom-adv { grid-row: 1; grid-column: 3; }
.a4-logo { grid-row: 2; width: var(--a4-L); height: var(--a4-L); object-fit: contain; }
.a4-logo-nous { grid-column: 1; }
.a4-logo-adv { grid-column: 3; }
.a4-logo-ph {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 50%; background: #ffffff;
  font-family: 'Anton', sans-serif; font-size: calc(var(--a4-L) * .3); letter-spacing: .04em; color: var(--rd-ink, var(--rd-bg));
}
.a4-vs { grid-row: 2; grid-column: 2; position: relative; width: var(--a4-vsw); height: var(--a4-L); display: flex; align-items: center; justify-content: center; }
.a4-vs svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.a4-vs-txt {
  position: relative; font-family: 'Anton', sans-serif; font-size: calc(var(--a4-vsw) * .5); line-height: 1; letter-spacing: .02em; color: #ffffff;
  transform: skewX(-10deg); --a4-ombre: var(--rd-ink, var(--rd-bg));
  text-shadow: 3px 3px 0 var(--a4-ombre), -2px 2px 0 var(--a4-ombre), 2px -2px 0 var(--a4-ombre), -2px -2px 0 var(--a4-ombre);
}
/* Pied de carte, collé au cadre (marges négatives = padding de la carte) : le lieu en onglet dans le coin
   bas-gauche, de la couleur du cadre, et la date + l'heure centrées (décalées à droite si la place manque) */
.a4-pied {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 16px;
  margin: calc(var(--a4-in) * 1.6) calc(-8px - var(--a4-pad)) 0;
}
.a4-lieu {
  justify-self: start; align-self: stretch; box-sizing: border-box; min-height: calc(var(--a4-quand) * 1.8); display: flex; align-items: center;
  font-family: 'Anton', sans-serif; font-size: var(--a4-cap); line-height: 1.15; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 0 .7em 0 .6em; border-radius: 0 calc(var(--a4-quand) * .7) 0 25px;   /* bas-gauche = rayon intérieur du cadre */
  background: var(--rd-primary); color: var(--rd-on-primary, var(--rd-bg));
}
.a4-match.ext .a4-lieu { background: rgba(255,255,255,.38); color: #ffffff; }   /* = couleur du cadre « extérieur » */
.a4-quand {
  grid-column: 2; text-align: center; font-family: 'Anton', sans-serif; font-size: var(--a4-quand); line-height: 1.1;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rd-secondary);
}

/* Tailles selon le format et le nombre d'équipes (défaut = 3) — Post 1:1 */
.jc-design.jc-affiche { --a4-titre: 110px; --a4-L: 115px; --a4-F: 30px; --a4-vsw: 84px; --a4-cap: 18px; --a4-quand: 26px; --a4-pad: 10px; --a4-in: 5px; --a4-gap: 10px; }
.jc-design.jc-affiche.jc-n1 { --a4-titre: 130px; --a4-L: 300px; --a4-F: 52px; --a4-vsw: 150px; --a4-cap: 26px; --a4-quand: 40px; --a4-pad: 24px; --a4-in: 12px; }
.jc-design.jc-affiche.jc-n2 { --a4-titre: 110px; --a4-L: 190px; --a4-F: 40px; --a4-vsw: 110px; --a4-cap: 22px; --a4-quand: 32px; --a4-pad: 16px; --a4-in: 8px; --a4-gap: 20px; }
.jc-design.jc-affiche.jc-n4 { --a4-titre: 100px; --a4-L: 72px; --a4-F: 24px; --a4-vsw: 60px; --a4-cap: 15px; --a4-quand: 21px; --a4-pad: 8px; --a4-in: 3px; --a4-gap: 8px; }
/* Story 9:16 et A4 mairie */
.jc-design.jc-affiche.trn-story, .jc-design.jc-affiche.trn-a4 { --a4-titre: 150px; --a4-L: 150px; --a4-F: 38px; --a4-vsw: 100px; --a4-cap: 22px; --a4-quand: 35px; --a4-pad: 16px; --a4-in: 6px; --a4-gap: 12px; }
.jc-design.jc-affiche.trn-story.jc-n1, .jc-design.jc-affiche.trn-a4.jc-n1 { --a4-titre: 240px; --a4-L: 300px; --a4-F: 56px; --a4-vsw: 150px; --a4-cap: 28px; --a4-quand: 46px; --a4-pad: 26px; --a4-in: 14px; }
.jc-design.jc-affiche.trn-story.jc-n2, .jc-design.jc-affiche.trn-a4.jc-n2 { --a4-titre: 190px; --a4-L: 240px; --a4-F: 46px; --a4-vsw: 124px; --a4-cap: 26px; --a4-quand: 42px; --a4-pad: 20px; --a4-in: 10px; --a4-gap: 32px; }
.jc-design.jc-affiche.trn-story.jc-n4, .jc-design.jc-affiche.trn-a4.jc-n4 { --a4-titre: 148px; --a4-L: 100px; --a4-F: 30px; --a4-vsw: 76px; --a4-cap: 18px; --a4-quand: 29px; --a4-pad: 10px; --a4-in: 4px; --a4-gap: 10px; }
@media (max-width: 640px) { .design-wrapper-a4 { height: 459px !important; } }

/* Bouton, paramètre et modale « Mail mairie » */
.mairie-btn { background: #0f766e !important; border-color: #0f766e !important; color: white !important; }
.mairie-btn:hover:not(:disabled) { background: #0d9488 !important; }
.jc-mairie-ok { font-size: .75rem; font-weight: 700; color: #5eead4; text-align: center; white-space: nowrap; }
.mairie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; margin: .8rem 0 .2rem; }
.mairie-grid input, .mairie-grid textarea { width: 100%; box-sizing: border-box; }
.mairie-grid textarea { padding: .6rem .75rem; font-family: 'Inter', sans-serif; font-size: .92rem; line-height: 1.45; resize: vertical; }
.mairie-send { display: flex; gap: 1.2rem; align-items: flex-start; }
.mairie-apercu { flex: none; width: 150px; aspect-ratio: 210 / 297; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); background: #0c1e3a; }
.mairie-infos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .9rem; overflow-wrap: anywhere; }
.mairie-lbl { display: inline-block; min-width: 6.5rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--slate-500); }
.mairie-infos .hint { display: inline; margin-left: .5rem; }
.mairie-infos .note { margin: .3rem 0 0; }
.mairie-contenu { min-height: 170px; }
@media (max-width: 640px) {
  .mairie-grid { grid-template-columns: 1fr; }
  .mairie-send { flex-direction: column; align-items: center; }
  .mairie-infos { align-self: stretch; }
}


/* ══════════════ Affiche « rencontre à venir » : alignement, bandeaux discrets, date lisible ══════════════ */
.ann-vs-row { align-items: start; align-content: center; }
.ann-team-name { min-height: 88px; display: flex; align-items: flex-start; justify-content: center; }
.ann-vs { align-self: start; margin-top: 67px; }   /* centré sur les logos (étiquette 45 px + écart 22 px) */
.ann-footer {
  margin: 0 60px 44px; padding: 24px 40px 34px; border-radius: 26px;
  background: rgba(0, 0, 0, .30); border: 1px solid rgba(255, 255, 255, .10); box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.annonce-design.has-ptn .ann-footer { margin-bottom: 96px; }
.ann-title { text-shadow: 0 6px 18px rgba(0, 0, 0, .6), 0 2px 0 rgba(0, 0, 0, .35); }
.ann-date-hero { text-shadow: 0 4px 14px rgba(0, 0, 0, .75), 0 1px 0 rgba(0, 0, 0, .6); }

/* ══════════════ Modale championnat : aperçu démo des visuels ══════════════ */
.champ-demo-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.champ-demo-wrap { width: 378px; height: 378px; overflow: hidden; border-radius: 10px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); background: #0c1e3a; }
.champ-demo-design { transform: scale(.35) !important; transform-origin: top left !important; box-shadow: none !important; border-radius: 0 !important; }
@media (max-width: 480px) { .champ-demo-wrap { width: 302px; height: 302px; } .champ-demo-design { transform: scale(.28) !important; } }


/* ══════════════ Affiches épurées (annonce sans chevrons ni icônes, résultat sans balles) ══════════════ */
.rd-score-sep { width: 10px; height: 100px; border-radius: 5px; background: var(--rd-secondary); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.rd-score-home.winner { color: var(--rd-primary); }
.rd-score-away.winner { color: var(--rd-secondary); }
.ann-heure-hero { gap: 0; }

/* ── Visuel journée : couleurs du club (panneau) ── */
.jc-couleurs { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .8rem; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2, #fff); border: 1px solid var(--border-2, var(--slate-200)); font-size: .85rem; }
.jc-couleurs-titre { flex-basis: 100%; font-weight: 700; }
.jc-couleurs .color-field input[type="color"] { width: 34px; height: 24px; padding: 0; border: none; background: none; cursor: pointer; }


/* ══════════════ MODE TV v2 : logos, calendrier, vue d'ensemble, bandeau ══════════════ */
.tv-stage { position: relative; }
.tv-court { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .07; pointer-events: none; }
.tv-panel { position: relative; z-index: 1; }
.tv-bilan-chip { display: inline-flex; gap: .7em; font-size: .42em; font-weight: 800; letter-spacing: .06em; padding: .35em .9em; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.tv-bilan-chip .res-V { color: #7ee08a; } .tv-bilan-chip .res-D { color: #ff8a8a; } .tv-bilan-chip .res-N { color: #fac056; }
.tv-card { display: flex; flex-direction: column; gap: 1.2vh; padding: 1.4vh 1.4vw; border-radius: .7em; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); }
.tv-card.res-V { border-color: rgba(101, 196, 102, .45); } .tv-card.res-D { border-color: rgba(224, 82, 82, .45); }
.tv-card.tv-muted { color: #9fb0c8; }
.tv-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2vw; }
.tv-duel-team { display: flex; flex-direction: column; align-items: center; gap: .8vh; text-align: center; min-width: 0; }
.tv-duel-logo { width: clamp(70px, 7.5vw, 150px); height: clamp(70px, 7.5vw, 150px); border-radius: 50%; background: #fff; object-fit: contain; padding: 4px; box-sizing: border-box; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.tv-duel-ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #0a1424; font-size: 1.1em; }
.tv-duel-nom { font-weight: 800; font-size: .9em; line-height: 1.1; }
.tv-duel-mid { display: flex; flex-direction: column; align-items: center; gap: .7vh; text-align: center; min-width: 8em; }
.tv-duel-tag { font-size: .55em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: .25em .9em; border-radius: 999px; color: #0a1424; background: #7ee08a; }
.tv-duel-tag.ext { background: #fac056; }
.tv-duel-vs { font-family: 'Anton', sans-serif; font-style: italic; font-size: 1.9em; line-height: 1; color: #f59a3e; text-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }
.tv-duel-when { font-size: .62em; font-weight: 700; color: #cfd8e6; text-transform: uppercase; letter-spacing: .06em; }
.tv-duel-score { font-family: 'Anton', sans-serif; font-size: 2.2em; line-height: 1; letter-spacing: .04em; }
.tv-duel-score.res-V { color: #7ee08a; } .tv-duel-score.res-D { color: #ff8a8a; } .tv-duel-score.res-N { color: #fac056; }
.tv-countdown { display: flex; align-items: baseline; gap: .6em; justify-content: center; }
.tv-countdown-num { font-family: 'Anton', sans-serif; font-size: 1.8em; color: var(--accent-txt); letter-spacing: .04em; }
.tv-cal { display: flex; flex-direction: column; gap: .3vh; font-size: .72em; }
.tv-cal.compact { font-size: .6em; }
.tv-cal-row { display: grid; grid-template-columns: 5.4em 3.4em 1fr auto; align-items: center; gap: .8em; padding: .28em .7em; border-radius: .4em; background: rgba(255, 255, 255, .04); color: #cfd8e6; }
.tv-cal-row.prochaine { background: rgba(25, 165, 225, .18); color: #fff; outline: 1px solid rgba(25, 165, 225, .5); }
.tv-cal-row.joue { color: #9fb0c8; }
.tv-cal-row.joue.res-V .tv-cal-score { color: #7ee08a; } .tv-cal-row.joue.res-D .tv-cal-score { color: #ff8a8a; }
.tv-cal-date { font-weight: 700; white-space: nowrap; }
.tv-cal-tag { font-size: .7em; font-weight: 800; letter-spacing: .1em; text-align: center; padding: .15em .3em; border-radius: .3em; background: rgba(126, 224, 138, .15); color: #7ee08a; }
.tv-cal-tag.ext { background: rgba(250, 192, 86, .15); color: #fac056; }
.tv-cal-adv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tv-cal-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 40vw), 1fr)); gap: 2vh 2vw; flex: 1; align-content: center; }
.tv-team-card { display: flex; flex-direction: column; gap: 1.2vh; padding: 1.6vh 1.4vw; border-radius: .7em; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); min-width: 0; }
.tv-team-head { display: flex; align-items: center; gap: 1vw; }
.tv-team-logo { width: clamp(48px, 4.5vw, 90px); height: clamp(48px, 4.5vw, 90px); border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; box-sizing: border-box; flex: none; }
.tv-team-id { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .4vh; }
.tv-team-nom { font-weight: 800; font-size: 1.15em; line-height: 1.05; }
.tv-team-pill { align-self: flex-start; font-size: .5em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-txt); border: 1px solid rgba(127, 208, 245, .5); border-radius: 999px; padding: .2em .8em; }
.tv-team-rank { font-family: 'Anton', sans-serif; font-size: 1.6em; color: #fac056; line-height: 1; flex: none; }
.tv-team-rank sup { font-size: .45em; } .tv-team-rank small { font-size: .45em; color: #9fb0c8; margin-left: .2em; font-family: 'Inter', sans-serif; }
.tv-team-bilan { font-family: 'Inter', sans-serif; font-size: .8em; display: flex; gap: .6em; }
.tv-team-bilan .res-V { color: #7ee08a; } .tv-team-bilan .res-D { color: #ff8a8a; }
.tv-team-line { display: flex; align-items: center; gap: .8em; font-size: .78em; min-width: 0; }
.tv-team-line.tv-muted { color: #9fb0c8; }
.tv-team-tag { flex: none; font-size: .68em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9fb0c8; min-width: 6em; }
.tv-team-tag.res-V { color: #7ee08a; } .tv-team-tag.res-D { color: #ff8a8a; } .tv-team-tag.res-N { color: #fac056; }
.tv-team-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-team-adv { width: 1.6em; height: 1.6em; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.tv-ticker { display: flex; align-items: center; gap: 1vw; margin-top: 1vh; padding: .4em 0; border-top: 1px solid rgba(255, 255, 255, .10); font-size: .68em; }
.tv-ticker-label { flex: none; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #f59a3e; font-size: .8em; }
.tv-ticker-viewport { flex: 1; overflow: hidden; white-space: nowrap; }
.tv-ticker-track { display: inline-block; padding-left: 100%; animation: tvTicker 60s linear infinite; }
.tv-ticker-item { margin-right: 3em; color: #cfd8e6; }
.tv-ticker-item b { color: var(--accent-txt); margin-right: .4em; }
@keyframes tvTicker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (max-width: 900px) { .tv-team-grid { grid-template-columns: 1fr; } .tv-duel-logo { width: 64px; height: 64px; } .tv-duel-mid { min-width: 5em; } }

/* TV : tenir sur un écran 16:9 quand classement + calendrier + résultat sont présents */
.tv-bilan-num { font-size: 2.7em; }
.tv-bilan-ligne { font-size: .82em; }
.tv-bilan-joueur { padding: .25em .6em; }
.tv-equipe .tv-cols { align-content: start; }

/* TV : bilan et vue d'ensemble plus compacts (écran 16:9) */
.tv-bilan .tv-cols { align-content: start; }
.tv-bilan-hero { padding: 0; gap: 3vw; }
.tv-bilan-ligne { font-size: .74em; padding: .18em .6em; }
.tv-bilan-lignes { gap: .35vh; }
.tv-bilan-joueur { font-size: .82em; padding: .2em .6em; }
.tv-panel.tv-bilan { gap: 1.6vh; }
.tv-team-card { padding: 1.2vh 1.2vw; gap: .9vh; }
.tv-team-grid { gap: 1.4vh 2vw; }
.tv-bilan-num { font-size: 2.4em; }
.tv-bilan-hero { margin-top: -.5vh; }


/* ══════════════ MODE TV v3 : écrans par thème (catégorie en titre) ══════════════ */
.tv-grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2vh 2vw; flex: 1; align-content: start; }
.tv-sec { display: flex; flex-direction: column; gap: .3vh; margin-bottom: 1vh; }
.tv-sec-title { font-size: 1.05em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-txt); line-height: 1.1; }
.tv-sec-sub { font-size: .6em; font-weight: 700; color: #9fb0c8; letter-spacing: .04em; text-transform: uppercase; }
.tv-next-card .tv-duel-logo { width: clamp(56px, 5.4vw, 108px); height: clamp(56px, 5.4vw, 108px); }
.tv-duel-sm { gap: 1vw; }
.tv-duel-sm .tv-duel-nom { font-size: .72em; }
.tv-duel-sm .tv-duel-vs { font-size: 1.4em; }
.tv-duel-sm .tv-duel-when { font-size: .55em; }
.tv-duel-sm .tv-duel-mid { min-width: 6.5em; gap: .5vh; }
.tv-duel-jn { font-family: 'Anton', sans-serif; font-size: .95em; color: #f59a3e; letter-spacing: .04em; line-height: 1; }
.tv-cal-cols { display: grid; gap: 1.5vw; flex: 1; align-content: start; }
.tv-cal-col { min-width: 0; display: flex; flex-direction: column; }
.tv-cal-col .tv-cal { font-size: .56em; gap: .25vh; }
.tv-cal-col .tv-cal-row { grid-template-columns: 4.6em 2.9em 1fr auto; gap: .5em; padding: .22em .5em; }
.tv-cal-col .tv-sec-title { font-size: .85em; }
.tv-res-list { display: flex; flex-direction: column; gap: .8vh; }
.tv-res-row { display: grid; grid-template-columns: 5.5em auto 1fr auto; align-items: center; gap: 1em; font-size: .8em; padding: .35em .7em; border-radius: .4em; background: rgba(255, 255, 255, .05); border-left: .25em solid #9fb0c8; }
.tv-res-row.res-V { border-left-color: #7ee08a; } .tv-res-row.res-D { border-left-color: #ff8a8a; } .tv-res-row.res-N { border-left-color: #fac056; }
.tv-res-lbl { font-size: .7em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9fb0c8; }
.tv-res-score { font-family: 'Anton', sans-serif; font-size: 1.5em; letter-spacing: .04em; line-height: 1; }
.tv-res-row.res-V .tv-res-score { color: #7ee08a; } .tv-res-row.res-D .tv-res-score { color: #ff8a8a; } .tv-res-row.res-N .tv-res-score { color: #fac056; }
.tv-res-adv { display: flex; align-items: center; gap: .5em; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-res-adv img { width: 1.5em; height: 1.5em; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.tv-res-date { color: #9fb0c8; font-size: .8em; white-space: nowrap; }
.tv-classement-sm { font-size: .68em; }
.tv-classement-sm td { padding: .25em .4em; }
.tv-muted { color: #9fb0c8; }
@media (max-width: 900px) { .tv-grid4 { grid-template-columns: 1fr; } .tv-cal-cols { grid-template-columns: 1fr !important; } }

/* ── Mode TV : bilan de saison multi-équipes ── */
.tv-bilan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1vw; }
.tv-bilan-head .tv-sec { margin-bottom: .6vh; }
.tv-bilan-vdn { display: flex; align-items: baseline; gap: 1.2em; margin: .4vh 0 .8vh; }
.tv-bilan-k { font-family: 'Anton', sans-serif; font-size: 1.7em; line-height: 1; letter-spacing: .03em; }
.tv-bilan-k small { font-family: 'Inter', sans-serif; font-size: .42em; font-weight: 800; margin-left: .25em; letter-spacing: .1em; }
.tv-bilan-k.res-V { color: #7ee08a; } .tv-bilan-k.res-D { color: #ff8a8a; } .tv-bilan-k.res-N { color: #fac056; }
.tv-bilan-nb { font-size: .6em; color: #9fb0c8; font-weight: 700; margin-left: auto; }
.tv-bilan-best { display: flex; flex-direction: column; gap: .3vh; padding: .6em .9em; border-radius: .5em; background: rgba(250, 192, 86, .10); border: 1px solid rgba(250, 192, 86, .35); }
.tv-bilan-bnom { font-weight: 800; font-size: 1.05em; }
.tv-bilan-bstat { font-size: .72em; color: #cfd8e6; }
.tv-bilan-bstat b { color: #7ee08a; }
.tv-bilan-podium { display: flex; flex-wrap: wrap; gap: .4vh 1.4em; margin-top: .6vh; font-size: .68em; color: #cfd8e6; }
.tv-bilan-pj b { color: #9fb0c8; margin-right: .3em; }
.tv-bilan-pj small { color: #9fb0c8; margin-left: .3em; }
.tv-grid4.tv-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-bilan-card { padding: 1.1vh 1.2vw; gap: .6vh; }
.tv-bilan-card .tv-sec { margin-bottom: .2vh; }
.tv-bilan-vdn { margin: .2vh 0 .5vh; }
.tv-bilan-best { padding: .45em .8em; }


/* ── Mode TV : planning (4 semaines, créneaux 9h / 14h) ── */
.tv-panel.tv-planning { gap: 1.6vh; }
.tv-plan { display: grid; gap: .7vh .5vw; flex: 1 1 0px; min-height: 0; --tvp-fs: .64em; }
.tv-plan-dow { font-size: .5em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6f819b; text-align: center; }
.tv-plan-dow.actif { color: #cfd8e6; }
.tv-plan-jour {
  min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .5vh;
  padding: .5vh .45vw; border-radius: .4em; background: #142238; border: 1px solid rgba(255, 255, 255, .08);
}
.tv-plan-jour.vide { background: #0e192b; border-color: rgba(255, 255, 255, .04); }
.tv-plan-jour.passe { opacity: .5; }
.tv-plan-jour.auj { border-color: #19a5e1; box-shadow: inset 0 0 0 1px #19a5e1; opacity: 1; }
.tv-plan-num { flex: none; font-size: .58em; font-weight: 800; color: #9fb0c8; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-plan-num small { font-size: .82em; text-transform: uppercase; letter-spacing: .06em; margin-left: .3em; }
.tv-plan-num em { font-style: normal; font-size: .82em; color: var(--accent-txt); margin-left: .5em; text-transform: uppercase; letter-spacing: .08em; }
.tv-plan-jour.auj .tv-plan-num { color: var(--accent-txt); }
.tv-plan-cr { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: .5em; align-items: start; font-size: var(--tvp-fs); }
.tv-plan-cr + .tv-plan-cr { border-top: 1px dashed rgba(255, 255, 255, .18); padding-top: .5em; }
.tv-plan-h { font-weight: 800; color: #f59a3e; padding-top: .35em; font-variant-numeric: tabular-nums; }
.tv-plan-ms { display: flex; flex-wrap: wrap; gap: .4em; min-width: 0; }
.tv-plan-m {
  --cat: var(--accent-txt); flex: 1 1 13em; min-width: 0; display: flex; flex-direction: column; gap: .2em;
  padding: .35em .6em; border-radius: .4em; background: #1d2d46; border-left: .3em solid var(--cat);
}
.tv-plan-cat { font-size: .82em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cat); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-plan-l2 { display: flex; align-items: center; gap: .5em; min-width: 0; font-weight: 700; color: #e9eff8; }
.tv-plan-l2 .tv-cal-tag { flex: none; }
.tv-plan-adv { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
.tv-plan-score { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.tv-plan-m.res-V .tv-plan-score { color: #7ee08a; } .tv-plan-m.res-D .tv-plan-score { color: #ff8a8a; } .tv-plan-m.res-N .tv-plan-score { color: #fac056; }

/* ══════════════ Une couleur par catégorie (championnat) ══════════════ */
.tv-card, .tv-cal-col { --cat: var(--accent-txt); }
.tv-card { border-top: 3px solid var(--cat); }
.tv-cal-col { border-top: 3px solid var(--cat); padding-top: .8vh; }
.tv-sec-title { color: var(--cat); }
.tv-ticker-cat { font-weight: 800; margin-right: .5em; letter-spacing: .05em; text-transform: uppercase; font-size: .9em; }
.tm-card { border-top: 3px solid var(--cat, transparent); }
.tm-nom { color: var(--cat, var(--text, var(--slate-800))); }
.jc-pill { border: 1px solid transparent; }
.ann-cat-badge { background-color: var(--rd-cat, var(--rd-secondary)); }
.rd-cat-badge { color: var(--rd-cat, var(--rd-primary)); }

/* TV : durée des diapos (barre de contrôle) */
.tv-secondes { display: inline-flex; align-items: center; gap: .3em; font-size: .55em; color: #cfd8e6; }
.tv-secondes input { width: 3.6em; padding: .25em .4em; font-size: 1em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #fff; text-align: center; }

/* ══════════════ GESTION ÉQUIPES (section interne) ══════════════ */
.gest-tete { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.gest-tete h2 { margin: 0; margin-right: auto; }
.gest-fiche-titre { display: flex; flex-direction: column; margin-right: auto; }
.gest-fiche-titre h2 { margin: 0; }
.gest-lib { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gest-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.gest-carte {
  background: var(--surface-2); border: 1px solid var(--border); border-top: 4px solid var(--border-2);
  border-radius: 14px; padding: 1rem 1.1rem; cursor: pointer; display: flex; flex-direction: column; gap: .45rem;
  transition: border-color .15s, transform .15s;
}
.gest-carte:hover { border-color: var(--border-2); transform: translateY(-1px); }
.gest-carte-tete { display: flex; align-items: center; gap: .5rem; }
.gest-carte-nom { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.gest-mon { font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-txt); }
.gest-carte-info { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--slate-500); }
.gest-carte-info strong { color: var(--text); font-weight: 600; }
.gest-carte-prochain { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; font-size: .84rem; padding-top: .45rem; border-top: 1px solid var(--border); }
.gest-quand { font-weight: 700; color: var(--text); }
.gest-statut { font-size: .72rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; white-space: nowrap; }
.gest-statut.st-a-preparer, i.st-a-preparer { background: rgba(148, 163, 184, .18); color: #a7b6c9; }
.gest-statut.st-en-cours, i.st-en-cours { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.gest-statut.st-complet, i.st-complet { background: rgba(132, 204, 22, .16); color: #a3e635; }
.gest-statut.st-joue, i.st-joue { background: rgba(25, 165, 225, .14); color: var(--accent-txt); }
.gest-compte-n { font-size: .8rem; font-weight: 500; color: var(--slate-500); margin-left: .4rem; }
.gest-table-wrap { overflow-x: auto; }
.gest-effectif td, .gest-effectif th { white-space: nowrap; }
.gest-effectif .gest-nb { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.gest-effectif td.gest-nb.zero { color: var(--slate-400); font-weight: 500; }
.gest-cap { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-right: .4rem;
  border-radius: 50%; background: #fbbf24; color: #1a1a1a; font-size: .7rem; font-weight: 800; }
.gest-actions { white-space: nowrap; }
.gest-actions a { cursor: pointer; }
.gest-in { min-width: 0; width: 9rem; padding: .3rem .45rem; }
.gest-in-court { width: 5.5rem; }
.gest-ajout { margin: .9rem 0 .4rem; display: flex; flex-direction: column; gap: .5rem; }
.gest-ajout-ligne { display: flex; gap: .5rem; flex-wrap: wrap; }
.gest-recherche { flex: 1 1 260px; }
.gest-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; }
.gest-suggestions button { display: inline-flex; align-items: center; gap: .4rem; }
.gest-sugg-clt { font-size: .78rem; color: var(--slate-500); margin-left: .3rem; }
.gest-club { font-size: .66rem; font-weight: 700; text-transform: uppercase; padding: .05rem .4rem; border-radius: 999px; background: rgba(132, 204, 22, .16); color: #a3e635; }
.gest-nouveau { display: flex; flex-wrap: wrap; gap: .5rem; padding: .8rem; border: 1px dashed var(--border-2); border-radius: 12px; }
.gest-nouveau input { flex: 1 1 150px; }
.gest-matchs { display: flex; flex-direction: column; gap: .45rem; }
.gest-match {
  display: grid; grid-template-columns: minmax(11rem, auto) minmax(0, 1fr) auto auto auto; align-items: center; gap: .8rem;
  padding: .6rem .9rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  border-left: 4px solid var(--border-2); cursor: pointer;
}
.gest-match:hover { border-color: var(--border-2); }
.gest-match.passe { opacity: .7; }
.gest-match-adv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gest-retenus { font-size: .82rem; color: var(--slate-500); white-space: nowrap; }
.gest-score { font-weight: 800; }
.gest-report { margin-left: .45rem; font-size: .68rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; background: rgba(251, 146, 60, .16); color: #fb923c; }
.gest-notes { width: 100%; margin-bottom: .5rem; }
.gest-notes-lues { white-space: pre-wrap; color: var(--slate-500); }
.gest-moncompte { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.gest-liste-outils { align-items: center; margin: .6rem 0; }
.gest-quand-edit { display: inline-flex; align-items: center; gap: .35rem; cursor: default; }
.gest-quand-edit input { padding: .25rem .4rem; font-weight: 600; }
.gest-quand-edit input[type="date"] { width: 9.6rem; }
.gest-in-heure { width: 4.6rem; }
.gest-ajout-eq { margin-right: .5rem; padding: .25rem .6rem; font-size: .8rem; }
.gest-actions-liste { white-space: normal !important; min-width: 11.5rem; }
.gest-actions-liste .gest-ajout-eq { display: block; max-width: 12rem; margin: 0 0 .35rem; }
.plan-aide { margin: -.4rem 0 .7rem; }
.plan-match.deplacable { cursor: grab; }
.plan-match.deplacable:active { cursor: grabbing; }
.gest-equipes-j { white-space: normal !important; font-size: .82rem; color: var(--slate-500); min-width: 10rem; }
/* Modale de la rencontre */
.gest-m-adv { font-size: 1.05rem; margin: 0 0 .4rem; }
.gest-m-date, .gest-m-res { margin: 0 0 .6rem; color: var(--slate-500); }
.gest-feuille { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin: 0 0 .6rem; }
.gest-feuille a.primary.button { margin: 0; }
.gest-horaire { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin: .4rem 0; }
.gest-horaire label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--slate-500); }
.gest-compo { width: 100%; }
.gest-compo tr.retenu td { background: rgba(132, 204, 22, .07); }
.gest-compo tr.hors-effectif td { opacity: .6; }
.gest-dispo { display: inline-flex; gap: .3rem; }
.gest-dispo button { min-width: 2.6rem; padding: .25rem .6rem; }
.gest-dispo button.actif.d-oui { background: rgba(132, 204, 22, .22); border-color: #84cc16; color: #a3e635; }
.gest-dispo button.actif.d-incertain { background: rgba(251, 191, 36, .2); border-color: #fbbf24; color: #fbbf24; }
.gest-dispo button.actif.d-non { background: rgba(239, 68, 68, .18); border-color: #ef4444; color: #fca5a5; }
.gest-retenu { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.gest-retenu span { display: none; }
.gest-place { white-space: nowrap; }
.gest-place .gest-num { width: auto; padding: .25rem .45rem; }
.gest-place .gest-double { margin-left: .35rem; padding: .25rem .6rem; }
.gest-place .gest-double.actif { background: rgba(56, 189, 248, .2); border-color: #38bdf8; color: #7dd3fc; }
.gest-place-txt { font-size: .85rem; font-weight: 700; }
.gest-reste { margin: .45rem 0 0; }
.gest-convoc-joueurs { flex: 1 1 100%; display: flex; flex-direction: column; gap: .4rem; }
.gest-cj { display: grid; grid-template-columns: minmax(0, 13rem) 5.5rem minmax(0, 1fr); align-items: center; gap: .6rem; }
.gest-cj-tete { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500); }
.gest-cj-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gest-cj-place { display: inline-block; min-width: 2.7rem; font-size: .8rem; color: #7dd3fc; }
.gest-cj input { min-width: 0; width: 100%; padding: .3rem .45rem; }
.gest-cj-heure.auto { font-style: italic; }
html[data-theme="clair"] .gest-cj-place { color: #0369a1; }
.plan-aide-mobile { display: none; }
/* Comptes capitaines */
.user-equipes { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .5rem 0; font-size: .85rem; }
.user-equipes label { display: inline-flex; align-items: center; gap: .3rem; }
.error-inline { color: #fca5a5; font-size: .8rem; }
/* Planning (calendrier mensuel) */
.plan-nav { display: flex; align-items: center; gap: .4rem; }
.plan-mois { min-width: 10rem; text-align: center; font-size: 1.05rem; }
.plan-filtre { max-width: 100%; }
.plan-legende { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .4rem 0 .9rem; font-size: .8rem; color: var(--slate-500); }
.plan-legende i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.plan-legende-st i { border-radius: 50%; margin-left: .5rem; }
.plan-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.plan-jsem { text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500); padding: .2rem 0; }
.plan-jour { min-height: 8.5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: .3rem; display: flex; flex-direction: column; gap: .2rem; }
.plan-creneau { flex: 1 0 auto; min-height: 3.3rem; display: flex; flex-direction: column; gap: .2rem; padding: .15rem; border-radius: 6px; }
.plan-creneau.aprem { border-top: 1px dashed var(--border-2); border-radius: 0 0 6px 6px; }
.plan-creneau-h { font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: var(--slate-400); line-height: 1; }
.plan-creneau.conflit { background: rgba(239, 68, 68, .1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .55); }
.plan-creneau.conflit .plan-creneau-h { color: #fca5a5; }
.gest-alertes { margin: .4rem 0 .2rem; }
.plan-conflits { margin: 0 0 1rem; border: 1px solid rgba(239, 68, 68, .45); border-radius: 12px; background: rgba(239, 68, 68, .06); }
.plan-conflits-tete {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left;
  background: transparent; border: none; color: #fca5a5; font-weight: 700; padding: .7rem 1rem; cursor: pointer;
}
.plan-conflits-voir { font-weight: 600; color: var(--accent); white-space: nowrap; }
.plan-conflits-liste { display: flex; flex-direction: column; gap: .8rem; padding: 0 1rem 1rem; }
.plan-conflit { border-top: 1px solid rgba(239, 68, 68, .25); padding-top: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.plan-conflit-tete { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-conflit-tete a { display: inline-block; font-weight: 700; cursor: pointer; }
.plan-conflit-tete a::first-letter { text-transform: uppercase; }
.plan-conflit-nb { font-size: .82rem; color: var(--slate-500); }
.plan-conflit-m {
  display: grid; grid-template-columns: minmax(12rem, auto) minmax(0, 1fr) auto; gap: .8rem; align-items: center;
  padding: .45rem .7rem; border-radius: 8px; background: var(--surface-2); border-left: 4px solid var(--slate-400); font-size: .88rem;
}
.plan-conflit-adv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-conflit-actions { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.plan-conflit-actions button { padding: .25rem .6rem; font-size: .8rem; }
.plan-conflit-actions input[type="date"] { width: 9.6rem; padding: .2rem .4rem; }
@media (max-width: 760px) { .plan-conflit-m { grid-template-columns: 1fr; } .plan-conflit-adv { white-space: normal; } }
.plan-creneau.cible { background: rgba(25, 165, 225, .14); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-jour.hors { opacity: .45; }
.plan-jour.auj { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-num { font-size: .78rem; font-weight: 700; color: var(--slate-500); }
.plan-jour.auj .plan-num { color: var(--accent); }
.plan-match {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; text-align: left;
  padding: .25rem .4rem; border-radius: 6px; border: 1px solid var(--border); border-left: 3px solid var(--slate-400);
  background: var(--surface-3); font-size: .74rem; line-height: 1.25; cursor: pointer; overflow: hidden; flex-shrink: 0;
}
.plan-l1 { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.plan-l2 { color: var(--slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.plan-pt { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .3rem; vertical-align: 1px; }
.plan-pt.st-a-preparer, .plan-legende i.st-a-preparer { background: #94a3b8; }
.plan-pt.st-en-cours, .plan-legende i.st-en-cours { background: #fbbf24; }
.plan-pt.st-complet, .plan-legende i.st-complet { background: #84cc16; }
.plan-pt.st-joue, .plan-legende i.st-joue { background: #19a5e1; }
.plan-liste { display: none; flex-direction: column; gap: .45rem; }
@media (max-width: 760px) {
  .plan-grille { display: none; }
  .plan-liste { display: flex; }
  .gest-match { grid-template-columns: 1fr auto; }
  .gest-match-adv { grid-column: 1 / -1; white-space: normal; }
}


/* ══════════════ Affiches « rencontre » : Annonce et Résultats au style du programme journée ══════════════
   Même gabarit que le programme journée (classes a4-* : titre évidé, carte « verre dépoli », noms sur cadre
   blanc, logos détourés, éclair, lieu en onglet, date en bas), aux couleurs du championnat (--rd-*, encres
   --rd-ink / --rd-on-primary calculées pour rester lisibles sur un fond clair). Annonce = une carte, comme
   le programme d'une seule équipe. Résultats = une rencontre par image : score à la place du VS, verdict en
   onglet à droite, détail des matchs puis classement en 2 colonnes remplies de haut en bas (1-2-3 | 4-5-6).
   Tout est proportionnel à --k, abaissé en JS si le contenu ne tient pas (rcAjuster). */
.result-design.rc-affiche, .annonce-design.rc-affiche {
  --a4-ciel: #08a8f8; --k: 1; text-align: left;   /* indépendant de la page qui l'affiche (appli, rendu serveur) */
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto 1fr; gap: 0;
  padding: 40px 48px;
  background-image: var(--rd-bg-image, linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 40%, rgba(0,0,0,.35) 100%));
}
.annonce-design.rc-annonce { --a4-titre: 130px; --a4-L: 300px; --a4-F: 52px; --a4-vsw: 150px; --a4-cap: 26px; --a4-quand: 40px; --a4-pad: 24px; --a4-in: 12px; --a4-gap: 20px; }
.result-design.rc-resultat {
  --a4-titre: calc(100px * var(--k)); --a4-L: calc(150px * var(--k)); --a4-F: calc(34px * var(--k)); --a4-vsw: calc(240px * var(--k));
  --a4-cap: calc(20px * var(--k)); --a4-quand: calc(28px * var(--k)); --a4-pad: calc(14px * var(--k)); --a4-in: calc(6px * var(--k)); --a4-gap: calc(14px * var(--k));
  grid-template-rows: auto 1fr; padding: calc(34px * var(--k)) 44px;
}
.result-design.rc-affiche.has-ptn, .annonce-design.rc-affiche.has-ptn { padding-bottom: 104px; }
/* Story 9:16 (pages résultats de la journée) : hors des zones couvertes par l'interface des stories */
.result-design.rc-resultat.trn-story {
  height: 1920px; padding: 180px 44px 200px;
  /* même largeur que le carré : on profite de la hauteur (grands logos, blocs aérés) sans tasser les noms */
  --a4-titre: calc(140px * var(--k)); --a4-L: calc(230px * var(--k)); --a4-gap: calc(40px * var(--k)); --a4-in: calc(10px * var(--k));
  --a4-F: calc(38px * var(--k)); --a4-quand: calc(32px * var(--k)); --a4-cap: calc(22px * var(--k)); --a4-pad: calc(18px * var(--k));
}
.rc-resultat.trn-story .rc-matchs { gap: calc(12px * var(--k)); padding: calc(18px * var(--k)) calc(18px * var(--k)); }
.rc-resultat.trn-story .rc-cl-grille { row-gap: calc(12px * var(--k)); }
.rc-resultat.trn-story .rc-classement { gap: calc(12px * var(--k)); }
.rc-resultat .a4-rows { margin: calc(12px * var(--k)) 0 0; }
.rc-affiche .a4-match { background: var(--rc-verre, rgba(255,255,255,.07)); }

/* Score à la place du VS (sur l'éclair) */
.rc-score svg { opacity: .55; }
.rc-score-txt {
  position: relative; display: flex; align-items: center; gap: .14em; white-space: nowrap;
  font-family: 'Anton', sans-serif; font-size: calc(var(--a4-L) * .72); line-height: 1; letter-spacing: .02em; color: #ffffff;
  transform: skewX(-8deg); --a4-ombre: var(--rd-ink, var(--rd-bg));
  text-shadow: 4px 4px 0 var(--a4-ombre), -2px 2px 0 var(--a4-ombre), 2px -2px 0 var(--a4-ombre), -2px -2px 0 var(--a4-ombre);
}
.rc-score-sep { font-size: .6em; }
/* Verdict en onglet dans le coin bas-droit (symétrique du lieu) */
.rc-verdict {
  grid-column: 3; justify-self: end; align-self: stretch; box-sizing: border-box; min-height: calc(var(--a4-quand) * 1.8); display: flex; align-items: center;
  font-family: 'Anton', sans-serif; font-size: var(--a4-cap); line-height: 1.15; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 0 .6em 0 .7em; border-radius: calc(var(--a4-quand) * .7) 0 25px 0;
  background: rgba(255,255,255,.38); color: #ffffff;
}
.rc-verdict.res-V { background: var(--rd-secondary); color: var(--rd-ink, var(--rd-bg)); }

/* Détail des matchs : nos joueurs à gauche, les leurs à droite, les sets au centre (de notre point de vue) */
.rc-matchs {
  display: flex; flex-direction: column; gap: calc(6px * var(--k));
  padding: calc(12px * var(--k)) calc(16px * var(--k)); border-radius: 22px;
  background: var(--rc-verre, rgba(255,255,255,.07)); border: 2px solid rgba(255,255,255,.22); box-shadow: 0 14px 32px rgba(0,0,0,.3);
}
.rc-m {
  display: grid; grid-template-columns: calc(54px * var(--k)) minmax(0, 1fr) calc(230px * var(--k)) minmax(0, 1fr); align-items: center;
  gap: calc(12px * var(--k)); font-size: calc(21px * var(--k)); line-height: 1.2;
}
.rc-m-tag {
  font-family: 'Anton', sans-serif; font-size: 1.05em; letter-spacing: .04em; text-align: center; padding: .12em 0; border-radius: .4em;
  background: rgba(255,255,255,.16); color: #ffffff;
}
.rc-m.gagne .rc-m-tag { background: var(--rd-primary); color: var(--rd-on-primary, #ffffff); }
.rc-m-j { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.6); }
.rc-m-nous { text-align: right; }
.rc-m.g-gauche .rc-m-nous, .rc-m.g-droite .rc-m-eux { color: #ffffff; font-weight: 800; }   /* nom du vainqueur du match */
.rc-m-sets {
  display: flex; justify-content: center; gap: .6em; white-space: nowrap;
  font-family: 'Anton', sans-serif; font-size: 1.12em; letter-spacing: .03em; color: var(--rd-secondary);
}
.rc-set i { font-style: normal; opacity: .55; margin: 0 .06em; }

/* Classement : 2 colonnes remplies de haut en bas (1-2-3 | 4-5-6), notre club encadré */
.rc-classement { display: flex; flex-direction: column; gap: calc(8px * var(--k)); }
.rc-cl-titre { font-weight: 800; font-size: calc(18px * var(--k)); letter-spacing: .1em; text-transform: uppercase; padding-left: 4px; color: var(--rd-secondary); }
.rc-cl-grille { display: grid; grid-auto-flow: column; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(8px * var(--k)) calc(14px * var(--k)); }
.rc-cl {
  display: grid; grid-template-columns: calc(40px * var(--k)) calc(40px * var(--k)) minmax(0, 1fr) auto; align-items: center; gap: calc(10px * var(--k));
  padding: calc(5px * var(--k)) calc(14px * var(--k)) calc(5px * var(--k)) calc(6px * var(--k)); border-radius: 14px;
  background: var(--rc-verre-ligne, rgba(255,255,255,.07)); border: 2px solid rgba(255,255,255,.14);
}
.rc-cl.nous { border-color: var(--rd-secondary); background: var(--rc-verre-fort, rgba(255,255,255,.16)); }
.rc-cl-pos {
  font-family: 'Anton', sans-serif; font-size: calc(24px * var(--k)); line-height: 1.3; text-align: center; color: var(--rd-secondary);
  border-radius: 10px; background: rgba(0,0,0,.28);
}
.rc-cl-logo { width: calc(40px * var(--k)); height: calc(40px * var(--k)); object-fit: contain; }
.rc-cl-ph {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 50%; background: #ffffff;
  font-family: 'Anton', sans-serif; font-size: calc(14px * var(--k)); color: var(--rd-ink, var(--rd-bg));
}
.rc-cl-nom { font-weight: 800; font-size: calc(19px * var(--k)); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-cl-pts { font-family: 'Anton', sans-serif; font-size: calc(26px * var(--k)); line-height: 1; color: #ffffff; white-space: nowrap; }
.rc-cl-pts small { font-family: 'Inter', sans-serif; font-size: .5em; font-weight: 800; margin-left: .25em; color: rgba(255,255,255,.6); letter-spacing: .06em; }


/* ══════════════ Navigation : menus déroulants de la barre du haut ══════════════
   Accueil · Publication ▾ · Gestion équipes ▾ · TV · Paramètres ▾ — chaque entrée de menu porte une
   ligne d'explication. Sur téléphone, le menu prend la largeur de la barre (fixed : la barre, floutée
   par backdrop-filter, sert de bloc conteneur). */
.nav-dd { position: relative; display: inline-flex; }
.nav-chev { font-size: .75em; opacity: .75; margin-left: .15rem; }
.tabs button.ouvert:not(.active) { background: var(--surface-2); color: var(--text); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 300; min-width: 300px; max-width: calc(100vw - 1.5rem);
  display: flex; flex-direction: column; gap: .1rem; padding: .4rem;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.nav-menu.nav-menu-droite { left: auto; right: 0; }
.tabs .nav-menu button {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left;
  padding: .55rem .8rem; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); white-space: normal;
}
.tabs .nav-menu button:hover { background: var(--surface-2); }
.tabs .nav-menu button.on { background: var(--accent-soft); border-color: rgba(25, 165, 225, .35); }
.nav-menu button b { font-size: .9rem; font-weight: 600; }
.nav-menu button span { font-size: .76rem; font-weight: 400; color: var(--slate-500); line-height: 1.35; }
.tabs .nav-menu button.on b { color: var(--accent-txt); }
.nav-sep { border-top: 1px solid var(--border); margin: .3rem .4rem; }
.h2-sous { color: var(--slate-500); font-weight: 500; }
@media (max-width: 760px) {
  .nav-menu, .nav-menu.nav-menu-droite { position: fixed; top: calc(100% + 4px); left: .6rem; right: .6rem; min-width: 0; max-width: none; }
}


/* ══════════════ Gestion équipes sur téléphone (capitaines) ══════════════
   Les tableaux deviennent des cartes (une par joueur, libellés en clair), la modale de la rencontre tient
   dans l'écran avec de gros boutons de disponibilité, les rencontres s'affichent sur plusieurs lignes. */
@media (max-width: 760px) {
  .gest-table-wrap { overflow: visible; }
  .gest-effectif thead { display: none; }
  .gest-effectif, .gest-effectif tbody { display: block; width: 100%; }
  .gest-effectif tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; padding: .75rem .25rem; border-bottom: 1px solid var(--border); }
  .gest-effectif td { display: block; padding: 0; border: none; white-space: normal !important; min-width: 0 !important; }
  .gest-effectif td:first-child { flex: 1 1 100%; font-weight: 700; font-size: 1rem; color: var(--text); }
  .gest-effectif td[data-l]::before { content: attr(data-l) " "; color: var(--slate-500); font-weight: 500; font-size: .76rem; }
  .gest-effectif td.gest-nb { text-align: left; }
  .gest-effectif td.gest-vide { display: none; }
  .gest-effectif td.gest-equipes-j { flex: 1 1 100%; }
  .gest-effectif td.gest-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding-top: .2rem; }
  .gest-effectif td.gest-actions a { padding: .2rem 0; }
  .gest-actions-liste .gest-ajout-eq { display: inline-block; max-width: 100%; margin: 0; }
  .gest-effectif .gest-in { width: 100%; }

  .gest-match { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .8rem; }
  .gest-match > .gest-quand, .gest-match > .gest-quand-edit, .gest-match-adv { grid-column: 1 / -1; }
  .gest-quand-edit { flex-wrap: wrap; }
  .gest-quand-edit input[type="date"] { width: auto; flex: 1 1 9rem; }
  .gest-match .gest-statut { justify-self: end; }

  .modal { min-width: 0; }
  .gest-compo thead { display: none; }
  .gest-compo, .gest-compo tbody { display: block; }
  .gest-compo tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .6rem; align-items: center; padding: .65rem .3rem; border-bottom: 1px solid var(--border); }
  .gest-compo tr.retenu { background: rgba(132, 204, 22, .07); }
  .gest-compo td { display: block; padding: 0; border: none; background: transparent !important; }
  .gest-compo td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .gest-compo td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .gest-compo td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .gest-compo td.gest-place { grid-column: 1 / -1; grid-row: 3; display: flex; gap: .4rem; }
  .gest-compo td.gest-place.vide { display: none; }
  .gest-place .gest-num { flex: 1; padding: .55rem .5rem; font-size: .95rem; }
  .gest-place .gest-double { flex: 1; margin: 0; padding: .55rem 0; font-size: .95rem; justify-content: center; text-align: center; }
  .gest-cj { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .3rem .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
  .gest-cj-nom { grid-column: 1 / -1; font-weight: 600; }
  .gest-cj-tete { display: none; }
  .gest-dispo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; width: 100%; }
  .gest-dispo button { padding: .6rem 0; font-size: .95rem; justify-content: center; text-align: center; }
  .gest-retenu { padding: .35rem .7rem; border: 1px solid var(--border-2); border-radius: 999px; font-size: .85rem; }
  .gest-retenu span { display: inline; }
  .gest-retenu input { width: 1.15rem; height: 1.15rem; }
  .gest-horaire label { flex: 1 1 8rem; }

  .plan-nav { width: 100%; flex-wrap: wrap; }
  .plan-mois { min-width: 0; flex: 1; }
  .plan-filtre { width: 100%; }
  .plan-aide { display: none; }
  .plan-aide-mobile { display: block; margin: -.4rem 0 .7rem; }
}


/* ══════════════ Thème clair (choix par utilisateur : menu du compte, en haut à droite) ══════════════
   Mêmes jetons que le thème sombre, valeurs claires ; les conteneurs des visuels gardent la palette
   sombre (voir :root). Puis quelques couleurs pensées pour un fond foncé, réajustées. */
html[data-theme="sombre"] { color-scheme: dark; }
html[data-theme="clair"] {
  color-scheme: light;
  --bg: #eef3f9; --surface: #ffffff; --surface-2: #f2f6fb; --surface-3: #e5ecf5;
  --border: #dae3ee; --border-2: #c2cfdf; --text: #14243b;
  --accent: #0b84c2; --accent-soft: rgba(11, 132, 194, .11); --accent-txt: #0a6aa0;
  --champ-bg: #ffffff; --topbar-bg: rgba(255, 255, 255, .9);
  --slate-900: #14243b; --slate-700: #2b3d56; --slate-600: #44586f; --slate-500: #5d708a; --slate-400: #8797ad;
  --slate-300: #c2cfdf; --slate-200: #dae3ee; --slate-100: #eef3f9; --slate-50: #f7f9fc;
  --green-900: #0b4a6e; --green-700: #0b84c2; --green-600: #0b84c2; --green-500: #0b84c2; --green-50: #e7f3fa;
  --orange: #d0640f; --orange-50: #fff1e4; --red: #cf3427; --red-50: #fdecea;
  --shadow-sm: 0 1px 2px rgba(20, 36, 59, .06); --shadow-md: 0 6px 18px rgba(20, 36, 59, .08); --shadow-lg: 0 16px 40px rgba(20, 36, 59, .12);
}
html[data-theme="clair"] body {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(25, 165, 225, .10), transparent 60%),
    radial-gradient(820px 460px at 96% 14%, rgba(225, 115, 25, .06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="clair"] body.mode-tv { background: #0a1424; }
html[data-theme="clair"] .card { background: var(--surface); }
html[data-theme="clair"] button:hover:not(:disabled) { border-color: var(--slate-400); }
html[data-theme="clair"] a:hover { color: #075a88; }
html[data-theme="clair"] .nav-menu { box-shadow: 0 14px 36px rgba(20, 36, 59, .16); }

/* Menu du compte (apparence) */
.nav-compte { display: inline-flex; align-items: center; gap: .4rem; }
.nav-compte-ico { width: 16px; height: 16px; flex: none; }
.nav-compte .role-badge { margin-left: 0; }
.nav-menu-titre { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); padding: .45rem .8rem .25rem; }
@media (max-width: 760px) { .nav-compte-nom, .nav-compte .role-badge { display: none; } }

/* Thème clair : couleurs pensées pour un fond sombre, assombries pour rester lisibles sur blanc */
html[data-theme="clair"] { --slate-400: #6b7c93; }
html[data-theme="clair"] .topbar { color: var(--text); }
/* Couleur de catégorie (réglée par championnat, souvent vive) : plus foncée sur fond clair */
html[data-theme="clair"] :is(.tm-nom, .gest-lib, .jc-pill, .r-champ-cat, .plan-conflit-eq, .a-cat) { filter: brightness(.6) saturate(1.4); }
html[data-theme="clair"] .home-alert.warn, html[data-theme="clair"] .plan-conflits-tete,
html[data-theme="clair"] .plan-creneau.conflit .plan-creneau-h, html[data-theme="clair"] .error-inline { color: #b42318; }
html[data-theme="clair"] :is(.team-act-todo, .tm-where.ext, .rank-pos, .rank-pos + sup, .trn-maj-warn) { color: #b45309; }
html[data-theme="clair"] .rank-pos sup, html[data-theme="clair"] .tm-rank sup { color: #b45309; }
html[data-theme="clair"] :is(.tm-where.dom, .tm-res.res-V, .jc-score.res-V) { color: #15803d; }
html[data-theme="clair"] :is(.gest-report, .team-soon) { color: #c2410c; }
html[data-theme="clair"] .gest-statut.st-a-preparer { color: #4a5d75; background: rgba(93, 112, 138, .14); }
html[data-theme="clair"] .gest-statut.st-en-cours { color: #8a5a00; background: rgba(251, 191, 36, .2); }
html[data-theme="clair"] .gest-statut.st-complet { color: #3f6212; background: rgba(132, 204, 22, .2); }
html[data-theme="clair"] .gest-club { color: #3f6212; background: rgba(132, 204, 22, .2); }
html[data-theme="clair"] .gest-dispo button.actif.d-oui { color: #3f6212; }
html[data-theme="clair"] .gest-dispo button.actif.d-incertain { color: #8a5a00; }
html[data-theme="clair"] .gest-dispo button.actif.d-non { color: #b42318; }
html[data-theme="clair"] .gest-place .gest-double.actif { color: #0369a1; }
html[data-theme="clair"] .success-inline { color: #15803d; }
html[data-theme="clair"] .error { color: #b42318; }


/* ── Gestion équipes : club voisin, réponses des joueurs, liens de disponibilité ── */
.gest-voisin { display: flex; align-items: flex-start; gap: .5rem; margin: .2rem 0 .6rem; cursor: pointer; }
.gest-voisin input { margin-top: .2rem; }
.gest-par-joueur { margin-left: .45rem; font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-txt); white-space: nowrap; }
.plan-conflits-aide { margin: 0 0 .2rem; }
.gest-h3-ligne { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.gest-h3-ligne h3 { margin-bottom: .5rem; }
.gest-btn-liens { font-size: .82rem; }
.gest-liens { display: flex; flex-direction: column; }
.gest-lien { display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap;
  padding: .6rem .2rem; border-bottom: 1px solid var(--border); }
.gest-lien-nom { font-weight: 700; }
.gest-lien-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.gest-lien-actions button, .gest-lien-btn { padding: .35rem .7rem; font-size: .82rem; }
.gest-lien-btn { display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2);
  color: var(--text); text-decoration: none; font-weight: 550; }
.gest-lien-btn:hover { background: var(--surface-3); color: var(--text); }
.gest-lien-renouv { color: var(--slate-500); }


/* ══════════════ Mode TV : lisibilité à distance (télé du club, lue à plusieurs mètres) ══════════════
   Aucun texte sous ~22 px en 1080p (base 30 px), gris éclaircis, 2 équipes par écran pour le calendrier,
   les classements et le bilan (voir tvPanels). */
.tv { --tv-gris: #c3cfe0; }
.tv-h1-sub { font-size: .5em; color: var(--tv-gris); }
.tv-sec-title { font-size: 1.12em; }
.tv-sec-sub { font-size: .74em; color: var(--tv-gris); }
.tv-muted, .tv-sub.tv-muted { color: var(--tv-gris); }
.tv-label { font-size: .72em; color: var(--tv-gris); }
.tv-ticker { font-size: .86em; }
.tv-ticker-item { color: #e9eff8; }
.tv-hint { font-size: .55em; color: #9fb0c8; }
/* Prochaines rencontres */
.tv-duel-sm .tv-duel-nom { font-size: .88em; }
.tv-duel-sm .tv-duel-when { font-size: .76em; color: #e9eff8; }
.tv-duel-tag { font-size: .66em; }
.tv-duel-sm .tv-duel-jn { font-size: 1.1em; }
/* Calendrier (2 colonnes) */
.tv-cal-col .tv-cal { font-size: .86em; gap: .55vh; }
.tv-cal-col .tv-cal-row { grid-template-columns: 5.4em 3.3em 1fr auto; gap: .7em; padding: .32em .7em; color: #e9eff8; }
.tv-cal-col .tv-cal-row.joue { color: var(--tv-gris); }
.tv-cal-tag { font-size: .66em; }
.tv-cal-col .tv-sec-title { font-size: 1.05em; }
/* Résultats */
.tv-res-row { font-size: .9em; }
.tv-res-lbl { font-size: .74em; color: var(--tv-gris); }
.tv-res-date { font-size: .8em; color: var(--tv-gris); }
/* Classements (2 cartes) */
.tv-classement-sm { font-size: .95em; }
.tv-classement td { font-size: inherit; }   /* la règle générale des tableaux (rem) écrasait la taille TV */
.tv-classement-sm td { padding: .34em .55em; }
.tv-pos { color: var(--tv-gris); }
.tv-unit { font-size: .55em; color: var(--tv-gris); }
/* Bilan (2 cartes) */
.tv-bilan-card { padding: 1.6vh 1.6vw; gap: 1vh; }
.tv-bilan-k { font-size: 2.1em; }
.tv-bilan-nb { font-size: .74em; color: var(--tv-gris); }
.tv-bilan-bnom { font-size: 1.2em; }
.tv-bilan-bstat { font-size: .86em; }
.tv-bilan-podium { font-size: .82em; gap: .6vh 1.6em; }
.tv-bilan-pj b, .tv-bilan-pj small { color: var(--tv-gris); }
/* Planning */
.tv-plan-dow { font-size: .66em; color: #9fb0c8; }
.tv-plan-num { font-size: .74em; color: var(--tv-gris); }


/* ══════════════ L'équipe qui reçoit d'abord, étiquette DOM. / EXT. (20/10/2026) ══════════════ */
/* Planning : case de rencontre = [équipe qui reçoit / équipe qui se déplace] + étiquette verticale à droite */
.plan-match { flex-direction: row; align-items: stretch; gap: .3rem; }
.plan-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.plan-l1, .plan-l2 { color: var(--slate-500); font-weight: 600; }
.plan-nous { color: var(--text); font-weight: 700; }
.plan-match .plan-lieu {
  flex: none; align-self: stretch; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);   /* se lit de bas en haut */
  padding: .15rem .08rem; font-size: .56rem; line-height: 1; letter-spacing: .08em; border-radius: 4px;
}
.tm-where { white-space: nowrap; }
.jc-txt .tm-where, .gest-match-adv .tm-where, .gest-m-adv .tm-where, .gest-carte-prochain .tm-where { margin-right: .3rem; vertical-align: 1px; }
/* TV : prochaines rencontres, l'équipe qui reçoit à gauche */
.tv-duel-ext .tv-duel-adv { order: 1; }
.tv-duel-ext .tv-duel-mid { order: 2; }
.tv-duel-ext .tv-duel-nous { order: 3; }
/* TV : résultats (étiquette + rencontre) */
.tv-res-adv .tv-cal-tag { flex: none; margin-right: .2em; }
/* Visuel « Bilan de saison » : rencontre complète, notre équipe en évidence */
.bln-sc { font-family: 'Anton', sans-serif; letter-spacing: .04em; margin: 0 .3em; font-weight: 400; }
.bln-adv span { opacity: .78; }
.bln-adv span.bln-nous { opacity: 1; font-weight: 800; }

/* Bilan des joueurs : simples et doubles séparés */
.bln-col-note { font-size: .55em; font-weight: 600; opacity: .7; margin-left: .4em; letter-spacing: .02em; text-transform: none; }
.bln-jstat { font-size: 19px; }

/* Programme de la journée (Post, Story, A4 mairie) : l'équipe qui reçoit à gauche — à l'extérieur, notre
   club passe à droite (nom et logo) ; l'onglet « À l'extérieur » reste de notre point de vue */
.a4-duel.a4-duel-ext .a4-nom-nous, .a4-duel.a4-duel-ext .a4-logo-nous { grid-column: 3; }
.a4-duel.a4-duel-ext .a4-nom-adv, .a4-duel.a4-duel-ext .a4-logo-adv { grid-column: 1; }

/* Liens du club sur l'Accueil : juste sous l'en-tête */
.club-links.club-links-accueil { margin: 1rem 0 1.1rem; padding-top: 0; border-top: none; }
.club-links-modif { font-size: .8rem; color: var(--slate-500); cursor: pointer; margin-left: .2rem; }
.club-links-modif:hover { color: var(--accent); }

/* Liens de disponibilité : envoi par e-mail */
.gest-liens-mail { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: .2rem 0 .8rem; padding: .7rem .8rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.gest-liens-mail .hint { flex: 1 1 260px; margin: 0; }
.gest-lien-envoye { display: block; font-weight: 500; font-size: .74rem; color: var(--slate-500); }

.gest-coord-res { display: grid; gap: .3rem; margin: .4rem 0 .8rem; line-height: 1.5; font-size: .88rem; color: var(--slate-600); }
.gest-coord-res > * { margin: 0; }
.gest-coord-res summary { cursor: pointer; }
.gest-licencie { margin-left: .45rem; font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px;
  background: rgba(34, 197, 94, .14); color: #16a34a; white-space: nowrap; vertical-align: 1px; }
html[data-theme="clair"] .gest-licencie { background: #dcfce7; color: #15803d; }
.gest-lic-num { margin-left: .55rem; white-space: nowrap; }

/* Joueurs du club : tri par colonne */
.gest-tri { cursor: pointer; user-select: none; }
.gest-tri:hover, .gest-tri:focus-visible { color: var(--text); outline: none; }
.gest-tri.actif { color: var(--accent-txt); }
.gest-tri-fl { font-size: .7em; }
.gest-tri-mobile { display: none; }
@media (max-width: 760px) {
  .gest-tri-mobile { display: block; flex: 1 1 100%; }
}

/* Téléphone / e-mail en icônes : bulle au survol, clic = appel / messagerie */
.gest-effectif .gest-ic-td { text-align: center; }
.gest-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: 999px; color: var(--accent-txt); background: var(--surface-2); border: 1px solid var(--border-2); vertical-align: middle; }
.gest-ic::before { content: ""; width: 1rem; height: 1rem; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.gest-ic-tel { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.gest-ic-mail { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E"); }
.gest-ic:hover, .gest-ic:focus-visible { background: var(--accent-soft); border-color: var(--accent); outline: none; }
.gest-ic[data-tip]:hover::after, .gest-ic[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 30;
  bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: .3rem .6rem; border-radius: 7px; background: #0b1524; color: #fff; border: 1px solid rgba(255, 255, 255, .14);
  font-size: .82rem; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }

/* Liste du club : colonnes adaptées à la largeur disponible (au-dessus du format téléphone) */
.gest-club-liste { container: jclub / inline-size; }
.gest-repli, .gest-th-court { display: none; }
@media (min-width: 761px) {
  .gest-club-liste .gest-equipes-j { min-width: 8rem; max-width: 15rem; }
  .gest-club-liste .gest-actions-liste { min-width: 10rem; }
  .gest-club-liste .gest-actions-liste .gest-ajout-eq { max-width: 10.5rem; }
  @container jclub (max-width: 1140px) {   /* « Dernière feuille » sous le classement, « licencié » à côté de la licence */
    .gest-col-large { display: none; }
    .gest-repli-feuille { display: block; font-size: .74rem; color: var(--slate-500); }
    span.gest-repli { display: inline-block; }
    .gest-tri-mobile { display: block; flex: 0 1 17rem; }
  }
  @container jclub (max-width: 960px) {    /* compact : marges réduites, textes sur plusieurs lignes */
    .gest-club-liste .gest-effectif th, .gest-club-liste .gest-effectif td { padding-left: .45rem; padding-right: .45rem; }
    .gest-club-liste .gest-effectif td:first-child { white-space: normal; min-width: 6.5rem; }
    .gest-club-liste .gest-th-long { display: none; }
    .gest-club-liste .gest-th-court { display: inline; }
    .gest-club-liste span.gest-repli { display: table; margin: .25rem 0 0; }
    .gest-club-liste .gest-equipes-j { min-width: 6rem; font-size: .76rem; }
    .gest-club-liste .gest-actions-liste { min-width: 7.5rem; }
    .gest-club-liste .gest-actions-liste .gest-ajout-eq { max-width: 7.5rem; }
  }
}

/* Joueurs du club : équipes aux couleurs de leur championnat */
.gest-eq-j { display: block; padding: .05rem 0 .05rem .5rem; border-left: 3px solid var(--cat); line-height: 1.35; color: var(--text); }
.gest-eq-j + .gest-eq-j { margin-top: .35rem; }
.gest-eq-lib { color: var(--cat); font-weight: 700; }
.champ-nom-cat { box-shadow: inset 4px 0 0 var(--cat, transparent); }
html[data-theme="clair"] .gest-eq-lib { filter: brightness(.6) saturate(1.4); }

/* ══════════════ Mode TV : bilan de saison par équipe (hiver + printemps) ══════════════ */
.tv-bilan-head .tv-bilan-vdn { margin: 0; flex: none; }
.tv-bilan-champs { display: flex; flex-direction: column; gap: .7vh; }
.tv-bilan-ch { display: grid; grid-template-columns: 6.6em 2.4em 3em 1fr auto; align-items: baseline; gap: .7em;
  padding: .45em .8em; border-radius: .5em; background: rgba(255, 255, 255, .05); border-left: .25em solid var(--cat); font-size: 1em; }
.tv-bilan-phase { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--cat); }
.tv-bilan-div { font-weight: 800; color: var(--tv-gris); }
.tv-bilan-place { font-family: 'Anton', sans-serif; font-size: 1.2em; color: #fac056; line-height: 1; }
.tv-bilan-place sup { font-size: .5em; }
.tv-bilan-place small { font-family: 'Inter', sans-serif; font-size: .66em; color: var(--tv-gris); margin-left: .2em; }
.tv-bilan-chvd { display: flex; gap: .7em; font-weight: 800; white-space: nowrap; }
.tv-bilan-chvd .res-V { color: #7ee08a; } .tv-bilan-chvd .res-D { color: #ff8a8a; } .tv-bilan-chvd .res-N { color: #fac056; }
.tv-bilan-statut { font-size: .84em; font-weight: 700; color: var(--tv-gris); white-space: nowrap; }
.tv-bilan-ch.st-en_cours .tv-bilan-statut { color: #7fd0f5; }
.tv-bilan-ch.st-a_venir { opacity: .8; }
.tv-bilan-joueurs { display: flex; flex-direction: column; gap: .5vh; margin-top: .8vh; }
.tv-bilan-j { display: grid; grid-template-columns: 1.3em 1fr auto; align-items: baseline; gap: .8em; padding: .3em .8em;
  border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1em; }
.tv-bilan-j.premier { font-size: 1.08em; border: 1px solid rgba(250, 192, 86, .35); border-radius: .5em; background: rgba(250, 192, 86, .10); }
.tv-bilan-jr { font-weight: 800; color: var(--tv-gris); }
.tv-bilan-j.premier .tv-bilan-jr { color: #fac056; }
.tv-bilan-jn { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-bilan-js { font-size: .82em; color: #cfd8e6; white-space: nowrap; }

/* ══════════════ Mode TV : calendrier et classements sur un écran, bilan par équipe (20/10/2026) ══════════════
   .tv-fit : zone qui prend la hauteur restante ; _tvAjuster baisse --tvf tant que le contenu déborde. */
.tv-fit { flex: 1 1 0px; min-height: 0; overflow: hidden; font-size: calc(var(--tvf, 1) * 1em); }
/* Calendrier : toutes les équipes, date en vignette (jour / numéro / mois, comme l'Accueil) */
.tv-cal-cols.tv-fit { gap: 1.2vw; align-content: start; }
.tv-cal-col .tv-cal { font-size: .9em; gap: .7vh; }
.tv-cal-col .tv-cal-row { display: flex; align-items: center; gap: .65em; padding: .2em .5em; }
.tv-cal-cols.tv-fit .tv-sec-title { font-size: .92em; }
.tv-cal-tuile { flex: none; width: 3.2em; display: flex; flex-direction: column; align-items: center; padding: .2em 0;
  border-radius: .55em; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); line-height: 1; }
.tv-cal-dow, .tv-cal-mon { font-size: .75em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tv-gris); }
.tv-cal-day { font-size: 1.3em; font-weight: 800; margin: .05em 0; color: #fff; }
.tv-cal-row.joue .tv-cal-day { color: var(--tv-gris); }
/* prochaine rencontre : aux couleurs de l'équipe de la colonne (--cat), plus en orange / bleu pour toutes */
.tv-cal-col .tv-cal-row.prochaine { background: color-mix(in srgb, var(--cat) 14%, transparent);
  outline: 1px solid color-mix(in srgb, var(--cat) 55%, transparent); }
.tv-cal-row.prochaine .tv-cal-tuile { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 20%, transparent); }
.tv-cal-row.prochaine .tv-cal-day { color: var(--cat); }
.tv-cal-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25em; line-height: 1.2; }
.tv-cal-l1 { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.tv-cal-col .tv-cal-adv { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
/* Classements : toutes les poules, logos */
.tv-cls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6vh 1.6vw; align-content: start; }
.tv-cls-grid.n1 { grid-template-columns: minmax(0, 1fr); }
.tv-cls-grid.n5, .tv-cls-grid.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-cls-grid .tv-card { gap: .5vh; padding: 1vh 1.1vw; }
.tv-cls-grid .tv-sec { margin-bottom: .2vh; }
.tv-classement-logo { font-size: .92em; table-layout: auto; }
.tv-classement-logo td { padding: .1em .4em; vertical-align: middle; line-height: 1.2; }
.tv-cl-logo { width: 1.4em; }
.tv-cl-logo img, .tv-cl-ph { width: 1.2em; height: 1.2em; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px;
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.tv-cl-ph { font-size: .5em; width: 2.4em; height: 2.4em; font-weight: 800; color: #0a1424; }
.tv-classement-logo .tv-nom { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Icônes simples (1 raquette) / doubles (2 raquettes) */
.tv-ic { display: inline-block; width: 1.2em; height: 1.2em; flex: none; background: currentColor; vertical-align: -.2em;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.tv-ic-s { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='9' cy='9' rx='5.6' ry='6.6' transform='rotate%28-45 9 9%29' stroke-width='2'/%3E%3Cpath d='M6.4 9.6 11.6 8.4M8.4 6.4 9.6 11.6' stroke-width='1.3'/%3E%3Cpath d='M13.4 13.4 20.6 20.6' stroke-width='3.2'/%3E%3Ccircle cx='19.4' cy='4.6' r='2.3' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.tv-ic-d { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='7.4' cy='7.6' rx='4.4' ry='5.3' transform='rotate%28-35 7.4 7.6%29' stroke-width='1.9'/%3E%3Cpath d='M10.2 11.6 17.8 21.4' stroke-width='2.8'/%3E%3Cellipse cx='16.6' cy='7.6' rx='4.4' ry='5.3' transform='rotate%2835 16.6 7.6%29' stroke-width='1.9'/%3E%3Cpath d='M13.8 11.6 6.2 21.4' stroke-width='2.8'/%3E%3C/svg%3E"); }
.tv-sd { display: inline-flex; align-items: center; gap: .25em; white-space: nowrap; color: #e9eff8; }
.tv-sd .tv-ic { margin-right: .15em; color: var(--tv-gris); }
.tv-sd b { color: #7ee08a; font-weight: 800; font-size: 1.1em; }
.tv-sd small { color: var(--tv-gris); font-weight: 700; }
/* Bilan : un écran par équipe, section hiver + section printemps */
.tv-bilan2 .tv-h1 { align-items: baseline; }
.tv-bl-equipe { color: var(--cat); }
.tv-bl-sections { flex: 1 1 0px; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2vw; }
.tv-bl-sec { min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; padding: 2vh 1.8vw 0; border-radius: .8em;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10); border-top: .3em solid var(--cat); overflow: hidden; }
.tv-bl-sec.st-a_venir, .tv-bl-sec.st-absent { padding-bottom: 2vh; }
.tv-bl-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.tv-bl-titre { display: flex; flex-direction: column; gap: .3em; min-width: 0; }
.tv-bl-phase { font-family: 'Anton', sans-serif; font-size: 2.3em; letter-spacing: .05em; text-transform: uppercase; color: var(--cat); line-height: 1; }
.tv-bl-div { font-size: .8em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--tv-gris); }
.tv-bl-place { font-family: 'Anton', sans-serif; font-size: 2.6em; color: #fac056; line-height: 1; flex: none; }
.tv-bl-place sup { font-size: .42em; }
.tv-bl-place small { font-family: 'Inter', sans-serif; font-size: .34em; color: var(--tv-gris); margin-left: .2em; }
.tv-bl-ligne2 { display: flex; align-items: baseline; gap: 1em; flex-wrap: wrap; }
.tv-bl-statut { margin-left: auto; font-size: .8em; font-weight: 700; color: var(--tv-gris); }
.tv-bl-sec.st-en_cours .tv-bl-statut { color: #7fd0f5; }
.tv-bl-vide { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2vh 2vw;
  border: 2px dashed rgba(255, 255, 255, .14); border-radius: .8em; color: var(--tv-gris); font-size: .95em; font-weight: 700; }
/* Podium : 2e · 1er · 3e */
/* les marches prennent une part de la hauteur restante (et rétrécissent au besoin) : le podium tient quelle que
   soit la hauteur de la fenêtre (télé plein écran ou navigateur avec ses barres) */
.tv-podium3 { flex: 1 1 0px; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 1vw; }
.tv-pod-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 1vh; text-align: center; }
.tv-pod-nom, .tv-pod-stats { flex: none; }
.tv-pod-nom { display: flex; flex-direction: column; line-height: 1.1; max-width: 100%; }
.tv-pod-prenom { font-size: .86em; font-weight: 600; color: #e9eff8; }
.tv-pod-famille { font-size: 1.05em; font-weight: 800; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-pod-col.r1 .tv-pod-famille { font-size: 1.2em; color: #fcd779; }
.tv-pod-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .3em 1em; font-size: .86em; }
.tv-pod-marche { width: 100%; display: flex; justify-content: center; padding-top: .25em; border-radius: .5em .5em 0 0;
  font-family: 'Anton', sans-serif; font-size: 2.2em; line-height: 1; color: #0a1424; flex: 0 1 auto; min-height: 1.15em; overflow: hidden; }
.tv-pod-col.r1 .tv-pod-marche { height: 60%; min-height: 1.8em; background: linear-gradient(#fde29a, #e0a83a); }
.tv-pod-col.r2 .tv-pod-marche { height: 42%; min-height: 1.45em; background: linear-gradient(#eef2f8, #a9b6c8); }
.tv-pod-col.r3 .tv-pod-marche { height: 28%; min-height: 1.15em; background: linear-gradient(#efb27c, #b8692f); }
/* Prochaines rencontres / résultats dans une zone ajustée : logos proportionnels au texte (sinon fixés en vw) */
.tv-fit .tv-next-card .tv-duel-logo { width: 3.6em; height: 3.6em; }

/* ══════════════ Accueil réorganisé (20/10/2026) : à faire · prochaines / résultats · équipes · pied ══════════════ */
.home2-sec { margin-bottom: 1.4rem; min-width: 0; }
.home2-titre { display: flex; align-items: center; gap: .6rem; }
.home2-nb { font-size: .7rem; letter-spacing: 0; padding: .05rem .5rem; border-radius: 999px; background: rgba(225, 115, 25, .16); color: #f0a35c; }
.home2-lien { margin-left: auto; font-size: .74rem; letter-spacing: 0; text-transform: none; font-weight: 600; cursor: pointer; color: var(--accent-txt); }
.home2-liste { display: flex; flex-direction: column; border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.home2-todo, .home2-jour { display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem; border-top: 1px solid var(--border); }
.home2-todo:first-child, .home2-jour:first-child { border-top: none; }
.home2-todo-mark { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: #f0a35c; }
.home2-todo.t-warn .home2-todo-mark { background: #ff7a6b; }
.home2-todo.t-info .home2-todo-mark { background: var(--slate-500); }
.home2-todo-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.home2-todo-txt strong { font-weight: 700; color: var(--text); }
.home2-todo-txt span { font-size: .8rem; color: var(--slate-500); }
.home2-todo button { flex: none; }
.home2-ok { margin: 0; padding: .7rem .9rem; border: 1px dashed var(--border-2); border-radius: 14px; color: #7ee08a; font-weight: 700; font-size: .9rem; }
.home2-sec .home-scheduled { margin-top: .6rem; }
.home2-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; }
.home2-matchs { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.home2-heure { font-size: .78rem; color: var(--slate-500); white-space: nowrap; }
.home2-act { flex: none; font-size: .8rem; font-weight: 700; cursor: pointer; color: #f0a35c; white-space: nowrap; }
.home2-act.fait { color: #7ee08a; }
.home2-eqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .7rem; }
.home2-eq { min-width: 0; padding: .65rem .85rem .65rem 1.1rem; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border-2); box-shadow: inset 4px 0 0 var(--cat, transparent); }
.home2-eq-tete { display: flex; align-items: center; justify-content: space-between; gap: .8rem; color: inherit; text-decoration: none; }
.home2-eq-tete.cliquable { cursor: pointer; }
.home2-eq-id { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.home2-eq-nom { font-weight: 800; color: var(--cat, var(--text)); }
.home2-eq-sub { font-size: .8rem; color: var(--slate-500); }
.home2-eq-place { flex: none; font-size: 1.35rem; font-weight: 800; color: var(--text); line-height: 1; white-space: nowrap; }
.home2-eq-place sup { font-size: .55em; }
.home2-eq-place small { font-size: .55em; font-weight: 600; color: var(--slate-500); margin-left: .15em; }
.home2-eq .team-standings { margin-top: .6rem; }
.home2-pied { margin-top: .4rem; padding-top: .9rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .7rem; }
.home2-pied .club-links.club-links-accueil { margin: 0; }
.home2-synchros summary { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; cursor: pointer; list-style: none; font-size: .8rem; color: var(--slate-500); }
.home2-synchros summary::-webkit-details-marker { display: none; }
.home2-synchros summary::after { content: "▾"; margin-left: auto; }
.home2-synchros[open] summary::after { content: "▴"; }
.home2-sync-titre { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.home2-sync-mini { display: inline-flex; align-items: center; gap: .35rem; }
.home2-sync-mini .sync-dot { margin-top: 0; width: 8px; height: 8px; }
.home2-synchros .sync-card { margin-top: .6rem; }
html[data-theme="clair"] .home2-eq-nom { filter: brightness(.6) saturate(1.4); }
html[data-theme="clair"] :is(.home2-act, .home2-nb) { color: #b45309; }
html[data-theme="clair"] :is(.home2-act.fait, .home2-ok) { color: #15803d; }
@media (max-width: 760px) {
  .home2-duo { grid-template-columns: minmax(0, 1fr); }
  .home2-todo { flex-wrap: wrap; }
  .home2-todo-txt { flex-basis: calc(100% - 1.5rem); }
  .home2-todo button { margin-left: 1.4rem; }
  .home2-jour { align-items: flex-start; flex-wrap: wrap; }
  .home2-jour .home2-act { order: 3; flex-basis: 100%; text-align: right; }
}

/* ══════════════ Affiche résultat : l'équipe gagnante bien visible (20/10/2026) ══════════════
   Quelle qu'elle soit (nous ou l'adversaire) : plaque du nom à la couleur du championnat, halo autour du logo,
   score en couleur ; la perdante en retrait. Match nul : rien ne change. */
.a4-match.gagne-g .a4-nom-nous .a4-nom-txt, .a4-match.gagne-d .a4-nom-adv .a4-nom-txt {
  background: var(--rd-secondary); color: var(--rd-ink, var(--rd-bg));
  box-shadow: 0 0 0 calc(4px * var(--k, 1)) rgba(255, 255, 255, .28), 0 6px 22px rgba(0, 0, 0, .45); }
.a4-match.gagne-g .a4-nom-nous::after, .a4-match.gagne-d .a4-nom-adv::after { width: calc(var(--a4-F) * 2.6); background: var(--rd-secondary); }
.a4-match.gagne-g .a4-logo-nous, .a4-match.gagne-d .a4-logo-adv { filter: drop-shadow(0 0 calc(18px * var(--k, 1)) var(--rd-secondary)); }
.a4-match.gagne-g .a4-nom-adv, .a4-match.gagne-d .a4-nom-nous { opacity: .55; }
.a4-match.gagne-g .a4-logo-adv, .a4-match.gagne-d .a4-logo-nous { opacity: .55; transform: scale(.86); filter: grayscale(.8) brightness(.85); }
.a4-match.gagne-g .rc-sc-g, .a4-match.gagne-d .rc-sc-d { color: var(--rd-secondary); }
.a4-match.gagne-g .rc-sc-d, .a4-match.gagne-d .rc-sc-g { opacity: .5; }
/* Accueil : une équipe par ligne avec son logo, catégorie et DOM./EXT. (ou V/D) dans une colonne fixe (alignement) */
.home2-rc { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); align-items: center; gap: .3rem .8rem; }
.home2-rc + .home2-rc { padding-top: .55rem; border-top: 1px dashed var(--border); }
.home2-rc-tags { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.home2-rc-tags .r-champ-cat { font-size: .68rem; padding: .08rem .45rem; }
.home2-rc-l2 { display: flex; align-items: center; gap: .4rem; }
.home2-rc-l2 .tm-res { width: 20px; height: 20px; font-size: .66rem; }
.home2-rc-eqs { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.home2-rc-eq { display: flex; align-items: center; gap: .55rem; min-width: 0; font-size: .88rem; line-height: 1.2; color: var(--text); }
.home2-logo { flex: none; width: 22px; height: 22px; border-radius: 50%; object-fit: contain; background: #fff; padding: 1px; box-sizing: border-box; }
.home2-logo-ph { display: inline-flex; align-items: center; justify-content: center; font-size: .5rem; font-weight: 800; color: #0a1424; }
.home2-rc-nom { flex: 1; min-width: 0; }
.home2-rc-eq.nous .home2-rc-nom { font-weight: 800; }
.home2-rc-score { flex: none; min-width: 1.2em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--slate-500); }
.home2-rc-eq.gagnant .home2-rc-score { color: var(--text); }
@media (max-width: 760px) {
  .home2-rc { grid-template-columns: minmax(0, 1fr); }
  .home2-rc-tags { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ══════════════ Fiche « Adversaire » (fenêtre de la rencontre, 20/10/2026) ══════════════ */
.gest-adv-lien { font-size: .78rem; font-weight: 700; color: var(--accent-txt); cursor: pointer; white-space: nowrap; }
.gest-adv-lien:hover { text-decoration: underline; }
.gest-onglets { display: flex; gap: .4rem; margin: .2rem 0 1rem; border-bottom: 1px solid var(--border); }
.gest-onglets button { border: none; background: none; border-bottom: 3px solid transparent; border-radius: 0; padding: .45rem .9rem; font-weight: 700; color: var(--slate-500); }
.gest-onglets button.actif { color: var(--text); border-bottom-color: var(--accent, #19a5e1); }
.adv h4 { margin: 1.1rem 0 .5rem; }
.adv h4 small { font-weight: 500; }
.adv-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; font-size: .9rem; color: var(--slate-500); }
.adv-tete strong { color: var(--text); }
.adv-maj { margin-left: auto; font-weight: 700; cursor: pointer; color: var(--accent-txt); }
.adv-maj.busy { opacity: .6; pointer-events: none; }
.adv-compo { display: flex; flex-wrap: wrap; gap: .4rem; }
.adv-chip { font-size: .82rem; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); }
.adv-chip b { color: var(--accent-txt); margin-right: .2rem; }
.adv-joueurs { width: 100%; font-size: .88rem; }
.adv-joueurs tr.hist td { color: var(--slate-500); }
.adv-joueurs td b { color: var(--text); }
.adv-clt { font-weight: 800; white-space: nowrap; }
.adv-pos { display: inline-block; font-size: .7rem; font-weight: 800; padding: .05rem .4rem; margin-right: .25rem; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-2); }
.adv-confr { padding: .55rem 0; border-bottom: 1px solid var(--border); }
.adv-confr-tete { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }
.adv-confr-tete .tm-res { width: 22px; height: 22px; }
.adv-duels { display: flex; flex-direction: column; gap: .15rem; margin: .35rem 0 0 1.9rem; font-size: .82rem; color: var(--slate-500); }
.adv-duel b { color: var(--text); margin-right: .3rem; }
.adv-duel small { margin-left: .45em; color: var(--slate-500); }
.adv-duel.g-nous { color: #7ee08a; }
.adv-duel.g-eux { color: #ff9a8d; }
.adv-source { margin-top: 1rem; }
html[data-theme="clair"] .adv-duel.g-nous { color: #15803d; }
html[data-theme="clair"] .adv-duel.g-eux { color: #b42318; }
/* Statistiques : vue d'équipe, duel prévisionnel, fiche détaillée d'un joueur */
.adv { --adv-v: #7ee08a; --adv-d: #ff9a8d; }
html[data-theme="clair"] .adv { --adv-v: #15803d; --adv-d: #b42318; }
.adv .adv-v { color: var(--adv-v); }
.adv .adv-d { color: var(--adv-d); }
.adv .adv-lbl { color: var(--slate-500); font-style: normal; }
.adv h5 { margin: 0 0 .45rem; font-size: .86rem; }
.adv h5 small, .adv h6 small { font-weight: 500; }
.adv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.adv-kpi { display: flex; flex-direction: column; padding: .55rem .75rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.adv-kpi span, .adv-kpi small { font-size: .74rem; color: var(--slate-500); }
.adv-kpi b { font-size: 1.25rem; line-height: 1.35; }
.adv-deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 1.5rem; }
.adv-barres { display: grid; grid-template-columns: 2rem minmax(0, 1fr) 2.4rem; gap: .4rem .6rem; align-items: center; font-size: .82rem; }
.adv-barre { height: 10px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.adv-barre i { display: block; height: 100%; border-radius: 3px; background: var(--adv-v); }
.adv-duel-prev { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr) auto; gap: .3rem .6rem; align-items: baseline; font-size: .82rem; }
.adv-ecart { white-space: nowrap; font-weight: 700; }
.adv-ecart.egal { color: var(--slate-500); font-weight: 500; }
.adv-joueurs tr.ouvrable { cursor: pointer; }
.adv-joueurs tr.ouvrable:hover td, .adv-joueurs tr.ouvert td { background: var(--surface-2); }
.adv-ouvrir { display: inline-block; width: 1.1em; color: var(--accent-txt); }
.adv-joueurs tr.adv-fiche-ligne td { padding: 0 0 .7rem; background: none; }
.adv-fiche { padding: .75rem .9rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-2); cursor: default; }
.adv-fiche-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: .7rem; font-size: .84rem; }
.adv-forme { display: flex; gap: 3px; margin-left: auto; }
.adv-forme span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: .7rem; font-weight: 800; }
.adv-forme .v { color: var(--adv-v); background: color-mix(in srgb, var(--adv-v) 16%, transparent); }
.adv-forme .d { color: var(--adv-d); background: color-mix(in srgb, var(--adv-d) 16%, transparent); }
.adv-fiche-grille { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; }
.adv-bloc { flex: 1 1 170px; }
.adv-bloc-courbe { flex: 1 1 260px; max-width: 360px; }
.adv-bloc h6 { margin: 0 0 .35rem; font-size: .8rem; }
.adv-l { display: flex; justify-content: space-between; gap: .6rem; font-size: .8rem; line-height: 1.6; }
.adv-l span:first-child { color: var(--slate-500); }
.adv-svg { display: block; width: 100%; height: auto; }
.adv-svg .adv-grille { stroke: var(--border); stroke-width: 1; }
.adv-svg text { font-size: 10px; fill: var(--slate-500); }
.adv-svg path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.adv-svg path.cours { stroke: var(--accent); }
.adv-svg path.prec { stroke: var(--slate-400); stroke-dasharray: 4 3; }
.adv-svg circle.cours { fill: var(--accent); }
.adv-svg circle.prec { fill: var(--slate-400); }
.adv-fiche-pied { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; margin-top: .7rem; padding-top: .55rem; border-top: 1px solid var(--border); font-size: .8rem; }
/* Indicateur de forme à côté du classement (libellé au survol) et profils de match */
.adv-clt[title], .adv-duel-prev small[title] { cursor: help; }
.adv-ind { display: inline-block; width: .95em; height: .95em; margin-left: .3em; vertical-align: -.1em; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.adv-ind-feu { color: #ff4d2e; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2-2.96 0-7-1-8c0 3.038-1.773 4.741-3 6c-1.226 1.26-2 3.24-2 5a6 6 0 1 0 12 0c0-1.532-1.056-3.94-2-5c-1.786 3-2.791 3-4 2z'/%3E%3C/svg%3E"); }
.adv-ind-dessus { color: var(--adv-v); --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l8 9h-5v9h-6v-9h-5z'/%3E%3C/svg%3E"); }
.adv-ind-dessous { color: var(--adv-d); --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-8-9h5v-9h6v9h5z'/%3E%3C/svg%3E"); }
.adv-ind-baisse { color: #f5a524; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l6 6l4-4l8 8'/%3E%3Cpath d='M21 9v7h-7'/%3E%3C/svg%3E"); }
.adv-ind-conforme { color: var(--slate-400); --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v3.5H4zM4 13.5h16V17H4z'/%3E%3C/svg%3E"); }
html[data-theme="clair"] .adv-ind-feu { color: #dc2626; }
html[data-theme="clair"] .adv-ind-baisse { color: #b45309; }
.adv-profil { display: inline-block; margin-left: .4rem; padding: .02rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 700; vertical-align: .1em;
  color: var(--accent-txt); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); cursor: help; }
.adv-lecture { margin: 0 0 .7rem; font-size: .8rem; }
.adv-lecture p { margin: .15rem 0; }
.adv-lecture .adv-profil { margin-left: 0; cursor: default; }
@media (max-width: 760px) {
  .gest-adv-lien { justify-self: end; }
  .adv-joueurs thead { display: none; }
  .adv-joueurs, .adv-joueurs tbody { display: block; }
  .adv-joueurs tr { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding: .6rem .2rem; border-bottom: 1px solid var(--border); }
  .adv-joueurs td { display: block; padding: 0; border: none; }
  .adv-joueurs td:first-child { flex: 1 1 100%; font-weight: 700; }
  .adv-joueurs td[data-l]::before { content: attr(data-l) " "; font-size: .74rem; color: var(--slate-500); font-weight: 500; }
  .adv-duels { margin-left: 0; }
}
.adv-prec { display: inline-block; margin-left: .5rem; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: .05rem .45rem; border-radius: 999px; color: #f0a35c; background: rgba(225, 115, 25, .12); border: 1px solid rgba(225, 115, 25, .35); vertical-align: 1px; }
html[data-theme="clair"] .adv-prec { color: #b45309; }
.adv-autre-eq { display: block; font-size: .74rem; color: var(--slate-500); }

/* Publication : image déjà publiée pour ce visuel, réutilisée telle quelle (même image sur FB et IG) */
.publish-prec { display: flex; gap: .8rem; align-items: flex-start; margin: .2rem 0 .9rem; padding: .7rem; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-2); }
.publish-prec-img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; background: #0a1424; }
.publish-prec-txt { display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; min-width: 0; }
.publish-prec-txt label { display: flex; align-items: flex-start; gap: .45rem; cursor: pointer; }
.publish-prec-txt .hint { margin: 0; }
/* Classement d'un joueur du club venant d'une feuille de la saison précédente : à vérifier */
.gest-clt-ancien { display: inline-block; width: .85em; height: .85em; margin-left: .3em; vertical-align: -.05em; background: #f5a524; cursor: help;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
  --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
html[data-theme="clair"] .gest-clt-ancien { background: #b45309; }
/* Effectif : réponses de disponibilité, oui (vert) · peut-être (orange) · non (rouge) / total des rencontres */
.gest-effectif td.gest-dispos { white-space: nowrap; }
.gest-dispos span { display: inline-block; min-width: 1.35em; text-align: center; font-weight: 800; }
.gest-dispos .d-oui { color: #7ee08a; }
.gest-dispos .d-inc { color: #fac056; }
.gest-dispos .d-non { color: #ff9a8d; }
.gest-dispos .d-zero { color: var(--slate-400); font-weight: 500; }
.gest-dispos .d-total { margin-left: .25em; color: var(--slate-500); font-weight: 500; }
html[data-theme="clair"] .gest-dispos .d-oui { color: #15803d; }
html[data-theme="clair"] .gest-dispos .d-inc { color: #b45309; }
html[data-theme="clair"] .gest-dispos .d-non { color: #b42318; }
html[data-theme="clair"] .gest-dispos .d-zero { color: var(--slate-400); }
.gest-convoc { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-top: .9rem; }
.gest-convoc p { flex: 1 1 100%; margin: 0; }
