/* Portail « Écoles en ligne » (SCHOOL-6) — mobile d'abord, d'après la maquette validée. */
:root {
  --ink: #14213D;
  --muted: #5B6475;
  --ground: #F4F6FA;
  --card: #FFFFFF;
  --line: #E3E8F0;
  --field: #C5CDDA;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --accent-soft: #E8EEFC;
  --ok: #0F7A4A;
  --ok-soft: #E3F4EC;
  --warn: #7A3E00;
  --warn-soft: #FFF4E5;
  --error: #9F1239;
  --error-soft: #FDECEF;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.portal { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.bar-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bar-title strong { font-size: 15px; }
.bar-title span { font-size: 13px; color: var(--muted); }
.bar a { font-size: 14px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.hero { padding: 24px 16px 20px; background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.hero p { margin: 0; color: #C9D2E3; font-size: 14px; }
.content { flex: 1; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 18px; }
.content h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.lead { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .search input {
  height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--field); border-radius: 10px; background: #FFFFFF; width: 100%;
}
.field input:focus, .search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { font-size: 13px; color: var(--muted); }
.btn {
  height: 52px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; width: 100%;
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn-secondary { background: #FFFFFF; color: var(--ink); border-color: var(--field); }
.btn-light { background: #FFFFFF; color: var(--ink); }
.btn-small { height: 44px; width: auto; padding: 0 14px; font-size: 14px; border-color: var(--field); background: #FFFFFF; color: var(--ink); }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; min-height: 44px; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.alert-error { background: var(--error-soft); color: var(--error); }
.alert-info { background: var(--accent-soft); color: var(--ink); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.search { display: flex; gap: 8px; }
.search button { flex: none; height: 48px; padding: 0 16px; border-radius: 10px; border: none; background: var(--accent); color: #FFFFFF; font: inherit; font-weight: 600; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: #FFFFFF; color: var(--ink); font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.school { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.school:hover { color: var(--ink); border-color: var(--field); }
.logo { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.school-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.school-text strong { font-size: 15px; }
.school-text span { font-size: 13px; color: var(--muted); }
.badge { align-self: flex-start; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; }
.badge-open { color: var(--ok); background: var(--ok-soft); }
.badge-closed { color: var(--muted); background: #EEF1F5; }
.identity { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 26px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex: none; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.balance { background: var(--ink); color: #FFFFFF; border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.balance-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: #C9D2E3; }
.balance-amount { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
.balance-amount small { font-size: 16px; font-weight: 600; }
.progress { height: 8px; border-radius: 4px; background: #2E3D5F; overflow: hidden; }
.progress span { display: block; height: 8px; border-radius: 4px; background: #7EA6FF; }
.balance-figures { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; font-size: 13px; color: #C9D2E3; }
.balance-figures dd { margin: 0; color: #FFFFFF; font-weight: 600; font-size: 15px; }
.due { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head h2 { margin: 0; font-size: 17px; }
.payment { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.payment-text strong { font-size: 15px; }
.payment-text span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.empty { color: var(--muted); font-size: 14px; }
.foot { padding: 16px; font-size: 13px; color: var(--muted); }
/* SCHOOL-7 — paiement par push. */
[hidden] { display: none !important; }
.pay-form { display: flex; flex-direction: column; gap: 18px; }
fieldset.card { margin: 0; min-width: 0; }
fieldset.card legend { font-size: 17px; font-weight: 700; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input, .operator input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.choice-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.choice-text span { font-size: 13px; color: var(--muted); }
.choice-amount { font-weight: 700; white-space: nowrap; }
.operators { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.operator { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1px solid var(--field); border-radius: 12px; font-weight: 600; cursor: pointer; }
.operator:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.operator-logo { width: 36px; height: 36px; flex: none; border-radius: 8px; object-fit: contain; }
.field-error { font-size: 13px; color: var(--error); font-weight: 600; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.waiting { display: flex; flex-direction: column; gap: 14px; text-align: center; }
.waiting h1 { font-size: 22px; }
.timer { align-self: center; width: 112px; height: 112px; border-radius: 56px; border: 6px solid var(--accent-soft); border-top-color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); }
.timer span { font-size: 32px; font-weight: 700; color: var(--ink); margin-right: 4px; }
.retry { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.waiting .card { text-align: left; }
.paid { background: var(--ok-soft); color: var(--ok); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.paid strong { font-size: 20px; }
.facts-list { grid-template-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.facts-list div { display: flex; justify-content: space-between; gap: 12px; }
.facts-list dd { text-align: right; }
