/* public/assets/app.css — jetons de couleur et essentiels qui doivent exister même sans build Vite.
   Le thème complet (polices auto-hébergées, variables Bootstrap, composants k-*) est dans front/src/theme.css,
   compilé dans assets/build/app.css. Aucune classe Bootstrap n'est définie ici (pas de collision). */
:root {
  --k-paper: #f5f1e8;        /* fond de page, papier chaud (jamais de blanc pur) */
  --k-sheet: #fbf9f4;        /* feuille d'écriture, cartes */
  --k-field: #fffdf9;        /* champs de formulaire */
  --k-ink: #1c1a17;          /* encre */
  --k-ink-2: #3f3a33;        /* texte secondaire */
  --k-muted: #6a635a;        /* texte atténué, AA sur papier */
  --k-line: #ddd6c8;         /* filets */
  --k-line-strong: #b9b0a0;  /* filets et bordures de champ */
  --k-accent: #2f4f78;       /* la seule teinte d'accent : bleu-nuit encre */
  --k-accent-ink: #223a5a;
  --k-accent-tint: #e4eaf2;
  --k-danger: #a63a32;
  /* Les quatre couleurs de provenance, toujours accompagnées d'un libellé */
  --k-author: #2f855a;   --k-author-tint: rgba(47, 133, 90, .15);
  --k-ai-edit: #d4881c;  --k-ai-edit-tint: rgba(212, 136, 28, .2);
  --k-ai-gen: #7452b3;   --k-ai-gen-tint: rgba(116, 82, 179, .18);
  --k-other: #8a847b;    --k-other-tint: rgba(138, 132, 123, .22);
  --k-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --k-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--k-paper); color: var(--k-ink); font-family: var(--k-serif); font-size: 17px; line-height: 1.6; }
.k-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
.k-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Ruban et pastilles de provenance (largeurs posées par app.js depuis data-pct, CSP sans style en ligne) */
.k-prov { display: flex; gap: 2px; height: 12px; background: var(--k-line); overflow: hidden; border-radius: 2px; }
.k-prov__seg { flex: 0 1 0; min-width: 3px; height: 100%; }
.k-prov__seg.is-empty { display: none; }
.k-prov__seg--author { background: var(--k-author); }
.k-prov__seg--ai-edit { background: var(--k-ai-edit); }
.k-prov__seg--ai-gen { background: var(--k-ai-gen); }
.k-prov__seg--other { background: var(--k-other); }
.k-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; }
.k-swatch--author { background: var(--k-author); }
.k-swatch--ai-edit { background: var(--k-ai-edit); }
.k-swatch--ai-gen { background: var(--k-ai-gen); }
.k-swatch--other { background: var(--k-other); }
/* Part grise détaillée (docs/08 v2) : importé (écrit avant l'atelier) distinct du venu d'ailleurs — hachures + libellé */
.k-prov__seg--imported, .k-swatch--imported { background: repeating-linear-gradient(135deg, var(--k-other) 0 3px, #fff 3px 5px); }
/* Attestation : page d'une page et carte de l'accueil (fragment attestation/card.php) */
.k-att { font-family: var(--k-sans); font-size: .95rem; color: var(--k-ink); }
.k-att__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.k-att__label { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; color: var(--k-ink-2); }
.k-att__status { font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; }
.k-att__status--ok { background: var(--k-author-tint); color: #1f6b42; }
.k-att__status--pending { background: var(--k-ai-edit-tint); color: #8a5a10; }
.k-att__work { font-family: var(--k-serif); font-size: 1.45rem; font-weight: 600; line-height: 1.2; margin: 0; }
.k-att__author { color: var(--k-ink-2); margin: .15rem 0 1rem; }
.k-att .k-prov { height: 12px; }
.k-att__sentence { font-weight: 600; margin: .7rem 0 .25rem; line-height: 1.45; }
.k-att__ai { margin: 0 0 .5rem; font-size: .92rem; color: var(--k-ink-2); }
.k-att .k-legend { margin: 0 0 .9rem; font-size: .85rem; }
.k-att__facts { list-style: none; padding: 0; margin: 0 0 .9rem; color: var(--k-ink-2); font-size: .9rem; }
.k-att__facts li { padding: .15rem 0; }
.k-att__declared { color: var(--k-ink); }
.k-att__tag { display: inline-block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--k-line-strong); border-radius: 3px; padding: .05rem .4rem; margin-left: .3rem; color: var(--k-ink-2); vertical-align: middle; }
.k-att__chain { display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border-radius: 6px; background: var(--k-paper); font-size: .88rem; }
.k-att__dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.k-att__dot--ok { background: var(--k-ai-gen); box-shadow: 0 0 0 4px var(--k-ai-gen-tint); }
.k-att__dot--pending { background: var(--k-ai-edit); box-shadow: 0 0 0 4px var(--k-ai-edit-tint); }
.k-att__sig { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-top: .9rem; font-size: .8rem; color: var(--k-ink-2); flex-wrap: wrap; }
.k-att__test { margin: .8rem 0 0; font-size: .8rem; font-weight: 600; color: #8a5a10; }
.k-att__statement { margin: .8rem 0 0; font-size: .82rem; font-style: italic; color: var(--k-ink-2); }
.k-att--compact .k-att__statement { display: none; }
.k-att-sheet { background: var(--k-sheet, #fff); border: 1px solid var(--k-line); border-radius: 6px; padding: 1.75rem 2rem; max-width: 46rem; }
/* Déclaration sur l'honneur (docs/08 v4) */
.k-att__statement-block { margin: 1.1rem 0 .4rem; padding: .9rem 1rem; border: 1px solid var(--k-line); border-radius: 6px; background: var(--k-paper); }
.k-att__stmt-title { font-family: var(--k-serif); font-size: 1.05rem; margin: 0 0 .5rem; }
.k-att__stmt { font-family: var(--k-serif); font-size: .95rem; line-height: 1.55; white-space: pre-wrap; margin: 0 0 .6rem; color: var(--k-ink); }
.k-att__stmt-note, .k-att__stmt-small { font-size: .8rem; color: var(--k-ink-2); margin: 0 0 .5rem; }
.k-statement { margin: 0 0 .8rem; border: 1px solid var(--k-line); border-radius: 6px; padding: .5rem .8rem; background: var(--k-paper); font-family: var(--k-sans); font-size: .92rem; }
.k-statement summary { cursor: pointer; font-weight: 600; }
.k-statement fieldset { border: 0; padding: 0; margin: .6rem 0; }
.k-statement legend { font-size: .9rem; font-weight: 600; padding: 0; margin-bottom: .2rem; }
.k-statement .form-control { margin-top: .3rem; }
.k-statement-form .btn { margin-top: .2rem; }
.k-att-tools { max-width: 46rem; }
.k-legend { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-family: var(--k-sans); font-size: .9rem; }
.k-legend li { display: inline-flex; align-items: center; gap: .45rem; }
/* Messages flash */
.k-flash { font-family: var(--k-sans); background: var(--k-sheet); border: 1px solid var(--k-line); border-left: 3px solid var(--k-accent); padding: .7rem 1rem; margin: 0 0 1.5rem; }
.k-flash--success { border-left-color: var(--k-author); }
.k-flash--danger { border-left-color: var(--k-danger); }
.k-flash--warning { border-left-color: var(--k-ai-edit); }
/* Anti-robot : classes générées par lib/AntiRobot.php */
.ico-ar-table { border-collapse: separate; border-spacing: 6px; margin: 0 auto; }
.ico-ar-cell { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; font-weight: 500; font-size: 1.4rem; border: 1.5px solid var(--k-line-strong); background: var(--k-field); cursor: pointer; user-select: none; }
.ico-ar-cell.selected { background: var(--k-accent); border-color: var(--k-accent); color: #fff; }
/* Surlignage des origines dans l'éditeur (#editor.highlight) */
.k-prose.highlight span[data-origin="typed"], .k-prose.highlight span[data-origin="fix"] { background: var(--k-author-tint); box-shadow: inset 0 -2px 0 var(--k-author); }
.k-prose.highlight span[data-origin="ai_edit"] { background: var(--k-ai-edit-tint); box-shadow: inset 0 -2px 0 var(--k-ai-edit); }
.k-prose.highlight span[data-origin="ai_gen"] { background: var(--k-ai-gen-tint); box-shadow: inset 0 -2px 0 var(--k-ai-gen); }
.k-prose.highlight span[data-origin="pasted"], .k-prose.highlight span[data-origin="imported"], .k-prose.highlight span[data-origin="unknown"] { background: var(--k-other-tint); box-shadow: inset 0 -2px 0 var(--k-other); }
