/* ABC Déchets+ : feuille de style. Priorité : lisible et simple pour tout le monde, y compris les seniors.
   Règles : texte de base 20 px, contraste élevé, boutons de 64 px minimum, une question par écran. */

:root {
  --ink: #111111;
  --muted: #3b3b3b;
  --bg: #ffffff;
  --soft: #f2f4f7;
  --line: #9aa3af;
  --blue: #0b3d91;
  --blue-dark: #082c69;
  --green: #0a5c2e;
  --amber: #6b4200;
  --focus: #ffbf00;
}

html { font-size: 20px; }
html.big { font-size: 26px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.45;
}

:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

.top {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; border-bottom: 3px solid var(--blue); background: var(--soft);
}
.brand { font-weight: 800; font-size: 1.3rem; color: var(--blue-dark); }
.tools { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.lang { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.lang select, .size {
  font: inherit; min-height: 48px; padding: .25rem .6rem;
  border: 2px solid var(--blue); border-radius: 8px; background: #fff; color: var(--ink);
}
.size { font-weight: 800; cursor: pointer; }
.size[aria-pressed="true"] { background: var(--blue); color: #fff; }

.draft {
  background: #fff4cc; color: #3a2b00; border-bottom: 2px solid #d9a400;
  padding: .5rem 1rem; font-size: .9rem; font-weight: 600;
}

main { max-width: 52rem; margin: 0 auto; padding: 1rem; outline: none; }

h1 { font-size: 1.6rem; line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 1.25rem 0 .5rem; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 1rem; }
.step { font-weight: 700; color: var(--blue-dark); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }

.tile, .choice, .primary, .secondary {
  font: inherit; cursor: pointer; min-height: 64px; border-radius: 10px; border: 2px solid var(--blue);
  padding: .6rem .8rem; background: #fff; color: var(--ink); text-align: center;
}
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 8rem; font-weight: 700; }
.tile .pic { font-size: 2.6rem; line-height: 1; }
.tile:hover, .choice:hover, .secondary:hover { background: #e8effb; }

.choice { display: block; width: 100%; text-align: left; margin-bottom: .75rem; }
.choice strong { display: block; font-size: 1.15rem; }
.choice span { color: var(--muted); font-size: .95rem; }
.choice .pic { font-size: 1.8rem; margin-right: .5rem; }
.choice[aria-pressed="true"] { background: var(--blue); color: #fff; }
.choice[aria-pressed="true"] span { color: #e6ecff; }

.primary { background: var(--blue); color: #fff; font-weight: 800; width: 100%; font-size: 1.15rem; margin-top: .5rem; }
.primary:hover { background: var(--blue-dark); }
.primary[disabled] { background: #6b7280; border-color: #6b7280; cursor: not-allowed; }
.secondary { font-weight: 700; }

.row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.row .secondary { flex: 1 1 10rem; }

.words { margin-top: 1.25rem; padding: 1rem; background: var(--soft); border-radius: 10px; }
.words label { font-weight: 700; display: block; margin-bottom: .4rem; }
.words .line { display: flex; gap: .5rem; flex-wrap: wrap; }
.words input, select.big {
  font: inherit; min-height: 56px; padding: .4rem .7rem; border: 2px solid var(--line); border-radius: 8px;
  flex: 1 1 12rem; width: 100%; background: #fff; color: var(--ink);
}
.words .go { flex: 0 0 auto; min-width: 8rem; margin-top: 0; width: auto; }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0 0; }
.fail { color: #8a1c1c; font-weight: 700; }

.verdict { border: 3px solid var(--green); border-radius: 10px; padding: .8rem 1rem; margin: 0 0 1rem; background: #effaf3; }
.verdict.repair { border-color: var(--amber); background: #fff7e6; }
.verdict.recycle { border-color: var(--blue); background: #eef3ff; }
.verdict .big-pic { font-size: 2rem; margin-right: .4rem; }
.verdict .v-title { font-size: 1.25rem; font-weight: 800; }
.verdict .v-note { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.tip { background: #fff4cc; border-left: 6px solid #d9a400; padding: .6rem .8rem; margin: 0 0 1rem; font-weight: 600; }

.card { border: 2px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin: 0 0 1rem; background: #fff; }
.card .rank { font-weight: 800; color: var(--blue-dark); }
.card h3 { margin: .1rem 0 .4rem; font-size: 1.2rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .6rem; }
.badge { border: 2px solid var(--green); color: var(--green); border-radius: 999px; padding: .05rem .6rem; font-size: .85rem; font-weight: 700; }
.badge.neutral { border-color: var(--muted); color: var(--muted); }
.why { margin: .4rem 0; padding-left: 1.2rem; }
.why li { margin: .15rem 0; }
.meta { color: var(--muted); font-size: .9rem; margin: .3rem 0; }
.call { display: inline-block; margin-top: .4rem; padding: .6rem 1rem; border: 2px solid var(--blue); border-radius: 10px;
        font-weight: 800; color: var(--blue-dark); text-decoration: none; min-height: 48px; }
.score { font-weight: 800; }
.draft-print { display: none; font-weight: 700; }
.summary { background: var(--soft); border-radius: 10px; padding: .6rem .9rem; margin-bottom: 1rem; font-weight: 700; }

.link { font: inherit; background: none; border: none; color: var(--blue-dark); text-decoration: underline; cursor: pointer; padding: .4rem 0; min-height: 44px; font-weight: 700; }
.bullet { margin: .3rem 0 .3rem .5rem; }
.foot { max-width: 52rem; margin: 1.5rem auto; padding: 1rem; border-top: 2px solid var(--line); color: var(--muted); font-size: .9rem; }

@media (max-width: 480px) {
  html { font-size: 19px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile { min-height: 7rem; }
}

@media print {
  .top, .draft, .row, .skip, .words, .call, .step, .foot .noprint { display: none !important; }
  body { font-size: 12pt; }
  .card { break-inside: avoid; }
  .draft-print { display: block !important; }
}
