/* Observatoire du roller hockey, mise en page. Couleurs et polices : charte.css */
:root { --orh-orange-texte: #B84A0F; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--orh-glace); color: var(--orh-encre); font: 400 15px/1.5 var(--police-texte); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--orh-bleu); }
a:hover { color: #174A8A; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--orh-orange); outline-offset: 2px; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 12px; top: 12px; z-index: 20; background: #fff; padding: 10px 14px; border-radius: 8px; }
.largeur { max-width: 1180px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Bandeau */
.tete { padding-bottom: 44px; }
.tete .largeur { display: flex; flex-direction: column; gap: 28px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; padding-top: 10px; }
.nav a { color: #DDE2F5; text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a.actif { color: #fff; border-bottom-color: #FFB48A; }
.nav .marque { font: 800 22px/1 var(--police-titre); text-transform: uppercase; color: #fff; margin-right: auto; }
.surtitre { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #C6CDEA; }
.h1 { font: 800 clamp(36px, 8.5vw, 62px)/.95 var(--police-titre); text-transform: uppercase; letter-spacing: .01em; margin: 6px 0 0; overflow-wrap: anywhere; }
.h1 em { font-style: normal; color: #FFB48A; }
.chapeau { margin: 12px 0 0; font-size: 17px; color: #DDE2F5; max-width: 720px; }
.tete-ligne { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; }
.tete label { font-size: 12px; color: #C6CDEA; display: block; margin-bottom: 6px; }
.tete select { min-height: 44px; border-radius: 8px; border: 0; padding: 0 12px; font-weight: 600; }

/* Recherche */
.recherche { position: relative; max-width: 760px; }
.recherche form { display: flex; flex-wrap: wrap; gap: 10px; }
.recherche input { flex: 1 1 200px; min-width: 0; min-height: 52px; border: 0; border-radius: 10px; padding: 0 18px; font-size: 16px; color: var(--orh-encre); }
.bouton { min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--orh-orange-texte); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.bouton:hover { background: #9A3D0C; color: #fff; }
.bouton.secondaire { background: #fff; color: var(--orh-encre); border: 1px solid var(--orh-ligne); }
.bouton.sombre { background: var(--orh-nuit); }
.suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 10px; box-shadow: var(--ombre); list-style: none; margin: 0; padding: 6px; z-index: 10; max-height: 60vh; overflow: auto; }
.suggestions a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--orh-encre); min-height: 44px; }
.suggestions a:hover, .suggestions a:focus { background: var(--orh-bleu-clair); }
.suggestions .type { grid-row: span 2; align-self: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #fff; background: var(--orh-bleu); border-radius: 4px; padding: 3px 6px; }
.suggestions .type.arbitre { background: var(--orh-nuit-2); }
.suggestions .type.equipe { background: var(--orh-teal); }
.suggestions small { color: var(--orh-encre-2); }

/* Corps */
.corps { margin-top: -24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 26px; flex: 1; outline: none; }
.carte { background: var(--orh-carte); border: 1px solid var(--orh-ligne); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 22px 24px; min-width: 0; }
.carte > .orh-h2:first-child { margin-top: 0; }
.encart { background: var(--orh-bleu-clair); border-color: #C9D1E2; box-shadow: none; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tuile { padding: 18px 20px; }
.tuile .orh-chiffre { color: var(--orh-bleu); font-size: 40px; }
.rangee { display: flex; flex-wrap: wrap; gap: 24px; }
.rangee > * { flex: 1 1 440px; }
.note { font-size: 13px; color: var(--orh-encre-2); margin: 6px 0 0; }
.txt { font-size: 14px; color: var(--orh-encre-2); margin: 0 0 12px; }
.vide { padding: 30px; text-align: center; color: var(--orh-encre-2); }

/* Barres : la largeur est proportionnelle à la donnée */
.barres { display: flex; flex-direction: column; gap: 8px; }
/* Colonnes fixes : toutes les pistes d'un bloc ont la même longueur, donc la même échelle */
.barre { display: grid; grid-template-columns: clamp(110px, 28%, 230px) 1fr 64px; gap: 12px; align-items: center; font-size: 14px; text-decoration: none; color: var(--orh-encre); min-height: 30px; }
a.barre { min-height: 44px; border-radius: 6px; padding: 0 6px; margin: 0 -6px; }
a.barre:hover { background: var(--orh-bleu-clair); color: var(--orh-encre); }
.barre .piste { height: 16px; background: #EEF2F9; border-radius: 4px; position: relative; overflow: visible; }
.barre .plein { display: block; height: 100%; background: var(--orh-bleu); border-radius: 4px; }
.barre .plein.gris { background: var(--orh-encre-3); }
.barre .plein.accent { background: var(--orh-orange); }
.barre .ic { position: absolute; top: 50%; height: 2px; background: var(--orh-nuit); transform: translateY(-50%); }
.barre .milieu { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--orh-nuit); opacity: .55; }
.barre b { font-variant-numeric: tabular-nums; text-align: right; }
.barre .n { color: var(--orh-encre-2); font-size: 12px; }
.barre .sous { display: block; font-size: 12px; color: var(--orh-encre-2); font-weight: 400; }
.barres.large .barre { grid-template-columns: clamp(110px, 22%, 200px) 1fr 190px; }
.corps { position: relative; z-index: 2; }

/* Histogrammes */
.histo { display: flex; align-items: flex-end; gap: 4px; height: 180px; border-bottom: 1px solid var(--orh-encre-3); }
.histo div { flex: 1; background: var(--orh-bleu); border-radius: 4px 4px 0 0; min-height: 1px; }
.histo div.accent { background: var(--orh-orange); }
.axe { position: relative; height: 18px; font-size: 12px; color: var(--orh-encre-2); }
.axe span { position: absolute; }

/* Tableaux */
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; font-weight: 600; color: var(--orh-encre-2); text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--orh-ligne); white-space: nowrap; }
td { font-size: 15px; text-align: right; padding: 0 12px; height: 46px; border-bottom: 1px solid #E8EBF2; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.g, td.g { text-align: left; }
tr.moi td { background: var(--orh-orange-clair); }
td a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* Filtres */
.filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filtres label { display: block; font-size: 12px; color: var(--orh-encre-2); margin-bottom: 4px; }
.filtres > div { flex: 1 1 150px; min-width: 0; }
.filtres select { width: 100%; min-height: 44px; border: 1px solid var(--orh-ligne); border-radius: 8px; padding: 0 10px; background: #fff; max-width: 100%; }
.onglets { display: flex; gap: 8px; flex-wrap: wrap; }
.onglets a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; border: 1px solid #C9D1E2; background: #fff; text-decoration: none; color: var(--orh-encre); font-weight: 600; }
.onglets a[aria-current="page"] { background: var(--orh-nuit); color: #fff; border-color: var(--orh-nuit); }

/* Pied et dialogue */
.pied { border-top: 1px solid var(--orh-ligne); background: #fff; }
.pied-l { padding: 20px; display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: space-between; font-size: 13px; color: var(--orh-encre-2); }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--orh-bleu); text-decoration: underline; cursor: pointer; min-height: 44px; }
dialog { border: 0; border-radius: 14px; padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(20,22,58,.35); }
dialog::backdrop { background: rgba(20,22,58,.55); }
dialog label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
dialog textarea, dialog input { width: 100%; border: 1px solid var(--orh-ligne); border-radius: 8px; padding: 10px 12px; }
dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.chargement { padding: 60px 0; text-align: center; color: var(--orh-encre-2); }

@media (max-width: 600px) {
  .barre, .barres.large .barre { grid-template-columns: 1fr auto; row-gap: 6px; }
  .nav a[data-nav="accueil"] { display: none; }
  .barre .piste { grid-column: 1 / -1; order: 3; }
  .carte { padding: 18px 16px; }
  .tuile .orh-chiffre { font-size: 32px; }
  .nav { gap: 0 16px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .suggestions, :root:not([data-theme="light"]) .pied { background: var(--orh-carte); }
}
