:root {
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #007bff;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
}

body {
  margin-top: 70px;
  padding-top: 30px;
  padding-bottom: 30px;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  background: #ddd;
}

table {
  margin-top: 2em;
}

table a {
  text-decoration: none;
}

.arrow {
  width: 16px;
  height: 16px;
}

h1 {
  margin-top: 0.5em;
}

div.form-group label {
  color: var(--dark);
  font-weight: bold;
}

div.alert {
  font-weight: bold;
}

form.form-inline input {
  max-width: 200px;
}

.qualifie {
  color: var(--success);
}

/* Bootstrap 5 : table-dark force la couleur des <td> et écrase text-* posé sur <tr> */
.table-dark > tbody > tr.text-primary > * {
  --bs-table-color: var(--bs-primary);
  --bs-table-color-state: var(--bs-primary);
  color: var(--bs-primary);
}

.table-dark > tbody > tr.text-success > * {
  --bs-table-color: var(--bs-success);
  --bs-table-color-state: var(--bs-success);
  color: var(--bs-success);
}

.table-dark > tbody > tr.text-warning > * {
  --bs-table-color: var(--bs-warning);
  --bs-table-color-state: var(--bs-warning);
  color: var(--bs-warning);
}

.table-dark > tbody > tr.text-danger > * {
  --bs-table-color: var(--bs-danger);
  --bs-table-color-state: var(--bs-danger);
  color: var(--bs-danger);
}

.table-dark > tbody > tr.text-info > * {
  --bs-table-color: var(--bs-info);
  --bs-table-color-state: var(--bs-info);
  color: var(--bs-info);
}

.table-dark > tbody > tr.text-secondary > * {
  --bs-table-color: var(--bs-secondary);
  --bs-table-color-state: var(--bs-secondary);
  color: var(--bs-secondary);
}

.table-dark > tbody > tr.text-muted > * {
  --bs-table-color: var(--bs-secondary-color);
  --bs-table-color-state: var(--bs-secondary-color);
  color: var(--bs-secondary-color);
}

.repeche {
  color: var(--warning);
}

.repeche_provisoire {
  color: var(--danger);
}

a.dropdown-item:hover {
  background: var(--secondary);
  color: #fff;
}

.calendar__table {
  width: 100%;
}

.calendar__table td {
  padding: 6px;
  border: 1px solid #ccc;
  vertical-align: top;
  width: 14.28%;
  min-width: 85px;
  height: 150px;
}

.calendar__weekday {
  text-align: center;
  font-size: 1.1em;
}

.calendar__othermonth .calendar__day,
.calendar__othermonth .calendar__event {
  opacity: 0.3;
}

.calendar__event .main_event {
  display: block;
  width: 100%;
  color: white;
  background-color: orange;
}

.calendar__event .tournoi_du_vendredi {
  display: block;
  width: 100%;
  color: white;
  background-color: blue;
}

.calendar__event .tournoi_winamax {
  display: block;
  width: 100%;
  color: white;
  background-color: red;
}

.calendar__event .etape_cnec {
  display: block;
  width: 100%;
  color: white;
  background-color: green;
}

.calendar__event .reunion_ca {
  display: block;
  width: 100%;
  color: white;
  background-color: orange;
}

.calendar__event .master {
  display: block;
  width: 100%;
  color: white;
  background-color: violet;
}

.calendar__event .autre {
  display: block;
  width: 100%;
  color: white;
  background-color: rosybrown;
}

.calendar__today {
  background-color: lightgray;
}

.calendar__menu {
  margin-top: -30px;
  display: flex;
  justify-content: space-between;
}

.calendar__menu .btn {
  height: 2.2em;
  width: 2.2em;
}

.calendar__button {
  display: block;
  width: 1.7em;
  height: 1.7em;
  line-height: 1.5em;
  text-align: center;
  color: white;
  font-size: 1.6em;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 6px 10px 0 #0000001a, 0 1px 18px 0 #0000001a,
    0 3px 5px -1px #0003;
  text-decoration: none;
  transition: transform 0.3s;
}

.calendar__button:hover {
  text-decoration: none;
  color: white;
  transform: scale(1.2);
}

@media (max-width: 767px) {
  .calendar__button {
    line-height: 1.8em;
  }
}

.link {
  cursor: pointer;
}

.calendrier {
  width: 24px;
  height: 24px;
}

/* Formulaire EasyAdmin 3 */

article {
  display: block;
  margin-block-start: 1.33em;
  margin-block-end: 1.33em;
}

section {
  display: block;
  margin-block-start: 1.33em;
  margin-block-end: 1.33em;
}

div {
  display: block;
}

form {
  display: block;
  margin-top: 0em;
}

label {
  display: inline-block;
}

h1 {
  display: block;
  font-size: 2em;
  margin-block-start: 0.67em;
  margin-block-end: 0.67em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-weight: bold;
}

.content-header {
  padding: 26px 0 16px;
  display: flex;
  flex-direction: row;
}

.content-header-title {
  flex: 1;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0%;
}

.content-header-title .title {
  font-size: 2em;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  padding-right: 15px;
}

/* Dropdown menu */

.large {
  width: 200px !important;
}

.xlarge {
  width: 260px !important;
}

/* Championnat HU – arbre play-offs */
.hu-bracket {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
  padding: 1rem 0 2rem;
  --hu-bracket-min-height: 36rem;
}

.hu-bracket-col {
  flex: 1 1 220px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
}

.hu-bracket-title {
  flex: 0 0 2.75rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.25rem;
}

.hu-bracket-col-body {
  flex: 1 1 auto;
  min-height: var(--hu-bracket-min-height);
  display: grid;
  gap: 0.75rem;
}

.hu-bracket-col-qf {
  grid-template-rows: repeat(4, 1fr);
}

.hu-bracket-col-sf {
  grid-template-rows: repeat(2, 1fr);
}

.hu-bracket-col-final {
  grid-template-rows: 1fr;
}

.hu-bracket-slot {
  background: #212529;
  color: #fff;
  border: 1px solid #495057;
  border-radius: 0.35rem;
  padding: 0.6rem 0.75rem;
  text-align: center;
  align-self: center;
  width: 100%;
}

.hu-bracket-slot-playable {
  border-color: #0d6efd;
}

.hu-bracket-slot-provisional {
  border-style: dashed;
  border-color: #6c757d;
}

.hu-bracket-slot-played {
  border-color: #198754;
}

.hu-bracket-slot-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}

.hu-bracket-player {
  padding: 0.25rem 0;
  font-weight: 600;
}

.hu-bracket-placeholder {
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
}

.hu-bracket-winner {
  color: #75b798;
}

.hu-bracket-result {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 0.35rem;
}

.hu-bracket-connectors {
  flex: 0 0 28px;
  min-height: var(--hu-bracket-min-height);
  margin-top: 2.75rem; /* align with titles */
  align-content: stretch;
  justify-items: center;
}

.hu-bracket-connectors-qf {
  grid-template-rows: repeat(2, 1fr);
}

.hu-bracket-connectors-sf {
  grid-template-rows: 1fr;
}

.hu-bracket-connector {
  width: 28px;
  height: 55%;
  align-self: center;
  border-right: 2px solid #6c757d;
  border-top: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  border-radius: 0 4px 4px 0;
}

.hu-bracket-connector-final {
  height: 55%;
}

@media (max-width: 767.98px) {
  .hu-bracket {
    --hu-bracket-min-height: auto;
  }

  .hu-bracket-col-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .hu-bracket-slot {
    align-self: stretch;
  }
}

/* Championnat HU – aide format Phase 1 */
.hu-format-help-toggle {
  font-weight: 600;
}

.hu-format-help-panel {
  max-width: 960px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.375rem;
  background-color: #212529;
  color: #f8f9fa;
}

.hu-format-blinds-meta {
  font-size: 1rem;
  font-weight: 500;
  color: #f8f9fa;
  line-height: 1.4;
}
