/* Version en ligne — identité claire (C23), complète market.css. */
/* Product Lab — online mode only (served by the online build, never by the local server). */

/* Signed in: no hero, the problems and trends become the main content. */
body.signed-in .hero { display: none; }
body.signed-in #market-view { padding-top: 18px; }

.account-area { display: flex; align-items: center; gap: 8px; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 14px; max-width: 220px; }
.me-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip:hover { background: var(--surface); }
.avatar.small { width: 30px; height: 30px; font-size: 13px; }
.avatar.big { width: 96px; height: 96px; font-size: 36px; }

/* Authentication dialog. */
.auth-dialog { max-width: 420px; }
.auth-dialog form.account-form { display: flex; flex-direction: column; gap: 14px; }
.auth-dialog input { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; }
.auth-links .link-button, .form-error .link-button { color: var(--accent); font-size: 13px; padding: 0; }
.form-ok { color: var(--accent); font-size: 13px; min-height: 0; }
.form-ok:empty, .auth-dialog .form-error:empty { display: none; }

.btn.danger { border-color: rgba(161, 62, 54, .5); color: var(--down); }
.profile-head.public { display: flex; align-items: center; gap: 20px; margin: 10px 0 24px; }
.profile-head.public h1 { margin-bottom: 6px; }
.online-page select { width: auto; }
.row-actions select { padding: 6px 10px; }

/* Return page of e-mail links. */
.callback { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.callback-card { max-width: 420px; width: 100%; padding: 32px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.callback-card p { color: var(--muted); }

@media (max-width: 720px) {
  .me-chip { max-width: 140px; padding-right: 8px; }
  .account-area .btn { padding: 9px 12px; font-size: 13px; }
  .profile-head.public { flex-direction: column; align-items: flex-start; }
}

/* V1-4 — "Mon travail" (online only) */
.work-page [hidden] { display: none !important; }
.work-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.work-col h3 .weak { font-weight: 400; margin-left: 4px; }
.work-cards { display: grid; gap: 10px; }
.work-cards > li { padding: 0; border: 0; background: none; }
.work-card { display: grid; gap: 6px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.work-card:hover, .work-card:focus-visible { border-color: var(--accent); }
.work-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 4px 0 10px; }
.work-description { max-width: 75ch; }
.where { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.where-block { padding: 12px; margin: 10px 0; }
.work-filters { margin: 8px 0; flex-wrap: wrap; }
.journal { display: grid; gap: 10px; margin: 10px 0 16px; padding: 0; list-style: none; }
.journal .entry { padding: 10px 12px; border-left: 3px solid var(--line-strong); }
.journal .entry.auto { border-left-color: var(--line); opacity: .85; }
.journal .entry p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.final-action { margin-top: 10px; }
.final-action summary { cursor: pointer; font-weight: 600; }
@media (max-width: 1100px) { .work-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .work-board { grid-template-columns: minmax(0, 1fr); } }

/* Progressive work page: one column, same hierarchy on desktop and mobile, few borders, one primary action per zone. */
.work-flow { max-width: 760px; margin: 0 auto; }
.work-flow .wz { padding: 28px 0; border-top: 1px solid var(--line); }
.work-flow .wz h2 { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin: 0 0 14px; }
.work-flow .wz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.work-flow h1 { margin: 10px 0 6px; line-height: 1.2; }
.work-head { padding-bottom: 24px; }
.work-meta { color: var(--muted); margin: 0 0 10px; }
.work-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 0; }
.work-description { max-width: 65ch; line-height: 1.6; margin: 14px 0 8px; }
.work-flow .btn.big { padding: 14px 26px; font-size: 16px; }
.start-zone, .cta-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.timeline { list-style: none; margin: 0 0 18px; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 22px; }
.timeline .entry { position: relative; }
.timeline .entry::before { content: ''; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.timeline .entry.fail::before { background: var(--down); }
.timeline .entry.ai::before { background: var(--accent); }
.entry-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.entry-kind.down { color: var(--down); }
.timeline .entry p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.journal-actions { margin-top: 6px; }
.work-flow .btn.on { border-color: var(--accent); color: var(--accent); }
.composer { display: grid; gap: 12px; margin-top: 14px; padding: 16px; border-radius: 14px; background: var(--surface); }
.composer label { display: grid; gap: 6px; }
.composer textarea, .composer input, .composer select { width: 100%; }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented label { display: inline-flex; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; cursor: pointer; }
.segmented input:checked + span { border-color: var(--accent); color: var(--accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.mini[open] summary { margin-bottom: 10px; }
.history summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.history-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--faint, #606A76); }
.history-list time { margin-right: 6px; }
.work-flow > .history, .work-flow details.history { padding-top: 18px; }
.solution-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.finish-link { margin-top: 12px; font-size: 13px; color: var(--muted); }
.next-zone .row-actions, .start-zone .row-actions { flex-wrap: wrap; }
.final-result { margin: 6px 0; }
.summary-line { font-size: 15px; margin: 6px 0; }
.plain-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.plain-list li { display: grid; gap: 2px; overflow-wrap: anywhere; }
.more-menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.link-button.danger, .btn.danger { color: var(--down); }
.stop-form { margin-top: 14px; }
.work-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg, #FFFFFF); color: var(--ink); }
.work-dialog.wide { width: min(760px, calc(100vw - 32px)); }
.work-dialog::backdrop { background: rgba(29, 53, 87, .55); }
.work-dialog .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.work-dialog .dialog-head h2 { margin: 0; font-size: 18px; }
.work-dialog .card-block { border: 0; padding: 0; background: none; }
@media (max-width: 640px) { .work-flow .wz { padding: 22px 0; } .work-flow .btn.big { width: 100%; } .entry-head { flex-direction: column; gap: 2px; } }
.work-flow .work-error:empty { display: none; }
/* "Confier à une IA": one question, quick choices, then the AI used; everything else under "Options avancées". */
.work-dialog .ai-form { display: grid; gap: 16px; }
.ai-question { margin: 0; font-size: 16px; color: var(--ink); }
.work-dialog .segmented.quick { gap: 8px; }
.work-dialog .segmented.quick span { padding: 8px 14px; font-size: 14px; }
.ai-form .ai-text { display: grid; gap: 6px; }
.ai-form .ai-text textarea { width: 100%; }
.ai-form .ai-used { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.ai-form .ai-used select { width: auto; max-width: 70%; background: transparent; border: 1px solid var(--line); }
.ai-form .mini label { display: grid; gap: 6px; margin-bottom: 10px; }
.ai-form .row-actions { justify-content: flex-end; }
.ai-request summary { color: var(--ink); font-size: 14px; }
.ai-result { white-space: pre-wrap; }
.work-dialog { max-width: none; }
.work-dialog form.space-form { display: grid; gap: 10px; }
.work-dialog .ai-form p { margin-bottom: 0; }
/* V1-5 — pieces of a solution (private) and the Product Lab evaluation: one verdict, one sentence, ✓ / ⚠, the rest folded. */
.attach-zone { display: grid; gap: 10px; }
.attach-title { margin: 0; font-size: 14px; color: var(--ink); }
.dropzone { display: grid !important; gap: 4px; justify-items: center; text-align: center; padding: 18px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; cursor: pointer; color: var(--muted); }
.dropzone u { color: var(--accent); text-decoration: none; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--ink); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.attach-status:empty { display: none; }
.pieces { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.piece { display: flex; align-items: center; gap: 8px; min-width: 0; }
.piece > span:nth-child(2), .piece > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.piece .link-button { padding: 0 6px; font-size: 18px; line-height: 1; }
.add-piece { font-size: 14px; color: var(--accent); }
.pill.good { background: rgba(45, 82, 109, .16); color: #27475F; }
.pill.warn { background: rgba(119, 88, 34, .16); color: #775822; }
.pill.verdict { font-size: 15px; padding: 5px 14px; }
.verdict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.verdict-summary { font-size: 17px; line-height: 1.5; margin: 0 0 12px; max-width: 65ch; }
.verdict-checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.verdict-checks li { display: grid; grid-template-columns: 20px 1fr; line-height: 1.5; overflow-wrap: anywhere; }
.verdict-checks .ok > span:first-child { color: var(--accent); }
.verdict-checks .gap > span:first-child { color: #775822; }
.next-test { margin: 0 0 12px; line-height: 1.5; }
.analysis h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.analysis .claims { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.analysis .claims p { margin: 0; overflow-wrap: anywhere; }
.inputs-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.analysis .objections { margin: 2px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.testing-zone { display: grid; gap: 8px; }
.testing-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; }
.lab-ring.small { width: 22px; height: 22px; flex: none; }
.propose-anyway { margin-top: 14px; display: grid; gap: 10px; }
.notice.propose-anyway { background: rgba(119, 88, 34, .08); border-color: rgba(119, 88, 34, .3); color: var(--ink); }
.propose-anyway p { margin: 0; line-height: 1.5; }
.evaluations .verdict-zone { border-top: 1px solid var(--line); }
@media (max-width: 640px) { .link-row { flex-direction: column; } .link-row .btn { width: 100%; } }
/* "Que doit réussir ta solution ?": one short field first; Product Lab's suggestion is labelled as such. */
.criteria-zone { display: grid; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.criteria-zone .crit-q { font-size: 16px; font-weight: 600; color: var(--ink); }
.criteria-zone textarea::placeholder { color: var(--faint); }
.crit-origin:empty { display: none; }
.crit-origin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.crit-propose { justify-self: start; font-size: 14px; color: var(--accent); }
.criteria-card { margin: 0 0 12px; }
.criteria-card p { margin: 0; }
.criteria-text { white-space: pre-wrap; line-height: 1.5; }
.verdict-checks .no > span:first-child { color: var(--down); }
.criteria-results li > span:last-child { min-width: 0; }
/* "Tâches IA": one calm list (who, what, status ›), then one task at a time. A bottom sheet on phones. */
.tasks-dialog { width: min(520px, calc(100vw - 32px)); padding: 18px 20px 22px; }
.tasks-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 36px; }
.tasks-head h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.tasks-head .task-back { flex: 1; text-align: left; font-size: 15px; color: var(--ink); padding: 6px 0; }
.icon-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.icon-close:hover { background: var(--card); color: var(--ink); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li + li { border-top: 1px solid var(--line); }
.task-row { width: 100%; display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "who state chev" "what state chev";
  align-items: center; column-gap: 12px; row-gap: 2px; padding: 12px 4px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.task-row:hover { background: var(--card); }
.task-who { grid-area: who; font-size: 13px; color: var(--muted); }
.task-what { grid-area: what; font-size: 15px; }
.task-state { grid-area: state; font-size: 13px; color: var(--muted); }
.task-state.is-done { color: var(--accent); }
.task-state.is-failed { color: var(--down); }
.task-chevron { grid-area: chev; font-size: 20px; color: var(--faint); }
.task-detail h2 { margin: 4px 0 16px; font-size: 19px; }
.task-detail h3 { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.task-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.helps { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.helps p { margin: 0 0 8px; }
.helps .btn.on { border-color: var(--accent); color: var(--accent); }
.task-more { position: relative; }
.task-more summary { list-style: none; cursor: pointer; color: var(--muted); padding: 6px 8px; border-radius: 8px; letter-spacing: 1px; }
.task-more summary::-webkit-details-marker { display: none; }
.task-more-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 2; width: min(320px, 80vw); max-height: 60vh; overflow: auto;
  padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; }
.task-more-pop p { margin: 0; }
@media (max-width: 640px) {
  .tasks-dialog { width: 100vw; max-width: 100vw; max-height: 85vh; margin: auto 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0; border-bottom: 0; animation: tasks-up .22s ease-out; }
  .tasks-dialog::before { content: ''; display: block; width: 36px; height: 4px; margin: 0 auto 8px; border-radius: 2px; background: var(--line-strong); }
}
@keyframes tasks-up { from { transform: translateY(40px); opacity: 0; } }

/* Problem Scout (founder only). */
.scout-page h4 { margin: 14px 0 6px; font-size: 14px; }
.scout-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.scout-list .source-link { overflow-wrap: anywhere; word-break: normal; }
.scout-drafts { display: grid; gap: 16px; }
.scout-draft { border-bottom: 1px solid var(--line); padding-bottom: 14px; min-width: 0; }
.scout-draft p { margin: 6px 0; }
.scout-draft .row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.scout-sources-box { margin-top: 10px; }
.scout-sources-box .evidence { margin: 6px 0 0; font-size: 13px; }
.scout-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.scout-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.scout-tile strong { font-size: 24px; line-height: 1.2; }
.scout-tile span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .scout-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.notice.warning { background: rgba(119, 88, 34, .08); border-color: rgba(119, 88, 34, .3); color: #775822; }
.scout-page .notice { margin: 10px 0; }

/* L'usine (Factory C1, private). Four knowledge levels, always the same colours. */
.factory-page { --lv-fact: #224067; --lv-hypothesis: #775822; --lv-simulated: #392757; --lv-unknown: #48576C; }
.factory-sheet { --lv-fact: #224067; --lv-hypothesis: #775822; --lv-simulated: #392757; --lv-unknown: #48576C; }
.factory-bar, .factory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.factory-actions select { width: auto; min-width: 150px; }
.factory-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 10px 0 18px; }
.factory-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  color: inherit; text-decoration: none; min-width: 0; transition: border-color .12s ease, transform .12s ease; }
.factory-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.factory-card.is-stopped { opacity: .65; }
.factory-card h3 { margin: 0; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.factory-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.factory-proof { display: flex; align-items: baseline; gap: 8px; }
.factory-proof strong { font-size: 28px; line-height: 1; }
.factory-proof span { color: var(--muted); font-size: 13px; }
.factory-meter { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); }
.factory-meter span { display: block; height: 100%; }
.factory-meter .lv-fact, .factory-legend .lv-fact, .factory-counts .lv-fact { background: var(--lv-fact); }
.factory-meter .lv-hypothesis, .factory-legend .lv-hypothesis, .factory-counts .lv-hypothesis { background: var(--lv-hypothesis); }
.factory-meter .lv-simulated, .factory-legend .lv-simulated, .factory-counts .lv-simulated { background: var(--lv-simulated); }
.factory-meter .lv-unknown, .factory-legend .lv-unknown, .factory-counts .lv-unknown { background: var(--lv-unknown); }
.factory-meter.empty-meter span { background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.factory-counts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.factory-counts b { color: var(--ink); }
.factory-counts i, .factory-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.factory-stats { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.factory-stats span { padding: 3px 9px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.factory-stats .good { color: var(--accent); border-color: rgba(34, 64, 103, .35); }
.factory-stats .warn { color: #775822; border-color: rgba(119, 88, 34, .35); }
.factory-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.factory-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.factory-head h1 { margin: 8px 0 4px; overflow-wrap: anywhere; }
.factory-summary { display: grid; gap: 10px; margin: 6px 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.factory-block h4 { margin: 14px 0 6px; font-size: 14px; }
.factory-block .rows > li { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.factory-block .rows > li:last-child { border-bottom: 0; }
.factory-block p { margin: 6px 0; }
.factory-claim { border-left: 3px solid var(--line-strong); padding-left: 10px !important; }
.factory-claim.lv-border-fact { border-left-color: var(--lv-fact); }
.factory-claim.lv-border-hypothesis { border-left-color: var(--lv-hypothesis); }
.factory-claim.lv-border-simulated { border-left-color: var(--lv-simulated); }
.factory-claim.lv-border-unknown { border-left-color: var(--lv-unknown); }
.factory-claim-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill.lv-fact { background: rgba(34, 64, 103, .16); color: var(--lv-fact); }
.pill.lv-hypothesis { background: rgba(119, 88, 34, .16); color: var(--lv-hypothesis); }
.pill.lv-simulated { background: rgba(57, 39, 87, .16); color: var(--lv-simulated); }
.pill.lv-unknown { background: rgba(72, 87, 108, .18); color: #224067; }
.pill.fictive { background: rgba(57, 39, 87, .12); color: var(--lv-simulated); border: 1px dashed rgba(57, 39, 87, .5); }
.pill.warn { background: rgba(119, 88, 34, .16); color: #775822; }
.factory-older { margin-top: 8px; font-size: 13px; opacity: .8; }
.factory-sheet { width: min(560px, 94vw); max-height: 90vh; overflow: auto; padding: 18px 20px 22px; border-radius: 16px; background: var(--card);
  color: var(--ink); border: 1px solid var(--line-strong); }
.factory-sheet::backdrop { background: rgba(29, 53, 87, .6); }
.factory-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.factory-sheet-head h2 { margin: 0; font-size: 18px; }
.factory-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.factory-tabs a { padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); text-decoration: none; }
.factory-sheet .factory-tabs a.on, .factory-sheet .factory-tabs a.on:hover { box-shadow: none; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.factory-amount { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.factory-form small.fine { font-size: 12px; }
.factory-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.factory-form .checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.factory-empty { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 14px; display: grid; gap: 10px; justify-items: start; }
@media (max-width: 640px) {
  .factory-cards { grid-template-columns: minmax(0, 1fr); }
  .factory-actions { width: 100%; }
  .factory-actions .btn, .factory-actions select { flex: 1 1 auto; min-height: 44px; }
  .factory-sheet { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .factory-sheet input, .factory-sheet select, .factory-sheet textarea { font-size: 16px; }
  .factory-tabs a { min-height: 36px; display: inline-flex; align-items: center; }
}

/* L'usine — C8: the goal and the three actions (CRÉER, VALIDER, ENVOYER). */
.factory-goal { display: grid; gap: 10px; margin: 14px 0 16px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.factory-goal-head strong { display: block; font-size: 30px; line-height: 1.15; margin: 2px 0; }
.factory-goal-head strong small { font-size: 16px; color: var(--muted); font-weight: 500; }
.factory-goal .goal-meter { height: 10px; }
.factory-goal > p { margin: 0; }
.factory-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.factory-three .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 10px 8px; white-space: normal; text-align: center; text-decoration: none; }
.factory-three .btn b { font-size: 15px; letter-spacing: .06em; }
.factory-three .btn span { font-size: 12px; font-weight: 500; opacity: .85; }
.factory-case-line { margin: 0; font-size: 13px; color: var(--muted); }
.factory-case .factory-case-line { color: var(--ink); font-size: 14px; }
.factory-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 13px; }
.factory-dl dt { color: var(--muted); }
.factory-dl dd { margin: 0; overflow-wrap: anywhere; }
.factory-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.factory-queue-tabs { margin: 6px 0 10px; }
.factory-page h4 a { color: inherit; }
@media (max-width: 640px) {
  .factory-three { gap: 6px; }
  .factory-three .btn { min-height: 60px; padding: 8px 4px; }
  .factory-dl { grid-template-columns: minmax(0, 1fr); }
  .factory-dl dt { margin-top: 4px; }
}

/* L'usine — C8: global watch. */
.factory-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin: 10px 0 18px; }
.factory-signal { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.factory-signal h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.factory-signal p { margin: 0; font-size: 14px; }
.factory-signal details { font-size: 13px; }
.factory-region-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 640px) { .factory-watch { grid-template-columns: minmax(0, 1fr); } }
.factory-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0; }
.factory-goals > div { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.factory-goals p { margin: 4px 0 0; font-size: 20px; }

.factory-nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.factory-nav a { flex: none; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; }
.factory-nav a.on { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
/* C31 — inscription par pseudonyme : champ piège hors écran (jamais affiché, jamais lu), case d'avertissement sur plusieurs lignes. */
.auth-dialog .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-dialog .captcha:not(:empty) { margin: .6rem 0; min-height: 65px; }   /* widget Turnstile (C31) */
.auth-dialog label.check { align-items: flex-start; line-height: 1.4; }
.auth-dialog label.check input { margin-top: 3px; flex: none; }
