/* ==========================================================================
   Administration du club : barre latérale (ordinateur), barre inférieure (téléphone)
   ========================================================================== */

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--surface) 232px, transparent 232px); }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.side-club { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; }
.side-club img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.side-club img.logo-large { width: auto; height: 40px; max-width: 100%; border-radius: 0; }   /* logo avec le nom sur le côté */
.mobile-head .side-club img.logo-large { height: 30px; max-width: 60vw; }
.monogram { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--f13); flex: none; }
.side-club strong { font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--ink-2);
  text-decoration: none; font-weight: 500; transition: background var(--t), color var(--t);
}
.nav a:hover { background: rgba(15, 23, 32, .04); color: var(--ink); }
.nav a { position: relative; }
/* Page en cours : fond teinté plus franc, texte en gras et filet de la couleur du club à gauche */
.nav a[aria-current] { background: color-mix(in srgb, var(--accent) 16%, white); color: var(--ink); font-weight: 650; }
.nav a[aria-current]::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav a[aria-current] svg { color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 2px; }
.side-foot a, .side-foot button { font-size: var(--f13); }
.side-user { padding: 6px 10px; font-size: var(--f13); color: var(--muted); }
.side-user strong { display: block; color: var(--ink); font-weight: 500; }

.main { min-width: 0; padding: 28px 36px 64px; }
.main-inner { max-width: 1120px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.crumb { font-size: var(--f13); color: var(--muted); margin-bottom: 6px; display: block; text-decoration: none; }
.crumb:hover { color: var(--ink); }

.trial-bar { background: var(--ink); color: #fff; font-size: var(--f13); padding: 8px 16px; text-align: center; }
.trial-bar a { color: #fff; }

/* Cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-aside { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stack > * + * { margin-top: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; min-width: 0; }
.stat b { display: block; font-size: clamp(1.1rem, 2.2vw + .5rem, 1.5rem); overflow-wrap: anywhere; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: var(--f13); }

/* Tableaux : deviennent des listes sur téléphone (data-label) */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--f13); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .n { text-align: right; }
.table tbody tr:nth-child(even) { background: rgba(15, 23, 32, .028); }   /* lignes zébrées : l'œil suit la ligne */
.table tbody tr:hover { background: rgba(15, 23, 32, .055); }
.table td a.row-link { font-weight: 500; text-decoration: none; }
.table td a.row-link:hover { text-decoration: underline; }
.table .act { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* Liste simple */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }

/* Barre d'outils (recherche, filtres) */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg a { padding: 7px 12px; white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 500; border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a[aria-current] { background: var(--ink); color: #fff; }
.seg-large { margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
/* Chiffres clés : un montant à surveiller (reste à encaisser) et le total mis en avant */
.stat-alerte b { color: var(--warning); }
.stat-total { border-color: var(--accent); }

/* overflow-y: hidden : sans lui, le soulignement de l'onglet (marge -1px) faisait apparaître une petite barre de défilement verticale inutile */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--surface-2, var(--surface)); margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--accent-soft); }
/* Onglet en cours : plein à la couleur du club, texte contrasté, très net d'un coup d'œil ; les autres sont des onglets visibles avec leur cadre. Même composant partout (.tabs). */
.tabs a[aria-current] { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); font-weight: 700; box-shadow: 0 -3px 0 color-mix(in srgb, var(--accent) 60%, black) inset; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty .btn { margin-top: 8px; }

/* Prochaine action (accueil) */
.next { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; display: block; }

/* Progression de l'assistant */
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width var(--t); }
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.checklist li { counter-increment: etape; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: counter(etape); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: var(--f13); font-weight: 600; color: var(--muted); flex: none;
}
.checklist li.fait::before { content: "✓"; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checklist li.passe::before { content: "–"; }
.checklist a { text-decoration: none; font-weight: 500; }
.checklist .grow { flex: 1; }

/* Assistant : mise en page centrée */
.wizard { max-width: 760px; margin: 0 auto; }
.wizard-steps { display: flex; gap: 4px; margin: 0 0 8px; }
.wizard-steps a { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.wizard-steps a.fait, .wizard-steps a.passe { background: color-mix(in srgb, var(--accent) 45%, white); }
.wizard-steps a[aria-current] { background: var(--accent); }
.wizard-foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }
.example { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 14px; font-size: var(--f13); color: var(--ink-2); }
.saved { font-size: var(--f13); color: var(--muted); }

/* Aperçu des points du barème */
.bars { display: grid; gap: 4px; }
.bars div { display: grid; grid-template-columns: 34px 1fr 64px; gap: 8px; align-items: center; font-size: var(--f13); font-variant-numeric: tabular-nums; }
.bars i { display: block; height: 8px; border-radius: 99px; background: var(--accent); min-width: 2px; }
.bars b { text-align: right; font-weight: 500; }

/* Pastilles de couleur et apparences */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Pied de formulaire collant (téléphone) */
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 70%, transparent); padding: 16px 0 8px; margin-top: 8px; }

/* Menu inférieur (téléphone) */
.tabbar { display: none; }

@media (max-width: 1080px) {
  .grid-aside { grid-template-columns: 1fr; }
  /* Téléphone et tablette : le menu latéral laisse la place au menu d'icônes en bas de l'écran */
  .app { grid-template-columns: 1fr; background: none; }
  .side { display: none; }
  .main { padding: 16px 16px 96px; }
  .mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .mobile-head .side-club { padding: 0; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar summary {
    display: grid; justify-items: center; gap: 2px; padding: 4px 0; font-size: 11px; color: var(--muted);
    text-decoration: none; font-weight: 500; list-style: none; cursor: pointer;
  }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--accent); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
  .tabbar details { position: static; }
  .tabbar details[open] summary { color: var(--ink); }
  /* « Plus » : toutes les autres entrées en grille d'icônes (pastilles icône + libellé), pas en liste verticale */
  .tabbar .more {
    position: fixed; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 10px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 60vh; overflow-y: auto;
  }
  .tabbar .more a, .tabbar .more button {
    display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 76px; padding: 10px 4px; font-size: 12px; line-height: 1.2; text-align: center;
    color: var(--ink); background: var(--surface-2, rgba(0, 0, 0, .04)); border: 0; border-radius: var(--radius); text-decoration: none; font-weight: 500;
  }
  .tabbar .more svg { width: 26px; height: 26px; color: var(--accent); }
  .tabbar .more form { display: contents; }
  .tabbar .more button { width: 100%; font: inherit; font-size: 12px; cursor: pointer; }
}

@media (max-width: 820px) {
  .page-head { margin-bottom: 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); } /* minmax : un large tableau défile dans sa carte au lieu d'élargir la page */
  h1 { font-size: var(--f20); }
  .card { padding: 16px; }
  .card.card-flush { padding: 0; }   /* tableaux et listes collés aux bords de leur carte, comme sur ordinateur */

  /* Tableaux en cartes */
  .table.stackable thead { display: none; }
  .table.stackable, .table.stackable tbody, .table.stackable tr, .table.stackable td { display: block; width: 100%; }
  .table.stackable tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stackable td { border: 0; padding: 2px 0; text-align: left; }
  .table.stackable td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-size: var(--f13); }
  .table.stackable td.primary { font-size: var(--f16); padding-bottom: 4px; }
  .table.stackable td.act { text-align: left; padding-top: 8px; }
  /* Formulaires d'action dans une cellule : alignés à gauche et repliés sur plusieurs lignes au besoin */
  .table.stackable td.act .actions { justify-content: flex-start !important; flex-wrap: wrap !important; }
  .table.stackable .hide-sm { display: none; }
  .toolbar input[type=search] { max-width: none; flex: 1 1 100%; }
}
@media (min-width: 1081px) { .mobile-head { display: none; } }

/* Pages simples (connexion, erreur) */
.bare-main { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; }
.bare-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: var(--f16); text-decoration: none; margin-bottom: 20px; }
.bare-brand img { object-fit: contain; border-radius: 8px; }
.bare-card { width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.bare-card h1 { font-size: var(--f20); }
.bare-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: var(--f13); }

/* ==========================================================================
   Jour J (console du directeur) : gros boutons, utilisable d'une main sur téléphone
   ========================================================================== */
.live-clock { background: var(--ink); color: #fff; border-color: var(--ink); }
.live-clock .kicker, .live-clock .muted { color: #A9B2BC; }
.live-clock-main { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.live-blinds { font-size: var(--f24); font-weight: 600; }
.live-time { font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; }
.live-time.pause { color: #F2C14E; }
.live-clock-btns { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 6px; margin-top: 14px; }
.live-clock .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.live-clock .btn:hover { background: rgba(255, 255, 255, .16); }
.live-clock .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.live-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.live-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.live-stats b { display: block; font-size: var(--f20); font-variant-numeric: tabular-nums; line-height: 1.2; }
.live-stats span { font-size: 12px; color: var(--muted); }
.live-tabs { position: sticky; top: 0; background: var(--bg); z-index: 5; margin-bottom: 12px; }
/* Téléphone : les 5 onglets du tournoi tiennent sur la largeur, sans défilement */
@media (max-width: 480px) { .live-tabs { gap: 0; } .live-tabs a { padding: 10px 5px; font-size: 14px; } }
.alerte { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 8px; background: var(--warning-soft); border: 1px solid #EBD39A; }
.alerte.info { background: #EEF2F6; border-color: #D6DEE7; }
.alerte.erreur { background: var(--danger-soft); border-color: #F1C1BC; color: #7A1A12; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden; }
.table-card h3 { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: var(--f14); }
/* Titre de table bien visible : bandeau de la couleur du club, numéro en gros */
.table-card h3 { background: var(--accent-soft); border-bottom: 2px solid var(--accent); }
.table-card h3 .table-num { font-size: var(--f16, 16px); font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.table-card h3 .table-num::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
/* Joueur placé mais pas encore arrivé */
.joueur.retard { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(240, 160, 40, .07) 8px 16px); }
.joueur.retard .qui small { color: #B5730C; font-weight: 600; }
.joueur { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.joueur:last-child { border-bottom: 0; }
/* Joueurs d'une table (jour J) zébrés ; :where garde la priorité aux fonds « retardataire » et « sélectionné » */
.table-card :where(.joueur:nth-child(even of .joueur)) { background: rgba(15, 23, 32, .03); }
.joueur .siege { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); flex: none; }
.joueur .qui { flex: 1; min-width: 0; }
.joueur .qui strong { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joueur .qui small { color: var(--muted); }
.joueur .btn { min-height: 40px; }
/* Siège libre d'une table : ligne discrète, pour voir les trous d'un coup d'oeil */
.joueur.libre { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.joueur.libre .siege { background: transparent; border-style: dashed; color: var(--muted); }
/* Jour J à beaucoup de joueurs (jusqu'à 200) : recherche, accès direct aux tables, plusieurs colonnes */
.live-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; position: sticky; top: 46px; z-index: 4; background: var(--bg); padding: 4px 0; }
.live-recherche { flex: 1 1 240px; min-width: 0; }
.tables-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; align-items: start; }
.tables-grille .table-card { margin-bottom: 0; scroll-margin-top: 110px; }
/* Pointage façon V1 : pseudos rangés sous leur lettre, entourés une fois pointés (sans case à cocher) */
.pointage { padding: 6px 14px 14px; }
.pointage-lettre { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pointage-lettre:last-child { border-bottom: 0; }
.pointage-lettre[hidden] { display: none; }
.pointage-lettre h4 { margin: 0; font-size: 20px; line-height: 40px; text-align: center; color: var(--accent); }
.pointage-noms { display: flex; flex-wrap: wrap; gap: 8px; }
.pointe { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 40px; min-width: 76px; padding: 4px 14px;
  border: 2px solid transparent; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; line-height: 1.15; }
.pointe small { font-size: 11px; color: var(--muted); font-weight: 500; }
.pointe:hover { border-color: var(--line); }
.pointe.present { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-weight: 700; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.pointe[hidden] { display: none; }
.joueur[hidden], .table-card[hidden] { display: none; }
@media (max-width: 420px) { .tables-grille { grid-template-columns: 1fr; } }
.sheet { border: 0; border-radius: 16px 16px 0 0; padding: 0; width: 100%; max-width: 520px; margin: auto auto 0; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.sheet::backdrop { background: rgba(15, 23, 32, .45); }
.sheet-in { padding: 20px; display: grid; gap: 8px; }
.sheet-in h2 { margin: 0; font-size: var(--f20); }
.sheet-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.sheet-list .btn { justify-content: flex-start; min-height: 46px; }
/* Un bloc encadré par groupe (une table, « Sinon »...) : les tables se distinguent d'un coup d'œil */
.sheet-groupe { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.sheet-boutons { display: grid; gap: 6px; }
.sheet-groupe .groupe { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
/* Table du joueur concerné : bordure et titre de la couleur d'accent */
.sheet-groupe.actuelle { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sheet-groupe.actuelle .groupe { color: var(--accent); }
.sheet-list.grille .sheet-boutons { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.sheet-list.grille .btn { justify-content: center; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; z-index: 50; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
@media (min-width: 821px) { .sheet { margin: auto; border-radius: 16px; } .toast { bottom: 24px; } }
@media (max-width: 520px) {
  .live-time { font-size: 2.1rem; }
  .live-clock-btns { grid-template-columns: repeat(4, 1fr); }
  .live-clock-btns [data-cmd-main] { grid-column: 1 / -1; grid-row: 1; min-height: 44px; }
  .live-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Vignettes des 3 styles du site (Site > Apparence et assistant). --ap-accent = couleur choisie */
.choices-style .choice { padding: 12px 12px 14px 12px; }
.choices-style .choice input { left: auto; right: 12px; top: 12px; z-index: 1; }
.apercu { --ap-accent: var(--accent); position: relative; display: block; height: 120px; border-radius: 8px; margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); }
.apercu i { position: absolute; display: block; }
.apercu .ap-tete { left: 0; right: 0; top: 0; height: 16px; }
.apercu .ap-titre { left: 12px; top: 32px; width: 56%; height: 14px; border-radius: 2px; }
.apercu .ap-ligne { left: 12px; top: 54px; width: 42%; height: 6px; border-radius: 2px; opacity: .55; }
.apercu .ap-bouton { left: 12px; top: 70px; width: 54px; height: 16px; border-radius: 4px; background: var(--ap-accent); }
.apercu .ap-carte { right: 12px; top: 30px; width: 30%; height: 64px; border-radius: 6px; }
.apercu-classique { background: radial-gradient(ellipse 120% 90% at 50% -10%, #0F1C2E, #070A0F 70%); }
.apercu-classique .ap-tete { background: rgba(13, 17, 23, .94); border-bottom: 1px solid #1E2D3D; }
/* Deux cartes bleu nuit liserées de la couleur du club en haut, comme l'accueil du style Classique */
.apercu-classique::before { content: ""; position: absolute; left: 8px; top: 24px; width: 58%; height: 82px; border-radius: 4px; border: 1px solid #1E2D3D; border-top: 2px solid var(--ap-accent); background: linear-gradient(135deg, #0F2540, #0B1626 60%, #0D1117); }
.apercu-classique .ap-titre { left: 16px; top: 36px; width: 46%; height: 12px; background: #F0F2F8; border-radius: 1px; }
.apercu-classique .ap-ligne { left: 16px; top: 54px; width: 24%; height: 2px; background: var(--ap-accent); opacity: .9; }
.apercu-classique .ap-bouton { left: 16px; top: 66px; width: 46px; height: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--ap-accent) 70%, white), var(--ap-accent)); }
.apercu-classique .ap-carte { right: 8px; top: 24px; width: 32%; height: 82px; border-radius: 4px; background: #111820; border: 1px solid #1E2D3D; border-top: 2px solid var(--ap-accent); }
.apercu-moderne { background: linear-gradient(160deg, #0F1D45, #0A1430); clip-path: none; }
.apercu-moderne .ap-tete { background: #0A1430; border-bottom: 1px solid rgba(255,255,255,.1); }
.apercu-moderne .ap-titre { background: #fff; transform: skewX(-10deg); }
.apercu-moderne .ap-ligne { background: #9BA8C7; }
.apercu-moderne .ap-carte { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.apercu-moderne::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: #F2F4F8; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.apercu-casino { background: radial-gradient(ellipse at 50% 0%, #1D6247, #0C3324 70%); }
.apercu-casino .ap-tete { background: #082419; border-bottom: 1px solid #D6B25E; }
.apercu-casino .ap-titre { background: #F4ECD6; }
.apercu-casino .ap-ligne { background: #D6B25E; height: 3px; top: 52px; width: 22%; opacity: 1; }
.apercu-casino .ap-carte { background: #F4ECD6; border: 2px solid #D6B25E; }
.apercu-casino .ap-carte::after { content: "♦"; position: absolute; left: 6px; top: 2px; color: #8E1B2C; font-style: normal; font-size: 13px; }
.apercu-neon { background: radial-gradient(ellipse at 78% 30%, color-mix(in srgb, var(--ap-accent) 35%, transparent), transparent 60%), #0B0912; }
.apercu-neon .ap-tete { background: #07060C; }
.apercu-neon .ap-titre { background: transparent; border: 2px solid var(--ap-accent); box-shadow: 0 0 8px var(--ap-accent), inset 0 0 6px var(--ap-accent); }
.apercu-neon .ap-ligne { background: #A69EBB; }
.apercu-neon .ap-bouton { box-shadow: 0 0 10px var(--ap-accent); }
.apercu-neon .ap-carte { background: #14101F; border: 1px solid var(--ap-accent); box-shadow: 0 0 12px color-mix(in srgb, var(--ap-accent) 50%, transparent); }
/* Les vignettes reprennent la mise en page de chaque style : Casino et Néon centrés, Tournoi TV en bande de titre */
.apercu-casino .ap-titre { left: 22%; width: 56%; }
.apercu-casino .ap-ligne { left: 39%; }
.apercu-casino .ap-bouton { left: calc(50% - 27px); top: 62px; }
.apercu-casino .ap-carte { left: 14%; right: 14%; width: auto; top: 86px; height: 24px; }
.apercu-neon .ap-titre { left: 18%; width: 64%; top: 46px; }
.apercu-neon .ap-ligne { left: 30%; width: 40%; top: 68px; }
.apercu-neon .ap-bouton { left: calc(50% - 27px); top: 82px; border-radius: 99px; }
.apercu-neon .ap-carte { left: 30%; right: 30%; width: auto; top: 22px; height: 16px; border-radius: 99px; }
.apercu-tele { background: linear-gradient(90deg, #0E1015 40%, #171A21); }
.apercu-tele .ap-tete { background: #0A0B0F; border-bottom: 3px solid var(--ap-accent); }
.apercu-tele .ap-titre { background: #fff; border-radius: 0; height: 16px; box-shadow: -6px 0 0 var(--ap-accent); left: 18px; }
.apercu-tele .ap-ligne { background: #9BA3B2; left: 18px; }
.apercu-tele .ap-bouton { border-radius: 0; left: 18px; clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.apercu-tele .ap-carte { border-radius: 0; background: #1C2029; border-top: 8px solid var(--ap-accent); }
.apercu-sportif { background: linear-gradient(115deg, #151A21 0 52%, var(--ap-accent) 52% 60%, #151A21 60% 66%, var(--ap-accent) 66% 70%, #151A21 70%); }
.apercu-sportif .ap-tete { background: #111418; border-bottom: 3px solid var(--ap-accent); }
.apercu-sportif .ap-titre { background: #fff; border-radius: 0; height: 18px; transform: skewX(-12deg); }
.apercu-sportif .ap-ligne { background: #9BA3B2; }
.apercu-sportif .ap-bouton { border-radius: 0; box-shadow: 3px 3px 0 rgba(0, 0, 0, .4); }
.apercu-sportif .ap-carte { background: #fff; border-radius: 0; border-top: 10px solid var(--ap-accent); box-shadow: 5px 5px 0 rgba(0, 0, 0, .4); }
.apercu-epure { background: radial-gradient(circle at 92% 0, color-mix(in srgb, var(--ap-accent) 30%, transparent) 0 38px, transparent 39px), color-mix(in srgb, var(--ap-accent) 14%, #F7F4EE); }
.apercu-epure .ap-tete { background: #F7F4EE; border-bottom: 1px solid #E5DED2; }
.apercu-epure .ap-titre { background: #1C1C1E; height: 6px; top: 40px; left: 22%; width: 56%; }
.apercu-epure .ap-ligne { background: #C8C8CC; left: 32%; width: 36%; top: 54px; height: 3px; }
.apercu-epure .ap-bouton { left: calc(50% - 27px); top: 66px; border-radius: 99px; height: 12px; }
.apercu-epure .ap-carte { left: 18%; right: 18%; width: auto; top: 90px; height: 20px; background: #fff; border-top: 3px solid var(--ap-accent); box-shadow: 0 6px 14px rgba(0, 0, 0, .06); }
.apercu-vegas { background: #9E1B23; border-bottom: 12px solid #F5EAD6; }
.apercu-vegas .ap-tete { background: #2B1A12; border-bottom: 2px solid #C9A24A; }
.apercu-vegas .ap-titre { background: #FFF4DF; height: 28px; top: 28px; border-radius: 10px; box-shadow: 0 0 0 2px #2B1A12, 0 0 0 4px #C9A24A; }
.apercu-vegas .ap-ligne { background: #FFD27A; top: 66px; }
.apercu-vegas .ap-bouton { top: 78px; border-radius: 99px; }
.apercu-vegas .ap-carte { background: #1E8C86; border: 2px solid #FFF4DF; border-radius: 12px; }
.swatch-libre span { display: grid !important; place-items: center; background: conic-gradient(#f43, #fc3, #3c6, #3cf, #63f, #f3c, #f43); color: #fff; font-weight: 700; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.swatch-libre input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.photo-apercu { width: 100%; max-width: 420px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 8px; }

/* Reçu de cotisation (page imprimable) */
.recu h1 { margin-bottom: 4px; }
.recu .table { margin: 16px 0; }
.recu .table th { text-align: left; width: 45%; }
@media print {
  .no-print, .bare-links, .bare-brand { display: none !important; }
  .bare-card { box-shadow: none; border: 0; }
  body { background: #fff; }
  /* Impression et PDF : la feuille commence en haut de la page (plus centrée verticalement comme l'écran de connexion) */
  .bare-main { min-height: 0; display: block; padding: 0; }
}
/* Feuilles à imprimer (tirage, résultats Winamax) : en haut de l'écran aussi, comme sur le papier */
.bare-main:has(.tirage-feuille, .feuille) { place-content: start center; }

/* Primes (bounties) sur la fiche d'un tournoi : une ligne = texte, façon de choisir le porteur, précisions */
.primes-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.primes-tete p { margin: -6px 0 12px; }
/* Une prime = une carte : texte en haut, état (porteur flouté), règle du porteur en dessous */
.prime-ligne { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 10px; display: grid; gap: 8px; background: var(--surface); min-width: 0; }
.prime-nouvelle { border-style: dashed; background: none; }
.prime-haut { display: flex; align-items: center; gap: 10px; }
.prime-haut input { flex: 1; min-width: 0; font-weight: 600; }
.prime-etoile { color: var(--accent, #b8860b); font-size: 1.1rem; }
.prime-etat { margin: 0; padding-left: 28px; color: var(--muted, #667); }
.prime-regle { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding-left: 28px; }
.prime-regle label { display: grid; gap: 4px; }
.prime-regle label[hidden] { display: none; }
.prime-regle select { min-width: 220px; max-width: 100%; }
.prime-options { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; margin-bottom: 8px; }
/* Nom caché : flou tant que le bureau n'a pas demandé à voir les porteurs */
.flou { filter: blur(6px); user-select: none; cursor: pointer; }   /* un clic le montre en clair */
@media (max-width: 640px) { .prime-etat, .prime-regle { padding-left: 0; } .prime-regle select { min-width: 0; width: 100%; } .prime-regle label { width: 100%; } }
/* Réglages > Écran du tournoi : champ suivi d'un bouton (Écouter, Dire) sur la même ligne */
.row-flex { display: flex; gap: 8px; align-items: center; }
.row-flex > input, .row-flex > select { flex: 1; min-width: 0; }
.phrase { margin-bottom: 10px; }

/* Feuille Winamax : tableau de résultats sur toute la largeur */
.bare-card:has(.feuille) { width: min(820px, calc(100vw - 32px)); }
.feuille .table th { width: auto; }

/* E-mails groupés : barre d'avancement de l'envoi et message tel qu'envoyé */
.barre-envoi { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0 12px; }
.barre-envoi span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.message-envoye { white-space: pre-wrap; font: inherit; margin: 0; padding: 14px; background: var(--bg, #F6F7F9); border-radius: var(--radius); }

/* Console exploitant : QR code de la double authentification (même rendu que dans Mon espace) */
.qr-2fa { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-img { background: #fff; padding: 8px; border-radius: 10px; line-height: 0; }
.qr-img svg { width: 180px; height: 180px; max-width: 60vw; max-height: 60vw; }
.cle-2fa { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; overflow-wrap: anywhere; }

/* Abonnement : état du club en grand, et bandeau d'avertissement de l'administration */
.etat-abo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.etat-abo b { font-size: var(--f24); font-weight: 600; }
.trial-bar.alerte { background: var(--danger); }
.trial-bar.attention { background: var(--warning); }

/* ---------- Galerie photos (Site > Galerie) ---------- */
.albums-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.album-tuile { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: inherit; }
.album-tuile:hover { border-color: var(--line-strong); }
.album-couv { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--surface-2); overflow: hidden; margin-bottom: 4px; }
.album-couv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.photo-admin { margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; }
.photo-admin img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.photo-admin .badge { position: absolute; top: 14px; left: 14px; }
.legende-form { display: flex; gap: 6px; margin-top: 8px; }
.legende-form input { flex: 1; min-width: 0; }

/* ---------- Recherche rapide (Ctrl+K) et aide ---------- */
kbd { font: 600 11px/1 var(--font, inherit); padding: 3px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--muted); }
.side-recherche { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font: inherit; font-size: var(--f13); cursor: pointer; text-align: left; }
.side-recherche:hover { border-color: var(--line-strong); color: var(--ink); }
.side-recherche svg { width: 16px; height: 16px; }
.side-recherche span { flex: 1; }
.mobile-actions { display: flex; align-items: center; gap: 4px; }
.btn-icone { position: relative; padding: 0 8px; }
.btn-icone svg { width: 18px; height: 18px; }
.pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 6px; vertical-align: middle; }
.btn-icone .pastille { position: absolute; top: 4px; right: 4px; margin: 0; }

.palette-fond { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 32, .45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette-fond[hidden] { display: none; }
.palette { width: min(620px, 100%); background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(15, 23, 32, .3); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 17px; outline: none; box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li a { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.palette li a[aria-selected="true"] { background: var(--accent-soft); }
.palette .p-type { flex: 0 0 74px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.palette .p-titre { flex: 1; font-weight: 500; }
.palette .p-sous { color: var(--muted); font-size: var(--f13); }
.palette .p-vide { padding: 14px 12px; color: var(--muted); }
.palette-pied { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.aide-grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.aide-sommaire { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.aide-sommaire a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: var(--f13); background: var(--surface); }
.aide-guide { margin-bottom: 14px; scroll-margin-top: 16px; }
.aide-guide h2 { margin-bottom: 2px; }
.aide-q { border-top: 1px solid var(--line); }
.aide-q summary { padding: 11px 0; cursor: pointer; font-weight: 500; }
.aide-q p { margin: 0 0 12px; color: var(--ink-2); }
.aide-nouveautes { position: sticky; top: 16px; }
.aide-nouveautes ul { list-style: none; margin: 0; padding: 0; }
.aide-nouveautes li { padding: 10px 0; border-top: 1px solid var(--line); }
.aide-nouveautes li.nouveau strong::after { content: "Nouveau"; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 600; vertical-align: 2px; }
.aide-nouveautes li p { margin: 2px 0 0; font-size: var(--f13); color: var(--ink-2); }
@media (max-width: 900px) { .aide-grille { grid-template-columns: minmax(0, 1fr); } .aide-nouveautes { position: static; order: -1; } }

/* Aperçu des logos dans le formulaire d'identité (la version « fond sombre » est montrée sur fond foncé) */
.logo-apercu img { max-height: 64px; max-width: 220px; object-fit: contain; border-radius: 8px; padding: 6px; background: var(--surface-2, #f3f4f6); }
.logo-apercu.sombre img { background: #0E1424; }

/* Réglages > Écran du tournoi : vignette de chaque modèle de chrono, dessinée en CSS d'après le vrai écran (tv.css) :
   u.g = colonne Structure (à gauche), u.d = colonne Joueurs (à droite), i = décor du modèle, b = temps, em = blindes, s = barre de progression */
.choices-modele { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.choices-modele .choice { padding: 10px 10px 12px; }
.choices-modele .choice input { left: auto; right: 10px; top: 10px; z-index: 1; }
.mini-chrono { position: relative; display: grid; grid-template-columns: 24% 1fr 20%; place-items: center; text-align: center; aspect-ratio: 16 / 9; border-radius: 6px; margin-bottom: 8px; background: #0B0E14; color: #fff; overflow: hidden; font-variant-numeric: tabular-nums; }
.mini-chrono::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9%; background: #151A23; border-bottom: 1px solid #222A36; }
.mini-chrono u { align-self: stretch; justify-self: stretch; margin: 12% 0 0; background: repeating-linear-gradient(#2B3445 0 2px, transparent 2px 7px) 6px 5px / calc(100% - 12px) 100% no-repeat; border-right: 1px solid #222A36; }
.mini-chrono u.d { grid-column: 3; border-right: 0; border-left: 1px solid #222A36; }
.mini-chrono > b, .mini-chrono > em { grid-column: 2; grid-row: 1; position: relative; z-index: 1; }
.choice .mini-chrono b { font-size: 24px; line-height: 1; color: #fff; align-self: center; margin-top: -8px; }
.choice .mini-chrono em { font-style: normal; font-size: 10px; color: #A9B4C7; align-self: end; margin-bottom: 9%; }
.mini-chrono i { position: absolute; }
.mini-chrono s { position: absolute; left: 0; top: 9%; height: 2px; width: 62%; background: var(--accent); }
/* Classique : structure à gauche, chrono et blindes au centre, joueurs à droite */
.mini-classique u.g, .mini-classique u.d { background-color: #151A23; }
/* Cadran : le temps dans un anneau qui se vide, informations à côté */
.mini-cadran i { left: 50%; top: 55%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: conic-gradient(var(--accent) 62%, #273042 0); -webkit-mask: radial-gradient(farthest-side, transparent 80%, #000 81%); mask: radial-gradient(farthest-side, transparent 80%, #000 81%); }
.choice .mini-cadran b { font-size: 12px; margin-top: 8px; }
.choice .mini-cadran em { margin-bottom: 4%; }
/* Tapis : table de poker à la couleur du club, temps au centre, trois cartes (blindes) en dessous */
.mini-tapis { background: color-mix(in srgb, var(--accent) 35%, #06140D); }
.mini-tapis u, .mini-tapis::before, .mini-tapis s { display: none; }
.mini-tapis { grid-template-columns: 1fr; }
.mini-tapis > b, .mini-tapis > em { grid-column: 1; }
.mini-tapis i { left: 10%; right: 10%; top: 9%; bottom: 9%; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--accent) 70%, #08140E), color-mix(in srgb, var(--accent) 40%, #08140E)); border: 3px solid #4A2E1B; z-index: 0; }
.mini-tapis i::after { content: ""; position: absolute; left: 50%; bottom: 9%; width: 9px; height: 13px; margin-left: -4px; border-radius: 1px; background: #F7F3E8; box-shadow: -13px 0 0 #F7F3E8, 13px 0 0 #F7F3E8; }
.choice .mini-tapis b { font-size: 20px; margin-top: -14px; }
.choice .mini-tapis em { display: none; }
/* Tableau : chiffres sur des plaquettes sombres, façon tableau d'aéroport */
.mini-tableau b, .mini-tableau em { font-family: ui-monospace, Menlo, Consolas, monospace; color: #F5D35B !important; }
.mini-tableau b { letter-spacing: 3px; background: repeating-linear-gradient(90deg, #1E2228 0 11px, transparent 11px 14px); padding: 2px 0 2px 2px; }
/* WSOP : fond uni, cases encadrées, « Level » et temps géants, blindes et informations en dessous */
.mini-wsop { background: color-mix(in srgb, var(--accent) 80%, #000); }
.mini-wsop::before { background: none; border: 1px solid rgba(255,255,255,.55); left: 2%; right: 2%; top: 4%; height: 12%; }
.mini-wsop u { background: none; border: 1px solid rgba(255,255,255,.55); margin: 20% 0 4% 2%; }
.mini-wsop u.d { margin: 20% 2% 4% 0; }
.mini-wsop i { left: 25%; right: 21%; top: 20%; bottom: 4%; border: 1px solid rgba(255,255,255,.55); background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) 0 56% / 100% 1px no-repeat; }
.mini-wsop s { display: none; }
.choice .mini-wsop b { font-family: Arial, sans-serif; font-size: 22px; margin-top: -4px; }
.choice .mini-wsop em { font-family: Arial, sans-serif; font-size: 9px; color: #fff; margin-bottom: 8%; }

/* Journal du tournoi (console > Outils) : heure, niveau, action, directeur */
.journal { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; font-size: var(--f13); }
.journal li { display: grid; grid-template-columns: 44px 32px 1fr auto; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); align-items: baseline; }
.journal li:first-child { border-top: 0; }
.journal .j-heure { font-variant-numeric: tabular-nums; color: var(--muted); }
.journal .j-niv { color: var(--muted); font-size: 11px; }
.journal .j-qui { color: var(--muted); font-size: 11px; }

/* Tableau de bord : festival à la une (tournois en accès direct) et tournois suivants */
.festival-une { border-top: 3px solid var(--accent); }
.festival-tournois { display: grid; gap: 8px; margin-top: 14px; }
.festival-tournoi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.festival-tournoi a:not(.btn) { color: inherit; text-decoration: none; }   /* :not(.btn) : sinon le texte du bouton « Jour J » n'avait pas la couleur d'accent */
.festival-tournoi.actif { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.ensuite { display: grid; gap: 2px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.ensuite a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: inherit; text-decoration: none; }
.ensuite a:hover span:first-child { text-decoration: underline; }
/* Lots d'un tournoi : places de / à, description, et ticket Winamax (miles décomptés) pour les clubs partenaires */
.lot-ligne { display: grid; grid-template-columns: 52px 52px 1fr; gap: 6px; margin-bottom: 6px; }
/* Lot avec ticket Winamax : le ticket au bout de la ligne ; sur téléphone, sur une ligne à part */
.lot-ligne.avec-ticket { grid-template-columns: 52px 52px 1fr minmax(150px, 230px); }
@media (max-width: 640px) {
  .lot-ligne.avec-ticket { grid-template-columns: 52px 52px 1fr; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); }
  .lot-ligne.avec-ticket select { grid-column: 1 / -1; }
}

/* Membres > Nouveaux : choix de la période (adhésions payées entre deux dates) */
.periode-membres { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; margin-bottom: 16px; }
.periode-membres .field { margin: 0; }
.periode-membres .check { margin: 0 0 10px; }
.periode-membres .periode-total { flex-basis: 100%; margin: 0; }
/* Liste des membres : montant à côté du statut de cotisation, saisie rapide de la prononciation */
.cotis .badge { min-width: 5.6em; justify-content: center; }   /* badges de même largeur : les montants s'alignent */
.montant-ligne { margin-left: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saisie-ligne { margin: 0; flex-wrap: nowrap; }
.saisie-ligne input { flex: 1; min-width: 160px; }
@media (max-width: 720px) { .saisie-ligne { flex-wrap: wrap; } }

/* Restauration : carte (une carte par catégorie), fournitures, courses, caisse */
.resto-categorie-tete { padding: 14px 16px 6px; }
.resto-categorie-nom { font-weight: 650; font-size: 1.05rem; max-width: 420px; }
.resto-categorie-pied { padding: 8px 12px 12px; }
.resto-table td { padding-top: 6px; padding-bottom: 6px; vertical-align: top; }
.resto-table input[type=text], .resto-table select { width: 100%; min-width: 0; }
.resto-prix { width: 110px; }
/* Fournitures : une carte par rayon, une ligne lisible par fourniture qui s'ouvre pour être modifiée */
.fournitures .rayon + .rayon { margin-top: 16px; }
.rayon-titre { margin: 0; padding: 14px 18px 10px; font-size: var(--f16); display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); }
.fourniture { border-bottom: 1px solid var(--line); }
.fourniture:last-child { border-bottom: 0; }
.fourniture:nth-child(odd of .fourniture) > summary { background: rgba(15, 23, 32, .028); }   /* zébrage */
.fourniture > summary { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: 4px 16px; align-items: center; padding: 12px 18px; cursor: pointer; list-style: none; min-height: 48px; }
.fourniture > summary::-webkit-details-marker { display: none; }
.fourniture > summary:hover { background: rgba(15, 23, 32, .055); }
.fourniture-nom { font-weight: 600; }
.fourniture-regle { color: var(--ink-2); }
.fourniture-modifier { color: var(--accent); font-weight: 500; font-size: var(--f13); }
.fourniture[open] .fourniture-modifier { visibility: hidden; }
.fourniture[open] > summary { background: var(--accent-soft); }
.fourniture-edition { padding: 16px 18px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.choix-calcul { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.phrase-calcul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--f16); margin-bottom: 6px; }
.phrase-calcul input { width: 90px; text-align: right; }
.fourniture-edition .base-texte, .fourniture-edition .sources-calcul { display: none; }
.fourniture-edition[data-base="joueurs"] [data-pour="joueurs"], .fourniture-edition[data-base="repas"] [data-pour="repas"],
.fourniture-edition[data-base="fournitures"] [data-pour="fournitures"], .fourniture-edition[data-base="fournitures"] .sources-calcul { display: inline; }
.fourniture-edition[data-base="fournitures"] .sources-calcul { display: grid; }
.fourniture-edition[data-base="manuel"] [data-si-calcul] { display: none; }
.sources-grille { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fourniture-edition .retirer { margin-top: 14px; color: var(--danger); }
/* Barre Enregistrer toujours visible en bas de l'écran */
.barre-enregistrer { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 820px) {
  .fourniture > summary { grid-template-columns: 1fr auto; }
  .fourniture-regle { grid-column: 1 / -1; grid-row: 2; font-size: var(--f13); }
  .barre-enregistrer { bottom: calc(62px + env(safe-area-inset-bottom)); }   /* au-dessus de la barre d'onglets du téléphone */
}
.resto-reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; align-items: start; }
.resto-reglages .field { margin: 0; }
.resto-jours { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.resto-jours div { display: flex; flex-direction: column; }
.resto-jours span { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.resto-rayon th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.resto-quantite { width: 80px; text-align: right; }
.caisse-total { font-size: 1.1rem; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.crumb-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.crumb-ligne .crumb { margin-bottom: 0; }
.nav-tournois { display: flex; align-items: center; gap: 4px; }
.nav-tournois select { max-width: 280px; min-height: 30px; padding: 2px 8px; font-size: var(--f13); }
.ligne-ajoutee { animation: ligne-entre .3s ease-out; }
/* ── Mouvement de l'administration (avec js/anime.js et base.css) ─────────────────────────────────────
   Plus court que sur le site : on travaille ici, les pages doivent rester vives. */
.main .apparait { transform: translateY(10px); }
.main .apparait.vu { transition-duration: .4s, .45s; transition-delay: calc(var(--i, 0) * 45ms); }
.page-head { animation: entete-entre .45s var(--doux) both; }
@keyframes entete-entre { from { opacity: 0; transform: translateX(-10px); } }
/* Chiffres clés et cartes cliquables : légère élévation au survol */
.stat { transition: transform .2s var(--doux), box-shadow .2s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.progress > span { transition: width .6s var(--doux); }
@keyframes ligne-entre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ligne-ajoutee { animation: none; } }
}

/* Réglages > Écran : un son par événement, sons envoyés par le club */
.sons-evenements { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.sons-evenements summary { cursor: pointer; }
.liste-sons { list-style: none; margin: 0 0 14px; padding: 0; }
.liste-sons li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.liste-sons li > span { flex: 1; }
.liste-sons form { margin: 0; }

.prose img.img-petite { max-width: 33%; } .prose img.img-moyenne { max-width: 60%; } .prose img.img-grande { max-width: 100%; }
.prose img { height: auto; border-radius: 8px; display: block; margin: 12px auto; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 12px 0; padding: 4px 14px; color: var(--muted); }

/* Tirage des tables à imprimer (admin/tournaments/tirage.php) : une fiche par table, logo du club en petit */
.bare-card:has(.tirage-feuille) { width: min(900px, calc(100vw - 32px)); }
.tirage-tete { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tirage-tete h1 { margin: 0; font-size: 1.5rem; }
.tirage-logo { max-height: 40px; max-width: 120px; width: auto; height: auto; object-fit: contain; }   /* un logo large ne prend pas toute la page */
.tirage-tete p { margin: 2px 0 0; color: var(--muted); }
.tirage-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tirage-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; break-inside: avoid; }
.tirage-table h2 { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 8px 12px; font-size: 1.05rem;
  color: #fff; background: hsl(var(--teinte) 55% 38%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tirage-table h2 small { font-weight: 400; font-size: .8rem; opacity: .9; }
.tirage-table ol { list-style: none; margin: 0; padding: 0; }
.tirage-table li { display: flex; gap: 10px; padding: 5px 12px; border-top: 1px solid var(--line); }
.tirage-table li b { width: 1.4em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tirage-table li.libre span { color: var(--muted); font-style: italic; }
.tirage-table li:nth-child(even) { background: #F3F4F6; }   /* zébrage, gardé à l'impression */
.tirage-table { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print {
  @page { size: A4; margin: 12mm; }
  .tirage-feuille { font-size: 11pt; }
  .tirage-tables { grid-template-columns: repeat(2, 1fr); }
  .bare-card:has(.tirage-feuille) { width: auto; padding: 0; }
}
.tirage-feuille > .no-print { margin-top: 20px; }
/* Vidéo YouTube insérée dans une page ou une actualité (Core\Html) : lecteur 16/9 sur toute la largeur du texte */
.prose .video-youtube { aspect-ratio: 16 / 9; margin: 16px 0; border-radius: 10px; overflow: hidden; background: #000; }
.prose .video-youtube iframe { display: block; width: 100%; height: 100%; border: 0; }
.photo-admin.photo-attente { border-color: var(--warning); box-shadow: 0 0 0 2px var(--warning-soft); }   /* photo de joueur à valider */

/* Caisse de la buvette sur tablette (restauration/vente.php) : gros boutons à gauche, ticket fixe à droite */
.caisse { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 20px; align-items: start; }
.caisse-cat { font-size: .95rem; color: var(--muted); margin: 18px 0 8px; }
.caisse-cat:first-child { margin-top: 0; }
.caisse-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.caisse-article { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 92px; padding: 12px; text-align: left;
  font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: inherit;
  cursor: pointer; touch-action: manipulation; transition: transform .1s ease, border-color .15s, background .15s; }
.caisse-article b { font-size: 1.05rem; color: var(--accent); }
.caisse-article.en-avant { border-color: var(--accent); }
.caisse-article:active { transform: scale(.97); background: var(--accent-soft); }
.caisse-ticket { position: sticky; top: 16px; }
.caisse-ticket h2 { margin-top: 0; }
.caisse-lignes { list-style: none; margin: 0 0 10px; padding: 0; }
.caisse-lignes li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.caisse-lignes li span { flex: 1; }
.caisse-lignes li.muted { border: 0; }
.caisse-total-ticket { display: flex; justify-content: space-between; font-size: 1.2rem; margin: 10px 0; }
.caisse-total-ticket b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.caisse-rendu { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin-bottom: 12px; font-size: .9rem; }
.caisse-rendu span { grid-column: 1 / -1; }
.caisse-payer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.caisse-payer .btn { min-height: 56px; }
.caisse-message { margin: 0 0 10px; }
@media (max-width: 760px) {
  .caisse { grid-template-columns: 1fr; }
  .caisse-ticket { position: sticky; bottom: 0; top: auto; order: 2; }
}
.champs-partenaire { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ── Ergonomie et accessibilité (audit du 9 novembre 2026) ───────────────────────────────────────── */
/* Champs de saisie : bord assez contrasté pour être repéré (3:1 au moins sur fond blanc) */
.app :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time],
  input[type=tel], input[type=url], input[type=search], select, textarea) { border-color: #8C949E; }
/* Deux cartes côte à côte dans une grille : alignées en haut (la marge entre cartes empilées ne s'applique pas) */
.grid > .card + .card { margin-top: 0; }
/* Adresse longue (URL à copier) : passe à la ligne au lieu de déborder sur téléphone */
.main code { overflow-wrap: anywhere; }
/* Message après une action, avec bouton « Annuler » à droite */
.flash:has(.flash-annuler) { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flash-annuler { margin: 0; }
.flash-annuler .btn { background: rgba(255, 255, 255, .7); }
/* Écran tactile : boutons et champs à la taille du doigt (44 px conseillés, 40 px pour les petits boutons) */
@media (pointer: coarse) {
  .app .btn { min-height: 44px; }
  .app .btn-sm { min-height: 40px; padding: 0 12px; }
  .app :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time],
    input[type=tel], input[type=url], input[type=search], select) { min-height: 44px; font-size: 16px; }   /* 16 px : pas de zoom auto sur iPhone */
  .app input[type=checkbox], .app input[type=radio] { width: 22px; height: 22px; }
  .seg a { padding: 11px 14px; }
  .tabs a { padding: 12px 14px; }
}

/* Aperçu de l'image du chrono : deux mini écrans 16/9 (fond clair, fond foncé) */
.ecran-apercus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 10px; }
.ecran-apercu-bloc { display: grid; gap: 6px; align-content: start; }
.ecran-apercu { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ecran-apercu-clair { background: #F4F1EA; color: #1B2230; }
.ecran-apercu-sombre { background: #0B1220; color: #F2F4F8; }
.ecran-apercu img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: var(--img-h, 60%); max-width: 80%; object-fit: contain; opacity: var(--img-o, .2); }
.ecran-apercu span { position: relative; font: 800 clamp(28px, 6vw, 56px)/1 system-ui, sans-serif; letter-spacing: -.02em; }
@media (max-width: 640px) { .ecran-apercus { grid-template-columns: minmax(0, 1fr); } }

/* Réglages > Écran du tournoi : quatre blocs thématiques (apparence, contenu, sons, voix) avec un petit sommaire */
.reglages-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.reglages-nav a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; color: inherit; }
.reglages-nav a:hover { background: var(--surface-2, rgba(0, 0, 0, .04)); }
.reglage-groupe { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; scroll-margin-top: 70px; }
.reglage-groupe > h3 { margin: 0 0 12px; font-size: 1.05rem; }

/* Calendrier des événements (comme la V1) : un clic sur une date ajoute un événement */
.cal-admin { margin-bottom: 20px; }
.cal-barre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-barre h2 { margin: 0; font-size: 1.15rem; min-width: 10ch; text-align: center; }
.cal-aide { margin-left: auto; }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-jour-nom { padding: 6px; text-align: center; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-case { position: relative; min-height: 92px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.cal-case.hors { background: var(--surface); color: var(--muted); }
.cal-case.aujourdhui { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-ajout { position: absolute; inset: 0; }   /* toute la case est cliquable */
.cal-ajout:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cal-num { font-size: .8rem; font-weight: 600; position: relative; pointer-events: none; }
.cal-item { position: relative; display: block; padding: 2px 6px; border-radius: 6px; font-size: .74rem; line-height: 1.3; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* au-dessus du lien de la case */
.cal-tournoi { background: var(--accent); color: var(--accent-ink); }
.cal-evenement { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.cal-item.masque { opacity: .55; text-decoration: line-through; }
.cal-legende { display: flex; gap: 8px; margin: 10px 0 0; }
.cal-legende .cal-item { display: inline-block; }
@media (max-width: 700px) { .cal-case { min-height: 64px; } .cal-item { font-size: .66rem; padding: 1px 3px; } .cal-aide { margin-left: 0; width: 100%; } }
.cal-partenaire { background: hsl(var(--cal-teinte) 70% 90%); border-color: hsl(var(--cal-teinte) 55% 55%); color: #1B1F27; }   /* une teinte par partenaire (Winamax...) */

/* Liste de courses à imprimer (admin/restauration/courses-imprimer.php) : feuille A4 avec en-tête, tableau par rayon et pied de page */
.bare-card:has(.courses-feuille) { width: min(900px, calc(100vw - 32px)); }
.bare-main:has(.courses-feuille) { place-content: start center; }
.courses-tete { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 3px solid var(--accent, #333); }
.courses-logo { max-height: 56px; max-width: 150px; width: auto; height: auto; object-fit: contain; }
.courses-tete .courses-club { margin: 0; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.courses-tete h1 { margin: 2px 0 0; font-size: 1.6rem; }
.courses-tete .courses-sous { margin: 2px 0 0; color: var(--muted); }
.courses-resume { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 14px; padding: 8px 12px; background: #F3F4F6; border-radius: 8px; font-size: .9rem; }
.courses-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.courses-table th, .courses-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.courses-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.courses-table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--line); }
.courses-table .courses-rayon th { background: var(--accent, #333); color: #fff; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.courses-table tbody tr:nth-child(even):not(.courses-rayon) td { background: #F9FAFB; }
.courses-table tr { break-inside: avoid; }
.courses-case { display: inline-block; width: 13px; height: 13px; border: 1.5px solid #555; border-radius: 3px; vertical-align: middle; }   /* à cocher au magasin */
.courses-pied { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; }
.courses-feuille, .courses-table { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print {
  @page { size: A4; margin: 12mm; }
  .courses-feuille { font-size: 11pt; }
  .bare-card:has(.courses-feuille) { width: auto; padding: 0; }
}
.courses-feuille > .no-print { margin-top: 20px; }

/* Page Jour J : pointage et tables ensemble. Large : pointage à gauche, tables à droite ; replié quand tout le monde est pointé.
   Étroit (téléphone) : une zone à la fois, choisie avec la bascule Pointage / Tables. */
.jour-zones { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.jour-zones.avec-tables { grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); }
.jour-zones.avec-tables.replie { grid-template-columns: minmax(0, 1fr); }
.jour-zones.avec-tables.replie .jour-pointage-corps, .jour-zones.avec-tables.replie .jour-pointage .live-filtres-bis { display: none; }
.jour-zones.avec-tables .jour-pointage-corps { max-height: calc(100vh - 170px); overflow-y: auto; }
.jour-zones.avec-tables .tables-grille { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.jour-replier { margin-bottom: 8px; }
.jour-bascule { display: none; margin: 0 0 12px; }
.live-filtres-bis { margin: 0 0 8px; }
@media (max-width: 900px) {
  .jour-zones.avec-tables { grid-template-columns: minmax(0, 1fr); }
  .jour-bascule { display: inline-flex; }
  .jour-zones.mobile-tables .jour-pointage, .jour-zones.mobile-pointage .jour-tables { display: none; }
  .jour-zones.avec-tables .jour-pointage-corps { max-height: none; }
  .jour-replier { display: none; }
}
.jour-tirage { margin: 0 0 12px; }
.jour-ajout { margin-top: 28px; }   /* un peu d'air entre les tables et le formulaire d'ajout */
.sheet-list .btn-block, .sheet-list .btn-primary { justify-content: center; text-align: center; }   /* « Appliquer » : texte centré */
.jour-replier { cursor: pointer; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; }   /* bouton bien reconnaissable */
.jour-replier:hover { background: var(--accent-soft); }

/* Console jour J : les boutons d'action prennent la couleur d'accent du club (le rouge reste réservé aux actions destructives) */
.live .btn:not(.btn-ghost):not(.btn-danger), .jour-zones .btn:not(.btn-ghost):not(.btn-danger) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.live .btn:not(.btn-ghost):not(.btn-danger):hover, .jour-zones .btn:not(.btn-ghost):not(.btn-danger):hover { background: color-mix(in srgb, var(--accent) 88%, black); border-color: color-mix(in srgb, var(--accent) 88%, black); color: var(--accent-ink); }
.live .btn-ghost, .jour-zones .btn-ghost { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.live .btn-ghost:hover, .jour-zones .btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Logo du club : la version claire ou sombre selon le thème de l'administration (voir $logoAdmin dans le gabarit) */
.logo-theme { display: contents; }
.logo-theme.logo-sombre, html[data-theme="dark"] .logo-theme.logo-clair { display: none; }
html[data-theme="dark"] .logo-theme.logo-sombre { display: contents; }
.side-club img.logo-pastille { background: #fff; padding: 3px 5px; border-radius: 6px; box-sizing: content-box; }   /* logo clair posé sur fond sombre */

/* Nombre d'éléments à traiter à droite d'une rubrique du menu (commandes, inscriptions, messages) */
.nav-nombre { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }

/* Accueil : panneau « À traiter » à droite de l'étape, toujours visible (vide = « Tout est à jour ») */
.dash-haut { margin-bottom: 8px; }
.a-traiter h3 { margin: 0 0 10px; }
.a-traiter .list > li { padding: 0; }
.a-traiter .list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; color: var(--ink); text-decoration: none; }
.a-traiter .list a:hover { color: var(--accent); }
.a-traiter-n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.dash-titre { font-size: var(--f16, 1rem); margin: 20px 0 10px; }

/* ---- Réglages : onglets, tuiles compactes, champs à la bonne largeur ---- */
.reglages-onglets { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.reglages-onglets a { flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; text-decoration: none; color: inherit; white-space: nowrap; }
.reglages-onglets a:hover { background: var(--surface-2, rgba(0, 0, 0, .04)); }
.reglages-onglets a.actif { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
html:not(.rg-actif) .reglages-onglets { display: none; }   /* sans JavaScript : tout est affiché, pas d'onglets */
.reglages [hidden] { display: none !important; }

/* Cases à cocher : tuiles en grille (2 par ligne sur grand écran) au lieu d'une pile de lignes très hautes */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-bottom: 4px; }
.cases-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.case-tuile { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, transparent); align-items: flex-start; }
.case-tuile:has(input[type=checkbox]:checked) { border-color: var(--accent); }
.case-tuile .small { line-height: 1.35; }

/* Champs : largeur selon le contenu (court : nombre, heure ; moyen : liste ; large : texte), plusieurs par ligne */
.grille-champs { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: flex-start; }
.grille-champs .field { margin-bottom: 8px; }
.grille-champs .champ-court { width: 150px; }
.grille-champs .champ-moyen { width: 260px; }
.grille-champs .champ-large { width: 320px; }
.grille-champs .field > :is(input, select) { width: 100%; }
.grille-champs .hint { margin-top: 3px; }
.reglages .reglage-groupe:first-of-type { border-top: 0; margin-top: 8px; }

/* Bouton Enregistrer collé en bas de l'écran : toujours à portée, même sur un long formulaire */
.reglages form.card > .actions { position: sticky; bottom: 0; z-index: 5; margin: 16px -20px -20px; padding: 12px 20px; background: var(--surface, #fff); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
@media (max-width: 1080px) { .reglages form.card > .actions { bottom: 64px; } }   /* au-dessus du menu à icônes du bas */

/* Récapitulatif des miles Winamax à imprimer : titres de section et lignes de total (même feuille que la liste de courses) */
.recap-titre { margin: 22px 0 8px; font-size: 1.05rem; }
.courses-table .recap-total th, .courses-table .recap-total td { border-top: 2px solid var(--line-strong, #999); font-weight: 700; }

/* Récapitulatif des miles : un titre par étape, total général */
.recap-etape { margin: 20px 0 6px; font-size: 1.1rem; padding: 6px 10px; border-left: 4px solid var(--accent, #333); background: #F3F4F6; break-after: avoid; }
.recap-general { margin: 14px 0 0; font-size: 1rem; }

/* Statistiques : histogramme par jour (une barre par jour, hauteur en % du plus grand jour) */
.histo { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.histo i { flex: 1; min-width: 1px; border-radius: 2px 2px 0 0; background: var(--accent); }
.histo i.c2 { background: #2f8f6b; }
.histo i.c3 { background: #6b7bd6; }
.histo-axe { display: flex; justify-content: space-between; margin-top: 4px; }

/* E-mails : liste de membres à cocher (défilante) */
.liste-cases { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 8px; display: grid; gap: 2px; }
.liste-cases .check[hidden] { display: none; }

/* Boutique : stock par taille sur la fiche d'un article */
.stock-tailles { display: flex; flex-wrap: wrap; gap: 10px; }
.stock-tailles label { display: grid; gap: 4px; font-size: var(--f13); }
.stock-tailles input { width: 84px; }
