/* PANILO — marketing, auth, legal, public order page and /pilotage layout.
   Builds on panilo.css tokens. Flat surfaces, no gradients, no shadows. */

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.wrap-narrow { max-width: 760px; }
body.site { font-size: 1.0625rem; line-height: 1.55; }
body.site section[id] { scroll-margin-top: 72px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--cream); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 26px; width: auto; }
.site-nav { display: none; gap: 22px; margin-left: 12px; }
.site-nav a { white-space: nowrap; color: var(--charcoal); text-decoration: none; font-weight: 500; padding: 8px 0; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.head-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.head-link { color: var(--charcoal); font-weight: 600; text-decoration: none; padding: 10px 2px; }
.head-link:hover { color: var(--blue); text-decoration: underline; }
.langsw { display: inline-flex; font-size: 0.9375rem; font-weight: 600; }
.langsw a, .langsw button { background: none; border: 0; padding: 10px 7px; color: var(--muted); text-decoration: none; min-width: 36px; min-height: 40px; }
.langsw a[aria-current="true"], .langsw button[aria-pressed="true"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.langsw a:hover, .langsw button:hover { color: var(--blue); }
.head-cta { display: none; }
@media (min-width: 560px) { .head-cta { display: inline-flex; } }
@media (min-width: 1040px) { .site-nav { display: flex; } }

/* ---------- Generic blocks ---------- */
.sec { padding: clamp(56px, 9vw, 112px) 0; }
.mark { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 0.11em; text-underline-offset: 0.1em; text-decoration-skip-ink: none; }
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 72px; } }

/* ---------- Footer ---------- */
.site-foot { padding: 40px 0 48px; font-size: 0.9375rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--charcoal); padding: 8px 0; display: inline-block; }
.site-foot .sig { font-family: var(--sign); font-stretch: 108%; font-weight: 800; color: var(--blue); }

/* ---------- Auth ---------- */
.auth { min-height: 100svh; display: grid; }
@media (min-width: 960px) { .auth { grid-template-columns: minmax(340px, 5fr) 7fr; } }
.auth-side { display: none; }
@media (min-width: 960px) {
  .auth-side { display: flex; flex-direction: column; justify-content: space-between; background: var(--blue); color: var(--cream); padding: 44px; position: sticky; top: 0; height: 100svh; overflow: hidden; }
  .auth-side .brand img { filter: brightness(0) invert(1); height: 28px; }
  .auth-side p { font-family: var(--sign); font-stretch: 108%; font-weight: 800; font-size: 2.125rem; line-height: 1.12; letter-spacing: -0.015em; max-width: 11em; margin: 0; }
  .auth-side .art { width: 78%; height: auto; filter: brightness(0) invert(1); opacity: 0.2; margin-left: auto; }
}
.auth-main { display: flex; flex-direction: column; align-items: center; padding: 20px 20px 56px; }
.auth-top { width: 100%; max-width: 440px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; min-height: 44px; }
.auth-top .brand img { height: 26px; }
@media (min-width: 960px) { .auth-top .brand { visibility: hidden; } .auth-main { justify-content: center; padding: 32px; } .auth-top { margin-bottom: 28px; } }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-family: var(--sign); font-stretch: 108%; font-weight: 800; color: var(--blue); font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 10px; }
.auth-card .sub { color: var(--muted); font-size: 1.0625rem; margin-bottom: 28px; }
.auth-card .field > label { font-size: 1rem; }
.auth-card .input { min-height: 54px; font-size: 1.0625rem; }
.pw { position: relative; }
.pw .input { padding-right: 104px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; bottom: 6px; padding: 0 12px; border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: 0.9375rem; border-radius: var(--r-sm); text-decoration: underline; text-underline-offset: 3px; }
.pw-toggle:hover { background: var(--blue-soft); }
.form-error { margin-bottom: 18px; }
.auth-alt { margin-top: 26px; color: var(--muted); }
.auth-alt a { font-weight: 600; }
.beta-note { display: flex; gap: 10px; align-items: flex-start; background: var(--yellow-soft); border-radius: var(--r); padding: 12px 14px; margin: 4px 0 20px; font-size: 0.9375rem; }
.beta-note .ic { color: var(--warn); margin-top: 2px; }
.dev-link { word-break: break-all; }

/* ---------- Legal ---------- */
.legal { padding: 40px 0 80px; }
.legal h1 { font-family: var(--sign); font-stretch: 108%; font-weight: 800; color: var(--blue); font-size: clamp(2.125rem, 5vw, 3rem); letter-spacing: -0.02em; margin: 18px 0 20px; }
.legal h2 { font-size: 1.375rem; margin: 40px 0 10px; }
.legal h3 { font-size: 1.0625rem; margin: 22px 0 6px; }
.legal p, .legal li { max-width: 46em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.draft { background: var(--yellow); color: var(--charcoal); font-weight: 600; padding: 12px 16px; border-radius: var(--r); display: inline-block; }
.ph { background: var(--yellow-soft); box-shadow: inset 0 -2px 0 var(--yellow); padding: 0 4px; border-radius: 3px; }
.legal-nl { margin-top: 56px; padding-top: 8px; border-top: 1.5px solid var(--charcoal); }

/* ---------- Public order page ---------- */
body.order { background: var(--cream); }
.ord { max-width: 680px; margin: 0 auto; padding: 18px 18px 56px; }
.cat-h { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 4px; }
.prod { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prod-name { font-weight: 600; font-size: 1.0625rem; line-height: 1.25; }
.prod.on .prod-name { color: var(--blue); }
.prod.on .stepper { border-color: var(--blue); }
.ord .stepper input { width: 46px; }
@media (max-width: 380px) { .prod { grid-template-columns: 1fr auto; } }
.recap { background: var(--paper); border-radius: var(--r); padding: 14px 16px; margin-top: 16px; }
.recap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recap li { display: flex; justify-content: space-between; gap: 12px; }
.recap .tot { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-weight: 700; }
.ord .field > label .opt { color: var(--muted); font-weight: 400; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }

/* ---------- Pilotage ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 28px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi { background: var(--paper); border-radius: var(--r); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .k { font-size: 0.8125rem; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--blue); font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 0.9375rem; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi .s { font-size: 0.8125rem; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 4px 12px; align-items: center; padding: 5px 0; }
.hbar .trk { height: 18px; background: var(--paper-2); border-radius: 3px; position: relative; }
.hbar .fill { height: 100%; background: var(--blue); border-radius: 3px; min-width: 2px; }
.hbar .fill.alt { background: var(--yellow); }
.hbar .val { font-weight: 700; font-size: 0.875rem; text-align: right; min-width: 30px; white-space: nowrap; }
.hbar .val em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 6px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.chart .bar { fill: var(--blue); }
.chart .bar:hover { fill: var(--yellow); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.fb { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 6px; }
.fb:first-child { border-top: 0; }
.fb-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--muted); font-size: 0.8125rem; }
.fb-msg { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; }
.act { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.timeline .t { color: var(--muted); }
.timeline code { overflow-wrap: anywhere; color: var(--muted); }

@media print { .site-head, .site-foot { display: none; } }

/* Local development: one-click test accounts on the login page */
.dev-panel { margin-top: 28px; padding: 16px; border: 2px dashed var(--line-strong); border-radius: 12px; display: grid; gap: 8px; }
.dev-panel h2 { font-size: 1rem; margin: 0; }
.dev-panel p { margin: 0 0 4px; font-size: .9rem; }
.dev-panel .btn { white-space: normal; height: auto; min-height: var(--tap); padding: 8px 14px; justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }

/* ---------- V1.9: blue top band on phones, one-field start ---------- */
@media (max-width: 959px) {
  .auth-main { padding: 0 0 56px; }
  .auth-top { max-width: none; margin-bottom: 36px; padding: max(12px, env(safe-area-inset-top)) 20px 12px; background: var(--blue); min-height: 64px; }
  .auth-top .brand img { filter: brightness(0) invert(1); }
  .auth-top .langsw button { color: rgba(244, 239, 229, 0.72); }
  .auth-top .langsw button[aria-pressed="true"], .auth-top .langsw button:hover { color: var(--cream); text-decoration-color: var(--yellow); }
  .auth-card { padding: 0 20px; }
}
.input-big { min-height: 62px !important; font-size: 1.25rem !important; font-weight: 600; }
#start-form .btn-lg { min-height: 58px; font-size: 1.125rem; gap: 8px; }
.start-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; color: var(--charcoal); }
.start-points li { display: flex; align-items: center; gap: 10px; }
.start-points .ic { width: 20px; height: 20px; color: var(--ok); flex: 0 0 auto; }

/* Invitation page: e-mail already known, only a password to choose */
.join-who { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 12px 14px; border-radius: var(--r); background: var(--blue-soft); color: var(--charcoal); font-weight: 600; overflow-wrap: anywhere; }
.join-who .ic { width: 20px; height: 20px; color: var(--blue); flex: 0 0 auto; }
.join-terms { margin: 16px 0 0; color: var(--muted); font-size: 0.9375rem; }
.join-terms a { color: inherit; }
