/* ===========================================================================
   IFACI Certification — Espace fournisseurs — système de design
   Palette officielle IFACI (vert de marque + bleus institutionnels)
   =========================================================================== */
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/figtree-400.7bfd10a3def3.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/figtree-500.94e34f97c4c6.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/figtree-600.4376f5953b85.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/figtree-700.70aaa6879de5.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/figtree-800.6d348a4f382c.woff2") format("woff2");
}

:root {
  /* Marque IFACI */
  --green: #39b54a;
  --green-600: #2f9c3f;
  --green-700: #1f5c28;
  --navy: #00305e;
  --navy-700: #002347;
  --indigo: #323a84;
  --teal: #005584;
  --sky: #eff4ff;

  --ink: #1b2430;
  --muted: #5b6675;
  --line: #e6ecf3;
  --card: #ffffff;
  --bg: #f4f7fb;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,40,80,.04), 0 6px 24px rgba(16,40,80,.06);
  --shadow-lg: 0 10px 40px rgba(16,40,80,.12);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Garde-fous responsive globaux : rien ne déborde horizontalement */
img, svg, video, canvas { max-width: 100%; height: auto; }
.app-main, main, .layout, .layout .main, .card { min-width: 0; }
.card { overflow-wrap: anywhere; max-width: 100%; box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15.5px;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .4rem; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .8rem; color: var(--navy); }
h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Topbar ---------- */
header.site {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-700) 60%, var(--indigo) 140%);
  color: #fff;
  padding: .7rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
}
header.site .brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; color: #fff; letter-spacing: -.01em; }
header.site .brand:hover { text-decoration: none; }
header.site .brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(57,181,74,.25); }
.menu-btn { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.14);
  color: #fff; font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; flex: none; }
.menu-btn:hover { background: rgba(255,255,255,.28); }
header.site nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
header.site nav a { color: #d8e2f0; font-size: .92rem; padding: .4rem .7rem; border-radius: 8px; }
header.site nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.logout-form { margin: 0; }
/* Bascule de langue : UN bouton compact affichant la langue CIBLE (un tap = changer) */
.lang-form { margin: 0; flex: none; }
.lang-btn { border: 1.5px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12);
  color: #fff; font: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  padding: .3rem .55rem; border-radius: 8px; cursor: pointer; line-height: 1; }
.lang-btn:hover { background: #fff; color: var(--navy); }
header.site .navbtn { background: transparent; border: none; color: #d8e2f0; font: inherit;
  font-size: .92rem; padding: .4rem .7rem; border-radius: 8px; cursor: pointer; }
header.site .navbtn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Barre latérale unifiée (navigation principale) ---------- */
.app-main { min-height: 100vh; display: flex; flex-direction: column; }
.has-sidenav .app-main { margin-left: 256px; }

.topbar { display: none; }  /* visible uniquement en mobile */

.sidenav {
  position: fixed; top: 0; left: 0; width: 256px; z-index: 60;
  height: 100vh;
  height: 100dvh;  /* iOS Safari : hauteur réellement visible (barre d'outils déduite) */
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-700) 60%, var(--indigo) 150%);
  color: #d8e2f0; display: flex; flex-direction: column; padding: 1rem .7rem .7rem;
  padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;   /* défilement fluide iOS */
  overscroll-behavior: contain;        /* le scroll reste dans le tiroir */
}
/* Sélecteur de langue en HAUT du menu (façon Wikipédia) — un seul bouton */
.sidenav-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-width: 0; }
.sidenav-top .sidenav-brand { padding-bottom: .2rem; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav-top .lang-form { margin-right: .25rem; }
.sidenav-brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 800;
  font-size: 1.04rem; letter-spacing: -.01em; padding: .2rem .55rem 1rem; }
.sidenav-brand:hover { text-decoration: none; }
.sidenav-brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(57,181,74,.25); flex: none; }

/* flex: 1 0 auto → occupe l'espace restant sur grand écran MAIS ne se comprime jamais
   sous la hauteur de son contenu : sur petit écran, c'est le tiroir (.sidenav, overflow-y:auto)
   qui défile, au lieu que les liens se chevauchent. */
.sidenav-body { flex: 1 0 auto; display: flex; flex-direction: column; gap: .12rem;
  min-width: 0; }
.sidenav-foot { flex: 0 0 auto; }
.sidenav-body a, .sidenav-foot a {
  display: block; color: #d8e2f0; padding: .52rem .65rem; border-radius: 8px;
  font-weight: 600; font-size: .92rem; line-height: 1.35;
  overflow-wrap: anywhere; word-break: break-word; min-width: 0;
}
.sidenav-body a:hover, .sidenav-foot a:hover { background: rgba(255,255,255,.10); color: #fff; text-decoration: none; }
.sidenav-body a.active, .sidenav-foot a.active { background: rgba(255,255,255,.13); color: #fff;
  box-shadow: inset 3px 0 0 var(--green); }
.nav-group { margin-top: .95rem; }
.nav-group-title { margin: 0 .65rem .28rem; font-size: .66rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(216,226,240,.55); }

.sidenav-foot { border-top: 1px solid rgba(255,255,255,.13); padding-top: .55rem; margin-top: .6rem; }
.sidenav-foot-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin-top: .35rem; padding: 0 .25rem; }
.sidenav .logout-form { margin: 0; }
.sidenav .navbtn { background: transparent; border: none; color: #d8e2f0; font: inherit; font-size: .9rem;
  font-weight: 600; padding: .4rem .55rem; border-radius: 8px; cursor: pointer; }
.sidenav .navbtn:hover { background: rgba(255,255,255,.10); color: #fff; }

.nav-badge { display: inline-block; min-width: 18px; padding: 0 .35rem; margin-left: .3rem;
  font-size: .7rem; font-weight: 800; line-height: 18px; text-align: center; border-radius: 999px;
  background: var(--green); color: #fff; vertical-align: middle; }

.nav-overlay { display: none; }

/* Barre du haut (mobile) : marque + bouton ☰ qui ouvre le tiroir latéral */
.topbar {
  align-items: center; gap: .5rem; padding: .6rem .7rem;
  flex-wrap: nowrap;  /* une seule ligne : la marque rétrécit, jamais de chevauchement */
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-700) 60%, var(--indigo) 140%);
  color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
}
.topbar .brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: .3rem;
  white-space: nowrap; }
.topbar-actions form { margin: 0; }
.topbar-link { background: rgba(255,255,255,.14); border: none; color: #fff; font: inherit;
  font-size: .82rem; font-weight: 600; padding: .35rem .6rem; border-radius: 8px; cursor: pointer;
  text-decoration: none; display: inline-block; white-space: nowrap; }
.topbar-link:hover { background: rgba(255,255,255,.28); color: #fff; text-decoration: none; }
.topbar .brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 800; font-size: 1rem; }
.topbar .brand:hover { text-decoration: none; }
.topbar .brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(57,181,74,.25); flex: none; }

/* En dessous de 900px : la barre latérale devient un tiroir coulissant */
@media (max-width: 900px) {
  .has-sidenav .topbar { display: flex; }
  .has-sidenav .app-main { margin-left: 0; }
  .sidenav { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidenav.open { transform: translateX(0); }
  .sidenav.open ~ .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(8,20,40,.45); z-index: 55; }
}

/* ---------- Navigation secondaire admin ---------- */
.adminnav {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; gap: .2rem; padding: 0 1.2rem; overflow-x: auto;
  position: sticky; top: 0; z-index: 40; -webkit-overflow-scrolling: touch;
}
.adminnav a {
  color: var(--muted); font-weight: 600; font-size: .92rem; white-space: nowrap;
  padding: .8rem .9rem; border-bottom: 3px solid transparent; text-decoration: none;
}
.adminnav a:hover { color: var(--navy); text-decoration: none; }
.adminnav a.active { color: var(--navy); border-bottom-color: var(--green); }

/* ---------- Panneau de filtres latéral repliable ---------- */
.layout { display: flex; gap: 1.2rem; align-items: flex-start; }
.layout .main { flex: 1; min-width: 0; }
.filters {
  flex: 0 0 250px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem; position: sticky; top: 56px;
}
.filters h3 { margin: 0 0 .6rem; font-size: .95rem; }
.filters.collapsed { display: none; }
.filters-toggle { margin-bottom: 1rem; }
.filters label { margin-top: .6rem; }
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .filters { flex: 1 1 auto; width: 100%; position: static; }
}

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1.2rem; }
.container.wide { max-width: 1240px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; margin-bottom: 1.3rem; box-shadow: var(--shadow);
}
.page-head { margin-bottom: 1.4rem; }

/* ---------- Hub : cartes d'espaces ---------- */
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.section-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .4rem;
  transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; color: var(--ink);
}
.section-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.section-card .ring-wrap { display: flex; align-items: center; gap: 1rem; }
.section-card h3 { color: var(--navy); }
.section-card .go { margin-top: .6rem; color: var(--green-600); font-weight: 700; font-size: .9rem; }

/* Anneau de progression (CSS pur, conic-gradient) */
.ring {
  --p: 0; --size: 64px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #e7edf4 0);
  display: grid; place-items: center;
}
.ring::after {
  content: attr(data-label); width: calc(var(--size) - 14px); height: calc(var(--size) - 14px);
  background: #fff; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .82rem; color: var(--navy);
}
.ring.full { background: conic-gradient(var(--green) 100%, var(--green) 0); }

/* Grande barre de progression */
.progress { background: #e7edf4; border-radius: 999px; height: 12px; overflow: hidden; margin: .7rem 0 0; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-600)); border-radius: 999px; transition: width .4s ease; }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 600; margin: .9rem 0 .3rem; font-size: .92rem; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[list],
input[type=file], textarea, select {
  width: 100%; max-width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
/* Les cellules d'une grille de champs ne doivent jamais déborder horizontalement */
.tgrid > * { min-width: 0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,181,74,.18); }
.helptext { color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.errorlist { color: #b91c1c; list-style: none; padding: 0; margin: .3rem 0; font-size: .85rem; }
.field { margin-bottom: .5rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--green); color: #fff;
  border: none; padding: .65rem 1.2rem; border-radius: var(--radius-sm); font-size: .95rem;
  font-weight: 700; cursor: pointer; font-family: inherit; transition: background .12s, transform .05s;
}
.btn:hover { background: var(--green-600); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #eef2f7; color: var(--navy); }
.btn.secondary:hover { background: #e2e9f2; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--navy); background: #fff; }
.btn.danger { background: #fff; color: #b91c1c; border: 1.5px solid #f3c7c7; padding: .35rem .7rem; font-size: .82rem; }
.btn.danger:hover { background: #fdf2f2; }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Badges de statut ---------- */
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
/* Colonnes d'état compactes : le contenu ne se coupe jamais (T-045) */
table.table-stack td[data-label="État"], table.table-stack td[data-label="Status"],
table.table-stack td[data-label="MFA"] { white-space: nowrap; }
.badge.draft { background: #eef2f7; color: #475569; }
.badge.incomplete { background: #fff4e5; color: #b45309; }
.badge.complete { background: #e3f7e7; color: var(--green-700); }
.badge.archived { background: #e5e7eb; color: #374151; }
.badge.na { background: #eef0ff; color: var(--indigo); }
.badge.ok { background: #e3f7e7; color: var(--green-700); }

/* ---------- Tableaux ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .55rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
tbody tr:hover td { background: #f8fbff; }

/* ---------- Grille de suivi (tableau large, défilement horizontal) ---------- */
.gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.gridwrap table { min-width: 920px; margin: 0; }
.gridwrap thead th { position: sticky; top: 0; background: #f4f7fb; z-index: 2; border-bottom: 2px solid var(--line); }
.gridwrap tbody tr:nth-child(even) td { background: #fafcff; }
.gridwrap td, .gridwrap th { padding: .45rem .5rem; vertical-align: middle; }
.gridwrap .name-cell { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; box-shadow: 1px 0 0 var(--line); }
.gridwrap tbody tr:nth-child(even) .name-cell { background: #fafcff; }
.gridwrap input[type=date] { font-size: .76rem; padding: .2rem; width: 124px; border-radius: 6px; }
.gridwrap select { font-size: .82rem; padding: .25rem; }

/* ---------- Planning / frise temporelle (Gantt) ---------- */
.planbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: .4rem .8rem; font-size: .85rem; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.seg a:last-child { border-right: none; }
.seg a:hover { background: #f1f5f9; text-decoration: none; }
.seg a.active { background: var(--navy); color: #fff; }
.navperiod { display: inline-flex; align-items: center; gap: .5rem; }
.navperiod .lbl { font-weight: 700; color: var(--navy); min-width: 150px; text-align: center; }
.navperiod a { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); }
.navperiod a:hover { background: #f1f5f9; text-decoration: none; }

.gantt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gantt { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; min-width: 720px; }
.gantt-head, .gantt-line { display: flex; align-items: stretch; }
.gantt-head { background: #f4f7fb; border-bottom: 2px solid var(--line); min-height: 34px; }
.gantt-name { flex: 0 0 160px; padding: .4rem .6rem; border-right: 1px solid var(--line); font-size: .82rem; display: flex; align-items: center; background: inherit; }
.gantt-axis, .gantt-track { position: relative; flex: 1; }
.gantt-axis { min-height: 34px; }
.gantt-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid #e6ecf3; }
.gantt-tick span { position: absolute; top: 8px; left: 3px; font-size: .66rem; color: var(--muted); white-space: nowrap; }
.gantt-line { border-bottom: 1px solid var(--line); }
.gantt-line:nth-child(even) { background: #fafcff; }
.gantt-bar { position: absolute; height: 20px; border-radius: 4px; font-size: .68rem;
  color: #fff; padding: 2px 5px; overflow: hidden; white-space: nowrap; box-sizing: border-box;
  text-decoration: none; }
.gantt-bar:hover { text-decoration: none; filter: brightness(1.08); }
.gantt-bar.RA { background: var(--green-600); }
.gantt-bar.A { background: var(--teal); }
.gantt-bar.O { background: #94a3b8; }
.gantt-bar.S { background: var(--indigo); }
.gantt-bar.X { background: #b45309; }
.gantt-bar.AVW { background: #bfe8cd; color: #14532d; border: 1px dashed #16a34a; }
.gantt-bar.AVB { background: #f6cfcf; color: #7f1d1d; border: 1px dashed #dc2626; }
.gantt-list { display: none; }  /* visible uniquement sur mobile (remplace le Gantt) */

/* ---------- Calendrier mensuel (type Google / Outlook) ---------- */
.calbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.calnav { display: flex; align-items: center; gap: .6rem; }
.callabel { font-weight: 800; font-size: 1.1rem; color: var(--navy); min-width: 150px; text-align: center; }
.navbtn-round { display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--navy); }
.navbtn-round:hover { background: #f1f5f9; text-decoration: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
/* Colonne « n° de semaine » (2.2rem) + jours (T-048) */
.cal.cal-cols-7 { grid-template-columns: 2.2rem repeat(7, 1fr); }
.cal.cal-cols-5 { grid-template-columns: 2.2rem repeat(5, 1fr); }
.cal-wk { background: #eef2f7; text-align: center; font-size: .68rem; font-weight: 800;
  color: var(--muted); display: flex; align-items: center; justify-content: center; }
.cal-weekend { background: #f0f2f6; }
.cal-weekend .cal-num { color: #aeb7c4; }
.cal-wd { background: #f4f7fb; text-align: center; font-size: .7rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: .45rem 0; }
.cal-day { background: #fff; min-height: 96px; padding: .25rem .3rem; display: flex;
  flex-direction: column; gap: 2px; overflow: hidden; }
.cal-out { background: #fafbfd; }
.cal-out .cal-num { color: #c2cad6; }
.cal-num { font-weight: 700; font-size: .78rem; color: var(--ink); width: 22px; height: 22px;
  display: grid; place-items: center; }
.cal-today .cal-num { background: var(--green); color: #fff; border-radius: 50%; }
.cal-ev { display: block; font-size: .7rem; line-height: 1.3; padding: 1px 5px; border-radius: 4px;
  color: #fff; background: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { text-decoration: none; filter: brightness(1.08); color: #fff; }
.cal-ev.RA { background: var(--green-600); }
.cal-ev.A { background: var(--teal); }
.cal-ev.O { background: #94a3b8; }
.cal-ev.S { background: var(--indigo); }
.cal-ev.X { background: #b45309; }
.cal-more { font-size: .66rem; color: var(--muted); font-weight: 700; }

/* ---------- Bandeau « édition en tant que partenaire » ---------- */
.impersonation-bar { position: sticky; top: 0; z-index: 70; background: #b45309; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  padding: .5rem 1rem; font-size: .9rem; font-weight: 600; }
.impersonation-bar .btn { background: #fff; color: #b45309; padding: .35rem .8rem; }
.impersonation-bar .btn:hover { background: #fff7ed; }

/* ---------- Pièces (documents) ---------- */
.doc-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem; margin-bottom: 1rem; background: #fcfdff; }
.doc-item.done { border-color: #cdebd3; background: #f6fcf7; }
.doc-files { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-direction: column; gap: .35rem; }
.doc-files li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font-size: .9rem; }
.na-fields { margin-top: .6rem; padding-left: 1rem; border-left: 3px solid var(--line); }
.check-row { font-weight: 500; margin-top: .7rem; display: flex; align-items: center; gap: .45rem; }
.check-row input { width: auto; }
.def-grid { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
.def-grid dt { font-weight: 600; color: var(--muted); }
.def-grid dd { margin: 0; }
.profils-edit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
.check-inline { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; white-space: nowrap; }
.check-inline input { width: auto; }
.interv-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .15rem 0; }
.edit-input { width: 100%; max-width: 22rem; }

/* ---------- Barre d'outils ---------- */
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.2rem; }
.toolbar .grow { flex: 1; min-width: 220px; }

/* ---------- Messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.messages li { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: .5rem; font-weight: 500; }
.messages li.success { background: #e3f7e7; color: var(--green-700); }
.messages li.error { background: #fee2e2; color: #991b1b; }
.messages li.info, .messages li.warning { background: #fff4e5; color: #b45309; }

/* ---------- Alertes (tableau de bord) ---------- */
.alert-red { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: #fee2e2; color: #991b1b; border: 1px solid #f3c7c7; border-radius: 10px;
  padding: .7rem 1rem; margin-bottom: .6rem; }
.alert-red a { color: #991b1b; font-weight: 600; }
.alert-close { background: transparent; border: none; color: #991b1b; cursor: pointer; font-size: 1rem; padding: 0 .3rem; }
.alert-close:hover { color: #7f1d1d; }

/* ---------- Module dossier technique ---------- */
.rubric-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.rubric-tab { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  padding: .4rem .75rem; border-radius: 999px; background: #f0f3f7; color: var(--navy);
  text-decoration: none; font-size: .9rem; border: 1.5px solid transparent; }
.rubric-tab.current { background: #fff; border-color: var(--navy); font-weight: 600; }
.rubric-tab .badge { padding: 0 .35rem; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.2rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .15rem .8rem; }
.rubric-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem;
  display: block; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
a.stat-card:hover { border-color: var(--navy); box-shadow: 0 3px 14px rgba(0,16,40,.07); text-decoration: none; }
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-lbl { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
.rubric-card { display: block; text-decoration: none; color: inherit; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 1rem; background: #fff; transition: border-color .12s, box-shadow .12s; }
.rubric-card:hover { border-color: var(--navy); box-shadow: 0 3px 14px rgba(0,16,40,.07); }
.rubric-card h3 { margin: .4rem 0 .2rem; font-size: 1rem; }
@media (max-width: 600px) { .tgrid { grid-template-columns: 1fr; } }

/* ---------- Fenêtres modales (pop-up) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,16,40,.45);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 1000; }
.modal-overlay[hidden] { display: none; }
.modal-box { max-width: 480px; width: 100%; margin: 0; }
.modal-box.wide { max-width: 640px; max-height: 85vh; max-height: 85dvh; overflow-y: auto; }

/* ---------- Accueil public ---------- */
.hero { background: linear-gradient(120deg, var(--navy), var(--indigo)); color: #fff; border-radius: var(--radius); padding: 2.4rem; box-shadow: var(--shadow-lg); }
.hero h1 { color: #fff; font-size: 2rem; }
.hero p { color: #d8e2f0; max-width: 56ch; }
.hero .btn.secondary { background: rgba(255,255,255,.14); color: #fff; }
.hero .btn.secondary:hover { background: rgba(255,255,255,.24); }

footer.site { text-align: center; color: var(--muted); font-size: .84rem; padding: 2.5rem 1rem; }

/* ---------- Responsive / mobile ---------- */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
  body { font-size: 15px; }
  /* Fenêtres modales : jamais sous la barre d'outils Safari (hauteur dynamique + zone sûre) */
  .modal-overlay { padding: .6rem; align-items: flex-start;
    padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); }
  .modal-box, .modal-box.wide { max-width: 100%; overflow-y: auto;
    max-height: 88vh;
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-bottom, 0px)); }
  /* Contenu : marge basse généreuse pour que les derniers boutons (ex. « Fermer »
     d'une expérience) restent cliquables au-dessus de la barre du navigateur */
  .container { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  /* Calendrier / planification : onglets de granularité qui PASSENT À LA LIGNE (pas de swipe) */
  .planbar { gap: .5rem; }
  .seg { display: flex; flex-wrap: wrap; max-width: 100%; overflow: visible; width: 100%; }
  .seg a { flex: 1 1 40%; text-align: center; white-space: nowrap; border-right: none;
    border: 1px solid var(--line); border-radius: 8px; }
  .seg a.active { border-color: var(--navy); }
  .navperiod { width: 100%; justify-content: space-between; }
  .navperiod .lbl { min-width: 0; flex: 1 1 auto; }
  /* Onglets génériques (rubriques, périodes missions) : retour à la ligne, tout visible */
  .rubric-tabs { flex-wrap: wrap; overflow-x: visible; }
  /* Calendrier mensuel : cellules compactes (la grille 7 colonnes tient toujours) */
  .cal-day { min-height: 60px; padding: 2px; }
  .cal-num { font-size: .72rem; width: 18px; height: 18px; }
  .cal-ev { font-size: .58rem; padding: 1px 3px; border-radius: 3px; }
  .cal-wd { font-size: .6rem; padding: .35rem 0; }
  .callabel { min-width: 0; flex: 1 1 auto; font-size: 1rem; }
  /* Gantt illisible sur mobile → on le masque et on affiche une liste verticale */
  .gantt-scroll { display: none; }
  .gantt-list { display: block; list-style: none; padding: 0; margin: .5rem 0; }
  .gantt-list li { display: flex; align-items: center; gap: .55rem; padding: .55rem .2rem;
    border-bottom: 1px solid var(--line); font-size: .9rem; }
  /* iOS : 16px sur les champs évite le zoom automatique au focus */
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=file], input[type=date], textarea, select { font-size: 16px; }
  header.site {
    flex-wrap: wrap; gap: .5rem; padding: .6rem .9rem;
  }
  header.site .brand { font-size: .98rem; }
  header.site nav { width: 100%; justify-content: flex-start; gap: .3rem .4rem; }
  .container { margin: 1.1rem auto; padding: 0 .9rem; }
  .card { padding: 1.1rem; border-radius: 12px; }
  h1 { font-size: 1.35rem; }
  .hero { padding: 1.5rem; }
  .hero h1 { font-size: 1.5rem; }
  .btn, .navbtn { width: auto; }
  .btn-row { gap: .5rem; }
  .btn-row .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
  /* Tableaux : défilement horizontal interne plutôt que débordement de page */
  .card table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
  .card table thead, .card table tbody { min-width: 520px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .grow, .toolbar > div { width: 100%; min-width: 0; }
  .section-grid { grid-template-columns: 1fr; }
  .ring { --size: 56px; }

  /* Tableaux "stack" : chaque ligne devient une fiche lisible sur mobile */
  .card table.table-stack { overflow: visible; }
  table.table-stack, table.table-stack tbody { min-width: 0; }
  table.table-stack thead { display: none; }
  table.table-stack tr { display: block; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; margin-bottom: .7rem; background: #fff; }
  /* Chaque cellule : libellé au-dessus, valeur en dessous → ne déborde JAMAIS */
  table.table-stack td { display: block; border: none; padding: .25rem 0; text-align: left;
    overflow-wrap: anywhere; word-break: break-word; }
  table.table-stack td::before { content: attr(data-label); display: block; font-weight: 700;
    font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
    margin-bottom: .05rem; }
  table.table-stack td:empty { display: none; }
  /* Champs et boutons en pleine largeur dans une fiche */
  table.table-stack td input, table.table-stack td select, table.table-stack td textarea,
  table.table-stack .edit-input { width: 100%; max-width: none; }
  table.table-stack td[data-label="Actions"] > div { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; }
  table.table-stack td[data-label="Actions"] form { display: block; width: 100%; }
  table.table-stack td[data-label="Actions"] .btn,
  table.table-stack td[data-label="Actions"] a.btn { width: 100%; text-align: center; justify-content: center; }
}
@media (max-width: 380px) {
  header.site nav a, header.site .navbtn { padding: .35rem .5rem; font-size: .85rem; }
  .topbar-link { padding: .3rem .45rem; font-size: .76rem; }
  .topbar .brand { font-size: .9rem; }
}

/* ── Parcours professionnel façon LinkedIn (rubrique technique « pro ») ── */
.xp-list { display: flex; flex-direction: column; }
.xp-item {
  display: flex; gap: .9rem; padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.xp-item:last-child { border-bottom: none; }
.xp-logo {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px;
  background: var(--sky); color: var(--navy);
  font-weight: 700; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.xp-body { flex: 1; min-width: 0; }
.xp-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.xp-title { font-weight: 700; margin: 0; }
.xp-org { margin: .1rem 0 0; font-size: .92rem; }
.xp-dates { margin: .15rem 0 0; font-size: .85rem; color: var(--muted); }
.xp-badge {
  display: inline-block; margin-left: .45rem; padding: .05rem .5rem;
  border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: #e6f4ea; color: #137333;
}
.xp-desc { margin: .5rem 0 0; font-size: .9rem; white-space: pre-line; }
.xp-actions { margin: 0; align-items: flex-start; }
.xp-actions .btn { padding: .25rem .6rem; }
.xp-edit { margin-top: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.xp-daterow { display: flex; gap: .5rem; }
.xp-daterow select { flex: 1.4; min-width: 0; }
.xp-daterow input { flex: 1; min-width: 0; }
@media (max-width: 700px) {
  .xp-item { gap: .6rem; }
  .xp-logo { width: 40px; height: 40px; font-size: 1.05rem; }
  .xp-head { flex-direction: column; }
}

/* ── Points clés, chips de compétences, rubrique Compétences ── */
.xp-points { margin: .5rem 0 0 1.1rem; padding: 0; font-size: .9rem; }
.xp-points li { margin: .15rem 0; }
.xp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.xp-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .65rem; border-radius: 999px;
  background: var(--sky); color: var(--navy);
  font-size: .8rem; font-weight: 600;
}
.chip-x {
  border: none; background: none; cursor: pointer; padding: 0 .1rem;
  font-size: .95rem; line-height: 1; color: var(--navy); opacity: .7;
}
.chip-x:hover { opacity: 1; }
.xp-skillpick { margin: .4rem 0 .8rem; }
.xp-skillpick > summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.xp-skillcat {
  margin: .8rem 0 .3rem; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.skill-rollup th { white-space: nowrap; }
.req-list { list-style: none; padding: 0; margin: .6rem 0; display: flex;
  flex-direction: column; gap: .35rem; }
.req-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 10px; }
.req-form { margin-top: .8rem; }

/* ---------- Combobox à autocomplétion (remplace les <select>) ---------- */
.ac-wrap { position: relative; }
.ac-control {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .25rem .4rem; background: #fff; min-height: 2.4rem;
}
.ac-control:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(57,181,74,.18); }
.ac-input { flex: 1; min-width: 8rem; border: none; outline: none; padding: .35rem .3rem;
  font-size: .95rem; font-family: inherit; background: transparent; width: auto; max-width: 100%; }
.ac-chips { display: contents; }
.ac-chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--sky);
  color: var(--navy); border-radius: 999px; padding: .1rem .2rem .1rem .6rem; font-size: .82rem; font-weight: 600; }
.ac-chip-x { border: none; background: none; cursor: pointer; color: var(--navy); font-size: 1rem;
  line-height: 1; padding: 0 .25rem; opacity: .7; }
.ac-chip-x:hover { opacity: 1; }
.ac-menu { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 2px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; }
.ac-opt { padding: .5rem .7rem; cursor: pointer; font-size: .92rem; }
.ac-opt:hover, .ac-opt.active { background: var(--sky); }
.ac-group { padding: .4rem .7rem .15rem; font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.ac-empty { padding: .5rem .7rem; color: var(--muted); font-size: .9rem; }

/* ---------- Administration : cartes de compte (mobile-first) ---------- */
.acct-card { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem;
  margin-top: .7rem; background: #fff; }
.acct-card.acct-off { background: #fafbfd; opacity: .85; }
/* Carte-lien : toute la carte est cliquable → fiche du compte */
a.acct-link { display: block; color: inherit; text-decoration: none;
  transition: border-color .12s, box-shadow .12s, transform .05s; }
a.acct-link:hover { border-color: var(--navy); box-shadow: 0 3px 14px rgba(0,16,40,.08);
  text-decoration: none; }
a.acct-link:active { transform: translateY(1px); }
.acct-chevron { color: var(--muted); font-size: 1.5rem; line-height: 1; margin-left: .1rem; }

/* Lignes de tableau cliquables (motif « clic = ouverture », sans bouton) */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: #f1f7ff; }

/* Cartes partenaire consolidées (liste /consultants/) */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; }
a.pcard { display: block; text-decoration: none; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem;
  transition: border-color .12s, box-shadow .12s, transform .05s; }
a.pcard:hover { border-color: var(--navy); box-shadow: 0 3px 14px rgba(0,16,40,.08); text-decoration: none; }
a.pcard:active { transform: translateY(1px); }
.pcard.acct-off { background: #fafbfd; opacity: .9; }
.pcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.pcard-name { min-width: 0; overflow-wrap: anywhere; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; align-items: center; }
.pcard-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.acct-head { display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: .5rem; }
.acct-id { min-width: 0; overflow-wrap: anywhere; }
.acct-badges { display: flex; gap: .3rem; flex-wrap: wrap; flex: none; }
.acct-profils { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .5rem; }
.acct-manage { margin-top: .6rem; }
.acct-manage-body { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.acct-manage .profils-edit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
.acct-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.acct-actions form { margin: 0; }
.legend-list { list-style: none; padding: 0; margin: .6rem 0; display: flex;
  flex-direction: column; gap: .5rem; }
.legend-list li { line-height: 1.4; }
.danger-badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: #fee2e2; color: #991b1b; }

/* ---------- Campagne de bilan : grille condensée ---------- */
.linklike { background: none; border: none; padding: 0; cursor: pointer; color: var(--navy);
  font: inherit; text-align: left; }
.linklike:hover { color: var(--teal); }
.linklike .chev { color: var(--muted); font-size: .8rem; }
.linklike.danger { color: #b91c1c; }
.linklike.danger:hover { color: #7f1d1d; }
.campaign-grid select, .campaign-grid input[type=text] { padding: .3rem .4rem; font-size: .9rem; }
.campaign-grid td { vertical-align: middle; }
.ctx-row > td { background: #f8fbff; }
.ctx-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .6rem .2rem; }
.ctx-panel h4 { margin: 0 0 .4rem; font-size: .85rem; color: var(--navy); }
.ctx-missions { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
@media (max-width: 700px) { .ctx-panel { grid-template-columns: 1fr; } }

/* Disponibilités (T-033) : teinte des jours + formulaire/liste des plages */
.cal-day.cal-av-wish { background: #e9f7ef; }
.cal-day.cal-av-busy { background: #fdeeee; }
.cal-out.cal-av-wish { background: #f2faf5; }
.cal-out.cal-av-busy { background: #fdf5f5; }
.cal-day.cal-picked { outline: 2px solid var(--green); outline-offset: -2px; }
#cal-grid .cal-day { cursor: pointer; }
.cal-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  vertical-align: -2px; border: 1px solid #d6dee8; }
.cal-swatch.cal-av-wish { background: #e9f7ef; }
.cal-swatch.cal-av-busy { background: #fdeeee; }
.avail-fields { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.avail-fields label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600;
  font-size: .85rem; min-width: 0; }
.avail-fields .avail-note { flex: 1 1 220px; }
.avail-fields .avail-note input { width: 100%; }
.avail-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex;
  flex-direction: column; gap: .4rem; }
.avail-item { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center;
  padding: .5rem .7rem; border: 1px solid var(--line, #d6dee8); border-radius: 8px; }
.avail-item form { margin-left: auto; }
.avail-kind { font-weight: 700; padding: 1px 8px; border-radius: 999px; font-size: .78rem; }
.avail-wish .avail-kind { background: #e9f7ef; color: #1c7c43; }
.avail-busy .avail-kind { background: #fdeeee; color: #b3423a; }
@media (max-width: 640px) {
  .avail-fields { gap: .5rem; }
  .avail-fields label { flex: 1 1 45%; }
  .avail-fields .avail-note, .avail-fields button { flex: 1 1 100%; }
}

/* Staffing (T-034) : consultants à signaler sur la période de la mission */
.staff-hl { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .6rem; }
.staff-chip { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  border: 1px solid transparent; }
.staff-chip.staff-wish { background: #e9f7ef; color: #1c7c43; border-color: #bfe8cd; }
.staff-chip.staff-mixed { background: #fef7e8; color: #92610e; border-color: #f3dfae; }
.staff-chip.staff-busy { background: #fdeeee; color: #b3423a; border-color: #f6cfcf; }

/* Pistes commerciales (T-035) : fil d'étapes cliquable */
.lead-pipeline { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; align-items: center; }
.pipe-step { font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--line, #d6dee8); background: #fff; color: var(--muted);
  cursor: pointer; font-family: inherit; }
.pipe-step:hover { border-color: var(--green); color: var(--ink); }
.pipe-step.current { background: var(--green); border-color: var(--green); color: #fff; cursor: default; }

/* Historique (T-031) */
details.history { margin-top: .8rem; }
details.history summary { cursor: pointer; font-weight: 700; font-size: .88rem; }
.history-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex;
  flex-direction: column; gap: .3rem; font-size: .82rem; }
.history-list li { display: flex; flex-wrap: wrap; gap: .3rem .7rem; padding: .3rem .5rem;
  border-left: 3px solid var(--line, #d6dee8); background: #fafbfd; border-radius: 0 6px 6px 0; }
.history-when { color: var(--muted); white-space: nowrap; }
.history-who { font-weight: 600; }
.history-what { color: #333; }

/* Pipeline d'enrôlement (T-008) */
.pipe-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.pipe-col { background: #f7f9fc; border: 1px solid var(--line, #d6dee8); border-radius: 10px;
  padding: .7rem; min-width: 0; }
.pipe-col h2 { font-size: .95rem; margin: 0 0 .2rem; }
.pipe-card { display: block; background: #fff; border: 1px solid var(--line, #d6dee8);
  border-radius: 8px; padding: .5rem .6rem; margin-top: .5rem; font-size: .85rem; }
.pipe-card a { text-decoration: none; color: inherit; }
.pipe-card .small { display: block; }
@media (max-width: 900px) { .pipe-board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pipe-board { grid-template-columns: 1fr; } }

/* Tableaux : entêtes non coupés + tri au clic (T-044) */
table.table-stack th { white-space: nowrap; }
table.sortable th.th-sort { cursor: pointer; user-select: none; }
table.sortable th.th-sort:hover { color: var(--green); }
table.sortable th[aria-sort] { color: var(--green); }
.sort-mark { font-size: .75em; }

/* Staffing par postes (T-046) */
.staff-pos { border: 1px solid var(--line, #d6dee8); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .8rem; }
.staff-pos-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.staff-cands { margin: .5rem 0; padding-left: 1.4rem; }
.staff-cands li { padding: .2rem 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cand-skipped, .cand-declined, .cand-expired { opacity: .55; }
.cal-ev.RES, .cal-ev.reserved { background: repeating-linear-gradient(45deg, #f0b429, #f0b429 4px, #f7d774 4px, #f7d774 8px); color: #5b4708; }

/* Propositions de mission côté auditeur (T-046) */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem 1.2rem; }
.prop-k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
.prop-team { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }

/* Barre d'action du calendrier sélectionnable (T-047) */
.cal-act-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.cal-act-assign { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line, #d6dee8); }
#cal-grid .cal-day.cal-picked { outline: 2px solid var(--green); outline-offset: -2px; background: #eafaef; }

/* Outils de tableau : zoom + redimensionnement des colonnes (T-050) */
.table-tools { display: flex; gap: .25rem; justify-content: flex-end; margin-bottom: .35rem; }
.table-tool-btn { border: 1px solid var(--line, #d6dee8); background: #fff; border-radius: 6px;
  padding: .1rem .5rem; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700;
  color: var(--muted); line-height: 1.4; }
.table-tool-btn:hover { color: var(--green); border-color: var(--green); }
th .col-resize { position: absolute; top: 0; right: 0; width: 7px; height: 100%;
  cursor: col-resize; user-select: none; }
th .col-resize:hover { background: var(--green); opacity: .4; }

/* Pop-up mode démo (accès admin, T-051) */
.demo-modal { position: fixed; inset: 0; background: rgba(16,40,80,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem; }
.demo-modal-box { background: #fff; border-radius: 14px; max-width: 30rem; width: 100%;
  padding: 1.4rem 1.6rem; box-shadow: var(--shadow-lg); }
.demo-modal-box h2 { color: var(--green-700); }
.demo-modal-box .btn { margin-top: .8rem; }
