:root { --cc-green:#0b5d3b; --cc-green2:#14804f; --cc-orange:#f39c12; }
body { background:#f3f5f4; font-size:15px; }
.rtl body, body.rtl { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif; }
.topbar { background:linear-gradient(90deg,var(--cc-green),var(--cc-green2)); }
.comp-select { max-width:240px; }
.sidenav { width:240px; flex:0 0 240px; min-width:240px; min-height:calc(100vh - 56px); background:#fff; border-inline-end:1px solid #dde3e0; }
@media (min-width: 992px) { .sidenav { position:sticky; top:56px; height:calc(100vh - 56px); overflow:auto; } }
.sidenav .nav-link { color:#24302a; padding:.6rem 1rem; border-inline-start:4px solid transparent; font-weight:500; }
.sidenav .nav-link:hover { background:#eef5f1; }
.sidenav .nav-link.active { background:#e1f0e8; color:var(--cc-green); border-inline-start-color:var(--cc-green); }
.sidenav .ico { display:inline-block; width:1.8rem; }
.side-comp { padding:1rem; background:#f7faf8; border-bottom:1px solid #e3e9e5; }
.main-content { min-width:0; }
.card { border-radius:.75rem; border-color:#e1e6e3; }
.stat { border-width:0 0 0 0; border-top:4px solid !important; }
.stat .stat-ico { font-size:1.4rem; } .stat .stat-val { font-size:2rem; font-weight:800; line-height:1; } .stat .stat-lbl { color:#555; font-size:.85rem; }
.bib { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight:700; background:#fff5d6; border:1px solid #f0d27a; border-radius:.35rem; padding:0 .4rem; direction:ltr; unicode-bidi:isolate; display:inline-block; }
.bib.big { font-size:1.6rem; }
.pos-badge { display:inline-block; min-width:2.2rem; text-align:center; background:var(--cc-green); color:#fff; font-weight:800; border-radius:.5rem; padding:.1rem .4rem; }
.pos-badge.big { font-size:1.6rem; min-width:3.2rem; }
.podium-1 { background:#d4a017; } .podium-2 { background:#8e9aa6; } .podium-3 { background:#b06b2f; }
.runner-chip { display:inline-block; margin:.1rem; padding:.1rem .35rem; background:#eef5f1; border-radius:.4rem; font-size:.85rem; }
.race-card.sex-F, .race-pick.sex-F { border-inline-start:6px solid #e05a8a; }
.race-card.sex-M, .race-pick.sex-M { border-inline-start:6px solid #2f7bd8; }
.race-pick:hover { box-shadow:0 .3rem 1rem rgba(0,0,0,.1); }
.entry-card { border:2px solid var(--cc-green); }
.bib-big { font-size:2.4rem !important; font-weight:800; text-align:center; letter-spacing:.1em; font-family: ui-monospace, Menlo, Consolas, monospace; direction:ltr; }
.next-pos { font-size:1.4rem; color:var(--cc-green); }
.feedback:empty { display:none; }
.feedback .added-line { font-size:1.3rem; }
.entry-table { max-height:70vh; overflow:auto; }
.entry-table td, .entry-table th { white-space:nowrap; }
.entry-table td:nth-child(3) { white-space:normal; }
.confirm-box .btn { min-height:3rem; }
.btn-lg, .form-control-lg { min-height:3rem; }
.logo-prev { height:60px; max-width:120px; object-fit:contain; border:1px solid #ddd; border-radius:.4rem; background:#fff; }
.login-bg { background:linear-gradient(135deg,var(--cc-green),#1b9c62 60%,var(--cc-orange)); }
.login-card { width:100%; max-width:420px; border-radius:1rem; }
.sticky-actions { position:sticky; bottom:0; background:#f3f5f4; padding:.5rem 0; z-index:5; }
@media (max-width: 576px) { .main-content { padding:.75rem !important; } .bib-big { font-size:2rem !important; } h1.h3 { font-size:1.3rem; } }
@media print {
  .no-print, .topbar, .sidenav, .alert-dismissible { display:none !important; }
  body { background:#fff; font-size:11px; } .main-content { padding:0 !important; } .card { border:none; }
  table { page-break-inside:auto; } tr { page-break-inside:avoid; } thead { display:table-header-group; }
  .table-dark th { color:#000 !important; background:#ddd !important; }
}
.bib-big::placeholder { font-size:1.2rem; letter-spacing:0; font-family:inherit; font-weight:400; }
#time { min-width:170px; }
@media (max-width: 576px) { .comp-select { max-width:150px; } .navbar-brand { font-size:1rem; } }
.bib-sheet { display:grid; grid-template-columns:1fr 1fr; gap:0; width:min(100%,520px); aspect-ratio:210/297; padding:3.4%; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.15); direction:ltr; }
.bib-slot { border:1px dashed #bbb; padding:6px; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between; font-size:.7rem; min-width:0; }
.bib-slot.empty { background:repeating-linear-gradient(45deg,#fafafa,#fafafa 6px,#f1f1f1 6px,#f1f1f1 12px); }
.bib-num { font-size:clamp(1.2rem,4.5vw,2.2rem); font-weight:900; font-family:ui-monospace,Menlo,Consolas,monospace; line-height:1; }
.bib-qr { width:22%; aspect-ratio:1; border:2px solid #000; display:flex; align-items:center; justify-content:center; font-size:.6rem; font-weight:700; }
.bib-frame { width:100%; height:80vh; border:1px solid #ccc; background:#fff; }

/* Menu latéral : largeur fixe, jamais compressé ; défilement propre */
@media (min-width: 992px) {
  .sidenav.offcanvas-lg { visibility:visible !important; transform:none !important; position:sticky; }
  .sidenav .offcanvas-body { overflow-y:auto; height:100%; }
}
.sidenav .nav-link { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.side-comp .fw-semibold { overflow-wrap:anywhere; }
.main-content { flex:1 1 auto; overflow-x:hidden; }
@media (min-width: 992px) { .sidenav { width:240px !important; flex:0 0 240px !important; min-width:240px !important; max-width:240px; } }
/* Libellés longs du menu : retour à la ligne, aucun défilement horizontal */
.sidenav, .sidenav .offcanvas-body { overflow-x:hidden !important; }
.sidenav .nav-link { white-space:normal !important; overflow:visible !important; text-overflow:clip !important; display:flex; align-items:flex-start; line-height:1.3; overflow-wrap:anywhere; }
.sidenav .nav-link .ico { flex:0 0 1.8rem; }
