:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f9;
  --text: #172033;
  --muted: #5c687a;
  --border: #d9e1ec;
  --brand: #184f90;
  --brand-2: #0f6ec7;
  --brand-soft: #e7f1ff;
  --success: #1f7a4d;
  --critical: #b42318;
  --major: #b54708;
  --minor: #475467;
  --manual: #5a3ca4;
  --shadow: 0 18px 45px rgba(23, 32, 51, .08);
  --radius: 18px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #101828;
  --surface: #182230;
  --surface-2: #202b3c;
  --text: #f2f4f7;
  --muted: #c7d0dd;
  --border: #344054;
  --brand: #84caff;
  --brand-2: #53b1fd;
  --brand-soft: #132f4c;
  --success: #73e2a3;
  --critical: #fda29b;
  --major: #fdb022;
  --minor: #d0d5dd;
  --manual: #d6bbfb;
  --shadow: 0 20px 50px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background: radial-gradient(circle at top left, var(--brand-soft), transparent 36rem), var(--bg);
  color: var(--text);
}

a { color: var(--brand-2); }
a:hover { text-decoration-thickness: .16em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 20;
  padding: .8rem 1rem;
  color: #fff;
  background: #000;
  border-radius: .8rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  padding: 1.25rem 1rem;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
.brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: .05rem;
  width: 3.45rem;
  height: 3.45rem;
  border-radius: .85rem;
  background:
    linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--surface);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -10px 18px rgba(0,0,0,.16), 0 14px 26px rgba(15, 110, 199, .2);
}
.brand-mark span:first-child {
  align-self: start;
  justify-self: end;
  margin-top: .62rem;
  font-size: 1.25rem;
}
.brand-mark span:last-child {
  align-self: end;
  justify-self: start;
  margin-bottom: .62rem;
  font-size: 1.25rem;
  color: #b8ecff;
}
.brand-copy {
  min-width: 0;
  max-width: 48rem;
}
.eyebrow, .pill {
  margin: 0 0 .35rem;
  color: var(--brand);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.brand .eyebrow {
  margin-bottom: .2rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: none;
}
.site-header h1, .panel h2, .panel h3 { line-height: 1.15; }
.site-header h1 {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  overflow-wrap: normal;
}
.site-header p { margin: .35rem 0 0; color: var(--muted); max-width: 70ch; }

.main-nav {
  display: flex;
  gap: .55rem;
  align-items: center;
  flex-wrap: wrap;
}
.main-nav a, .theme-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  padding: .7rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
}
.main-nav a.active { background: var(--brand); color: var(--surface); border-color: var(--brand); }
.main-nav a i,
.theme-toggle i {
  font-size: .95rem;
  line-height: 1;
}
.main-nav a:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  box-shadow: 0 10px 24px rgba(23, 32, 51, .1);
}
.theme-toggle { cursor: pointer; font-size: 1.1rem; }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2rem;
}
.panel {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 4vw, 1.7rem);
  margin: 1rem 0;
}
.hero-grid { display: grid; gap: 1rem; }
.audit-panel { min-width: 0; }
.info-panel { align-self: start; }
.muted, .help { color: var(--muted); }
.help { margin: .35rem 0 0; font-size: .95rem; }
.note {
  padding: 1rem;
  border-left: 4px solid var(--brand-2);
  background: var(--surface-2);
  border-radius: .9rem;
}
.optional { color: var(--muted); font-weight: 500; }

.audit-form, .filters { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: .45rem; }
.field label { font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.checkbox-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  gap: .65rem;
  min-height: 48px;
}
.checkbox-field input { width: 1.25rem; height: 1.25rem; min-height: auto; }
.checkbox-field label { font-weight: 700; }

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--surface); }
.btn.secondary { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.btn.small { min-height: 38px; padding: .55rem .75rem; font-size: .95rem; }
.btn.danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 45%, var(--border)); }
.btn {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 32, 51, .12);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--brand) 88%, #000);
  border-color: color-mix(in srgb, var(--brand) 88%, #000);
}
.btn.secondary:hover {
  background: color-mix(in srgb, var(--brand-soft) 76%, var(--surface));
}
.btn.danger:hover {
  background: color-mix(in srgb, var(--critical) 10%, var(--surface));
  border-color: var(--critical);
}
.btn i {
  font-size: .95em;
  line-height: 1;
}
.btn:disabled { opacity: .7; cursor: progress; }
.actions-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1rem; }

.check-list { padding-left: 1.3rem; }
.check-list li { margin: .45rem 0; }
.section-head {
  display: grid;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.section-head.compact { grid-template-columns: 1fr auto; }
.section-head h2, .section-head h3 { margin: 0; }
.score-card {
  justify-self: start;
  display: grid;
  place-items: center;
  min-width: 7rem;
  min-height: 7rem;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 6px solid color-mix(in srgb, var(--brand) 55%, var(--surface));
  color: var(--brand);
  text-align: center;
}
.score-card strong { display: block; font-size: 2.2rem; line-height: 1; }
.score-card span { font-weight: 900; }
.score-card small { max-width: 6rem; font-size: .72rem; line-height: 1.15; color: var(--muted); }
.score-card.large { min-width: 8.3rem; min-height: 8.3rem; }
.score-card.large strong { font-size: 2.7rem; }
.score-bar {
  height: .8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
}
.score-bar span { display: block; height: 100%; background: var(--brand-2); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.kpi {
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}
.kpi strong { display: block; font-size: clamp(1.45rem, 8vw, 2.2rem); line-height: 1; }
.kpi span { color: var(--muted); font-weight: 700; }
.kpi-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.kpi-label i {
  color: var(--brand);
}
.kpi.critical { border-left: 5px solid var(--critical); }
.kpi.major { border-left: 5px solid var(--major); }
.kpi.minor { border-left: 5px solid var(--minor); }
.kpi.manual { border-left: 5px solid var(--manual); }

.report-list { display: grid; gap: .8rem; }
.report-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}
.report-card h3 { margin: 0 0 .25rem; }
.report-card p { margin: .25rem 0; overflow-wrap: anywhere; }
.report-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.report-actions.stack { align-items: stretch; }
.report-actions.stack form { display: contents; }
.report-actions .btn {
  justify-content: flex-start;
}
.report-actions .action-csv {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 38%, var(--border));
}
.report-actions .action-csv:hover {
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  border-color: var(--success);
}
.report-actions .action-pdf {
  color: var(--major);
  border-color: color-mix(in srgb, var(--major) 40%, var(--border));
}
.report-actions .action-pdf:hover {
  background: color-mix(in srgb, var(--major) 10%, var(--surface));
  border-color: var(--major);
}
.report-actions .action-delete {
  justify-content: flex-start;
}
.mini-score {
  color: var(--brand);
  font-weight: 900;
}
.mini-kpis { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.mini-kpis span {
  padding: .35rem .55rem;
  border-radius: .65rem;
  border: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 700;
}

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
caption { text-align: left; font-weight: 800; margin-bottom: .75rem; }
th, td { padding: .8rem; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
th { background: var(--surface-2); }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: .45rem;
}
code { padding: .1rem .3rem; }
pre { padding: .75rem; overflow-x: auto; max-width: 44rem; white-space: pre-wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 900;
  border: 1px solid currentColor;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}
.badge.critical { color: var(--critical); }
.badge.major { color: var(--major); }
.badge.minor { color: var(--minor); }
.badge.manual { color: var(--manual); }

.filters {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}
.mobile-results { display: grid; gap: 1rem; }
.desktop-results { display: none; }
.issue-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-left-width: 6px;
  border-radius: 1rem;
  background: var(--surface-2);
}
.issue-card.critical { border-left-color: var(--critical); }
.issue-card.major { border-left-color: var(--major); }
.issue-card.minor { border-left-color: var(--minor); }
.issue-card.manual { border-left-color: var(--manual); }
.issue-top { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.issue-card dl {
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr;
  gap: .35rem .75rem;
}
.issue-card dt { font-weight: 900; color: var(--muted); }
.issue-card dd { margin: 0; overflow-wrap: anywhere; }
.recommendation { padding: .8rem; border-radius: .8rem; background: var(--surface); }

.checklist-grid, .status-grid { display: grid; gap: 1rem; }
.check-card, .status-grid div {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}
.check-card {
  position: relative;
  overflow: hidden;
}
.check-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .25rem;
  background: linear-gradient(90deg, var(--brand), var(--success));
}
.check-number {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--brand-soft) 70%, transparent);
}
.status-grid strong {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .35rem;
}
.status-grid span {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.source-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .28rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  width: fit-content;
}

.source-tabs label {
  cursor: pointer;
}

.source-tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-tabs span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .5rem .85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 850;
}

.source-tabs input:checked + span {
  background: var(--brand);
  color: var(--surface);
  box-shadow: 0 8px 18px rgba(23, 32, 51, .12);
}

.source-html-field textarea {
  min-height: 16rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  line-height: 1.45;
}

.alert {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  margin: 1rem 0;
  font-weight: 700;
}
.alert.error { background: color-mix(in srgb, var(--critical) 10%, var(--surface)); color: var(--critical); }
.alert.success { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.empty {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 1rem;
  color: var(--muted);
}
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  color: var(--muted);
  font-size: .95rem;
}

@media (min-width: 760px) {
  .header-inner { grid-template-columns: 1fr auto; align-items: start; }
  .hero-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, .9fr); }
  .filters { grid-template-columns: 180px minmax(180px, 1fr) minmax(220px, 1fr) auto; align-items: end; }
  .section-head { grid-template-columns: minmax(0, 1fr) auto; }
  .score-card { justify-self: end; }
  .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .report-actions.stack { flex-direction: column; }
  .mobile-results { display: none; }
  .desktop-results { display: block; }
  .checklist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .container, .site-footer { width: min(100% - 1rem, 1180px); }
  .site-header { padding-inline: .5rem; }
  .panel { border-radius: 1rem; padding: .9rem; }
  .main-nav a, .theme-toggle, .btn { width: 100%; }
  .main-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .theme-toggle { grid-column: span 2; }
  .actions-row .btn, .report-actions .btn { width: 100%; }
  .section-head.compact { grid-template-columns: 1fr; }
  .score-card { border-width: 4px; min-width: 6.5rem; min-height: 6.5rem; }
}

/* --- V3 : identité graphique application + comptes utilisateurs --- */
.site-header {
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 8%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 18rem),
    linear-gradient(120deg, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  opacity: .9;
}
.header-inner, .user-strip { position: relative; z-index: 1; }
.header-inner {
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: calc(var(--radius) + .3rem);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.brand-mark {
  position: relative;
  isolation: isolate;
  box-shadow: inset 0 -10px 18px rgba(0,0,0,.16), 0 16px 30px rgba(15, 110, 199, .25);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid color-mix(in srgb, var(--surface) 58%, transparent);
  border-radius: .75rem;
  z-index: -1;
}
.user-strip {
  width: min(1180px, calc(100% - 2rem));
  margin: .75rem auto 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .7rem .95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  font-size: .95rem;
}
.user-strip .dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--success);
}
.welcome-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 88%, var(--surface)), var(--surface));
  box-shadow: var(--shadow);
}
.welcome-band strong { display: block; font-size: 1.1rem; }
.welcome-band span { display: block; color: var(--muted); }
.auth-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.auth-panel {
  position: relative;
  overflow: hidden;
}
.auth-panel::after {
  content: "";
  position: absolute;
  right: -4rem;
  top: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-2) 16%, transparent);
  pointer-events: none;
}
.auth-side {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brand-soft) 72%, var(--surface)), var(--surface));
}
.auth-switch {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.captcha-box {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--border));
  border-radius: 1.1rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 70%, var(--surface)), var(--surface));
}
.captcha-question {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.captcha-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: .9rem;
  background: var(--brand);
  color: var(--surface);
  box-shadow: 0 8px 18px rgba(23, 32, 51, .12);
}
.captcha-label {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: .92rem;
}
.captcha-question strong {
  display: block;
  margin-top: .15rem;
  font-size: 1.35rem;
  letter-spacing: .03em;
}
.captcha-answer-field {
  max-width: 18rem;
}
.account-kpis.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-grid { margin-top: 1rem; }
.report-card.history-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.report-card.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(23, 32, 51, .10);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.main-nav a[href="logout.php"] {
  color: var(--critical);
  border-color: color-mix(in srgb, var(--critical) 30%, var(--border));
}

@media (min-width: 760px) {
  .auth-layout { grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); }
  .account-kpis.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .welcome-band { align-items: stretch; flex-direction: column; }
  .welcome-band .btn { width: 100%; }
  .user-strip { width: min(100% - 1rem, 1180px); border-radius: 1rem; }
  .header-inner { border-radius: 1rem; }
}


/* --- V3.1 : correction alignement bandeau connecté --- */
.header-inner .user-strip {
  grid-column: 1 / -1;
  width: 100%;
  margin: .25rem 0 0;
}
.user-strip-main {
  color: var(--text);
}
@media (min-width: 760px) {
  .header-inner .user-strip {
    align-self: stretch;
  }
}

/* --- V3.2 : header robuste + page Mon compte plus aérée --- */
.header-inner {
  display: block !important;
  max-width: 1180px;
}
.header-top {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
.header-inner .user-strip,
.user-strip {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: none;
  margin: 1rem 0 0 !important;
  border-radius: 1.1rem;
  padding: .85rem 1rem;
  justify-content: flex-start;
}
.user-strip-main strong {
  color: var(--text);
}
.container {
  margin-top: .75rem;
}
.account-hero.panel,
.account-card.panel,
.last-activity.panel,
.empty-account.panel {
  padding: clamp(1.25rem, 4vw, 2rem);
}
.account-hero {
  overflow: hidden;
  position: relative;
}
.account-hero::after {
  content: "";
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-2) 12%, transparent);
  pointer-events: none;
}
.account-hero-content,
.account-kpis,
.account-layout,
.last-activity-main {
  position: relative;
  z-index: 1;
}
.account-hero-content {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.account-hero h2,
.last-activity h2,
.empty-account h2,
.account-card h2 {
  margin: .15rem 0 .45rem;
}
.account-hero h2 {
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}
.account-meta {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin: .25rem 0 0;
  color: var(--muted);
}
.account-intro {
  max-width: 62ch;
  margin-top: .8rem;
}
.account-hero-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
}
.account-kpis.kpi-grid {
  gap: 1rem;
}
.account-kpi {
  min-height: 9rem;
  display: grid;
  align-content: space-between;
  gap: .55rem;
  padding: 1.1rem;
}
.account-kpi .kpi-label {
  color: var(--brand);
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.account-kpi strong {
  font-size: clamp(2rem, 7vw, 3rem);
}
.account-kpi small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.25;
}
.account-layout {
  display: grid;
  gap: 1rem;
  align-items: stretch;
  margin: 1rem 0;
}
.account-section-head {
  margin-bottom: 1.25rem;
}
.account-grid.status-grid {
  gap: 1rem;
}
.account-grid.status-grid div {
  min-height: 10.5rem;
  padding: 1.15rem;
  display: grid;
  align-content: start;
  gap: .45rem;
}
.account-grid .card-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border-radius: .85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: .25rem;
}
.account-aside {
  display: grid;
  align-content: start;
  gap: .75rem;
}
.account-aside .btn {
  justify-self: start;
  margin-top: .5rem;
}
.last-activity-main {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}
.activity-url {
  overflow-wrap: anywhere;
  margin-top: .2rem;
}
.activity-kpis {
  margin-top: .9rem;
}
.last-activity-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.empty-account {
  display: grid;
  gap: .75rem;
  justify-items: start;
}

@media (min-width: 760px) {
  .header-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .main-nav {
    justify-content: flex-end;
  }
  .account-hero-content {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .account-hero-actions {
    justify-content: flex-end;
  }
  .account-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr);
  }
  .last-activity-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .last-activity-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .brand {
    gap: .85rem;
  }
  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }
  .main-nav a,
  .theme-toggle {
    width: 100%;
  }
  .theme-toggle {
    grid-column: span 2;
  }
  .user-strip {
    display: grid;
    gap: .35rem;
  }
  .user-strip .dot {
    display: none;
  }
}

@media (max-width: 520px) {
  .account-hero-actions,
  .last-activity-actions {
    display: grid;
  }
  .account-hero-actions .btn,
  .last-activity-actions .btn,
  .account-aside .btn,
  .empty-account .btn {
    width: 100%;
  }
  .account-kpis.kpi-grid {
    grid-template-columns: 1fr;
  }
  .account-kpi {
    min-height: auto;
  }
}

/* --- V3.3 : admin + badge score robuste --- */
.section-head,
.report-card,
.kpi,
.panel,
td,
th {
  min-width: 0;
}

a,
code,
pre,
.muted,
.help {
  overflow-wrap: anywhere;
}

.score-card {
  --score: 0;
  --score-color: hsl(calc(var(--score) * 1.2), 68%, 39%);
  width: 8.25rem;
  min-width: 8.25rem;
  height: 8.25rem;
  min-height: 8.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  padding: .75rem;
  aspect-ratio: 1;
  border-width: 5px;
  background: #eaf3ff;
  border-color: #86a7cc;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent);
  overflow: hidden;
}

.score-card strong {
  font-size: clamp(2.35rem, 6vw, 3rem);
  line-height: .9;
  color: #154f96;
}

.score-card span {
  font-size: 1rem;
  line-height: 1;
  color: #003f8c;
}

.score-card small {
  max-width: 7rem;
  margin-top: .18rem;
  font-size: .68rem;
  line-height: 1.08;
  color: var(--muted);
  white-space: normal;
}

.score-card.large {
  width: 9.15rem;
  min-width: 9.15rem;
  height: 9.15rem;
  min-height: 9.15rem;
}

.score-card.large strong {
  font-size: clamp(2.75rem, 7vw, 3.55rem);
}

.donut-report-score {
  background:
    radial-gradient(circle, #eaf3ff 0 58%, transparent 60%),
    conic-gradient(var(--score-color) calc(var(--score) * 1%), color-mix(in srgb, var(--border) 78%, var(--surface)) 0);
  border-color: color-mix(in srgb, var(--score-color) 45%, var(--surface));
  color: var(--score-color);
}

.donut-report-score strong,
.donut-report-score span {
  color: var(--score-color);
}

.admin-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.admin-count {
  justify-self: start;
  padding: .55rem .8rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--surface);
  font-weight: 900;
}

.admin-table {
  min-width: 680px;
}

.validation-panel {
  margin: 1rem 0;
  padding: .9rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  box-shadow: none;
}

.validation-panel h2 {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .3rem;
  font-size: 1rem;
  line-height: 1.2;
}

.validation-panel h2 span {
  color: #36c275;
}

.validation-panel ul {
  display: grid;
  gap: .16rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.validation-panel li,
.validation-panel p {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: .12rem 0;
  color: var(--muted);
  line-height: 1.25;
}

.validation-panel strong {
  color: var(--text);
}

.validation-status {
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .18rem;
  color: #fff;
  font-size: .88rem;
  font-weight: 900;
  line-height: 1;
}

.validation-status.ok {
  background: #4fcf83;
}

.validation-status.ko {
  width: auto;
  height: auto;
  background: transparent;
  color: #ff4d7a;
  font-size: 1.45rem;
}

.desktop-results table {
  table-layout: fixed;
  min-width: 1320px;
}

.desktop-results th:first-child,
.desktop-results td:first-child {
  width: 8.5rem;
  text-align: center;
}

.desktop-results th:nth-child(3),
.desktop-results td:nth-child(3) {
  width: 12rem;
}

.desktop-results th:nth-child(4),
.desktop-results td:nth-child(4) {
  width: 21rem;
}

.desktop-results th:nth-child(5),
.desktop-results td:nth-child(5) {
  width: 5.6rem;
}

.desktop-results th:nth-child(6),
.desktop-results td:nth-child(6) {
  width: 18rem;
}

.desktop-results .badge,
.issue-top .badge,
.admin-table .badge {
  min-width: 6.7rem;
  min-height: 2rem;
  padding: .45rem .75rem;
  border-radius: .65rem;
  border-width: 1px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 65%, transparent);
}

.badge.critical {
  background: color-mix(in srgb, var(--critical) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--critical) 55%, var(--border));
}

.badge.major {
  background: color-mix(in srgb, var(--major) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--major) 55%, var(--border));
}

.badge.minor {
  background: color-mix(in srgb, var(--minor) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--minor) 45%, var(--border));
}

.badge.manual {
  background: color-mix(in srgb, var(--manual) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--manual) 55%, var(--border));
}

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 1.65rem;
  margin-top: .35rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .78rem;
  font-weight: 900;
}

.occurrence {
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.occurrence:first-of-type {
  border-top: 0;
  padding-top: .35rem;
}

.line-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.65rem;
  padding: .25rem .5rem;
  border-radius: .45rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: .8rem;
  font-weight: 850;
  text-decoration: none;
}

.line-chip {
  margin: 0 .35rem .45rem 0;
  color: var(--brand);
}

.occurrence code,
.issue-more-content code,
.mobile-results code {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  vertical-align: top;
}

.issue-more-content {
  max-width: min(46rem, calc(100vw - 4rem));
  overflow-x: auto;
}

.issue-more-content pre,
.mobile-results pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.muted-line {
  color: var(--muted);
}

.reference-items {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.reference-item {
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--border));
  border-radius: .5rem;
  background: color-mix(in srgb, var(--brand-soft) 68%, var(--surface));
  padding: .42rem .5rem;
  min-width: 0;
}

.reference-item summary {
  color: var(--brand);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
}

.reference-item strong {
  display: block;
  margin-top: .45rem;
  line-height: 1.25;
}

.reference-item p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}

.reference-example {
  padding-top: .45rem;
  border-top: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
}

.reference-example span {
  display: inline-flex;
  margin-right: .35rem;
  padding: .12rem .35rem;
  border-radius: .35rem;
  background: var(--surface);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

details summary {
  cursor: pointer;
  font-weight: 800;
}

.brand-mark::after {
  content: none;
}

.header-top {
  grid-template-columns: minmax(28rem, 1fr) auto;
}

.brand-copy {
  max-width: none;
}

.site-header h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(1.35rem, 2.45vw, 2.05rem);
}

.site-footer {
  display: grid;
  gap: .35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.site-footer sup {
  color: var(--brand);
  font-weight: 900;
}

.donut-score {
  --score: 0;
  --score-color: hsl(calc(var(--score) * 1.2), 68%, 39%);
  width: 4.1rem;
  height: 4.1rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  border: 0;
  background:
    radial-gradient(circle, var(--surface) 0 55%, transparent 57%),
    conic-gradient(var(--score-color) calc(var(--score) * 1%), color-mix(in srgb, var(--border) 75%, var(--surface)) 0);
  color: var(--score-color);
  font-size: 1rem;
  line-height: .95;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--score-color) 18%, transparent);
}

.donut-score small {
  display: block;
  font-size: .62rem;
  color: var(--muted);
}

.mini-kpi.critical {
  color: var(--critical);
  background: color-mix(in srgb, var(--critical) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--critical) 45%, var(--border));
}

.mini-kpi.major {
  color: var(--major);
  background: color-mix(in srgb, var(--major) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--major) 45%, var(--border));
}

.mini-kpi.minor {
  color: var(--minor);
  background: color-mix(in srgb, var(--minor) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--minor) 38%, var(--border));
}

.mini-kpi.manual {
  color: var(--manual);
  background: color-mix(in srgb, var(--manual) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--manual) 45%, var(--border));
}

.history-card .mini-kpis {
  align-items: center;
  gap: .55rem;
}

@media (min-width: 960px) {
  .admin-layout {
    grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 760px) {
  .header-top {
    grid-template-columns: 1fr;
  }
  .site-header h1 {
    white-space: normal;
  }
  .section-head {
    grid-template-columns: 1fr;
  }
  .score-card,
  .score-card.large {
    justify-self: start;
    width: 7.8rem;
    min-width: 7.8rem;
    height: 7.8rem;
    min-height: 7.8rem;
  }
  .score-card.large strong,
  .score-card strong {
    font-size: 2.55rem;
  }
}

@media (max-width: 420px) {
  .score-card,
  .score-card.large {
    width: 7.25rem;
    min-width: 7.25rem;
    height: 7.25rem;
    min-height: 7.25rem;
    padding: .62rem;
  }
  .score-card small {
    font-size: .62rem;
  }
}

/* --- V3.4 : production/GitHub, exports globaux, compte/admin aérés --- */
.brand-logo {
  width: 3.45rem;
  height: 3.45rem;
  flex: 0 0 auto;
  border-radius: .95rem;
  box-shadow: 0 14px 26px rgba(15, 110, 199, .2);
}

.brand-mark {
  grid-template-columns: 1fr;
  gap: 0;
  font-size: 1rem;
  text-align: center;
}

.brand-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .75rem;
  margin-bottom: .25rem;
}

.brand-line .eyebrow {
  margin: 0;
}

.env-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: .25rem .62rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.env-badge.production {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 42%, var(--border));
  color: var(--success);
}

.env-badge.demo {
  background: color-mix(in srgb, var(--major) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--major) 42%, var(--border));
  color: var(--major);
}

.environment-panel {
  display: flex;
  gap: .85rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
  padding: .9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.environment-panel strong {
  flex: 0 0 auto;
  color: var(--brand);
}

.environment-panel span {
  color: var(--muted);
}

.environment-panel code {
  padding: .1rem .3rem;
  border-radius: .35rem;
  background: var(--surface-2);
}

.spacious-panel {
  padding: clamp(1.35rem, 4vw, 2.3rem);
}

.account-dashboard {
  display: grid;
  gap: 1.15rem;
  margin-top: .5rem;
}

.account-identity {
  min-width: 0;
}

.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-top: .75rem;
}

.account-meta span {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}

.relaxed-kpis {
  margin: 0;
  gap: 1rem;
}

.relaxed-kpis .kpi {
  min-height: 8.4rem;
}

.account-action-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.account-action-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.account-action-card h2 {
  margin-top: 0;
}

.export-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 62%, var(--surface)), var(--surface));
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: .7rem;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: .58;
  cursor: not-allowed;
  pointer-events: none;
}

.compact-actions {
  margin: 0;
  justify-content: flex-end;
}

.admin-headline {
  gap: 1.25rem;
}

.admin-status-card {
  display: grid;
  gap: .35rem;
  min-width: 15rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}

.admin-status-card strong {
  font-size: 1.15rem;
}

.admin-status-card small {
  color: var(--muted);
}

.admin-kpis {
  margin-top: 1.2rem;
}

.roomy-admin {
  gap: 1.25rem;
}

.admin-side-stack {
  display: grid;
  gap: 1rem;
}

.maintenance-card,
.config-card,
.admin-form-panel {
  box-shadow: 0 14px 34px rgba(23, 32, 51, .06);
}

.config-list {
  display: grid;
  gap: .6rem;
  margin: 0;
}

.config-list div {
  display: grid;
  grid-template-columns: minmax(8rem, .8fr) minmax(0, 1fr);
  gap: .7rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}

.config-list div:last-child {
  border-bottom: 0;
}

.config-list dt {
  color: var(--muted);
  font-weight: 800;
}

.config-list dd {
  margin: 0;
  font-weight: 750;
}

.admin-users-wrap {
  border-radius: 1rem;
}

.admin-table td,
.admin-table th {
  vertical-align: middle;
}

@media (min-width: 880px) {
  .account-action-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr);
  }
  .export-card {
    grid-row: span 2;
  }
}

@media (min-width: 1040px) {
  .roomy-admin {
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .header-top {
    grid-template-columns: 1fr;
  }
  .main-nav {
    justify-content: flex-start;
  }
  .admin-status-card {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .environment-panel {
    display: grid;
  }
  .compact-actions {
    justify-content: stretch;
  }
  .compact-actions .btn {
    width: 100%;
  }
  .account-meta {
    display: grid;
  }
  .relaxed-kpis .kpi {
    min-height: auto;
  }
  .admin-kpis.kpi-grid,
  .relaxed-kpis.kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .responsive-table {
    min-width: 0;
  }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    margin-bottom: .85rem;
  }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, .75fr) minmax(0, 1fr);
    gap: .75rem;
    padding: .55rem 0;
    border: 0;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 900;
  }
}

@media (max-width: 520px) {
  .brand {
    align-items: center;
  }
  .brand-logo,
  .brand-mark {
    width: 2.9rem;
    height: 2.9rem;
  }
  .brand .eyebrow {
    font-size: 1.15rem;
  }
  .site-header h1 {
    font-size: 1.3rem;
  }
  .site-header p {
    font-size: .96rem;
  }
  .admin-kpis.kpi-grid,
  .relaxed-kpis.kpi-grid {
    grid-template-columns: 1fr;
  }
  .button-grid {
    grid-template-columns: 1fr;
  }
  .config-list div,
  .responsive-table td {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
}


/* --- V3.5 : administration de configuration + rapport sans barre horizontale --- */
.header-inner,
.container,
.site-footer {
  width: min(1280px, calc(100% - 2rem));
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.brand-mark.compact {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
}

.config-admin-link {
  margin: 1rem 0 0;
}

.config-admin-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.config-form-grid {
  display: grid;
  gap: 1rem;
}

.config-field-wide {
  grid-column: 1 / -1;
}

.config-toggle {
  position: relative;
  min-height: 58px;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-2);
}

.override-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.45rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 900;
}

.config-preview-card {
  justify-items: start;
}

.config-logo-preview {
  max-width: 7rem;
  max-height: 4rem;
  object-fit: contain;
}

.config-actions,
.reset-config-form {
  margin-top: 1rem;
}

.config-admin-side .note {
  margin-top: 1rem;
}

.report-table-wrap {
  overflow-x: visible;
}

.desktop-results table.report-issues-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.report-issues-table th,
.report-issues-table td {
  padding: .7rem;
  overflow-wrap: anywhere;
}

.report-issues-table .issue-severity-cell { width: 7.8rem; text-align: center; }
.report-issues-table .issue-rule-cell { width: 12rem; }
.report-issues-table .issue-reference-cell { width: 13rem; }
.report-issues-table .issue-page-cell { width: 5.8rem; text-align: center; }
.report-issues-table .issue-more-cell { width: 4.8rem; text-align: center; }
.report-issues-table .issue-message-cell { width: auto; }

.issue-rule-cell small {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
}

.issue-more {
  position: relative;
  display: inline-block;
}

.details-plus {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.details-plus::-webkit-details-marker,
.reference-item summary::-webkit-details-marker {
  display: none;
}

.issue-more[open] .details-plus span[aria-hidden="true"] {
  transform: rotate(45deg);
}

.issue-more-content {
  position: absolute;
  right: 0;
  z-index: 5;
  width: min(32rem, 70vw);
  margin-top: .6rem;
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.issue-more-content h3 {
  margin: .1rem 0 .4rem;
  font-size: 1rem;
}

.issue-more-content p {
  margin: .25rem 0 .8rem;
}

.issue-more-content pre {
  max-width: 100%;
}

.reference-item summary {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2rem;
  padding: .25rem .45rem;
  border-radius: .45rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.reference-item summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface);
  font-size: .78rem;
  line-height: 1;
}

.reference-item[open] summary::before {
  content: "–";
}

.reference-item:hover summary,
.reference-item summary:focus-visible {
  background: var(--brand);
  color: var(--surface);
  box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--brand) 18%, transparent);
}

@keyframes refBlinkHover {
  0% { filter: brightness(1); transform: translateY(0); }
  100% { filter: brightness(1.22); transform: translateY(-1px); }
}

@media (prefers-reduced-motion: no-preference) {
  .reference-item:hover summary {
    animation: refBlinkHover .42s ease-in-out infinite alternate;
  }
}

@media (min-width: 860px) {
  .config-admin-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
  }
  .config-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1021px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

@media (max-width: 760px) {
  .header-inner,
  .container,
  .site-footer {
    width: min(100% - 1rem, 1280px);
  }
  .config-admin-layout,
  .config-form-grid {
    grid-template-columns: 1fr;
  }
  .issue-more-content {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: 5rem;
    width: auto;
    max-height: calc(100vh - 7rem);
    overflow: auto;
  }
}

/* Correctif de priorité CSS : annule les anciennes largeurs du tableau rapport. */
.desktop-results table.report-issues-table {
  min-width: 0 !important;
}
.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) {
  width: 7.8rem !important;
}
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) {
  width: 12rem !important;
}
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) {
  width: 13rem !important;
}
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) {
  width: auto !important;
}
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) {
  width: 5.8rem !important;
}
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) {
  width: 4.8rem !important;
}
.header-inner { max-width: 1280px; }

/* --- V3.7 : rapport plus compact + largeur globale confortable --- */
.header-inner,
.container,
.site-footer {
  width: min(1400px, calc(100% - 1.5rem));
}

.report-issues-table col.col-severity { width: 7.2rem; }
.report-issues-table col.col-rule { width: 10.8rem; }
.report-issues-table col.col-reference { width: 9.4rem; }
.report-issues-table col.col-message { width: auto; }
.report-issues-table col.col-page { width: 5.2rem; }
.report-issues-table col.col-more { width: 4.2rem; }

.report-issues-table th span,
.report-issues-table th small {
  display: block;
  line-height: 1.12;
}

.report-issues-table th small {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: none;
  letter-spacing: 0;
}

.report-issues-table th,
.report-issues-table td {
  padding: .62rem .56rem;
  vertical-align: top;
}

.report-issues-table .issue-severity-cell { width: 7.2rem !important; }
.report-issues-table .issue-rule-cell { width: 10.8rem !important; }
.report-issues-table .issue-reference-cell { width: 9.4rem !important; }
.report-issues-table .issue-page-cell { width: 5.2rem !important; }
.report-issues-table .issue-more-cell { width: 4.2rem !important; }
.report-issues-table .issue-message-cell {
  width: auto !important;
  line-height: 1.38;
  font-size: .94rem;
}

.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) { width: 7.2rem !important; }
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) { width: 10.8rem !important; }
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) { width: 9.4rem !important; }
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) { width: auto !important; }
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) { width: 5.2rem !important; }
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) { width: 4.2rem !important; }

.issue-reference-cell .reference-items {
  gap: .28rem;
}

.issue-reference-cell .reference-item {
  padding: .32rem .36rem;
  border-radius: .45rem;
}

.issue-reference-cell .reference-item summary {
  width: 100%;
  min-height: 1.85rem;
  padding: .22rem .34rem;
  gap: .25rem;
  font-size: .76rem;
}

.issue-reference-cell .reference-item summary::before {
  width: 1rem;
  height: 1rem;
  font-size: .72rem;
  flex: 0 0 auto;
}

.issue-rule-cell strong,
.issue-rule-cell small,
.issue-message-cell {
  hyphens: auto;
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1121px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

@media (max-width: 760px) {
  .header-inner,
  .container,
  .site-footer {
    width: min(100% - 1rem, 1400px);
  }
}


/* --- V3.8 : tableau rapport avec recommandation visible + grille de suivi --- */
.header-inner,
.container,
.site-footer {
  width: min(1480px, calc(100% - 1.25rem));
}

.report-issues-table col.col-severity { width: 6.6rem; }
.report-issues-table col.col-rule { width: 9.4rem; }
.report-issues-table col.col-reference { width: 8.4rem; }
.report-issues-table col.col-message { width: 20%; }
.report-issues-table col.col-recommendation { width: auto; }
.report-issues-table col.col-page { width: 4.8rem; }
.report-issues-table col.col-more { width: 3.4rem; }

.report-issues-table th,
.report-issues-table td {
  padding: .56rem .48rem;
}

.report-issues-table .issue-severity-cell { width: 6.6rem !important; }
.report-issues-table .issue-rule-cell { width: 9.4rem !important; }
.report-issues-table .issue-reference-cell { width: 8.4rem !important; }
.report-issues-table .issue-message-cell {
  width: 20% !important;
  max-width: 19rem;
  line-height: 1.34;
}
.report-issues-table .issue-recommendation-cell {
  width: auto !important;
  line-height: 1.34;
  font-size: .94rem;
  color: var(--text);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.report-issues-table .issue-page-cell { width: 4.8rem !important; }
.report-issues-table .issue-more-cell { width: 3.4rem !important; }

.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) { width: 6.6rem !important; }
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) { width: 9.4rem !important; }
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) { width: 8.4rem !important; }
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) { width: 20% !important; }
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) { width: auto !important; }
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) { width: 4.8rem !important; }
.desktop-results table.report-issues-table th:nth-child(7),
.desktop-results table.report-issues-table td:nth-child(7) { width: 3.4rem !important; }

.no-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 900;
  min-height: 2.2rem;
}

.tracking-hero {
  background: linear-gradient(135deg, var(--surface), var(--brand-soft));
}

.tracking-table {
  min-width: 0;
  table-layout: fixed;
}

.tracking-table th:nth-child(1),
.tracking-table td:nth-child(1) { width: 28%; }
.tracking-table th:nth-child(2),
.tracking-table td:nth-child(2) { width: 9.5rem; }
.tracking-table th:nth-child(3),
.tracking-table td:nth-child(3) { width: 7rem; text-align: center; }
.tracking-table th:nth-child(4),
.tracking-table td:nth-child(4) { width: 14rem; }
.tracking-table th:nth-child(5),
.tracking-table td:nth-child(5) { width: 8rem; }
.tracking-table th:nth-child(6),
.tracking-table td:nth-child(6) { width: auto; }
.tracking-table th:nth-child(7),
.tracking-table td:nth-child(7) { width: 6rem; text-align: center; }

.tracking-table td small {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.score-pill,
.priority-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .28rem .55rem;
  font-weight: 900;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}

.priority-chip {
  background: rgba(15, 23, 42, .06);
  color: var(--text);
}

@media (max-width: 1180px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1181px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

@media (max-width: 760px) {
  .header-inner,
  .container,
  .site-footer {
    width: min(100% - 1rem, 1480px);
  }
  .tracking-table {
    min-width: 0;
  }
}

/* --- V3.9 : header/conteneur élargis + icône trousse de secours pour les détails --- */
.header-inner,
.container,
.site-footer {
  width: min(1600px, calc(100% - 1rem));
}

.header-inner {
  max-width: 1600px !important;
}

.report-table-wrap {
  max-width: none;
}

.desktop-results table.report-issues-table {
  width: 100%;
  table-layout: fixed;
}

.report-issues-table col.col-severity { width: 6.4rem; }
.report-issues-table col.col-rule { width: 9rem; }
.report-issues-table col.col-reference { width: 8rem; }
.report-issues-table col.col-message { width: 18%; }
.report-issues-table col.col-recommendation { width: auto; }
.report-issues-table col.col-page { width: 4.6rem; }
.report-issues-table col.col-more { width: 3.8rem; }

.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) { width: 6.4rem !important; }
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) { width: 9rem !important; }
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) { width: 8rem !important; }
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) { width: 18% !important; }
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) { width: auto !important; }
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) { width: 4.6rem !important; }
.desktop-results table.report-issues-table th:nth-child(7),
.desktop-results table.report-issues-table td:nth-child(7) { width: 3.8rem !important; }

.report-issues-table th,
.report-issues-table td {
  padding: .54rem .46rem;
}

.report-issues-table th .fa-briefcase-medical {
  font-size: 1.05rem;
  color: var(--brand);
}

.report-issues-table .issue-message-cell {
  max-width: 18rem;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.details-plus {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .8rem;
  background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--surface) 72%, transparent));
  color: var(--brand);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.details-plus .fa-briefcase-medical {
  font-size: 1rem;
}

.details-plus:hover,
.details-plus:focus-visible {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 0 0 .18rem color-mix(in srgb, var(--brand) 18%, transparent);
}

.issue-more[open] .details-plus {
  background: var(--brand);
  color: var(--surface);
}

.issue-more[open] .details-plus span[aria-hidden="true"] {
  transform: none;
}

.issue-more-content {
  width: min(42rem, 82vw);
}

.mobile-results summary .fa-briefcase-medical {
  margin-right: .35rem;
  color: var(--brand);
}

@media (max-width: 1260px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1261px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

@media (max-width: 760px) {
  .header-inner,
  .container,
  .site-footer {
    width: min(100% - 1rem, 1600px);
  }
}


/* --- V3.10 : rééquilibrage du tableau des anomalies --- */
.header-inner,
.container,
.site-footer {
  width: min(1720px, calc(100% - 1rem));
}

.header-inner {
  max-width: 1720px !important;
}

.report-card,
.report-table-wrap,
.desktop-results table.report-issues-table {
  max-width: none;
}

.desktop-results table.report-issues-table {
  table-layout: fixed;
  width: 100%;
}

.report-issues-table col.col-severity { width: 5.8rem; }
.report-issues-table col.col-rule { width: 11.8rem; }
.report-issues-table col.col-reference { width: 9.2rem; }
.report-issues-table col.col-message { width: 24%; }
.report-issues-table col.col-recommendation { width: auto; }
.report-issues-table col.col-page { width: 4.8rem; }
.report-issues-table col.col-more { width: 3.2rem; }

.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) { width: 5.8rem !important; }
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) { width: 11.8rem !important; }
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) { width: 9.2rem !important; }
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) { width: 24% !important; }
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) { width: auto !important; }
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) { width: 4.8rem !important; }
.desktop-results table.report-issues-table th:nth-child(7),
.desktop-results table.report-issues-table td:nth-child(7) { width: 3.2rem !important; }

.report-issues-table th,
.report-issues-table td {
  padding: .58rem .52rem;
  vertical-align: top;
}

.report-issues-table thead th span,
.report-issues-table thead th small {
  display: block;
  line-height: 1.12;
}

.report-issues-table thead th small {
  margin-top: .2rem;
  font-size: .72rem;
}

.report-issues-table .issue-severity-cell {
  padding-left: .35rem;
  padding-right: .35rem;
}

.report-issues-table .issue-rule-cell strong {
  display: block;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.report-issues-table .issue-rule-cell small {
  line-height: 1.25;
}

.report-issues-table .issue-reference-cell {
  padding-left: .38rem;
  padding-right: .38rem;
}

.reference-items {
  display: grid;
  gap: .38rem;
  align-items: start;
}

.reference-item summary {
  width: 100%;
  min-height: 1.85rem;
  padding: .22rem .4rem;
  justify-content: flex-start;
  font-size: .78rem;
  line-height: 1.12;
  white-space: nowrap;
}

.reference-item summary::before {
  flex: 0 0 1.05rem;
  width: 1.05rem;
  height: 1.05rem;
  font-size: .72rem;
}

.report-issues-table .issue-message-cell,
.report-issues-table .issue-recommendation-cell {
  max-width: none;
  line-height: 1.34;
  hyphens: auto;
  overflow-wrap: break-word;
}

.report-issues-table .issue-page-cell,
.report-issues-table .issue-more-cell {
  padding-left: .25rem;
  padding-right: .25rem;
  white-space: nowrap;
}

.details-plus {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: .72rem;
}

.details-plus .fa-briefcase-medical {
  font-size: .92rem;
}

@media (max-width: 1380px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1381px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

/* --- V3.11 : tableau rapport plus confortable et lisible --- */
.header-inner,
.container,
.site-footer {
  width: min(1780px, calc(100% - 1.5rem));
}

.header-inner {
  max-width: 1780px !important;
}

.report-table-wrap {
  padding-inline: .55rem;
}

.desktop-results table.report-issues-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.report-issues-table col.col-severity { width: 7.5rem; }
.report-issues-table col.col-rule { width: 13.5rem; }
.report-issues-table col.col-reference { width: 10.6rem; }
.report-issues-table col.col-message { width: 25%; }
.report-issues-table col.col-recommendation { width: auto; }
.report-issues-table col.col-page { width: 5.4rem; }
.report-issues-table col.col-more { width: 3.9rem; }

.desktop-results table.report-issues-table th:nth-child(1),
.desktop-results table.report-issues-table td:nth-child(1) { width: 7.5rem !important; }
.desktop-results table.report-issues-table th:nth-child(2),
.desktop-results table.report-issues-table td:nth-child(2) { width: 13.5rem !important; }
.desktop-results table.report-issues-table th:nth-child(3),
.desktop-results table.report-issues-table td:nth-child(3) { width: 10.6rem !important; }
.desktop-results table.report-issues-table th:nth-child(4),
.desktop-results table.report-issues-table td:nth-child(4) { width: 25% !important; }
.desktop-results table.report-issues-table th:nth-child(5),
.desktop-results table.report-issues-table td:nth-child(5) { width: auto !important; }
.desktop-results table.report-issues-table th:nth-child(6),
.desktop-results table.report-issues-table td:nth-child(6) { width: 5.4rem !important; }
.desktop-results table.report-issues-table th:nth-child(7),
.desktop-results table.report-issues-table td:nth-child(7) { width: 3.9rem !important; }

.report-issues-table th,
.report-issues-table td {
  padding: .82rem .78rem;
  vertical-align: top;
}

.report-issues-table thead th {
  padding-top: .9rem;
  padding-bottom: .72rem;
}

.report-issues-table tbody tr + tr td {
  border-top: 1px solid var(--border);
}

.report-issues-table .issue-severity-cell {
  padding-left: .5rem;
  padding-right: .5rem;
  text-align: center;
}

.report-issues-table .issue-severity-cell .badge {
  min-width: 6.35rem;
  max-width: 100%;
  justify-content: center;
  white-space: nowrap;
}

.report-issues-table .issue-severity-cell .count-chip {
  margin-top: .55rem;
}

.report-issues-table .issue-rule-cell {
  padding-left: .65rem;
}

.report-issues-table .issue-rule-cell strong {
  display: block;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.report-issues-table .issue-rule-cell small {
  line-height: 1.32;
  overflow-wrap: normal;
}

.report-issues-table .issue-reference-cell {
  padding-left: .55rem;
  padding-right: .55rem;
}

.report-issues-table .reference-items {
  gap: .48rem;
}

.report-issues-table .reference-item summary {
  min-height: 2.12rem;
  padding: .34rem .52rem;
  font-size: .8rem;
  line-height: 1.15;
}

.report-issues-table .issue-message-cell,
.report-issues-table .issue-recommendation-cell {
  line-height: 1.48;
  overflow-wrap: break-word;
  hyphens: auto;
}

.report-issues-table .issue-page-cell,
.report-issues-table .issue-more-cell {
  padding-left: .45rem;
  padding-right: .45rem;
  text-align: center;
  white-space: nowrap;
}

.details-plus {
  width: 2.35rem;
  height: 2.35rem;
}

@media (max-width: 1500px) {
  .desktop-results { display: none; }
  .mobile-results { display: grid; }
}

@media (min-width: 1501px) {
  .desktop-results { display: block; }
  .mobile-results { display: none; }
}

@media (max-width: 760px) {
  .header-inner,
  .container,
  .site-footer {
    width: min(100% - 1rem, 1780px);
  }
}

/* V3.12 - Analyse PDF / DOCX */
.document-audit-grid .upload-field input[type="file"] {
  padding: .9rem;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong, var(--border));
  border-radius: 1rem;
}

.file-type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .22rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mini-panel {
  padding: 1.1rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 1rem;
}

.mini-panel h3 {
  margin-top: 0;
  margin-bottom: .35rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* V3.13 - Identification claire URL / PDF / DOCX dans les listes */
.pill i,
.section-head h2 i,
.audit-panel h2 i,
.info-panel h2 i {
  margin-right: .4rem;
  color: var(--brand);
}

.report-card-enhanced {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
}

.report-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
}

.report-card-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .85rem;
  display: inline-grid;
  place-items: center;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 .4rem 1.1rem rgba(0, 0, 0, .06);
  flex: 0 0 auto;
}

.report-card-icon.small {
  width: 2rem;
  height: 2rem;
  border-radius: .7rem;
  font-size: .9rem;
}

.report-card-content,
.report-main {
  min-width: 0;
}

.report-source-line {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  line-height: 1.35;
}

.report-source-line a,
.report-source-line span:not(.file-type-chip) {
  overflow-wrap: anywhere;
}

.report-meta-line {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.file-type-chip i {
  font-size: .86em;
}

.file-type-chip.type-url {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--border));
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}

.file-type-chip.type-pdf {
  color: var(--major);
  border-color: color-mix(in srgb, var(--major) 42%, var(--border));
  background: color-mix(in srgb, var(--major) 10%, var(--surface));
}

.file-type-chip.type-docx,
.file-type-chip.type-doc {
  color: var(--manual);
  border-color: color-mix(in srgb, var(--manual) 42%, var(--border));
  background: color-mix(in srgb, var(--manual) 10%, var(--surface));
}

.recent-report-card {
  padding: 1.05rem 1.15rem;
}

.recent-report-actions {
  justify-content: flex-end;
}

.tracking-project-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  min-width: 0;
}

.tracking-project-cell strong,
.tracking-project-cell small {
  display: block;
}

.tracking-project-cell .report-source-line {
  margin-top: .28rem;
}

@media (max-width: 760px) {
  .report-card-enhanced,
  .recent-report-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recent-report-actions,
  .report-actions {
    justify-content: flex-start;
  }

  .report-title-row,
  .tracking-project-cell {
    grid-template-columns: 1fr;
  }

  .report-card-icon {
    width: 2.1rem;
    height: 2.1rem;
  }
}

/* V3.17 - Empêche les extraits HTML longs de sortir du panneau occurrences */
.issue-more {
  position: relative;
}

.issue-more-content {
  box-sizing: border-box;
  width: min(42rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  overflow: hidden;
}

.issue-more-content .occurrence {
  display: grid;
  gap: .45rem;
  min-width: 0;
  max-width: 100%;
}

.issue-more-content code,
.issue-more-content pre {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.issue-more-content code {
  padding: .35rem .5rem;
  line-height: 1.35;
}
