/* phylakto.com — direction artistique « Cadran » (docs/ECRANS.md §1, bureau/interface/app.css, extension/ui/kit.js).
   Noir et blanc, angles droits, traits de 2 px, filets de 1 px. Le noir signale un moment de sécurité. */

@font-face { font-family: 'Archivo'; src: url('/fonts/archivo.woff2') format('woff2'); font-weight: 400 800; font-stretch: 100% 125%; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

/* Jetons : noir, blanc, surface, filet, gris jour (5,3:1 sur blanc), gris nuit (7,5:1 sur noir). */
:root {
  --bg: #fff; --fg: #000; --muted: #6B6B6B; --rule: #E0E0E0;
  --inv-edge: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --fg: #fff; --muted: #9A9A9A; --rule: #333; --inv-edge: #fff; color-scheme: dark; }
}
.inv { --bg: #000; --fg: #fff; --muted: #9A9A9A; --rule: #333; background: var(--bg); color: var(--fg); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: 'Archivo', system-ui, sans-serif; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
input, button { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 0; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.g { fill: none; stroke: currentColor; stroke-width: 2; flex: none; }

.x { font-stretch: 125%; font-weight: 800; letter-spacing: -0.02em; }
.m { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.l { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Symbole : carré plein, disque, aiguille. S'inverse sur fond noir. */
.sym .sq { fill: var(--fg); }
.sym .di { fill: var(--bg); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .x { font-size: 22px; line-height: 1; }

.skip { position: absolute; left: 16px; top: -200px; z-index: 10; background: var(--fg); color: var(--bg); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 8px; }

/* En-tête */
.top { border-bottom: 2px solid var(--fg); }
.top-in { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top .brand { min-height: 44px; }
.top-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; }

/* Ouverture */
.hero { padding: 40px 0 0; }
.kicker { color: var(--muted); margin-bottom: 18px; }
/* « a password. » (insécable) mesure 7,25 em : sous 360 px, la taille plancher suit la largeur utile pour que le point
   ne parte pas seul à la ligne. */
.hero h1 { font-size: clamp(min(40px, calc((100vw - 32px) / 7.5)), 7.6vw, 100px); line-height: 0.94; max-width: 13em; }
.hero-grid { display: grid; gap: 40px; margin-top: 32px; }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; max-width: 34em; }
@media (min-width: 980px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; margin-top: 40px; align-items: start; }
}

/* Formulaires : un champ, un bouton noir (une action par écran). */
.join { margin-top: 32px; display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.join-row { display: flex; gap: 0; }
.field { flex: 1 1 auto; min-width: 0; height: 56px; padding: 0 14px; border: 2px solid var(--fg); border-right: 0; background: var(--bg); color: var(--fg); font-size: 17px; border-radius: 0; }
.field::placeholder { color: var(--muted); opacity: 1; }
.field:focus { border-width: 3px; padding: 0 13px; border-right: 0; }
.field[aria-invalid="true"] { border-style: solid; border-width: 3px; padding: 0 13px; }
.btn, .btn-out { height: 56px; padding: 0 20px; border: 0; background: var(--fg); color: var(--bg); font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; text-decoration: none; white-space: nowrap; flex: 0 0 auto; }
.btn-out { border: 2px solid var(--fg); background: transparent; color: var(--fg); padding: 0 18px; }
.btn:disabled, .btn-out:disabled { cursor: progress; background: repeating-linear-gradient(45deg, var(--fg) 0 2px, var(--muted) 2px 10px); }
.btn-out:disabled { color: var(--fg); background: repeating-linear-gradient(45deg, var(--rule) 0 2px, var(--bg) 2px 10px); }
@media (max-width: 559px) {
  .join-row { flex-direction: column; gap: 10px; }
  .field, .field:focus { border-right: 2px solid var(--fg); }
  .field:focus, .field[aria-invalid="true"] { border-right-width: 3px; }
  .btn, .btn-out { width: 100%; }
}
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.msg { font-size: 15px; font-weight: 700; line-height: 1.4; }
.msg:empty { display: block; height: 0; }
.msg.err { border: 2px solid var(--fg); padding: 10px 12px; }
.msg.ok { background: var(--fg); color: var(--bg); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.msg.ok:focus { outline-offset: 3px; }
.fine { font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 40em; }

/* Panneau d'approbation (maquette Mac-Approbation) */
.mock { padding: 24px; display: flex; flex-direction: column; border: 2px solid var(--inv-edge); }
.mock-in { display: flex; flex-direction: column; gap: 18px; }
.mock-head { display: flex; align-items: center; justify-content: space-between; }
.mock-who { font-size: clamp(40px, 4.4vw, 56px); line-height: 0.95; }
.mock-ask { border: 2px solid var(--fg); padding: 14px 16px; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.mock-ask .m { font-size: 15px; }
.mock-checks { display: flex; flex-direction: column; gap: 10px; }
.mock-checks li { display: flex; gap: 12px; font-size: 15px; line-height: 1.4; }
.mock-checks svg { margin-top: 1px; }
.mock-wait { display: flex; align-items: center; gap: 12px; font-size: 15px; margin-top: 6px; }
.mock-wait span:nth-child(2) { flex: 1 1 auto; }
.pulse { width: 12px; height: 12px; flex: none; background: var(--fg); animation: pulse 1.2s steps(2, jump-none) infinite; }
@keyframes pulse { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.mock-btn { height: 56px; border: 2px solid var(--fg); display: flex; align-items: center; padding: 0 18px; font-size: 17px; font-weight: 700; }
.mock-note { font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Graduations : les faits en bref */
.ticks { margin-top: 48px; padding: 6px 0; border-top: 2px solid var(--fg); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.ticks li { padding: 9px 12px 9px 0; display: flex; align-items: center; gap: 10px; }
.ticks li::before { content: ''; width: 2px; height: 12px; background: var(--fg); flex: none; }

/* Sections */
.band { border-top: 2px solid var(--fg); padding: 56px 0 64px; }
.hero + .band { border-top: 0; }
.band.inv { border-top: 2px solid var(--inv-edge); border-bottom: 2px solid var(--inv-edge); }
.band.inv + .band { border-top: 0; }
@media (min-width: 768px) { .band { padding: 80px 0 88px; } }
.num { color: var(--muted); margin-bottom: 16px; }
.band h2 { font-size: clamp(32px, 5vw, 64px); line-height: 0.98; max-width: 15em; margin-bottom: 32px; }
.band h2.small { font-size: clamp(28px, 3.6vw, 44px); }
.big { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; max-width: 34em; }
.narrow { max-width: 40em; }
.big + p { margin-top: 16px; max-width: 40em; }
.col-text > p + p { margin-top: 14px; max-width: 40em; }
.cols { display: grid; gap: 48px; }
@media (min-width: 980px) { .cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; } }

.checks { margin-top: 28px; border-top: 1px solid var(--rule); }
.checks li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.45; }
.checks svg { margin-top: 3px; }

.col-side h3 { margin-bottom: 12px; color: var(--muted); }
.modes { border-top: 2px solid var(--fg); }
.modes > div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.modes dt { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.modes dd { margin: 4px 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.modes .fill { fill: currentColor; }
.modes .ring { fill: none; stroke: currentColor; stroke-width: 1.5; }

.log { margin-top: 32px; }
.log figcaption { color: var(--muted); margin-bottom: 10px; }
.log ol { border-top: 2px solid var(--fg); font-size: 13px; line-height: 1.5; }
.log li { display: grid; grid-template-columns: 4em minmax(0, 1fr); column-gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.log .t { grid-row: 1 / 3; color: var(--muted); }
.log .w b { font-weight: 700; margin-right: 6px; }
.log .r { color: var(--muted); }

.kinds { margin-top: 40px; border-top: 2px solid var(--fg); display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); column-gap: 32px; }
.kinds li { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.kinds h3, .rows h3, .trio h3 { font-size: 20px; line-height: 1.2; font-weight: 700; }
.kinds h3 { margin: 14px 0 6px; }
.kinds p, .trio p { color: var(--muted); font-size: 15px; line-height: 1.5; }

.pw { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.pw-val { font-size: clamp(24px, 3vw, 36px); letter-spacing: 0.05em; font-weight: 500; word-break: break-all; }
.pw-val .d { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.pw-val .s { background: var(--fg); color: var(--bg); }
.pw figcaption { color: var(--muted); font-size: 15px; max-width: 30em; }

.rows { border-top: 2px solid var(--fg); }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.rows h3 { grid-column: 1; grid-row: 1; }
.rows .tag { grid-column: 2; grid-row: 1; }
.rows p { grid-column: 1 / -1; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 44em; }
@media (min-width: 768px) {
  .rows li { grid-template-columns: 200px minmax(0, 1fr) auto; }
  .rows p { grid-column: 2; grid-row: 1; }
  .rows .tag { grid-column: 3; }
}
.soon { margin-top: 32px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border: 2px solid var(--fg); white-space: nowrap; justify-self: end; }
.tag.on { background: var(--fg); color: var(--bg); }

.flow { margin-top: 4px; }
.flow li { position: relative; padding: 0 0 26px 32px; display: flex; flex-direction: column; gap: 2px; }
.flow li > span:first-child { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.flow .k { color: var(--muted); font-size: 13px; }
.flow li::before { content: ''; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; background: var(--fg); }
.flow li::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: -4px; width: 2px; background: var(--fg); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }
.flow .hub::before { border-radius: 50%; width: 18px; height: 18px; left: -2px; top: 2px; }
.flow li:has(+ .off)::after { background: repeating-linear-gradient(to bottom, var(--fg) 0 4px, transparent 4px 8px); }
.flow .off::before { background: var(--bg); border: 2px solid var(--fg); }

.trio { border-top: 2px solid var(--fg); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 32px; }
.trio li { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.trio h3 { margin-bottom: 6px; }

.greek { font-size: clamp(56px, 11vw, 140px); line-height: 1; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 28px; }
.name .big { margin-bottom: 32px; }

.facts { border-top: 2px solid var(--fg); max-width: 880px; }
.facts > div { display: grid; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; }
.facts dd { line-height: 1.5; }
@media (min-width: 640px) { .facts > div { grid-template-columns: 200px minmax(0, 1fr); } }
.leave { margin-top: 40px; }

/* Pages courtes : réponse sans JavaScript, 404 */
.done h1 { font-size: clamp(40px, 7vw, 88px); line-height: 0.95; margin-bottom: 24px; }
.done .big { margin-bottom: 32px; }

/* Pied */
.foot { border-top: 2px solid var(--fg); padding: 24px 0 40px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; }
.foot .brand .x { font-size: 17px; }
.foot .m { color: var(--muted); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.foot a .m { color: inherit; font-size: 12px; font-weight: 400; }
