/* Style commun Clinkss : une colonne, gros boutons tactiles, police Lexend (lecture facile). */
:root {
  --bg: #F3F6F5; --card: #FFFFFF; --fg: #1D2828; --muted: #566664; --line: #D5DEDC;
  --accent: #1E6B66; --accent-ink: #FFFFFF; --soft: #DCEDEA; --soft-ink: #164F4B;
  --mark: #F7D774; --mark-ink: #1D2828;
  --good: #2C7A4B; --good-bg: #E3F2E8; --bad: #A93838; --bad-bg: #F8E4E4;
  --overlay: rgba(10, 16, 16, .92);
  --font: "Lexend", "Verdana", "Segoe UI", sans-serif;
  --fs: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  line-height: 1.7; letter-spacing: .01em; word-spacing: .06em;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-size: 1.25rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
  max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
}
.wrap.narrow { max-width: 620px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; } .row.center { justify-content: center; }
.sub { color: var(--muted); font-size: .9rem; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.empty { color: var(--muted); padding: 24px 0; }
.err { color: var(--bad); font-size: .95rem; min-height: 1em; }
.banner { background: var(--soft); color: var(--soft-ink); padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
}
.top h1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 6px 0 0 var(--mark); margin-right: 6px; flex: none; }
.brand-dot.big { width: 28px; height: 28px; box-shadow: 12px 0 0 var(--mark); }
.btn {
  font: inherit; font-weight: 500; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 20px; border-radius: 12px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer; text-align: center;
}
.btn.big { min-height: 58px; font-size: 1.05rem; width: 100%; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.soft { background: var(--soft); color: var(--soft-ink); border-color: var(--soft); }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn.danger:not(.ghost) { background: var(--bad); color: var(--card); }
.btn.small { min-height: 40px; padding: 4px 14px; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: default; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--fg); cursor: pointer; flex: none; text-decoration: none; }
.iconbtn.light { color: #fff; }
.link { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: .9rem; }
.chip { font: inherit; font-size: .9rem; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
.chip.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill { background: var(--bad); color: var(--card); border-radius: 999px; padding: 0 10px; font-size: .85rem; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
label { font-weight: 500; font-size: .95rem; }
input[type=text], input[type=password], input[type=date], select, textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg);
}
textarea { resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 40px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; white-space: nowrap; }
#toast { position: fixed; left: 50%; transform: translate(-50%, 20px); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: calc(100vw - 32px);
  background: #FFFFFF; color: var(--fg); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(28, 36, 51, .10); padding: 12px 18px; border-radius: 14px; font-size: .95rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
