/* ============================================================
   Paraphons — 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-emeraude-700: #17685f;  /* texte d'une pastille d'état sur fond clair */
  --pf-emeraude-200: #cfe6e0;  /* liseré d'une pastille d'état */
  --pf-emeraude-50:  #eaf4f1;  /* fond d'une pastille d'état */
  --pf-petrole-600: var(--pf-emeraude-600);
  --pf-petrole-500: var(--pf-emeraude-500);
  --pf-petrole-400: #4aaa9a;
  --pf-or-500: #c9a86a;
  --pf-or-300: #e6d2a8;
  --pf-or-700: #a8874b;        /* or ombré — relief du cachet de cire */
  --pf-ivoire-50: #fdfcf8;     /* ivoire clair — surface de la plaque */
  --pf-ivoire-100: #f6f1e6;    /* ivoire chaud — bas de la plaque */

  /* 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 est AUSSI déclarée dans chrome.css, qui est chargée après :
   toucher à celle-ci ne change donc que les cinq gabarits sans chrome
   (_header.html du tunnel, onboarding, terms_accept, profile_email x2) tant
   que la propriété est redéclarée là-bas — et change TOUT le site sinon.
   Les deux ne fusionnent pas : la chrome ne doit rien devoir à cette feuille
   (voir l'en-tête de chrome.css). Le wordmark, lui, a bien deux classes
   distinctes : .pf-brand__name ici (pétrole, fond clair), .pf-brand__word
   dans la chrome (ivoire, fond sombre). */
.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--danger {
  color: #fff;
  background: linear-gradient(180deg, #c24a3e, var(--pf-alert));
  box-shadow: 0 10px 24px -8px rgba(178, 58, 46, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.pf-btn--danger:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(178, 58, 46, .6), inset 0 1px 0 rgba(255, 255, 255, .22); }
.pf-refuse-link { color: var(--pf-ink-faint); text-decoration: underline; text-underline-offset: 3px; }
.pf-refuse-link:hover { color: var(--pf-alert); }
.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__note { margin: 14px auto 0; max-width: 40em; font-size: 12.5px; line-height: 1.5; color: var(--pf-ink-faint); text-align: center; }
.pf-panel__note a { color: var(--pf-ink-soft); text-decoration: underline; }
.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);
}
/* Code complet : confirmation sobre avant l'envoi automatique (notre vert succès). */
.pf-otp.is-complete input {
  border-color: var(--pf-success); background: #fff;
  box-shadow: 0 0 0 4px rgba(46,125,91,.20);
}

/* ---------- 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; }

/* ---------- 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); }

/* Bouton de retour vers le site de l'intégrateur (API : redirect_url).
   Une seule règle : .pf-panel .pf-btn (l. 407) le rend déjà pleine largeur
   et centré comme les autres boutons du tunnel. */
.pf-panel__back { margin-top: 14px; }

/* ============================================================
   Application émetteur — conteneur, cartes, formulaires
   (la barre vit dans chrome.css depuis le 2026-08-06)
   ============================================================ */
.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); }
.pf-status--declined { background: rgba(178,58,46,.1); color: var(--pf-alert); }
.pf-status--declined::before { background: var(--pf-alert); }

/* 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; }

/* ---------- Éditeur de placement : toutes les pages empilées ---------- */
.pf-stage--multi { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.pf-pagecanvas { position: relative; display: inline-block; background: #fff;
  border: 1px solid var(--pf-line); box-shadow: var(--pf-shadow-lg); }
.pf-pagecanvas canvas { display: block; }
.pf-pagenum { position: absolute; top: -21px; left: 2px; font-size: 11px; font-weight: 600;
  color: var(--pf-ink-faint); letter-spacing: .02em; }

/* ════════════════════════════════════════════════════
   Éditeur de placement — Lot 2
   ════════════════════════════════════════════════════ */

/* ── Palette latérale ── */
.pf-palette {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.pf-palette__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--pf-r-md);
  border: 1.5px solid var(--pf-border, var(--pf-line));
  background: var(--pf-surface);
  cursor: grab;
  user-select: none;
  transition: border-color 120ms, box-shadow 120ms;
}

.pf-palette__item:hover {
  border-color: var(--pf-petrole-600);
  box-shadow: 0 2px 8px -2px rgba(10,43,44,.12);
}

.pf-palette__item:active { cursor: grabbing; }

.pf-palette__ic {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--pf-r-sm);
  background: var(--pf-petrole-50, #e8f4f3);
  color: var(--pf-petrole-700);
}

.pf-palette__info { flex: 1; min-width: 0; }

.pf-palette__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-ink);
  line-height: 1.3;
}

.pf-palette__hint {
  font-size: 11px;
  color: var(--pf-ink-soft);
  line-height: 1.3;
}

/* ── Zone PDF (mono-page) ── */
.pf-stagewrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  padding: 24px;
  background: var(--pf-bg);
}

#pdf-stage {
  position: relative;
  display: inline-block;
  box-shadow: 0 4px 20px -4px rgba(0,0,0,.18);
  line-height: 0;
}

#pdf-stage.pf-drop-active {
  outline: 2px dashed var(--pf-petrole-400);
  outline-offset: 3px;
}

/* ── Barre lecteur ── */
.pf-lecteur {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* padding-left compense la colonne latérale (304px) pour centrer les contrôles sous le document */
  padding: 11px 16px 11px calc(304px + 16px);
  background: var(--pf-surface);
  border-top: 1px solid var(--pf-border, var(--pf-line));
}

.pf-lecteur__btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: var(--pf-r-sm);
  cursor: pointer;
  color: var(--pf-ink);
  transition: background 100ms;
  padding: 0;
}

.pf-lecteur__btn:hover:not(:disabled) { background: var(--pf-petrole-50, #e8f4f3); }
.pf-lecteur__btn:disabled { opacity: .35; cursor: default; }
.pf-lecteur__btn svg { width: 19px; height: 19px; }

.pf-lecteur__page {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
}

.pf-lecteur__input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 1.5px solid var(--pf-border, var(--pf-line));
  border-radius: var(--pf-r-sm);
  font-size: 14px;
  color: var(--pf-ink);
  background: var(--pf-bg);
  -moz-appearance: textfield;
}

.pf-lecteur__input::-webkit-outer-spin-button,
.pf-lecteur__input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pf-lecteur__total { font-size: 14px; color: var(--pf-ink-soft); }

.pf-lecteur__sep {
  width: 1px;
  height: 24px;
  background: var(--pf-border, var(--pf-line));
  margin: 0 6px;
}

.pf-lecteur__zoom {
  font-size: 13.5px;
  color: var(--pf-ink-soft);
  min-width: 48px;
  text-align: center;
}

/* ── Chips (champs placés) ── */
.pf-chip {
  position: absolute;
  min-width: 80px;
  min-height: 30px;
  border: 2px solid var(--pf-petrole-500);
  border-radius: 3px;
  background: rgba(34,154,135,.08);
  box-sizing: border-box;
  touch-action: none;
}

.pf-chip__header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: var(--pf-petrole-500);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: 1px 1px 0 0;
  line-height: 1.4;
  user-select: none;
  cursor: move;
}

.pf-chip__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pf-chip__del {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: none;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.pf-chip__del:hover { background: rgba(255,255,255,.5); }

.pf-chip__label-input {
  font-size: 10px;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  width: 100%;
  min-width: 40px;
  padding: 0 2px;
  cursor: text;
}

.pf-chip__label-input::placeholder { color: rgba(255,255,255,.65); }

/* Poignées de redimensionnement */
.pf-chip__handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 1.5px solid var(--pf-petrole-500);
  border-radius: 1px;
  box-sizing: border-box;
  touch-action: none;
}

.pf-chip__handle--tl { top: -4px; left: -4px; cursor: nw-resize; }
.pf-chip__handle--tr { top: -4px; right: -4px; cursor: ne-resize; }
.pf-chip__handle--bl { bottom: -4px; left: -4px; cursor: sw-resize; }
.pf-chip__handle--br { bottom: -4px; right: -4px; cursor: se-resize; }

/* ── Fantôme de drag ── */
.pf-drag-ghost {
  position: fixed;
  pointer-events: none;
  opacity: .75;
  z-index: 9999;
  border: 2px dashed var(--pf-petrole-500);
  border-radius: 3px;
  background: rgba(34,154,135,.08);
  display: none;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-petrole-700);
  white-space: nowrap;
  gap: 6px;
  min-width: 100px;
  min-height: 28px;
}

/* ── Messages flash (django.contrib.messages) ── */
.pf-flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pf-flash {
  padding: 12px 16px;
  border-radius: var(--pf-r-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
}
.pf-flash--success { background: rgba(46, 125, 91, .08); border-color: rgba(46, 125, 91, .25); color: var(--pf-success); }
.pf-flash--warning { background: rgba(201, 168, 106, .12); border-color: rgba(201, 168, 106, .4); color: #7a5f2a; }
.pf-flash--error { background: rgba(178, 58, 46, .07); border-color: rgba(178, 58, 46, .3); color: var(--pf-alert); }

/* ============================================================
   Rituel du retour — plaque-écusson de l'espace de travail
   (connexion, appareil reconnu) + aside « mode sécurité »
   ============================================================ */
.pf-plaque {
  position: relative;
  width: 100%;
  margin: 4px auto 0;
  padding: 30px 28px 26px;
  border-radius: var(--pf-r-md);
  background: linear-gradient(172deg, var(--pf-ivoire-50), var(--pf-ivoire-100));
  border: 1px solid rgba(201, 168, 106, .45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 14px 30px -14px rgba(122, 95, 42, .38),
    var(--pf-shadow-md);
  text-align: center;
  animation: pf-plaque-in .55s cubic-bezier(.2, .7, .3, 1) both;
}
.pf-plaque::before {
  content: "";
  position: absolute; inset: 7px;
  border-radius: calc(var(--pf-r-md) - 5px);
  border: 1px solid rgba(201, 168, 106, .35);
  pointer-events: none;
}
@keyframes pf-plaque-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-plaque { animation: none; }
}
.pf-plaque__cachet {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--pf-font-serif); font-weight: 600; font-size: 27px;
  color: var(--pf-ivoire-50);
  text-shadow: 0 1px 1px rgba(122, 95, 42, .55);
  background: radial-gradient(circle at 32% 26%, var(--pf-or-300) 0%, #d7bb85 34%, var(--pf-or-500) 58%, var(--pf-or-700) 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, .55),
    inset 0 -4px 8px rgba(122, 95, 42, .38),
    0 6px 14px -4px rgba(122, 95, 42, .5),
    0 2px 4px rgba(15, 61, 62, .12);
  user-select: none;
}
.pf-plaque__cachet::after {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .55);
}
.pf-plaque__ws {
  font-family: var(--pf-font-serif); font-weight: 600;
  font-size: 23px; letter-spacing: -.01em;
  color: var(--pf-petrole-900);
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-plaque__mail {
  font-size: 14px; color: var(--pf-ink-soft);
  margin-top: 3px;
}
.pf-plaque .pf-btn { margin-top: 22px; width: 100%; justify-content: center; }

.pf-plaque--compact {
  display: inline-flex; align-items: center; gap: 12px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 22px;
  padding: 9px 22px 9px 11px;
  border-radius: var(--pf-r-pill);
  text-align: left;
}
.pf-plaque--compact::before { inset: 4px; border-radius: var(--pf-r-pill); }
.pf-plaque--compact .pf-plaque__cachet {
  width: 40px; height: 40px;
  margin: 0;
  font-size: 18px;
  flex: none;
}
.pf-plaque--compact .pf-plaque__cachet::after { inset: 4px; }
.pf-plaque--compact .pf-plaque__ws { font-size: 17px; }

.pf-secure { display: flex; flex-direction: column; gap: 14px; }
.pf-secure__badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--pf-or-500);
  border: 1px solid rgba(201, 168, 106, .55);
  background: rgba(201, 168, 106, .10);
  box-shadow: inset 0 0 0 4px rgba(201, 168, 106, .07);
  margin-bottom: 4px;
}
.pf-secure__title {
  font-family: var(--pf-font-serif); font-weight: 600;
  font-size: 25px; line-height: 1.25;
  margin: 0;
}
.pf-secure__line {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14.5px; color: rgba(255, 255, 255, .85);
}
.pf-secure__line svg { flex: none; margin-top: 3px; color: var(--pf-or-500); }
.pf-secure__note {
  margin-top: 10px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 13.5px; line-height: 1.6;
  color: rgba(255, 255, 255, .72);
  max-width: 34em;
}

@media (max-width: 860px) {
  .pf-plaque { padding: 26px 20px 22px; }
}

/* ============================================================
   Lecture du document avant signature (page d'invitation)
   ============================================================ */
.pf-signread {
  max-width: 900px;
  margin: clamp(16px, 4vw, 40px) auto 0;
  padding: 0 clamp(20px, 5vw, 56px) 48px;
}
.pf-signread__intro { margin-bottom: 22px; }
.pf-signread__error {
  color: var(--pf-alert); font-weight: 600; margin-bottom: 16px;
}
.pf-signread__cta { margin-top: 24px; }

.pf-reader {
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-lg);
  background: var(--pf-surface);
  box-shadow: var(--pf-shadow-sm);
  overflow: hidden;
}
.pf-reader__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--pf-line);
  background: var(--pf-bg);
}
.pf-reader__ind { font-size: 13px; color: var(--pf-ink-soft); font-weight: 600; }
.pf-reader__fs {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--pf-petrole-800);
  text-decoration: none;
}
.pf-reader__fs:hover { text-decoration: underline; }
.pf-reader__scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding: 18px;
  background: var(--pf-bg);
}
.pf-reader__page {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 14px;
  box-shadow: var(--pf-shadow-md);
  border: 1px solid var(--pf-line);
  background: #fff;
}
.pf-reader__page:last-of-type { margin-bottom: 0; }
.pf-reader__end { height: 1px; }

/* ============================================================
   Page contact publique (formulaire + panneau coordonnées)
   ============================================================ */
.pf-contact {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(18px, 4vw, 40px) 80px;
}
.pf-contact__head { margin-bottom: 28px; }
.pf-contact__eyebrow {
  text-transform: uppercase; letter-spacing: .15em; font-size: 11px;
  font-weight: 700; color: var(--pf-emeraude-600); margin-bottom: 10px;
}
.pf-contact__title { font-size: clamp(28px, 4vw, 40px); color: var(--pf-petrole-900); }
.pf-contact__lead { color: var(--pf-ink-faint); margin-top: 6px; max-width: 44em; }

.pf-contact__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(22px, 3.5vw, 36px);
  align-items: start;
}
/* Un item de grille vaut min-width:auto : il refuse de descendre sous la
   largeur de son contenu le plus rigide — ici les 300 px du cadre du widget
   Turnstile, qui poussaient la carte à 346 px et faisaient défiler la page
   entière de 40 px à 320 px. À 1280 px les colonnes valent déjà 530 et
   434 px, le partage exact de 1.1fr / 0.9fr : rien n'y change. */
.pf-contact__grid > * { min-width: 0; }
@media (max-width: 860px) {
  .pf-contact__grid { grid-template-columns: 1fr; }
}

.pf-contact__field { margin-bottom: 18px; }
.pf-contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .pf-contact__row { grid-template-columns: 1fr; } }

/* Champs cohérents avec connexion_email.html (radius 10px, focus émeraude en anneau) */
.pf-contact .pf-input,
.pf-contact .pf-select,
.pf-contact .pf-textarea {
  border-radius: 10px;
}
.pf-contact .pf-input:focus,
.pf-contact .pf-select:focus,
.pf-contact .pf-textarea:focus {
  outline: 2px solid var(--pf-emeraude-600);
  border-color: var(--pf-emeraude-600);
  box-shadow: none;
}
.pf-contact .pf-textarea::placeholder { color: #aeb6b2; }
.pf-contact__error { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--pf-alert); }
.pf-contact__form-error { color: var(--pf-alert); font-weight: 600; margin-bottom: 16px; }

.pf-contact__selectwrap { position: relative; }
.pf-contact__selectwrap svg {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--pf-ink-faint);
}
.pf-select {
  width: 100%; padding: 13px 42px 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; appearance: none; -webkit-appearance: none; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.pf-contact__turnstile {
  width: 300px; max-width: 100%; min-height: 65px;
  display: flex; align-items: center;
  /* « safe » : ce qui déborde d'un conteneur centré déborde des DEUX
     côtés, et le défilement ne rattrape que la droite — la gauche,
     où se trouve la case à cocher, serait perdue. Mesuré à 320 px :
     35 px coupés de chaque côté, 36 px de défilement seulement. */
  justify-content: safe center;
  border: 1px dashed #c6d3ce; border-radius: var(--pf-r-md);
  background: var(--pf-bg); box-sizing: border-box;
  /* Le widget est un iframe large de 300 px que Cloudflare ne rend pas
     fluide. Sans conteneur défilant, cette largeur remonte la chaîne par le
     min-width:auto de l'item de grille et pousse la carte à 346 px : à
     320 px de fenêtre, la PAGE ENTIÈRE défilait de 40 px. */
  overflow-x: auto;
}

.pf-contact__actions { display: flex; justify-content: flex-end; margin-top: 24px; }
@media (max-width: 620px) {
  .pf-contact__actions .pf-btn { width: 100%; justify-content: center; }
}

/* Panneau coordonnées / rassurance : surface de marque pétrole fixe (identique en toutes circonstances) */
.pf-contact__aside {
  position: relative;
  background: #0f3d3e;
  color: #fff;
  border-radius: var(--pf-r-lg);
  box-shadow: var(--pf-shadow-lg);
  padding: clamp(26px, 4vw, 40px);
}
.pf-contact__aside::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(201, 168, 106, .55), transparent 45%);
  -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-contact__aside .pf-secure__line a {
  color: #fff; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(201, 168, 106, .6);
}
.pf-contact__aside .pf-secure__line a:hover { text-decoration-color: var(--pf-or-500); }
.pf-contact__aside .pf-secure__line small { display: block; font-size: 13px; color: rgba(255, 255, 255, .62); }
.pf-contact__aside-sep { height: 1px; background: rgba(255, 255, 255, .14); margin: 4px 0; }

@media (max-width: 560px) {
  .pf-contact { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================
   Page Abonnement (/espace/abonnement/)
   ============================================================ */
.pf-sub {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(28px, 4vw, 56px);
  align-items: start; margin-bottom: clamp(52px, 7vw, 84px);
}
.pf-sub__proof { padding-top: 46px; }        /* aligne la feuille sous la ligne d'œil du titre */
.pf-sub__eyebrow {
  text-transform: uppercase; letter-spacing: .15em; font-size: 11px; font-weight: 700;
  color: var(--pf-emeraude-600); margin-bottom: 12px;
}
.pf-sub__title {
  font-family: var(--pf-font-serif); font-weight: 600; letter-spacing: -.015em;
  font-size: clamp(30px, 4.4vw, 42px); line-height: 1.08; color: var(--pf-petrole-900);
  margin-bottom: 14px;
}
.pf-sub__lead { font-size: 16.5px; line-height: 1.55; color: var(--pf-ink-soft); margin-bottom: 26px; }
.pf-sub__lead b { color: var(--pf-petrole-800); font-weight: 600; }
.pf-sub__back {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 18px;
  font-size: 14px; font-weight: 500; color: var(--pf-ink-faint); text-decoration: none;
}
.pf-sub__back:hover { color: var(--pf-petrole-800); }

/* --- la carte offre --- */
.pf-offer {
  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, 30px);
}
.pf-offer__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pf-offer__amount {
  font-family: var(--pf-font-serif); font-weight: 600; font-size: 46px; line-height: 1;
  letter-spacing: -.02em; color: var(--pf-petrole-900);
}
.pf-offer__per { font-size: 16px; font-weight: 600; color: var(--pf-ink-faint); }
.pf-offer__state {
  margin-bottom: 14px;                       /* au-dessus du prix : jamais de repli hasardeux */
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 5px 11px; border-radius: var(--pf-r-pill);
  background: var(--pf-emeraude-50); color: var(--pf-emeraude-700);
  border: 1px solid var(--pf-emeraude-200);
}
.pf-offer__state::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.pf-offer__state--alerte {
  background: var(--pf-ivoire-100); color: var(--pf-or-700); border-color: var(--pf-or-300);
}
.pf-offer__terms {
  margin-top: 8px; font-size: 13.5px; color: var(--pf-ink-faint);
  padding-bottom: 18px; border-bottom: 1px solid var(--pf-line);
}
.pf-offer__perks { list-style: none; margin: 18px 0 22px; display: grid; gap: 11px; }
.pf-offer__perks li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 14.5px; line-height: 1.45; color: var(--pf-ink);
}
.pf-offer__perks svg { flex: none; margin-top: 2px; color: var(--pf-or-500); }
.pf-offer__perks b { font-weight: 600; }
.pf-offer__actions { display: grid; gap: 10px; }
.pf-offer__actions form { margin: 0; }       /* les CTA sont des POST : le form ne doit rien ajouter */
/* Mention légale rattachée à son bouton : elle vit DANS le <form>, donc sous
   le bouton — le gap de la grille ne joue qu'entre ses enfants directs, d'où
   la marge propre. */
.pf-offer__note {
  margin: 7px 0 0; font-size: 12px; line-height: 1.45;
  color: var(--pf-ink-faint); text-align: center;
}
.pf-offer .pf-btn { width: 100%; justify-content: center; }
.pf-offer__secure {
  margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: var(--pf-ink-faint);
  display: flex; gap: 8px; align-items: flex-start; justify-content: center; text-align: center;
}
.pf-offer__secure svg { flex: none; margin-top: 1px; color: var(--pf-emeraude-600); }
.pf-offer__legal { margin-top: 6px; font-size: 11.5px; color: var(--pf-ink-faint); text-align: center; }

/* --- les deux formules, empilées dans la carte offre --- */
.pf-plans { display: grid; gap: 14px; margin-bottom: 20px; }
.pf-plan {
  border: 1px solid var(--pf-line); border-radius: var(--pf-r-md);
  padding: 18px 20px; margin: 0;
}
.pf-plan--haut { border-color: rgba(201, 168, 106, .55); }
.pf-plan__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pf-plan__name { font-weight: 600; font-size: 16px; color: var(--pf-petrole-900); }
.pf-plan__price { font-family: var(--pf-font-serif); font-weight: 600; font-size: 24px;
                  color: var(--pf-petrole-800); white-space: nowrap; }
.pf-plan__price span { font-size: 13px; font-weight: 400; color: var(--pf-ink-faint); }
.pf-plan__desc { margin: 8px 0 14px; font-size: 14px; line-height: 1.5; color: var(--pf-ink-soft); }
.pf-plan .pf-btn { width: 100%; justify-content: center; }
.pf-offer__plan { font-size: 13px; font-weight: 600; color: var(--pf-emeraude-600);
                  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }

/* --- sélecteur de périodicité (Mensuel | Annuel), CSS pur : les deux radios
   pilotent l'affichage des prix ET des boutons submit de .pf-plans, qui leur
   sont frères. Un bouton submit poste son propre name=value, donc la valeur
   envoyée suit toujours ce qui est affiché, sans une ligne de JS. --- */
.pf-periodes__radio { position: absolute; opacity: 0; pointer-events: none; }

/* display:none et non opacity/visibility : un bouton seulement transparent
   resterait focalisable au clavier et postable. */
.pf-plan__price--y,
.pf-plan__cta--y { display: none; }

#pf-period-y:checked ~ .pf-plans .pf-plan__price--m,
#pf-period-y:checked ~ .pf-plans .pf-plan__cta--m { display: none; }
#pf-period-y:checked ~ .pf-plans .pf-plan__price--y { display: inline; }
#pf-period-y:checked ~ .pf-plans .pf-plan__cta--y { display: inline-flex; }

.pf-periodes__bascule { display: flex; gap: .25rem; justify-content: center; }
.pf-periodes__bascule label { cursor: pointer; padding: .45rem .9rem; border-radius: var(--pf-r-pill); }
#pf-period-m:checked ~ .pf-periodes__bascule label[for="pf-period-m"],
#pf-period-y:checked ~ .pf-periodes__bascule label[for="pf-period-y"] {
  background: var(--pf-emeraude-50); font-weight: 600;
}

/* Le radio est en opacity:0 (cf. plus haut) : son anneau de focus natif
   disparaît avec lui. On le reporte sur le label frère. Outline pleine
   couleur et non box-shadow à faible opacité : sur le label déjà rempli de
   --pf-emeraude-50 (état :checked), un halo à 13 % d'opacité se fond dans
   ce fond pâle et devient illisible — vert pâle sur vert pâle. Un contour
   plein reste visible que le label soit actif ou non. --pf-emeraude-500 :
   même couleur que .pf-input:focus (border-color, parafe.css:508) et que
   tous les autres états de focus/hover de la feuille (.pf-dropzone:hover,
   .pf-check:has(input:checked)…). outline suit border-radius : la pilule
   reste une pilule. :focus-visible et non :focus : pas de contour au clic
   souris, seulement à la navigation clavier. */
#pf-period-m:focus-visible ~ .pf-periodes__bascule label[for="pf-period-m"],
#pf-period-y:focus-visible ~ .pf-periodes__bascule label[for="pf-period-y"] {
  outline: 2px solid var(--pf-emeraude-500);
  outline-offset: 2px;
}
.pf-periodes__badge { font-size: .78em; }

/* --- le document signé --- */
.pf-proof { position: relative; margin: 0; }
.pf-proof__sheet {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #fff; border: 1px solid var(--pf-line); box-shadow: var(--pf-shadow-lg);
  aspect-ratio: 1 / 1.06;                    /* cadre le HAUT du document : le tampon réel
                                                sort du cadre, le médaillon le montre */
  transform: rotate(-1.4deg);
}
.pf-proof__sheet img { display: block; width: 100%; }   /* pas de crop latéral : le contrat reste entier */
.pf-proof__sheet::after {                    /* fondu bas : le document « continue » */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 88%);
}
.pf-proof__badge {
  position: absolute; top: 14px; right: -10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--pf-petrole-800); color: var(--pf-ivoire-50);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 9px 14px; border-radius: var(--pf-r-pill);
  box-shadow: 0 12px 26px -10px rgba(10,43,44,.6);
}
.pf-proof__badge svg { color: var(--pf-or-500); }
.pf-proof__stamp {
  position: absolute; z-index: 2; right: -20px; bottom: -30px; width: 66%;
  background: #fff; border: 1px solid var(--pf-line); border-radius: var(--pf-r-md);
  padding: 12px 14px; box-shadow: var(--pf-shadow-lg);
}
.pf-proof__stamp img { display: block; width: 100%; }
.pf-proof__stamp figcaption {
  margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pf-ink-faint);
}

/* --- extrait du journal d'audit, sous la feuille --- */
.pf-trail {
  margin-top: 52px;                          /* laisse passer le médaillon qui déborde */
  background: var(--pf-surface); border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-md); padding: 16px 18px 8px; box-shadow: var(--pf-shadow-sm);
}
.pf-trail__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pf-ink-faint);
}
.pf-trail__head svg { flex: none; color: var(--pf-emeraude-600); }
.pf-trail ol { list-style: none; }
.pf-trail li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 9px 0; border-top: 1px solid var(--pf-line);
  font-size: 13.5px; color: var(--pf-ink);
}
.pf-trail time {
  color: var(--pf-ink-faint); font-size: 12.5px;
  font-variant-numeric: tabular-nums; white-space: nowrap;   /* jamais coupée à 390 px */
}

/* --- bandeau « et si je ne m'abonne pas » --- */
.pf-keep {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--pf-ivoire-50); border: 1px solid var(--pf-or-300);
  border-radius: var(--pf-r-lg); padding: 22px 26px; margin-bottom: clamp(32px, 5vw, 52px);
}
.pf-keep svg { flex: none; margin-top: 2px; color: var(--pf-or-700); }
.pf-keep h2 { font-size: 16px; color: var(--pf-petrole-900); margin-bottom: 5px; }
.pf-keep p { font-size: 14.5px; line-height: 1.55; color: var(--pf-ink-soft); }

/* --- les garanties --- */
.pf-guarantees { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pf-guarantee {
  background: var(--pf-surface); border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-md); padding: 20px;
}
.pf-guarantee__ic {
  width: 38px; height: 38px; border-radius: 10px; background: var(--pf-ivoire-100);
  display: grid; place-items: center; color: var(--pf-petrole-800); margin-bottom: 12px;
}
.pf-guarantee h3 { font-size: 14.5px; color: var(--pf-petrole-900); margin-bottom: 5px; }
.pf-guarantee p { font-size: 13px; line-height: 1.5; color: var(--pf-ink-faint); }

@media (max-width: 860px) {
  .pf-sub { grid-template-columns: 1fr; gap: 34px; }
  /* le prix et le CTA passent avant le visuel : sur mobile, on ne fait pas
     défiler une page de contrat avant de savoir combien ça coûte */
  .pf-sub__proof { max-width: 420px; margin: 0 auto; padding-top: 6px; }
  .pf-guarantees { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .pf-guarantees { grid-template-columns: 1fr; }
  .pf-proof__stamp { right: -6px; width: 72%; }
  .pf-keep { padding: 18px; }
}
