/* ==========================================================================
   On-Brade Recrutement — feuille de style commune
   Palette papier / encre / or, titres serif, interface dense et lisible.
   ========================================================================== */

:root {
  --brand: #0E3B36;
  --brand-deep: #092A26;
  --brand-ink: #06211E;
  --brand-soft: color-mix(in srgb, var(--brand) 11%, #ffffff);
  --brand-line: color-mix(in srgb, var(--brand) 24%, #ffffff);
  --gold: #C08A3E;
  --gold-soft: #F4E8CF;
  --ink: #16211E;
  --ink-2: #36443F;
  --ink-3: #5C6A65;
  --muted: #7C8883;
  --paper: #F6F3EC;
  --paper-2: #EFEAE0;
  --card: #FFFDFA;
  --line: #E5DED1;
  --line-2: #D6CDBC;
  --ok: #2C7A57;
  --ok-soft: #E4F2E9;
  --info: #2C5F86;
  --info-soft: #E6EFF6;
  --warn: #A9711B;
  --warn-soft: #F8EEDB;
  --danger: #A84138;
  --danger-soft: #F8E5E2;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(25, 34, 30, .05);
  --shadow: 0 2px 4px rgba(25, 34, 30, .04), 0 16px 40px -24px rgba(25, 34, 30, .35);
  --shadow-lg: 0 30px 80px -30px rgba(10, 25, 21, .45);
  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-w: 272px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(192, 138, 62, .09), transparent 65%),
    radial-gradient(700px 500px at 100% 0%, rgba(14, 59, 54, .05), transparent 60%);
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

.serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-bd: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 14px; line-height: 1.2;
  cursor: pointer; user-select: none;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(9, 35, 31, .55); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2);
}
.btn-ghost:hover { --btn-bd: var(--ink-3); background: #fff; }
.btn-soft {
  --btn-bg: var(--brand-soft); --btn-fg: var(--brand); --btn-bd: transparent;
}
.btn-gold { --btn-bg: var(--gold); --btn-fg: #241a0b; --btn-bd: var(--gold); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: #E9C8C3; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-lg { min-height: 50px; padding: 14px 26px; font-size: 15px; }
.btn-sm { min-height: 34px; padding: 6px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 11px;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
}
.btn-icon:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.btn-icon svg { width: 17px; height: 17px; }

/* ---------- Champs ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label {
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em;
}
.field > label .req, .req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--ink); font-size: 14.5px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #A6ADA8; }
.input:hover, .select:hover, .textarea:hover { border-color: #C3B9A7; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 13%, transparent);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235C6A65' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.input.error, .select.error, .textarea.error { border-color: var(--danger); background: #FFF9F8; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 78px; }
.input-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: var(--paper-2); color: var(--ink-3); border-radius: 7px;
  font-size: 10.5px; font-weight: 700; padding: 6px 9px; cursor: pointer;
}
.input-eye:hover { background: var(--brand-soft); color: var(--brand); }
.error-text { font-size: 12px; color: var(--danger); min-height: 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
.field-full { grid-column: 1 / -1; }

.check {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}
.check input {
  appearance: none; width: 19px; height: 19px; flex: none; margin: 1px 0 0;
  border: 1.5px solid var(--line-2); border-radius: 5px; background: #fff;
  display: grid; place-content: center; cursor: pointer;
}
.check input::after {
  content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .12s ease;
}
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }

/* ---------- Cartes & étiquettes ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--paper-2); color: var(--ink-2); white-space: nowrap;
  border: 1px solid transparent;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-brand { background: var(--brand-soft); color: var(--brand); }
.chip-gold { background: var(--gold-soft); color: #7A5318; }
.chip-outline { background: transparent; border-color: var(--line-2); color: var(--ink-3); }
.tone-neutral { background: #EEEBE4; color: #5D6661; }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-gold { background: var(--gold-soft); color: #7A5318; }

.dotline { height: 1px; background: var(--line); border: 0; margin: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-content: center; flex: none;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.avatar.gold { background: var(--gold-soft); color: #7A5318; }

.notice {
  display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; border: 1px solid transparent;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice-info { background: var(--info-soft); border-color: #D3E2EE; color: #274F6E; }
.notice-warn { background: var(--warn-soft); border-color: #EDDAB6; color: #7C5514; }
.notice-danger { background: var(--danger-soft); border-color: #EDCBC6; color: #8A332B; }
.notice-ok { background: var(--ok-soft); border-color: #CBE5D6; color: #215C42; }

/* ---------- Logo / marque ---------- */
.brandmark {
  display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
  text-decoration: none !important;
}
.brandmark img { height: 42px; width: auto; max-width: 150px; object-fit: contain; }
.brandmark .mono-logo {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-content: center;
  background: var(--brand); color: #F6EAD2; font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: .02em;
}
.brandmark .name { font-weight: 700; font-size: 15px; line-height: 1.15; letter-spacing: -.01em; }
.brandmark .name small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.onbrade {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12px; color: var(--muted); text-align: center; padding: 22px 16px;
}
.onbrade a { color: var(--ink-2); font-weight: 600; }
.onbrade .ob-mark {
  display: inline-grid; place-content: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand); color: #F3E7CE; font-family: var(--font-display); font-size: 11px; font-weight: 700;
}
.onbrade .ob-phones { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.onbrade .ob-phones a { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.onbrade .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* ---------- Pages publiques ---------- */
.public-top {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  max-width: 1160px; margin: 0 auto; padding: 22px 26px 8px;
  position: relative; z-index: 2;
}
.public-top .links { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 600; }
.public-top .links a { color: var(--ink-3); }
.public-top .links a:hover { color: var(--ink); }

.site-wrap { position: relative; z-index: 1; }
.hero {
  max-width: 1160px; margin: 0 auto; padding: 48px 26px 40px;
  display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center;
  min-height: calc(100vh - 220px);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  line-height: 1.02; letter-spacing: -.028em; margin: 18px 0 20px;
}
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .lede { font-size: 16.5px; color: var(--ink-3); max-width: 52ch; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-meta .m { display: grid; gap: 2px; }
.hero-meta .m b { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.hero-meta .m span { font-size: 11px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); font-weight: 700; }

.hero-visual { position: relative; min-height: 440px; }
.paper-mock {
  position: absolute; inset: 10px 6% 40px 0;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 26px 26px 22px;
  transform: rotate(-2.2deg);
}
.paper-mock .pm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.paper-mock .pm-logo { width: 40px; height: 40px; border-radius: 9px; background: var(--brand); color: #F3E7CE; display: grid; place-content: center; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.paper-mock .pm-title { flex: 1; border: 1.5px solid var(--ink); padding: 8px 12px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 12.5px; letter-spacing: .1em; }
.pm-row { display: grid; grid-template-columns: 34px 1.1fr 1fr 1fr; gap: 0; border: 1px solid var(--line); border-bottom: 0; }
.pm-row:last-of-type { border-bottom: 1px solid var(--line); }
.pm-row span { padding: 9px 8px; border-right: 1px solid var(--line); font-size: 8.5px; color: var(--muted); }
.pm-row span:last-child { border-right: 0; }
.pm-row.head span { background: var(--paper-2); font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; font-size: 7.5px; }
.paper-mock .pm-foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 9px; color: var(--muted); }

.float-card {
  position: absolute; right: 0; bottom: 6px; width: 250px;
  background: var(--brand); color: #F7F1E5; border-radius: 16px; padding: 18px;
  box-shadow: 0 30px 50px -25px rgba(6, 33, 30, .7);
  transform: rotate(1.6deg);
}
.float-card .fc-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; color: #B9C8BF; font-weight: 700; }
.float-card .fc-value { font-family: var(--font-display); font-size: 34px; line-height: 1; margin: 10px 0 4px; }
.float-card .fc-sub { font-size: 11px; color: #C9D4CD; }
.float-card .fc-bars { display: flex; gap: 4px; align-items: flex-end; height: 38px; margin-top: 14px; }
.float-card .fc-bars i { flex: 1; background: rgba(243, 231, 206, .28); border-radius: 3px 3px 0 0; }
.float-card .fc-bars i:nth-child(odd) { background: var(--gold); }

.feature-strip {
  max-width: 1160px; margin: 0 auto; padding: 12px 26px 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.feature-strip .f { padding: 26px 28px 10px 0; display: grid; gap: 6px; }
.feature-strip .f + .f { border-left: 1px solid var(--line); padding-left: 30px; }
.feature-strip h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.feature-strip h3 .n { font-family: var(--font-display); color: var(--gold); font-size: 13px; }
.feature-strip p { font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 34ch; }
.site-footer { border-top: 1px solid var(--line); position: relative; z-index: 1; }
.site-footer .onbrade { padding: 20px 26px; }

.how-section { max-width: 1160px; margin: 0 auto; padding: 18px 26px 66px; }
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.how-head h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 2.8vw, 2.5rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; margin-top: 10px; }
.how-head p { font-size: 13.5px; color: var(--ink-3); max-width: 42ch; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; display: grid; gap: 10px; align-content: start; position: relative; overflow: hidden; }
.how-card::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--brand); opacity: .9; }
.how-card .step-n { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--gold); letter-spacing: .02em; }
.how-card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px; }
.how-card p { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.how-card .mini { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.cta-band {
  max-width: 1160px; margin: 0 auto 46px; padding: 34px 38px; border-radius: 20px;
  background: radial-gradient(500px 260px at 90% 0%, rgba(192, 138, 62, .25), transparent 65%), linear-gradient(135deg, #0D332E, #08201D);
  color: #F5F0E4; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  box-shadow: 0 30px 60px -35px rgba(6, 33, 30, .8); position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; right: -60px; top: -90px; width: 280px; height: 280px; border-radius: 50%; border: 1px solid rgba(243, 231, 206, .16); box-shadow: 0 0 0 36px rgba(243,231,206,.035), 0 0 0 90px rgba(243,231,206,.025); }
.cta-band h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; letter-spacing: -.02em; max-width: 24ch; }
.cta-band p { font-size: 12.5px; color: #C5D2CA; margin-top: 7px; }
.cta-band .btn { position: relative; z-index: 1; background: #F3EAD8; color: #18302B; border-color: #F3EAD8; }
.cta-band .btn:hover { background: #fff; }

/* ---------- Connexion / inscription ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 46% 54%; position: relative; z-index: 1; }
.auth-aside {
  background:
    radial-gradient(600px 400px at 20% 0%, rgba(192, 138, 62, .22), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-ink) 100%);
  color: #F6F0E4; padding: 42px 52px; display: flex; flex-direction: column; gap: 24px; position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 440px; height: 440px;
  border: 1px solid rgba(243, 231, 206, .18); border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(243, 231, 206, .04), 0 0 0 110px rgba(243, 231, 206, .03);
}
.auth-aside .brandmark { color: #F6F0E4; }
.auth-aside .brandmark .name small { color: #B8C7BE; }
.auth-aside .quote { margin-top: auto; position: relative; z-index: 1; }
.auth-aside .quote h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.18; letter-spacing: -.02em; max-width: 18ch; }
.auth-aside .quote p { margin-top: 18px; font-size: 13.5px; color: #C6D2CA; max-width: 38ch; line-height: 1.65; }
.auth-aside .aside-list { display: grid; gap: 13px; margin-top: 8px; position: relative; z-index: 1; }
.auth-aside .aside-list li { display: flex; gap: 11px; font-size: 13px; color: #DCE4DD; align-items: flex-start; }
.auth-aside .aside-list li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--gold); flex: none; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 26px; }
.auth-card { width: 100%; max-width: 500px; }
.auth-card h1 { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-3); font-size: 14px; margin-bottom: 28px; }
.auth-aside .onbrade { color: #93A99E; padding: 8px 0 0; justify-content: flex-start; font-size: 10.5px; }
.auth-aside .onbrade a { color: #E7DFCF; }
.auth-aside .onbrade .ob-mark { background: rgba(255,255,255,.12); color: #F3E7CE; }
.auth-aside .onbrade .ob-phones a { color: #C4D1C8; }
.auth-form { display: grid; gap: 16px; }
.auth-alt { margin-top: 22px; font-size: 13px; color: var(--ink-3); text-align: center; }
.auth-alt a { font-weight: 700; }
.logo-picker {
  display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-2);
  border-radius: 12px; background: #fff;
}
.logo-picker .preview {
  width: 54px; height: 54px; border-radius: 11px; background: var(--paper-2); display: grid; place-content: center;
  font-family: var(--font-display); font-size: 22px; color: var(--ink-3); overflow: hidden; flex: none;
}
.logo-picker .preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-quality {
  display: none; gap: 6px; align-items: flex-start; margin-top: 7px;
  font-size: 11px; line-height: 1.45; color: #7C5514;
}
.logo-quality.is-on { display: flex; }
.logo-quality.is-good { color: var(--ok); }
.logo-quality svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.color-row { display: flex; gap: 9px; flex-wrap: wrap; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-2); transition: transform .12s ease, box-shadow .15s ease;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Coquille admin ---------- */
.admin-body { background: var(--paper); }
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background:
    radial-gradient(420px 300px at 0% 0%, rgba(192, 138, 62, .18), transparent 70%),
    linear-gradient(180deg, #0D332E 0%, #082420 100%);
  color: #E9EFE9; padding: 24px 18px 18px; display: flex; flex-direction: column; gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar .brandmark { color: #F6F0E4; padding: 0 6px; }
.sidebar .brandmark .name { font-size: 14px; }
.sidebar .brandmark .name small { color: #9FB4AA; }
.sidebar .brandmark .mono-logo, .sidebar .brandmark img { background: rgba(255, 255, 255, .08); height: 40px; max-height: 40px; }
.sidebar .brandmark img { border-radius: 8px; object-fit: contain; }
.side-org {
  padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .07); display: grid; gap: 3px;
}
.side-org .k { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #9CB2A8; font-weight: 800; }
.side-org .v { font-size: 13px; font-weight: 700; color: #F4F0E6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: grid; gap: 4px; }
.nav .nav-label { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: #8FA69B; font-weight: 800; padding: 8px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #C8D6CD; font-size: 13.5px; font-weight: 600; text-decoration: none !important;
  transition: background .15s ease, color .15s ease;
}
.nav a svg { width: 18px; height: 18px; opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: #F3EAD8; color: #18302B; box-shadow: inset 3px 0 0 var(--gold); }
.nav a.active svg { opacity: 1; color: var(--brand); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid rgba(255, 255, 255, .09);
}
.side-user .avatar { background: rgba(243, 231, 206, .13); color: #F3E7CE; }
.side-user .u-name { font-size: 12.5px; font-weight: 700; color: #F2EFE7; line-height: 1.2; }
.side-user .u-role { font-size: 10.5px; color: #9FB4AA; }
.side-logout { background: none; border: 0; color: #A9BDB2; font-size: 11.5px; cursor: pointer; padding: 4px; text-align: left; display: flex; align-items: center; gap: 7px; }
.side-logout svg { width: 14px; height: 14px; }
.side-logout:hover { color: #fff; }

.main { min-width: 0; padding: 30px 38px 56px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.topbar .sub { color: var(--ink-3); font-size: 13px; margin-top: 5px; }
.topbar .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scope-select { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 6px 5px 14px; }
.scope-select label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.scope-select select { border: 0; background: transparent; font-size: 13px; font-weight: 600; padding: 6px 26px 6px 4px; max-width: 220px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235C6A65' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.menu-toggle { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px 17px; position: relative; overflow: hidden; }
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi .k-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; }
.kpi .k-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-content: center; background: var(--brand-soft); color: var(--brand); }
.kpi .k-icon svg { width: 15px; height: 15px; }
.kpi .k-value { font-family: var(--font-display); font-size: 38px; line-height: 1; letter-spacing: -.03em; margin: 12px 0 4px; }
.kpi .k-meta { font-size: 11.5px; color: var(--muted); }
.kpi .k-meta b { color: var(--ink-2); }
.kpi.gold .k-icon { background: var(--gold-soft); color: #8A5E1D; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 20px; align-items: start; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.export-option.wide { grid-column: 1 / -1; }
.export-option {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff; transition: border-color .15s, background .15s;
}
.export-option.selected { border-color: var(--brand); background: var(--brand-soft); }
.export-option input { display: none; }
.export-option .eo-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--paper-2); display: grid; place-content: center; flex: none; color: var(--ink-3); }
.export-option.selected .eo-icon { background: #fff; color: var(--brand); }
.export-option .eo-icon svg { width: 15px; height: 15px; }
.export-option b { display: block; font-size: 12.5px; }
.export-option span span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.org-preview {
  --brand: var(--brand);
  margin: 18px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  background: #FFFDF9; box-shadow: var(--shadow-sm);
}
.org-preview .op-bar { height: 5px; background: linear-gradient(90deg, var(--brand) 0 68%, var(--gold) 68% 100%); }
.org-preview .op-inner { padding: 18px 18px 14px; }
.org-preview .op-head { display: flex; gap: 12px; align-items: center; }
.org-preview .op-logo {
  width: 48px; height: 48px; border-radius: 9px; display: grid; place-content: center; flex: none;
  background: var(--brand); color: #F6EAD2; font-family: var(--font-display); font-size: 21px; font-weight: 700; overflow: hidden;
}
.org-preview .op-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.org-preview .op-title {
  flex: 1; border: 1.5px solid var(--ink); padding: 9px 10px; text-align: center;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.org-preview .op-meta { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--muted); padding: 10px 2px 0; }
.org-preview .op-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.org-preview .op-field { border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; }
.org-preview .op-field span { font-size: 7px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.org-preview .op-field i { display: block; height: 4px; background: var(--paper-2); border-radius: 2px; margin-top: 4px; width: 64%; }
.org-preview .op-docs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.org-preview .op-docs span { font-size: 7.5px; background: var(--paper-2); color: var(--ink-3); border-radius: 4px; padding: 3px 6px; font-weight: 700; }
.org-preview .op-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; font-size: 7.5px; color: var(--muted); text-align: center; }
.drawer-sec .notice { margin-top: 2px; }
.dash-col { display: grid; gap: 18px; align-content: start; }
.chart-card { padding: 20px 22px 16px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.chart-head h3 { font-size: 15px; font-weight: 700; }
.chart-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 5px 11px; font-size: 11.5px; font-weight: 700;
  color: var(--ink-3); cursor: pointer;
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 176px; padding: 14px 0 0; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.bars::before { top: 33%; } .bars::after { top: 66%; }
.bars .bar { flex: 1; min-width: 4px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; height: 100%; position: relative; z-index: 1; }
.bars .bar i {
  display: block; background: linear-gradient(180deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 72%, #fff) 100%);
  border-radius: 4px 4px 2px 2px; min-height: 2px; transition: opacity .15s ease;
}
.bars .bar:hover i { opacity: .78; }
.bars .bar.highlight i { background: linear-gradient(180deg, var(--gold) 0%, #D9AC66 100%); }
.bars .bar span { text-align: center; font-size: 8.5px; color: var(--muted); margin-top: 6px; height: 12px; overflow: hidden; white-space: nowrap; }
.bars-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 4px; }

.status-bars { display: grid; gap: 11px; padding: 16px 22px 20px; }
.status-bars .sb { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; font-size: 12px; }
.status-bars .sb .track { height: 7px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.status-bars .sb .track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.status-bars .sb b { text-align: right; font-size: 12px; }

.rank-list { display: grid; padding: 8px 10px 12px; }
.rank-list .rl { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; }
.rank-list .rl:hover { background: var(--paper); }
.rank-list .rl .pos { font-family: var(--font-display); color: var(--gold); font-weight: 700; font-size: 13px; }
.rank-list .rl .t { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .rl .c { font-weight: 800; font-size: 12px; background: var(--paper-2); border-radius: 99px; padding: 2px 8px; }

.recent-list { padding: 6px 8px 10px; }
.recent-list a { display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.recent-list a:hover { background: var(--paper); }
.recent-list .who { flex: 1; min-width: 0; }
.recent-list .who b { display: block; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .who span { font-size: 11px; color: var(--muted); }
.recent-list .when { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 16px 22px 20px; }
.donut { --pct: 0; width: 104px; height: 104px; border-radius: 50%; flex: none; display: grid; place-content: center; position: relative;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--paper-2) 0); }
.donut::after { content: ""; position: absolute; inset: 11px; background: var(--card); border-radius: 50%; }
.donut b { position: relative; z-index: 1; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.donut-meta { font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.donut-meta b { color: var(--ink); }

/* ---------- Tableaux ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 330px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.toolbar .search input { padding-left: 36px; min-height: 40px; font-size: 13.5px; }
.toolbar .input, .toolbar .select { min-height: 40px; font-size: 13px; }
.toolbar .select { width: auto; min-width: 130px; }
.toolbar .input[type="date"] { width: 142px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 900px; }
table.data th {
  text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  font-weight: 800; padding: 11px 14px; background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid #EEE9DF; font-size: 12.8px; vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background .12s ease; }
table.data tbody tr:hover { background: #FBF8F1; }
table.data tbody tr:last-child td { border-bottom: 0; }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.cell-person .nm { font-weight: 700; font-size: 13px; line-height: 1.3; }
.cell-person .rf { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.cell-poste { max-width: 210px; }
.cell-poste b { display: block; font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-poste span { font-size: 10.5px; color: var(--muted); }
.doc-dots { display: flex; gap: 3px; }
.doc-dot {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-content: center;
  font-size: 8.5px; font-weight: 800; background: var(--paper-2); color: #AEB5B0; letter-spacing: .01em;
}
.doc-dot.on { background: var(--ok-soft); color: var(--ok); }
.doc-dot.opt { border: 1px dashed #D9D2C0; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pagination .pages { display: flex; gap: 5px; align-items: center; }
.pagination button { border: 1px solid var(--line); background: #fff; min-width: 30px; height: 30px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.pagination button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

.table-simple { width: 100%; border-collapse: collapse; }
.table-simple td { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.table-simple tr:last-child td { border-bottom: 0; }

/* ---------- Recrutements ---------- */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.rec-card { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.rec-card .rc-top { padding: 20px 20px 14px; display: flex; gap: 12px; align-items: flex-start; }
.rec-card .rc-logo { width: 46px; height: 46px; border-radius: 11px; background: var(--paper-2); display: grid; place-content: center; font-family: var(--font-display); font-size: 19px; color: var(--ink-3); flex: none; overflow: hidden; }
.rec-card .rc-logo img { width: 100%; height: 100%; object-fit: contain; }
.rec-card h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.rec-card .rc-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.rec-card .rc-stats { display: flex; gap: 18px; padding: 0 20px 16px; }
.rec-card .rc-stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1; }
.rec-card .rc-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.rec-card .rc-link { display: flex; align-items: center; gap: 6px; padding: 11px 20px; border-top: 1px solid var(--line); background: var(--paper); font-size: 11.5px; color: var(--ink-3); }
.rec-card .rc-link code { flex: 1; font-family: var(--font-mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.rec-card .rc-actions { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); }
.empty-state { display: grid; place-items: center; text-align: center; gap: 6px; padding: 56px 24px; }
.empty-state .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-content: center; margin-bottom: 8px; }
.empty-state .icon svg { width: 24px; height: 24px; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.empty-state p { font-size: 13px; color: var(--muted); max-width: 42ch; }
.empty-state .btn { margin-top: 12px; }

/* ---------- Modales / tiroir ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(11, 22, 19, .48); backdrop-filter: blur(2px);
  z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.985);
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal.wide { width: min(920px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-head h2 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -.02em; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 20px 24px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); border-radius: 0 0 20px 20px; }

.drawer {
  position: fixed; z-index: 61; top: 0; right: 0; height: 100vh; width: min(560px, 100vw);
  background: var(--card); box-shadow: var(--shadow-lg); transform: translateX(102%);
  transition: transform .24s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.drawer-body { padding: 20px 24px 32px; overflow-y: auto; display: grid; gap: 22px; }
.drawer-sec h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin-bottom: 11px; }
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 9px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.choice-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--paper); border-radius: 10px; border: 1px solid var(--line); }
.choice-line .rank { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-content: center; font-size: 10.5px; font-weight: 800; flex: none; }
.choice-line .cl-t { font-size: 12.5px; font-weight: 600; }
.choice-line .cl-s { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.doc-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.doc-card .thumb { height: 96px; background: var(--paper-2); display: grid; place-content: center; overflow: hidden; position: relative; }
.doc-card .thumb img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; background: #fff; }
.doc-card .thumb .pdf { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--danger); background: var(--danger-soft); padding: 8px 12px; border-radius: 8px; }
.doc-card .dc-meta { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.doc-card .dc-meta .lb { font-size: 10.5px; font-weight: 700; }
.doc-card .dc-meta a { font-size: 10px; }
.status-select { min-height: 36px; padding: 5px 30px 5px 10px; font-size: 12px; border-radius: 8px; width: auto; }

/* ---------- Import de dossiers ---------- */
.import-formats { display: flex; gap: 9px; flex-wrap: wrap; }
.import-format {
  display: inline-flex; gap: 7px; align-items: center; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
  font-size: 11.5px; color: var(--ink-3);
}
.import-format svg { width: 15px; height: 15px; color: var(--brand); }
.import-drop {
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 26px 20px;
  display: grid; place-items: center; gap: 7px; text-align: center; cursor: pointer;
  background: #FFFDF8; transition: border-color .15s ease, background .15s ease;
}
.import-drop:hover, .import-drop.dragover { border-color: var(--brand); background: var(--brand-soft); }
.import-drop .big-ico {
  width: 48px; height: 48px; border-radius: 13px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-content: center; margin-bottom: 3px;
}
.import-drop .big-ico svg { width: 22px; height: 22px; }
.import-drop b { font-size: 14px; }
.import-drop > span { font-size: 11.5px; color: var(--muted); }
.import-file {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.import-file .ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-content: center; flex: none;
}
.import-file .ico svg { width: 18px; height: 18px; }
.import-file .grow { flex: 1; min-width: 0; }
.import-file b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-file .hint { font-size: 11px; }
.import-steps { display: grid; gap: 9px; }
.import-steps .st { display: flex; gap: 9px; align-items: center; font-size: 12px; color: var(--muted); }
.import-steps .st.current { color: var(--ink-2); font-weight: 600; }
.import-steps .st.done { color: var(--ok); }
.import-steps .st .spin {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor;
  border-top-color: transparent; flex: none; opacity: .55;
}
.import-steps .st.current .spin { animation: spin .7s linear infinite; opacity: 1; }
.import-steps .st.done .spin {
  border: 0; opacity: 1; width: 15px; height: 15px; background: var(--ok-soft); position: relative;
}
.import-steps .st.done .spin::after {
  content: ""; position: absolute; inset: 4px 3px 5px; border-left: 1.6px solid var(--ok);
  border-bottom: 1.6px solid var(--ok); transform: rotate(-45deg);
}
.import-progress { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.import-progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .25s ease; }
.import-summary {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.import-summary .ico {
  width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--line);
  display: grid; place-content: center; color: var(--brand); flex: none;
}
.import-summary .ico svg { width: 18px; height: 18px; }
.import-summary .grow { flex: 1; min-width: 150px; }
.import-summary b { display: block; font-size: 13px; }
.import-summary .hint { font-size: 11px; }
.import-review { display: grid; gap: 14px; }
.import-card { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.import-card.has-error { border-color: #E0A79F; box-shadow: 0 0 0 3px rgba(164, 58, 45, .07); }
.import-card-head {
  display: flex; gap: 10px; align-items: center; padding: 11px 14px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.import-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-content: center; font-size: 11px; font-weight: 800; flex: none;
}
.import-card-head .ttl { flex: 1; min-width: 0; }
.import-card-head b { font-size: 12.5px; }
.import-card-head .sub { font-size: 10.5px; color: var(--muted); }
.import-card-body { padding: 13px 14px; display: grid; gap: 12px; }
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.import-grid .full { grid-column: 1 / -1; }
.import-card .field { gap: 5px; }
.import-card .field > label { font-size: 10.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.import-card .input, .import-card .select { min-height: 38px; font-size: 13px; }
.import-field.has-error .input { border-color: var(--danger); background: #FFF9F8; }
.import-card .error-text { font-size: 10.5px; }
.conf {
  font-size: 8.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 5px; white-space: nowrap;
}
.conf.high { background: var(--ok-soft); color: #215C42; }
.conf.med { background: var(--warn-soft); color: #7C5514; }
.conf.low { background: var(--danger-soft); color: #8A332B; }
.conf.err { background: var(--danger-soft); color: var(--danger); }
.import-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.import-cand-warn {
  display: flex; gap: 7px; align-items: flex-start; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-soft); color: #7C5514; font-size: 11px; line-height: 1.45;
}
.import-cand-warn svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.import-gate {
  display: grid; gap: 11px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: #FBF8F1;
}
.import-gate .check { font-size: 12px; }
.import-gate .check.is-disabled { opacity: .6; cursor: not-allowed; }
.import-preview summary { cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.import-preview pre {
  margin-top: 9px; max-height: 200px; overflow: auto; padding: 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper); white-space: pre-wrap;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.55; color: var(--ink-3);
}

.import-paste {
  border: 1px dashed var(--line-2); border-radius: 12px; padding: 11px 14px;
  background: var(--paper);
}
.import-paste summary {
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.import-paste summary svg { width: 15px; height: 15px; color: var(--brand); }
.import-paste-body { display: grid; gap: 8px; margin-top: 12px; }
.import-paste-body textarea {
  width: 100%; min-height: 130px; resize: vertical; padding: 11px 12px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6;
}

.import-ocr {
  display: grid; gap: 0; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: #FBFCFB;
}
.import-ocr.is-low { border-color: #E3B778; background: #FFF9EF; }
.import-ocr-head { display: flex; gap: 12px; align-items: flex-start; }
.import-ocr-head .grow { flex: 1; min-width: 0; }
.import-ocr-head b { font-size: 12.5px; }
.import-ocr-head .hint { margin-top: 3px; }
.import-ocr-text {
  width: 100%; min-height: 150px; resize: vertical; margin-top: 10px; padding: 11px 12px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.65;
}
.import-ocr-actions {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 9px;
}
.import-ocr-actions .hint { flex: 1; min-width: 180px; }
.import-success { display: grid; place-items: center; text-align: center; gap: 7px; padding: 24px 10px 8px; }
.import-success .big {
  width: 54px; height: 54px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: grid; place-content: center; margin-bottom: 4px;
}
.import-success .big svg { width: 26px; height: 26px; }
.import-success h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.import-success p { font-size: 12.5px; color: var(--muted); max-width: 48ch; }
.import-refs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.import-refs code { font-family: var(--font-mono); font-size: 10.5px; background: var(--paper-2); padding: 3px 7px; border-radius: 5px; }

.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 12px;
  background: #152420; color: #F3F0E7; box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.45;
  animation: toastIn .22s ease; border-left: 3px solid var(--gold);
}
.toast.error { border-left-color: #E0786B; }
.toast.success { border-left-color: #6CC79A; }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; animation: spin .7s linear infinite; flex: none;
}
.spinner.dark { border-color: var(--line-2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; gap: 10px; padding: 60px 20px; color: var(--muted); font-size: 13px; }

/* ---------- Page de candidature ---------- */
.apply-body {
  background:
    linear-gradient(rgba(246, 243, 236, .92), rgba(246, 243, 236, .96)),
    repeating-linear-gradient(135deg, #EDE7DA 0 2px, transparent 2px 14px);
  min-height: 100vh;
}
.apply-top {
  max-width: 1120px; margin: 0 auto; padding: 20px 24px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  position: relative; z-index: 2;
}
.apply-top .secure { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.apply-top .secure svg { width: 14px; height: 14px; color: var(--ok); }
.apply-wrap { max-width: 1120px; margin: 0 auto; padding: 18px 24px 46px; position: relative; z-index: 1; }
.sheet {
  background: var(--card); border: 1px solid var(--line-2); border-radius: 6px 6px 20px 20px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.sheet::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 62%, var(--gold) 62%, var(--gold) 100%); }
.doc-head { padding: 26px 34px 20px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.doc-head .dh-logo { width: 168px; flex: none; display: flex; flex-direction: column; gap: 5px; }
.doc-head .dh-logo img { max-height: 64px; max-width: 168px; object-fit: contain; }
.doc-head .dh-logo .lg-placeholder { display: flex; align-items: center; gap: 9px; }
.doc-head .dh-logo .lg-placeholder .sq { width: 40px; height: 40px; border-radius: 9px; background: var(--brand); color: #F6EAD2; display: grid; place-content: center; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.doc-head .dh-logo .lg-placeholder b { font-size: 13px; line-height: 1.15; }
.doc-head .dh-logo small { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.doc-title {
  flex: 1; border: 1.5px solid var(--ink); padding: 13px 22px; text-align: center;
  font-family: var(--font-display); font-size: clamp(14px, 1.9vw, 20px); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.25;
  background: #FFFDF9;
}
.doc-sub { padding: 13px 34px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #FBF8F1; }
.doc-sub .ds-item { display: flex; gap: 7px; align-items: center; font-size: 11.5px; color: var(--ink-3); }
.doc-sub .ds-item b { color: var(--ink); font-weight: 700; }
.doc-sub .ds-item svg { width: 14px; height: 14px; color: var(--brand); }
.apply-intro { padding: 22px 34px 0; display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.apply-intro .ai-text { max-width: 62ch; }
.apply-intro h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.apply-intro p { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.6; }
.apply-intro .ai-badge { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 11px; color: var(--ink-3); background: #fff; }
.apply-intro .ai-badge b { color: var(--ink); }
.apply-intro .ai-text { order: 1; }
.apply-intro .ai-badge { order: 2; }
.apply-intro .apply-flash { order: 3; flex-basis: 100%; }
.apply-flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border: 1px solid #E9CE94; border-left: 3px solid #B7791F;
  border-radius: 9px; background: #FFF8E6; color: #7A5410;
  font-size: 12.5px; line-height: 1.55; font-weight: 500;
  animation: flash-warn 2.8s ease-in-out infinite;
}
.apply-flash svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #B7791F; }
@keyframes flash-warn {
  0%, 100% { background: #FFF8E6; box-shadow: 0 0 0 0 rgba(183, 121, 31, 0); }
  50% { background: #FFF1CC; box-shadow: 0 0 0 4px rgba(183, 121, 31, .12); }
}

.apply-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 30px; padding: 22px 34px 32px; align-items: start; }
.apply-main { min-width: 0; }
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 26px; }
.stepper .st { display: flex; align-items: center; gap: 9px; }
.stepper .st .num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-content: center;
  background: #fff; border: 1.5px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 800;
  transition: all .18s ease; flex: none;
}
.stepper .st .lb { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.stepper .st.active .num { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .st.active .lb { color: var(--ink); }
.stepper .st.done .num { background: var(--gold-soft); border-color: var(--gold); color: #7A5318; }
.stepper .st.done .lb { color: var(--ink-2); }
.stepper .line { flex: 1; height: 1.5px; background: var(--line); margin: 0 12px; min-width: 18px; }
.step-panel { display: none; animation: fadeUp .26s ease; }
.step-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.step-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.step-title h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.step-title span { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }

.choice-box { display: grid; gap: 11px; }
.choice-item { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: center; }
.choice-item .rk {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: grid; place-content: center; font-family: var(--font-display); font-size: 14px; font-weight: 700;
}
.choice-item .rk.opt { background: var(--paper-2); color: var(--ink-3); }
.choice-item .sel-wrap { display: grid; gap: 3px; }
.choice-item .sel-wrap .hint { font-size: 10.5px; }
.choice-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; border-radius: 10px; background: var(--gold-soft); font-size: 11.5px; color: #6E4D16; line-height: 1.5; }
.choice-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dropzone {
  position: relative; border: 1.5px dashed var(--line-2); border-radius: 12px;
  padding: 13px 14px; background: #FFFDF8; transition: border-color .15s ease, background .15s ease;
  min-height: 84px; display: flex; flex-direction: column; justify-content: center;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.filled { border-style: solid; border-color: #BFD8C8; background: #FCFEFC; }
.dropzone.invalid { border-color: var(--danger); background: #FFF9F8; }
.dropzone.conditional:not(.filled) { border-color: #D9A94A; background: #FFFDF6; }
.dropzone.conditional.invalid { border-color: var(--danger); background: #FFF9F8; }
.dropzone.conditional:not(.filled) .dz-label .opt { color: #7C5514; background: var(--warn-soft); }
.dropzone.attention { animation: dzPulse .9s ease 2; }
@keyframes dzPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(164, 58, 45, 0); }
  50% { box-shadow: 0 0 0 5px rgba(164, 58, 45, .18); }
}
.dropzone.has-preview { padding: 10px; }
.dz-top { display: flex; gap: 10px; align-items: flex-start; }
.dz-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--paper-2); color: var(--ink-3);
  display: grid; place-content: center; flex: none;
}
.dz-icon svg { width: 16px; height: 16px; }
.dropzone.filled .dz-icon { background: var(--ok-soft); color: var(--ok); }
.dz-body { flex: 1; min-width: 0; }
.dz-label { font-size: 12px; font-weight: 700; line-height: 1.35; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dz-label .req { color: var(--danger); font-size: 13px; line-height: 1; }
.dz-label .opt { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.dz-hint { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.dz-file { display: flex; align-items: center; gap: 10px; }
.dz-thumb {
  width: 46px; height: 46px; border-radius: 8px; background: var(--paper-2); flex: none; overflow: hidden;
  display: grid; place-content: center; border: 1px solid var(--line);
}
.dz-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dz-thumb .pdf { font-size: 8px; font-weight: 800; color: var(--danger); letter-spacing: .04em; }
.dz-file .nm { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.dz-file .sz { font-size: 10px; color: var(--muted); }
.dz-remove {
  position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--ink-3); cursor: pointer;
  display: grid; place-content: center; font-size: 13px; line-height: 1; padding: 0;
}
.dz-remove:hover { background: var(--danger-soft); color: var(--danger); border-color: #E9C8C3; }
.dz-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.filled .dz-input { display: none; }

.consent-box { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #FBF8F1; }
.apply-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.apply-actions .right-actions { display: flex; gap: 10px; margin-left: auto; }

.apply-aside { position: sticky; top: 20px; display: grid; gap: 14px; }
.summary-card { background: linear-gradient(180deg, #FBF7EE, #F7F1E4); border: 1px solid #E8DDC6; border-radius: 14px; padding: 18px; }
.summary-card h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.summary-card .sc-org { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.summary-list { display: grid; gap: 8px; margin-top: 15px; }
.summary-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.summary-list li svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--brand); }
.summary-list li.done svg { color: var(--ok); }
.summary-list li .st { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.summary-list li.done .st { color: var(--ok); }
.summary-deadline { margin-top: 15px; padding-top: 13px; border-top: 1px dashed #DCCFB4; font-size: 11px; color: #6F5A31; display: flex; gap: 8px; align-items: flex-start; }
.summary-deadline svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--gold); }
.help-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }
.help-card b { color: var(--ink); display: block; margin-bottom: 4px; font-size: 12px; }
.help-card a { font-weight: 600; }

.apply-legal { padding: 0 34px 22px; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.progress-under { height: 3px; background: var(--paper-2); margin-top: 12px; border-radius: 99px; overflow: hidden; }
.progress-under i { display: block; height: 100%; background: var(--gold); width: 33%; transition: width .3s ease; }
.progress-card {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(11, 22, 19, .55); backdrop-filter: blur(2px); padding: 20px;
}
.progress-card.open { display: grid; }
.progress-card .pc {
  background: var(--card); border-radius: 16px; padding: 24px 28px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 16px; max-width: 420px; width: 100%;
}
.progress-card .pc b { display: block; font-size: 14px; margin-bottom: 2px; }
.dz-content { width: 100%; }
.receipt .ri { display: grid; gap: 2px; }
.receipt .ri .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.receipt .ri .v { font-size: 14.5px; font-weight: 600; line-height: 1.35; }

/* Bandeau fermé */
.closed-state { max-width: 640px; margin: 60px auto; text-align: center; padding: 40px; }
.closed-state .icon { width: 64px; height: 64px; border-radius: 18px; background: var(--paper-2); color: var(--ink-3); display: grid; place-content: center; margin: 0 auto 18px; }
.closed-state h2 { font-family: var(--font-display); font-size: 27px; font-weight: 600; }
.closed-state p { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; }

/* Reçu */
.receipt-wrap { max-width: 820px; margin: 24px auto 0; }
.receipt { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 42px 46px; box-shadow: var(--shadow); }
.receipt .r-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.receipt .r-head .r-org { display: flex; gap: 14px; align-items: center; }
.receipt .r-head img { max-height: 58px; max-width: 152px; object-fit: contain; }
.receipt .r-head .rg { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.receipt .r-head .rs { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; margin-top: 3px; }
.receipt .r-meta { text-align: right; font-size: 11px; color: var(--muted); line-height: 1.5; }
.receipt .r-meta span { display: block; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; font-size: 9.5px; }
.receipt .r-meta b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; }
.receipt .r-title { text-align: center; margin: 28px 0 6px; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.2; }
.receipt .r-sub { text-align: center; font-size: 13px; color: var(--muted); }
.receipt .r-ref-label { margin-top: 24px; text-align: center; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.receipt .r-ref { text-align: center; margin: 8px auto 0; display: table; padding: 11px 30px; border: 1.5px dashed var(--line-2); border-radius: 9px; font-family: var(--font-mono); font-size: 23px; font-weight: 700; letter-spacing: .14em; }
.receipt .r-section { margin-top: 28px; }
.receipt .r-section-title { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--ink-3); margin-bottom: 12px; }
.receipt .r-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.receipt .r-sub-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin: 16px 0 8px; }
.receipt .r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; }
.receipt .r-grid .ri { display: grid; gap: 2px; }
.receipt .r-grid .ri .k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.receipt .r-grid .ri .v { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.receipt .r-choices { display: grid; gap: 9px; }
.receipt .r-choice { display: flex; align-items: center; gap: 11px; font-size: 14.5px; font-weight: 600; }
.receipt .r-choice .n { width: 22px; height: 22px; border-radius: 6px; background: var(--paper-2); color: var(--ink-3); display: grid; place-content: center; font-size: 11px; font-weight: 800; flex: none; }
.receipt .r-empty { font-size: 13px; color: var(--muted); }
.receipt .r-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt .r-docs .chip { font-size: 12px; padding: 6px 13px; }
.receipt .r-note { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.receipt .r-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; font-size: 11.5px; color: var(--ink-3); }
.receipt-success { text-align: center; margin-bottom: 24px; }
.receipt-success .check {
  width: 62px; height: 62px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: grid; place-content: center; margin: 0 auto 16px;
}
.receipt-success .check svg { width: 30px; height: 30px; }
.receipt-success h2 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.receipt-success p { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; max-width: 52ch; margin-left: auto; margin-right: auto; }
.receipt-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- Divers ---------- */
.meter { height: 7px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--paper) 30%); padding: 14px 0 0; }
.toggle-tag { font-size: 10.5px; }
.form-section-title { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; margin: 4px 0 -2px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.profile-picker { border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 320px; overflow-y: auto; }
.pp-cat { border-bottom: 1px solid var(--line); }
.pp-cat:last-child { border-bottom: 0; }
.pp-cat-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--paper); cursor: pointer; position: sticky; top: 0; z-index: 1; }
.pp-cat-head b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.pp-cat-head .cnt { font-size: 10px; color: var(--muted); }
.pp-cat-head .spacer { flex: 1; }
.pp-items { padding: 4px 8px 8px; display: grid; gap: 1px; }
.pp-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-size: 12px; cursor: pointer; }
.pp-item:hover { background: var(--paper); }
.pp-item input { appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--line-2); border-radius: 4px; background: #fff; display: grid; place-content: center; flex: none; }
.pp-item input::after { content: ""; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); }
.pp-item input:checked { background: var(--brand); border-color: var(--brand); }
.pp-item input:checked::after { transform: rotate(-45deg) scale(1); }
.pp-item .pid { font-family: var(--font-mono); font-size: 9px; color: var(--muted); min-width: 19px; }
.pp-item .pdesc { color: var(--muted); font-size: 10.5px; margin-left: auto; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.link-copy { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 10px; }
.link-copy input { border: 0; background: transparent; font-family: var(--font-mono); font-size: 10.5px; flex: 1; min-width: 0; color: var(--ink-2); }
.link-copy button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 700; cursor: pointer; }

.export-summary { background: var(--paper); border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 12px; color: var(--ink-3); display: flex; gap: 9px; align-items: center; }
.export-summary b { color: var(--ink); }

/* ---------- Supervision : organisations ---------- */
.org-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  padding: 24px 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, #FBF7EE 0%, #F5EFDF 100%);
  border-color: #E8DDC6;
}
.org-hero-text { max-width: 60ch; }
.org-hero-text h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 6px 0 8px; }
.org-hero-text p { line-height: 1.6; color: var(--ink-3); }
.org-hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 24px; }
.org-hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.org-hero-stats b { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.02em; color: var(--brand); line-height: 1.1; }
.org-hero-stats span { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: var(--muted); }

.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(315px, 1fr)); gap: 16px; }
.org-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.org-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.org-card-top { display: flex; align-items: center; gap: 12px; }
.org-logo {
  width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none;
  display: grid; place-content: center; background: var(--brand-soft); color: var(--brand);
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.org-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-logo span { width: 100%; height: 100%; display: grid; place-content: center; color: #F6EAD2; }
.on-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-slug { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.on-slug b { color: var(--brand); font-weight: 700; }
.org-owner { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.org-owner svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.org-owner span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-stats { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 12px; background: var(--paper); border-radius: 10px; font-size: 11.5px; color: var(--muted); }
.org-stats b { color: var(--ink); font-size: 13px; }
.org-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.org-actions .btn:first-child { flex: 1; justify-content: center; }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #EBC7C0; }
.super-switch { margin-right: 4px; }
.super-switch select { max-width: 210px; }
@media (max-width: 720px) {
  .org-hero { padding: 20px; }
  .org-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
  .org-grid { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .apply-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 28px; min-height: 0; }
  .hero-visual { min-height: 360px; max-width: 560px; }
  .feature-strip { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .dash-two { grid-template-columns: 1fr; }
  .feature-strip .f + .f { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  /* Sans contexte d'empilement sur .shell, le menu fixe (65) passe au-dessus du voile (60). */
  .shell { grid-template-columns: 1fr; z-index: auto; }
  .sidebar {
    position: fixed; z-index: 65; left: 0; top: 0; width: 272px;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .main { padding: 22px 20px 40px; }
  .apply-grid { grid-template-columns: 1fr; }
  .apply-aside { position: static; grid-row: 2; }
}
@media screen and (max-width: 720px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 11px; }
  .kpi .k-value { font-size: 30px; }
  .topbar h1 { font-size: 25px; }
  /* En-tête de formulaire compact : logo net à gauche, titre lisible à droite. */
  .doc-head { flex-direction: row; align-items: center; gap: 12px; padding: 16px 16px 14px; }
  .doc-head .dh-logo { width: auto; max-width: 38%; flex: none; }
  .doc-head .dh-logo img { max-height: 38px; width: auto; }
  .doc-head .dh-logo small { font-size: 7.5px; }
  .doc-title { flex: 1; min-width: 0; padding: 9px 10px; font-size: 12.5px; letter-spacing: .03em; }
  .receipt .r-head img { max-height: 38px; max-width: 112px; }
  .brandmark img { height: 34px; max-width: 118px; }
  /* 16 px : évite le zoom automatique des navigateurs mobiles au focus. */
  .input, .select, .textarea { font-size: 16px; }
  .import-card .input, .import-card .select, .toolbar .input, .toolbar .select { font-size: 16px; }
  .doc-sub, .apply-intro, .apply-grid, .apply-legal { padding-left: 20px; padding-right: 20px; }
  .apply-intro .apply-flash { order: 2; }
  .apply-intro .ai-badge { order: 3; }
  .apply-grid { padding-top: 18px; }
  .form-grid, .docs-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .stepper .st .lb { display: none; }
  .stepper .line { margin: 0 8px; }
  .receipt { padding: 28px 20px; }
  .receipt .r-grid { grid-template-columns: 1fr; }
  .receipt .r-head { flex-direction: column; }
  .receipt .r-meta { text-align: left; }
  .receipt .r-title { font-size: 24px; }
  .receipt .r-ref { font-size: 20px; padding: 10px 20px; letter-spacing: .1em; }
  .receipt .r-sign { flex-direction: column; gap: 10px; }
  .rec-grid { grid-template-columns: 1fr; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .import-grid, .import-choices { grid-template-columns: 1fr; }
  .import-ocr-actions { flex-direction: column; align-items: stretch; }
  .hero-meta { gap: 18px; }
  .float-card { width: 210px; right: -6px; padding: 14px; }
  .public-top .links a:not(.btn) { display: none; }
  .modal-body { padding: 16px 18px; }
  .modal-head, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.3rem; }
  .apply-actions { flex-direction: column-reverse; }
  .apply-actions .btn { width: 100%; }
  .doc-grid { grid-template-columns: 1fr; }
  .choice-item { grid-template-columns: 28px 1fr; }
  .choice-item .rk { width: 28px; height: 28px; font-size: 12px; }
}

/* ---------- Impression ---------- */
@page { size: A4; margin: 12mm; }

#printSheetHost { display: none; }

@media print {
  body { background: #fff !important; }
  body::before, .apply-top, .sheet > .apply-intro, .apply-flash, .apply-grid, .sheet::before, .onbrade, .receipt-actions, .no-print, .apply-legal { display: none !important; }
  body.printing-sheet > *:not(#printSheetHost) { display: none !important; }
  body.printing-sheet #printSheetHost { display: block !important; }
  body.printing-sheet #printSheetHost .receipt { border: 0; box-shadow: none; padding: 0; }
  .sheet { border: 0; box-shadow: none; }
  .receipt-wrap { margin: 0; max-width: none; }
  .receipt { border: 0; box-shadow: none; padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt-success { display: none; }
  .receipt .r-section, .receipt .r-sign, .receipt .r-ref { break-inside: avoid; }
  .doc-head { border-bottom: 1px solid #999; }
  .doc-head .dh-logo img { max-height: 64px !important; max-width: 168px !important; width: auto !important; height: auto !important; }
  .receipt .r-head img { max-height: 58px !important; max-width: 152px !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
