/* Enveloppe de scrutin (bleu), bulletins blancs, affiche jaune. Archivo variable, largeur et graisse. */
@font-face { font-family: Archivo; src: url(archivo.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root { --enveloppe: #a9bdd3; --rabat: #91a9c4; --papier: #fff; --encre: #16294a; --doux: #4a5b78; --affiche: #ffd400; --tampon: #a3142b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--enveloppe); color: var(--encre); font: 400 1rem/1.5 Archivo, system-ui, sans-serif; }
h1, h2 { line-height: 1.05; margin: 0 0 .5rem; font-weight: 800; font-stretch: 80%; text-wrap: balance; }
h1 { font-size: 2.2rem; } h2 { font-size: 1.6rem; }
p { margin: 0 0 .75rem; } ul, ol, dl { margin: 0; padding: 0; list-style: none; } dd { margin: 0; }
a { color: inherit; text-underline-offset: .2em; } small { font-size: .85rem; color: var(--doux); font-weight: 400; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
.haut { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem max(1rem, calc(50vw - 25rem)); }
.marque { font-weight: 800; font-stretch: 80%; font-size: 1.15rem; text-decoration: none; }
.haut nav { display: flex; gap: 1rem; align-items: center; }
main { max-width: 52rem; margin: 0 auto; padding: 0 1rem 4rem; }
section { margin-bottom: 2.5rem; }
.etroit { max-width: 32rem; margin: 0 auto 1.5rem; }
.bulletin { background: var(--papier); padding: 1rem; border-radius: 2px; }
.bulletin.etroit { padding: 1.5rem 1.25rem; }
.pile { display: grid; gap: .5rem; }
.note { color: var(--encre); font-size: .9rem; } .vide { padding: 1rem; border: 2px dashed var(--encre); border-radius: 2px; }
.avis { background: var(--encre); color: #fff; padding: .7rem 1rem; border-radius: 2px; }

/* L'urne : le bulletin glisse hors de l'enveloppe */
.urne { background: var(--papier); padding: 1.75rem 1.25rem 3.5rem; margin-bottom: 1.5rem; text-align: center; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.2rem), 50% 100%, 0 calc(100% - 2.2rem)); }
.urne h1 { font-size: clamp(3.8rem, 19vw, 8rem); font-weight: 900; font-stretch: 70%; margin: 0; line-height: .95; font-variant-numeric: tabular-nums; }
.urne-sous { font-size: 1.1rem; }
.rebours { display: block; font-weight: 700; font-variant-numeric: tabular-nums; }

.bouton { display: inline-block; background: var(--encre); color: #fff; border: 0; border-radius: 2px; padding: .8rem 1.5rem; font: 700 1.05rem/1.2 Archivo, sans-serif; text-decoration: none; cursor: pointer; }
.bouton:hover { background: #0c1830; } .bouton:disabled { opacity: .45; cursor: not-allowed; }
.bouton.petit { padding: .6rem .9rem; font-size: .95rem; min-height: 2.75rem; }
.lien { background: none; border: 0; padding: .5rem 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* Ordre d'arrivée */
.arrivee { counter-reset: p; display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-weight: 700; font-stretch: 88%; }
.arrivee li { counter-increment: p; display: flex; align-items: center; gap: .4rem; }
.arrivee li::before { content: counter(p); flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--c, var(--encre)); color: var(--encre); font-size: .85rem; font-weight: 800; }
.grand .arrivee { flex-direction: column; font-size: 1.6rem; margin-bottom: 1rem; }

.ligne-trio { display: grid; gap: .75rem; }
.ligne-trio dl { display: flex; gap: 1.75rem; } .ligne-trio dt { font-size: .85rem; color: var(--doux); } .ligne-trio dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.ligne-trio .bouton { justify-self: start; }

.parieur { padding: 0; }
.parieur summary { display: grid; grid-template-columns: 1fr auto; padding: .9rem 1rem; cursor: pointer; list-style: none; }
.parieur summary::-webkit-details-marker { display: none; }
.parieur summary::after { content: ''; grid-column: 2; grid-row: 1 / 3; align-self: center; width: .6rem; height: .6rem; border: solid var(--encre); border-width: 0 3px 3px 0; transform: rotate(-45deg); transition: transform .15s; }
.parieur[open] summary::after { transform: rotate(45deg); }
.qui { font-weight: 800; font-size: 1.1rem; } .chiffres { color: var(--doux); font-size: .95rem; grid-column: 1; }
.parieur > ul > li { padding: .75rem 1rem; border-top: 1px solid var(--rabat); } .parieur p { margin: .3rem 0 0; }
.attente .arrivee { opacity: .5; } .attente p { color: var(--doux); }
.badge { display: inline-block; padding: 0 .45rem; border-radius: 2px; font-size: .85rem; font-weight: 700; border: 2px solid currentColor; white-space: nowrap; }
.badge.promis, .badge.non_regle { color: var(--tampon); } .badge.annule { color: var(--doux); } .badge.valide { color: #17633a; }

.regler { background: var(--affiche); padding: 1rem; border-radius: 2px; } .regler li a { display: inline-block; padding: .4rem 0; font-weight: 700; }

/* L'affiche du mur */
.honte { background: var(--affiche); color: #1a1400; padding: 1.5rem 1.25rem; transform: rotate(-.6deg); box-shadow: 0 0 0 8px #fff; margin: 3rem 8px 1rem; }
.honte h2 { font-size: clamp(2.6rem, 12vw, 4.5rem); font-weight: 900; font-stretch: 62%; }
.honte li { padding: .6rem 0; border-top: 3px solid #1a1400; } .honte li b { display: block; font-size: 1.35rem; font-weight: 900; font-stretch: 80%; }
.honte .sortie { font-weight: 800; margin: .75rem 0 0; }

label { display: block; font-weight: 600; margin-top: .75rem; }
input, select { width: 100%; min-height: 2.9rem; padding: .5rem .7rem; font: inherit; color: inherit; background: #fff; border: 2px solid var(--encre); border-radius: 2px; }
input[type=checkbox] { width: 1.3rem; min-height: 1.3rem; height: 1.3rem; } .case { display: flex; gap: .5rem; align-items: center; }
form > .bouton { margin-top: 1rem; } form .note { margin-top: .75rem; }
.grille { width: 100%; border-collapse: collapse; } .grille thead th { font-size: .9rem; padding: .25rem; } .grille th:first-child { text-align: left; }
.grille tbody tr { border-top: 1px solid var(--rabat); } .grille tbody th { font-weight: 700; font-stretch: 88%; padding: .3rem .4rem .3rem .6rem; border-left: 6px solid var(--c, transparent); overflow-wrap: anywhere; }
.grille td { padding: .15rem; width: 3.1rem; text-align: center; }
.place { margin: 0; position: relative; display: inline-grid; } .place input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; height: 100%; cursor: pointer; }
.place span { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--rabat); display: grid; place-items: center; font-weight: 800; color: var(--doux); }
.place input:checked + span { background: var(--encre); border-color: var(--encre); color: #fff; } .place input:focus-visible + span { outline: 3px solid var(--encre); outline-offset: 2px; }

.liste li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--rabat); } .liste li:first-child { border-top: 0; } .fait span { opacity: .5; text-decoration: line-through; }
.liste form .bouton, .ligne-admin form .bouton { margin: 0; }
.onglets { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 1.5rem; } .onglets a { padding: .6rem .9rem; text-decoration: none; font-weight: 600; border-radius: 2px; } .onglets [aria-current] { background: var(--papier); }
.filtres { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.5rem; } .filtres .bouton { margin: 0; grid-column: 1 / -1; }
.ligne-admin { display: grid; gap: .5rem; } .ligne-admin .fin { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.copie { overflow-wrap: anywhere; }
@media (min-width: 40rem) {
  .ligne-trio { grid-template-columns: 1fr auto auto; align-items: center; }
  .ligne-admin { grid-template-columns: 1fr auto; align-items: center; } .filtres { grid-template-columns: 2fr 1fr auto; } .filtres .bouton { grid-column: auto; }
  .champs { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 .75rem; align-items: end; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.payer div { padding: .4rem 0; border-top: 1px solid var(--rabat); } .payer div:last-child { border-bottom: 1px solid var(--rabat); margin-bottom: 1rem; }
.payer dt { font-size: .9rem; color: var(--doux); } .payer dd { display: flex; justify-content: space-between; align-items: center; gap: 1rem; } .payer b { font-size: 1.35rem; font-weight: 800; }
