/* ============================================================
   Parafe — Design System (maquette / draft)
   Direction : « étude notariale moderne » — confiance + waouh
   Thème clair seul, tokens prêts pour un thème sombre ultérieur.
   CSS écrit à la main, conventions BEM (préfixe .pf-).
   ============================================================ */

/* ---------- Polices auto-hébergées (OFL) — RGPD : pas de Google CDN ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-italic.woff2') format('woff2-variations');
}

/* ---------- Tokens ---------- */
:root {
  /* Marque — vert-pétrole / émeraude + accent or « sceau » */
  --pf-petrole-900: #0a2b2c;
  --pf-petrole-800: #0f3d3e;
  --pf-petrole-700: #14504f;
  --pf-emeraude-600: #1b7a6e;
  --pf-emeraude-500: #229a87;
  --pf-or-500: #c9a86a;
  --pf-or-300: #e6d2a8;

  /* Neutres */
  --pf-ink: #16221f;
  --pf-ink-soft: #46514e;
  --pf-ink-faint: #6f7a76;
  --pf-line: #e3e8e5;
  --pf-surface: #ffffff;
  --pf-bg: #f4f7f5;

  /* États */
  --pf-success: #2e7d5b;
  --pf-alert: #b23a2e;

  /* Rôles sémantiques */
  --pf-text: var(--pf-ink);
  --pf-text-muted: var(--pf-ink-soft);
  --pf-accent: var(--pf-emeraude-600);

  /* Rayons */
  --pf-r-sm: 8px;
  --pf-r-md: 14px;
  --pf-r-lg: 22px;
  --pf-r-pill: 999px;

  /* Ombres douces multi-couches */
  --pf-shadow-sm: 0 1px 2px rgba(15, 61, 62, .06), 0 2px 6px rgba(15, 61, 62, .05);
  --pf-shadow-md: 0 6px 16px rgba(15, 61, 62, .08), 0 2px 6px rgba(15, 61, 62, .05);
  --pf-shadow-lg: 0 18px 48px rgba(10, 43, 44, .16), 0 6px 16px rgba(10, 43, 44, .08);
  --pf-shadow-xl: 0 40px 80px -20px rgba(10, 43, 44, .35);

  /* Typo */
  --pf-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --pf-font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Rythme */
  --pf-space: 8px;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--pf-font-sans);
  color: var(--pf-text);
  background: var(--pf-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--pf-font-serif); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
p { margin: 0; }
a { color: var(--pf-accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

/* ---------- Fond ambiant ---------- */
.pf-page {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(1100px 620px at 92% -12%, rgba(27, 122, 110, .22), transparent 58%),
    radial-gradient(760px 520px at -8% 112%, rgba(201, 168, 106, .20), transparent 55%),
    radial-gradient(900px 900px at 50% -40%, rgba(15, 61, 62, .05), transparent 60%),
    linear-gradient(180deg, #eef3f0, var(--pf-bg) 30%);
}
.pf-page::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(15, 61, 62, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 61, 62, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(800px 500px at 80% 0%, #000, transparent 70%);
          mask-image: radial-gradient(800px 500px at 80% 0%, #000, transparent 70%);
}

/* ============================================================
   En-tête / marque
   ============================================================ */
.pf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
}
.pf-brand { display: flex; align-items: center; gap: 12px; }
.pf-brand__seal { filter: drop-shadow(0 4px 10px rgba(15, 61, 62, .18)); }
.pf-brand__name {
  font-family: var(--pf-font-serif);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -.02em;
  color: var(--pf-petrole-800);
}
.pf-brand__name b { color: var(--pf-emeraude-600); font-weight: 600; }
.pf-header__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--pf-ink-faint);
}
.pf-chip-secure {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  background: var(--pf-surface);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-pill);
  box-shadow: var(--pf-shadow-sm);
  font-weight: 500; color: var(--pf-ink-soft);
}
.pf-chip-secure svg { color: var(--pf-emeraude-600); }

/* ============================================================
   Hero / vitrine signataire
   ============================================================ */
.pf-hero {
  max-width: 1180px;
  margin: clamp(16px, 4vw, 40px) auto 0;
  padding: 0 clamp(20px, 5vw, 56px) 64px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .pf-hero { grid-template-columns: 1fr; } }

.pf-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px; font-weight: 600;
  color: var(--pf-emeraude-600);
  margin-bottom: 22px;
}
.pf-hero__eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--pf-or-500);
}
.pf-hero__title {
  font-size: clamp(38px, 5.2vw, 60px);
  color: var(--pf-petrole-900);
  margin-bottom: 20px;
}
.pf-hero__title em {
  font-style: italic;
  color: var(--pf-emeraude-600);
}
.pf-hero__lead {
  font-size: 18px;
  color: var(--pf-ink-soft);
  max-width: 30em;
  margin-bottom: 32px;
}
.pf-hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pf-hero__note {
  font-size: 13px; color: var(--pf-ink-faint);
  display: flex; align-items: center; gap: 7px;
}

/* ---------- Boutons ---------- */
.pf-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: var(--pf-r-pill);
  font-size: 15px; font-weight: 600;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.pf-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--pf-emeraude-500), var(--pf-emeraude-600));
  box-shadow: 0 10px 24px -8px rgba(27, 122, 110, .65), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.pf-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(27, 122, 110, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.pf-btn--ghost {
  color: var(--pf-petrole-800);
  background: var(--pf-surface);
  border-color: var(--pf-line);
  box-shadow: var(--pf-shadow-sm);
}
.pf-btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--pf-shadow-md); }

/* ============================================================
   Carte document (le PDF à signer, mise en valeur)
   ============================================================ */
.pf-doccard {
  position: relative;
  background: var(--pf-surface);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-lg);
  padding: 26px;
  transform: rotate(1.4deg);
  transition: transform .35s ease, box-shadow .35s ease;
  box-shadow:
    14px 16px 0 -3px #ffffff, 14px 16px 0 -2px var(--pf-line),
    28px 34px 0 -6px #ffffff, 28px 34px 0 -5px var(--pf-line),
    var(--pf-shadow-xl);
}
.pf-doccard:hover { transform: rotate(0deg) translateY(-4px); }
.pf-doccard::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(201, 168, 106, .6), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.pf-doccard__preview {
  position: relative;
  aspect-ratio: 1 / 1.32;
  border-radius: var(--pf-r-md);
  background: linear-gradient(180deg, #fff, #fbfcfb);
  border: 1px solid var(--pf-line);
  overflow: hidden;
  padding: 30px 30px 0;
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(15, 61, 62, .06);
}
.pf-doc__kicker {
  font-size: 9px; font-weight: 700; letter-spacing: .22em;
  color: var(--pf-or-500); text-align: center; margin-bottom: 8px;
}
.pf-doc__h {
  font-family: var(--pf-font-serif); font-weight: 600;
  font-size: 15px; color: var(--pf-petrole-900);
  text-align: center; line-height: 1.25; margin-bottom: 6px;
}
.pf-doc__sub {
  font-size: 8.5px; color: var(--pf-ink-faint);
  text-align: center; margin-bottom: 18px;
}
.pf-doc__sep { height: 1px; background: var(--pf-line); margin: 0 6px 16px; }
.pf-doc__p { margin-bottom: 14px; }
.pf-doc__p i {
  display: block; height: 6px; border-radius: 3px;
  background: #eef2f0; margin-bottom: 7px;
}
.pf-doccard__sigfield {
  position: absolute; left: 30px; bottom: 30px;
  width: 200px; height: 70px;
  border: 1.5px dashed var(--pf-emeraude-500);
  border-radius: 10px;
  background: rgba(34, 154, 135, .06);
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  color: var(--pf-emeraude-600); font-size: 12px; font-weight: 600;
  letter-spacing: .04em;
}
.pf-doccard__meta { margin-top: 22px; }
.pf-doccard__title {
  font-family: var(--pf-font-serif); font-size: 21px; font-weight: 600;
  color: var(--pf-petrole-900); margin-bottom: 10px;
}
.pf-doccard__row {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--pf-ink-soft); margin-top: 8px;
}
.pf-doccard__row svg { color: var(--pf-ink-faint); flex: none; }
.pf-doccard__row b { color: var(--pf-ink); font-weight: 600; }

.pf-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--pf-r-pill);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.pf-badge--wait { background: rgba(201, 168, 106, .15); color: #8a6d2f; }
.pf-badge--wait::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pf-or-500); }

/* ============================================================
   Bandeau de réassurance
   ============================================================ */
.pf-trust {
  border-top: 1px solid var(--pf-line);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(6px);
}
.pf-trust__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 26px clamp(20px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 700px) { .pf-trust__inner { grid-template-columns: 1fr; } }
.pf-trust__item { display: flex; align-items: flex-start; gap: 14px; }
.pf-trust__ic {
  flex: none; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(34,154,135,.14), rgba(15,61,62,.06));
  color: var(--pf-emeraude-600);
  box-shadow: inset 0 0 0 1px rgba(27,122,110,.18);
}
.pf-trust__t { font-weight: 600; color: var(--pf-ink); font-size: 14px; }
.pf-trust__d { font-size: 13px; color: var(--pf-ink-faint); }

/* ============================================================
   Layout focalisé (parcours signataire : OTP / consentement / fin)
   ============================================================ */
.pf-center {
  min-height: calc(100vh - 86px);
  display: grid; place-items: center;
  padding: 32px 20px 72px;
}
.pf-panel {
  width: min(540px, 100%);
  min-width: 0; /* item flex/grid : autorise le rétrécissement sous le contenu (cases OTP) */
  background: var(--pf-surface);
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-lg);
  box-shadow: var(--pf-shadow-lg);
  padding: clamp(28px, 5vw, 46px);
  position: relative;
  text-align: center;
}
.pf-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(201,168,106,.5), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.pf-medal {
  width: 72px; height: 72px; margin: 0 auto 22px;
  border-radius: var(--pf-r-pill);
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--pf-petrole-700), var(--pf-petrole-900));
  box-shadow: 0 14px 30px -8px rgba(10,43,44,.5), inset 0 0 0 1px rgba(201,168,106,.45);
  color: #fff;
}
.pf-medal--success { background: linear-gradient(160deg, var(--pf-emeraude-500), var(--pf-petrole-800)); }
.pf-panel__eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: 11px;
  font-weight: 700; color: var(--pf-emeraude-600); margin-bottom: 12px;
}
.pf-panel__title {
  font-size: clamp(24px, 3.4vw, 31px); color: var(--pf-petrole-900); margin-bottom: 12px;
}
.pf-panel__lead { color: var(--pf-ink-soft); font-size: 15.5px; margin: 0 auto 28px; max-width: 34em; }
.pf-panel__lead b { color: var(--pf-ink); }
.pf-panel__foot { margin-top: 22px; font-size: 13.5px; color: var(--pf-ink-faint); }
.pf-panel .pf-btn { width: 100%; justify-content: center; }

/* ---------- Champs OTP ---------- */
.pf-otp { display: flex; gap: clamp(7px, 2vw, 12px); justify-content: center; margin-bottom: 28px; }
.pf-otp input {
  flex: 1 1 0; min-width: 0; max-width: 56px; height: clamp(54px, 16vw, 68px);
  text-align: center; font-family: var(--pf-font-serif);
  font-size: 27px; font-weight: 600; color: var(--pf-petrole-900);
  background: var(--pf-bg);
  border: 1.5px solid var(--pf-line); border-radius: var(--pf-r-md);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.pf-otp input:focus, .pf-otp input.is-filled {
  border-color: var(--pf-emeraude-500); background: #fff;
  box-shadow: 0 0 0 4px rgba(34,154,135,.14);
}

/* ---------- Récap document inline ---------- */
.pf-docmini {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px; border: 1px solid var(--pf-line); border-radius: var(--pf-r-md);
  background: var(--pf-bg); margin-bottom: 24px;
}
.pf-docmini__ic {
  flex: none; width: 44px; height: 54px; border-radius: 7px;
  background: linear-gradient(180deg,#fff,#f3f6f4); border: 1px solid var(--pf-line);
  display: grid; place-items: center; color: var(--pf-emeraude-600);
  box-shadow: var(--pf-shadow-sm);
}
.pf-docmini__t { font-weight: 600; color: var(--pf-ink); font-size: 15px; }
.pf-docmini__d { font-size: 13px; color: var(--pf-ink-faint); margin-top: 2px; }

/* ---------- Case à cocher consentement ---------- */
.pf-check {
  display: flex; gap: 13px; text-align: left; align-items: flex-start;
  padding: 16px 18px; border: 1px solid var(--pf-line); border-radius: var(--pf-r-md);
  background: #fff; cursor: pointer; margin-bottom: 24px;
  transition: border-color .15s, box-shadow .15s;
}
.pf-check:has(input:checked) { border-color: var(--pf-emeraude-500); box-shadow: 0 0 0 3px rgba(34,154,135,.1); }
.pf-check input { position: absolute; opacity: 0; }
.pf-check__box {
  flex: none; width: 22px; height: 22px; border-radius: 6px; margin-top: 1px;
  border: 1.5px solid var(--pf-ink-faint); display: grid; place-items: center;
  color: #fff; transition: background .15s, border-color .15s;
}
.pf-check input:checked + .pf-check__box { background: var(--pf-emeraude-600); border-color: var(--pf-emeraude-600); }
.pf-check input:checked + .pf-check__box svg { opacity: 1; }
.pf-check__box svg { opacity: 0; transition: opacity .15s; }
.pf-check__txt { font-size: 14px; color: var(--pf-ink-soft); line-height: 1.5; }
.pf-check__txt b { color: var(--pf-ink); font-weight: 600; }

/* ---------- Signature manuscrite simulée ---------- */
.pf-sigpreview {
  border: 1.5px dashed var(--pf-emeraude-500); border-radius: var(--pf-r-md);
  background: rgba(34,154,135,.05); padding: 18px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center; min-height: 96px;
  color: var(--pf-petrole-800);
}
.pf-sigpreview svg { width: 170px; height: auto; }

/* ---------- Liens de téléchargement (fin) ---------- */
.pf-downloads { display: grid; gap: 12px; margin-bottom: 8px; }
.pf-download {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 15px 18px; border: 1px solid var(--pf-line); border-radius: var(--pf-r-md);
  background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pf-download:hover { transform: translateY(-2px); box-shadow: var(--pf-shadow-md); border-color: var(--pf-emeraude-500); }
.pf-download__ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(34,154,135,.14), rgba(15,61,62,.06)); color: var(--pf-emeraude-600); }
.pf-download__t { font-weight: 600; color: var(--pf-ink); font-size: 14.5px; }
.pf-download__d { font-size: 12.5px; color: var(--pf-ink-faint); }
.pf-download__arrow { margin-left: auto; color: var(--pf-ink-faint); }

/* ============================================================
   Application émetteur — barre d'app, conteneur, cartes, formulaires
   ============================================================ */
.pf-appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 40px);
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pf-line);
}
.pf-appbar__actions { display: flex; align-items: center; gap: 14px; }
.pf-appbar__link { font-size: 14px; font-weight: 500; color: var(--pf-ink-soft); text-decoration: none; }
.pf-appbar__link:hover { color: var(--pf-emeraude-600); }
@media (max-width: 560px) {
  .pf-appbar { padding-left: 16px; padding-right: 16px; }
  .pf-appbar__actions { gap: 12px; }
  .pf-appbar__link { display: none; }
}
.pf-avatar {
  width: 38px; height: 38px; border-radius: var(--pf-r-pill);
  background: linear-gradient(160deg, var(--pf-emeraude-500), var(--pf-petrole-800));
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px;
  box-shadow: var(--pf-shadow-sm);
}
.pf-wrap { max-width: 960px; margin: 0 auto; padding: clamp(28px, 5vw, 52px) clamp(18px, 4vw, 40px) 80px; }
.pf-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.pf-pagehead__eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 11px; font-weight: 700; color: var(--pf-emeraude-600); margin-bottom: 10px; }
.pf-pagehead h1 { font-size: clamp(28px, 4vw, 40px); color: var(--pf-petrole-900); }
.pf-pagehead p { color: var(--pf-ink-faint); margin-top: 6px; }

.pf-card {
  background: var(--pf-surface); border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-lg); box-shadow: var(--pf-shadow-md);
  padding: clamp(22px, 3vw, 32px);
}
.pf-card + .pf-card { margin-top: 22px; }
.pf-card__title { font-size: 19px; color: var(--pf-petrole-900); margin-bottom: 4px; }
.pf-card__sub { font-size: 13.5px; color: var(--pf-ink-faint); margin-bottom: 22px; }

/* Formulaires */
.pf-field { margin-bottom: 20px; }
.pf-field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .pf-field--row { grid-template-columns: 1fr; } }
.pf-label { display: block; font-size: 13px; font-weight: 600; color: var(--pf-ink-soft); margin-bottom: 8px; }
.pf-input, .pf-textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 15px;
  color: var(--pf-ink); background: #fff;
  border: 1.5px solid var(--pf-line); border-radius: var(--pf-r-md);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.pf-input:focus, .pf-textarea:focus { border-color: var(--pf-emeraude-500); box-shadow: 0 0 0 4px rgba(34,154,135,.13); }
.pf-input::placeholder { color: #aeb6b2; }
.pf-help { font-size: 12.5px; color: var(--pf-ink-faint); margin-top: 7px; }
.pf-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

/* Dropzone */
.pf-dropzone {
  border: 2px dashed #c6d3ce; border-radius: var(--pf-r-md);
  background: linear-gradient(180deg, rgba(34,154,135,.04), rgba(34,154,135,.015));
  padding: 38px 24px; text-align: center; transition: border-color .15s, background .15s;
}
.pf-dropzone:hover { border-color: var(--pf-emeraude-500); }
.pf-dropzone__ic { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 16px;
  display: grid; place-items: center; color: var(--pf-emeraude-600);
  background: #fff; box-shadow: var(--pf-shadow-sm); }
.pf-dropzone__t { font-family: var(--pf-font-serif); font-size: 19px; color: var(--pf-petrole-900); margin-bottom: 6px; }
.pf-dropzone__d { font-size: 13.5px; color: var(--pf-ink-faint); margin-bottom: 18px; }
.pf-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-md); background: #fff; }
.pf-file__ic { flex: none; width: 40px; height: 48px; border-radius: 7px; display: grid; place-items: center;
  color: var(--pf-emeraude-600); background: linear-gradient(180deg,#fff,#f3f6f4); border: 1px solid var(--pf-line); }
.pf-file__t { font-weight: 600; font-size: 14.5px; color: var(--pf-ink); }
.pf-file__d { font-size: 12.5px; color: var(--pf-ink-faint); }
.pf-file__x { margin-left: auto; color: var(--pf-ink-faint); background: none; border: none; padding: 6px; }

/* Badges de statut */
.pf-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: var(--pf-r-pill); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.pf-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.pf-status--draft { background: rgba(201,168,106,.16); color: #8a6d2f; }
.pf-status--draft::before { background: var(--pf-or-500); }
.pf-status--sent { background: rgba(34,154,135,.14); color: #14635a; }
.pf-status--sent::before { background: var(--pf-emeraude-500); }
.pf-status--signed { background: rgba(46,125,91,.15); color: #1f6043; }
.pf-status--signed::before { background: var(--pf-success); }

/* Journal d'audit (timeline) */
.pf-timeline { margin-top: 4px; }
.pf-tl { display: grid; grid-template-columns: 26px 1fr; gap: 16px; }
.pf-tl__rail { display: flex; flex-direction: column; align-items: center; }
.pf-tl__dot { width: 13px; height: 13px; border-radius: 50%; background: #fff;
  border: 2px solid var(--pf-emeraude-500); margin-top: 4px; flex: none; }
.pf-tl__dot--done { background: var(--pf-emeraude-500); }
.pf-tl__dot--seal { border-color: var(--pf-or-500); background: var(--pf-or-500); }
.pf-tl__line { flex: 1; width: 2px; background: var(--pf-line); margin: 5px 0; }
.pf-tl:last-child .pf-tl__line { display: none; }
.pf-tl__body { padding-bottom: 22px; }
.pf-tl__t { font-weight: 600; color: var(--pf-ink); font-size: 14.5px; }
.pf-tl__d { font-size: 12.5px; color: var(--pf-ink-faint); margin-top: 2px; }

/* ============================================================
   Editeur de placement (3 zones)
   ============================================================ */
.pf-editor { display: flex; flex-direction: column; height: 100vh; background: var(--pf-bg); }
.pf-editor__bar { flex: none; height: 66px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: #fff; border-bottom: 1px solid var(--pf-line); box-shadow: var(--pf-shadow-sm); z-index: 5; }
.pf-editor__group { display: flex; align-items: center; gap: 14px; }
.pf-iconbtn { width: 40px; height: 40px; border-radius: var(--pf-r-pill); border: 1px solid var(--pf-line);
  background: #fff; display: grid; place-items: center; color: var(--pf-petrole-800); transition: background .15s; }
.pf-iconbtn:hover { background: var(--pf-bg); }
.pf-editor__title { font-family: var(--pf-font-serif); font-weight: 600; font-size: 18px; color: var(--pf-petrole-900); }
.pf-editor__body { flex: 1; display: grid; grid-template-columns: 304px 1fr; overflow: hidden; }
.pf-editor__aside { border-right: 1px solid var(--pf-line); background: #fff; padding: 22px; overflow: auto; }
.pf-aside__label { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 700;
  color: var(--pf-ink-faint); margin-bottom: 14px; }
.pf-tool { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-md); background: #fff; cursor: grab; box-shadow: var(--pf-shadow-sm);
  transition: border-color .15s, transform .15s, box-shadow .15s; }
.pf-tool:hover { border-color: var(--pf-emeraude-500); transform: translateY(-1px); box-shadow: var(--pf-shadow-md); }
.pf-tool__ic { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  color: var(--pf-emeraude-600); background: linear-gradient(160deg, rgba(34,154,135,.15), rgba(15,61,62,.06));
  box-shadow: inset 0 0 0 1px rgba(27,122,110,.18); }
.pf-tool__t { font-weight: 600; font-size: 14.5px; color: var(--pf-ink); }
.pf-tool__d { font-size: 12px; color: var(--pf-ink-faint); margin-top: 1px; }
.pf-hint { margin-top: 18px; padding: 14px; border-radius: var(--pf-r-md); background: var(--pf-bg);
  border: 1px solid var(--pf-line); font-size: 12.5px; color: var(--pf-ink-soft); line-height: 1.55; }
.pf-hint b { color: var(--pf-petrole-800); }
.pf-hint__row { display: flex; gap: 9px; align-items: flex-start; }
.pf-hint__row + .pf-hint__row { margin-top: 9px; }
.pf-hint svg { flex: none; color: var(--pf-emeraude-600); margin-top: 1px; }

.pf-stagewrap { overflow: auto; display: grid; place-items: center; padding: 34px;
  background:
    radial-gradient(circle at 1px 1px, rgba(15,61,62,.06) 1px, transparent 0) 0 0 / 22px 22px,
    var(--pf-bg); }
.pf-pdfpage { position: relative; width: 470px; aspect-ratio: 1 / 1.414; background: #fff;
  border: 1px solid var(--pf-line); box-shadow: var(--pf-shadow-lg); padding: 44px 42px; }
.pf-pdfpage__kicker { font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--pf-or-500); text-align: center; }
.pf-pdfpage__h { font-family: var(--pf-font-serif); font-size: 21px; font-weight: 600; color: var(--pf-petrole-900);
  text-align: center; margin: 8px 0 6px; }
.pf-pdfpage__sub { font-size: 11px; color: var(--pf-ink-faint); text-align: center; margin-bottom: 26px; }
.pf-pdfpage__sep { height: 1px; background: var(--pf-line); margin: 0 0 22px; }
.pf-pdfpage__p { margin-bottom: 20px; }
.pf-pdfpage__p i { display: block; height: 7px; border-radius: 3px; background: #eef2f0; margin-bottom: 9px; }
.pf-sigplaced { position: absolute; left: 42px; bottom: 70px; width: 210px; height: 76px;
  border: 2px solid var(--pf-emeraude-500); border-radius: 8px; background: rgba(34,154,135,.08);
  display: grid; place-items: center; gap: 4px; cursor: move;
  box-shadow: 0 8px 20px -6px rgba(27,122,110,.4); }
.pf-sigplaced__label { font-size: 11px; font-weight: 600; color: var(--pf-emeraude-600); letter-spacing: .03em;
  display: flex; align-items: center; gap: 6px; }
.pf-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 2px solid var(--pf-emeraude-500); border-radius: 2px; }
.pf-handle--tl { top: -6px; left: -6px; } .pf-handle--tr { top: -6px; right: -6px; }
.pf-handle--bl { bottom: -6px; left: -6px; } .pf-handle--br { bottom: -6px; right: -6px; }
.pf-editor__pagebar { flex: none; height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; border-top: 1px solid var(--pf-line); }
.pf-pagebar__btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--pf-line); background: #fff;
  display: grid; place-items: center; color: var(--pf-petrole-800); }
.pf-pagebar__btn:hover { background: var(--pf-bg); }
.pf-pagebar__count { font-size: 13px; color: var(--pf-ink-soft); font-weight: 500; padding: 0 10px; }
.pf-pagebar__zoom { font-size: 13px; color: var(--pf-ink-soft); border: 1px solid var(--pf-line); border-radius: 8px;
  padding: 6px 12px; margin-left: 10px; }
.pf-btn--sm { padding: 11px 20px; font-size: 14px; }
.pf-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Rectangle de sélection live (éditeur de placement) ---------- */
/* Position & dimensions pilotées par placement.js (style inline) ; ici, apparence seule. */
.pf-stage { position: relative; display: inline-block; background: #fff;
  border: 1px solid var(--pf-line); box-shadow: var(--pf-shadow-lg); }
.pf-sigsel { position: absolute; display: none; box-sizing: border-box;
  border: 2px solid var(--pf-emeraude-500); background: rgba(34, 154, 135, .12);
  border-radius: 6px; box-shadow: 0 8px 20px -6px rgba(27, 122, 110, .4); }
.pf-sigsel .pf-handle { position: absolute; width: 10px; height: 10px; background: #fff;
  border: 2px solid var(--pf-emeraude-500); border-radius: 2px; }
.pf-sigsel .pf-handle--tl { top: -6px; left: -6px; }
.pf-sigsel .pf-handle--tr { top: -6px; right: -6px; }
.pf-sigsel .pf-handle--bl { bottom: -6px; left: -6px; }
.pf-sigsel .pf-handle--br { bottom: -6px; right: -6px; }
