/* Charte inspirée de Live Palmes : bleu-vert, Inter, cartes à liseré, onglets en pastilles. */
:root {
  --fond: #f5f8fa;
  --fond-haut: #e4f4f7;
  --surface: #ffffff;
  --texte: #153c4a;
  --titre: #102331;
  --discret: #56717d;
  --bord: #d5e4e8;
  --bord-doux: #dce4df;
  --entete-tableau: #f8faf9;
  --accent: #086f7e;
  --accent-fonce: #075866;
  --accent-pale: #e4f3f5;
  --accent-bord: #b8d4d9;
  --liseré: #c6daec;
  --vif: #0f8b8d;
  --rouge: #c0392b;
  --danger: #b42318;
  --ok-fond: #e2f3e9;
  --ok-texte: #245b3e;
  --err-fond: #fdecea;
  --ombre: 0 14px 28px rgba(14, 56, 70, 0.07);
  --rayon: 8px;
  --haut-barre: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0d171c;
    --fond-haut: #0f2129;
    --surface: #14232b;
    --texte: #dbeaef;
    --titre: #eef6f8;
    --discret: #8fa8b2;
    --bord: #24404b;
    --bord-doux: #24404b;
    --entete-tableau: #182b34;
    --accent: #4cc3d3;
    --accent-fonce: #84dbe6;
    --accent-pale: #123540;
    --accent-bord: #22525e;
    --liseré: #2b4f63;
    --vif: #3fb7b9;
    --rouge: #ef6f61;
    --danger: #f2877d;
    --ok-fond: #12301d;
    --ok-texte: #7fd69a;
    --err-fond: #3a1714;
    --ombre: 0 14px 28px rgba(0, 0, 0, 0.3);
  }
}
* { box-sizing: border-box; }
html { background: var(--fond); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(var(--fond-haut), color-mix(in srgb, var(--fond-haut) 50%, var(--fond)) 380px, var(--fond) 700px) no-repeat, var(--fond);
  color: var(--texte);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.8rem; line-height: 1.2; font-weight: 700; color: var(--texte); margin: .25rem 0 .6rem; letter-spacing: -.01em; }
h1 small { font-size: .9rem; color: var(--discret); font-weight: 500; margin-left: .4rem; letter-spacing: 0; }
h2 { font-size: 1.16rem; font-weight: 700; color: var(--titre); margin: 0 0 .75rem; }
h3 { font-size: .8rem; font-weight: 650; color: var(--discret); margin: 1rem 0 .4rem; }

/* --- Barre du haut --- */
.barre {
  background: var(--surface); border-bottom: 1px solid var(--bord);
  position: sticky; top: 0; z-index: 3;
}
.barre-interieur {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: 1440px; margin: 0 auto; padding: .6rem 1.5rem; min-height: var(--haut-barre);
}
.marque { display: flex; align-items: center; gap: .65rem; color: var(--texte); min-width: 0; }
.marque:hover { text-decoration: none; }
.logo { display: flex; flex-shrink: 0; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marque-texte strong { font-size: 1.05rem; font-weight: 700; }
.marque-texte small { font-size: .74rem; font-weight: 700; color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.nav-principale { display: flex; gap: .2rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-principale a {
  padding: .55rem .65rem; border-radius: 6px; font-size: .82rem; font-weight: 600;
  color: var(--texte); white-space: nowrap;
}
.nav-principale a:hover { background: var(--accent-pale); text-decoration: none; }
.nav-principale a.actif { background: var(--accent-pale); color: var(--accent); }
.portail {
  flex-shrink: 0; padding: .5rem .8rem; border-radius: 6px; font-size: .78rem; font-weight: 700;
  background: var(--accent-pale); color: var(--accent); border: 1px solid var(--accent-bord);
}
.portail:hover { background: var(--accent); color: #fff; text-decoration: none; }

.contenu { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; min-width: 0; }
.pied { text-align: center; font-size: .76rem; font-weight: 700; color: var(--discret); padding: 1.1rem 1rem 1.5rem; }

/* --- Onglets de rubrique (pastilles) --- */
.sous-onglets {
  display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .9rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--bord);
}
.sous-onglets a {
  padding: .45rem .7rem; border-radius: 6px; font-size: .8rem; font-weight: 700;
  background: var(--accent-pale); color: var(--accent); border: 1px solid transparent;
}
.sous-onglets a:hover { border-color: var(--accent-bord); text-decoration: none; }
.sous-onglets a.actif { background: var(--accent); color: #fff; }

.discret { color: var(--discret); }
.panneau {
  background: linear-gradient(160deg, var(--surface) 35%, color-mix(in srgb, var(--accent-pale) 45%, var(--surface)));
  border: 1px solid var(--bord); border-left: 5px solid var(--liseré); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.panneau.danger { border-left-color: var(--danger); }

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.carte {
  display: flex; flex-direction: column; gap: .2rem;
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent-pale) 70%, var(--surface)), var(--surface));
  border: 1px solid var(--bord); border-left: 4px solid var(--accent); border-radius: 6px;
  box-shadow: var(--ombre); padding: 1rem 1.1rem; color: var(--texte);
}
.carte strong { font-weight: 700; }
.carte:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }

.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin: 1.25rem 0; }
.chiffre {
  background: var(--surface); border: 1px solid var(--bord); border-top: 3px solid var(--vif);
  border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: .8rem 1rem; color: var(--discret); font-size: .82rem; font-weight: 600;
}
.chiffre span { display: block; font-size: 1.7rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.deux-colonnes { display: grid; grid-template-columns: 3fr 2fr; gap: 1.25rem; }
.deux-colonnes .panneau { margin: 0; }
.deux-colonnes .panneau:nth-child(2) { border-left-color: var(--vif); }

.entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.defile { overflow-x: auto; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.panneau .defile, .panneau .tableau { border: 0; box-shadow: none; background: transparent; }
.tableau { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tableau.etroit { width: auto; min-width: 320px; background: var(--surface); }
.tableau th, .tableau td { padding: .5rem .85rem; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: top; }
.tableau th {
  font-size: .76rem; text-transform: uppercase; color: var(--discret); font-weight: 700; white-space: nowrap;
  background: var(--entete-tableau); border-bottom-color: var(--bord-doux);
}
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau.cliquable tbody tr { cursor: pointer; }
.tableau.cliquable tbody tr:hover, .tableau tbody tr:hover { background: color-mix(in srgb, var(--accent-pale) 70%, transparent); }
.tableau tr.inactif td { color: var(--discret); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.centre { text-align: center !important; }

.recherche { margin: .75rem 0; }
.recherche input, .recherche select { width: min(420px, 100%); }

input, select, textarea, button, .bouton { font: inherit; color: var(--texte); }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  background: var(--surface); border: 1px solid var(--bord-doux); border-radius: 8px;
  padding: .45rem .65rem; width: 100%; font-size: .88rem;
}
select { font-weight: 600; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button, .bouton {
  display: inline-block; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 6px;
  padding: .5rem .95rem; cursor: pointer; font-weight: 700; font-size: .85rem;
}
button:hover, .bouton:hover { background: var(--accent-fonce); text-decoration: none; }
.bouton-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.bouton-danger:hover { background: var(--err-fond); }

.formulaire fieldset {
  border: 1px solid var(--bord); border-left: 5px solid var(--liseré); border-radius: var(--rayon);
  background: var(--surface); box-shadow: var(--ombre);
  padding: 1rem 1.25rem; margin: 0 0 1rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem 1.25rem;
}
.formulaire legend { font-weight: 700; padding: 0 .4rem; color: var(--titre); }
.formulaire label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 700; color: var(--discret); }
.formulaire label small { color: var(--discret); font-weight: 400; }
.formulaire label.case { flex-direction: row; align-items: center; gap: .5rem; align-self: end; padding-bottom: .4rem; color: var(--texte); }
.actions { display: flex; align-items: center; gap: 1rem; }
.supprimer { margin-top: 2rem; }
.ligne-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

.alerte { padding: .65rem .9rem; border-radius: 6px; font-weight: 600; font-size: .9rem; }
.alerte.ok { background: var(--ok-fond); color: var(--ok-texte); }
.alerte.erreur { background: var(--err-fond); color: var(--danger); }
.avertissements { color: var(--discret); }

@media (max-width: 900px) {
  .barre-interieur { flex-wrap: wrap; gap: .5rem .75rem; padding: .5rem 1rem; }
  .nav-principale { order: 3; width: 100%; margin-left: 0; }
  .portail { margin-left: auto; }
  .contenu { padding: 1rem; }
  .deux-colonnes { grid-template-columns: 1fr; }
  :root { --haut-barre: 104px; }
}

/* --- Phase 2 : inscriptions --- */
.onglets { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.onglets a { padding: .4rem .7rem; border-radius: 6px; font-size: .8rem; font-weight: 700; background: var(--accent-pale); color: var(--accent); border: 1px solid transparent; }
.onglets a.actif { background: var(--accent); color: #fff; }
.onglets a:hover { border-color: var(--accent-bord); text-decoration: none; }
.recherche.ligne-form select { width: min(420px, 100%); }
.pile { display: flex; flex-direction: column; gap: .8rem; }
.pile label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; font-weight: 500; }
.pile label.case { flex-direction: row; align-items: center; gap: .5rem; }
.bloc { display: block; }
.marge-haut { margin-top: .75rem; }
.petit { padding: .25rem .6rem; font-size: .82rem; }
.petit-texte { font-size: .82rem; font-weight: 400; color: var(--discret); }
.bouton-secondaire { background: transparent; color: var(--accent); border: 1px solid var(--bord); }
.bouton-secondaire:hover { background: var(--accent-pale); }
.texte-erreur { color: var(--danger); }
.etiquette { display: inline-block; font-size: .72rem; padding: .1rem .4rem; border-radius: 4px; font-weight: 700; background: var(--accent-pale); color: var(--accent-fonce); }
.alerte-etiquette { background: var(--err-fond); color: var(--danger); }
.liste-simple { margin: 0; padding-left: 1.1rem; }
.liste-controle { margin: 0; padding-left: 1.1rem; }
.liste-controle li { margin: .2rem 0; }
.controle-ko { border-color: color-mix(in srgb, var(--danger) 35%, var(--bord)); }
.controle-ko h2 { color: var(--danger); }
.controle-ok h2 { color: var(--ok-texte); }
select.statut { width: auto; min-width: 8.5rem; }
select.statut-1 { border-color: var(--accent); background: var(--accent-pale); font-weight: 600; }
select.statut-2 { color: var(--danger); }
.cartes-equipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; margin: 1rem 0; }
.cartes-equipes .panneau { margin: 0; }
.equipe .entete h2 { margin: 0; }
.equipe.incomplete { border-left: 3px solid var(--danger); }
.equipe.complete { border-left: 3px solid var(--ok-texte); }
.membres { list-style: none; margin: .5rem 0; padding: 0; }
.membres li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--bord); font-size: .9rem; }
.membres li:last-child { border-bottom: 0; }
.membres form { flex-shrink: 0; }
.ligne-form select { width: auto; min-width: 14rem; max-width: 100%; }

/* --- Phase 3 : listes de départ --- */
.alerte.attention { background: color-mix(in srgb, #e9a23b 18%, var(--surface)); color: var(--texte); }
.statut-a_generer { background: var(--fond); color: var(--discret); }
.statut-prete { background: var(--ok-fond); color: var(--ok-texte); }
.statut-courue { background: var(--accent-pale); color: var(--accent-fonce); }
.actions-ligne { white-space: nowrap; }
.actions-ligne a + a { margin-left: .8rem; }
.couloir { padding: .3rem .6rem; border: 1px solid var(--bord); border-radius: 6px; background: var(--surface); }
.grille-couloirs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.grille-couloirs label { display: flex; flex-direction: column; font-size: .8rem; color: var(--discret); gap: .2rem; }
.grille-couloirs input { text-align: center; }
.barre-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; position: sticky; top: calc(var(--haut-barre) + 1px); z-index: 1; }
.serie h2 { margin-bottom: .4rem; }
.serie .tableau td:first-child, .serie .tableau th:first-child { width: 2rem; }
tr.desiste td { color: var(--discret); text-decoration: line-through; }
tr.desiste td:first-child, tr.desiste td .etiquette { text-decoration: none; }
tr.vide td { color: var(--discret); font-style: italic; }

/* --- Phase 4 : résultats --- */
kbd { font-family: ui-monospace, monospace; font-size: .85em; padding: .05rem .35rem; border: 1px solid var(--bord); border-radius: 4px; background: var(--surface); }
.jauge { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--bord); vertical-align: middle; margin-right: .4rem; overflow: hidden; }
.jauge span { display: block; height: 100%; background: var(--accent); }
.texte-ok { color: var(--ok-texte); font-weight: 600; }
.onglets-series { flex-wrap: wrap; margin: .75rem 0; }
.onglets-series a.incomplete:not(.actif)::after { content: " •"; color: var(--danger); }
.tableau.saisie input { padding: .35rem .45rem; }
.champ-temps { width: 7.5rem !important; font-variant-numeric: tabular-nums; }
.champ-court { width: 3.5rem !important; text-align: center; }
.champ-code { width: 6rem !important; text-transform: uppercase; }
tr.erreur-ligne td { background: var(--err-fond); }
tr.ligne-ok td:first-child { box-shadow: inset 3px 0 var(--ok-texte); }
.podium-1 td:first-child strong { color: #b8860b; }
.podium-2 td:first-child strong { color: #7d8791; }
.podium-3 td:first-child strong { color: #a0522d; }
.etiquette.record { background: #fff1c2; color: #7a5a00; margin-left: .3rem; }
.cases-categories { display: flex; flex-wrap: wrap; gap: .4rem 1rem; border: 1px solid var(--bord); border-radius: 6px; padding: .5rem .75rem; }
.cases-categories legend { font-size: .85rem; color: var(--discret); }
select[multiple] { min-height: 6rem; }
details.panneau summary { cursor: pointer; font-weight: 600; }

/* --- Qualifications au championnat de France --- */
.deconnexion { flex-shrink: 0; margin: 0; }
.qualifie { background: var(--ok-fond); color: var(--ok-texte); }
.non-qualifie { color: var(--discret); }
.etiquette.ok { background: var(--ok-fond); color: var(--ok-texte); }
.etiquette.non { background: var(--fond); color: var(--discret); }
.etiquette.brouillon { background: color-mix(in srgb, #e9a23b 22%, var(--surface)); color: var(--texte); }
td.temps { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.temps.qualifie { font-weight: 700; }
.carte-connexion { max-width: 420px; margin: 2rem auto; }
.carte-connexion input[type=email], .carte-connexion input[type=password], .carte-connexion input[type=text],
.formulaire input[type=email], .formulaire input[type=password] {
  background: var(--surface); border: 1px solid var(--bord-doux); border-radius: 8px;
  padding: .55rem .7rem; width: 100%; font-size: 1rem; color: var(--texte);
}
.carte-connexion { max-width: 460px; }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 480px) { .deux-champs { grid-template-columns: 1fr; } }
.demandes .actions-demande { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.demandes .actions-demande select { width: auto; }
.comptes-valides select { width: auto; min-width: 9rem; }
.comptes-valides label.case { white-space: nowrap; }
.comptes-valides td:first-child { white-space: nowrap; }
.depot-protocole fieldset { grid-template-columns: minmax(0, 36rem); }
.alertes-identite { border-left: 4px solid #e9a23b; }
.alertes-identite li { align-items: center; gap: .6rem; }
.alertes-identite .ligne-form { flex-wrap: nowrap; }
tr.a-verifier td { background: color-mix(in srgb, #e9a23b 12%, var(--surface)); }
.alerte-etiquette { background: color-mix(in srgb, #e9a23b 30%, var(--surface)); color: var(--texte); text-decoration: none; }
.lien-invitation { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lien-invitation input { flex: 1; min-width: 16rem; font-family: ui-monospace, monospace; font-size: .8rem !important; }
.filtres { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: .75rem 0; }
.filtres label { display: flex; flex-direction: column; gap: .2rem; font-size: .78rem; font-weight: 700; color: var(--discret); }
.filtres select, .filtres input { width: auto; min-width: 9rem; }
.grille-temps input { width: 6.5rem !important; text-align: center; font-variant-numeric: tabular-nums; }
.saisie-pspeur fieldset { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.formulaire label.requis::after { content: ""; }
@media (max-width: 600px) {
  input[type=text], input[type=number], input[type=date], input[type=search], input[type=email], input[type=password], select, textarea { font-size: 16px; }
  .filtres label, .filtres select, .filtres input { width: 100%; }
}
@media print {
  .barre, .pied, .sous-onglets, .filtres, .pas-imprimer { display: none !important; }
  body { background: #fff; color: #000; }
}
.saisie-pspeur { scroll-margin-top: 160px; }
#saisie-relais { scroll-margin-top: 160px; }

/* --- Tri des colonnes --- */
.bouton-tri {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
}
.bouton-tri::after { content: "↕"; opacity: .35; font-size: .9em; }
th[aria-sort=ascending] .bouton-tri::after { content: "↑"; opacity: 1; color: var(--accent); }
th[aria-sort=descending] .bouton-tri::after { content: "↓"; opacity: 1; color: var(--accent); }
.bouton-tri:hover, th[aria-sort] .bouton-tri { color: var(--accent); }
/* Le survol général des boutons (fond vert foncé) ne doit pas toucher les entêtes de colonnes */
.tableau th .bouton-tri:hover { background: transparent; color: var(--accent-fonce); }
.tableau th:has(.bouton-tri):hover { background: var(--accent-pale); }
.bouton-tri:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
th.num .bouton-tri { justify-content: flex-end; }
.entete-imprimee { display: none; }
@media print {
  .bouton-tri::after { content: none !important; }
  .tableau th .bouton-tri { display: none !important; }
  .tableau th .entete-imprimee { display: inline; }
  .tableau td.petit-texte, .tableau td small { font-size: inherit; }
}

/* --- Formulaires des qualifications : champs alignés et de même hauteur --- */
.formulaire label { justify-content: flex-start; }
.formulaire label .aide { font-size: .74rem; font-weight: 400; color: var(--discret); margin-top: .1rem; }
.formulaire fieldset input:not([type=checkbox]):not([type=file]),
.formulaire fieldset select {
  height: 2.4rem; padding-top: 0; padding-bottom: 0; line-height: 2.4rem; margin: 0;
}
.formulaire fieldset input[type=date] { line-height: normal; }
.formulaire fieldset input[type=file] {
  height: 2.4rem; padding: .35rem .5rem; border: 1px dashed var(--bord-doux); border-radius: 8px;
  background: var(--surface); width: 100%; font-size: .82rem;
}
.formulaire fieldset input::placeholder { color: var(--discret); opacity: .7; font-weight: 400; }
.saisie-pspeur fieldset { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 600px) {
  .formulaire fieldset input:not([type=checkbox]):not([type=file]), .formulaire fieldset select { height: 2.75rem; line-height: 2.75rem; }
}
input[type=email], input[type=password], input[type=url] {
  background: var(--surface); border: 1px solid var(--bord-doux); border-radius: 8px;
  padding: .45rem .65rem; width: 100%; font-size: .88rem; color: var(--texte);
}
.ligne-alignee > input, .ligne-alignee > select, .ligne-alignee > button { height: 2.4rem; margin: 0; }
.ligne-alignee > input { flex: 1 1 16rem; max-width: 24rem; width: auto; }
.ligne-alignee > input[type=url] { max-width: 36rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
.ligne-alignee > select { width: auto; min-width: 11rem; }

/* --- Meilleures performances --- */
.sommaire { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.sommaire a { padding: .3rem .75rem; border: 1px solid var(--accent-bord); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.sommaire a:hover { background: var(--accent-pale); }
.bloc-epreuve { scroll-margin-top: 140px; }
.tableau-records { table-layout: fixed; min-width: 640px; }
.tableau-records th:nth-child(1) { width: 11%; }
.tableau-records th:nth-child(3), .tableau-records th:nth-child(5) { width: 13%; }
.tableau-records td { vertical-align: middle; overflow-wrap: anywhere; }
.tableau-records td.temps { font-weight: 700; white-space: nowrap; }
.detenteur + .detenteur { margin-top: .3rem; }
.detenteur small { display: block; }

/* --- Impression des listes (A4) --- */
.entete-impression, .pied-impression, .imprimer-seul { display: none; }
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 9mm 14mm;
    @bottom-right { content: "Page " counter(page) " / " counter(pages); font: 7.5pt system-ui, sans-serif; color: #5b6b72; }
    @bottom-left { content: "LivePsp · plongée sportive en piscine"; font: 7.5pt system-ui, sans-serif; color: #5b6b72; }
  }
  html, body { background: #fff !important; color: #111 !important; }
  .contenu { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .entete-impression {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
    border-bottom: 2.5pt solid #086f7e; padding-bottom: 6pt; margin-bottom: 8pt;
  }
  .entete-impression h1 { font-size: 15pt; margin: 0; color: #0b3b47; }
  .entete-impression .surtitre { margin: 0 0 2pt; font-size: 8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #086f7e; }
  .resume-impression { margin: 3pt 0 0; font-size: 7.5pt; color: #4a5c63; }
  .date-impression { margin: 0; font-size: 8pt; color: #4a5c63; white-space: nowrap; }
  .imprimer-seul { display: table-cell; }
  .pied-impression { display: block; margin-top: 8pt; font-size: 7pt; color: #6b7a80; }
  .defile, .panneau { overflow: visible !important; border: 0 !important; box-shadow: none !important; background: none !important; padding: 0 !important; }
  .tableau { font-size: 7.4pt; width: 100%; }
  .tableau th, .tableau td { padding: 2.4pt 4pt; border-bottom: .4pt solid #d7e1e4; }
  .tableau thead { display: table-header-group; }
  .tableau th {
    background: #0b5866 !important; color: #fff !important; font-size: 6.8pt; letter-spacing: .03em;
    border-bottom: 0;
  }
  .tableau th .bouton-tri { color: #fff !important; }
  .tableau tbody tr:nth-child(even) td { background: #f1f6f7; }
  .tableau tr { break-inside: avoid; }
  .tableau td.temps.qualifie { color: #0b5866; font-weight: 700; background: none !important; }
  .tableau tbody tr:nth-child(even) td.temps.qualifie { background: #f1f6f7 !important; }
  .liste-qualifies tbody { counter-reset: ligne; }
  .liste-qualifies tbody tr { counter-increment: ligne; }
  .liste-qualifies td.numero::before { content: counter(ligne); color: #6b7a80; }
  .titre-relais { break-before: page; font-size: 12pt; color: #0b3b47; }
  .competitions-prises { break-inside: avoid; margin-top: 10pt !important; font-size: 8pt; }
  .competitions-prises h2 { font-size: 10pt; }
  .bloc-epreuve { break-inside: avoid; margin-bottom: 10pt !important; }
  .bloc-epreuve h2 { font-size: 11pt; color: #0b3b47; margin: 0 0 4pt; border-left: 3pt solid #086f7e; padding-left: 5pt; }
  .tableau-records { font-size: 7.6pt; }
  a { color: inherit !important; text-decoration: none !important; }
}

/* --- Menu burger de la compétition --- */
.menu-burger { position: relative; }
.menu-burger > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  height: 2.4rem; padding: 0 .8rem; border: 1px solid var(--accent-bord); border-radius: 8px;
  background: var(--surface); color: var(--accent-fonce); font-weight: 600; font-size: .9rem;
}
.menu-burger > summary::-webkit-details-marker { display: none; }
.menu-burger > summary:hover, .menu-burger[open] > summary { background: var(--accent-pale); }
.menu-burger-liste {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; min-width: 16rem;
  display: flex; flex-direction: column; padding: .35rem; background: var(--surface);
  border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 16px 32px rgba(14, 56, 70, .16);
}
.menu-burger-liste a { padding: .55rem .75rem; border-radius: 6px; text-decoration: none; color: var(--texte); font-size: .92rem; }
.menu-burger-liste a:hover { background: var(--accent-pale); color: var(--accent-fonce); }

/* --- Étapes avant publication --- */
.etapes { border-left: 4px solid var(--accent); }
.liste-etapes { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.liste-etapes li { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.liste-etapes .pastille {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; border: 2px solid var(--accent-bord); color: var(--discret);
}
.liste-etapes li.faite .pastille { background: var(--ok-fond); border-color: var(--ok-texte); color: var(--ok-texte); }
.liste-etapes li.faite { color: var(--discret); }
.liste-etapes li.a-faire a { font-weight: 600; }
#etapes, #documents, #infos, #resultats { scroll-margin-top: 140px; }
.formulaire fieldset .champ-large { grid-column: 1 / -1; max-width: 34rem; }
.marge-bas { margin-bottom: .8rem; }

/* --- Validation par l'administrateur --- */
.verrouillee .si-modifiable { display: none !important; }
.etiquette.a-valider { background: color-mix(in srgb, #3b82c4 22%, var(--surface)); color: var(--texte); }
.validation { border-left: 4px solid #3b82c4; }
.validation .ligne-form { flex-wrap: wrap; gap: .6rem; }

/* --- Logo fédéral (espace des qualifications) --- */
.logo-federal {
  flex: none; display: inline-flex; align-items: center; background: #fff; border-radius: 8px;
  padding: 3px 6px; box-shadow: 0 0 0 1px var(--bord); line-height: 0;
}
.logo-federal img { height: 54px; width: auto; display: block; }
@media (max-width: 600px) { .logo-federal img { height: 42px; } }
.logo-impression { display: none; }
@media print {
  .logo-impression { display: block; height: 17mm; width: auto; }
  .entete-impression { align-items: center; }
  .entete-impression .titre-impression { flex: 1; }
}

/* --- Aide en ligne --- */
.aide { scroll-margin-top: 140px; }
.aide details { border-top: 1px solid var(--bord); padding: .2rem 0; scroll-margin-top: 140px; }
.aide details:first-of-type { border-top: 0; }
.aide summary {
  cursor: pointer; list-style: none; padding: .6rem 0; font-weight: 600; color: var(--accent-fonce);
  display: flex; align-items: center; gap: .5rem;
}
.aide summary::-webkit-details-marker { display: none; }
.aide summary::before { content: "+"; width: 1.3rem; height: 1.3rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-pale); font-weight: 700; }
.aide details[open] summary::before { content: "−"; }
.aide details > :not(summary) { margin: 0 0 .7rem 1.8rem; line-height: 1.55; }
.aide details:target summary, .aide details.cible summary { color: var(--texte); background: var(--accent-pale); border-radius: 6px; padding-left: .4rem; }
.aide ul, .aide ol { padding-left: 1.2rem; }
.aide li { margin: .25rem 0; }
.parcours { counter-reset: etape; list-style: none; padding: 0 !important; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.parcours li { counter-increment: etape; background: var(--accent-pale); border-radius: 8px; padding: .7rem .8rem .7rem 2.6rem; position: relative; margin: 0 !important; }
.parcours li::before { content: counter(etape); position: absolute; left: .7rem; top: .65rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.lien-aide {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; margin-left: .35rem;
  border: 1px solid var(--accent-bord); color: var(--accent-fonce); text-decoration: none; text-transform: none; letter-spacing: 0;
}
.lien-aide:hover { background: var(--accent-pale); text-decoration: none; }
@media print { .aide details > :not(summary) { margin-left: 0; } .aide summary::before { content: none; } }
.comptes-valides .actions-demande { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; } .comptes-valides .actions-demande button { white-space: nowrap; }
