/* Page de la préversion de mask. Polices système uniquement : aucune ressource tierce. */
:root {
  --marine: #0d1f40;
  --cyan: #00b4d8;
  --cyan-pale: #e3f6fb;
  --fond: #ffffff;
  --texte: #0d1f40;
  --discret: #4a5670;
  --ligne: #d5dbe5;
  --alerte: #fff4e0;
  --alerte-bord: #b26a00;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.largeur { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1 { margin: 0; font-size: 1.6rem; letter-spacing: 0.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; padding-bottom: 4px; border-bottom: 2px solid var(--cyan); }
h3 { font-size: 1rem; margin: 0 0 0.4rem; }
a { color: var(--marine); text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.entete { background: var(--marine); color: #fff; padding: 20px 0 16px; }
.sous-titre { margin: 4px 0 0; color: #cfe9f2; }

/* Bandeau toujours visible */
.bandeau { position: sticky; top: 0; z-index: 10; background: var(--cyan-pale); border-bottom: 3px solid var(--cyan); }
.bandeau p { margin: 0 auto; padding-top: 10px; padding-bottom: 10px; font-size: 0.95rem; }

.alerte { background: var(--alerte); border-left: 4px solid var(--alerte-bord); padding: 8px 12px; margin-top: 16px; }
.alerte ul { margin: 0; padding-left: 1.2em; }

textarea { width: 100%; min-height: 14rem; padding: 10px; font: 0.95rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--texte); border: 1px solid var(--ligne); border-radius: 6px; resize: vertical; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
button { font: inherit; padding: 8px 14px; border-radius: 6px; border: 2px solid var(--marine); background: var(--marine); color: #fff; cursor: pointer; }
button.secondaire { background: #fff; color: var(--marine); }
button:disabled { background: #e6e9ef; border-color: #c4cad6; color: #6b7487; cursor: not-allowed; }

.etat { color: var(--discret); margin: 0.4rem 0; }
.note { color: var(--discret); font-size: 0.9rem; }
.explication { margin: 0.4rem 0 0.6rem; padding: 8px 12px; background: var(--cyan-pale); border-left: 4px solid var(--cyan); font-size: 0.93rem; }

.apercu, .sortie { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.92rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--ligne); border-radius: 6px; padding: 12px; margin: 8px 0; max-height: 32rem; overflow: auto; background: #fbfcfd; }
.modele { margin-top: 12px; }
progress { display: block; width: 100%; max-width: 480px; height: 14px; margin-top: 10px; accent-color: var(--cyan); }

.legende { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.85rem; white-space: nowrap; }

/* Catégories : fond pâle et soulignement foncé (la couleur n'est pas le seul repère : infobulle et pastille). */
mark { color: inherit; border-radius: 3px; padding: 0 1px; border-bottom: 2px solid; }
.c-PERSONNE { background: #ffe58f; border-color: #a77b00; }
.c-ORGANISATION { background: #bfe9f5; border-color: #00708a; }
.c-LIEU { background: #c9efc4; border-color: #2f7a28; }
.c-ADRESSE { background: #e4d6f7; border-color: #6a3fa8; }
.c-IBAN, .c-NIR, .c-SIREN, .c-SIRET, .c-TVA_INTRA, .c-CARTE { background: #ffd3c4; border-color: #b0451f; }
.c-EMAIL, .c-TELEPHONE { background: #f9d4e9; border-color: #a3326f; }
.c-NUMERO_DOSSIER { background: #e1e5ec; border-color: #56607a; }
.c-DIVERS { background: #f1e7c9; border-color: #85702d; }
.pastille[class*="c-"] { border-bottom: 2px solid; }
mark.ecarte { background: transparent; border-bottom-style: dashed; }

.defile { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--ligne); }
th { background: #f2f5f9; }
td.centre { text-align: center; }
td input[type="checkbox"], .confirmation input { width: 1.15rem; height: 1.15rem; accent-color: var(--marine); vertical-align: -0.2rem; }
code { font: 0.88rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--cyan-pale); padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
td { overflow-wrap: anywhere; }
.mobile-seul { display: none; }

.resultat { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.correspondance { border: 1px solid var(--ligne); border-radius: 6px; padding: 12px; margin-top: 8px; }
.confirmation { margin: 10px 0 0; font-weight: 600; }

.limites ul { padding-left: 1.2em; }
.limites li { margin: 0.35rem 0; }

.pied { margin-top: 3rem; padding: 16px 0 24px; background: var(--marine); color: #fff; }
.pied a { color: #fff; }

@media (max-width: 760px) {
  body { font-size: 15px; }
  h1 { font-size: 1.35rem; }
  .bandeau p { font-size: 0.82rem; padding-top: 6px; padding-bottom: 6px; }
  .resultat { grid-template-columns: minmax(0, 1fr); }
  /* Remplacements en fiches : texte d'origine sur toute la largeur, puis catégorie, pseudonyme, garder. */
  #remplacements thead { display: none; }
  #remplacements tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
  #remplacements td { display: block; padding: 0; border: 0; }
  #remplacements td:first-child { grid-column: 1 / -1; font-weight: 600; }
  #remplacements td.trouve-par { grid-column: 1 / -1; order: 1; color: var(--discret); font-size: 0.88rem; }
  .mobile-seul { display: inline; }
  .apercu, .sortie { max-height: 22rem; }
}
.chargement { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 10px; }
.chargement .annonce { margin: 0; font-size: 0.93rem; }
.chargement progress { margin-top: 0; }
