@font-face {
  font-family:Inter;
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('/fonts/inter-latin.woff2') format('woff2');
}
:root {
  --fg:#0f172a;
  --mut:#64748b;
  --line:#e2e8f0;
  --acc:#0f1729;
  --secondary:#f3f5f7;
  --bg:#f8fafc;
  --blue:#2563eb;
  --purple:#9333ea;
  --teal:#0d9488;
  --radius:16px;
  /* Échelle commune : secondaire, courant, titre de carte, section, mise en avant. */
  --text-sm:0.875rem;
  --text-base:1rem;
  --text-heading:1.125rem;
  --text-section:1.5rem;
  --text-display:2.75rem;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  color:var(--fg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;
  font-size:var(--text-base);
  line-height:1.6;
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
button,input,select {
  font:inherit;
}
/* Même rôle, même taille sur ordinateur et mobile. */
.eyebrow,.pill,.badge,.text-btn,.audit-bar p,.metric-caption,
.action-list > li:before,.info-line,.limits,.qid,.fact,.source-list small,
th,.audit-id,.response-meta,.footer {
  font-size:var(--text-sm);
}
.brand span,h3 {
  font-size:var(--text-heading);
}
h2,.metric-value small {
  font-size:var(--text-section);
}
h1,.metric-value {
  font-size:var(--text-display);
}
.fact strong {
  font-size:var(--text-base);
}
button,a,input,select,summary {
  -webkit-tap-highlight-color:transparent;
}
button,a {
  touch-action:manipulation;
}
a {
  color:var(--blue);
  text-underline-offset:4px;
}
button {
  cursor:pointer;
}
button:disabled {
  opacity:.45;
  cursor:not-allowed;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible {
  outline:3px solid #2563eb;
  outline-offset:4px;
}
[hidden] {
  display:none!important;
}
.wrap {
  max-width:1200px;
  margin:0 auto;
  padding:0 32px;
}
.top {
  background:#ffffffed;
  border-bottom:1px solid var(--line);
}
.header-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:86px;
  gap:20px;
  flex-wrap:wrap;
}
.brand {
  display:flex;
  align-items:center;
  gap:22px;
  text-decoration:none;
  color:var(--mut);
}
.brand img {
  display:block;
  width:auto;
  height:38px;
  max-width:180px;
  object-fit:contain;
}
.brand span {
  position:relative;
  top:-1px;
  border-left:1px solid var(--line);
  padding-left:22px;
  line-height:1.2;
  font-weight:600;
  color:var(--fg);
  white-space:nowrap;
}
.official-link {
  text-decoration:none;
  color:var(--mut);
}
.official-link span {
  margin-left:10px;
}
.header-actions { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.header-actions .text-btn { min-height:44px; }
.account-panel { display:flex; align-items:center; gap:14px; padding:7px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 2px 5px #0f172a04; }
.account-identity { display:flex; align-items:center; gap:10px; min-width:0; padding:0 8px 0 2px; }
.account-avatar { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; border-radius:10px; background:#eef2ff; color:#4338ca; font-weight:700; font-size:var(--text-sm); }
.account-copy { display:flex; flex-direction:column; min-width:0; gap:2px; }
.account-copy .account-name { display:block; max-width:160px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; line-height:1.3; font-weight:650; color:var(--fg); }
.account-role { color:var(--mut); font-size:0.75rem; line-height:1.3; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.account-nav { display:flex; align-items:center; gap:6px; padding-left:12px; border-left:1px solid var(--line); flex-shrink:0; }
.account-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 12px; border:1px solid transparent; border-radius:9px; background:transparent; color:#475569; font-size:var(--text-sm); font-weight:550; text-decoration:none; white-space:nowrap; cursor:pointer; transition:background 150ms, color 150ms; }
.account-action svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.account-admin { background:#f1f5f9; color:#334155; }
.account-admin:hover { background:#e2e8f0; color:var(--fg); }
.account-signout:hover { background:#fff1f2; color:#be123c; }
.account-action:disabled { opacity:0.5; cursor:wait; }
.account-label-short { display:none; }
@media (max-width:1100px) { .header-actions .official-link { display:none; } }
@media (max-width:700px) {
  .header-actions { flex:1 1 100%; }
  .account-panel { width:100%; justify-content:space-between; gap:8px; }
  .account-identity { flex:1; padding-right:0; }
  .account-nav { padding-left:8px; }
  .account-signout { width:44px; padding:0; }
  .account-signout > span { display:none; }
}
@media (max-width:440px) {
  .account-label-full { display:none; }
  .account-label-short { display:inline; }
  .account-action { padding-left:10px; padding-right:10px; }
  .account-signout { padding:0; }
}
.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:32px;
  padding:54px 0 38px;
  position:relative;
}
.intro>div:first-child {
  min-width:0;
}
.intro:before {
  content:"";
  position:absolute;
  top:10px;
  left:15%;
  width:45%;
  height:190px;
  background:linear-gradient(110deg,#dbeafe80,#f3e8ff70,#ccfbf160);
  filter:blur(60px);
  z-index:-1;
}
.eyebrow {
  font-weight:700;
  letter-spacing:.08em;
  color:var(--mut);
  margin:0 0 12px;
}
h1 {
  line-height:1.18;
  letter-spacing:-.045em;
  margin:0 0 16px;
  font-weight:700;
  overflow-wrap:anywhere;
}
#introCompany {
  /* Laisser de la place aux accents, jambages et débords des glyphes
     dans chaque fragment de texte peint avec le dégradé. */
  padding:.12em .06em;
  margin-inline:-.06em;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
  background:linear-gradient(110deg,#2563eb,#9333ea 65%,#0d9488);
  color:transparent;
  -webkit-background-clip:text;
  background-clip:text;
}
.intro-copy {
  margin:0;
  max-width:620px;
  color:var(--mut);
}
.audit-control {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:14px;
  flex-shrink:0;
}
.audit-last-stop { margin:0; color:#92400e; font-size:.8125rem; line-height:1.5; text-align:right; }
@media (max-width:600px) {
  .audit-control { flex-wrap:wrap; }
  .audit-last-stop { flex-basis:100%; text-align:left; }
}
.pill,.badge {
  display:inline-flex;
  align-items:center;
  gap:7px;
  border-radius:999px;
  padding:4px 10px;
  font-weight:500;
  line-height:1.5;
  background:#f1f5f9;
  color:#475569;
}
.pill:before {
  content:"";
  height:6px;
  width:6px;
  border-radius:50%;
  background:currentColor;
}
.pill.ready,.badge.good {
  background:#ecfdf5;
  color:#047857;
}
.pill.busy,.pill.warning,.badge.warn {
  background:#fffbeb;
  color:#92400e;
}
.badge.bad {
  background:#fff1f2;
  color:#be123c;
}
.btn {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  background:var(--acc);
  color:#fff;
  border:1px solid transparent;
  border-radius:999px;
  min-height:48px;
  padding:12px 32px;
  line-height:1.5;
  font-weight:500;
  text-decoration:none;
  transition:background .15s,box-shadow .15s;
}
.btn:hover:not(:disabled) {
  background:#263449;
  box-shadow:0 4px 12px #0f172a15;
}
.btn.ghost {
  background:var(--secondary);
  color:var(--fg);
  border-color:transparent;
}
.btn.ghost:hover:not(:disabled) { background:#e8ecf0; box-shadow:none; }
.text-btn {
  border:0;
  background:none;
  padding:6px 0;
  color:var(--mut);
}
.text-btn:hover:not(:disabled) {
  color:var(--blue);
}
.audit-action {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  height:40px;
  padding:9px 16px;
  border:1px solid transparent;
  border-radius:999px;
  font-size:var(--text-sm);
  font-weight:500;
  line-height:1.4;
  white-space:nowrap;
  transition:background .15s,border-color .15s,box-shadow .15s;
}
.audit-action svg,.dialog-close svg,.dialog-action-icon svg {
  width:17px;
  height:17px;
  flex-shrink:0;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.action-cancel,.action-open,.action-export { color:var(--acc); background:var(--secondary); }
.action-cancel:hover:not(:disabled),.action-open:hover:not(:disabled),.action-export:hover:not(:disabled) { background:#e8ecf0; }
.action-delete { color:#b42318; background:var(--secondary); }
.action-delete:hover:not(:disabled) { background:#fff1f2; }
.history-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px 16px; }
.history-secondary-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.history-actions .audit-action { min-height:44px; height:auto; }
.history-actions .action-open { font-weight:600; }
.history-actions .action-delete { background:transparent; }
.history-actions .action-delete:hover:not(:disabled) { background:#fff1f2; }
.history-table td:first-child { min-width:172px; }
.history-table td:nth-child(2) { overflow-wrap:anywhere; }
.history-table .badge { white-space:nowrap; }
.workspace-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:20px;
}
.tabs {
  display:flex;
  gap:26px;
  overflow-x:auto;
  scrollbar-width:thin;
}
.tabs button {
  white-space:nowrap;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:none;
  padding:16px 0;
  color:var(--mut);
}
.tabs button.on {
  color:var(--fg);
  border-color:var(--fg);
  font-weight:600;
}
.audit-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding:18px 0 24px;
}
.audit-bar p {
  margin:0;
}
.exports {
  display:grid;
  grid-template-columns:repeat(3,max-content);
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  margin-left:auto;
}
@media (max-width:1000px) {
  .history-table { overflow:visible; }
  .history-table table,.history-table tbody { display:block; width:100%; }
  .history-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .history-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px 24px; padding:24px 0; border-bottom:1px solid var(--line); }
  .history-table tr:first-child { padding-top:0; }
  .history-table tr:last-child { padding-bottom:0; border-bottom:0; }
  .history-table td { display:block; min-width:0; padding:0; border:0; text-align:left; }
  .history-table td:first-child { grid-column:1/-1; min-width:0; }
  .history-table td:last-child { grid-column:1/-1; text-align:left; }
  .history-table td::before { content:attr(data-label); display:block; margin-bottom:5px; color:var(--mut); font-size:.75rem; font-weight:500; }
  .history-table td:last-child::before { content:none; }
  .history-table .history-actions { justify-content:flex-start; border-top:1px solid var(--line); padding-top:16px; }
  .history-table .selected-row { background:transparent; }
}
@media (max-width:540px) {
  .exports { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .exports #btnCancel { grid-column:1/-1; }
}
.view {
  display:none;
  padding-bottom:20px;
}
.view.on {
  display:block;
}
h2 {
  line-height:1.3;
  letter-spacing:-.025em;
  margin:0 0 8px;
}
h3 {
  line-height:1.5;
  margin:0 0 14px;
  letter-spacing:-.01em;
}
p {
  margin:0 0 14px;
}
.mut {
  color:var(--mut);
}
.section-head {
  margin-bottom:24px;
}
.section-head p {
  color:var(--mut);
  margin:0;
}
.kpi {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin:0 0 24px;
}
.metric {
  padding:24px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  position:relative;
  overflow:hidden;
}
.metric:before {
  content:"";
  position:absolute;
  height:3px;
  top:0;
  left:0;
  right:0;
  background:var(--metric-color);
}
.metric:nth-child(1) {
  --metric-color:var(--blue);
}
.metric:nth-child(2) {
  --metric-color:var(--purple);
}
.metric:nth-child(3) {
  --metric-color:var(--teal);
}
.metric-label {
  font-weight:600;
  margin:0 0 12px;
}
.metric-value {
  font-weight:700;
  letter-spacing:-.05em;
  line-height:1.1;
}
.metric-value small {
  font-weight:500;
  margin-left:4px;
}
.metric-caption {
  color:var(--mut);
  margin:12px 0 16px;
}
.meter {
  height:4px;
  background:#f1f5f9;
  border-radius:10px;
  overflow:hidden;
}
.meter span {
  display:block;
  height:100%;
  background:var(--metric-color);
  border-radius:10px;
}
.overview-grid {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  margin-bottom:20px;
}
.card> :last-child {
  margin-bottom:0;
}
.card-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.card-title h3 {
  margin:0;
}
.action-list {
  list-style:none;
  padding:0;
  margin:0;
  counter-reset:actions;
}
.action-list > li {
  counter-increment:actions;
  position:relative;
  padding:0 0 18px 38px;
  margin-bottom:18px;
  border-bottom:1px solid #f1f5f9;
}
.action-list > li:last-child {
  padding-bottom:0;
  margin-bottom:0;
  border:0;
}
.action-list > li:before {
  content:counter(actions,decimal-leading-zero);
  position:absolute;
  left:0;
  top:0;
  color:var(--mut);
  font-weight:600;
}
.action-list > li > strong {
  display:block;
  margin-bottom:4px;
}
.action-list p {
  color:var(--mut);
  margin:0;
}
.info-line {
  color:var(--mut);
  margin-bottom:20px;
}
.notice {
  margin:0 0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px 20px;
  padding:14px 18px;
  border:1px solid #cbd5e1;
  background:#f1f5f9;
  border-radius:12px;
}
.notice>span { flex:1 1 280px; }
.notice .btn { min-height:44px; padding:10px 18px; font-size:.875rem; }
@media(max-width:640px) { .notice .btn { width:100%; } }
.notice.error {
  border-color:#fecdd3;
  background:#fff1f2;
  color:#9f1239;
}
.empty {
  padding:50px 24px;
  text-align:center;
  background:white;
  border:1px dashed #cbd5e1;
  border-radius:var(--radius);
  color:var(--mut);
}
.empty h2 {
  color:var(--fg);
}
.empty p {
  margin:12px auto 0;
  max-width:520px;
}
details {
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:16px;
}
summary {
  cursor:pointer;
  font-weight:500;
  color:#475569;
}
details[open]>summary {
  margin-bottom:16px;
}
.limits {
  color:var(--mut);
  padding:0 4px;
}
.limits ul {
  padding-left:20px;
}
.limits li {
  margin:8px 0;
}
.question-title {
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:18px;
}
.question-title h3 {
  margin:0;
  max-width:800px;
}
.qid {
  display:inline-block;
  color:var(--mut);
  margin-bottom:6px;
  letter-spacing:.06em;
}
.facts {
  display:flex;
  flex-wrap:wrap;
  gap:12px 30px;
}
.fact {
  color:var(--mut);
}
.fact strong {
  display:block;
  color:var(--fg);
  font-weight:600;
}
.excerpt {
  border-left:2px solid #cbd5e1;
  margin:18px 0 0;
  padding:4px 0 4px 16px;
  color:#475569;
}
.warning {
  background:#fffbeb;
  color:#92400e;
  border-radius:8px;
  padding:12px 16px;
  margin-top:16px;
}
.question-footer {
  margin-top:18px;
}
.source-list {
  list-style:none;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:0;
  margin:0;
}
.source-list a {
  display:block;
  text-decoration:none;
  color:var(--fg);
  overflow-wrap:anywhere;
}
.source-list a:hover {
  color:var(--blue);
}
.source-list small {
  display:block;
  color:var(--mut);
}
.shot {
  display:block;
  max-width:100%;
  max-height:420px;
  margin-top:16px;
  object-fit:contain;
  object-position:left top;
  border:1px solid var(--line);
  border-radius:8px;
  cursor:zoom-in;
}
.capture-actions {
  margin-top:12px;
}
.table-wrap {
  overflow-x:auto;
}
table {
  border-collapse:collapse;
  width:100%;
}
th {
  text-align:left;
  color:var(--mut);
  font-weight:500;
  padding:0 14px 12px;
  border-bottom:1px solid var(--line);
}
td {
  padding:14px;
  border-bottom:1px solid #f1f5f9;
}
th:first-child,td:first-child {
  padding-left:0;
}
tr:last-child td {
  border-bottom:0;
}
td:last-child,th:last-child {
  text-align:right;
}
.selected-row {
  background:#f8fafc;
}
.audit-id {
  display:block;
  color:var(--mut);
}
.response-controls {
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:20px;
}
.response-controls label {
  font-weight:600;
}
select,input {
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:10px 12px;
  color:var(--fg);
  background:#fff;
  max-width:100%;
}
select {
  min-width:240px;
  width:100%;
}
.response-picker {
  max-width:100%;
  width:620px;
}
.response-text {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.85;
  font-family:inherit;
  margin:24px 0 0;
  padding-top:24px;
  border-top:1px solid var(--line);
}
.response-meta {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.footer {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding-top:28px;
  padding-bottom:28px;
  margin-top:24px;
  border-top:1px solid var(--line);
  color:var(--mut);
}
.login {
  max-width:440px;
  margin:0 auto 40px;
}
.login label {
  display:block;
  margin-bottom:6px;
}
.login input {
  display:block;
  width:100%;
  margin-bottom:18px;
}
.login .btn {
  margin-top:4px;
}
.login #liErr:not(:empty) { color:#b91c1c; }
.account-name { font-size:var(--text-sm); overflow-wrap:anywhere; max-width:200px; }
.admin-page { padding-top:44px; padding-bottom:24px; }
.admin-intro { max-width:760px; margin-bottom:32px; }
.admin-intro h1 { margin-bottom:12px; }
.admin-grid { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.3fr); gap:24px; align-items:start; }
.admin-form label { display:block; margin-top:20px; margin-bottom:6px; }
.admin-form input { width:100%; }
.admin-form input + .mut { font-size:var(--text-sm); margin-top:8px; }
.admin-form .btn { margin-top:16px; }
.form-error { color:#b91c1c; }
.admin-list-heading { display:flex; justify-content:space-between; gap:16px; align-items:start; }
.admin-list-heading h2 { margin-bottom:4px; }
.admin-list-heading .text-btn { min-height:44px; }
.admin-user-list { list-style:none; padding:0; margin:0; }
.admin-user-list li { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 0; border-bottom:1px solid var(--line); }
.admin-user-list li > div { min-width:0; overflow-wrap:anywhere; }
.admin-user-list p { margin:4px 0 0; font-size:var(--text-sm); }
.admin-user-list .pill { flex-shrink:0; }
.admin-user-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.user-delete { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:0 10px; border:1px solid #fecdd3; border-radius:8px; background:#fff; color:#be123c; font-size:var(--text-sm); cursor:pointer; }
.user-delete svg,.delete-dialog-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.user-delete:hover { background:#fff1f2; border-color:#fda4af; }
.user-delete:disabled { opacity:0.5; cursor:wait; }
.delete-user-dialog { width:min(520px, calc(100vw - 32px)); padding:28px; color:var(--fg); box-shadow:0 24px 80px #0f172a33; }
.delete-dialog-icon { display:grid; place-items:center; width:44px; height:44px; background:#fff1f2; border-radius:12px; color:#be123c; margin-bottom:18px; }
.delete-dialog-icon svg { width:24px; height:24px; }
.delete-user-dialog h2 { margin:0 0 12px; }
.delete-user-dialog p { overflow-wrap:anywhere; }
.delete-dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:24px; }
.delete-dialog-actions .btn { padding-left:14px; padding-right:14px; font-size:var(--text-sm); }
.btn.danger { background:#be123c; border-color:#be123c; color:#fff; }
.btn.danger:hover:not(:disabled) { background:#9f1239; border-color:#9f1239; }
@media (max-width:600px) {
  .admin-user-actions .pill { display:none; }
  .delete-user-dialog { padding:24px; }
  .delete-dialog-actions { grid-template-columns:1fr; }
  .delete-dialog-actions .btn { width:100%; }
}
.admin-list-note { margin-top:24px; font-size:var(--text-sm); }
@media (max-width:800px) { .admin-grid { grid-template-columns:minmax(0, 1fr); } }
dialog {
  max-width:96vw;
  max-height:94vh;
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
}
dialog::backdrop {
  background:#0f172aa6;
}
dialog img {
  display:block;
  max-width:90vw;
  margin-top:16px;
}
#dlg button {
  display:block;
  margin-left:auto;
}
.audit-action-dialog {
  width:520px;
  max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 40px);
  padding:0;
  border:1px solid #ffffffb3;
  border-radius:24px;
  background:#fff;
  color:var(--fg);
  box-shadow:0 24px 80px #0f172a33;
  overflow:auto;
}
.audit-action-dialog[open] { animation:dialog-appear .18s ease-out; }
.audit-action-dialog::backdrop { background:#0f172a85; backdrop-filter:blur(4px); }
.audit-action-dialog form { position:relative; padding:32px; }
.dialog-close {
  position:absolute;
  top:20px;
  right:20px;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--mut);
}
.dialog-close:hover { background:#f1f5f9; color:var(--fg); }
.dialog-action-icon { display:grid; place-items:center; width:52px; height:52px; border-radius:999px; margin-bottom:22px; }
.dialog-action-icon svg { width:25px; height:25px; }
[data-action="delete"] .dialog-action-icon { background:var(--secondary); color:#b42318; }
[data-action="cancel"] .dialog-action-icon { background:var(--secondary); color:var(--acc); }
.dialog-eyebrow { margin:0 0 8px; color:var(--mut); font-size:.6875rem; font-weight:700; letter-spacing:.13em; }
.audit-action-dialog h2 { margin:0 0 12px; font-size:1.5rem; line-height:1.3; letter-spacing:-.025em; }
.dialog-description { margin:0; color:#475569; font-size:.9375rem; line-height:1.65; }
.dialog-audit { display:grid; gap:3px; margin:24px 0 16px; padding:16px 18px; background:#f8fafc; border:1px solid var(--line); border-radius:12px; overflow-wrap:anywhere; }
.dialog-audit-label { color:var(--mut); font-size:.75rem; margin-bottom:4px; }
.dialog-audit strong { font-size:1rem; }
.dialog-audit>span:not(.dialog-audit-label) { color:#475569; font-size:.8125rem; }
.dialog-audit small { color:var(--mut); font-size:.75rem; }
.dialog-consequence { margin:0; font-size:.8125rem; line-height:1.6; }
[data-action="delete"] .dialog-consequence { color:#b42318; }
[data-action="cancel"] .dialog-consequence { color:#475569; }
.dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:28px; }
.dialog-actions .btn { width:100%; min-height:48px; padding:12px 16px; border-radius:999px; font-size:.875rem; white-space:nowrap; }
@keyframes dialog-appear { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .audit-action-dialog[open] { animation:none; } }
@media (max-width:540px) {
  .audit-action-dialog form { padding:26px 22px 22px; }
  .dialog-actions { grid-template-columns:1fr; }
  .dialog-actions .btn { width:100%; }
}
.skip-link {
  position:absolute;
  top:-70px;
  left:16px;
  z-index:20;
  background:white;
  padding:12px;
}
.skip-link:focus {
  top:10px;
}
@media(min-width:1400px) {
  .intro {
    padding-top:64px;
    padding-bottom:48px;
  }
}
@media(max-width:900px) {
  .tabs {
    gap:20px;
  }
  .overview-grid {
    grid-template-columns:1fr;
  }
  .intro {
    gap:20px;
  }
  .audit-control {
    align-self:flex-end;
  }
  .metric {
    padding:20px;
  }
  .workspace-bar {
    align-items:stretch;
  }
  .workspace-bar>.text-btn {
    flex-shrink:0;
  }
  .audit-bar {
    align-items:flex-start;
  }
  .source-list {
    grid-template-columns:1fr;
  }
}
@media(max-width:640px) {
  :root {
    --text-display:2.25rem;
  }
  .wrap {
    padding-left:20px;
    padding-right:20px;
  }
  .header-inner {
    min-height:72px;
    padding-top:16px;
    padding-bottom:16px;
    gap:12px 20px;
  }
  .brand {
    gap:14px;
  }
  .brand img {
    height:28px;
  }
  .brand span {
    padding-left:14px;
  }
  .intro {
    padding:32px 0 24px;
    display:block;
  }
  .audit-control {
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    margin-top:24px;
    gap:8px;
  }
  .kpi {
    grid-template-columns:1fr;
    gap:12px;
  }
  .metric {
    padding:20px;
    display:grid;
    grid-template-columns:1fr auto;
    column-gap:12px;
  }
  .metric-label {
    margin-bottom:4px;
  }
  .metric-value {
    grid-column:2;
    grid-row:1/3;
    align-self:center;
  }
  .metric-caption {
    margin:0;
  }
  .meter {
    grid-column:1/-1;
    margin-top:16px;
  }
  .workspace-bar {
    gap:12px;
  }
  .tabs {
    gap:22px;
  }
  .audit-bar {
    flex-direction:column;
    gap:8px;
    padding:16px 0 20px;
  }
  .exports {
    width:100%;
    justify-content:flex-start;
    margin:4px 0 0;
    gap:8px;
  }
  .card {
    padding:20px;
  }
  .question-title {
    gap:10px;
  }
  .question-title .badge {
    flex-shrink:0;
  }
  .facts {
    gap:14px 24px;
  }
  .fact {
    flex-basis:40%;
  }
  .footer {
    flex-direction:column;
    gap:4px;
  }
  .response-controls {
    display:block;
  }
  .response-controls label {
    display:block;
    margin-bottom:8px;
  }
  .card-title {
    flex-wrap:wrap;
  }
  .official-link span {
    margin-left:2px;
  }
}
.resume-panel {
  border-color:#fcd34d;
  background:#fffbeb;
}
.resume-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.browser-link { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:6px 12px; border:1px solid #d9cba6; border-radius:999px; background:transparent; color:#785823; font-size:.8125rem; font-weight:500; line-height:1.5; text-decoration:none; }
.browser-link:hover { background:#f5eedb; border-color:#b8a476; }
.browser-link:focus-visible { outline:2px solid #785823; outline-offset:3px; }
@media (max-width:600px) { .resume-actions .btn { width:100%; } }
.resume-confirm {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
  cursor:pointer;
}
.resume-confirm input {
  flex-shrink:0;
  width:20px;
  height:20px;
  margin:0;
  padding:0;
  accent-color:var(--acc);
}

.report-prose { overflow-wrap:anywhere; }
.report-prose p { margin:0 0 .75em; }
.report-prose ol,.report-prose ul { margin:.75em 0; padding-left:1.5em; }
.report-prose li { margin:.35em 0; }
.report-prose h4 { margin:1em 0 .5em; }
.report-prose > :first-child { margin-top:0; }
.report-prose > :last-child { margin-bottom:0; }
.report-prose code { font-size:.9em; background:#f3f5f7; padding:2px 5px; border-radius:4px; }

/* Comparaison chronologique des audits */
.evolution-view .audit-bar,.evolution-view #resumePanel,.evolution-view #auditDiagnostics { display:none; }
.evolution-view #v-evolution { padding-top:24px; }
.evo-controls { display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px; }
.evo-controls>div:first-child { flex:1 1 280px; }
.evo-controls label { display:block; font-weight:600; margin-bottom:6px; }
.evo-controls input { min-height:46px; }
.evo-controls .btn { min-height:46px; padding:10px 18px; }
.evo-kpi .metric-value { font-size:2.1rem; margin-bottom:10px; }
.evo-kpi .metric-caption { margin:8px 0; }
.evo-delta { font-size:.875rem; color:var(--mut); margin:0; }
.evo-delta.up { color:#047857; }
.evo-delta.down { color:#be123c; }
.evo-charts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.evo-chart { min-width:0; margin:0; }
.evo-chart-scroll { width:100%; min-width:0; }
.evo-chart svg { display:block; width:100%; height:280px; max-height:none; }
.evo-chart svg text { font:13px Inter,sans-serif; fill:#475569; }
.evo-chart svg .evo-axis-date { font-size:12px; }
.evo-chart circle { cursor:pointer; stroke:white; stroke-width:2px; }
.evo-chart circle:hover,.evo-chart circle:focus { r:8; stroke:#0f172a; outline:none; }
.evo-completeness { min-width:0; }
.evo-bar-row { width:100%; display:grid; grid-template-columns:150px minmax(40px,1fr) 50px; gap:12px; align-items:center; text-align:left; background:transparent; border:0; border-radius:8px; padding:10px 2px; font-size:.75rem; color:var(--mut); }
.evo-bar-row:hover,.evo-bar-row:focus-visible { background:#f1f5f9; }
.evo-bar-row strong { color:var(--fg); text-align:right; }
.evo-track { display:block; height:10px; background:#f1f5f9; border-radius:10px; overflow:hidden; }
.evo-track>span { display:block; height:100%; background:var(--teal); border-radius:10px; }
.evo-narrative { margin-top:24px; }
#evoAudit { margin-top:8px; }
@media(max-width:900px) { .evo-charts { grid-template-columns:1fr; } }
@media(max-width:640px) {
  .evo-controls>div { flex:1 1 130px; min-width:0; }
  .evo-controls input { width:100%; }
  .evo-controls select { min-width:0; }
  .evo-kpi .evo-delta { grid-column:1/-1; margin-top:12px; }
  .evo-bar-row { grid-template-columns:130px minmax(30px,1fr) 42px; gap:6px; }
}

/* Configuration et fiches entreprises */
.config-heading { max-width:760px; margin-bottom:28px; }
.config-heading .eyebrow { font-size:.75rem; margin-bottom:8px; }
.config-layout { display:grid; grid-template-columns:minmax(270px,340px) minmax(0,1fr); gap:28px; align-items:start; }
.company-library { position:sticky; top:24px; margin:0; padding:24px; }
.company-library-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:24px; }
.company-library-heading h3 { margin:0; font-size:1rem; }
.company-library-heading .badge { flex-shrink:0; font-size:.75rem; }
.company-library label { display:block; font-weight:600; font-size:.875rem; margin-bottom:8px; }
.company-library select { min-width:0; width:100%; font:inherit; font-size:.875rem; min-height:46px; }
.company-library>p { font-size:.8125rem; line-height:1.65; margin:12px 0 0; }
.company-library-add { border-top:1px solid var(--line); padding-top:20px; margin-top:24px; }
.company-library-add p { color:var(--mut); font-size:.8125rem; margin-bottom:10px; }
.company-library .btn { width:100%; padding:10px 12px; min-height:44px; gap:8px; font-size:.875rem; }
.company-form { min-width:0; margin:0; padding:32px; }
.company-form-heading { padding-bottom:24px; margin-bottom:28px; border-bottom:1px solid var(--line); }
.company-form-heading .eyebrow { margin:0 0 8px; font-size:.6875rem; letter-spacing:.1em; }
.company-form-heading h3 { font-size:1.375rem; line-height:1.35; margin:0 0 10px; }
.company-form .mut { font-size:.8125rem; line-height:1.65; margin:0; }
.company-form-heading>.mut { font-size:.875rem; max-width:620px; }
.company-fieldset { border:0; padding:0; margin:0 0 28px; min-width:0; }
.company-fieldset legend { padding:0; font-size:.9375rem; font-weight:600; margin-bottom:8px; }
.company-form .company-fieldset-help { margin-bottom:18px; }
.company-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.company-field-wide { grid-column:1/-1; }
.company-field { display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:0; }
.company-fieldset>.company-field { margin-top:10px; }
.company-form label { display:block; font-weight:500; font-size:.875rem; margin:0; }
.field-optional { color:var(--mut); font-size:.75rem; font-weight:400; margin-left:6px; }
.company-form input,.company-form textarea { width:100%; min-width:0; padding:12px 14px; border:1px solid #cbd5e1; border-radius:9px; font:inherit; font-size:.875rem; background:#fff; color:var(--fg); }
.company-form input::placeholder,.company-form textarea::placeholder { color:#64748b; opacity:1; }
.company-form textarea { resize:vertical; min-height:140px; line-height:1.7; }
.company-form input:focus-visible,.company-form textarea:focus-visible,.company-library select:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.config-form-footer { border-top:1px solid var(--line); padding-top:24px; }
.config-actions { display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; }
.config-actions .btn { font-size:.875rem; padding:12px 22px; }
.company-form #configStatus:not(:empty) { margin-top:12px; }
@media(max-width:1050px) {
  .config-layout { grid-template-columns:minmax(240px,300px) minmax(0,1fr); gap:20px; }
  .company-fields { grid-template-columns:1fr; }
  .company-form { padding:24px; }
}
@media(max-width:800px) {
  .config-layout { grid-template-columns:1fr; }
  .company-library { position:static; }
}
@media(max-width:640px) {
  .company-form,.company-library { padding:20px; }
  .company-form-heading h3 { font-size:1.25rem; }
  .config-actions .btn { width:100%; }
}

.config-layout:not(.form-open) { grid-template-columns:minmax(0,760px); }
.config-layout:not(.form-open) .company-library { position:static; }
.company-selection-details { margin-top:24px; padding:18px; border-radius:12px; background:var(--bg); overflow-wrap:anywhere; }
.company-selection-details h4 { font-size:1rem; margin:0 0 4px; }
.company-selection-details p { font-size:.875rem; margin-bottom:10px; }
.company-selection-details p:last-child { margin:0; }
.company-context { white-space:pre-wrap; }
.company-library-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; margin-top:20px; }
.company-library-actions .btn { width:auto; }
.company-delete { color:#b42318; font-size:.8125rem; }
.company-delete:hover:not(:disabled) { color:#7f1d1d; }
@media(max-width:640px) { .company-library-actions .btn { width:100%; } }

/* Filtre discret, intégré à la liste des audits. */
.history-filter { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; margin:-8px 0 18px; }
.history-filter>div { display:flex; align-items:center; gap:10px; min-width:0; max-width:100%; }
.history-filter label { color:var(--fg); font-size:.875rem; font-weight:500; }
.history-filter select { width:auto; max-width:320px; min-width:0; min-height:44px; padding:8px 32px 8px 12px; border-color:#94a3b8; border-radius:8px; background-color:#fff; color:var(--fg); font:inherit; font-size:.9375rem; font-weight:500; line-height:1.4; text-overflow:ellipsis; }
.history-filter select:hover { border-color:#64748b; }
.history-filter p { margin:0 0 0 auto; color:#475569; font-size:.875rem; }
@media(max-width:640px) {
  .history-filter { gap:8px 12px; }
  .history-filter>div { flex:1 1 100%; }
  .history-filter select { flex:1; max-width:none; font-size:1rem; }
  .history-filter p { margin-left:0; }
}

@media(max-width:480px) {
  .evo-bar-row { grid-template-columns:minmax(0,1fr) 50px; gap:6px 12px; padding:12px 2px; }
  .evo-bar-row>span:first-child { grid-column:1/-1; font-size:.8125rem; }
}

/* Notifications et programmation, réunies dans la configuration du compte. */
.automation-settings { margin-top:40px; padding-top:32px; border-top:1px solid var(--line); }
.automation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; align-items:start; }
.automation-grid .card { margin:0; min-width:0; }
.automation-grid label:not(.automation-check) { display:block; margin:18px 0 6px; font-weight:600; }
.automation-grid input:not([type=checkbox]),.automation-grid select { width:100%; }
.automation-check { display:flex; align-items:flex-start; gap:10px; margin:20px 0; min-height:44px; padding:8px 0; cursor:pointer; }
.automation-check input { width:20px; height:20px; margin:3px 0 0; flex-shrink:0; accent-color:var(--acc); }
.automation-fields { border:0; padding:0; margin:0 0 18px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.automation-fields legend { font-size:var(--text-sm); font-weight:600; color:#475569; padding:0; }
.automation-fields > div:last-child { grid-column:1/-1; }
.automation-fields p,.automation-note { font-size:var(--text-sm); margin-top:10px; }
.automation-fields:disabled { opacity:.55; }
.automation-buttons { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 14px; }
.automation-next { padding:12px 14px; border-radius:8px; background:#f1f5f9; font-size:var(--text-sm); }
.automation-unavailable { color:#92400e; }
.automation-grid [role=status]:not(:empty),.automation-grid [role=alert]:not(:empty) { margin-top:14px; overflow-wrap:anywhere; }
.automation-list { margin-top:28px; }
.automation-list:empty { display:none; }
.automation-list ul { list-style:none; padding:0; margin:0; }
.automation-list li { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); }
.automation-list p { margin:4px 0 0; font-size:var(--text-sm); color:#475569; }
.automation-list .text-btn { min-height:44px; }
@media(max-width:800px) { .automation-grid { grid-template-columns:1fr; } }
@media(max-width:440px) { .automation-buttons { flex-direction:column; } .automation-fields { grid-template-columns:1fr; } }
