/* === 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: linear-gradient(135deg,
    transparent 0%,
    rgba(255,255,255,.06) 50%,
    transparent 100%);
  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); }
.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; }
.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:
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.10) 0%, transparent 55%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.35) 100%);
  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; }
