/* Observatoire de la concurrence, France Judo. Pensé d'abord pour le téléphone. */
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat-vf.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --bleu: #0A0096; --marine: #0A0A4B; --rouge: #FF0037; --gris: #F4F4F8; --trait: #D5D5E4; --texte: #14143A; --doux: #55557A; --clair: #E8E8F8; --blanc: #fff; }
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light only; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 18px; line-height: 1.5; color: var(--texte); background: var(--gris); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--bleu); }
h1 { font-size: 28px; line-height: 1.15; font-weight: 900; text-transform: uppercase; color: var(--bleu); margin: 8px 0 10px; overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: 19px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; color: var(--marine); margin: 34px 0 12px; padding-left: 12px; border-left: 4px solid var(--rouge); }
p { margin: 0 0 10px; }
ul { margin: 6px 0 10px; padding-left: 22px; }
dl { margin: 8px 0 0; } dt { font-weight: 700; margin-top: 10px; } dd { margin: 0; color: var(--doux); }

.tete { background: var(--bleu); color: var(--blanc); position: sticky; top: 0; z-index: 20; }
.tete .dedans { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 10px 16px; min-height: 56px; }
.tete img { height: 34px; width: auto; display: block; }
.tete .nom { font-weight: 900; text-transform: uppercase; letter-spacing: 1px; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tete img { flex: none; }
.etat { flex: none; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.16); white-space: nowrap; }
.etat.attente { background: var(--rouge); }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
section > * + * { margin-top: 12px; }
.chapo { font-size: 19px; font-weight: 600; color: var(--marine); }
.surtitre { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--doux); margin: 0; }
.doux { color: var(--doux); } .petit { font-size: 15px; }
.retour { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }

.carte { display: block; background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; }
.carte > * + * { margin-top: 6px; }
.carte > span, .carte > strong { display: block; }
.carte p:last-child { margin-bottom: 0; }
.lienCarte { text-decoration: none; color: inherit; }
.lienCarte:active { background: var(--clair); }
.carte.accent { border-left: 5px solid var(--rouge); }
.carte.vide { text-align: center; color: var(--doux); border-style: dashed; }
.carte.inactif { opacity: .55; }
.ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ligne h1 { margin: 0; }
.compte { font-weight: 700; color: var(--doux); white-space: nowrap; font-size: 16px; }
.compte.plein { color: var(--bleu); }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 22px; border: 2px solid var(--bleu); border-radius: 12px; background: var(--bleu); color: var(--blanc); font: inherit; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; }
.bouton.clair { background: var(--blanc); color: var(--bleu); }
.bouton.large { display: flex; width: 100%; }
.bouton:active { transform: translateY(1px); }
.lien { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--bleu); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.lien.bloc { display: flex; }
.lien.petit { font-weight: 600; color: var(--doux); }
section > .badge { display: inline-block; }
.lien.danger { color: #B00028; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; align-items: stretch; }
.actions .lien { align-self: center; }

.badge { display: inline-block; flex: none; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--gris); color: var(--doux); border: 1px solid var(--trait); white-space: nowrap; }
.badge.soumis { background: var(--clair); color: var(--bleu); border-color: var(--bleu); }
.badge.valide { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.badge.tri-transposable { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.badge.tri-adaptable { background: var(--clair); color: var(--bleu); border-color: var(--bleu); }
.carte .badge { display: inline-block; }
.barre { height: 8px; border-radius: 99px; background: var(--clair); overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--bleu); border-radius: 99px; }

/* Saisie */
.champ { background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; }
.champ > * + * { margin-top: 10px; }
.lib { display: block; font-weight: 700; font-size: 18px; line-height: 1.3; }
.aide { color: var(--doux); font-size: 16px; margin: 4px 0 0; }
.saisie { display: block; width: 100%; min-height: 54px; padding: 12px 14px; border: 2px solid var(--trait); border-radius: 10px; background: var(--blanc); color: var(--texte); font: inherit; font-size: 19px; }
textarea.saisie { resize: vertical; line-height: 1.4; }
.saisie:focus, .puce:focus-visible, .bouton:focus-visible, .pas:focus-visible, .phase:focus-visible, a:focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; }
.saisie:focus { border-color: var(--bleu); }
.saisie:disabled { background: var(--gris); color: var(--texte); opacity: 1; }
.saisie.etroit { max-width: 340px; }
.saisie.note { font-size: 17px; min-height: 0; }
.nombre { display: flex; align-items: center; gap: 8px; }
.nombre .nb { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: 24px; }
.pas { flex: none; width: 54px; height: 54px; border: 2px solid var(--bleu); border-radius: 10px; background: var(--blanc); color: var(--bleu); font: inherit; font-size: 28px; font-weight: 700; line-height: 1; cursor: pointer; }
.pas:disabled { border-color: var(--trait); color: var(--trait); }
.unite { flex: none; min-width: 52px; font-size: 15px; color: var(--doux); }
.alerte { color: #B00028; font-weight: 700; font-size: 16px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { min-height: 48px; padding: 8px 16px; border: 2px solid var(--trait); border-radius: 99px; background: var(--blanc); color: var(--texte); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.puce.actif { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.puce:disabled { cursor: default; }
.coche { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 17px; }
.coche input { width: 26px; height: 26px; flex: none; accent-color: var(--bleu); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.deux .champ { margin: 0; }

/* Chronomètre */
.grandTemps { font-size: 68px; font-weight: 900; text-align: center; color: var(--marine); font-variant-numeric: tabular-nums; line-height: 1.1; }
.phaseCourante { text-align: center; font-weight: 700; font-size: 20px; color: var(--bleu); font-variant-numeric: tabular-nums; }
.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phase { min-height: 76px; padding: 8px; border: 2px solid var(--bleu); border-radius: 12px; background: var(--blanc); color: var(--bleu); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.phase.actif { background: var(--rouge); border-color: var(--rouge); color: var(--blanc); }

/* Restitution */
.onglets { display: flex; gap: 6px; border-bottom: 2px solid var(--trait); overflow-x: auto; }
.onglets a { flex: 1 0 auto; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 6px; font-size: 16px; font-weight: 700; text-decoration: none; color: var(--doux); border-bottom: 4px solid transparent; margin-bottom: -2px; }
.onglets a.actif { color: var(--bleu); border-bottom-color: var(--rouge); }
.reglages { display: flex; flex-direction: column; gap: 10px; }
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--trait); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.chiffres div { background: var(--blanc); padding: 16px 8px; text-align: center; }
.chiffres b { display: block; font-size: 38px; font-weight: 900; color: var(--bleu); line-height: 1; }
.chiffres span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--doux); }
.grille { display: grid; gap: 12px; }
.couv { display: grid; grid-template-columns: 74px 1fr 54px; align-items: center; gap: 8px; font-size: 15px; }
.couv span:last-child { text-align: right; font-weight: 700; }
.rang { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 8px; min-height: 40px; }
.rang .nomPays { font-size: 15px; font-weight: 600; }
.rang .val { display: flex; flex-direction: column; align-items: flex-end; min-width: 86px; font-size: 17px; }
.rang.ref .nomPays { color: var(--bleu); font-weight: 900; }
.rang:not(.ref) .barre i { background: var(--marine); opacity: .55; }
.manque { color: var(--trait); font-weight: 900; font-size: 20px; }
.preuve { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--doux); color: var(--doux); white-space: nowrap; }
.preuve.ok { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.legende p { font-size: 16px; }
details.carte summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; }
details.carte summary::-webkit-details-marker { display: none; }
details.carte summary::after { content: '+'; font-weight: 900; font-size: 24px; color: var(--bleu); margin-left: 4px; }
details.carte[open] summary::after { content: '−'; }
details.carte summary strong { flex: 1; }
.ind { padding: 12px 0; border-top: 1px solid var(--trait); }
.ind > span { display: block; font-size: 16px; }
.tableau { overflow-x: auto; background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
thead th { background: var(--bleu); color: var(--blanc); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 12px 10px; text-align: center; }
thead th:first-child, tbody th { text-align: left; }
tbody th { font-weight: 600; padding: 12px 14px; max-width: 280px; }
td { padding: 10px; text-align: center; border-left: 1px solid var(--trait); }
tbody tr + tr th, tbody tr + tr td { border-top: 1px solid var(--trait); }
td.ref { background: #F1F1FB; } thead th.ref { background: var(--marine); }
td b { font-size: 20px; }

/* Navigation */
#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--blanc); border-top: 1px solid var(--trait); padding-bottom: env(safe-area-inset-bottom); }
#nav a { flex: 1; min-width: 0; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--doux); text-decoration: none; border-top: 3px solid transparent; }
#nav a.actif { color: var(--bleu); border-top-color: var(--rouge); }
.ico svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 40; max-width: 520px; margin: 0 auto; padding: 14px 18px; border-radius: 12px; background: var(--marine); color: var(--blanc); font-weight: 600; text-align: center; }
.connexion { padding-top: 24px; }

/* Guide */
.guide main { padding-bottom: 60px; }
.guide .etape { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.guide .num { width: 44px; height: 44px; border-radius: 50%; background: var(--bleu); color: var(--blanc); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.guide .etape strong { display: block; }
.guide .couverture { background: var(--bleu); color: var(--blanc); margin: -16px -16px 8px; padding: 30px 16px 26px; }
.guide .couverture h1 { color: var(--blanc); font-size: 32px; }
.guide .couverture h1 em { font-style: normal; color: var(--rouge); }
.guide .couverture p { font-size: 19px; font-weight: 600; margin: 0; }
.guide .oui, .guide .non { padding-left: 14px; border-left: 5px solid var(--bleu); }
.guide .non { border-left-color: var(--rouge); }

@media (min-width: 1000px) {
  main { max-width: 1180px; padding: 28px 24px 60px; }
  section > h1, section > .chapo, section > .doux, section > .champ, section > .actions, section > .carte, section > .bouton, section > .lienCarte, section > .reglages, section > .puces, section > .retour, section > .ligne, section > h2, section > .saisie, section > .lien, section > .surtitre, section > details, section > .phases, section > .deux, section > .grandTemps, section > .phaseCourante, section > .chiffres { max-width: 760px; }
  .restitution > .carte, .restitution > details, .restitution > .chiffres { max-width: none; }
  .chiffres { grid-template-columns: repeat(4, 1fr); }
  .grille { grid-template-columns: repeat(3, 1fr); }
  .reglages { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
  #nav { position: sticky; top: 56px; bottom: auto; border-top: 0; border-bottom: 1px solid var(--trait); justify-content: center; padding: 0; }
  #nav a { flex: none; flex-direction: row; gap: 8px; min-height: 52px; padding: 0 22px; font-size: 15px; border-top: 0; border-bottom: 3px solid transparent; }
  #nav a.actif { border-bottom-color: var(--rouge); }
  #toast { bottom: 24px; }
  .ind { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .guide main { max-width: 760px; }
  .guide .couverture { margin: 0 0 12px; border-radius: 12px; padding: 40px 32px; }
}
@media print { #nav, .tete, .bouton, #toast { display: none !important; } body { background: #fff; } }
