/*
 * OpenTournoi-Palet — thème « sobre et pro »
 * Chargé après UIkit : couleurs, typographie, en-tête, menu et composants communs.
 * Écrans : PC (menu complet), tablette (menu en icônes), téléphone (menu dans un tiroir).
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ot-fond: #F4F6F9;
  --ot-surface: #FFFFFF;
  --ot-bord: #E3E8EF;
  --ot-bord-fort: #C9D2DD;
  --ot-texte: #1B2430;
  --ot-texte-2: #5B6675;
  --ot-accent: #1F5FBF;
  --ot-accent-fonce: #174A96;
  --ot-accent-doux: #EAF1FB;
  --ot-succes: #1E7F4F;
  --ot-succes-doux: #E8F4EE;
  --ot-danger: #B42318;
  --ot-orange: #B35C00;
  --ot-orange-doux: #FDF2E9;
  --ot-rayon: 8px;
  --ot-menu: 248px;
  --ot-entete: 60px;
}

/* --- Base ---------------------------------------------------------------- */
html, body { background: var(--ot-fond); }
html, body, button, input, select, textarea, .uk-input, .uk-select, .uk-textarea, .uk-button {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { color: var(--ot-texte); font-size: 15px; }
h1, h2, h3, h4, h5, .uk-h1, .uk-h2, .uk-h3, .uk-h4 { font-family: inherit; color: var(--ot-texte); letter-spacing: -0.01em; }
a, .uk-link { color: var(--ot-accent); }
a:hover, .uk-link:hover { color: var(--ot-accent-fonce); }
.uk-text-meta { color: var(--ot-texte-2); }
:focus-visible { outline: 2px solid var(--ot-accent); outline-offset: 2px; }

/* --- Composants UIkit -------------------------------------------------- */
.uk-card { border-radius: 12px; border: 1px solid var(--ot-bord); box-shadow: none; }
.uk-card-default { background: var(--ot-surface); color: var(--ot-texte); }
.uk-card-hover:hover { box-shadow: 0 6px 20px rgba(27, 36, 48, .08); }
.uk-card-default .uk-card-header { border-bottom-color: var(--ot-bord); }
.uk-card-default .uk-card-title, .uk-card-header h4 { font-weight: 600; }

.uk-button { border-radius: var(--ot-rayon) !important; text-transform: none; font-weight: 500; font-size: 14px; line-height: 1.3; min-height: 40px; padding-top: 9px; padding-bottom: 9px; }
.uk-button-small { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
.uk-button-default { background: var(--ot-surface); border: 1px solid var(--ot-bord-fort); color: var(--ot-texte); }
.uk-button-default:hover { background: #F8FAFC; border-color: #AEB9C7; color: var(--ot-texte); }
.uk-button-primary { background: var(--ot-accent); color: #fff; }
.uk-button-primary:hover, .uk-button-primary:focus { background: var(--ot-accent-fonce); color: #fff; }
.uk-button-danger { background: var(--ot-danger); color: #fff; }

.uk-input, .uk-select, .uk-textarea { border-radius: var(--ot-rayon) !important; border-color: var(--ot-bord-fort); background-color: var(--ot-surface); color: var(--ot-texte); }
.uk-input:focus, .uk-select:focus, .uk-textarea:focus { border-color: var(--ot-accent); }

.uk-label { border-radius: 999px; text-transform: none; font-weight: 600; padding: 1px 10px; }
.uk-label-success { background: var(--ot-succes); }
.uk-label-danger { background: var(--ot-danger); }
.uk-label-warning { background: var(--ot-orange); }

.uk-table th { font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--ot-texte-2); }
.uk-table-divider > tr:not(:first-child), .uk-table-divider > :not(:first-child) > tr, .uk-table-divider > :first-child > tr:not(:first-child) { border-top-color: #EEF1F5; }
.uk-table-striped tbody tr:nth-of-type(odd), .uk-table-striped > tr:nth-of-type(odd) { background: #F8FAFC; border-color: #EEF1F5; }

.uk-progress { height: 8px; border-radius: 999px; background: #EEF1F5; }
.uk-progress::-webkit-progress-value { background: var(--ot-accent); }
.uk-progress::-moz-progress-bar { background: var(--ot-accent); }

.uk-modal-dialog { border-radius: 12px; }
.uk-dropdown { border-radius: 10px; box-shadow: 0 10px 30px rgba(27, 36, 48, .14); border: 1px solid var(--ot-bord); }
.uk-tooltip { background: var(--ot-texte); color: #fff; border-radius: 6px; font-size: 13px; }
.uk-alert { border-radius: var(--ot-rayon); }
hr, .uk-hr { border-top-color: var(--ot-bord); }

/* --- En-tête ------------------------------------------------------------- */
#ot-entete {
  position: fixed; top: 0; left: 0; right: 0; z-index: 980;
  min-height: var(--ot-entete); box-sizing: border-box;
  background: var(--ot-surface); border-bottom: 1px solid var(--ot-bord);
  display: flex; align-items: center; gap: 12px 20px; padding: 8px 20px;
}
#ot-entete .ot-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ot-texte); flex: 0 0 auto; }
#ot-entete .ot-logo img { display: block; height: 40px; width: auto; }
#ot-entete .ot-tournoi { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; padding-left: 20px; border-left: 1px solid var(--ot-bord); }
#ot-entete .ot-tournoi small { font-size: 12px; color: var(--ot-texte-2); }
#ot-entete .ot-tournoi b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-etapes { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.ot-etapes li { display: flex; align-items: center; gap: 6px; }
.ot-etapes li + li::before { content: ""; width: 14px; height: 2px; background: var(--ot-bord-fort); }
.ot-etape { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--ot-bord-fort); color: var(--ot-texte-2); white-space: nowrap; }
.ot-etape.fait { background: var(--ot-succes-doux); border-color: transparent; color: #1E6B44; font-weight: 600; }
.ot-etape.encours { background: var(--ot-accent); border-color: transparent; color: #fff; font-weight: 600; }
.ot-compte { position: relative; flex: 0 0 auto; }
.ot-compte > button {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 4px;
  border: 0; background: transparent; color: var(--ot-texte); cursor: pointer; border-radius: var(--ot-rayon);
}
.ot-compte > button:hover { background: #F4F6F9; }
.ot-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ot-accent-doux); color: var(--ot-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.ot-compte .ot-qui { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; font-size: 13px; }
.ot-compte .ot-qui small { color: var(--ot-texte-2); font-size: 12px; }
#ot-bouton-menu {
  display: none; width: 44px; height: 44px; border-radius: var(--ot-rayon); border: 1px solid var(--ot-bord);
  background: var(--ot-surface); color: var(--ot-texte); align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}

/* --- Menu de gauche ---------------------------------------------------- */
#ot-menu {
  position: fixed; top: var(--ot-entete); left: 0; bottom: 0; z-index: 970;
  width: var(--ot-menu); box-sizing: border-box; overflow-y: auto;
  background: var(--ot-surface); border-right: 1px solid var(--ot-bord); padding: 14px 12px 24px;
}
#ot-menu ul { list-style: none; margin: 0; padding: 0; }
#ot-menu .ot-embleme { display: flex; justify-content: center; padding: 6px 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--ot-bord); }
#ot-menu .ot-embleme img { width: 72px; height: 72px; }
#ot-menu .ot-titre { margin: 18px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ot-texte-2); }
#ot-menu .ot-titre:first-child { margin-top: 4px; }
#ot-menu a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: var(--ot-rayon);
  color: var(--ot-texte); text-decoration: none; font-size: 14px; white-space: nowrap;
}
#ot-menu a:hover { background: #F4F6F9; }
#ot-menu a.actif { background: var(--ot-accent-doux); color: var(--ot-accent); font-weight: 600; }
#ot-menu a .uk-icon, #ot-menu a svg { flex: 0 0 20px; }
#ot-menu .ot-compteur { margin-left: auto; font-size: 12px; color: var(--ot-texte-2); }
#ot-menu .ot-phase { margin: 6px 0 2px; }
#ot-menu .ot-phase > span { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--ot-texte); }
#ot-menu .ot-phase ul a { padding-left: 42px; min-height: 36px; font-size: 13.5px; }
#ot-menu .ot-jauge { margin: 22px 12px 0; font-size: 12px; color: var(--ot-texte-2); }
#ot-menu .ot-jauge .uk-progress { margin: 6px 0 0; }
.ot-voile-menu { display: none; }

/* --- Contenu ------------------------------------------------------------- */
#content { margin: 0; padding: calc(var(--ot-entete) + 24px) 0 0 var(--ot-menu); background: var(--ot-fond); min-height: 100vh; box-sizing: border-box; }
#content > .uk-container { padding-left: 28px; padding-right: 28px; }
#content footer { color: var(--ot-texte-2); font-size: 13px; }

/* --- Tablette : menu en icônes ------------------------------------------ */
@media (max-width: 1199px) {
  :root { --ot-menu: 68px; }
  #ot-menu { padding: 12px 8px; }
  #ot-menu .ot-embleme img { width: 40px; height: 40px; }
  #ot-menu .ot-titre, #ot-menu .ot-libelle, #ot-menu .ot-compteur, #ot-menu .ot-jauge { display: none; }
  #ot-menu a { justify-content: center; padding: 0; min-height: 44px; }
  #ot-menu .ot-phase > span { justify-content: center; padding: 0; border-top: 1px solid var(--ot-bord); margin-top: 8px; padding-top: 8px; }
  #ot-menu .ot-phase ul a { padding-left: 0; }
  #ot-entete .ot-logo img { height: 34px; }
  #content > .uk-container { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 1100px) {
  .ot-compte .ot-qui { display: none; }
}

/* --- Téléphone : menu dans un tiroir ------------------------------------ */
@media (max-width: 759px) {
  :root { --ot-menu: 0px; --ot-entete: 64px; }
  #ot-bouton-menu { display: inline-flex; }
  #ot-entete { padding: 8px 12px; gap: 10px; }
  #ot-entete .ot-logo { display: none; }
  #ot-entete .ot-tournoi { padding-left: 0; border-left: 0; }
  .ot-etapes li:not(.courante) { display: none; }
  .ot-etapes li + li::before { display: none; }
  #ot-menu { width: 280px; transform: translateX(-100%); transition: transform .2s ease; padding: 14px 12px 24px; visibility: hidden; }
  body.ot-menu-ouvert #ot-menu { visibility: visible; box-shadow: 0 0 40px rgba(27, 36, 48, .2); }
  #ot-menu .ot-titre, #ot-menu .ot-libelle, #ot-menu .ot-compteur, #ot-menu .ot-jauge { display: initial; }
  #ot-menu .ot-titre { display: block; }
  #ot-menu a { justify-content: flex-start; padding: 0 12px; }
  #ot-menu .ot-phase > span { justify-content: flex-start; padding: 0 12px; border-top: 0; margin-top: 6px; }
  #ot-menu .ot-phase ul a { padding-left: 42px; }
  body.ot-menu-ouvert #ot-menu { transform: none; }
  body.ot-menu-ouvert .ot-voile-menu { display: block; position: fixed; inset: 0; background: rgba(27, 36, 48, .35); z-index: 960; }
  #content > .uk-container { padding-left: 12px; padding-right: 12px; }
  /* blocs en pleine largeur et tableaux qui défilent au lieu de s'écraser */
  #content .uk-grid-medium > * { width: 100%; }
  #content .uk-card-body { overflow-x: auto; }
  #content .uk-card-body > table, #content .uk-card-body > div > table, #content .uk-card-body .uk-table { min-width: 600px; }
  #content .arbre table { min-width: 0; width: auto; }  /* les arbres gardent leur largeur naturelle et défilent */
  #content .uk-card-body { padding: 16px; }
  #content .uk-card-header { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) { #ot-menu { transition: none; } }

@media print {
  #ot-entete, #ot-menu, .ot-voile-menu { display: none !important; }
  #content { padding: 0 !important; }
}

/* --- Pages hors tournoi : connexion, compte, administration ----------- */
.ot-page { display: block; max-width: 1120px; margin: 0 auto; padding: calc(var(--ot-entete) + 28px) 24px 48px; box-sizing: border-box; }
.ot-page > h2:first-child, .ot-page h2 { font-size: 24px; font-weight: 700; }
.ot-page .uk-card-body { overflow-x: auto; }
.ot-page .uk-table { min-width: 680px; }
.ot-page .uk-table td.uk-text-small { white-space: nowrap; }
.ot-page .uk-table .uk-flex { gap: 6px; }
.ot-page .uk-table .uk-flex .uk-input, .ot-page .uk-table .uk-flex .uk-select { min-width: 140px; }
.uk-button[uk-icon] { flex: 0 0 auto; padding-left: 10px; padding-right: 10px; }
.ot-page .uk-table td.uk-text-nowrap { white-space: normal; min-width: 200px; }
.ot-page .uk-table td.uk-text-nowrap form { display: inline-block !important; margin: 2px 0; }
.ot-page .uk-card h3 { font-size: 18px; font-weight: 600; }
.ot-page-simple #ot-entete .ot-tournoi b { font-size: 15px; }
body.ot-page-centree { background: radial-gradient(1200px 600px at 50% -10%, #EAF1FB 0%, var(--ot-fond) 60%); }
.ot-centre { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; box-sizing: border-box; }
.ot-carte-connexion { width: 100%; max-width: 420px; box-sizing: border-box; background: var(--ot-surface); border: 1px solid var(--ot-bord); border-radius: 16px; padding: 28px 32px 32px; box-shadow: 0 20px 50px rgba(27, 36, 48, .08); }
.ot-carte-connexion .ot-marque { display: flex; justify-content: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--ot-bord); }
.ot-carte-connexion .ot-marque img { height: 42px; width: auto; }
.ot-titre-connexion { font-size: 22px; font-weight: 700; margin: 10px 0 4px; }
.ot-carte-connexion .uk-input { height: 46px; }
.ot-carte-connexion .uk-button-primary { min-height: 46px; font-size: 15px; margin-top: 6px; }
.ot-pied { margin-top: 18px; font-size: 12px; color: var(--ot-texte-2); text-align: center; }
@media (max-width: 480px) { .ot-carte-connexion { padding: 22px 18px 24px; border-radius: 12px; } .ot-page { padding-left: 12px; padding-right: 12px; } }

/* --- Accueil : mes tournois ----------------------------------------------- */
.ot-accueil-titre h1 { font-size: 26px; font-weight: 700; margin: 0; }
.ot-accueil-titre p { margin: 4px 0 20px; }
.ot-accueil-grille { display: flex; flex-direction: column; gap: 20px; }
.ot-accueil-cote { order: 0; display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.ot-accueil-cote > .uk-card { flex: 1 1 340px; min-width: 0; margin: 0; }
.ot-liste-tournois { order: 1; min-width: 0; }
.ot-carte-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ot-carte-entete h2, .ot-sous-titre { font-size: 18px; font-weight: 600; margin: 0; }
.ot-sous-titre { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ot-fichier { padding: 6px 8px; height: auto; }
.ot-liste-entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.ot-liste-entete .ot-sous-titre { margin: 0; }
.ot-recherche { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--ot-bord-fort); border-radius: var(--ot-rayon); color: var(--ot-texte-2); flex: 0 1 260px; }
.ot-recherche input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; min-width: 0; flex: 1 1 auto; color: var(--ot-texte); }
.ot-tournois { list-style: none; margin: 0; padding: 0 0 8px; }
.ot-tournois li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; border-top: 1px solid #EEF1F5; }
.ot-tournois li:hover { background: #F8FAFC; }
.ot-tournoi-lien { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ot-texte); }
.ot-tournoi-lien:hover { text-decoration: none; color: var(--ot-texte); }
.ot-tournoi-nom { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.ot-tournoi-info { font-size: 13px; color: var(--ot-texte-2); }
.ot-tournoi-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ot-tournoi-actions .ot-supprimer { color: var(--ot-danger); }
.ot-tournoi-actions .ot-supprimer:hover { border-color: var(--ot-danger); color: var(--ot-danger); }
/* téléphone : créer, puis la liste, puis la restauration */
@media (max-width: 759px) { .ot-accueil-cote { display: contents; } .ot-carte-creer { order: 0; } .ot-liste-tournois { order: 1; flex: 0 0 auto; } .ot-carte-restaurer { order: 2; } }

/* --- Pages : en-tête commun -------------------------------------------- */
.ot-entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.ot-entete-page h1 { font-size: 26px; font-weight: 700; margin: 0; }
.ot-entete-page p { margin: 4px 0 0; }
.ot-entete-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ot-pastille-etat { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #EEF1F5; color: var(--ot-texte-2); font-size: 12px; font-weight: 600; }
.ot-pastille-etat.ouvert { background: var(--ot-succes-doux); color: #1E6B44; }
.ot-champ { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ot-texte-2); margin-bottom: 10px; }
.ot-champ .uk-input { color: var(--ot-texte); }
.ot-requis { color: var(--ot-danger); }

/* --- Équipes ---------------------------------------------------------------- */
.ot-ajout-equipe { margin-bottom: 20px; }
.ot-ajout-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; align-items: end; }
.ot-ajout-grille .ot-champ-nom { grid-column: span 1; }
.ot-ajout-bouton { margin-bottom: 10px; }
.ot-menu-import { min-width: 280px; }
.ot-menu-import img { vertical-align: middle; margin-right: 6px; }
.ot-import { padding: 6px 15px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ot-import label { display: flex; flex-direction: column; gap: 4px; }
.ot-equipes-liste { list-style: none; margin: 0; padding: 0 0 8px; }
.ot-equipes-liste li { display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-top: 1px solid #EEF1F5; }
.ot-equipes-liste li:hover { background: #F8FAFC; }
.ot-equipes-liste li.retiree .ot-equipe-nom, .ot-equipes-liste li.retiree .ot-num { opacity: .6; }
.ot-num { flex: 0 0 auto; min-width: 40px; height: 34px; padding: 0 6px; box-sizing: border-box; border-radius: var(--ot-rayon); background: #EEF1F5; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.ot-equipe-infos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: transparent; padding: 2px 0; cursor: pointer; color: var(--ot-texte); font: inherit; }
.ot-equipe-nom { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.ot-equipe-joueurs { font-size: 13px; color: var(--ot-texte-2); overflow-wrap: anywhere; }
.ot-bonus { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--ot-accent-doux); color: var(--ot-accent); font-size: 12px; font-weight: 600; }
.ot-modifier { flex: 0 0 auto; }
.ot-champs-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 10px; }
.ot-champ-court .uk-input { max-width: 140px; }
.ot-numero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 10px; }
.ot-numero .ot-champ { margin-bottom: 0; }
.ot-numero .uk-input { max-width: 120px; }
.ot-numero p { flex: 1 1 100%; margin-top: 6px !important; }
.ot-supprimer-equipe { color: var(--ot-danger); }
@media (max-width: 759px) {
  .ot-equipes-liste li { padding: 10px 14px; gap: 10px; }
  .ot-libelle-bouton { display: none; }
  .ot-entete-actions .uk-button { flex: 1 1 auto; }
}

/* état vide (aucune phase, aucun tour…) */
.ot-vide { border: 1px dashed var(--ot-bord-fort); border-radius: 12px; background: var(--ot-surface); padding: 32px 20px; text-align: center; color: var(--ot-texte-2); }
.ot-vide p { margin: 10px 0 4px; font-size: 16px; font-weight: 600; color: var(--ot-texte); }
.ot-vide small { font-size: 13px; }

/* bouton « haut de page » : taille fixe, jamais étiré */
a.uk-totop { position: fixed; top: auto; left: auto; right: 16px; bottom: 16px; width: 44px !important; height: 44px !important; min-width: 0; max-width: 44px; box-sizing: border-box; padding: 0 !important; margin: 0; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--ot-bord-fort); background: var(--ot-surface); color: var(--ot-texte); box-shadow: 0 6px 20px rgba(27, 36, 48, .12); }
a.uk-totop svg { width: 18px; height: 18px; }

/* arbres : le conteneur suit la hauteur réelle (l'ancienne hauteur fixe de 600 px faisait déborder la page) */
#phase-container { height: auto !important; float: none !important; }

/* repris de l'ancienne feuille dashboard.css */
.panel-icons { margin: 0 4px; }

/* --- Saisie des scores : cartes de match (app/lib/saisie.php) ----------- */
.ot-info { display: flex; gap: 8px; align-items: flex-start; background: var(--ot-accent-doux); color: var(--ot-texte); border-radius: var(--ot-rayon); padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.ot-info [uk-icon] { color: var(--ot-accent); margin-top: 1px; }
.uk-button.ot-bouton-danger { color: var(--ot-danger); border-color: #F1C9C5; }
.uk-button.ot-bouton-danger:hover { background: #FDF3F2; border-color: var(--ot-danger); }
.uk-button[disabled] { opacity: .55; cursor: not-allowed; }

.ot-filtre-matchs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 16px; border: 1px solid var(--ot-bord); border-radius: 999px; background: var(--ot-surface); }
.ot-filtre-matchs button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ot-texte-2); cursor: pointer; }
.ot-filtre-matchs button[aria-pressed="true"] { background: var(--ot-texte); color: #fff; }
body.ot-seulement-asaisir .ot-match-ancre:has(.ot-joue) { display: none; }

.ot-carte-matchs-entete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ot-carte-matchs-entete h4 { margin: 0; flex: 1 1 auto; font-size: 16px; font-weight: 700; }
.ot-carte-matchs-entete .ot-pts { font-weight: 500; font-size: 13px; color: var(--ot-texte-2); margin-left: 4px; }
.ot-compteur-matchs { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 10px; border-radius: 999px; background: var(--ot-accent-doux); color: var(--ot-accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ot-compteur-matchs.complet { background: var(--ot-succes-doux); color: #1E6B44; }
.ot-carte-actions { display: flex; gap: 2px; }
.ot-bouton-icone { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ot-rayon); color: var(--ot-texte-2); background: transparent; border: 0; cursor: pointer; padding: 0; }
.ot-bouton-icone:hover { background: #EEF1F5; color: var(--ot-texte); }
.ot-bouton-icone.ot-verrouille { color: var(--ot-danger); }
.ot-bouton-icone.ot-supprimer:hover { color: var(--ot-danger); }
.ot-note-verrou { margin: 0; padding: 8px 16px; background: #FFF8E6; color: #7A4B00; font-size: 13px; border-bottom: 1px solid var(--ot-bord); }

.ot-matchs { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.ot-match-ancre { scroll-margin-top: calc(var(--ot-entete) + 90px); }
.ot-match-ancre.anchor:target { box-shadow: none; }
.ot-match { display: grid; grid-template-columns: 50px minmax(0, 1fr) 78px minmax(0, 1fr); align-items: stretch; gap: 6px; margin: 0; padding: 6px; border: 1px solid var(--ot-bord); border-radius: 10px; background: var(--ot-surface); transition: border-color .15s, box-shadow .15s; }
.ot-match.ot-joue { background: #FAFBFC; }
.ot-match.ot-en-saisie, .ot-match-ancre:target .ot-match { border-color: var(--ot-accent); box-shadow: 0 0 0 3px var(--ot-accent-doux); }
.ot-match-plaque { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; color: var(--ot-texte-2); }
.ot-match-plaque small { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.ot-match-plaque b { font-size: 18px; color: var(--ot-texte); }
.ot-eq { min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: #F1F4F8; color: var(--ot-texte); font: inherit; cursor: pointer; transition: background .15s, border-color .15s; }
.ot-eq:hover:not(:disabled), .ot-eq:focus-visible { border-color: var(--ot-accent); background: var(--ot-accent-doux); }
.ot-eq:disabled { cursor: default; background: transparent; color: var(--ot-texte-2); }
.ot-eq-num { font-size: 19px; font-weight: 700; line-height: 1.15; }
.ot-eq-nom { max-width: 100%; font-size: 12px; color: var(--ot-texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-eq.ot-gagnant { background: var(--ot-succes-doux); }
.ot-eq.ot-gagnant .ot-eq-num { color: #1E6B44; }
.ot-eq.ot-perdant .ot-eq-num { color: var(--ot-texte-2); }
.ot-eq.ot-gagnant:disabled, .ot-eq.ot-perdant:disabled { color: var(--ot-texte); }
.ot-match-score { display: flex; align-items: center; justify-content: center; gap: 4px; }
.ot-match-score b { min-width: 24px; text-align: center; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ot-match-score i { font-style: normal; font-size: 13px; color: #9AA4B2; }
.ot-match.ot-envoi .ot-match-score { opacity: .45; }
.ot-badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.ot-badge-forfait { background: #FDECEA; color: var(--ot-danger); }
.ot-badge-retiree { background: #FFF4E5; color: var(--ot-orange); }
.ot-match.ot-verrou .ot-eq { cursor: default; }

/* pavé du score du perdant : bulle sous la carte (PC, tablette) ou feuille en bas d'écran (téléphone) */
#ot-pave { z-index: 1005; background: var(--ot-surface); color: var(--ot-texte); }
#ot-pave.bulle { position: absolute; width: 330px; border: 1px solid var(--ot-bord); border-radius: 12px; box-shadow: 0 12px 32px rgba(27, 36, 48, .18); padding: 12px; }
#ot-pave.feuille { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 16px 16px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 0 0 100vmax rgba(27, 36, 48, .28), 0 -6px 18px rgba(27, 36, 48, .1); }
.ot-pave-titre { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.ot-pave-x { width: 36px; height: 36px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--ot-texte-2); cursor: pointer; border-radius: 8px; }
.ot-pave-x:hover { background: #EEF1F5; }
.ot-pave-aide { font-size: 12px; color: var(--ot-texte-2); margin: 0 0 10px; }
.ot-pave-touches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ot-pave-touches button { height: 44px; border: 1px solid var(--ot-bord-fort); border-radius: 8px; background: var(--ot-surface); font-size: 18px; font-weight: 600; color: var(--ot-texte); cursor: pointer; font-variant-numeric: tabular-nums; }
.ot-pave-touches button:hover, .ot-pave-touches button:focus-visible, .ot-pave-touches button.frappe { border-color: var(--ot-accent); background: var(--ot-accent-doux); }
.ot-pave-touches button.actuel { background: var(--ot-accent); border-color: var(--ot-accent); color: #fff; }
.ot-pave-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ot-pave-actions button { flex: 1 1 auto; height: 40px; padding: 0 12px; border: 1px solid var(--ot-bord-fort); border-radius: 8px; background: var(--ot-surface); font-size: 13px; font-weight: 600; color: var(--ot-texte); cursor: pointer; }
.ot-pave-actions .ot-pave-forfait { color: var(--ot-danger); border-color: #F1C9C5; }
.ot-pave-actions button:hover { background: #F4F6F9; }
#ot-pave.feuille .ot-pave-touches button { height: 48px; }

/* phases finales : sections et couleur des cartes */
.ot-section-pf { padding: 10px 16px; border-left: 5px solid var(--ot-accent); background: var(--ot-accent-doux); border-radius: 0 8px 8px 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ot-accent); }
.ot-section-classement { border-left-color: #6B7785; background: #EEF1F5; color: #4A5562; }
.ot-section-challenge { border-left-color: #E67E22; background: var(--ot-orange-doux); color: var(--ot-orange); }
.ot-section-chclassement { border-left-color: #B9770E; background: #FBF3E6; color: #8A5A00; }
.ot-carte-principale { border-top: 4px solid var(--ot-accent); }
.ot-carte-classement { border-top: 4px solid #6B7785; }
.ot-carte-challenge { border-top: 4px solid #E67E22; }
.ot-carte-chclassement { border-top: 4px solid #B9770E; }

@media (max-width: 759px) {
  .ot-matchs { padding: 8px; }
  .ot-match { grid-template-columns: 42px minmax(0, 1fr) 62px minmax(0, 1fr); gap: 4px; padding: 5px; }
  .ot-eq { min-height: 56px; padding: 4px; }
  .ot-match-score b { font-size: 18px; min-width: 20px; }
  .ot-libelle-compteur { display: none; }
  .ot-filtre-matchs { display: flex; width: 100%; box-sizing: border-box; }
  .ot-filtre-matchs button { flex: 1 1 0; }
}

/* --- Arbre (page « Tableau ») -------------------------------------------- */
.ot-suivre { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--ot-bord-fort); border-radius: var(--ot-rayon); background: var(--ot-surface); font-size: 14px; color: var(--ot-texte-2); }
.ot-suivre input { border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ot-texte); width: 48px; }
.ot-onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--ot-bord); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.ot-onglets button { flex: 0 0 auto; height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; font-size: 14px; color: var(--ot-texte-2); cursor: pointer; white-space: nowrap; }
.ot-onglets button[aria-selected="true"] { border-bottom-color: var(--ot-accent); color: var(--ot-accent); font-weight: 600; }
.ot-panneau { padding: 22px; overflow-x: auto; }
.ot-arbre-aide { margin-top: 12px; font-size: 13px; }
.ot-tours-puces { display: none; }

.ot-arbre-grille { display: flex; align-items: stretch; min-width: calc(var(--ot-nb-col, 3) * 210px); }
.ot-arbre-simple { min-width: 0; max-width: 980px; }
.ot-col { display: flex; flex-direction: column; flex: 1 1 0; min-width: 210px; }
.ot-col-vainqueur { flex: 0 0 190px; min-width: 190px; }
.ot-col-titre { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ot-texte-2); }
.ot-col-titre span { font-weight: 500; }
.ot-col[data-r]:not([data-r="0"]) .ot-col-titre { padding-left: 22px; }
.ot-col-corps { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-around; }
.ot-paire { flex: 1 1 0; display: flex; flex-direction: column; justify-content: space-around; position: relative; padding-right: 22px; }
.ot-paire::after { content: ""; position: absolute; right: 0; top: 25%; bottom: 25%; width: 22px; border: 2px solid var(--ot-bord-fort); border-left: 0; border-radius: 0 6px 6px 0; box-sizing: border-box; }
.ot-entree { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; position: relative; padding: 6px 0; }
.ot-lien-gauche { padding-left: 22px; }
.ot-lien-gauche::before { content: ""; position: absolute; left: 0; top: 50%; width: 22px; border-top: 2px solid var(--ot-bord-fort); }
.ot-paire.chemin::after, .ot-entree.chemin.ot-lien-gauche::before { border-color: var(--ot-accent); }
.ot-arbre-legende { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ot-texte-2); margin: 0 0 4px; }
.ot-entree-carte { scroll-margin-top: calc(var(--ot-entete) + 90px); }

.ot-arbre-match { display: block; padding: 0; gap: 0; overflow: hidden; border-radius: 10px; background: var(--ot-surface); }
.ot-arbre-match.ot-joue { background: var(--ot-surface); }
.ot-arbre-match.chemin { border: 2px solid var(--ot-accent); }
.ot-arbre-match .ot-ligne { width: 100%; min-height: 40px; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 6px 10px; border: 0; border-radius: 0; background: var(--ot-surface); text-align: left; }
.ot-arbre-match .ot-ligne + .ot-ligne { border-top: 1px solid #EEF1F5; }
.ot-arbre-match .ot-ligne .ot-eq-num { font-size: 15px; font-weight: 600; min-width: 22px; }
.ot-arbre-match .ot-ligne .ot-eq-nom { flex: 1 1 auto; min-width: 0; text-align: left; }
.ot-arbre-match .ot-ligne .ot-vide-eq { font-weight: 400; color: #9AA4B2; font-size: 14px; }
.ot-arbre-match .ot-ligne:hover:not(:disabled), .ot-arbre-match .ot-ligne:focus-visible { background: var(--ot-accent-doux); border-color: transparent; }
.ot-arbre-match .ot-ligne:disabled { color: var(--ot-texte); background: var(--ot-surface); }
.ot-arbre-match .ot-ligne.ot-gagnant, .ot-arbre-match .ot-ligne.ot-perdant { background: var(--ot-surface); }
.ot-arbre-match .ot-ligne.ot-perdant .ot-eq-num { color: var(--ot-texte-2); font-weight: 500; }
.ot-arbre-match .ot-ligne.ot-gagnant .ot-eq-num { color: var(--ot-texte); font-weight: 700; }
.ot-arbre-match .ot-ligne.ot-suivie { background: var(--ot-accent-doux); }
.ot-pastille-score { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 4px; box-sizing: border-box; border-radius: 6px; background: #EEF1F5; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.ot-pastille-score:empty { background: transparent; border: 1px dashed var(--ot-bord-fort); }
.ot-gagnant .ot-pastille-score { background: var(--ot-succes); color: #fff; }
.ot-arbre-pied { display: flex; justify-content: space-between; align-items: center; padding: 3px 10px; min-height: 24px; background: #F8FAFC; font-size: 11px; color: var(--ot-texte-2); border-top: 1px solid #EEF1F5; }
.ot-saisir { border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--ot-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ot-arbre-resultat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border: 1px dashed var(--ot-bord-fort); border-radius: 10px; text-align: center; color: var(--ot-texte-2); font-size: 13px; }
.ot-arbre-resultat-titre { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ot-arbre-resultat.connu { border-style: solid; border-color: #BFE0CD; background: var(--ot-succes-doux); color: var(--ot-texte); }
.ot-arbre-resultat b { font-size: 22px; }
.ot-arbre-resultat small { font-size: 12px; color: var(--ot-texte-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-arbre-resultat.ot-suivie { border: 2px solid var(--ot-accent); }
.ot-pave-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.ot-pave-choix button { height: 56px; border: 1px solid var(--ot-bord-fort); border-radius: 10px; background: var(--ot-surface); font-size: 20px; font-weight: 700; color: var(--ot-texte); cursor: pointer; }
.ot-pave-choix button:hover, .ot-pave-choix button:focus-visible { border-color: var(--ot-accent); background: var(--ot-accent-doux); }

/* téléphone : une colonne à la fois, on glisse ou on touche un tour */
@media (max-width: 759px) {
  .ot-panneau { padding: 12px; overflow: hidden; }
  .ot-suivre { flex: 1 1 auto; }
  .ot-tours-puces { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; }
  .ot-tours-puces button { flex: 0 0 auto; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ot-bord-fort); background: var(--ot-surface); font-size: 13px; font-weight: 600; color: var(--ot-texte); white-space: nowrap; }
  .ot-tours-puces button[aria-pressed="true"] { background: var(--ot-texte); border-color: var(--ot-texte); color: #fff; }
  .ot-arbre-grille { min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start; transition: height .2s; }
  .ot-arbre-grille::-webkit-scrollbar { display: none; }
  .ot-arbre-simple { overflow-x: visible; flex-direction: column; scroll-snap-type: none; }
  .ot-col, .ot-col-vainqueur { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
  .ot-arbre-simple .ot-col { flex: 0 0 auto; width: 100%; margin-bottom: 14px; }
  .ot-col[data-r]:not([data-r="0"]) .ot-col-titre { padding-left: 0; }
  .ot-col-corps { justify-content: flex-start; }
  .ot-paire { flex: none; padding-right: 0; }
  .ot-paire::after, .ot-lien-gauche::before { display: none; }
  .ot-entree { flex: none; padding: 5px 0; }
  .ot-lien-gauche { padding-left: 0; }
  .ot-arbre-match .ot-ligne { min-height: 48px; }
}
@media (max-width: 759px) {
  .ot-arbre-page .ot-entete-actions { width: 100%; flex-wrap: nowrap; }
  .ot-arbre-page .ot-entete-actions .uk-button { flex: 0 0 auto; padding: 0 12px; }
  .ot-suivre { min-width: 0; }
  .ot-suivre input { width: 36px; }
}
.ot-arbre-simple { gap: 28px; }
.ot-arbre-page .ot-entete-actions .uk-button { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 759px) { .ot-arbre-simple { gap: 0; } }

/* arbre : cartes mieux détachées (fond gris clair, bordure et ombre plus marquées) */
.ot-panneau { background: #F1F4F8; border-color: var(--ot-bord); }
.ot-arbre-match { border: 1px solid #C2CBD7; box-shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 2px 8px rgba(27, 36, 48, .05); }
.ot-arbre-match.ot-en-saisie { box-shadow: 0 0 0 3px var(--ot-accent-doux), 0 2px 8px rgba(27, 36, 48, .08); }
.ot-arbre-match .ot-ligne + .ot-ligne { border-top-color: #E6EAF0; }
.ot-arbre-pied { background: #F6F8FB; border-top-color: #E6EAF0; }
.ot-paire::after, .ot-lien-gauche::before { border-color: #A9B4C2; }
.ot-arbre-resultat { background: rgba(255, 255, 255, .6); border-color: #B7C1CE; }

/* style F : liseré à gauche — bleu = à jouer, vert = joué, gris = équipes pas encore connues */
.ot-arbre-match { border-left: 5px solid var(--ot-accent); border-radius: 8px; }
.ot-arbre-match.ot-joue { border-left-color: var(--ot-succes); }
.ot-arbre-match.ot-a-venir { border-left-color: #C9D2DD; }
.ot-arbre-match.chemin { border-color: var(--ot-accent); border-width: 2px 2px 2px 5px; }
.ot-arbre-match.chemin.ot-joue { border-left-color: var(--ot-succes); }
/* page Matchs : même principe */
.ot-matchs { background: #F1F4F8; border-radius: 0 0 12px 12px; }
.ot-match:not(.ot-arbre-match) { border: 1px solid #C2CBD7; border-left: 5px solid var(--ot-accent); border-radius: 8px; box-shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 2px 8px rgba(27, 36, 48, .05); background: var(--ot-surface); }
.ot-match.ot-joue:not(.ot-arbre-match) { border-left-color: var(--ot-succes); background: var(--ot-surface); }
.ot-match.ot-a-venir:not(.ot-arbre-match) { border-left-color: #C9D2DD; }
.ot-match:not(.ot-arbre-match).ot-en-saisie, .ot-match-ancre:target .ot-match { border-color: var(--ot-accent); border-left-width: 5px; box-shadow: 0 0 0 3px var(--ot-accent-doux); }
/* zone de l'arbre : gris-bleu un peu plus soutenu que le fond du site, pour qu'elle ressorte */
.ot-panneau { background: #E8EDF4; border: 1px solid #D0D8E2; }
/* listes de matchs (qualifs, phases finales) : même gris-bleu que l'arbre */
.ot-matchs { background: #E8EDF4; }
@media (max-width: 759px) { .ot-arbre-grille { overflow-y: hidden; } }

/* --- Tableau de bord ------------------------------------------------------ */
.ot-prochaine { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; background: var(--ot-surface); border: 1px solid var(--ot-bord); border-left: 5px solid var(--ot-accent); border-radius: 12px; padding: 22px 26px; margin-bottom: 20px; }
.ot-prochaine-texte { flex: 1 1 380px; min-width: 0; }
.ot-prochaine-etiquette { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ot-accent); }
.ot-prochaine h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 700; line-height: 1.25; }
.ot-prochaine p { margin: 0; color: var(--ot-texte-2); }
.ot-jauge-etape { margin-top: 14px; height: 8px; max-width: 520px; border-radius: 999px; background: #E6EBF2; overflow: hidden; }
.ot-jauge-etape div { height: 100%; background: var(--ot-accent); border-radius: 999px; }
.ot-prochaine-bouton { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: var(--ot-rayon); font-weight: 600; }
.ot-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.ot-tuile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--ot-surface); border: 1px solid var(--ot-bord); border-radius: 12px; color: var(--ot-texte); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.ot-tuile:hover { color: var(--ot-texte); text-decoration: none; border-color: var(--ot-bord-fort); box-shadow: 0 6px 20px rgba(27, 36, 48, .06); }
.ot-tuile-titre { font-size: 13px; color: var(--ot-texte-2); }
.ot-tuile b { font-size: 28px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ot-tuile b span { font-size: 16px; font-weight: 500; color: var(--ot-texte-2); }
.ot-tuile small { font-size: 12px; color: var(--ot-texte-2); }
.ot-tuile-etat { display: inline-flex; align-items: center; gap: 8px; font-size: 20px !important; color: var(--ot-texte-2); }
.ot-tuile-etat::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9AA4B2; }
.ot-tuile-etat.en-ligne { color: #1E6B44; }
.ot-tuile-etat.en-ligne::before { background: var(--ot-succes); box-shadow: 0 0 0 4px var(--ot-succes-doux); }
.ot-classement-provisoire .ot-carte-matchs-entete a { font-size: 14px; font-weight: 600; }
.ot-table-simple { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ot-table-simple th { padding: 10px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ot-texte-2); text-align: center; background: #F8FAFC; }
.ot-table-simple td { padding: 10px 16px; border-top: 1px solid #EEF1F5; text-align: center; }
.ot-table-simple .g { text-align: left; }
.ot-table-simple .rang { font-weight: 700; color: var(--ot-texte-2); width: 60px; }
.ot-table-simple .ot-num { min-width: 32px; height: 26px; font-size: 14px; margin-right: 8px; }
@media (max-width: 1100px) { .ot-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  .ot-prochaine { padding: 18px; }
  .ot-prochaine h2 { font-size: 19px; }
  .ot-prochaine-bouton { width: 100%; justify-content: center; }
  .ot-tuiles { gap: 10px; }
  .ot-tuile { padding: 12px 14px; }
  .ot-tuile b { font-size: 22px; }
  .ot-table-simple .cache-tel { display: none; }
  .ot-table-simple td, .ot-table-simple th { padding: 9px 10px; }
  #content .ot-classement-provisoire table { min-width: 0; }
}

/* --- Classements ------------------------------------------------------------ */
.ot-carte-classement { overflow: hidden; }
.ot-carte-classement .ot-table-simple tbody tr:hover { background: #F8FAFC; }
.ot-table-simple tr.ot-groupe td { background: var(--ot-accent-doux); color: var(--ot-accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: left; padding: 8px 16px; }
.ot-table-simple tr.podium .rang { color: var(--ot-accent); }
#content .ot-carte-classement table { min-width: 0; }

/* --- Gérer les phases ------------------------------------------------------- */
.ot-phase-carte { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ot-phase-haut { display: flex; align-items: center; gap: 10px; }
.ot-phase-haut h3 { margin: 0; font-size: 19px; font-weight: 700; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ot-type-phase { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ot-accent-doux); color: var(--ot-accent); }
.ot-type-phase.poule { background: var(--ot-orange-doux); color: var(--ot-orange); }
.ot-phase-num { font-size: 12px; color: var(--ot-texte-2); white-space: nowrap; }
.ot-phase-infos { margin: 0; color: var(--ot-texte-2); font-size: 14px; }
.ot-options { display: flex; flex-wrap: wrap; gap: 6px; }
.ot-option { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--ot-bord-fort); font-size: 12px; color: var(--ot-texte-2); }
.ot-phase-avancement { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ot-texte-2); }
.ot-phase-avancement .ot-jauge-etape { flex: 1 1 auto; margin: 0; }
.ot-phase-liens { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ot-phase-liens .uk-button { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 759px) { .ot-phase-liens .uk-button { flex: 1 1 auto; justify-content: center; padding: 0 10px; } }

/* --- Paramètres -------------------------------------------------------------- */
.ot-parametres { max-width: 900px; }
.ot-parametres .uk-card-body { padding: 24px 28px; }
.ot-parametres .uk-margin > span[style*="bold"] { display: block; margin-bottom: 6px; font-weight: 600 !important; }
.ot-parametres hr { margin: 18px 0; border-top-color: var(--ot-bord); }
@media (max-width: 759px) { .ot-parametres .uk-card-body { padding: 16px; } }

/* --- Déverrouillage ------------------------------------------------------------ */
.ot-info.ot-attention { background: #FFF8E6; }
.ot-info.ot-attention [uk-icon] { color: var(--ot-orange); }
.ot-verrous { max-width: 900px; }
.ot-verrou-ligne { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.ot-verrou-ligne + .ot-verrou-ligne { border-top: 1px solid var(--ot-bord); }
.ot-verrou-icone { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--ot-succes-doux); color: var(--ot-succes); }
.ot-verrou-icone.ferme { background: #EEF1F5; color: var(--ot-texte-2); }
.ot-verrou-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ot-verrou-texte b { font-weight: 600; }
.ot-verrou-texte small { font-size: 13px; color: var(--ot-texte-2); }
@media (max-width: 759px) { .ot-verrou-ligne { flex-wrap: wrap; padding: 14px; } .ot-verrou-ligne .uk-button { width: 100%; } }

/* --- Aide et didacticiels (public/js/didacticiel.js) ----------------------------- */
.ot-aide { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; margin-left: auto; border: 1px solid var(--ot-bord-fort); border-radius: 999px; background: var(--ot-surface); color: var(--ot-texte); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ot-aide:hover { border-color: var(--ot-accent); color: var(--ot-accent); }
#ot-entete .ot-aide + .ot-compte { margin-left: 8px; }
.ot-dida-voile { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 32, .62); }
.ot-dida-voile.transparent { background: transparent; }
.ot-dida-spot { position: fixed; z-index: 2001; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 32, .62), 0 0 0 3px rgba(255, 255, 255, .9); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.ot-dida-bulle { position: fixed; z-index: 2002; width: 360px; max-width: calc(100vw - 24px); box-sizing: border-box; background: var(--ot-surface); color: var(--ot-texte); border-radius: 14px; padding: 18px 20px 16px; box-shadow: 0 20px 50px rgba(15, 23, 32, .35); transition: left .25s ease, top .25s ease; }
.ot-dida-bulle.centre { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: 440px; }
.ot-dida-bulle.bas { left: 12px !important; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); top: auto !important; width: auto; max-width: none; }
.ot-dida-num { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ot-accent); margin-bottom: 6px; padding-right: 28px; }
.ot-dida-bulle h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.ot-dida-bulle p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ot-texte-2); }
.ot-dida-bulle p b { color: var(--ot-texte); }
.ot-dida-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; line-height: 1; color: var(--ot-texte-2); cursor: pointer; }
.ot-dida-x:hover { background: #EEF1F5; }
.ot-dida-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.ot-dida-nav { display: flex; gap: 8px; }
.ot-dida-actions button { height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ot-bord-fort); background: var(--ot-surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--ot-texte); cursor: pointer; }
.ot-dida-actions .ot-dida-passer { border-color: transparent; color: var(--ot-texte-2); padding: 0 6px; }
.ot-dida-actions .ot-dida-suivant { background: var(--ot-accent); border-color: var(--ot-accent); color: #fff; }
.ot-dida-actions .ot-dida-suivant:hover { background: var(--ot-accent-fonce); }
body.ot-dida-actif #ot-menu { z-index: 1999; }
@media (max-width: 759px) {
  .ot-aide { width: 38px; padding: 0; justify-content: center; }
  .ot-aide-libelle { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ot-dida-spot, .ot-dida-bulle { transition: none; } }
.ot-dida-bulle.bas.haut { top: 12px !important; bottom: auto; }

/* --- Mode club --------------------------------------------------------------- */
.ot-case { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 4px; cursor: pointer; font-size: 14px; }
.ot-case .uk-checkbox { margin-top: 3px; flex: 0 0 auto; }
.ot-case span { display: flex; flex-direction: column; gap: 2px; }
.ot-case small { font-size: 12px; color: var(--ot-texte-2); line-height: 1.4; }
.ot-club { display: inline-block; max-width: 100%; padding: 0 8px; border-radius: 999px; background: var(--ot-orange-doux); color: var(--ot-orange); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: 1px; }
.ot-eq-club { max-width: 100%; font-size: 11px; font-weight: 600; color: var(--ot-orange); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-arbre-match .ot-eq-club { font-size: 11px; }
.ot-ajout-club-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ot-ajout-club-form .ot-champ { flex: 1 1 260px; margin: 0; }
.ot-ajout-club { margin-bottom: 20px; }
.ot-clubs-liste { list-style: none; margin: 0; padding: 0; }
.ot-clubs-liste li { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid #EEF1F5; }
.ot-clubs-liste li:first-child { border-top: 0; }
.ot-club-ligne { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ot-club-nom { flex: 1 1 auto; min-width: 0; border-color: transparent; background: transparent; font-weight: 600; }
.ot-club-nom:hover, .ot-club-nom:focus { border-color: var(--ot-bord-fort); background: #fff; }
.ot-club-nb { flex: 0 0 auto; font-size: 13px; color: var(--ot-texte-2); white-space: nowrap; }
@media (max-width: 759px) { .ot-club-ligne { flex-wrap: wrap; } .ot-club-nom { flex-basis: 100%; } }

/* filet de sécurité : l'ancienne feuille style.css (mise en cache par certains téléphones) faisait flotter
   toutes les balises <section> à 130 px de large et grisait leurs blocs : on rétablit la mise en page */
#content section, .ot-pub section { width: auto; height: auto; float: none; }
#content section > div:not([class]), .ot-pub section > div:not([class]) { width: auto; height: auto; border: 0; margin: 0; background: none; color: inherit; }
#content section > .ot-prochaine-texte, #content section > .uk-card-header, #content section > .ot-matchs, #content section > .ot-col-corps, #content .ot-col > .ot-col-corps,
#content .ot-carte-classement > div, #content .ot-prochaine > div, .ot-pub section > div[class] { width: auto; height: auto; border: 0; margin: 0; background: none; color: inherit; }
/* joueurs sous le nom d'équipe dans les classements */
.ot-joueurs { display: block; font-size: 12px; font-weight: 400; color: var(--ot-texte-2); margin-top: 1px; overflow-wrap: anywhere; }
.ot-table-simple td.g .ot-joueurs { padding-left: 40px; }
@media (max-width: 759px) { .ot-table-simple td.g .ot-joueurs { padding-left: 0; } }
.ot-prochaine-boutons { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ot-prochaine-imprimer { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; }
@media (max-width: 759px) { .ot-prochaine-boutons { width: 100%; } }
