/* Pool NFL — interface claire, palette de diffuseur sportif :
   marine profond pour la barre, rouge pour l'accent et le direct, cartes
   blanches sur gris froid. Pensé téléphone d'abord : la famille entre ses
   pronostics sur un cellulaire, pas sur un portable. */

:root {
  --marine:      #0b2545;
  --marine-clair:#123a6b;
  --rouge:       #d50a0a;
  --fond:        #f1f4f8;
  --carte:       #ffffff;
  --texte:       #16202f;
  --gris:        #67748a;
  --bord:        #e0e6ef;
  --verrou:      #f7f8fa;
  --rayon:       10px;
  --ombre:       0 1px 2px rgba(11, 37, 69, .06), 0 4px 12px rgba(11, 37, 69, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------- entête */

.entete { background: var(--marine); color: #fff; }

.bande {
  max-width: 760px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 18px;
}

.marque { text-decoration: none; font-weight: 800; letter-spacing: .06em; font-size: 18px; }
.marque-pool { color: #fff; }
.marque-nfl  { color: var(--rouge); margin-left: 4px; }

.liens { display: flex; gap: 16px; margin-left: auto; }
.liens a {
  color: #c8d5e6; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.liens a:hover { color: #fff; border-bottom-color: var(--rouge); }

.joueur {
  font-size: 13px; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--marine-clair); padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
a.joueur:hover { background: #1a4d8f; }
.liens a.lien-fort { color: #fff; border-bottom-color: var(--rouge); }
.carte-panneau.invite { border-left: 3px solid var(--rouge); }
.carte-panneau.invite a { color: var(--marine-clair); font-weight: 700; }

.forme-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.bouton-lien {
  background: none; border: 0; color: #9fb4cd; font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 4px 2px;
}
.bouton-lien:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------- formulaires */

.formulaire { max-width: 380px; margin: 12px auto; }
.champ { display: block; margin-bottom: 16px; }
.champ > span {
  display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px;
}
.champ input {
  width: 100%; padding: 12px; font-size: 16px; color: var(--texte);
  border: 1px solid var(--bord); border-radius: 8px; background: #fff;
}
.champ input:disabled { background: var(--verrou); color: var(--gris); }
.champ input:focus {
  outline: 2px solid var(--marine-clair); outline-offset: 1px; border-color: transparent;
}
.champ small { display: block; margin-top: 6px; font-size: 12px; color: var(--gris); }

.case { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; font-size: 14px; }
.case input { width: 18px; height: 18px; }

.note-formulaire { margin-top: 18px; font-size: 13px; color: var(--gris); }
.titre-section {
  font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--gris); margin: 26px 0 14px;
}

/* ------------------------------------------------------------- semaines */

.semaines { background: var(--marine-clair); overflow-x: auto;
             scrollbar-width: none; -ms-overflow-style: none; }
.semaines::-webkit-scrollbar { display: none; }
.semaines-piste {
  max-width: 760px; margin: 0 auto; padding: 0 10px;
  display: flex; gap: 2px; white-space: nowrap;
}
.semaine {
  color: #b8cae0; text-decoration: none; font-size: 13px; font-weight: 700;
  padding: 9px 12px; border-bottom: 3px solid transparent; flex: 0 0 auto;
}
.semaine:hover { color: #fff; }
.semaine.active { color: #fff; border-bottom-color: var(--rouge); }

/* ----------------------------------------------------------------- page */

.page { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.page.large { max-width: 1060px; }

/* Deux colonnes à partir de 900 px : les matchs restent étroits — une carte
   large étire les noms d'équipe loin de leur pointage — et le tableau de bord
   se lit sans quitter la page. Sous 900 px, tout retombe en une colonne. */
.grille { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .grille { grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }
  .panneau { position: sticky; top: 16px; }
}
.matchs { max-width: 620px; }

.direct-avis { color: var(--rouge); font-weight: 600; }

.titre { font-size: 24px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -.01em; }
.sous-titre { color: var(--gris); font-size: 14px; margin: 0 0 18px; }
.rien { color: var(--gris); text-align: center; padding: 24px; }

.avis { margin-bottom: 16px; }
.avis p {
  margin: 0 0 8px; padding: 10px 14px; border-radius: var(--rayon);
  font-size: 14px; font-weight: 600;
}
.avis-succes { background: #e7f5ec; color: #17693a; border-left: 3px solid #1e9e52; }
.avis-erreur { background: #fdecec; color: #a11212; border-left: 3px solid var(--rouge); }

/* --------------------------------------------------------------- matchs */

.matchs { display: flex; flex-direction: column; gap: 10px; }

.match {
  background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden;
}
.match.verrouille { background: var(--verrou); }
.match.en-cours { border-color: var(--rouge); }

.match-tete {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--bord);
}
.heure { font-size: 12px; font-weight: 600; color: var(--gris); }

.etiquette {
  margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 4px;
}
.direct   { background: var(--rouge); color: #fff; animation: pulse 2s ease-in-out infinite; }
.termine  { background: #eef1f5; color: var(--gris); }
.verrou   { background: #eef1f5; color: var(--gris); font-weight: 700; letter-spacing: 0; }
@keyframes pulse { 50% { opacity: .55; } }

.equipe {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 0; position: relative;
}
.equipe + .equipe { border-top: 1px solid #f0f3f7; }

.teinte { width: 4px; align-self: stretch; flex: 0 0 4px; }
.logo { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }

.abbr { font-weight: 800; font-size: 14px; width: 42px; flex: 0 0 42px; }
.nom  { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pronostic {
  margin-left: auto; font-size: 13px; font-weight: 700; color: var(--marine-clair);
  background: #eaf0f8; padding: 2px 8px; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.pointage {
  min-width: 40px; text-align: right; font-size: 21px; font-weight: 800;
  font-variant-numeric: tabular-nums; margin-left: 10px;
}
.equipe > .pointage { margin-left: auto; }
.pronostic + .pointage { margin-left: 10px; }
.pointage.vide { color: #c3cbd8; }

.saisie {
  margin-left: auto; width: 62px; padding: 8px; text-align: center;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid var(--bord); border-radius: 7px; background: #fff; color: var(--texte);
}
.saisie:focus { outline: 2px solid var(--marine-clair); outline-offset: 1px; border-color: transparent; }

.stade { padding: 6px 14px 9px; font-size: 12px; color: var(--gris); }

.barre-envoi { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--fond) 40%); }
.bouton {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 800; color: #fff;
  background: var(--rouge); border: 0; border-radius: var(--rayon); cursor: pointer;
}
.bouton:hover { background: #b60808; }
.bouton:disabled { cursor: progress; background: #9c1414; }
.bouton[aria-busy="true"]::before {
  content: ""; display: inline-block; vertical-align: -2px; margin-right: 9px;
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: rotation .7s linear infinite;
}
@keyframes rotation { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  /* Pas de rouet : le libellé change, ça suffit à dire que c'est parti. */
  .bouton[aria-busy="true"]::before { display: none; }
  .direct { animation: none; }
}

/* -------------------------------------------------------------- tableaux */

/* ------------------------------------------------------------- panneau */

.panneau { display: flex; flex-direction: column; gap: 16px; }

.carte-panneau {
  background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 16px;
}
.carte-panneau h2 {
  font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--gris); margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.carte-panneau h2 .etiquette { margin-left: 0; }
.rien-panneau { font-size: 13px; color: var(--gris); margin: 0; }

.barres { list-style: none; margin: 0; padding: 0; }
.barres li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  align-items: center; margin-bottom: 12px;
}
.barre-nom { font-size: 14px; font-weight: 700; }
.barre-valeur { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.barre-piste {
  grid-column: 1 / -1; height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden;
}
.barre-remplie {
  display: block; height: 100%; background: var(--marine-clair); border-radius: 3px;
  transition: width .4s ease;
}
.barres li:first-child .barre-remplie { background: var(--rouge); }
.barre-detail { grid-column: 1 / -1; font-size: 11px; color: var(--gris); }

.tableau.compact { box-shadow: none; border: 0; }
.tableau.compact td { padding: 6px 0; font-size: 14px; }
.lien-panneau {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700;
  color: var(--marine-clair); text-decoration: none;
}
.lien-panneau:hover { text-decoration: underline; }

.bloc { margin-top: 28px; }
.bloc h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }

.tableau {
  width: 100%; border-collapse: collapse; background: var(--carte);
  border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); overflow: hidden; font-size: 14px;
}
.tableau th {
  background: #f7f9fc; text-align: right; font-size: 11px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--gris);
  padding: 9px 12px; border-bottom: 1px solid var(--bord);
}
.tableau td { padding: 10px 12px; text-align: right; border-bottom: 1px solid #f0f3f7;
              font-variant-numeric: tabular-nums; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau th:first-child, .tableau td:first-child,
.tableau th:nth-child(2), .tableau td:nth-child(2) { text-align: left; }

.rang { font-weight: 800; color: var(--gris); width: 32px; }
.nom-joueur { font-weight: 700; }
.pointe { font-weight: 800; font-size: 15px; }
.palier { display: inline-block; font-size: 12px; color: var(--gris); margin-right: 8px; }

.legende { display: flex; align-items: center; gap: 6px; font-size: 13px;
            color: var(--gris); margin: -8px 0 16px; }
.legende .pronostic { margin-left: 0; }
.pointage-exemple { font-weight: 800; margin-left: 10px; font-variant-numeric: tabular-nums; }

.note { margin-top: 24px; font-size: 14px; color: var(--gris); }
.note p { margin: 0 0 10px; }
.note-versions { border-left: 3px solid var(--bord); padding-left: 12px; }

.commande {
  background: var(--marine); color: #d8e4f2; padding: 14px; border-radius: var(--rayon);
  font-size: 13px; overflow-x: auto;
}

.pied {
  max-width: 760px; margin: 0 auto; padding: 20px 16px 32px;
  font-size: 12px; color: var(--gris); text-align: center;
}

@media (max-width: 480px) {
  /* Sur téléphone l'entête déborde : la marque et le nom du joueur tiennent la
     première ligne, les liens passent dessous sur toute la largeur. */
  .bande { flex-wrap: wrap; gap: 10px; }
  .marque { order: 1; }
  /* Le formulaire de déconnexion est un enfant direct de .bande : sans order
     explicite il vaut 0 et passe devant la marque. */
  .joueur, .forme-inline { order: 2; margin-left: auto; }
  .liens { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; }
  .liens a { font-size: 13px; }
}

@media (max-width: 420px) {
  .nom { display: none; }
}
