/* Jurys du Salon — sobre, lisible, d'abord pour le téléphone. Aucune police ni ressource extérieure. */
:root {
  --fond: #f6f1e7; --papier: #fffdf8; --encre: #23201b; --doux: #6b6358; --trait: #e1d8c6;
  --accent: #7a2633; --accent-clair: #f3e3e3; --or: #a77b2c; --vert: #2f6b45; --vert-clair: #e2f0e6; --alerte: #9a4a00; --alerte-clair: #fbecd9;
  --rayon: 12px; --ombre: 0 1px 2px rgba(60, 40, 20, .08), 0 4px 14px rgba(60, 40, 20, .06);
  --titre: Georgia, 'Times New Roman', serif;
  --texte: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 18px/1.5 var(--texte); }
main { max-width: 980px; margin: 0 auto; padding: 16px 16px 64px; }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: normal; line-height: 1.2; margin: 1.2em 0 .5em; }
h1 { font-size: 1.75rem; margin-top: .4em; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
a { color: var(--accent); }
p { margin: .5em 0; }
.muted { color: var(--doux); } .petit { font-size: .88rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { max-width: 100%; }

/* En-tête */
.haut { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--accent); color: #fff; }
.haut a, .haut .lien { color: #fff; }
.marque { font-family: var(--titre); font-size: 1.15rem; text-decoration: none; }
.marque small { opacity: .8; font-size: .85rem; margin-left: 4px; }
.croix { color: #e8c77a; }
.croix.grand { font-size: 2.4rem; margin: 0; color: var(--or); }
.qui { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: .92rem; }
.qui form { margin: 0; }

/* Jury : titre et onglets */
.jury-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.jury-tete h1 { margin-bottom: .2em; }
.onglets { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--trait); margin: 0 0 16px; scrollbar-width: none; }
.onglets a { flex: 0 0 auto; padding: 10px 12px; text-decoration: none; color: var(--doux); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.onglets a[aria-current] { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.etape { font-size: .8rem; padding: 2px 10px; border-radius: 99px; background: var(--trait); color: var(--encre); white-space: nowrap; font-family: var(--texte); }
.etape-vote { background: var(--accent-clair); color: var(--accent); }
.etape-clos { background: #f4e9cf; color: #6d4f12; }

/* Cartes et blocs */
.carte { display: block; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; margin: 12px 0; box-shadow: var(--ombre); }
.grille-cartes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.carte > :first-child { margin-top: 0; }
.grille-cartes .carte { margin: 0; }
.pile { display: grid; gap: 8px; align-content: start; }
.jury-carte { text-decoration: none; color: inherit; }
.jury-carte h2 { margin-top: 0; color: var(--accent); }
.barre { height: 10px; border-radius: 99px; background: var(--trait); overflow: hidden; margin: 10px 0 6px; }
.barre span { display: block; height: 100%; background: var(--vert); border-radius: 99px; }
.liste { list-style: none; padding: 0; margin: 0; }
.liste > li { padding: 10px 0; border-bottom: 1px solid var(--trait); }
.liste > li:last-child { border-bottom: 0; }
.liste-blocs { list-style: none; padding: 0; }
.flash { background: var(--vert-clair); color: var(--vert); border-radius: var(--rayon); padding: 12px 16px; font-weight: 600; }
.erreur { background: var(--accent-clair); color: var(--accent); border-radius: var(--rayon); padding: 10px 14px; }
.alerte { background: var(--alerte-clair); color: var(--alerte); border-radius: var(--rayon); padding: 10px 14px; }
.succes { color: var(--vert); font-weight: 600; }
.pastille { display: inline-block; font-size: .78rem; padding: 1px 8px; border-radius: 99px; background: #f4e9cf; color: #6d4f12; vertical-align: middle; }
.prio { color: var(--alerte); }

/* Boutons et formulaires */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; font: 600 1rem var(--texte); cursor: pointer; text-decoration: none; }
.bouton:hover { filter: brightness(1.1); }
.bouton.secondaire { background: var(--papier); color: var(--accent); border: 2px solid var(--accent); }
.bouton.petit { min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.bouton.large { width: 100%; font-size: 1.1rem; }
.lien { background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.lien.danger, .danger { color: #a3271b; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.actions form { margin: 0; }
.formulaire { display: grid; gap: 14px; }
.formulaire label, .en-ligne label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; font-size: 1rem; width: 100%; padding: 10px 12px; border: 1px solid #cfc3ac; border-radius: 8px; background: #fff; color: var(--encre); min-height: 46px; }
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus, .bouton:focus-visible, a:focus-visible { outline: 3px solid #e8c77a; outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.case { display: flex !important; gap: 10px; align-items: center; font-weight: normal !important; }
.case input { width: 22px; height: 22px; }
.cases { display: grid; gap: 6px; }
.deux { display: grid; gap: 14px; grid-template-columns: 1fr; }
.en-ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.en-ligne label { flex: 1 1 220px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
details[open] > summary { margin-bottom: 10px; }

/* Entrée */
.entree { max-width: 460px; margin: 8vh auto; text-align: center; }
.entree form { display: grid; gap: 10px; text-align: left; margin: 18px 0; }
.entree input { font-size: 1.4rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.liste-choix { list-style: none; padding: 0; display: grid; gap: 8px; }
.choix { width: 100%; text-align: left; display: grid; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; font: inherit; cursor: pointer; }
.choix:hover { border-color: var(--accent); }

/* Livres */
.filtres { display: flex; gap: 6px; flex-wrap: wrap; }
.filtre { border: 1px solid var(--trait); background: var(--papier); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: .92rem; cursor: pointer; min-height: 40px; }
.filtre[aria-pressed=true] { background: var(--accent); color: #fff; border-color: var(--accent); }
.livres { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.livre { display: flex; gap: 14px; text-decoration: none; color: inherit; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 10px; box-shadow: var(--ombre); height: 100%; }
.livre:hover { border-color: var(--accent); }
.livre h3 { margin: 0 0 2px; font-size: 1.08rem; color: var(--encre); }
.livre p { margin: 2px 0; }
.couv { width: 72px; aspect-ratio: 200 / 290; object-fit: cover; border-radius: 4px; flex: 0 0 auto; background: var(--trait); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.couv.grande { width: 160px; }
.couv.mini { width: 40px; }
.numero { font-size: .85rem; color: var(--doux); }
.etat { display: inline-block; font-size: .8rem; padding: 1px 9px; border-radius: 99px; background: var(--trait); }
.etat-lu { background: var(--vert-clair); color: var(--vert); }
.etat-en_cours { background: #e6eef8; color: #2a4f7a; }
.etat-abandon { background: #eee; color: #777; }
.large-seul { display: none; }
.classement th, .classement td { padding: 8px 6px; }
.tri { white-space: nowrap; font-size: .8rem; padding: 1px 9px; border-radius: 99px; background: var(--trait); }
.tri-top5 { background: #f4e9cf; color: #6d4f12; } .tri-top10 { background: var(--vert-clair); color: var(--vert); } .tri-non { background: #eee; color: #777; }

/* Fiche */
.fiche { display: grid; gap: 16px; grid-template-columns: 1fr; }
.fiche-couv { display: grid; justify-items: start; gap: 8px; }
.titre-livre { margin-top: 0; font-size: 1.6rem; }
.resume { background: var(--papier); border-left: 3px solid var(--or); padding: 4px 14px; border-radius: 0 8px 8px 0; }
.observations { font-size: .95rem; }
.etats { display: flex; flex-wrap: wrap; gap: 8px; }
.etats legend { width: 100%; }
.etat-choix input, .note-choix input { position: absolute; opacity: 0; }
.etat-choix span { display: inline-block; padding: 8px 14px; border: 1px solid #cfc3ac; border-radius: 99px; background: #fff; cursor: pointer; min-height: 44px; line-height: 26px; }
.etat-choix input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.etat-choix input:focus-visible + span, .note-choix input:focus-visible + span { outline: 3px solid #e8c77a; }
.critere { border-top: 1px solid var(--trait); padding-top: 12px; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 56px)); gap: 5px; margin-bottom: 8px; }
.note-choix span { display: flex; align-items: center; justify-content: center; height: 48px; border: 1px solid #cfc3ac; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; }
.note-choix.demi span { font-weight: normal; font-size: .9rem; color: var(--doux); }
.note-choix.efface { grid-column: 1 / -1; justify-self: start; }
.note-choix.efface span { height: auto; border: 0; background: none; padding: 2px 0; color: var(--doux); font-weight: normal; font-size: .85rem; text-decoration: underline; }
.note-choix.efface input:checked + span { background: none; color: var(--doux); text-decoration: none; }
.note-choix input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.total-direct { font-family: var(--titre); font-size: 1.3rem; color: var(--accent); min-height: 1.5em; }
.avis blockquote { margin: 6px 0; padding: 2px 14px; border-left: 3px solid var(--trait); }
.avis-courts { padding-left: 18px; }
.avis-courts li { margin: 6px 0; }
.exemplaires > li p { margin: 0 0 4px; }
.passer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.passer select { width: auto; flex: 1 1 200px; min-height: 40px; padding: 6px 10px; font-size: .95rem; }

/* Tableaux */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table { border-collapse: collapse; width: 100%; background: var(--papier); font-size: .95rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
th { font-weight: 600; background: #efe7d6; }
td.num, th.num { text-align: center; }
tr.manque td { background: var(--alerte-clair); }
tr.gagnant td { background: #f4e9cf; font-weight: 600; }
tr.inactif { opacity: .5; }
.classement select { min-width: 92px; min-height: 40px; padding: 4px 8px; }
.classement input[type=checkbox] { width: 24px; height: 24px; }
.matrice { font-size: .88rem; } .matrice th, .matrice td { padding: 6px; white-space: nowrap; }
.reunions .passee { opacity: .65; }
.rapport { white-space: pre-wrap; background: var(--vert-clair); padding: 10px; border-radius: 8px; font-family: inherit; }

/* Vote et palmarès */
.vote-choix { display: flex !important; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--trait); border-radius: 10px; margin: 6px 0; background: #fff; font-weight: normal !important; cursor: pointer; }
.vote-choix input { width: 24px; height: 24px; flex: 0 0 auto; }
.vote-choix:has(input:checked) { border-color: var(--accent); background: var(--accent-clair); }
.palmares { border-top: 4px solid var(--or); }
.laureat { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.laureat h2 { margin: 0; }
.coeur { color: var(--accent); }

/* Cartes d'accès (imprimables) */
.cartes { display: grid; gap: 12px; grid-template-columns: 1fr; }
.carte-acces { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px dashed #b9ab90; border-radius: 10px; padding: 14px; break-inside: avoid; }
.carte-acces h3 { margin: 4px 0; }
.qr { width: 120px; flex: 0 0 120px; }
.qr svg { width: 100%; height: auto; display: block; }
.code { font: 700 1.35rem ui-monospace, Consolas, monospace; letter-spacing: .08em; margin: 4px 0; }

@media (min-width: 700px) {
  .large-seul { display: inline; }
  .classement th, .classement td { padding: 8px 10px; }
  .deux { grid-template-columns: 1fr 1fr; }
  .livres { grid-template-columns: 1fr 1fr; }
  .fiche { grid-template-columns: 180px 1fr; }
  .cartes { grid-template-columns: 1fr 1fr; }
}
@media print {
  body { background: #fff; font-size: 12pt; }
  .haut, .ecran-seul, .onglets, .flash { display: none !important; }
  main { padding: 0; max-width: none; }
  .cartes { grid-template-columns: 1fr 1fr; gap: 8mm; }
  .carte-acces { padding: 6mm; }
}
