/* ==========================================================================
   NOFAIL · Application (html/app.html)
   Mise en page « cockpit » : barre latérale, barre du haut, vues.
   Fenêtres façon dashboard SaaS (verre dépoli, reflets, halos bleus).
   Sur mobile, la barre latérale devient une barre d'onglets en bas.
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}
@media (min-width: 900px) {
  .app { grid-template-columns: 232px 1fr; }
}

/* ---------- Barre latérale ---------- */
.sidebar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--line);
}
.sidebar__logo, .sidebar__foot { display: none; }
.sidebar__nav { display: grid; grid-template-columns: repeat(5, 1fr); }

@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-5) var(--space-4);
    border-top: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), color-mix(in srgb, var(--bg-elev) 70%, transparent);
  }
  .sidebar__logo { display: inline-flex; padding-left: 8px; }
  .sidebar__nav { display: grid; grid-template-columns: 1fr; gap: 2px; }
  .sidebar__foot { display: grid; gap: var(--space-4); margin-top: auto; }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background .25s var(--ease-out), color .2s, border-color .25s;
}
.nav-item__icon { font-size: 16px; line-height: 1; }
.nav-item__icon--ai { color: var(--c-ai); }
.nav-item.is-active { color: var(--fg); }
.nav-item.is-active .nav-item__icon:not(.nav-item__icon--ai) { color: var(--accent); }
@media (min-width: 900px) {
  .nav-item { flex-direction: row; gap: 10px; padding: 9px 10px; font-size: 14px; }
  .nav-item { position: relative; }
  .nav-item:hover { background: var(--surface-2); color: var(--fg); }
  /* Onglet actif : pastille éclairée + petite barre lumineuse à gauche */
  .nav-item.is-active { background: linear-gradient(90deg, var(--signal-soft), transparent), var(--surface-2); border-color: var(--line); box-shadow: var(--highlight); }
  .nav-item.is-active::before { content: ""; position: absolute; left: -17px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
}

.usage { display: grid; gap: 6px; font-size: 12px; }
.usage { padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface-2); box-shadow: var(--highlight); }
.usage__bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.usage__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c-signal), var(--c-ai)); box-shadow: 0 0 10px rgba(56, 189, 248, .6); transform-origin: left; animation: bar-grow 1.2s var(--ease-out) both; }
@keyframes bar-grow { from { transform: scaleX(0); } }
.integrations-status { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 11px; color: var(--fg-muted); }
.integrations-status li { display: flex; justify-content: space-between; gap: 8px; }
.status-dot { display: inline-flex; align-items: center; gap: 5px; }
.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-faint); }
.status-dot--live::before { background: var(--c-signal); box-shadow: 0 0 8px var(--c-signal); }
.status-dot--mock::before { background: var(--c-warn); }

/* ---------- Zone principale ---------- */
.main { min-width: 0; padding-bottom: 80px; }
@media (min-width: 900px) { .main { padding-bottom: 0; } }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .topbar { padding: var(--space-4) var(--space-6); } }
.topbar__h1 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.topbar__sub { font-size: 11px; margin-top: 2px; }
.topbar__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.topbar__search { display: none; color: var(--fg-muted); }
.topbar__search kbd { margin-left: var(--space-3); }
[data-density-toggle] { display: none; }
@media (min-width: 720px) {
  .topbar__search, [data-density-toggle] { display: inline-flex; }
}

.views { padding: var(--space-4); }
@media (min-width: 720px) { .views { padding: var(--space-5) var(--space-6); } }
.view { display: none; }
.view.is-active { display: block; }

/* Entrée d'une vue : les blocs montent en cascade avec un léger flou
   (classe .is-entering posée par app.js pendant une seconde). */
.fx .view.is-entering :is(.followups > *, .board > .column, .create > *, .create__side > *, .agenda > *, .vault, .coach > *) {
  animation: rise-in .65s var(--ease-out) both;
}
.fx .view.is-entering :is(.board > .column, .create__side > *, .agenda > *):nth-child(2) { animation-delay: 70ms; }
.fx .view.is-entering :is(.board > .column, .create__side > *, .agenda > *):nth-child(3) { animation-delay: 140ms; }
.fx .view.is-entering .board > .column:nth-child(4) { animation-delay: 210ms; }
.fx .view.is-entering .board > .column:nth-child(5) { animation-delay: 280ms; }
.fx .view.is-entering .board > .column:nth-child(6) { animation-delay: 350ms; }
.fx .view.is-entering .create > :nth-child(2) { animation-delay: 90ms; }

.side-title { font-size: 15px; font-weight: 700; }
.empty { font-size: 14px; padding: var(--space-4); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }

/* ---------- Relances suggérées ---------- */
.followups { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }
.followup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(56, 189, 248, .4);
  border-radius: var(--radius-m);
  background: linear-gradient(90deg, var(--ai-soft), transparent 80%), var(--surface);
  box-shadow: var(--highlight), 0 8px 28px -12px rgba(56, 189, 248, .45);
  font-size: 14px;
}
.followup__text strong { color: var(--fg); }
.followup__text .badge { margin-left: 4px; vertical-align: 1px; }
.followup__role { display: block; font-size: 12px; margin-top: 2px; }
.followup__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-2); }

/* Rappels du jour : en-tête, état calme, menu « Reporter » */
.reminders__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.reminders__calm { font-size: 12px; }
.snooze { position: relative; }
.snooze > summary { list-style: none; }
.snooze > summary::-webkit-details-marker { display: none; }
.snooze__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: var(--space-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: var(--highlight), var(--shadow-pop);
  white-space: nowrap;
}
.followup-compose__busy { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; }
.followup-compose__busy[hidden] { display: none; }

/* Compteur de relances du jour sur l'onglet Pipeline */
.nav-item__badge {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--c-alert);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
@media (max-width: 899px) { .nav-item { position: relative; } .nav-item__badge { position: absolute; top: 4px; right: 22%; } }
@media (min-width: 900px) { .nav-item__badge { margin-left: auto; } }

/* ---------- Kanban ---------- */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
}
@media (min-width: 1280px) {
  .board { grid-auto-columns: minmax(170px, 1fr); }
}
.column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 320px;
  padding: var(--space-2);
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--highlight);
  scroll-snap-align: start;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.column.is-over { border-color: var(--accent); background: linear-gradient(var(--signal-soft), var(--signal-soft)), var(--surface); box-shadow: var(--highlight), var(--glow-signal); }
.column__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-muted);
}
.column__count { min-width: 22px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--fg); text-align: center; }
.column[data-status="interview"] .column__head { color: var(--fg); }
.column[data-status="interview"] .column__count,
.column[data-status="offer"] .column__count { background: var(--c-signal); border-color: transparent; color: var(--c-on-signal); box-shadow: 0 0 12px -2px rgba(31, 107, 255, .8); }
.column__empty { font-size: 12px; color: var(--fg-faint); padding: var(--space-4) var(--space-2); text-align: center; }

.app-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--highlight);
  cursor: grab;
  text-align: left;
  width: 100%;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .2s;
}
.app-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--highlight), var(--shadow-soft); }
.app-card.is-dragging { opacity: .4; transform: scale(.97); }
.app-card__company { font-weight: 700; font-size: 15px; }
.app-card__role { font-size: 13px; color: var(--fg-muted); }
.app-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.app-card--late { border-color: rgba(255, 90, 31, .5); box-shadow: var(--highlight), inset 3px 0 0 var(--c-alert); }
.app-card--interview { border-color: rgba(31, 107, 255, .55); box-shadow: var(--highlight), var(--glow-signal); }

[data-density="compact"] .app-card { padding: 8px 10px; gap: 0; }
[data-density="compact"] .app-card__meta { margin-top: 4px; }
[data-density="compact"] .app-card__company { font-size: 14px; }
[data-density="compact"] .board { grid-auto-columns: minmax(210px, 1fr); }

/* ---------- Création ---------- */
.create { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1100px) { .create { grid-template-columns: 1fr 340px; } }
.create__main { display: grid; gap: var(--space-4); }
.create__row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.create__row > .field { flex: 1 1 200px; }
.create__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.create__side { display: grid; gap: var(--space-4); }
.create__side .card { display: grid; gap: var(--space-3); }

.insights { padding: var(--space-3) var(--space-4); border: 1px solid rgba(56, 189, 248, .35); background: var(--ai-soft); border-radius: var(--radius-m); font-size: 14px; display: grid; gap: 6px; }
.insights[hidden] { display: none; }
.insights ul { margin: 0; padding-left: 18px; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.issues li { font-size: 13px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--alert-soft); border: 1px solid rgba(255, 90, 31, .4); animation: rise-in .4s var(--ease-out) both; }
.issues li.is-ok { background: var(--signal-soft); border-color: rgba(31, 107, 255, .45); }

.templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.template {
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform .3s var(--ease-out), border-color .2s, box-shadow .3s;
  font-size: 11px;
  text-align: left;
}
.template:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.template.is-selected { border-color: var(--accent); box-shadow: var(--glow-signal); }
.template__thumb { aspect-ratio: 3 / 4; border-radius: 6px; background: var(--bg-elev-2); position: relative; overflow: hidden; }
.template__thumb::before { content: ""; position: absolute; left: 12%; top: 10%; width: 50%; height: 8%; background: var(--tpl-accent); }
.template__thumb::after { content: ""; position: absolute; left: 12%; right: 12%; top: 26%; height: 50%; background: repeating-linear-gradient(var(--line) 0 2px, transparent 2px 9px); }
.template__lock { color: var(--c-ai); }
.canva-result { font-size: 12px; }

.profile { display: grid; gap: 6px; font-size: 14px; }
.profile__name { font-weight: 700; }
.profile__skills { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Agenda ---------- */
.agenda { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1100px) { .agenda { grid-template-columns: 1.2fr 1fr; } }
.agenda .card { display: grid; gap: var(--space-4); }
.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: var(--space-6) var(--space-4);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-l);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--c-ai); background: var(--ai-soft); box-shadow: var(--glow-ai); }
.dropzone__icon { font-size: 26px; }
.dropzone.is-loading { pointer-events: none; border-color: var(--c-ai); background: linear-gradient(90deg, var(--ai-soft), rgba(56, 189, 248, .25), var(--ai-soft)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.week__day { display: grid; gap: 4px; align-content: start; }
.week__label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--fg-muted); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.course { font-size: 11px; padding: 6px; border-radius: 6px; background: var(--bg-elev-2); border-left: 2px solid var(--c-ai); line-height: 1.3; }
.course .mono { display: block; color: var(--fg-muted); font-size: 10px; }

.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface-2);
  box-shadow: var(--highlight);
  animation: rise-in .45s var(--ease-out) both;
}
.slot__time { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Coffre ---------- */
.vault { display: grid; gap: var(--space-5); }
.vault__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.vault__head > div { display: grid; gap: 4px; max-width: 560px; }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.file { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; padding: 12px 14px; background: var(--bg-elev); transition: background .2s; }
.file:hover { background: var(--bg-elev-2); }
.file__icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); font-family: var(--font-mono); font-size: 10px; }
.file__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { font-size: 11px; }
.files .empty { background: var(--bg-elev); border: 0; border-radius: 0; }

/* ---------- Coach ---------- */
.coach { display: grid; grid-template-rows: 1fr auto auto; gap: var(--space-4); height: calc(100dvh - 140px); min-height: 420px; }
@media (max-width: 899px) { .coach { height: calc(100dvh - 250px); min-height: 360px; } }
.chat { position: relative; display: grid; align-content: start; gap: var(--space-3); overflow-y: auto; padding-right: 4px; scroll-padding-bottom: var(--space-4); }
.msg { max-width: min(88%, 920px); border-radius: var(--radius-l); font-size: 15px; line-height: 1.55; animation: msg-in .45s var(--ease) both; }
.msg--user { justify-self: end; padding: 10px 14px; white-space: pre-wrap; background: linear-gradient(180deg, #3A7FFF, var(--c-signal)); color: var(--c-on-signal); border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 8px 24px -10px rgba(31, 107, 255, .7); border-bottom-right-radius: var(--radius-s); }
.msg--ai { justify-self: start; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.msg__avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ai-soft); border: 1px solid var(--ai); color: var(--ai); font-size: 15px; }
.msg__body { min-width: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--highlight), var(--shadow-soft); border-radius: var(--radius-l); border-top-left-radius: var(--radius-s); display: grid; gap: var(--space-3); overflow-wrap: anywhere; }
.msg__body > * { margin: 0; }
.msg__body > *, .ai-structures__title, .ai-card { animation: block-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
.msg__body h4 { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ai); }
.msg__body ul, .msg__body ol { padding-left: 0; list-style: none; display: grid; gap: 6px; counter-reset: ai-li; }
.msg__body li { position: relative; padding-left: 22px; }
.msg__body ul li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--ai); }
.msg__body ol li { counter-increment: ai-li; }
.msg__body ol li::before { content: counter(ai-li); position: absolute; left: 0; top: .15em; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--ai-soft); color: var(--ai); font: 600 10px/1 var(--font-mono); }
.msg__body :is(p, li) strong { font-weight: 650; color: var(--fg); background: linear-gradient(transparent 62%, var(--ai-soft) 62%); padding: 0 1px; }

/* Liens sources : pastilles, plus de texte souligné */
.ai-link { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; margin: 1px 0; border: 1px solid color-mix(in srgb, var(--ai) 45%, transparent); border-radius: 999px; background: var(--ai-soft); color: var(--ai); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.ai-link span { font-size: 11px; transition: transform .2s var(--ease); }
.ai-link:hover, .ai-link:focus-visible { background: var(--ai); color: var(--c-on-ai); transform: translateY(-1px); }
.ai-link:hover span { transform: translate(2px, -2px); }

/* Structures en cartes */
.ai-structures { display: grid; gap: var(--space-3); }
.msg__body .ai-structures__title { margin: var(--space-2) 0 0; font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-muted); }
.ai-structures__grid { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ai-card { display: grid; gap: 6px; align-content: start; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--highlight); transition: border-color .25s var(--ease-out), transform .3s var(--ease-out), box-shadow .3s; }
.ai-card:hover { border-color: rgba(56, 189, 248, .5); transform: translateY(-2px); box-shadow: var(--highlight), var(--glow-ai); }
.ai-card__name { font-size: 14px; line-height: 1.3; }
.ai-card__where { font-size: 12px; color: var(--fg-muted); }
.ai-card__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.msg__body .ai-note { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); }

/* Chargement : trois points + étape en cours */
.msg--loading .msg__body { display: flex; align-items: center; gap: var(--space-3); padding: 12px 16px; }
.msg--loading .msg__avatar { animation: ai-pulse 1.6s ease-in-out infinite; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ai); animation: typing-dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.typing__label { font-size: 13px; color: var(--fg-muted); background: linear-gradient(90deg, var(--fg-muted) 0%, var(--ai) 50%, var(--fg-muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 2s linear infinite; }
.typing__label.is-in { animation: shimmer 2s linear infinite, block-in .35s var(--ease); }
.chat__form.is-busy .btn--ai { opacity: .6; pointer-events: none; }

@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes block-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes ai-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--ai-soft); } 50% { box-shadow: 0 0 0 6px var(--ai-soft); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .msg, .msg__body > *, .ai-structures__title, .ai-card, .typing i, .typing__label, .msg--loading .msg__avatar { animation: none; }
  .ai-card:hover, .ai-link:hover { transform: none; }
}
@media (max-width: 599px) {
  .msg { max-width: 100%; }
  .msg--ai { grid-template-columns: 1fr; }
  .msg__avatar { display: none; }
}
.chat__suggestions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chat__suggestions[hidden] { display: none; }
.chat__form { display: flex; gap: var(--space-2); }

/* ---------- Détail d'une candidature ---------- */
.detail__grid { display: grid; gap: var(--space-2) var(--space-4); grid-template-columns: auto 1fr; font-size: 14px; }
.detail__grid dt { color: var(--fg-muted); }
.detail__grid dd { margin: 0; overflow-wrap: anywhere; }
.detail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.detail__status { display: flex; flex-wrap: wrap; gap: 6px; }
.status-chip { padding: 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 12px; cursor: pointer; transition: background .25s, border-color .25s; }
.status-chip:hover { border-color: var(--line-strong); }
.status-chip.is-active { background: linear-gradient(180deg, #3A7FFF, var(--c-signal)); color: var(--c-on-signal); border-color: transparent; box-shadow: 0 4px 14px -4px rgba(31, 107, 255, .7); }

.capture-btn { justify-content: flex-start; border-style: dashed; }

/* ---------- Palette de commandes ---------- */
.palette__panel { max-width: 600px; }
.palette__input { width: 100%; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 17px; }
.palette__input:focus { outline: none; }
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette__item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 10px 14px; border: 1px solid transparent; border-radius: var(--radius-m); cursor: pointer; font-size: 14px; transition: background .15s; }
.palette__item.is-active { background: linear-gradient(90deg, var(--signal-soft), transparent), var(--surface-2); border-color: var(--line); }
.palette__item .mono { font-size: 11px; color: var(--fg-muted); }
.palette__item--ai .palette__label::before { content: "✦ "; color: var(--c-ai); }
.palette__hint { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Célébration « Entretien décroché » ---------- */
.celebrate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 120;
}
.celebrate[hidden] { display: none; }
.celebrate__text {
  font-size: clamp(32px, 7vw, 84px);
  padding: 12px 28px;
  background: linear-gradient(180deg, #3A7FFF, var(--c-signal));
  color: var(--c-on-signal);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 8px rgba(31, 107, 255, .15), 0 30px 90px -10px rgba(56, 189, 248, .7);
  transform: rotate(-3deg);
  animation: pop 1.6s var(--ease) forwards;
}
@keyframes pop {
  0% { transform: rotate(-3deg) scale(.4); opacity: 0; }
  18% { transform: rotate(-3deg) scale(1.06); opacity: 1; }
  30% { transform: rotate(-3deg) scale(1); }
  80% { opacity: 1; }
  100% { transform: rotate(-3deg) scale(1) translateY(-30px); opacity: 0; }
}
.confetti { position: fixed; width: 8px; height: 14px; top: -20px; z-index: 119; pointer-events: none; animation: fall 1.6s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
