
/* Navigation multi-pages sans View Transition globale : une transition du
   document entier faisait glisser temporairement le header et le menu lors
   du passage vers Annuaire candidat. Les pages restent instantanées et le
   header conserve une position stable. */
html {
  /* Réserve la largeur de la scrollbar même sur les pages courtes afin que
     le header et sa navigation ne se décalent pas entre deux modules. */
  scrollbar-gutter: stable;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/poppins/poppins-latin-400-normal.woff2') format('woff2'),
       url('fonts/poppins/poppins-latin-400-normal.woff') format('woff');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins/poppins-latin-500-normal.woff2') format('woff2'),
       url('fonts/poppins/poppins-latin-500-normal.woff') format('woff');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins/poppins-latin-600-normal.woff2') format('woff2'),
       url('fonts/poppins/poppins-latin-600-normal.woff') format('woff');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/poppins/poppins-latin-700-normal.woff2') format('woff2'),
       url('fonts/poppins/poppins-latin-700-normal.woff') format('woff');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/cormorant-garamond/cormorant-garamond-latin-300-normal.woff2') format('woff2'),
       url('fonts/cormorant-garamond/cormorant-garamond-latin-300-normal.woff') format('woff');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cormorant-garamond/cormorant-garamond-latin-400-normal.woff2') format('woff2'),
       url('fonts/cormorant-garamond/cormorant-garamond-latin-400-normal.woff') format('woff');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff2') format('woff2'),
       url('fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff') format('woff');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond/cormorant-garamond-latin-600-normal.woff2') format('woff2'),
       url('fonts/cormorant-garamond/cormorant-garamond-latin-600-normal.woff') format('woff');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2') format('woff2'),
       url('fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff') format('woff');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2') format('woff2'),
       url('fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff') format('woff');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-mono/ibm-plex-mono-latin-600-normal.woff2') format('woff2'),
       url('fonts/ibm-plex-mono/ibm-plex-mono-latin-600-normal.woff') format('woff');
}
 
:root {
  --navy: #2d323e;
  --navy-2: #1c1f27;
  --navy-soft: #606776;
  --orange: #fb5300;
  --orange-dark: #d94600;
  --orange-tint: #fff1e8;
 
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-soft: #edeef1;
 
  --text: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
 
  --good: #16915c;
  --good-bg: #e9f8f0;
  --mid: #b8790a;
  --mid-bg: #fdf3e0;
  --low: #d13b3b;
  --low-bg: #fceaea;
  --info: #47566e;
  --info-bg: #eef1f5;
 
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
 
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
 
  --font-sans: 'Google Sans', 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Poppins', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}
 
* { box-sizing: border-box; }
 
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
 
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9062rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  right: -110px;
  bottom: -110px;
  width: 620px;
  height: 620px;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle, rgba(251, 83, 0, 0.10), transparent 70%);
}

body::after {
  content: '';
  position: fixed;
  right: -30px;
  bottom: -30px;
  width: 460px;
  height: 460px;
  z-index: -1;
  pointer-events: none;
  background-color: var(--orange);
  opacity: 0.09;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpolyline points='16 11 18 13 22 9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpolyline points='16 11 18 13 22 9'/%3E%3C/svg%3E");
}

body.page-analyse::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='86' fill='none' stroke='%23000' stroke-opacity='0.1' stroke-width='14'/%3E%3Ccircle cx='100' cy='100' r='86' fill='none' stroke='%23000' stroke-opacity='0.16' stroke-width='14' stroke-linecap='round' stroke-dasharray='540' stroke-dashoffset='135' transform='rotate(-90 100 100)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='86' fill='none' stroke='%23000' stroke-opacity='0.1' stroke-width='14'/%3E%3Ccircle cx='100' cy='100' r='86' fill='none' stroke='%23000' stroke-opacity='0.16' stroke-width='14' stroke-linecap='round' stroke-dasharray='540' stroke-dashoffset='135' transform='rotate(-90 100 100)'/%3E%3C/svg%3E");
}

body.page-redaction::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cline x1='20' y1='30' x2='95' y2='30' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='52' x2='80' y2='52' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='74' x2='88' y2='74' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='96' x2='60' y2='96' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cline x1='20' y1='30' x2='95' y2='30' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='52' x2='80' y2='52' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='74' x2='88' y2='74' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3Cline x1='20' y1='96' x2='60' y2='96' stroke='%23000' stroke-opacity='0.14' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.page-annuaire::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='20' y='20' width='20' height='80' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='46' y='30' width='20' height='70' rx='4' fill='%23000' fill-opacity='0.14'/%3E%3Crect x='72' y='12' width='20' height='88' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='20' y='20' width='20' height='80' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='46' y='30' width='20' height='70' rx='4' fill='%23000' fill-opacity='0.14'/%3E%3Crect x='72' y='12' width='20' height='88' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
}

body.page-recherche::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='26' cy='26' r='6' fill='%23000' fill-opacity='0.14'/%3E%3Ccircle cx='50' cy='26' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='74' cy='26' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='26' cy='50' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='50' cy='50' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='74' cy='50' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='26' cy='74' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='50' cy='74' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='74' cy='74' r='6' fill='%23000' fill-opacity='0.14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='26' cy='26' r='6' fill='%23000' fill-opacity='0.14'/%3E%3Ccircle cx='50' cy='26' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='74' cy='26' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='26' cy='50' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='50' cy='50' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='74' cy='50' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='26' cy='74' r='6' fill='%23000' fill-opacity='0.16'/%3E%3Ccircle cx='50' cy='74' r='6' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='74' cy='74' r='6' fill='%23000' fill-opacity='0.14'/%3E%3C/svg%3E");
}

body.page-compte::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='64' cy='46' r='20' fill='%23000' fill-opacity='0.14'/%3E%3Cpath d='M28 104c0-20 16-32 36-32s36 12 36 32' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='64' cy='46' r='20' fill='%23000' fill-opacity='0.14'/%3E%3Cpath d='M28 104c0-20 16-32 36-32s36 12 36 32' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
}

body.page-admin-cvs::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='18' y='26' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='30' y='50' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.14'/%3E%3Crect x='18' y='74' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='18' y='26' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='30' y='50' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.14'/%3E%3Crect x='18' y='74' width='66' height='18' rx='4' fill='%23000' fill-opacity='0.1'/%3E%3C/svg%3E");
}

body.page-admin-users::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='46' cy='56' r='26' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='80' cy='56' r='26' fill='%23000' fill-opacity='0.14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='46' cy='56' r='26' fill='%23000' fill-opacity='0.1'/%3E%3Ccircle cx='80' cy='56' r='26' fill='%23000' fill-opacity='0.14'/%3E%3C/svg%3E");
}

body.page-admin-usage::after {
  opacity: 0.45;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='22' y='60' width='16' height='40' rx='3' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='52' y='36' width='16' height='64' rx='3' fill='%23000' fill-opacity='0.16'/%3E%3Crect x='82' y='48' width='16' height='52' rx='3' fill='%23000' fill-opacity='0.12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Crect x='22' y='60' width='16' height='40' rx='3' fill='%23000' fill-opacity='0.1'/%3E%3Crect x='52' y='36' width='16' height='64' rx='3' fill='%23000' fill-opacity='0.16'/%3E%3Crect x='82' y='48' width='16' height='52' rx='3' fill='%23000' fill-opacity='0.12'/%3E%3C/svg%3E");
}

a { color: inherit; }
 
img, svg { max-width: 100%; height: auto; }
 
::selection { background: var(--navy); color: #fff; }
 
:focus-visible {
  outline: 2px solid var(--navy-soft);
  outline-offset: 2px;
}
 
.app-header, .topbar {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}
 
.header-content, .topbar-inner {

  margin: 0 auto;
  padding: 0.75rem 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
 
.brand { display: flex; align-items: center; gap: 0.7rem; }
 
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8438rem;
  letter-spacing: 0.02em;
}
 
.brand-logo-img {
  max-width: 250px;
  height: 75px;
  flex: none;
  object-fit: contain;
  width:100%
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
 
.brand-name {
  font-family: Cormorant Garamond;
  font-weight: 100;
  font-size: 1.3188rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #fff;
}

.brand-dot { color: var(--orange); }
 
.brand-org { font-size: 0.7812rem; color: rgba(255,255,255,0.55); }
 
.topbar-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7812rem;
  color: rgba(255,255,255,0.65);
}
 
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d68a;
  box-shadow: 0 0 0 0 rgba(53, 214, 138, 0.6);
  animation: pulse-dot 2s infinite;
}
 
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(53, 214, 138, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(53, 214, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 214, 138, 0); }
}
 
.logout-link {
  font-size: 0.7812rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
 
.logout-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
 
.app-main, .page {
  min-height: calc(100vh - 60px);
}
 
.intro-row { margin-bottom: 1.75rem; max-width: 640px; }
 
.intro-row h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6687rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}
 
.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7812rem;
}
 
.app-container, .layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 150px);
  align-items: start;
}

body.page-analyse .app-container {
  grid-template-columns: minmax(0, 1fr);
}
 
.app-sidebar, .steps-nav {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  background: #fff;
  border-right: 1px solid var(--border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
 
.steps-nav-title {
  display: block;
  font-size: 0.7188rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}
 
.steps-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
 
.steps-nav a {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  text-decoration: none;
  padding: 0.4rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
 
.steps-nav a:hover { background: var(--bg); color: var(--navy); }
 
.steps-nav-index {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.steps-nav-label {
  font-size: 0.8438rem;
  font-weight: 500;
  line-height: 1.35;
}
 
.steps-nav-optional {
  display: block;
  font-size: 0.7188rem;
  font-weight: 400;
  color: var(--text-faint);
}
 
.input-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
 
.input-panel-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0.35rem 0;
  font-family: var(--font-sans);
  font-size: 0.9062rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
 
.input-panel-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}
 
.layout.is-collapsed .input-panel-chevron { transform: rotate(-90deg); }
 
.input-panel-summary {
  font-size: 0.7812rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
 
.layout.is-collapsed #matchForm { display: none; }
 
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
 
.upload-col { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
 
.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
 
.field--fill { flex: 1; }
 
.field-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
 
.field-label label {
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--navy);
}
 
.field-optional {
  margin-left: 0.35rem;
  font-size: 0.7188rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
 
.step-chip {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.5rem 1.25rem;
  transition: border-color 0.15s, background 0.15s;
}
 
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
 
.dropzone:hover { border-color: var(--navy-soft); background: var(--bg); }
 
.dropzone.is-dragover {
  border-color: var(--navy);
  background: var(--bg);
  border-style: solid;
}
 
.dropzone.is-error { border-color: var(--low); background: var(--low-bg); }
 
.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  pointer-events: none;
  width: 100%;
}
 
.dropzone-icon { width: 22px; height: 22px; color: var(--text-faint); }
 
.dropzone-text {
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: 0.8438rem;
  font-weight: 500;
  color: var(--navy);
}
 
.dropzone-hint {
  font-size: 0.7188rem;
  color: var(--text-faint);
  max-width: 34ch;
}
 
.dropzone--compact {
  padding: 0.9rem 1rem;
}
 
.dropzone--compact .dropzone-content { flex-direction: row; flex-wrap: wrap; gap: 0.6rem; text-align: left; }
.dropzone--compact .dropzone-text { width: auto; min-width: 0; flex: 1 1 160px; }
.dropzone--compact .dropzone-hint { max-width: none; flex: 1 1 100%; }
 
.file-status {
  margin: 0;
  font-size: 0.7812rem;
  color: var(--text-muted);
  min-height: 1.1em;
  display: flex;
}

.file-status.is-error {
  color: var(--low);
  font-weight: 500;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  padding: 0.4rem 0.5rem 0.4rem 0.5rem;
  background: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin:auto;
  margin-bottom:3%;
  margin-top:2%
}

.file-chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.file-chip-icon svg { width: 12px; height: 12px; }

.file-status-label {
  color: #fff;
  font-weight: 600;
  font-size: 0.7812rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.file-status-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 0;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.file-status-remove svg { width: 11px; height: 11px; }

.file-status-remove:hover {
  background: rgba(255, 255, 255, 0.4);
  color: #fff;
}
 
.quick-note {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
 
.quick-note-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: none;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
 
.quick-note-chevron { width: 16px; height: 16px; color: var(--text-faint); transition: transform 0.2s ease; }
 
.quick-note.is-collapsed .quick-note-chevron { transform: rotate(-90deg); }
 
.quick-note.is-collapsed .quick-note-body { display: none; }
 
.quick-note-body { padding: 0.75rem 0.9rem; }
 
.quick-note textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  color: var(--text);
}
 
#offerText {
  width: 100%;
  min-height: 90%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  color: var(--text);
  background: var(--surface);
  line-height: 20px;
}
 
#offerText:focus { border-color: var(--orange); }
 
.upload-col--offer { height: 100%; }
 
.offer-alt-row[hidden] { display: none; }

.offer-alt-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  /* La zone de collage de texte occupe maintenant tout l'espace restant
     sous la dropzone (voir index.php, étape 4) : sans ce flex:1, sa
     hauteur ne serait plus définie et #offerText (min-height: 90%)
     perdrait sa référence de hauteur. min-height: 0 est nécessaire pour
     qu'un enfant flex en colonne puisse malgré tout se réduire sous sa
     taille de contenu naturelle. */
  flex: 1;
  min-height: 0;
}
 
.offer-alt-label {
  font-size: 0.7812rem;
  color: var(--text-faint);
  font-weight: 500;
}
 
.action-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}
 
.btn-analyze {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--orange);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  text-decoration:none
}
 
.btn-analyze:hover { background: var(--orange-dark); }
.btn-analyze:active { transform: translateY(1px); }
 
.btn-analyze--secondary {
    background: #fb5402;
    color: #ffffff;
}

.btn-analyze--secondary:hover { background: #fb5402;  }

/* Coût visible dans chaque action IA : le texte reste aligné à gauche et la
   pastille est poussée à droite, avec l'icône du jeton immédiatement après
   la valeur. */
.btn-analyze--with-credit {
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 220px;
}

.btn-analyze.btn-analyze--full.btn-analyze--with-credit {
  justify-content: flex-start;
  min-width: 0;
}

.btn-credit-cost {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.28rem;
  margin-left: auto;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  color: inherit;
  font-family: 'Poppins';
  font-size: 0.8438rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-credit-cost__coins {
  width: 17px;
  height: 17px;
  flex: none;
  object-fit: contain;
  margin-bottom:2%
}

.btn-analyze--secondary .btn-credit-cost {
  border-left-color: rgba(25, 24, 50, 0.2);
}

@media (max-width: 560px) {
  .btn-analyze--with-credit:not(.btn-analyze--full) {
    width: 100%;
  }
}
 
.action-help {
  flex-basis: 100%;
  display: grid;
  gap: 0.28rem;
  margin: 0.15rem 0 0.1rem;
  padding: 0.7rem 0.85rem 0.72rem;
  border-left: 2px solid rgba(239, 99, 20, 0.34);
  color: var(--text-faint);
  font-size: 0.7188rem;
  line-height: 1.45;
  background: rgba(255, 249, 244, 0.72);
}

.action-help p {
  margin: 0;
}

.action-help strong {
  color: var(--navy);
  font-weight: 650;
}

/* Repères pédagogiques affichés au début des parcours principaux. */
.beginner-guide {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(251, 83, 0, 0.16);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-md);
  background: rgba(255, 249, 244, 0.78);
  color: var(--text-muted);
  font-size: 0.7812rem;
  line-height: 1.5;
}

.beginner-guide-heading {
  color: var(--navy);
  font-size: 0.7812rem;
  font-weight: 700;
}

.beginner-guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.2rem;
}

.beginner-guide-steps span {
  flex: 1 1 220px;
}

.beginner-guide-steps strong {
  color: var(--orange);
  font-weight: 700;
}

.beginner-guide-note {
  margin: 0.1rem 0 0;
  color: var(--text-faint);
  font-size: 0.7188rem;
}

.beginner-guide--analysis {
  margin-bottom: 1.1rem;
}

.beginner-guide--reverse {
  margin-bottom: 1.1rem;
}

.module-purpose {
  max-width: 760px;
  margin: 0.65rem 0 1.35rem;
  color: var(--text-muted);
  font-size: 0.7812rem;
  line-height: 1.6;
}

.module-purpose--analysis {
  max-width: 820px;
  margin-top: -0.35rem;
}

.module-purpose--reverse {
  max-width: 850px;
  margin-top: -0.25rem;
}

.btn-analyze:disabled,
.btn-analyze.is-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-analyze--secondary:disabled:hover,
.btn-analyze--secondary.is-unavailable:hover {
    background: #fb5402;
    color: #ffffff;
}
 
.btn-icon { width: 16px; height: 16px; }
 
.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
 
.btn-analyze--secondary .btn-spinner {
  border: 2px solid rgba(25,24,50,0.15);
  border-top-color: var(--navy);
}
 
@keyframes spin { to { transform: rotate(360deg); } }

.progress-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.progress-modal[hidden] { display: none; }

.progress-modal.is-closing {
  pointer-events: none;
  animation: progressModalFadeOut 0.9s ease forwards;
}

.progress-modal.is-closing .progress-modal-card {
  animation: progressPopOut 0.9s cubic-bezier(.4, 0, .8, .2) forwards;
}

.progress-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  animation: progressFadeIn 0.18s ease;
}

.progress-modal-card {
  position: relative;
  width: 100%;
  max-width: 220px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 1rem;
  text-align: center;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

@keyframes progressFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes progressPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes progressModalFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes progressPopOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; filter: blur(2px); transform: translateY(-34px) scale(0.68); }
}

.progress-modal-icon {
  width: 260px;
  height: 188px;
  margin: 0 auto;
  position: relative;
}

/* Spinner en anneau classique : un cercle avec un quart de bordure colorée
   qui tourne réellement sur lui-même (transform: rotate), même principe
   que .btn-spinner / .progress-step-spinner mais à l'échelle du popup. */
.progress-logo-loader {
  --logo-progress: 0%;
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.progress-logo-loader img,
.progress-logo-loader-fill {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.progress-logo-loader-base {
  opacity: .18;
}

.progress-logo-loader-fill {
  overflow: hidden;
  background: linear-gradient(
    112deg,
    #fb5300 0%,
    #ffb08e 18%,
    #fb5300 36%,
    #e94400 56%,
    #ff8b5d 74%,
    #fb5300 100%
  );
  background-size: 230% 100%;
  -webkit-mask: url('../image/logo_in.png') center / contain no-repeat;
  mask: url('../image/logo_in.png') center / contain no-repeat;
  clip-path: inset(calc(100% - var(--logo-progress)) 0 0 0);
  transition: clip-path .5s ease;
  animation: progressLogoLiquidFlow 2.8s linear infinite;
}

/* Reflets et ondulations très légers : l’animation continue même lorsque le
   pourcentage ne change plus, comme un liquide qui reste en mouvement dans le
   logo sans modifier son niveau. */
.progress-logo-loader-fill::before,
.progress-logo-loader-fill::after {
  content: '';
  position: absolute;
  left: -55%;
  top: calc(100% - var(--logo-progress) - 11px);
  width: 210%;
  height: 22px;
  pointer-events: none;
  background: rgba(255,255,255,.72);
  clip-path: polygon(
    0 58%, 5% 35%, 10% 18%, 15% 35%, 20% 64%, 25% 80%,
    30% 63%, 35% 30%, 40% 12%, 45% 30%, 50% 62%, 55% 82%,
    60% 60%, 65% 28%, 70% 10%, 75% 30%, 80% 65%, 85% 80%,
    90% 58%, 95% 30%, 100% 18%, 100% 100%, 0 100%
  );
  opacity: .82;
  animation: progressLogoWave 2.4s linear infinite;
}

.progress-logo-loader-fill::after {
  top: calc(100% - var(--logo-progress) - 3px);
  background: rgba(190,40,0,.38);
  clip-path: polygon(
    0 55%, 8% 22%, 16% 50%, 24% 78%, 32% 42%, 40% 16%,
    48% 55%, 56% 82%, 64% 42%, 72% 14%, 80% 52%, 88% 80%,
    96% 42%, 100% 25%, 100% 100%, 0 100%
  );
  opacity: .72;
  animation-duration: 3.4s;
  animation-direction: reverse;
}

@keyframes progressLogoWave {
  from { transform: translateX(-8%); }
  to { transform: translateX(8%); }
}

@keyframes progressLogoLiquidFlow {
  from { background-position: 0% 50%; }
  to { background-position: 230% 50%; }
}

.global-logo-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.97);
}

.global-logo-loader-overlay[hidden] { display: none; }
.global-logo-loader-overlay.is-closing {
  pointer-events: none;
  animation: globalLogoLoaderFadeOut 0.9s ease forwards;
}
.global-logo-loader-overlay.is-closing .global-logo-loader-mark {
  animation: globalLogoLoaderMarkOut 0.9s cubic-bezier(.4, 0, .8, .2) forwards;
}
.global-logo-loader-mark { width: 260px; height: 188px; }
.site-logo-loader-frame {
  display: block;
  border: 0;
  background: #fff;
}
.global-logo-loader-mark.site-logo-loader-frame {
  width: 260px;
  height: 188px;
}
@keyframes globalLogoLoaderFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes globalLogoLoaderMarkOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; filter: blur(2px); transform: translateY(-34px) scale(0.68); }
}
.progress-logo-loader-frame {
  width: 100%;
  height: 100%;
  border: 0;
}
.progress-modal-icon:has(.progress-logo-loader-frame) {
  width: 260px;
  height: 188px;
}

body.page-lot #progressModal .progress-modal-icon {
  width: 260px;
  height: 188px;
  margin: 0 auto;
}

.progress-modal-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.9062rem;
  font-weight: 700;
  color: var(--text);
}

.progress-modal-subtitle {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  color: var(--text-muted);
  min-height: 1.2em;
  transition: opacity 0.25s ease;
}

.progress-modal-subtitle.is-fading { opacity: 0; }

.analysis-mode-modal-card {
  max-width: 460px;
  text-align: left;
}

.analysis-mode-modal-card .progress-modal-subtitle {
  text-align: center;
}

.analysis-mode-modal-title {
  font-family: var(--font-display);
  font-size: 1.4688rem;
  font-weight: 600;
  text-align: center;
}

.analysis-mode-choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.analysis-mode-choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffdfb 0%, #fff8f2 100%);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  font-family: var(--font-sans);
}

.analysis-mode-choice:hover {
  border-color: var(--orange);
  background: var(--orange-tint);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.analysis-mode-choice:active { transform: scale(0.99); }

.analysis-mode-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--orange-tint);
  color: var(--orange);
  transition: background 0.15s ease, color 0.15s ease;
}

.analysis-mode-choice-icon svg {
  width: 19px;
  height: 19px;
}

.analysis-mode-choice:hover .analysis-mode-choice-icon {
  background: var(--orange);
  color: #fff;
}

.analysis-mode-choice-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.analysis-mode-choice-title {
  font-size: 0.7812rem;
  font-weight: 700;
  color: var(--text);
}

.analysis-mode-choice-desc {
  font-size: 0.7812rem;
  color: var(--text-muted);
}

.analysis-mode-disclaimer {
  margin: 0.65rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  color: var(--text-muted);
  text-align: left;
}

.analysis-mode-cancel {
  display: block;
  margin: 1rem auto 0;
}

/* Modal "Ajouter une expérience" (voir setupExpBlockAdders dans script.js) :
   remplace l'ancienne édition inline en contenteditable directement dans
   l'iframe du CV par un formulaire dans un popup, plus lisible. */
.exp-modal-card {
  max-width: 460px;
  text-align: left;
}

.exp-modal-subtitle { text-align: left; }

.exp-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.exp-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.exp-modal-input,
.exp-modal-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  color: var(--text);
}

.exp-modal-textarea { resize: vertical; min-height: 90px; }

.exp-modal-input:focus,
.exp-modal-textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.exp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .exp-modal-row { grid-template-columns: 1fr; }
  .exp-modal-actions { flex-direction: column-reverse; align-items: stretch; }
  .exp-modal-actions .btn-reset,
  .exp-modal-actions .btn-analyze { justify-content: center; }
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-dark) 100%);
  transition: width 0.4s ease;
}

.progress-bar-pct {
  margin: 0.4rem 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--text-faint);
}

/* Le matching individuel est maintenant une génération unique : le logo
   animé est le seul indicateur de remplissage demandé sur cette page. Les
   écrans de conversion en lot conservent leur progression détaillée. */
body.page-analyse #progressModal .progress-bar-track,
body.page-analyse #progressModal .progress-bar-pct,
body.page-analyse #progressModal .progress-steps {
  display: none !important;
}

.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  color: var(--text-faint);
  padding-bottom: 0.65rem;
  transition: color 0.2s ease;
}

.progress-step:last-child { padding-bottom: 0; }

.progress-step-marker {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.progress-step-marker::before {
  content: '';
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 0.65rem;
  background: var(--border);
}

.progress-step:first-child .progress-step-marker::before { display: none; }

.progress-step-num {
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 700;
  color: var(--text-faint);
}

.progress-step-spinner {
  display: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.progress-step-check { display: none; width: 11px; height: 11px; opacity: 0; }
.progress-step-check svg { width: 100%; height: 130%; stroke: #fff; }

.progress-step-label { padding-top: 0.1rem; }

.progress-step.is-active { color: var(--text); font-weight: 600; }
.progress-step.is-active .progress-step-marker { background: var(--orange); border-color: var(--orange); }
.progress-step.is-active .progress-step-marker::before { background: var(--good); }
.progress-step.is-active .progress-step-num { display: none; }
.progress-step.is-active .progress-step-spinner { display: block; }

.progress-step.is-done { color: var(--text-muted); }
.progress-step.is-done .progress-step-marker { background:var(--orange); border-color:var(--orange); }
.progress-step.is-done .progress-step-marker::before { background:var(--orange); }
.progress-step.is-done .progress-step-num,
.progress-step.is-done .progress-step-spinner { display: none; }
.progress-step.is-done .progress-step-check { display: block; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .progress-step-spinner { animation: none; }
}

.progress-cancel-btn {
  margin-top: 1.4rem;
}

.directory-header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  width: 100%;
}

.directory-sidebar .directory-header-actions > a {
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
}

.directory-export-btn {
  margin-left: auto;
  background: #fb5300;
  color: #fff;
  border-color: #fb5300;
}

.directory-export-btn:hover {
  background: #fb5300;
  border-color: #fb5300;
  color: #fff;
}

.reverse-match-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 3vw;
}
.reverse-match-modal[hidden] { display: none; }

.reverse-match-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.reverse-match-panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: min(500px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}

.reverse-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text);
  font-size: 0.9688rem;
  letter-spacing: -0.015em;
}

.reverse-match-close {
  border: none;
  background: none;
  font-size: 1.4688rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
}
.reverse-match-close:hover { background: var(--border-soft); }

.original-cv-modal { padding: 2.5vh 3vw; }
/* Specificite doublee : une regle .reverse-match-panel plus bas dans ce
   fichier fixe width: min(780px, 100%) et l'emporterait sinon. */
.original-cv-panel.original-cv-panel {
  width: min(1000px, 95vw);
  height: 95vh;
  max-height: 95vh;
}
.original-cv-panel .reverse-match-head { flex-shrink: 0; }
.original-cv-body.original-cv-body {
  flex: 1 1 auto;
  padding: 0;
  overflow: hidden;
  display: flex;
}
.original-cv-frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
.original-cv-newtab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.original-cv-newtab-btn:hover { background: var(--border-soft); color: var(--text); }
.original-cv-newtab-btn svg { width: 18px; height: 18px; }

.original-cv-fallback {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
}
/* `display: flex` ci-dessus l'emporte sur [hidden] : sans cette regle, le
   message de repli reste affiche a cote du CV correctement charge. */
.original-cv-fallback[hidden] { display: none !important; }
.original-cv-fallback svg {
  width: 42px;
  height: 42px;
  color: var(--low);
}
.original-cv-fallback p {
  margin: 0;
  max-width: 40ch;
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.dispo-confirm-panel { width: min(440px, 100%); }
.dispo-confirm-panel .reverse-match-body p {
  margin: 0; font-size: 0.8438rem; line-height: 1.55; color: var(--text-muted);
}
.dispo-confirm-actions {
  display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.1rem;
}

.reverse-match-body {
  padding: 1.45rem 1.35rem 1.55rem;
  overflow-y: auto;
  font-family: var(--font-sans);
}

.reverse-match-choice-intro {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.7812rem;
  font-weight: 500;
}
.reverse-match-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.reverse-match-choice-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 174px;
  padding: 1.2rem 1.1rem 1.1rem;
  border: 1px solid #e6e8ed;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #fcfcfd 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}
.reverse-match-choice-card:hover {
  border-color: rgba(251, 83, 0, 0.6);
  background: linear-gradient(145deg, #ffffff 0%, #fff8f3 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}
.reverse-match-choice-card::after {
  position: absolute;
  right: 1.1rem;
  bottom: 0.95rem;
  left: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), rgba(251, 83, 0, 0));
  content: '';
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: opacity 180ms ease, transform 180ms ease;
  display:none
}
.reverse-match-choice-card:hover::after,
.reverse-match-choice-card:focus-visible::after { opacity: 1; transform: scaleX(1); }
.reverse-match-choice-card:active { transform: scale(0.98); }
.reverse-match-choice-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(251, 83, 0, 0.14);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff4eb, #ffe7d6);
  color: var(--orange-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.reverse-match-choice-icon svg { width: 1.3rem; height: 1.3rem; }
.reverse-match-choice-copy { display: grid; gap: 0.45rem; min-width: 0; padding-right: 1.3rem; }
.reverse-match-choice-copy strong { font-size: 0.8438rem; letter-spacing: -0.01em; }
.reverse-match-choice-copy small { color: var(--text-muted); font-size: 0.7188rem; line-height: 1.55; }
.reverse-match-choice-arrow {
  position: absolute;
  top: 1.2rem;
  right: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  color: var(--orange);
  font-size: 0.9688rem;
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease;
}
.reverse-match-choice-card:hover .reverse-match-choice-arrow { background: var(--orange-tint); transform: translateX(3px); }
.reverse-match-back {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.7188rem;
  cursor: pointer;
}
.reverse-match-back:hover { color: var(--orange-dark); }

.reverse-match-label {
  display: block;
  font-size: 0.7188rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.reverse-match-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  color: var(--text);
  resize: vertical;
  min-height: 110px;
}
.reverse-match-textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.reverse-match-file-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.reverse-match-file-row--top {
  margin-top: 0;
  justify-content: space-between;
}

.reverse-match-inline-card > .file-status { margin-top: 0.4rem; }

.reverse-match-or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 0.9rem;
  color: var(--text-faint);
  font-size: 0.7188rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.reverse-match-or-divider::before,
.reverse-match-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.reverse-match-file-label {
  font-size: 0.7188rem;
  color: var(--text-faint);
}

.reverse-match-file-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 0.35rem 0.75rem;
    font-size: 0.7812rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    background: #fb5300;
}
.reverse-match-file-btn:hover { border-color: var(--orange); }

.reverse-match-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
}

.reverse-match-hint {
  font-size: 0.7188rem;
  color: var(--text-faint);
}

/* Renvoi croisé entre "Matching inversé" et "Recherche multi-critères" :
   les deux modules interrogent la même bibliothèque de candidats avec un
   algorithme très proche (voir api/reverse_match.php et
   api/search_candidates.php), seul le type d'entrée change (offre précise
   vs. critères libres). Ce petit encart aide à choisir le bon module
   avant de lancer un appel IA, plutôt que de laisser l'utilisateur
   découvrir après coup qu'il s'est trompé d'outil. */
.module-crosslink {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.7812rem;
  color: var(--text-muted);
  background: var(--surface-soft, rgba(0,0,0,0.03));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
  margin: 0.7rem 0 1rem;
}
.module-crosslink svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  color: var(--orange);
}
.module-crosslink a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}
.module-crosslink a:hover { text-decoration: underline; }

.reverse-match-error { margin: 0.8rem 0 0; }

/* ---- Popup "Nouveau matching" (annuaire.php) : reprend le CV déjà généré
   d'un candidat et le compare à une nouvelle offre, sans quitter la page
   (voir api/anonymize.php mode=full, réutilisé tel quel). ---- */
.new-matching-panel { width: min(760px, 100%); }

.new-matching-intro {
  margin: 0 0 1.1rem;
  font-size: 0.8438rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.new-matching-intro strong { color: var(--text); }

.new-matching-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 2.5rem 1rem;
  text-align: center;
}
.new-matching-loading[hidden] { display: none; }
.new-matching-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--border-soft);
  border-top-color: var(--orange);
  animation: new-matching-spin 0.8s linear infinite;
}
@keyframes new-matching-spin { to { transform: rotate(360deg); } }
.new-matching-loading p {
  margin: 0;
  font-size: 0.8438rem;
  color: var(--text-muted);
}

.new-matching-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.new-matching-result-actions {
  margin-top: 0.9rem;
  justify-content: flex-end;
}
.new-matching-result-label {
  font-size: 0.7812rem;
  color: var(--text-faint);
}
.new-matching-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7812rem;
  font-weight: 700;
  background: var(--border-soft);
  color: var(--text);
}
.new-matching-score-badge[data-level="high"] { background: #e6f5ea; color: #1f7a3c; }
.new-matching-score-badge[data-level="mid"] { background: #fef3e0; color: #a15c00; }
.new-matching-score-badge[data-level="low"] { background: #fdeaea; color: #b3261e; }

.new-matching-frame-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 55vh;
}
.new-matching-result-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

@media (max-width: 720px) {
  .new-matching-frame-card { height: 48vh; }
}

.reverse-match-loading {
  margin: 1rem 0 0;
  font-size: 0.7812rem;
  color: var(--text-muted);
  text-align: center;
}

.reverse-match-results {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* La liste du matching inversé réutilise le gabarit .candidate-item de
   l'annuaire (nom en gras à gauche, ville + pastille à droite sur la même
   ligne) — voir renderResultsList() dans matching-inverse.php. Seuls la
   ligne de badge/type de profil et le motif restent spécifiques à ce
   module. */
.reverse-match-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reverse-match-result-meta {
  font-size: 0.7188rem;
  color: var(--text-muted);
}

.reverse-match-result-motif {
  font-size: 0.7812rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
  display:none
}

.reverse-match-empty {
  font-size: 0.8438rem;
  color: var(--text-faint);
  text-align: center;
  padding: 1rem 0 0.2rem;
}

@media print{.reverse-match-modal{display:none !important}}

.reverse-match-inline-card {
  margin: 0 0 1.5rem;
}
.reverse-match-inline-card .reverse-match-textarea {
  margin-top: 0.5rem;
}

.reverse-saved-offers {
  padding: 0;
  border-bottom: 0;
  margin-bottom: 5%;
}
.reverse-saved-offers .reverse-match-label {
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}
.reverse-saved-offers-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}
.saved-offer-select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 2.25rem 0 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.7188rem;
  cursor: pointer;
}
.saved-offer-select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(251, 83, 0, 0.1);
}

/* Carte de résultat du matching inversé : une seule ligne par candidat,
   nom (+ ville/motif) à gauche, contrôle d'audit ("Générer l'audit" ou
   badge "déjà audité") à droite — voir renderResultsList() et
   buildAuditControl() dans matching-inverse.php. */
/* Spécificité renforcée (.candidate-item.reverse-match-item) pour
   l'emporter sur les règles .candidate-item définies plus bas dans ce
   fichier (display/flex-direction/gap) : même spécificité à un seul
   sélecteur, la déclaration la plus basse gagnerait sinon. */
.candidate-item.reverse-match-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Le contrôle d'audit doit rester aligné sur la ligne du nom (première
   ligne de .reverse-match-item-info), même quand la ville ou le motif
   ajoutent des lignes en dessous à gauche. */
.candidate-item.reverse-match-item .reverse-match-audit-btn,
.candidate-item.reverse-match-item .reverse-match-audit-badge {
  margin-top: 0.05rem;
}

.reverse-match-item-info {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (max-width: 480px) {
  .candidate-item.reverse-match-item {
    flex-wrap: wrap;
  }
  .reverse-match-item-info {
    flex-basis: 100%;
  }
}

.reverse-match-audit-badge {
  font-size: 0.7188rem;
  color: var(--text-muted);
}

.reverse-match-audit-badge--exact {
  color: #1a7f3c;
  font-weight: 600;
}

.reverse-match-audit-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-tint);
  border: 1px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.reverse-match-audit-btn:hover {
  background: var(--orange);
  color: #fff;
}
.reverse-match-audit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.user-menu-item--active {
  color: var(--orange);
  font-weight: 600;
}
.user-menu-item--active svg { stroke: var(--orange); }

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
 
.btn-reset svg { width: 14px; height: 14px; }
 
.btn-reset:hover { background: var(--bg); color: var(--navy); border-color: var(--navy-soft); }

/* `display:inline-flex` ci-dessus l'emporte sur la feuille de style du
   navigateur pour [hidden] : sans cette regle, un bouton masque en JS
   (btn.hidden = true) reste visible et parait inerte au clic. */
.btn-reset[hidden] { display: none !important; }
.btn-analyze[hidden] { display: none !important; }
 
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--orange);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
}
 
.error-msg {
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--low);
  font-size: 0.7188rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.error-msg[hidden] { display: none; }

.error-msg-text {
  flex: 1 1 auto;
}

.error-msg-retry {
  flex: none;
  font-family: inherit;
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--low);
  background: #fff;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.error-msg-retry:hover {
  background: var(--low);
  color: #fff;
}
 
.profile-picker {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
 
.profile-picker-label {
  display: block;
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.55rem;
}
 
.profile-picker-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
 
.profile-picker-row .audit-select {
  flex: 1 1 auto;
  min-width: 220px;
  max-width: none;
}
 
.profile-picker-alt {
  margin: 0.65rem 0 0;
  font-size: 0.7812rem;
  color: var(--text-faint);
}
 
.duplicate-warning-modal {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.duplicate-warning-modal[hidden] { display: none; }

.duplicate-warning-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  animation: progressFadeIn 0.18s ease;
}

.duplicate-warning-modal .duplicate-warning {
  position: relative;
  width: min(100%, 460px);
  max-height: 85vh;
  overflow-y: auto;
  margin-top: 0;
  padding: 2rem 1.75rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: none;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  text-align: left;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

.duplicate-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--mid-bg);
  color: var(--mid);
}

.duplicate-warning-icon svg { width: 22px; height: 22px; }

.duplicate-warning-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: none;
  background: none;
  font-size: 1.3687rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-faint);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}
.duplicate-warning-close:hover { background: var(--bg); color: var(--text); }

.delete-confirm-actions { flex-direction: column; }
.delete-confirm-actions > button { width: 100%; }
/* Sélecteur par id : priorité garantie sur la règle générique
   ".duplicate-warning-modal .duplicate-warning-actions" (colonne
   inversée en dessous de 520px, voir plus bas), pour conserver l'ordre
   "cette fiche" / "candidat entier" y compris sur mobile. */
#deleteConfirmActions { flex-direction: column; }
#deleteConfirmActions > button { width: 100%; }

.duplicate-warning-modal h2 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9688rem;
  font-weight: 700;
  text-align: center;
}

.duplicate-warning-message {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  line-height: 1.55;
  text-align: center;
}

.duplicate-warning-modal .duplicate-warning-actions {
  justify-content: center;
  margin-top: 1.15rem;
}

.duplicate-warning-modal .duplicate-warning-actions > button {
  flex: 1 1 0;
  justify-content: center;
}

@media (max-width: 520px) {
  .duplicate-warning-modal .duplicate-warning { padding: 1.5rem 1.15rem 1.15rem; }
  .duplicate-warning-modal .duplicate-warning-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .duplicate-warning-modal-backdrop,
  .duplicate-warning-modal .duplicate-warning { animation: none; }
}

.duplicate-warning {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--mid-bg);
  border: 1px solid #f2d9a6;
  border-radius: var(--radius-md);
}
 
.duplicate-warning-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--mid);
}
 
.duplicate-warning-title svg { width: 18px; height: 18px; flex: none; }
 
.duplicate-warning-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.7812rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
 
.duplicate-warning-item-date { font-family: var(--font-mono); color: var(--text-faint); margin-right: 0.4rem; }
 
.duplicate-warning-new {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.85rem;
}
 
.duplicate-warning-new label {
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--text-muted);
}
 
.duplicate-warning-new input {
  font: inherit;
  font-size: 0.7188rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text);
}
 
.duplicate-warning-new input:focus {
  outline: none;
  border-color: var(--accent, #14513C);
}
 
.duplicate-warning-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Message d'erreur du formulaire de la modale "Modifier les coordonnées"
   (#contactEditModal) : même emplacement que .duplicate-warning-message
   mais aligné à gauche et en rouge, cohérent avec les autres erreurs de
   formulaire de l'annuaire (voir .audit-select-rename-error). */
.contact-edit-error {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.7812rem;
  color: #b3261e;
  text-align: left;
}
.contact-edit-error[hidden] { display: none; }

/* Formulaire de modification des coordonnées dans l’aperçu généré. */
.contact-edit-field {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
  text-align: left;
}
.contact-edit-field label {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 500;
  white-space: nowrap;
}
.contact-edit-field input {
  width: 100%;
  min-width: 0;
  height: 2.35rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  color: var(--text);
  font: 400 0.7812rem/1.3 var(--font-sans);
}
.contact-edit-field input:focus {
  outline: none;
  border-color: var(--accent, #14513C);
  box-shadow: 0 0 0 2px rgba(20, 81, 60, 0.12);
}
 
.btn-link-discreet {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.7812rem;
  color: var(--text-faint);
  text-decoration: underline;
  cursor: pointer;
}
 
.btn-link-discreet:hover { color: var(--text-muted); }
 
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
 
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
 
.card-header--tinted {
  justify-content: flex-start;
  gap: 0.5rem;
}
 
.card-icon { width: 17px; height: 17px; }
 
.card-eyebrow {
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
 
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.25rem 0 1rem;
}
 
.results-title {
  margin: 0;
  font-size: 1.3687rem;
  font-weight: 300;
  letter-spacing: -0.005em;
  color: var(--navy);
}
 
.cv-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
 
.cv-preview-card { padding: 0; overflow: hidden; }
 
.cv-preview-frame {
  width: 100%;
  height: 80vh;
  border: none;
  display: block;
  background: #fff;
}
 
.score-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
}
 
.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}
 
.gauge-ring-wrap { position: relative; width: 140px; height: 140px; }
 
.gauge-ring { width: 140px; height: 140px; transform: rotate(-90deg); }
 
.gauge-ring-track {
  fill: none;
  stroke: var(--border-soft);
  stroke-width: 11;
}
 
.gauge-ring-fill {
  fill: none;
  stroke: var(--good);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}
 
.gauge-ring-fill.is-mid { stroke: var(--mid); }
.gauge-ring-fill.is-low { stroke: var(--low); }
 
.gauge-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
 
.gauge-value {
  font-family: var(--font-mono);
  font-size: 1.9688rem;
  font-weight: 600;
  color: var(--good);
  line-height: 1;
}
 
.gauge-value.is-mid { color: var(--mid); }
.gauge-value.is-low { color: var(--low); }
 
.gauge-caption {
  margin-top: 0.3rem;
  font-size: 0.7188rem;
  color: var(--text-faint);
}
 
.verdict-card { display: flex; flex-direction: column; }
 
.verdict {
  margin: 0;
  font-size: 0.9688rem;
  line-height: 1.6;
  color: var(--text);
}
 
.criteria-header { margin-bottom: 0.9rem; }
 
.btn-reanalyze {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
 
.btn-reanalyze:hover:not(:disabled) { background: var(--navy-2); }
 
.btn-reanalyze:disabled { opacity: 0.4; cursor: not-allowed; }
 
.btn-reanalyze .btn-spinner { border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; }
 
.table-wrap { overflow-x: auto; }
 
.criteria-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8438rem;
}
 
.criteria-table th {
  text-align: left;
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  padding: 0.5rem 0.6rem;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
 
.criteria-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  color: var(--text);
}
 
.criteria-table tbody tr:hover { background: var(--bg); }
 
.criteria-table tr.criteria-row-new { animation: row-flash 1.2s ease; }
 
@keyframes row-flash {
  0% { background: var(--orange-tint); }
  100% { background: transparent; }
}
 
.col-actions-head { text-align: right; }
 
.col-critere { font-weight: 600; color: var(--navy); }
 
.col-value { color: var(--text-muted); }
 
.col-actions { text-align: right; white-space: nowrap; }
 
.criteria-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 1.5rem 0;
}
 
.taux-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
}
 
.taux-good { background: var(--good-bg); color: var(--good); }
.taux-mid  { background: var(--mid-bg); color: var(--mid); }
.taux-low  { background: var(--low-bg); color: var(--low); }
.taux-nc   { background: var(--border-soft); color: var(--text-faint); }
 
.criteria-type-select {
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  color: var(--text);
  background: var(--surface);
}
 
.btn-remove-criterion {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 0.9688rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
}
 
.btn-remove-criterion:hover { color: var(--low); background: var(--low-bg); }
 
.criteria-add-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
 
.criteria-add-input {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  color: var(--text);
}
 
.criteria-add-select {
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  color: var(--text);
  background: var(--surface);
}
 
.btn-add-criterion {
  background: var(--orange-tint);
  color: var(--orange-dark);
  border: 1px solid #ffd9c2;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  font-weight: 600;
  cursor: pointer;
}
 
.btn-add-criterion:hover { background: #ffe4d4; }
 
.analysis-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
 
.analysis-columns--uneven { grid-template-columns: 1.3fr 1fr; }
 
.analysis-col--positive .card-header--tinted { color: var(--good); }
.analysis-col--positive .card-icon { color: var(--good); }
 
.analysis-col--gap .card-header--tinted { color: var(--low); }
.analysis-col--gap .card-icon { color: var(--low); }
 
.analysis-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.8438rem;
  color: var(--text);
}
 
.analysis-list--numbered { padding-left: 1.35rem; }
 
.recommendation p,
#recommendationText,
#audioTranscriptText {
  margin: 0;
  font-size: 0.9062rem;
  line-height: 1.65;
  color: var(--text);
}
 
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  min-height: 1px;
}
 
@media (max-width: 980px) {
  .app-container, .layout { grid-template-columns: 1fr; }
 
  .app-sidebar, .steps-nav {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    padding: 0.75rem 1rem;
  }
 
  .steps-nav ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
 
  .steps-nav-optional { display: none; }
 
  .upload-grid { grid-template-columns: minmax(0, 1fr); }
 
  .score-row { grid-template-columns: 1fr; }
 
  .analysis-columns,
  .analysis-columns--uneven { grid-template-columns: 1fr; }

  .workspace-shell { flex-direction: column; }

  .help-rail {
    position: static;
    flex-basis: auto;
    width: 100%;
  }

  .help-rail-reopen { position: static; margin-bottom: 1rem; }

  .sidebar-footer { display: none; }
}
 
@media (max-width: 620px) {
  .page { padding: 1.5rem 1rem 3rem; }
 
  .topbar-inner { padding: 0.75rem 1rem; }
 
  .brand-org { display: none; }
 
  .topbar-status span:last-child { display: none; }
 
  .intro-row h1 { font-size: 1.3687rem; }
 
  .action-row { flex-direction: column; align-items: stretch; }
 
  .action-row .btn-analyze,
  .action-row .btn-reset { justify-content: center; }
  .action-help { margin-top: 0.15rem; font-size: 0.7188rem; }

  .app-sidebar .nav-section:not(.nav-section--results) { display: none; }
}
 
@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
  .btn-spinner { animation: none; }
  .gauge-ring-fill { transition: none; }
}
 
.btn-home {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-size: 0.8438rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 0.2s;
}

.btn-home:hover {
  background: var(--orange-dark);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.btn-home svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section--results[hidden] {
  display: none;
}

.nav-title {
  display: block;
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s;
}

.step-item:hover {
  background: var(--bg);
  color: var(--navy);
}

.step-item.active {
  background: var(--orange-tint);
  color: var(--orange-dark);
}

.step-number {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--border-soft);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item.active .step-number {
  background: var(--orange);
  color: #fff;
}

.step-number-text,
.step-check {
  grid-area: 1 / 1;
}

.step-number {
  display: grid;
}

.step-check {
  display: none;
  width: 13px;
  height: 13px;
}

.step-item.is-complete .step-number {
  background: #fb5300;
  color: #fff;
}

.step-item.is-complete .step-number-text { display: none; }
.step-item.is-complete .step-check { display: block; }

.step-content {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.step-title {
  font-size: 0.7812rem;
  font-weight: 400;
  color: currentColor;
}

.step-desc {
  font-size: 0.7188rem;
  opacity: 0.7;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.7188rem;
  color: var(--text-faint);
}

.content-area {
  padding: 2.5rem;
  max-width: 1520px;
  width: 100%;
  margin:auto
}

@media (max-width: 760px) {
  .content-area { padding: 1.25rem 1rem 2.5rem; }

  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.1rem;
  }
  .header-titles { text-align: left; width: 100%; }
  .header-titles h1 { font-size: 1.5688rem; text-align: left; }
  .header-titles .subtitle { font-size: 0.8438rem; text-align: left; }

  .workspace-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .ws-tab {
    justify-content: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.7188rem;
    gap: 0.35rem;
  }
  .ws-tab svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
}

.workspace-shell {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.workspace-content {
  flex: 1 1 0;
  min-width: 0;
}

.help-rail {
  flex: 0 0 300px;
  position: sticky;
  top: calc(60px + 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.4rem 1.6rem;
}

.help-rail[hidden] { display: none; }

.help-rail-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 1.0688rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.help-rail-close:hover { background: var(--bg); color: var(--navy); }

.help-rail-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
}

.help-rail-lead {
  margin: 0 0 1.4rem;
  font-size: 0.7188rem;
  line-height: 1.55;
  color: #0f172a;
}

.help-rail-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.help-rail-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.help-rail-steps li div { display: flex; flex-direction: column; gap: 0.15rem; }

.help-rail-steps strong {
  font-size: 0.7812rem;
  color: var(--navy);
  font-weight: 600;
}

.help-rail-steps span {
  font-size: 0.7188rem;
  line-height: 1.45;
}

.help-rail-step-num {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-rail-tips {
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-soft);
}

.help-rail-tips-title {
  margin: 0 0 0.6rem;
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a;
}

.help-rail-tips ul {
  margin: 0;
  padding: 0 0 0 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.help-rail-tips li {
  font-size: 0.7188rem;
  line-height: 1.5;
  color: #0f172a;
}

.help-rail-reopen {
flex: 0 0 auto;
    align-self: flex-start;
    position: sticky;
    top: calc(60px + 2.5rem);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--orange);
    color: #fff;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 0.9688rem;
    font-weight: 700;
}

.help-rail-reopen:hover { color: var(--orange); border-color: var(--orange); }

@media (max-width: 1300px) {
  .help-rail { flex-basis: 260px; }
}

.workspace-header {
    display: flex;
    margin-bottom: 2.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
    flex-direction: column;
    align-content: stretch;
}

.header-titles h1 {
  margin: 0 0 0.3rem;
  font-family: 'Poppins';
  font-size: 26.5px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
}

.title-dot { color: var(--orange); font-weight: 600; }

.workspace-nav {
  display: flex;
  gap: 0.4rem;
  background: var(--border-soft);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-top:1%
}

/* La règle ci-dessus (display: flex) écrasait sinon l'attribut HTML
   "hidden" porté par #workspaceNav (voir index.php) : cette barre
   d'onglets Édition/Matching/CV-Synthèse ne sert qu'à naviguer entre les
   candidats en traitement PAR LOT (ZIP, voir assets/script.js —
   workspaceNav.hidden = false uniquement dans ce cas) ; en mode "un seul
   CV", la navigation équivalente se fait déjà dans la colonne de droite
   (voir #dpvDocNav) et cette barre doit rester masquée. */
.workspace-nav[hidden] {
  display: none;
}

.ws-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.ws-tab svg {
  width: 17px;
  height: 17px;
}

.ws-tab:hover {
  color: var(--navy);
}

.ws-tab.active {
    background: #fb5300;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.ws-view {
  display: none;
}

.ws-view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.view-empty-state[hidden] {
  display: none;
}

.view-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  max-width: 380px;
  margin: 3.5rem auto;
  padding: 2.2rem 1.5rem;
}

.view-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-tint);
  color: var(--orange);
}

.view-empty-icon svg { width: 24px; height: 24px; }

.view-empty-icon--logo {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
}
.view-empty-icon--logo img { width: 100px; height: auto; display: block; }

.view-empty-state h3 {
  margin: 0;
  font-size: 0.9688rem;
  font-weight: 700;
  color: var(--navy);
}

.view-empty-state p {
  margin: 0;
  font-size: 0.8438rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.view-empty-state .btn-analyze {
  margin-top: 0.3rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
}

.brand-tagline {
  font-size: 0.7188rem;
  color: rgba(255,255,255,0.5);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1.25rem;
}

.header-nav {
  display: flex;
  align-items: flex-start;
  gap: 3.15rem;
  flex-wrap: wrap;
}

.header-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 82px;
  padding: 0.5rem 0.3rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.72);
  font-family: Poppins, sans-serif;
  font-size: 0.7188rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.header-nav-item span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.header-nav-item svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}

.header-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.header-nav-item:hover svg { color: rgba(255,255,255,0.85); }

.header-nav-item.is-active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.header-nav-item.is-active svg { color: var(--orange); }

@media (max-width: 1279px) {
  .header-nav { display: none; }
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7812rem;
  color: rgba(255,255,255,0.6);
}

.status-indicator {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-divider {
  width: 0px;
  height: 24px;
  background: rgba(255,255,255,0.15);
}

.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: Poppins;
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
}

.quota-ring {
  flex: none;
  width: 16px;
  height: 16px;
}

.quota-ring-track {
  stroke: currentColor;
  opacity: 0.25;
}

.quota-ring-progress {
  stroke: currentColor;
  transition: stroke-dashoffset 0.5s ease;
}

.quota-badge-text {
  line-height: 1;
}

.quota-badge--unlimited {
  color: rgba(255,255,255,0.5);
}

.quota-badge--good {
  background: rgba(16, 145, 92, 0.18);
  border-color: rgba(16, 145, 92, 0.4);
  color: #6fe3b4;
}

.quota-badge--mid {
  background: rgba(184, 121, 10, 0.2);
  border-color: rgba(184, 121, 10, 0.45);
  color: #f3c471;
  display:none
}

.quota-badge--low,
.quota-badge--exceeded {
  background: rgba(209, 59, 59, 0.2);
  border-color: rgba(209, 59, 59, 0.45);
  color: #ff9d9d;
}

.online-badge {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-family: Poppins;
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.online-badge:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
}

.online-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.22);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: rgba(255,255,255,0.8);
  font-size: 0.8438rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.btn-logout svg {
  width: 17px;
  height: 17px;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.user-menu-trigger .status-text {
    color: rgba(255, 255, 255, 0.85);
    font-family: poppins;
    font-size: 0.7812rem;
    font-weight: 500;
}

.user-menu-chevron {
  width: 16px;
  height: 16px;
  color: rgba(255,255,255,0.6);
  transition: transform 0.2s ease;
}

.user-menu-trigger[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 0.4rem;
  z-index: 50;
}

.user-menu-dropdown.is-open {
  display: block;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.7188rem;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s;
}

.user-menu-item:hover {
  background: var(--bg);
}

.user-menu-item svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-faint);
}

.user-menu-item--danger {
  color: #d1373b;
}

.user-menu-item--danger svg {
  color: #d1373b;
}

.user-menu-item--danger:hover {
  background: rgba(209, 59, 59, 0.08);
}

.user-menu-section {
  margin: 0.1rem 0;
}

.user-menu-section-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 34px;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.7188rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.user-menu-section-toggle::-webkit-details-marker {
  display: none;
}

.user-menu-section-toggle::marker {
  content: '';
}

.user-menu-section-toggle:hover {
  background: var(--bg);
  color: var(--text);
}

.user-menu-section-toggle > svg:first-child {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-faint);
}

.user-menu-section-chevron {
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: var(--text-faint);
  transition: transform 0.2s ease;
}

.user-menu-section[open] .user-menu-section-chevron {
  transform: rotate(180deg);
}

.user-menu-section-items {
  padding-left: 0.35rem;
  border-left: 1px solid var(--border-soft);
  margin: 0.1rem 0 0.2rem 1.45rem;
}

.user-menu-section-items .user-menu-item {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

button.user-menu-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

/* Le bouton "Revoir le tutoriel" (includes/tutorial.php) réutilise
   .tutorial-reopen-link, pensée à l'origine pour un lien discret dans
   l'en-tête de page (assets/tutorial.css) : padding nul, texte plus petit
   et gris clair, espacement réduit. Cette feuille (tutorial.css) est
   chargée après celle-ci, donc ces règles l'emportaient sur
   .user-menu-item à spécificité égale, d'où le décalage et la couleur
   différente dans le menu déroulant. On force ici le même rendu que les
   autres items du menu, avec une sélection plus spécifique qui l'emporte
   quel que soit l'ordre de chargement des feuilles. */
.user-menu-dropdown .tutorial-reopen-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.7188rem;
  font-weight: 400;
  color: var(--text);
}

.user-menu-dropdown .tutorial-reopen-link:hover {
  color: var(--text);
  background: var(--bg);
}

.user-menu-dropdown .tutorial-reopen-link svg {
  width: 17px;
  height: 17px;
  color: var(--text-faint);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 0.4rem 0.2rem;
}

.hub-main {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hub-main::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(251, 83, 0, 0.14), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  display:none
}

.hub-container {
  position: relative;
  z-index: 1;
  flex: 1;
  background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -6px -6px;
}

.hub-intro {
  text-align: center;
  margin-bottom: 2.75rem;
}

.hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.hub-eyebrow::before,
.hub-eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--orange);
}

.hub-intro h1 {
  font-family: 'Poppins';
  font-weight: 100;
  font-size: 1.9688rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.hub-intro .title-dot {
  color: var(--orange);
}

.hub-intro .subtitle {
  color: var(--text-muted);
  font-size: 0.8438rem;
  margin: 0;
}

.hub-featured {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: linear-gradient(135deg, #ffffff 45%, var(--orange-tint) 160%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2.75rem 3rem;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Pour les invités, la démonstration est le point d'entrée commercial :
   elle est plus visible sans changer les cartes des autres comptes. */
.page-hub--guest .hub-featured {
  min-height: 238px;
  padding: 3.25rem 3.5rem;
  border: 2px solid rgba(251, 83, 0, .28);
  background: linear-gradient(120deg, #fff 30%, #fff4ec 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
.page-hub--guest .hub-featured-icon {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
.page-hub--guest .hub-featured-icon svg { width: 39px; height: 39px; }
.page-hub--guest .hub-featured-body { max-width: 650px; gap: .7rem; }
.page-hub--guest .hub-featured-body .hub-card-title { font-size: 1.7688rem; }
.page-hub--guest .hub-featured-body .hub-card-desc { max-width: 560px; font-size: 0.7812rem; line-height: 1.5; }
.page-hub--guest .hub-featured-tag { font-size: 0.7188rem; color: var(--orange-dark); }
.page-hub--guest .hub-featured-cta--guest {
  align-self: flex-start;
  margin-top: .85rem;
  padding: .8rem 1.1rem;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 0.9688rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
.page-hub--guest a.hub-featured:hover .hub-featured-cta--guest {
  gap: .7rem;
  color: #fff;
  background: var(--orange-dark);
}
.page-hub--guest .hub-featured-cost {
  display: none;
  margin-top: .15rem;
  color: var(--text-muted);
  font-size: 0.7188rem;
  font-weight: 600;
}

a.hub-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  border-color: var(--orange);
}

a.hub-featured:hover .hub-featured-cta {
  gap: 0.65rem;
  color: var(--orange-dark);
}

.hub-ring-decoration {
  position: absolute;
  right: -54px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  z-index: -1;
}

@media (max-width: 720px) {
  .hub-ring-decoration {
    opacity: 0.5;
    right: -90px;
  }
}

.hub-featured-icon {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.hub-featured-icon svg {
  width: 32px;
  height: 32px;
}

.hub-featured-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 500px;
}

.hub-featured-tag {
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dark);
}

.hub-featured-body .hub-card-title {
  font-size: 1.4688rem;
}

.hub-featured-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.6rem;
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--orange);
  transition: gap 0.2s ease, color 0.2s ease;
}

.hub-featured-cta svg {
  width: 16px;
  height: 16px;
}

.hub-featured-cta__right,
.hub-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.hub-featured-cta__right {
  margin-left: auto;
}

.hub-featured-cta .btn-credit-cost,
.hub-card-action .btn-credit-cost {
  margin-left: 0;
  padding: 0.38rem 0.5rem;
  border: 1px solid rgba(251, 83, 0, 0.22);
    border-bottom-left-radius: 15px;
    background: #fb5300;
    color: #fff;
    font-size: 0.7188rem;
    position: absolute;
    right: 0;
    top: 0;
}

.hub-featured-cta .btn-credit-cost__coins,
.hub-card-action .btn-credit-cost__coins {
  width: 13px;
  height: 13px;
}

@media (max-width: 720px) {
  .hub-featured {
    flex-direction: column;
    text-align: center;
    padding: 2.25rem 1.75rem;
  }
  .page-hub--guest .hub-featured { min-height: 0; padding: 2.25rem 1.35rem; }
  .page-hub--guest .hub-featured-icon { width: 76px; height: 76px; }
  .page-hub--guest .hub-featured-body .hub-card-title { font-size: 1.4187rem; }
  .page-hub--guest .hub-featured-body .hub-card-desc { font-size: 0.7812rem; }
  .page-hub--guest .hub-featured-cta--guest { align-self: center; width: 100%; justify-content: center; font-size: 0.9062rem; }
  .hub-featured-body {
    max-width: none;
  }
}

.hub-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 720px) {
  .hub-secondary-grid {
    grid-template-columns: 1fr;
  }
}

.hub-soon-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  opacity: 0.85;
  cursor: not-allowed;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.hub-soon-card:hover {
  opacity: 1;
  border-color: var(--text-faint);
}

.hub-soon-card .hub-card-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  background: var(--border-soft);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-soon-card .hub-card-icon svg {
  width: 22px;
  height: 22px;
}

.hub-soon-card .hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.hub-soon-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hub-card-title {
  font-size: 1.0188rem;
  font-weight: 600;
  color: var(--text);
}

.hub-card-desc {
    font-size: 0.7188rem;
    color: #3b465e;
    line-height: 1.5;
}

.hub-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hub-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
}

.hub-available-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.5rem 1.6rem;
  background: linear-gradient(160deg, #ffffff 55%, var(--orange-tint) 200%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hub-card-deco {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 118px;
  height: 118px;
  z-index: -1;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hub-available-card:hover .hub-card-deco {
  transform: scale(1.06) rotate(4deg);
}

.hub-soon-card .hub-card-deco {
  opacity: 0.5;
}

.hub-available-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  border-color: var(--orange);
}

.hub-available-card:hover .hub-available-arrow {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: translateX(2px);
}

.hub-available-card .hub-card-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.hub-available-card .hub-card-icon svg {
  width: 21px;
  height: 21px;
}

.hub-available-card .hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
  padding-top: 0.15rem;
}

.hub-card-action {
  flex: none;
  align-self: center;
}

.hub-available-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--good);
}

.hub-available-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-bg);
}

.hub-available-arrow {
  flex: none;
  align-self: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hub-available-arrow svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 440px) {
  .hub-available-card {
    flex-wrap: wrap;
  }

  .hub-card-action {
    width: 100%;
    justify-content: flex-end;
    padding-left: 57px;
  }
}

.hub-quota-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--low-bg);
  border: 1px solid rgba(209, 59, 59, 0.3);
  color: var(--low);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  font-size: 0.7188rem;
  line-height: 1.5;
  margin: -0.75rem 0 1.75rem;
}

.hub-quota-banner svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
}

.hub-featured--locked {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.62;
}

.hub-featured--locked:hover {
  transform: none;
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.hub-featured-tag--locked {
  color: var(--low);
}

.hub-featured-tag--maintenance {
  color: var(--info);
}

.hub-featured-cta--locked {
  color: var(--text-faint);
}

.hub-featured-cta--maintenance {
  color: var(--info);
}

.hub-available-card--locked {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.62;
}

.hub-available-card--locked:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.hub-available-badge--locked {
  color: var(--low);
}

.hub-available-badge--maintenance {
  color: var(--info);
}

.maintenance-admin-banner {
  margin: 0 0 1.75rem;
}

.is-locked {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.directory-quota-banner {
  margin: 0 0 1.25rem;
}

@media (max-width: 480px) {
  .hub-available-arrow {
    display: none;
  }
}

.hub-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.7812rem;
  margin-top: 3rem;
}

.hub-footer p {
  margin: 0;
}

.directory-page {
  max-width: 100%;
  margin: 0 auto;
  padding: 2.5rem;
}

@media (max-width: 760px) {
  .directory-page { padding: 1.25rem 0rem 2.5rem; }

  .directory-header {
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.1rem;
  }
  .directory-header h1 { font-size: 1.5688rem; }
  .directory-header .subtitle { font-size: 0.8438rem; }

  .directory-header-actions > * { flex: 1 1 auto; justify-content: center; }
}

.directory-home-link {
    margin: 0 0 1.5rem;
    display: inline-flex;
    background: #fb5300;
    color: #fff;
    text-decoration: none;
    border: #fb5300;
	max-width:100px
}

.directory-home-link:hover {
    margin: 0 0 1.5rem;
    display: inline-flex;
    background: #fb5300;
    color: #fff;
    text-decoration: none;
    border: #fb5300;
}

.directory-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 0px solid var(--border-soft);
}

.directory-header h1 {
  margin: 0 0 0.3rem;
  font-family: 'Poppins';
  font-size: 26.5px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
}

.directory-header .subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8438rem;
}
.directory-header .subtitle-hint {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.8438rem;
}
.directory-header .subtitle-hint a {
  color: var(--orange);
  text-decoration: underline;
}
.directory-header .subtitle-hint a:hover {
  color: var(--orange-dark);
}

/* Ancienne mise en page en grille (filtres pleine largeur au-dessus de 2
   colonnes) — encore utilisée par recherche.php et matching-inverse.php,
   qui n'ont pas (encore) la disposition "sidebar" ci-dessous. */
.directory-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .directory-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

.directory-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.directory-sidebar {
  flex: 0 0 460px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.directory-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.directory-toolbar-row .df-head {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.directory-toolbar-row .df-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 600;
}

.directory-toolbar-row .df-toggle:hover {
  background: var(--bg);
  border-color: var(--navy-soft);
  color: var(--navy);
}

.directory-preview-card {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
}

@media (max-width: 900px) {
  .directory-layout {
    flex-direction: column;
  }
  .directory-sidebar {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }
}

.directory-filters-bar {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.directory-filters-bar.is-collapsed {
  display: none;
}

.df-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
}

.df-intro {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.1rem;
  color: var(--text-muted);
  font-size: 0.7188rem;
  line-height: 1.45;
}

.df-intro strong {
  color: var(--navy);
  font-size: 0.7812rem;
}

.df-row .df-section {
  flex: 1 1 0;
  min-width: 220px;
  padding-top: 0;
  border-top: none;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border-soft);
}

.df-row .df-section--ville {
  padding-left: 0;
  border-left: none;
}

@media (max-width: 900px) {
  .df-row {
    flex-direction: column;
    gap: 1rem;
  }
  .df-row .df-section {
    padding-left: 0;
    padding-top: 1rem;
    border-left: none;
    border-top: 1px solid var(--border-soft);
  }
  .df-row .df-section--ville {
    padding-top: 0;
    border-top: none;
  }
}

.df-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.df-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.1187rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.df-toggle:hover {
  color: var(--orange);
}

.df-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.df-toggle-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 180ms ease-out;
}

.df-toggle[aria-expanded="true"] .df-toggle-icon {
  transform: rotate(180deg);
}

.df-row[hidden] {
  display: none;
}

.df-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1187rem;
  font-weight: 500;
  color: var(--text);
}

.df-reset-btn {
  font-size: 0.7188rem;
  color: var(--text-faint);
  padding: 0.2rem 0.4rem;
}

.df-reset-btn:hover {
  color: var(--orange);
}

.df-section {
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.df-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.df-section h4 {
  margin: 0 0 0.6rem;
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.df-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.df-range {
  padding-top: 0.15rem;
}

.df-range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.df-range-sep {
  color: var(--text-faint);
  font-weight: 400;
}

.df-range-track {
  position: relative;
  height: 30px;
}

.df-range-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  transform: translateY(-50%);
  background: var(--border);
  border-radius: 999px;
}

.df-range-track-fill {
  position: absolute;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: var(--orange);
  border-radius: 999px;
  pointer-events: none;
}

.df-range-input {
  position: absolute;
  top: 30%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none;
}

.df-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--orange);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  cursor: pointer;
}

.df-range-input::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--orange);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  cursor: pointer;
}

.df-range-input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  background: transparent;
  height: 4px;
}

.df-range-input::-moz-range-track {
  background: transparent;
  height: 4px;
}

.df-range-input:focus {
  outline: none;
}

.df-range-input:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--orange-tint);
}

.df-range-input:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--orange-tint);
}

.df-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7812rem;
  color: var(--text);
  cursor: pointer;
}

.df-check input[type="checkbox"] {
  flex: none;
  width: 15px;
  height: 15px;
  accent-color: var(--orange);
  cursor: pointer;
}

.df-check--sub {
  margin-top: 0.5rem;
  font-size: 0.7812rem;
  color: var(--text-muted);
}

.df-hint {
  margin: 0.5rem 0 0;
  font-size: 0.7188rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.df-field-label {
  display: block;
  font-size: 0.7812rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.df-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  color: var(--text);
  background: var(--bg);
}

.df-input:focus {
  outline: none;
  border-color: var(--orange);
}

.df-tag-row {
  display: flex;
  gap: 0.4rem;
}

.df-tag-row .df-input {
  flex: 1;
}

.df-tag-add-btn {
  flex: none;
  width: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.0188rem;
  font-weight: 600;
  color: var(--text-muted);
}

.df-tag-add-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.df-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
}

.df-tags:empty {
  margin: 0;
}

.df-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--orange-tint);
  border: 1px solid var(--orange-soft, var(--orange));
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.65rem;
  font-size: 0.7188rem;
  color: var(--navy);
}

.df-tag-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9062rem;
  line-height: 1;
  color: var(--text-faint);
  padding: 0.1rem 0.2rem;
}

.df-tag-chip-remove:hover {
  color: var(--orange);
}

.df-tag-search-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
}

.df-tag-search-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.df-tag-status {
  margin: 0.6rem 0 0;
  font-size: 0.7188rem;
  color: var(--text-muted);
}

.df-tag-status--error {
  color: var(--red, #c0392b);
}

.df-city-field {
  position: relative;
}

.df-city-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  max-height: 240px;
  overflow-y: auto;
}

.df-city-suggestion {
  padding: 0.45rem 0.6rem;
  font-size: 0.7188rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.df-city-suggestion:hover {
  background: var(--orange-tint);
  color: var(--navy);
}

.df-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  color: var(--text);
  background: var(--bg);
  margin-top: 0.6rem;
  cursor: pointer;
}

.df-select:focus {
  outline: none;
  border-color: var(--orange);
}

.df-select:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.df-tag-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.df-tag-badge {
  font-size: 0.7188rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.df-tag-badge--yes {
  background: #e4f5ea;
  color: #1f7a45;
}

.df-tag-badge--no {
  background: #f5e9e4;
  color: #9a4a2a;
  text-decoration: line-through;
  opacity: 0.75;
}

.candidate-item--partial {
  opacity: 0.92;
}

.directory-list-separator {
  margin: 0.6rem 0 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border-soft);
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.directory-list-card {
  position: sticky;
  top: calc(60px + 1.75rem);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px - 3.5rem);
}

/* Repli du titre + formulaire de recherche du matching inversé (voir
   matching-inverse.php) une fois des résultats affichés, pour remonter la
   liste des candidats sans avoir à scroller. */
.reverse-match-intro.is-collapsed { display: none; }

.reverse-match-intro-restore {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.reverse-match-intro-restore:not([hidden]) { display: inline-flex; }

/* Barre loupe + métier audité (à droite de la loupe, bloc replié). */
.reverse-match-intro-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  min-width: 0;
}

.reverse-match-intro-bar[hidden] { display: none; }

.reverse-match-intro-offer {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.9062rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reverse-match-intro-offer[hidden] { display: none; }

.reverse-match-intro-restore svg { width: 19px; height: 19px; }

/* Bouton bascule : loupe (bloc replié) <-> chevron (bloc ouvert). */
.reverse-match-intro-restore .rmi-icon-collapse { display: none; }
.reverse-match-intro-restore.is-open .rmi-icon-search { display: none; }
.reverse-match-intro-restore.is-open .rmi-icon-collapse { display: block; }

.reverse-match-intro-restore:hover {
  background: var(--bg);
  border-color: var(--navy-soft);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.reverse-match-intro-restore:active { transform: translateY(1px); }

@media (max-width: 900px) {
  .directory-list-card {
    position: static;
    max-height: none;
  }
}

.directory-search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.directory-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  background: var(--bg);
}

.directory-search svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-faint);
}

.directory-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  color: var(--text);
  outline: none;
}

.directory-refresh-btn {
  flex: none;
  padding: 0.55rem;
}

.directory-refresh-btn svg { width: 16px; height: 16px; }

.directory-count {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.7188rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.directory-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.15rem;
}

.directory-loading,
.directory-empty {
  color: var(--text-muted);
  font-size: 0.7188rem;
  padding: 1.25rem 0.25rem;
  text-align: center;
}

.candidate-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.candidate-item:hover {
  border-color: var(--navy-soft);
  background: var(--bg);
}

.candidate-item.active {
  border-color: var(--orange);
  background: var(--orange-tint);
  box-shadow: var(--shadow-sm);
}

.candidate-item-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.candidate-item-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-item-date {
  flex: none;
  font-family: Poppins;
  font-size: 0.7188rem;
  color: var(--text-faint);
}

.candidate-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.candidate-item-offer {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7812rem;
  color: var(--text-muted);
}

.candidate-item-ville {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7188rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-item-ville svg {
  width: 11px;
  height: 11px;
  flex: none;
}

.badge-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7188rem;
}
.badge-score[hidden] { display: none; }

.candidate-item-meta .badge-score {
  font-size: 0.7188rem;
  padding: 0.1rem 0.45rem;
  display:none
}

.directory-preview-header .badge-score {
  font-size: 0.9688rem;
  padding: 0.35rem 0.9rem;
}

.badge-score--good { color: var(--good); background: var(--good-bg);font-family:'Poppins' }
.badge-score--mid { color: var(--mid); background: var(--mid-bg);font-family:'Poppins' }
.badge-score--low { color: var(--low); background: var(--low-bg);font-family:'Poppins' }
.badge-score--unknown { color: var(--text-faint); background: var(--border-soft);font-family:'Poppins' }

/* Relances de disponibilité candidat (voir includes/disponibilite.php) */
.dispo-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  margin: 0 0 1rem;
}

.dispo-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.dispo-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dispo-toggle-track {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.2s ease;
  flex: none;
}

.dispo-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.dispo-toggle input:checked + .dispo-toggle-track { background: var(--good); }
.dispo-toggle input:checked + .dispo-toggle-track::after { transform: translateX(15px); }
.dispo-toggle input:disabled + .dispo-toggle-track { opacity: 0.5; cursor: not-allowed; }

.dispo-status {
  font-size: 0.7188rem;
  font-weight: 400;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  flex: none;
}

.dispo-status--attente { color: var(--mid); background: var(--mid-bg); }
.dispo-status--disponible { color: var(--good); background: var(--good-bg); }
.dispo-status--indisponible { color: var(--low); background: var(--low-bg); }
.dispo-status--inactive { color: var(--text-faint); background: var(--border-soft); }

.dispo-error {
  width: 100%;
  font-size: 0.7812rem;
  color: var(--low);
}

.dispo-hint {
  width: 100%;
  font-size: 0.7188rem;
  color: var(--text-faint);
  margin-bottom:0;
  margin-top:0
}

/* Bulle d'information (survol / focus) à côté de la case de disponibilité */
.dispo-info { position: relative; display: inline-flex; align-items: center; flex: none; }
.dispo-info[hidden] { display: none; }
.dispo-info-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: 50%; color: var(--text-faint, #94a3b8); cursor: help;
}
.dispo-info-btn:hover, .dispo-info-btn:focus-visible { color: var(--text-main, #0f172a); outline: none; }
.dispo-info-bubble {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 280px; padding: 9px 12px; border-radius: 8px;
  background: #0f172a; color: #f8fafc; font-size: 0.7188rem; font-weight: 400; line-height: 1.45; text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease;
}
.dispo-info-bubble::before {
  content: ''; position: absolute; bottom: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-bottom-color: #0f172a;
}
.dispo-info:hover .dispo-info-bubble, .dispo-info:focus-within .dispo-info-bubble { opacity: 1; visibility: visible; }

/* Score d'adéquation : mention IA obligatoire affichée dans une bulle au survol / focus */
.directory-preview-audit-score-line { display: block; align-items: center; gap: 0.3rem;text-align:center }
.score-info .dispo-info-btn { cursor: help; }
.score-info-bubble { width: 240px; max-width: 240px; white-space: normal; }

.candidate-item-meta .dispo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dispo-dot--attente { background: var(--mid); }
.dispo-dot--disponible { background: var(--good); }
.dispo-dot--indisponible { background: var(--low); }

/* Pastille "N fiches" affichée sur la ligne d'un candidat regroupant
   plusieurs fiches (voir renderGroup() dans annuaire.php) — le détail de
   ces fiches se consulte via le menu déroulant "Poste comparé" du panneau
   de droite, pas via un sous-menu dans la liste. */
.candidate-group-count {
  flex: none;
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--orange-tint);
  border-radius: 999px;
  padding: 0 0.5rem;
}

.badge-noscore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: var(--font-mono);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7188rem;
  color: var(--text-faint);
  background: var(--border-soft);
}

/* Pastille "CV neutre" : distingue, dans la liste et le panneau de droite,
   une fiche CV + synthèse NEUTRE (pas de comparaison à un poste précis —
   voir profile_kind_of() dans includes/profile_listing.php) d'un audit
   d'adéquation ciblé sur une offre. Même gabarit visuel que .badge-noscore
   ci-dessus, dans une classe dédiée pour ne pas mélanger les deux sens. */
.badge-profile-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.7188rem;
  white-space: nowrap;
}
.badge-profile-kind--neutral {
  color: var(--text-faint);
  background: var(--border-soft);
}

/* Même pastille, déclinée pour le menu déroulant "Poste comparé" (voir
   updatePosteSwitch() dans annuaire.php), à côté du libellé de la fiche. */
.audit-select-option-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.7188rem;
  color: var(--text-faint);
  background: var(--border-soft);
  margin-left: 0.4rem;
}

.directory-preview-card {
  min-height: 60vh;
  padding: 1.5rem;
}

.directory-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  max-width: 600px;
  margin: 0rem auto;
  padding: 1rem 1.5rem;
}

.directory-preview-empty[hidden] {
  display: none;
}

.directory-preview-empty h3 {
  margin: 0;
  font-size: 0.9688rem;
  font-weight: 600;
  color: var(--navy);
}

.directory-preview-empty p {
  margin: 0;
  font-size: 0.7188rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.directory-preview-header {

  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
  padding:15px
}

.directory-preview-header > .directory-preview-identity {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: break-word;
}

/* Photo candidate détectée dans le PDF/DOCX d'origine (voir
   includes/cv_photo.php côté serveur, champ 'photo' de la fiche). N'existe
   QUE dans cet en-tête d'aperçu de l'annuaire, jamais dans le document
   CV/synthèse lui-même (voir annuaire.php, selectProfile()). */
.directory-preview-photo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft, #f2f3f5);
  float:left;
  margin-right:3%
}

.directory-preview-photo[hidden] {
  display: none;
}

/* Conversion en lot : pastille de la photo détectée, à gauche du nom dans
   la liste du lot (voir assets/lot.js, renderQueue()). */
.lot-item-ident {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.lot-item-photo {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft, #f2f3f5);
}

.directory-preview-name {
    margin: 0 0 0.3rem;
    font-family: 'Poppins';
    font-size: 1.1387rem;
    font-weight: 600;
    color: var(--text);
}

.directory-preview-meta {
display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    margin: 0.25rem 0 0;
    font-size: 0.7188rem;
    color: #48576a;
    font-style: italic;
    margin-bottom: 2%;
}

/* Coordonnées (e-mail / téléphone / ville) : sous-groupe qui peut passer à
   la ligne indépendamment du bouton "Modifier", pour que ce dernier reste
   ancré à droite de la ligne tant qu'il reste de la place (voir
   .directory-preview-meta ci-dessus, en space-between). */
.directory-preview-contacts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  min-width: 0;
  text-transform:lowercase
}

.ac-timeline-slot{display:none}

/* Bouton "Modifier" les coordonnées (e-mail, téléphone, ville) — ouvre la
   modale #contactEditModal. Non-italique contrairement au reste de la
   ligne, pour rester lisible comme une action et non comme une info. */
.directory-preview-edit-btn,
.directory-preview-edit-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
  margin-left: auto;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  font-style: normal;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.directory-preview-edit-btn svg,
.directory-preview-edit-contact svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.directory-preview-edit-btn:hover,
.directory-preview-edit-contact:hover {
  border-color: var(--accent, #14513C);
  color: var(--accent, #14513C);
}

.directory-preview-contact {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.35rem;
  color: inherit;
  line-height: 1.35;
}

.directory-preview-contact svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--orange);
}

.directory-preview-contact-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-preview-meta[hidden] {
  display: none;
}

.directory-preview-poste-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 2rem;
}

.directory-preview-poste-switch[hidden] {
  display: none;
}

.directory-preview-poste-switch label {
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}

.audit-select-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audit-select-row .audit-select-trigger { flex: 1 1 auto; }

.audit-select-rename-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: #ff5700;
    color: var(--text-faint);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.audit-select-rename-btn:hover {
  border-color: var(--navy-soft);
  color: var(--text);
  background: #fb5300e0;
}

.audit-select-rename-btn svg { width: 14px; height: 14px; color:#fff }

.audit-select-rename-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audit-select-rename-form[hidden] { display: none; }

.audit-select-rename-form input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.7188rem;
  padding: 6px 10px;
  border: 1px solid var(--orange);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 87, 0, 0.12);
}

.audit-select-rename-form input:focus { outline: none; }

.audit-select-rename-confirm,
.audit-select-rename-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--good-bg);
  color: var(--good);
}

.audit-select-rename-cancel {
  background: var(--low-bg);
  color: var(--low);
}

.audit-select-rename-confirm svg,
.audit-select-rename-cancel svg { width: 14px; height: 14px; }

.audit-select-rename-confirm:disabled,
.audit-select-rename-cancel:disabled {
  opacity: 0.55;
  cursor: default;
}

.audit-select-rename-error {
  margin: 0.35rem 0 0;
  font-size: 0.7188rem;
  color: var(--low);
}

.audit-select-rename-error[hidden] { display: none; }

.audit-select {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 22rem;
}

.audit-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  font-size: 0.7188rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.audit-select-trigger:hover {
  border-color: var(--navy-soft);
}

.audit-select-trigger:focus-visible,
.audit-select-trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 87, 0, 0.12);
}

.audit-select-trigger--static {
  cursor: default;
}

.audit-select-trigger--static:hover {
  border-color: var(--border-soft);
}

.audit-select-trigger--static .audit-select-chevron {
  visibility: hidden;
}

.audit-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-select-chevron {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-faint);
  transition: transform 0.15s ease;
}

.audit-select-trigger[aria-expanded="true"] .audit-select-chevron {
  transform: rotate(180deg);
  color: var(--orange);
}

.audit-select-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  max-height: 15rem;
  overflow-y: auto;
}

.audit-select-list[hidden] {
  display: none;
}

.audit-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.7812rem;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.audit-select-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-select-option-end {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}

.audit-select-option-rename {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  flex: none;
}

.audit-select-option-rename svg { width: 12px; height: 12px; }
.audit-select-option-delete:hover { color: #c0392b; }

.audit-select-option-rename:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }

.audit-select-option.is-selected .audit-select-option-rename:hover { background: rgba(255, 255, 255, 0.25); }

.audit-select-option:not(:last-child) {
  margin-bottom: 2px;
}

.audit-select-option:hover {
  background: var(--orange-tint);
  color: var(--navy);
}

.audit-select-option.is-selected {
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}

.audit-select-option--pending {
  color: var(--muted-text, #6b7280);
  cursor: default;
}

.audit-select-option--pending:hover {
  background: transparent;
  color: var(--muted-text, #6b7280);
}

.directory-preview-candidat-maj {
  display: none;
  padding: 3px 10px;
  font-size: 0.7188rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
}

.directory-preview-audit-summary {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 0.85rem 0 0;
}

.directory-preview-audit-score {
    display: flex;
    flex: 0 0 78px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
    padding: 0.35rem 0 0 0.15rem;
}

.directory-preview-audit-score .badge-score {
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.9688rem;
    line-height: 1;
}

.directory-preview-audit-score-label {
    color: var(--text-faint);
    font-size: 0.7188rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
    white-space: nowrap;
}

.directory-preview-verdict {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
    font-size: 0.7812rem;
    color: #2d323e;
    background: #f7f7f7;
    padding: 0.95rem 1rem;
    border-radius: 11px;
}

.directory-preview-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
}
.directory-preview-tags[hidden] { display: none; }

.directory-preview-tag {
  display: inline-block;
  font-size: 0.7188rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.directory-preview-actions {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.directory-preview-actions .btn-analyze,
.directory-preview-actions .btn-reset {
  font-size: 0.7188rem;
}

.directory-document-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  /* La marge basse négative (-2rem) faisait chevaucher cette barre avec
     la carte d'aperçu du CV juste en dessous (.directory-preview-frame-card) :
     son bord blanc arrondi venait recouvrir le bas de la barre — bouton
     "Nouveau matching" à moitié caché, onglets qui semblent se superposer.
     `flex-wrap` évite en plus le débordement horizontal du bouton quand la
     carte d'aperçu est plus étroite que le seuil de la media query
     ci-dessous (celle-ci ne regarde que la largeur de la fenêtre, pas celle
     de cette carte, qui peut être bien plus étroite sur un écran large avec
     la colonne de gauche ouverte). */
  margin: 1rem 1px 1.1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fafbf9;
}

.analysis-section{padding:0 20px}

.directory-document-nav-label {
  color: var(--muted);
  font-size: 0.7188rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.directory-document-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}
.directory-document-nav-secondary {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.directory-document-nav-btn {
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border-color: var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 0.7188rem !important;
  font-weight: 600;
}

.directory-document-nav-btn svg {
  width: 14px;
  height: 14px;
}

.directory-document-nav-btn.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.directory-document-nav-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.directory-document-nav-spinner {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(25,24,50,0.15);
  border-top-color: var(--navy);
  animation: spin 0.7s linear infinite;
  display: inline-block;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* L’attribut HTML `hidden` doit rester prioritaire sur le display du spinner.
   Sans cette règle, le display:inline-block ci-dessus le laisse visible même
   après que la génération du CV/Synthèse est terminée. */
.directory-document-nav-spinner[hidden] {
  display: none;
}

.directory-document-nav-btn.is-active .directory-document-nav-spinner {
  border-color: rgba(255,255,255,0.35);
  border-top-color: #fff;
}

.directory-document-nav-btn.is-processing {
  font-style: italic;
  opacity: 0.85;
}

/* Pendant la génération en arrière-plan, reprendre le logo liquide du
   panneau de progression principal plutôt qu’un simple anneau. */
.directory-document-nav-spinner.progress-logo-loader {
  width: 30px;
  height: 20px;
  border: 0;
  border-radius: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  animation: none;
  flex: 0 0 auto;
}
.directory-document-nav-spinner.progress-logo-loader[hidden] {
  display: none;
}
.directory-document-nav-spinner.progress-logo-loader .progress-logo-loader-base,
.directory-document-nav-spinner.progress-logo-loader .progress-logo-loader-fill {
  width: 100%;
  height: 100%;
}
.directory-document-nav-spinner.site-logo-loader-frame {
  width: 44px;
  height: 30px;
  border: 0;
  border-radius: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  animation: none;
  flex: 0 0 auto;
}
.directory-document-nav-spinner.site-logo-loader-frame[hidden] {
  display: none;
}

.directory-document-nav-original {
  text-decoration: none;
}

.directory-document-nav-new-matching {
  margin-left: auto;
  font-size: 0.7188rem !important;
  padding: 0.5rem 1.1rem;
  white-space: nowrap;
}
.directory-document-nav-secondary .directory-document-nav-original,
.directory-document-nav-secondary .directory-document-nav-new-matching {
  width: 100%;
  justify-content: center;
  margin-left: 0;
}

.directory-document-nav-new-matching.is-locked {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 720px) {
  .directory-document-nav-new-matching { margin-left: 0; width: 100%; justify-content: center; }
}

.btn-reset--danger:hover {
  background: var(--low-bg);
  color: var(--low);
  border-color: var(--low);
}

.directory-preview-error {
  margin-bottom: 1rem;
}

.directory-preview-frame-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Coût et solde prévisionnel affichés au point de décision des actions IA. */
.credit-action-note {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm, 8px);
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.7812rem;
  line-height: 1.5;
}
.credit-action-note--insufficient {
  border-color: var(--mid);
  background: var(--mid-bg);
  color: var(--text);
}
.credit-action-note--insufficient a { color: var(--orange-dark); font-weight: 700; }
.credit-action-note--unlimited { background: var(--good-bg); color: var(--good); }
.credit-action-note a { text-underline-offset: 2px; }
.credit-action-note__hint {
  margin: 0.35rem 0 0.75rem;
  color: var(--text-faint);
  font-size: 0.7188rem;
  line-height: 1.45;
}

.directory-preview-locked-note {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.7188rem;
  line-height: 1.45;
}
.directory-preview-locked-note a { font-weight: 700; text-underline-offset: 2px; }

.hub-quota-banner--feature-locked a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.directory-preview-frame-card .cv-preview-frame {
  height: 100vh;
}

@media (max-width: 760px) {

  body { font-size: 0.9688rem; line-height: 1.55; }

  .header-content, .topbar-inner {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }
  .brand-org, .brand-tagline, .header-divider { display: none; }
  .brand-name { font-size: 1.0188rem; letter-spacing: 0.08em; }
  .brand-mark, .brand-logo { width: 32px; height: 32px; font-size: 0.7812rem; }


  .header-actions { gap: 0.5rem 0.6rem; }
  .online-badge { font-size: 0.7188rem; padding: 0.3rem 0.55rem; }
  .online-badge-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .user-menu-trigger {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .user-menu-trigger .status-text { display: none; }
  .user-menu-chevron { width: 20px; height: 20px; }

  .user-menu-dropdown {
    position: fixed;
    /* top est calcule en JS (juste sous le header) a chaque ouverture */
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    min-width: 0;
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 0 0 20px 20px;
    border: none;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.32);
    padding: 0.5rem 0.5rem calc(0.85rem + env(safe-area-inset-bottom));
  }
  .user-menu-item {
    padding: 0.95rem 0.9rem;
    font-size: 0.9688rem;
    min-height: 48px;
  }
  .user-menu-item svg { width: 20px; height: 20px; }
  .user-menu-section-toggle {
    padding: 0.95rem 0.9rem;
    min-height: 48px;
    font-size: 0.9688rem;
  }
  .user-menu-section-toggle > svg:first-child { width: 20px; height: 20px; }
  .user-menu-section-items { margin-left: 1.6rem; }
  .user-menu-divider { margin: 0.5rem 0.3rem; }

  .hub-main { padding: 1.5rem 1rem 2.5rem; }
  .hub-intro h1 { font-size: 1.3188rem; }
  .hub-intro .subtitle { font-size: 0.9062rem; }
  .hub-available-card { padding: 1.25rem; gap: 0.9rem; }
  .hub-card-icon { width: 44px; height: 44px; border-radius: 12px; }
  .hub-card-icon svg { width: 20px; height: 20px; }
  .hub-card-title { font-size: 0.9688rem; }
  .hub-card-desc { font-size: 0.8438rem; }
  .hub-available-arrow { width: 36px; height: 36px; }
  .hub-featured { padding: 2rem 1.5rem; gap: 1.25rem; }

  .btn-analyze,
  .btn-analyze--secondary {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 0.9062rem;
    padding: 0.9rem 1.1rem;
  }
  .btn-reset {
    min-height: 46px;
    font-size: 0.8438rem;
    justify-content: center;
  }
  .action-row,
  .directory-preview-actions,
  .directory-document-nav,
  .duplicate-warning-actions,
  .reverse-match-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .directory-document-nav-buttons {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .directory-document-nav-buttons .directory-document-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    white-space: nowrap;
  }
  .directory-document-nav-buttons .directory-document-nav-btn svg {
    width: 13px;
    height: 13px;
  }
  .directory-document-nav-secondary { gap: 0.5rem; }
  body.page-analyse .directory-preview-card {
    width: calc(100% + .5rem);
    margin-left: -.25rem;
    padding: .7rem;
  }
  body.page-analyse .directory-preview-frame-card {
    margin-left: -.15rem;
    margin-right: -.15rem;
    border-radius: 12px;
  }
  body.page-analyse .directory-preview-frame-card .cv-preview-frame {
    width: 100%;
    min-width: 0;
  }
  body.page-analyse #draftPreviewBody { width: 100%; }
  .action-row > *,
  .directory-preview-actions > *,
  .duplicate-warning-actions > * {
    width: 100%;
  }

  input, select, textarea, .reverse-match-textarea {
    font-size: 0.7188rem !important;
  }
  .field-label label { font-size: 0.9062rem; }
  .dropzone { padding: 1.15rem; }
  .dropzone-text { font-size: 0.9062rem; }
  .dropzone-hint { font-size: 0.7812rem; }

  .card, .admin-card { padding: 1.15rem; }
  .directory-filters-bar,
  .directory-list-card,
  .directory-preview-card { padding: 1rem; }

  .steps-nav ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }
  .steps-nav a { white-space: nowrap; }

  table:not(.cvs-table):not(.usage-table):not(.users-table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .reverse-match-modal { padding: 0; }
  .reverse-match-panel {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .reverse-match-body {
    padding-bottom: calc(1.3rem + env(safe-area-inset-bottom));
  }
  .reverse-match-choice-grid { grid-template-columns: 1fr; }
  .reverse-match-choice-card { min-height: 0; }

  body::before, body::after { opacity: 0.05 !important; }
}

@media (max-width: 420px) {
  .hub-intro h1 { font-size: 1.1687rem; }
  .brand-name { font-size: 0.9688rem; }
  .hub-card-title { font-size: 0.9062rem; }
}

@media (hover: none) and (pointer: coarse) {
  .hub-available-card:hover,
  a.hub-featured:hover,
  .card:hover {
    transform: none;
  }
}

@media (min-width: 901px) {
  .lot-shell {
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
  }
}

.lot-info-banner {
  margin-bottom: 1.5rem;
  background: #fbfafa;
  border-color: rgba(71, 86, 110, 0.18);
  color: var(--info);
}

.lot-list-card {
  gap: 0.9rem;
}

.lot-offer-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lot-offer-field label {
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--text);
}
.lot-offer-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
  padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.7188rem;
  color: var(--text);
  background: var(--surface);
}
.lot-offer-field textarea:focus {
  outline: none;
  border-color: var(--navy-soft);
}
.lot-offer-field textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.lot-offer-hint {
  font-size: 0.7188rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.lot-dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lot-dropzone:hover { border-color: var(--navy-soft); background: var(--bg); }
.lot-dropzone.is-dragover { border-color: var(--orange); background: var(--orange-tint); }
.lot-dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.lot-dropzone .dropzone-content {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.lot-dropzone .dropzone-icon { width: 22px; height: 22px; color: var(--text-faint); }
.lot-dropzone .dropzone-text { font-size: 0.8438rem; font-weight: 600; color: var(--text); }
.lot-dropzone .dropzone-hint { font-size: 0.7188rem; color: var(--text-faint); }

.lot-default-mode {
  padding: 0.1rem 0.1rem 0;
}

.lot-batch-actions {
  display: flex;
  gap: 0.6rem;
}
.lot-batch-actions .btn-analyze { flex: 1; }

.lot-queue {
  max-height: calc(100vh - 60px - 20rem);
}

.lot-item {
  cursor: pointer;
}
.lot-item:disabled {
  cursor: default;
  opacity: 0.75;
}

.lot-item-status {
  font-size: 0.7188rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  flex: none;
}
.lot-item-status--attente { color: var(--text-faint); background: var(--border-soft); }
.lot-item-status--encours { color: var(--orange-dark); background: var(--orange-tint); }
.lot-item-status--termine { color: var(--good); background: var(--good-bg); }
.lot-item-status--erreur { color: var(--low); background: var(--low-bg); }
.lot-item-status--ignore { color: var(--text-faint); background: var(--border-soft); }
.lot-item-status--doublon { color: var(--good); background: var(--good-bg); }
.lot-item-status--doublon-warn { color: var(--orange-dark); background: var(--orange-tint); }

/* Doublon détecté (voir assets/lot.js, api/lot_check_duplicates.php). */
.lot-item--doublon { cursor: default; }
.lot-item-skip-note {
  color: var(--text-faint);
  font-size: 0.7812rem;
}
/* Message d'information neutre (ni erreur, ni alerte). */
.lot-info-msg {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--border-soft);
  color: var(--navy);
  font-size: 0.7812rem;
  line-height: 1.45;
}
.lot-info-msg[hidden] { display: none; }
.lot-item-dup-note {
  color: var(--orange-dark);
  font-size: 0.7812rem;
}

.lot-recovery-btn {
  margin: 6px 0 2px 12px;
  padding: 6px 10px;
  border: 1px solid var(--orange, #fb5300);
  border-radius: 8px;
  background: #fff;
  color: var(--orange-dark, #c64200);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.lot-recovery-btn:hover { background: var(--orange-tint, #fff3eb); }
.lot-recovery-btn:disabled { opacity: .6; cursor: wait; }
.lot-item-error {
  color: var(--low);
  font-size: 0.7812rem;
}

.unsaved-guard-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.unsaved-guard-modal[hidden] { display: none; }

.unsaved-guard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  animation: progressFadeIn 0.18s ease;
}

.unsaved-guard-card {
  position: relative;
  width: min(100%, 460px);
  padding: 2rem 1.75rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  text-align: center;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

.unsaved-guard-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--mid-bg);
  color: var(--mid);
}

.unsaved-guard-icon svg { width: 22px; height: 22px; }

.unsaved-guard-card h2 {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0688rem;
  font-weight: 700;
}

.unsaved-guard-message {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  line-height: 1.55;
}

.unsaved-guard-status {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  color: var(--low);
  font-size: 0.7812rem;
  line-height: 1.45;
}

.unsaved-guard-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.unsaved-guard-actions > button {
  flex: 1 1 0;
  justify-content: center;
}

.unsaved-guard-open { overflow: hidden; }

@media (max-width: 520px) {
  .unsaved-guard-card { padding: 1.5rem 1.15rem 1.15rem; }
  .unsaved-guard-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .unsaved-guard-backdrop,
  .unsaved-guard-card { animation: none; }
}

.feedback-guard-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.feedback-guard-modal[hidden] { display: none; }

.feedback-guard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  animation: progressFadeIn 0.18s ease;
}

.feedback-guard-card {
  position: relative;
  width: min(100%, 480px);
  padding: 2rem 1.75rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  text-align: left;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

.feedback-guard-card h2 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0688rem;
  font-weight: 700;
  text-align: center;
}

.feedback-guard-message {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  line-height: 1.5;
  text-align: center;
}

.feedback-guard-needs { margin-bottom: 1rem; }

.feedback-guard-needs-label {
  display: block;
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.feedback-guard-needs-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.feedback-guard-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.7812rem;
  font-weight: 600;
  cursor: pointer;
}

.feedback-guard-pill.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.feedback-guard-field {
  display: block;
  margin-bottom: 0.75rem;
}

.feedback-guard-field span {
  display: block;
  font-size: 0.7812rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.feedback-guard-field textarea {
  width: 100%;
  resize: vertical;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  color: var(--text);
  background: var(--surface);
}

.feedback-guard-field textarea:focus {
  outline: none;
  border-color: var(--mid);
}

.feedback-guard-status {
  min-height: 1.1rem;
  margin: 0.2rem 0 0;
  color: var(--text-faint);
  font-size: 0.7812rem;
  text-align: center;
}

.feedback-guard-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.feedback-guard-actions > button {
  flex: 1 1 0;
  justify-content: center;
}

.feedback-guard-open { overflow: hidden; }

@media (max-width: 520px) {
  .feedback-guard-card { padding: 1.5rem 1.15rem 1.15rem; }
  .feedback-guard-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-guard-backdrop,
  .feedback-guard-card { animation: none; }
}

/* Popup "crédits insuffisants" (voir assets/credits-alert.js). Reprend le
   gabarit visuel des modales unsaved-guard / feedback-guard pour rester
   cohérent, avec la palette --low déjà utilisée pour les états d'erreur
   (error-msg, badge-score--low). */
.credits-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.credits-alert-modal[hidden] { display: none; }

.credits-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  animation: progressFadeIn 0.18s ease;
}

.credits-alert-card {
  position: relative;
  width: min(100%, 420px);
  padding: 2.1rem 1.9rem 1.85rem;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  text-align: center;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

.credits-alert-dismiss-x {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.credits-alert-dismiss-x svg { width: 15px; height: 15px; }

.credits-alert-dismiss-x:hover {
  background: var(--surface-muted, rgba(15, 23, 42, 0.06));
  color: var(--text);
}

.credits-alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--low-bg);
  color: var(--low);
}

.credits-alert-icon svg { width: 30px; height: 30px; }

.credits-alert-card h2 {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.1687rem;
  font-weight: 700;
}

.credits-alert-message {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  line-height: 1.7;
}

.credits-alert-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.credits-alert-actions > a,
.credits-alert-actions > button {
  flex: 1 1 0;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  font-size: 0.8438rem;
}

.credits-alert-actions > .btn-analyze {
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.credits-alert-open { overflow: hidden; }

@media (max-width: 520px) {
  .credits-alert-card { padding: 1.5rem 1.15rem 1.15rem; }
  .credits-alert-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  .credits-alert-backdrop,
  .credits-alert-card { animation: none; }
}

/* Popup "programme en bêta" (voir assets/beta-notice.js). Réutilise le
   gabarit de .credits-alert-modal ; seule la couleur de l'icône change
   pour une teinte neutre/info plutôt que la teinte d'erreur --low. */
.beta-notice-icon {
  background: rgba(251, 83, 0, 0.12);
  color: var(--orange, #fb5300);
}

.u-text-right { text-align: right; }
.u-hidden { display: none; }
.u-color-inherit { color: inherit; }
.u-honeypot-link { position: absolute; left: -9999px; top: -9999px; }
.u-usage-month-label { font-size: 0.7812rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.u-cgu-greeting { font-size: 0.7812rem; color: var(--text-muted); }
.u-cgu-eyebrow { margin-bottom: 1rem; }
.u-cgu-intro { font-size: 0.8438rem; color: var(--text); line-height: 1.7; margin: 0 0 2rem; }

/* Capture mobile CV et message vocal */
.mobile-capture-actions { display: none; }
.mobile-capture-actions[hidden] { display: none; }
.mobile-action-btn,
.mobile-action-retry {
  align-items: center;
  border: 1px solid var(--border, #d8dee9);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--navy, #183153);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.7812rem;
  font-weight: 600;
  gap: 0.45rem;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
}
.mobile-action-btn svg { height: 20px; width: 20px; }
.mobile-action-btn:active { transform: translateY(1px); }
.mobile-action-btn:disabled { cursor: wait; opacity: 0.6; }
.mobile-action-btn--stop { border-color: #d77b69; color: #a33b2d; }
.mobile-action-retry { background: transparent; border: 0; color: var(--orange, #d66b32); min-height: auto; padding: 0.25rem 0; text-decoration: underline; }
.recording-timer { color: #a33b2d; font-family: var(--font-mono, monospace); font-size: 0.8438rem; font-weight: 700; }
.audio-preview { max-width: 100%; width: 100%; }
.mobile-action-status { color: var(--text-muted, #687386); font-size: 0.7188rem; margin: 0.35rem 0 0; }
.mobile-action-status.is-error { color: #b42318; }

@media (max-width: 760px) {
  .mobile-capture-actions:not([hidden]) {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.65rem;
  }
  .mobile-capture-actions input[type="file"] { display: none; }
  .mobile-capture-actions .mobile-action-status { flex-basis: 100%; }
  .mobile-capture-actions .audio-preview { flex-basis: 100%; }
}

/* UX mobile — formulaire d’analyse */
@media (max-width: 760px) {
  body.page-analyse .app-main { min-height: 100vh; }
  body.page-analyse .app-container { display: block; }
  body.page-analyse .app-sidebar { display: block; padding: 0.85rem 0.9rem 0.35rem; border: 0; background: transparent; box-shadow: none; }
  body.page-analyse .app-sidebar .btn-home { display: inline-flex; width: auto; align-self: flex-start; margin: 0 0 0.35rem; min-height: 44px; }
  body.page-analyse .content-area { padding: 1rem 0.9rem 2rem; }
  body.page-analyse .workspace-shell { display: block; }
  body.page-analyse .workspace-content { width: 100%; }
  body.page-analyse .workspace-header { gap: 0.7rem; margin-bottom: 1rem; padding-bottom: 0.85rem; }
  body.page-analyse .header-titles h1 { font-size: 1.3188rem; line-height: 1.25; }
  body.page-analyse .header-titles .subtitle { font-size: 0.7812rem; line-height: 1.45; }
  body.page-analyse .workspace-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
  body.page-analyse .ws-tab { min-height: 44px; padding: 0.55rem 0.25rem; font-size: 0.7188rem; line-height: 1.15; }
  body.page-analyse .ws-view { padding: 0; }
  body.page-analyse .upload-grid { display: flex; flex-direction: column; gap: 0.9rem; }
  body.page-analyse .upload-col { display: contents; }
  body.page-analyse .field { margin: 0; padding: 0.9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 3px 12px rgba(20, 33, 61, 0.05); }
  body.page-analyse .field-label { align-items: flex-start; gap: 0.55rem; margin-bottom: 0.7rem; }
  body.page-analyse .field-label label { font-size: 0.9062rem; line-height: 1.35; }
  body.page-analyse .step-chip { flex: 0 0 auto; margin-top: 0.05rem; }
  body.page-analyse .dropzone { min-height: 108px; padding: 1rem 0.75rem; border-radius: 12px; }
  body.page-analyse .dropzone-content { gap: 0.35rem; text-align: center; }
  body.page-analyse .dropzone-icon { width: 25px; height: 25px; }
  body.page-analyse .dropzone-text { font-size: 0.8438rem; line-height: 1.35; }
  body.page-analyse .dropzone-hint { font-size: 0.7188rem; line-height: 1.35; }
  body.page-analyse .file-status { min-height: 1.2rem; margin: 0.45rem 0 0; font-size: 0.7812rem; }
  body.page-analyse .profile-picker-alt { font-size: 0.7188rem; line-height: 1.45; }
  body.page-analyse #offerText { min-height: 220px; max-height: 46vh; padding: 0.85rem; font-size: 0.9688rem !important; line-height: 1.5; border-radius: 11px; }
  body.page-analyse .offer-alt-row { margin-top: 0.8rem; gap: 0.45rem; }
  body.page-analyse .offer-alt-label { font-size: 0.7812rem; line-height: 1.4; }
  body.page-analyse .mobile-action-btn { min-height: 46px; flex: 1 1 100%; font-size: 0.8438rem; }
  body.page-analyse .mobile-action-btn--stop { flex-basis: 100%; }
  body.page-analyse .mobile-action-retry { font-size: 0.7812rem; }
  body.page-analyse .action-row { gap: 0.6rem; margin-top: 1rem; padding-bottom: env(safe-area-inset-bottom); }
  body.page-analyse .action-row .btn-analyze { min-height: 54px; border-radius: 12px; font-size: 0.9062rem; }
  body.page-analyse .action-row .btn-analyze:first-child { box-shadow: 0 5px 14px rgba(214, 107, 50, 0.22); }
  body.page-analyse .help-rail { display: none; }
}

@media (max-width: 380px) {
  body.page-analyse .content-area { padding-left: 0.7rem; padding-right: 0.7rem; }
  body.page-analyse .field { padding: 0.75rem; }
  body.page-analyse .header-titles h1 { font-size: 1.1887rem; }
  body.page-analyse .dropzone-text { font-size: 0.7812rem; }
}


/* Modale de pré-vérification des documents, affichée avant toute analyse. */
.document-validation-modal {
  position: fixed;
  inset: 0;
  z-index: 740;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.document-validation-modal[hidden] { display: none; }

.document-validation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
  animation: progressFadeIn 0.18s ease;
}

.document-validation-card {
  position: relative;
  width: min(100%, 470px);
  padding: 2rem 2rem 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  text-align: center;
  animation: progressPopIn 0.22s cubic-bezier(.2,.9,.3,1.2);
}

.document-validation-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--low-bg);
  color: var(--low);
}

.document-validation-icon svg { width: 29px; height: 29px; }

.document-validation-eyebrow {
  margin: 0 0 0.4rem;
  color: var(--low);
  font-family: var(--font-sans);
  font-size: 0.7188rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.document-validation-card h2 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.1687rem;
  font-weight: 700;
}

.document-validation-intro {
  margin: 0 auto 1.15rem;
  max-width: 370px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8438rem;
  line-height: 1.55;
}

.document-validation-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  text-align: left;
}

.document-validation-item {
  position: relative;
  margin: 0;
  padding: 0.8rem 0.9rem 0.8rem 2.25rem;
  border: 1px solid color-mix(in srgb, var(--low) 22%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--low-bg) 60%, #fff);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.7812rem;
  line-height: 1.5;
}

.document-validation-item::before {
  content: '!';
  position: absolute;
  top: 0.8rem;
  left: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--low);
  color: #fff;
  font-size: 0.7188rem;
  font-weight: 800;
}

.document-validation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.35rem;
}

.document-validation-actions .btn-analyze {
  width: 100%;
  justify-content: center;
  border-radius: 999px;
  padding: 0.82rem 1rem;
  font-size: 0.8438rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.document-validation-actions .btn-analyze--secondary {
  box-shadow: none;
}

.document-validation-actions .btn-analyze[hidden] {
  display: none;
}

.document-validation-open { overflow: hidden; }

@media (max-width: 520px) {
  .document-validation-card { padding: 1.5rem 1.1rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .document-validation-backdrop,
  .document-validation-card { animation: none; }
}


/* Analyse groupée depuis Analyse candidats : liste de CV issus d'un ZIP et
   accès direct à chaque rapport de matching. */
.batch-upload-hint {
  margin: 0.45rem 0 0;
  color: var(--text-faint);
  font-size: 0.7188rem;
  line-height: 1.45;
}
.file-chip--batch { max-width: 100%; }
.batch-upload-warning {
  display: block;
  margin-top: 0.35rem;
  color: var(--orange-dark);
  font-size: 0.7188rem;
  line-height: 1.35;
}
.batch-match-results {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.batch-match-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.batch-match-eyebrow {
  margin: 0 0 0.2rem;
  color: var(--orange-dark);
  font-size: 0.7188rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.batch-match-results h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.9062rem;
}
.batch-match-progress {
  margin: 0.25rem 0 0;
  color: var(--text-faint);
  font-size: 0.7188rem;
}
.batch-match-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.batch-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.55rem;
}
.batch-match-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--bg);
  text-align: left;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.batch-match-item.is-selected {
  border-color: var(--orange);
  background: var(--orange-tint);
}
.batch-match-item--pending, .batch-match-item--running, .batch-match-item--error { opacity: 0.78; }
.batch-match-item-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.batch-match-item-select:disabled { cursor: default; }
.batch-match-item-select:not(:disabled):active { transform: scale(0.98); }
.batch-match-item-main { display: grid; min-width: 0; gap: 0.15rem; }
.batch-match-item-actions,
.batch-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.batch-item-action-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.batch-item-action-btn svg { width: 12px; height: 12px; }
.batch-item-action-btn:hover:not(:disabled) { border-color: var(--orange); color: var(--orange-dark); }
.batch-item-action-btn:disabled { cursor: default; opacity: 0.6; }
.batch-item-save-btn.is-saving { color: var(--orange-dark); border-color: var(--orange); }
.batch-item-remove-btn:hover:not(:disabled) { border-color: var(--low); color: var(--low); }
.batch-item-save-error {
  color: var(--low);
  font-size: 0.7188rem;
  line-height: 1.3;
}
.batch-match-item-main strong,
.batch-match-item-file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-match-item-main strong { font-size: 0.7188rem; font-family:'Poppins'}
.batch-match-item-file { color: var(--text-faint); font-size: 0.7188rem;font-family:'Poppins' }
.batch-match-item-status {
  flex: none;
  color: var(--orange-dark);
  font-size: 0.7188rem;
  font-weight: 700;
  font-family:poppins
}
.batch-match-item-error {
  max-width: 42%;
  color: var(--low);
  font-size: 0.7188rem;
  line-height: 1.3;
  text-align: right;
}
@media (max-width: 600px) {
  .batch-match-results-head { flex-direction: column; }
  .batch-match-list { grid-template-columns: 1fr; }
}


.batch-document-results {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.batch-document-results-head { margin-bottom: 0.7rem; }
.batch-document-results h3 { margin: 0; color: var(--text); font-size: 0.9062rem; }
.document-audit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0 0 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(223, 111, 45, 0.35);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 247, 239, 0.98), rgba(255, 252, 248, 0.98));
}
.document-audit-cta[hidden] { display: none; }
.document-audit-cta-copy { min-width: 0; }
.document-audit-cta h3 { margin: 0.15rem 0 0.3rem; color: var(--text); font-size: 0.9688rem; }
.document-audit-cta p:not(.batch-match-eyebrow) { margin: 0; color: var(--text-muted); font-size: 0.7812rem; line-height: 1.5; }
.document-audit-cta .btn-analyze { flex: none; }
.batch-progress-track {
  height: 0.45rem;
  overflow: hidden;
  margin: 0.7rem 0 0.85rem;
  border-radius: 999px;
  background: var(--border-soft);
}
.batch-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #f6b44b);
  transition: width 220ms ease;
}
.batch-document-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.55rem;
}
.batch-document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.batch-document-item--done { border-color: rgba(38, 150, 93, 0.35); }
.batch-document-item--running { border-color: var(--orange); background: var(--orange-tint); }
.batch-document-item--error { border-color: rgba(190, 55, 55, 0.35); }
.batch-document-item.is-selected { border-color: var(--orange); background: var(--orange-tint); }
.batch-document-item-select {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.batch-document-item-select:disabled { cursor: default; }
.batch-document-item-main { display: grid; min-width: 0; gap: 0.15rem; }
.batch-document-item-main strong,
.batch-document-item-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-document-item-main strong { font-size: 0.7812rem;font-family:'Poppins' }
.batch-document-item-main span { color: var(--text-faint); font-size: 0.7188rem;font-family:'Poppins' }
.batch-document-item-status { flex: none; font-size: 0.7188rem; font-weight: 700; }
.batch-document-item--done .batch-document-item-status { color: var(--good); }
.batch-document-item--running .batch-document-item-status { color: var(--orange-dark); }
.batch-document-item--error .batch-document-item-status { max-width: 42%; color: var(--low); text-align: right; }
@media (max-width: 600px) {
  .batch-match-list, .batch-document-list { grid-template-columns: 1fr; }
  .document-audit-cta { align-items: stretch; flex-direction: column; }
  .document-audit-cta .btn-analyze { width: 100%; }
}

/* Reverse matching — refined choice modal */

/* Refined visual treatment for the first-step reverse matching chooser. */
.reverse-match-modal {
  padding: 5vh 2rem;
}
.reverse-match-backdrop {
  background: rgba(24, 33, 48, 0.58);
  backdrop-filter: blur(5px) saturate(0.88);
}
.reverse-match-panel {
  width: min(780px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32), 0 8px 24px rgba(15, 23, 42, 0.10);
  animation: reverse-match-panel-in 220ms cubic-bezier(.23,1,.32,1) both;
}
.reverse-match-head {
  min-height: 64px;
  padding: 1.15rem 1.35rem;
  border-bottom-color: #e5e7eb;
  font-size: 0.9688rem;
}
.reverse-match-close {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.5188rem;
  font-weight: 400;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.reverse-match-close:hover {
  color: var(--text);
  background: #f1f3f5;
  transform: rotate(5deg);
}
.reverse-match-body {
  padding: 1.65rem 1.35rem 1.5rem;
}
.reverse-match-choice-intro {
  margin-bottom: 1.25rem;
  color: #687384;
  font-size: 0.8438rem;
  letter-spacing: -0.005em;
}
.reverse-match-choice-grid {
  gap: 1rem;
}
.reverse-match-choice-card {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 1.65rem 1.3rem 1.3rem;
  border-color: #e3e5e9;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, #fdfdfd 100%);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025);
}
.reverse-match-choice-card:hover,
.reverse-match-choice-card:focus-visible {
  border-color: rgba(251, 83, 0, 0.48);
  background: linear-gradient(145deg, #fff 0%, #fff8f3 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(-3px);
  outline: none;
}
.reverse-match-choice-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(251, 83, 0, 0.15), 0 14px 28px rgba(251, 83, 0, 0.12);
}
.reverse-match-choice-icon {
  width: 2.65rem;
  height: 2.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f35b20;
  box-shadow: none;
}
.reverse-match-choice-icon svg { width: 2rem; height: 2rem; stroke-width: 1.9; }
.reverse-match-choice-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.35rem;
  text-align: center;
}
.reverse-match-choice-copy strong {
  color: #202838;
  font-size: 0.9688rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.reverse-match-choice-copy small {
  max-width: 265px;
  color: #737c8b;
  font-size: 0.7812rem;
  line-height: 1.55;
  font-family:'Poppins';
  margin-bottom:4%
}
.reverse-match-choice-arrow {
  top: 1.25rem;
  right: 1.1rem;
  width: auto;
  height: auto;
  color: #ed682e;
  font-size: 1.0188rem;
  font-weight: 500;
}
.reverse-match-choice-card:hover .reverse-match-choice-arrow,
.reverse-match-choice-card:focus-visible .reverse-match-choice-arrow {
  background: transparent;
  transform: translateX(4px);
}
@keyframes reverse-match-panel-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .reverse-match-panel { animation: none; }
}
@media (max-width: 760px) {
  .reverse-match-modal { padding: 0; }
  .reverse-match-panel { border-radius: 0; }
  .reverse-match-body { padding: 1.35rem 1rem calc(1.3rem + env(safe-area-inset-bottom)); }
  .reverse-match-choice-card { min-height: 170px; }
}

/* Selection tiles: bold visual cards with an orange icon field and explicit CTA. */
.reverse-match-choice-card { align-items: stretch; justify-content: flex-start; gap: 0; min-height: 238px; padding: 0 1.2rem 1.2rem; overflow: hidden; text-align: left; }
.reverse-match-choice-card::before { position: absolute; inset: 0 0 auto; height: 112px; background: linear-gradient(135deg, #fb5300 0%, #ff7b38 100%); content: ''; }
.reverse-match-choice-card::after { right: 1.2rem; bottom: 4.25rem; left: 1.2rem; }
.reverse-match-choice-card:hover, .reverse-match-choice-card:focus-visible { background: #fff; }
.reverse-match-choice-art { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: calc(100% + 2.4rem); height: 112px; margin: 0 -1.2rem 1rem; overflow: hidden; }
.reverse-match-choice-art::before, .reverse-match-choice-art::after { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; content: ''; }
.reverse-match-choice-art::before { width: 150px; height: 150px; transform: translate(55px,-36px); }
.reverse-match-choice-art::after { width: 86px; height: 86px; transform: translate(-82px,35px); background: rgba(255,255,255,.06); }
.reverse-match-choice-icon { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 3.8rem; height: 3.8rem; border: 1px solid rgba(255,255,255,.32); border-radius: 14px; background: rgba(255,255,255,.16); color: #fff; box-shadow: 0 8px 22px rgba(141,40,0,.18), inset 0 1px 0 rgba(255,255,255,.24); backdrop-filter: blur(4px); }
.reverse-match-choice-icon svg { width: 2.05rem; height: 2.05rem; }
.reverse-match-choice-copy { position: relative; z-index: 1; align-items: flex-start; padding: 0 .1rem; text-align: left; }
.reverse-match-choice-copy strong { font-size: 0.9688rem;font-family:'Poppins' }
.reverse-match-choice-copy small { max-width: 280px; text-align: left; }
.reverse-match-choice-select { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; margin-top: auto; padding: .65rem .8rem; border: 1px solid rgba(251,83,0,.22); border-radius: 9px; background: #fff5ef; color: #e84f08; font-size: 0.7188rem; font-weight: 700; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.reverse-match-choice-select span { font-size: 0.9688rem; font-weight: 500; }
.reverse-match-choice-card:hover .reverse-match-choice-select, .reverse-match-choice-card:focus-visible .reverse-match-choice-select { background: #fb5300; color: #fff; transform: translateY(-1px); }
.reverse-match-choice-arrow { color: rgba(255,255,255,.9); }
@media (max-width: 760px) { .reverse-match-choice-card { min-height: 224px; } }

/* ==========================================================================
   Analyse candidats (index.php) — refonte de la saisie
   Colonne de gauche (.directory-sidebar) : carte "Candidat" (CV +
   notes/audio repliés dans un bloc "contexte optionnel") puis carte
   "Offre", un seul CTA primaire, et deux boutons secondaires (Bilan
   d'adéquation / Générer un CV) juste en dessous. Colonne de droite
   (.directory-preview-card) : aperçu (état vide / raccourci résultat),
   sur le modèle de recherche.php et matching-inverse.php.
   ========================================================================== */
.analyse-section-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; }
.analyse-section-title .step-chip { width: 20px; height: 20px; font-size: 0.7188rem; }
.analyse-section-title h2 { margin: 0; font-size: 0.9062rem; font-weight: 600; color: var(--navy); }

.analyse-optional-fields { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.analyse-optional-hint { margin: 0 0 .55rem; color: var(--text-muted); font-size: 0.7188rem; line-height: 1.45; }
.analyse-optional-toggle { background: none; border: none; padding: 0; font-family: var(--font-sans); font-size: 0.7812rem; font-weight: 600; color: var(--navy-soft); cursor: pointer; display: flex; align-items: center; gap: .35rem; }
.analyse-optional-toggle:hover { color: var(--navy); }
.analyse-optional-toggle svg { transition: transform 160ms ease; }
.analyse-optional-toggle[aria-expanded="true"] .analyse-optional-toggle-plus { transform: rotate(45deg); }
.analyse-optional-toggle-chevron { display: none; }
.analyse-optional-body { margin-top: 0; max-height: 0; overflow: hidden; }
.analyse-optional-body.is-open { margin-top: .2rem; max-height: none; overflow: visible; }

.analyse-next-steps-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.analyse-next-steps-actions .btn-analyze { flex: 1 1 200px; justify-content: center; }
.btn-analyze.btn-analyze--full { width: 100%; justify-content: center; }

/* NOTE : le bloc qui vivait ici (`.analyse-layout.directory-layout` en
   `flex-direction: column` sous 900px) n'avait plus aucun effet — la
   colonne `body.page-analyse .directory-layout` est en `display: grid`
   via une règle plus spécifique (voir plus bas) et les propriétés flex
   ne s'appliquent pas à des enfants de grid. Il a été retiré pour éviter
   toute confusion ; le vrai empilement mobile est piloté par la règle
   `body.page-analyse .directory-layout { grid-template-columns: 1fr; }`
   ci-dessous. */


/* -------------------------------------------------------------------------
   Page analyse candidat — composition compacte inspirée de la maquette
   ------------------------------------------------------------------------- */
body.page-analyse {
  --analyse-bg: #f6f6f6;
  background: var(--analyse-bg);
  color: #252832;
}

body.page-analyse .app-main { min-height: 100vh; }
body.page-analyse .content-area {
  max-width: 980px;
  padding: 1.5rem 1rem 3rem;
}
body.page-analyse .directory-home-link {
  width: max-content;
  min-height: 28px;
  padding: .38rem .72rem;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  font-size: 0.7188rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
body.page-analyse .directory-home-link svg { width: 12px; height: 12px; }
body.page-analyse .directory-home-link:hover { background: var(--orange-dark); color: #fff; }

body.page-analyse .workspace-header {
  display: block;
  margin: 0rem 0 1.35rem;
  padding: 0 0 1.05rem;
  border-bottom: 1px solid #e8e8e8;
}
body.page-analyse .header-titles { max-width: 420px; }
body.page-analyse .header-titles h1 {
  margin-bottom: .28rem;
  font-size: 26.5px;
  font-weight: 300;
  letter-spacing: -.025em;
      font-family: var(--font-sans);
    font-weight: 600;
}

body.page-analyse .workspace-shell,
body.page-analyse .workspace-content { width: 100%; }
body.page-analyse .directory-layout {
  display: grid;
  grid-template-columns: 345px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
body.page-analyse .directory-sidebar {
  width: auto;
  max-width: none;
  min-width: 0;
  gap: 1rem;
}
body.page-analyse #matchForm { display: contents; }
body.page-analyse .card {
  border-color: #e8e8e8;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(30,35,45,.04);
}
body.page-analyse .analyse-candidat-card,
body.page-analyse .analyse-offer-card { padding: 1rem; }
body.page-analyse .analyse-section-title {
  margin-bottom: .8rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid #ededed;
}
body.page-analyse .analyse-section-title h2 {
  font-size: 0.8438rem;
  font-weight: 600;
  color: #373b45;
}
body.page-analyse .step-chip {
  width: 16px;
  height: 16px;
  font-size: 0.7188rem;
}
body.page-analyse .field-label { margin-bottom: .42rem; }
body.page-analyse .field-label label {
  font-size: 0.7812rem;
  color: #3c4049;
  font-weight:500
}
body.page-analyse .dropzone {
  min-height: 88px;
  padding: .9rem .7rem;
  border-color: #ededed;
  border-radius: 9px;
}
body.page-analyse .dropzone--compact { min-height: 58px; padding: .65rem .7rem; }
body.page-analyse .dropzone-icon { width: 17px; height: 17px; }
body.page-analyse .dropzone-text { font-size: 0.8438rem; color: #464a54; }
body.page-analyse .dropzone-hint { font-size: 0.7188rem; }
body.page-analyse .profile-picker-alt {
  font-size: 0.7188rem;
  color: #9b9da3;
  text-align:center
}
body.page-analyse .link-btn { color: var(--orange); font-weight: 600; }
body.page-analyse .analyse-optional-fields {
  margin-top: .75rem;
  padding-top: .72rem;
  border-top: 0;
}
body.page-analyse .analyse-optional-toggle {
  width: 100%;
  margin-bottom: .55rem;
  font-size: 0.7812rem;
  color: #444852;
  font-weight: 500;
}
body.page-analyse .analyse-optional-toggle-plus { display: none; }
body.page-analyse .analyse-optional-toggle .field-optional { margin-left: auto; font-size: 0.7188rem; }
body.page-analyse .analyse-optional-toggle-chevron {
  display: block;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: #9b9da3;
}
body.page-analyse .analyse-optional-toggle[aria-expanded="true"] .analyse-optional-toggle-chevron { transform: rotate(180deg); }
body.page-analyse .analyse-optional-body.is-open { margin-top: 0; }
body.page-analyse .analyse-optional-body .field { margin-top: .55rem !important; }
body.page-analyse .analyse-optional-body .field-label { display: none; }
body.page-analyse .analyse-optional-body .dropzone { min-height: 42px; padding: .55rem .65rem; }
body.page-analyse .analyse-optional-body .dropzone-content { flex-direction: row; text-align: left; }
body.page-analyse .analyse-optional-body .dropzone-text { flex: 1; }
body.page-analyse .analyse-optional-body .dropzone-hint { display: none; }
body.page-analyse .analyse-optional-body .profile-picker-alt { display: none; }
body.page-analyse .analyse-optional-body .quick-note { margin-top: .45rem; }
body.page-analyse .analyse-optional-body textarea { min-height: 58px; font-size: 0.7188rem; }
body.page-analyse .analyse-offer-card { margin-top: 0; }
body.page-analyse .action-row {
  margin-top: .05rem;
  display: block;
}
body.page-analyse .btn-analyze.btn-analyze--full {
  min-height: 31px;
  padding: 1rem .8rem;
  border-radius: 0px;
  font-size: 0.9688rem;

}

p.analyse-below-hint{
	font-size: 0.7188rem;
    max-width: 430px;
    color: #2d323e;
    border-left: 3px solid #fb5300;
    padding-left: 1%;}


body.page-analyse .btn-analyze .btn-icon { width: 13px; height: 13px; }
body.page-analyse .analyse-next-steps,
body.page-analyse .action-help { display: none; }
body.page-analyse .error-msg { margin-top: .55rem; font-size: 0.7188rem; }

body.page-analyse .directory-preview-card {

  padding: 1rem;
  border-radius: 13px;
  background: rgba(255,255,255,.88);
}
body.page-analyse .directory-preview-empty {
  margin: 0rem auto;
  gap: .6rem;
}
body.page-analyse .directory-preview-empty .view-empty-icon--logo img { width: 100px; }
body.page-analyse .directory-preview-empty h3 { font-size: 0.9688rem;font-weight:600 }
body.page-analyse .directory-preview-empty p { font-size: 0.7188rem; line-height: 1.5; }
body.page-analyse .directory-preview-empty .btn-analyze { font-size: 0.7188rem; }

@media (max-width: 899.98px) {
  body.page-analyse .directory-layout { grid-template-columns: 1fr; }
  body.page-analyse .directory-preview-card { min-height: 420px; }
}
@media (max-width: 620px) {
  body.page-analyse .content-area { padding: 1rem .75rem 2rem; }
  body.page-analyse .header-titles { max-width: none; }
  body.page-analyse .header-titles h1 { font-size: 1.2188rem; }
  body.page-analyse .directory-layout { gap: 14px; }
  body.page-analyse .directory-preview-card { min-height: 360px; }
}


/* Correctif de cohérence avec les autres pages de l'application.
   Les deux propriétés ci-dessous ne concernent que la disposition en
   deux colonnes du bureau : sans media query, elles écrasaient aussi
   l'empilement mobile défini plus haut (à ces largeurs, elles
   s'appliquent quand même car déclarées après, et la cascade CSS ne
   fait pas d'exception pour "hors media query") — c'est ce qui
   provoquait le débordement/décalage horizontal constaté sur mobile. */
body.page-analyse .app-main { min-height: calc(100vh - 60px); }
body.page-analyse .content-area {
  max-width: 100%;
  padding: 1rem 2.5rem;
}
@media (min-width: 900px) {
  body.page-analyse .directory-layout {
    grid-template-columns: 460px minmax(0, 1fr);
    gap: 1.75rem;
  }
}
@media (max-width: 760px) {
  body.page-analyse .content-area { padding: 1.25rem 1rem 2.5rem; }
}
@media (max-width: 620px) {
  body.page-analyse .content-area { padding: 1rem .75rem 2rem; }
}


/* Présentation du bloc "Autres informations" selon la maquette. */
body.page-analyse .analyse-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  min-height: 30px;
  color: #555963;
  font-size: 0.7188rem;
}
body.page-analyse .analyse-info-actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
body.page-analyse .analyse-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: .28rem .58rem;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  font: 400 0.7188rem/1 var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
body.page-analyse .analyse-info-button:hover { background: var(--orange-dark); }
body.page-analyse .analyse-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
}
body.page-analyse .analyse-optional-body > .file-status {
  min-height: 0;
  margin: 0;
  font-size: 0.7188rem;
}
body.page-analyse .analyse-optional-body > .file-status:empty { display: none; }
body.page-analyse .analyse-optional-body .quick-note { margin-top: .35rem; }
body.page-analyse .analyse-optional-body .quick-note-toggle { font-size: 0.7188rem; padding: .45rem .6rem; }


/* Bloc offre d'emploi : l'icône occupe une ligne dédiée au-dessus du libellé. */
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-content {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: .28rem;
  text-align: center;
}
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-icon {
  flex: none;
  width: 17px;
  height: 17px;
}
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-text {
  width: 100%;
  flex: none;
}
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-hint {
  flex: none;
}

/* ==========================================================================
   Correctif : aligner le haut de la colonne de droite (aperçu) sur le
   bouton "Retour", comme sur recherche.php / matching-inverse.php.
   Sur ces pages, Retour + titre font partie de la colonne de gauche ;
   ici ils sont partagés par les 3 onglets (Édition, Matching, Document),
   donc on les fait participer à une grille commune via display:contents
   plutôt que de dupliquer le HTML. Actif à partir de 900px (au-delà, le
   design mobile empilé existant n'est pas modifié).
   ========================================================================== */
@media (min-width: 900px) {
  body.page-analyse .content-area {
    display: grid;
    grid-template-columns: 460px minmax(0, 1fr);
    /* L’aperçu de droite est plus haut que les blocs de saisie. Sans
       lignes explicites, sa min-height est répartie par le navigateur dans
       les lignes « back » et « header », ce qui crée de grands blancs dans
       la colonne de gauche après une génération. */
    grid-template-rows: auto 1fr;
    /* L'en-tête (titre + étapes Profil / Offre / Résultat) occupe toute la
       largeur ; la barre « Retour / fil d'Ariane » est désormais au-dessus,
       hors de cette grille. */
    grid-template-areas:
      "header  header"
      "shell   preview";
    gap: 0 1.75rem;
  }
  body.page-analyse .directory-home-link { grid-area: back; align-self: start; }
  body.page-analyse .workspace-header { grid-area: header; }
  body.page-analyse .workspace-shell { display: contents; }
  body.page-analyse .workspace-content { display: contents; }
  body.page-analyse #draftView.active { display: contents; }
  body.page-analyse #draftView .directory-layout { display: contents; }
  body.page-analyse #draftView .directory-sidebar { grid-area: shell; }
  body.page-analyse #draftView .directory-preview-card {
    grid-area: preview;
    align-self: start;
  }

  /* Les onglets Matching / Document n'ont pas de colonne de droite propre :
     ils occupent toute la largeur, sous les onglets. */
  body.page-analyse #documentView.active,
  body.page-analyse #analysisView.active { grid-column: 1 / -1; }
}



/* Suivi persistant d'une conversion en lot pendant la navigation. */
.batch-progress-global-bar {
  position: fixed;
  z-index: 1200;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  max-width: 860px;
  margin: 0 auto;
  padding: .65rem .85rem;
  border: 1px solid rgba(251,83,0,.25);
  border-radius: 14px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 32px rgba(15,23,42,.18);
  font-family: var(--font-sans);
}
.batch-progress-global-bar[hidden] { display: none; }
.batch-progress-global-logo { width: 48px; height: 34px; flex: 0 0 48px; overflow: hidden; }
.batch-progress-global-logo iframe { display: block; width: 48px; height: 34px; border: 0; }
.batch-progress-global-main { min-width: 0; flex: 1; }
.batch-progress-global-title { display: block; font-size: 0.7812rem; color: var(--text); }
.batch-progress-global-text { display: block; margin-top: .12rem; font-size: 0.7188rem; color: var(--text-muted); }
.batch-progress-global-track { height: 5px; margin-top: .38rem; overflow: hidden; border-radius: 999px; background: var(--border-soft); }
.batch-progress-global-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--orange-dark)); transition: width .35s ease; }
.batch-progress-global-link { flex: 0 0 auto; color: var(--orange-dark); font-size: 0.7188rem; font-weight: 700; text-decoration: none; }
.batch-progress-global-link:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .batch-progress-global-bar { left: .55rem; right: .55rem; bottom: .55rem; gap: .55rem; padding: .6rem; }
  .batch-progress-global-logo { width: 38px; height: 27px; flex-basis: 38px; }
  .batch-progress-global-logo iframe { width: 38px; height: 27px; }
  .batch-progress-global-link { font-size: 0.7188rem; }
}


.batch-completion-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15,23,42,.24);
}
.batch-completion-card {
  position: relative;
  width: min(430px, 100%);
  padding: 1.6rem;
  border: 1px solid rgba(251,83,0,.2);
  border-radius: 18px;
  background: var(--surface, #fff);
  box-shadow: 0 18px 55px rgba(15,23,42,.25);
  text-align: center;
}
.batch-completion-close { position: absolute; top: .55rem; right: .7rem; border: 0; background: none; color: var(--text-muted); font-size: 1.4688rem; cursor: pointer; }
.batch-completion-check { width: 42px; height: 42px; margin: 0 auto .65rem; border-radius: 50%; background: #e8f7ef; color: #168653; font-size: 1.5188rem; line-height: 42px; font-weight: 800; }
.batch-completion-card h2 { margin: 0 0 .45rem; color: var(--text); font-size: 1.2188rem; }
.batch-completion-card p { margin: 0 0 1.2rem; color: var(--text-muted); font-size: 0.8438rem; }
.batch-completion-actions { display: flex; flex-direction: column; gap: .55rem; }
.batch-completion-actions a { display: block; text-align: center; text-decoration: none; }
@media (max-width: 560px) { .batch-completion-card { padding: 1.35rem 1rem; } }

.batch-return-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .2rem .1rem .7rem; color: var(--text); }
.batch-return-heading span { color: var(--text-muted); font-size: 0.7812rem; }
.batch-return-row { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .75rem .8rem; margin-bottom: .45rem; border: 1px solid var(--border-soft); border-radius: 10px; font-size: 0.7812rem; background: var(--surface); }
.batch-return-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-return-row b { flex: 0 0 auto; font-size: 0.7188rem; }
.batch-return-row.is-done b { color: #168653; }
.batch-return-row.is-failed b { color: #c44747; }

.batch-active-notice { position: fixed; z-index: 1250; right: 1rem; bottom: 5.8rem; display: flex; align-items: center; gap: .65rem; max-width: 390px; padding: .7rem .85rem; border: 1px solid rgba(251,83,0,.2); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 10px 28px rgba(15,23,42,.16); font-family: var(--font-sans); }
.batch-active-notice strong { color: var(--text); font-size: 0.7188rem; white-space: nowrap; }
.batch-active-notice span { color: var(--text-muted); font-size: 0.7188rem; line-height: 1.3; }
.batch-active-notice button { border: 0; padding: 0; background: none; color: var(--text-muted); font-size: 1.1687rem; cursor: pointer; }
@media (max-width: 560px) { .batch-active-notice { left: .55rem; right: .55rem; bottom: 5.2rem; max-width: none; } }

.batch-active-notice { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); z-index: 1400; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; width: min(520px, calc(100% - 2rem)); max-width: none; padding: 1.2rem 1.35rem; border: 1px solid rgba(251,83,0,.28); border-radius: 16px; background: #fff; box-shadow: 0 18px 55px rgba(15,23,42,.25); }
.batch-active-notice::before { content: ''; position: fixed; z-index: -1; left: 50%; top: 50%; width: 100vw; height: 100vh; transform: translate(-50%, -50%); pointer-events: none; background: rgba(15,23,42,.12); }
.batch-active-notice strong { font-size: 0.9062rem; }
.batch-active-notice span { font-size: 0.7812rem; }
@media (max-width: 560px) { .batch-active-notice { left: 50%; right: auto; bottom: auto; top: 50%; width: calc(100% - 1.1rem); } }

.batch-progress-global-cancel { flex: 0 0 auto; padding: .35rem .55rem; border: 1px solid rgba(196,71,71,.35); border-radius: 7px; background: #fff; color: #b33d3d; font: 600 0.6687rem var(--font-sans); cursor: pointer; }
.batch-progress-global-cancel:hover { background: #fff3f3; }
@media (max-width: 560px) { .batch-progress-global-cancel { padding: .3rem .4rem; font-size: 0.7188rem; } }

/* Boutons d'impression/export indisponibles (compte invité) */
.btn-reset[data-export-locked],
.btn-reset[data-export-locked]:hover,
.btn-analyze[data-export-locked],
.btn-analyze[data-export-locked]:hover,
a[data-export-locked],
a[data-export-locked]:hover {
  opacity: .45;
  filter: grayscale(1);
  cursor: not-allowed;
}
a[data-export-locked] { pointer-events: auto; }

/* Assistant Analyse candidat en deux étapes */
body.page-analyse .analyse-wizard-step[hidden],
body.page-analyse #wizardNextBtn[hidden],
body.page-analyse #wizardBackBtn[hidden],
body.page-analyse #analyzeBtn[hidden] { display: none !important; }
body.page-analyse .action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: .7rem;
  margin-top: .95rem;
}
body.page-analyse #wizardNextBtn,
body.page-analyse #analyzeBtn {
  width: auto;
  min-width: 138px;
  justify-content: center;
}
body.page-analyse #analyzeBtn { min-width: 250px; }
body.page-analyse #wizardBackBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 31px;
  padding: .52rem .8rem;
  border-radius: 7px;
}
body.page-analyse .wizard-cv-reminder {
  margin: -.15rem 0 .75rem;
  padding: .55rem .7rem;
  border-left: 3px solid var(--orange);
  border-radius: 0 7px 7px 0;
  background: #fb5300;
  color: #fff;
  font-size: 0.7188rem;
  line-height: 1.4;
}
body.page-analyse .wizard-cv-reminder strong { color: #fff; font-weight: 650; }
body.page-analyse .wizard-credit-note {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 0.7188rem;
  line-height: 1.4;
  text-align:center;
  width:100%;
  display:block
}
body.page-analyse .wizard-credit-note strong { color: var(--text); font-weight: 650; }
body.page-analyse .wizard-credit-note[hidden] { display: none !important; }
p.analyse-below-hint[hidden] { display: none !important; }

/* Sur mobile uniquement (mise en page empilée, < 900px) : l’aperçu n’est pas
   utile pendant la saisie des deux premières étapes. Sur bureau, la colonne
   de droite reste visible (état vide avec la vidéo). */
@media (max-width: 899.98px) {
  body.page-analyse .analyse-layout.is-input-step .directory-preview-card {
    display: none !important;
  }
}

/* Titre du résultat centré, notamment lorsque le bloc est déplacé dans
   l’aperçu mobile. */
body.page-analyse .results-header {
  position: relative;
  justify-content: center;
}
body.page-analyse .results-title {
  width: 100%;
  text-align: center;
}
body.page-analyse .results-header .cv-actions {
  position: absolute;
  right: 0;
}

@media (max-width: 620px) {
  body.page-analyse .card {
    padding: 15px;
  }
body.page-analyse .analyse-layout.is-result .card {
    padding: 0;
  }
  body.page-analyse #takeCvPhotoBtn,
  body.page-analyse #takeOfferPhotoBtn {
    background: #fb5300;
    color: #fff;
    padding: 15px;
  }
  body.page-analyse .results-header .cv-actions { position: static; }
  body.page-analyse .results-header { flex-direction: column; gap: .55rem; }

  body.page-analyse #progressModal {
    padding: .75rem;
  }
  body.page-analyse #progressModal .progress-modal-card {
    max-width: 320px;
    min-height: 430px;
    padding: 1rem .8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  body.page-analyse #progressModal .progress-modal-icon {
    width: min(230px, 76vw);
    height: 170px;
    margin: 0 auto .25rem;
  }
  body.page-analyse #progressModal .progress-modal-title {
    max-width: 280px;
    text-align: center;
    font-size: 0.9062rem;
    line-height: 1.35;
  }
  body.page-analyse #progressModal .progress-modal-subtitle {
    max-width: 250px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.7188rem;
    line-height: 1.45;
  }
  body.page-analyse #progressModal .progress-bar-track,
  body.page-analyse #progressModal .progress-bar-pct,
  body.page-analyse #progressModal .progress-steps {
    display: none;
  }
  body.page-analyse #progressModal .progress-cancel-btn {
    min-height: 36px;
    padding: .45rem 1rem;
    font-size: 0.7188rem;
  }
}
body.page-analyse #wizardNextBtn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) { justify-content: space-between; }
@media (max-width: 620px) {
  body.page-analyse .action-row { flex-wrap: wrap; }
  body.page-analyse #wizardNextBtn,
  body.page-analyse #analyzeBtn { flex: 1 1 100%; min-width: 0; }
  body.page-analyse #wizardBackBtn { flex: 0 0 auto; }
  body.page-analyse .wizard-credit-note { flex: 1 1 100%; order: -1; margin-right: 0; }
}

/* Correctif rangée d'actions de l'assistant (étapes 1 et 2) :
   le texte de crédits passe sur sa propre ligne au-dessus des boutons,
   et « Modifier le profil candidat » + « Lancer le matching » se partagent
   la largeur de la colonne au lieu de déborder. */
body.page-analyse .action-row { flex-wrap: wrap; }
body.page-analyse .wizard-credit-note {
  order: -1;
  flex: 1 1 100%;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .1rem .4rem;
  margin: 0 0 .1rem;
}
body.page-analyse #wizardBackBtn { flex: 0 0 auto; min-width: 0; }
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) { justify-content: stretch; }
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) #analyzeBtn { flex: 1 1 0; min-width: 0; }

/* Rappel « CV candidat ajouté » : désormais hors de la carte « Offre d'emploi ». */
body.page-analyse .wizard-cv-reminder { margin: 0; }
body.page-analyse .wizard-cv-reminder[hidden] { display: none; }

/* ==========================================================================
   Étape 2 de l'analyse candidat — colonne de gauche alignée sur la maquette :
   rappel du CV avec bouton « Modifier », carte « Offre d'emploi », puces de
   fichier, mention de crédits centrée et bouton « Lancer le matching » centré.
   ========================================================================== */
body.page-analyse .wizard-cv-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 0;
  padding: 0 0 0 .8rem;
  min-height: 34px;
  border-left: 3px solid var(--orange);
  border-radius: 0;
  background: #fb5300;
  color: #fff;
  font-size: 0.7188rem;
}
body.page-analyse .wizard-cv-reminder[hidden] { display: none; }
body.page-analyse .wizard-cv-reminder-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-analyse .wizard-cv-reminder strong { color: #fff; font-weight: 700; }
body.page-analyse .wizard-cv-reminder #wizardBackBtn {
flex: 0 0 auto;
    min-width: 80px;
    min-height: 34px;
    padding: 0 .9rem;
    border: 1px solid #fb5300;
    background: #fb5300;
    color: #fff;
    font: 500 0.6887rem var(--font-sans);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
    border-radius: inherit;
}
body.page-analyse .wizard-cv-reminder #wizardBackBtn:hover { }
body.page-analyse .wizard-cv-reminder #wizardBackBtn[hidden] { display: none !important; }

/* Carte « Offre d'emploi » */
body.page-analyse .analyse-offer-card { padding: 1.05rem 1rem 1rem; border-radius: 14px; }
body.page-analyse .analyse-offer-card .analyse-section-title { padding-bottom: .8rem; margin-bottom: .85rem; }
body.page-analyse .analyse-offer-card .analyse-section-title h2 { font-size: 0.9062rem; font-weight: 500; color: #252832; }
body.page-analyse .analyse-offer-card .analyse-section-title .step-chip { width: 15px; height: 15px; font-size: 0.7188rem; background: #252832; }
body.page-analyse .analyse-offer-card .dropzone--compact {
  min-height: 82px;
  padding: .8rem .7rem;
  border: 1px dashed #e2e2e2;
  border-radius: 8px;
  background: #fff;
}
body.page-analyse .analyse-offer-card .dropzone--compact:hover { border-color: #cfcfcf; background: #fcfcfc; }
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-icon { color: #9b9da3; }
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-text { font-size: 0.8438rem; font-weight: 400; color: #3c4049; }
body.page-analyse .analyse-offer-card .dropzone--compact .dropzone-hint { font-size: 0.7188rem; color: #b0b2b8; max-width: none; }

/* Puce du fichier d'offre (pilule orange centrée) */
body.page-analyse .analyse-offer-card .file-status { justify-content: center; min-height: 0; }
body.page-analyse .analyse-offer-card .file-status:empty { display: none; }
body.page-analyse .analyse-offer-card .file-chip {
  margin: .7rem auto .55rem;
  padding: .4rem .5rem .4rem .45rem;
  gap: .5rem;
  box-shadow: none;
}
body.page-analyse .analyse-offer-card .file-status-label { font-size: 0.7188rem; font-weight: 700; }
body.page-analyse .analyse-offer-card .profile-picker-alt {
  margin: .55rem 0 0;
  font-size: 0.7188rem;
  color: #9b9da3;
  text-align: center;
}
body.page-analyse .analyse-offer-card .profile-picker-alt .link-btn { color: var(--orange); font-weight: 600; text-decoration: underline; }

/* Bas de colonne à l'étape 2 : crédits centrés puis bouton centré */
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) {
  justify-content: center;
  margin-top: 1.4rem;
  gap: 0;
}
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) .wizard-credit-note {
  justify-content: center;
  text-align: center;
  margin: 0 0 2.6rem;
  font-size: 0.7188rem;
  color: #6b6f78;
}
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) #analyzeBtn {
  flex: 0 0 auto;
  width: 273px;
  max-width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: .55rem 1rem;
  border-radius: 6px;
  font-size: 0.9688rem;
  font-weight: 600;
  gap: .45rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
}
body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) #analyzeBtn .btn-icon { width: 13px; height: 13px; }
@media (max-width: 620px) {
  body.page-analyse .action-row:has(#analyzeBtn:not([hidden])) #analyzeBtn { width: 100%; }
}

/* ==========================================================================
   Colonne de gauche une fois le matching généré (un seul CV) : le formulaire
   et les boutons d'action disparaissent ; restent le rappel du CV et de
   l'offre utilisés, puis le bouton « Créer un nouveau matching ».
   (Le message d'erreur .error-msg reste visible.)
   ========================================================================== */
body.page-analyse .wizard-result-recap { display: none; }
body.page-analyse .analyse-layout.is-result #matchForm,
body.page-analyse .analyse-layout.is-result .action-row > :not(.error-msg) { display: none !important; }
body.page-analyse .analyse-layout.is-result .action-row { margin: 0; padding: 0; gap: 0; }
body.page-analyse .analyse-layout.is-result .wizard-result-recap {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
/* Mêmes couleurs que les rappels .wizard-cv-reminder (fond orange, texte blanc). */
body.page-analyse .wizard-result-recap-item {
  margin: 0;
  padding: .6rem .8rem;
  background: #2d323e;
  color: #fff;
  font-size: 0.7188rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-analyse .wizard-result-recap-item[hidden] { display: none; }
body.page-analyse .wizard-result-recap-item strong { color: #fff; font-weight: 700; }
body.page-analyse .wizard-result-recap .wizard-new-matching-btn {
  width: 100%;
  margin: 5.4rem 0 0;
  justify-content: center;
}

/* Raison visible du grisage d'un bouton d'action (crédits insuffisants),
   affichée juste en dessous du bouton — voir setCreditHint() dans script.js. */
.credit-shortfall-hint {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin: .8rem auto 0;
  align-items: center;
  padding: .6rem .8rem;
  text-align: left;
  font-size: 0.7188rem;
  line-height: 1.45;
  color: #7a3a12;
  background: var(--orange-tint, #fff1e8);
  border: 1px solid rgba(251, 83, 0, .22);
  border-radius: 10px;
}
.credit-shortfall-hint[hidden] { display: none !important; }
.credit-shortfall-icon {
  flex: none;
  display: inline-flex;
  color: var(--orange, #fb5300);
}
.credit-shortfall-icon svg { width: 15px; height: 15px; }

/* Variante en ligne (lignes de lot) : même encadré, sans marge ni centrage. */
.credit-shortfall-hint--inline {
  display: inline-flex;
  margin: 0;
  padding: .3rem .6rem;
  max-width: none;
  font-size: 0.7188rem;
  font-weight: 600;
  text-align: left;
}
.batch-document-item--error .batch-document-item-status.credit-shortfall-hint { color: #7a3a12; max-width: none; }
.batch-match-item-error.credit-shortfall-hint { color: #7a3a12; }


/* Vidéo/logo de l'état vide : largeur fluide selon l'écran, et fond blanc de
   la vidéo neutralisé (multiply) pour qu'il ne cache plus le filigrane ni
   ne dessine de rectangle blanc sur la carte. */
.video-in{
  width: clamp(220px, 36vw, 560px);
  max-width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  display:none
}


body.page-matching-inverse .directory-preview-card > *{position:relative;z-index:1}
/* l'état vide ne crée pas de contexte d'empilement : la vidéo (multiply) se fond sur le filigrane */
body.page-matching-inverse .directory-preview-card > .directory-preview-empty{position:static;z-index:auto}
/* masqué dès qu'un profil est affiché */
body.page-matching-inverse .directory-preview-card:has(#directoryPreviewEmpty[hidden])::before{display:none}
@media (max-width:900px){
  body.page-matching-inverse .directory-preview-card::before{background-size:130px auto;background-position:left -4px top 20px}
}

/* Analyse candidat (index.php) — « Documents disponibles » : sur desktop,
   « Enregistrer » est aligné à droite, sur la même ligne que les onglets
   CV / Synthèse / Matching. Sur mobile, on garde l'empilement existant. */
@media (min-width: 721px) {
  body.page-analyse #dpvDocNav .directory-document-nav-buttons {
    width: auto;
    flex: 0 1 auto;
  }
  body.page-analyse #dpvDocNav .directory-document-nav-secondary {
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }
  body.page-analyse #dpvDocNav .directory-document-nav-secondary .directory-document-nav-new-matching {
    width: auto;
    margin-left: 0;
  }
}

div#matchingResultsHeader {
    display: none;
}

.empty-illus {
  display: block;
  width: min(100%, 250px);
  height: auto;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
  padding-left:5%
}

/* ==========================================================================
   Barre « Retour + fil d'Ariane » (includes/page_topbar.inc.php)
   et étapes « Profil — Offre — Résultat » d'Analyse candidats
   ========================================================================== */
.page-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  font-size: 0.7812rem;
  color: var(--text-muted);
}
.page-topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 32px;
  padding: 0 12px;
  margin: 0;
  max-width: none;
  text-decoration: none;
  white-space: nowrap;
}
.page-topbar-back svg { width: 13px; height: 13px; flex: none; }
.page-topbar-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.page-topbar-sep { color: #b5b5b5; }
.page-topbar-current { color: var(--text); font-weight: 500; }
.page-topbar-parent, .page-topbar-current { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .page-topbar { padding: 0 1rem; gap: 10px; }
  .page-topbar-parent, .page-topbar-sep { display: none; }
}

.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.7812rem;
  color: var(--text-muted);
}
.wizard-stepper-item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.wizard-stepper-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #d4d4d4;
  border-radius: 50%;
  background: #fff;
  color: var(--text-muted);
  font-size: 0.7188rem;
  font-weight: 600;
  line-height: 1;
}
.wizard-stepper-item.is-active { color: var(--text); font-weight: 500; }
.wizard-stepper-item.is-active .wizard-stepper-dot,
.wizard-stepper-item.is-done .wizard-stepper-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.wizard-stepper-item.is-done { color: var(--text); }
.wizard-stepper-line { display: block; width: 24px; height: 1px; background: #d4d4d4; }
.wizard-stepper-line.is-done { background: var(--navy); }

/* Analyse candidats : titre à gauche, étapes à droite sur la même ligne */
body.page-analyse .workspace-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
body.page-analyse .workspace-header .header-titles { flex: 1 1 360px; max-width: 640px; }
body.page-analyse .workspace-header > :not(.header-titles):not(.wizard-stepper) { flex: 0 0 100%; }
@media (max-width: 640px) {
  .wizard-stepper { gap: 6px; font-size: 0.7188rem; }
  .wizard-stepper-line { width: 12px; }
}


/* Annuaire + Matching inversé — barre « Documents disponibles » sur une seule
   ligne (desktop) : libellé + onglets CV / Synthèse / Matching à gauche,
   bouton d'action (« Nouveau matching » / « Générer l'audit ») à droite.
   Sur mobile, on garde l'empilement existant. */
@media (min-width: 721px) {
  body.page-annuaire #previewDocumentNav .directory-document-nav-buttons,
  body.page-matching-inverse #previewDocumentNav .directory-document-nav-buttons {
    width: auto;
    flex: 0 1 auto;
  }
  body.page-annuaire #previewDocumentNav .directory-document-nav-new-matching,
  body.page-matching-inverse #previewDocumentNav .directory-document-nav-new-matching {
    margin-left: auto;
    width: auto;
  }
}


/* ---- Modale « Modifier le candidat » : photo de profil + sexe (avatar) ---- */
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.2rem 0 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-soft);
}
.avatar-edit-preview {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border-soft);
  border: 1px solid var(--border);
}
.avatar-edit-side { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.avatar-edit-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.avatar-edit-buttons .btn-reset { font-size: 0.7188rem; }
.avatar-edit-gender { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.7812rem; }
.avatar-edit-gender-label { color: var(--muted); font-weight: 700; font-size: 0.7188rem; letter-spacing: 0.04em; text-transform: uppercase; }
.avatar-edit-gender label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; margin: 0; font-weight: 500; }
.avatar-edit-gender input[type="radio"] { width: auto; margin: 0; accent-color: #fb5300; }
.avatar-edit-hint { margin: 0; font-size: 0.7188rem; color: var(--text-faint); }
.avatar-edit-error { margin: 0; font-size: 0.7188rem; color: #b42318; }


/* Menu « ⋯ » et sous-titre de la fiche (Analyse candidat, Matching inversé) :
   réservés à l'interface V2 (voir assets/v2.css). Invisibles en V1. */
body.page-analyse .preview-more,
body.page-analyse .directory-preview-subtitle,
body.page-matching-inverse .preview-more,
body.page-matching-inverse .directory-preview-subtitle { display: none; }

/* Conversion en lot : sans cette règle, display:flex l'emporte sur l'attribut
   hidden et le bouton « Lancer la conversion » s'affiche à 0 avant tout dépôt. */
.lot-batch-actions[hidden],
.lot-page .directory-count[hidden] { display: none; }

/* Rappel du candidat sous le fil d'étapes (Analyse & matching, étape « offre »). */
.wizard-candidate-line { margin: 10px 0 0; font-size: 13px; color: var(--text-muted, #5a6274); }
.wizard-candidate-line[hidden] { display: none; }
.wizard-candidate-line strong { color: var(--text, #161d2b); font-weight: 600; }

/* Popup « Tout est prêt » (arrivée depuis une alerte, index.php) */
.shortcut-ready__card { width: min(100%, 440px); padding: 2.2rem 2rem 1.5rem; text-align: center; }
.shortcut-ready__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; margin-bottom: 1rem; border-radius: 50%;
  background: var(--orange-tint, #fff0e8); color: var(--orange, #f4510a);
  box-shadow: 0 0 0 8px rgba(244, 81, 10, 0.07);
}
.shortcut-ready__badge svg { width: 28px; height: 28px; }
.shortcut-ready__title { margin: 0 0 .3rem; font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; color: var(--text, #161d2b); }
.shortcut-ready__lead { margin: 0 0 1.3rem; font-size: .9rem; color: var(--text-muted, #5a6274); }
.shortcut-ready__summary {
  display: flex; flex-direction: column; margin-bottom: 1.4rem; text-align: left;
  border: 1px solid var(--border, #e3e6ec); border-radius: 16px; background: var(--bg, #f7f8fa); overflow: hidden;
}
.shortcut-ready__row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; }
.shortcut-ready__row + .shortcut-ready__row { border-top: 1px solid var(--border, #e3e6ec); }
.shortcut-ready__ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--text-muted, #5a6274);
  border: 1px solid var(--border, #e3e6ec);
}
.shortcut-ready__ico svg { width: 20px; height: 20px; }
.shortcut-ready__ico--av { border-radius: 50%; border: 0; background: var(--orange-tint, #fff0e8); color: var(--orange-dark, #c2410c); font-size: .85rem; font-weight: 700; }
.shortcut-ready__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shortcut-ready__txt small { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #5a6274); }
.shortcut-ready__txt strong { font-size: .98rem; font-weight: 600; color: var(--text, #161d2b); overflow-wrap: anywhere; }
.shortcut-ready__go { width: 100%; justify-content: center; gap: .6rem; }
.shortcut-ready__cost {
  padding: .12rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .22);
  font-size: .78rem; font-weight: 600;
}
.shortcut-ready__later {
  margin-top: .5rem; padding: .55rem 1rem; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .86rem; color: var(--text-muted, #5a6274); border-radius: 8px;
}
.shortcut-ready__later:hover { color: var(--text, #161d2b); background: rgba(15, 23, 42, .05); }
.shortcut-ready__warn {
  display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1.2rem; padding: .75rem .9rem; text-align: left;
  border: 1px solid #f5c9a8; border-radius: 12px; background: var(--orange-tint, #fff0e8);
  font-size: .85rem; line-height: 1.45; color: var(--orange-dark, #c2410c);
}
.shortcut-ready__warn svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.shortcut-ready__warn strong { font-weight: 700; }

/* Popup « Tout est prêt » : le bouton reçoit le focus à l'ouverture (Entrée lance
   le matching). On remplace le double anneau noir/blanc par un halo discret. */
:root:root:root .shortcut-ready__go:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(251, 83, 0, .25);
}

span#previewScoreBadge {
    font-size: 30px;
}