/* GÉNÉRÉ par scripts/marketing/build-detecteur-app.mjs — ne pas retoucher ici.
   Sources : public/v2/redesign.css, public/v2/kit-5a.css, public/v2/spans.css, resources/marketing/detecteur-app/shell.css */
:host{all:initial}
/* ---- public/v2/redesign.css ---- */
:host {
  color-scheme: light;
  --bg: #f7f7f4;
  --panel: #ffffff;
  --panel-muted: #fafaf8;
  --sidebar: #fbfbf8;
  --text: #1f2328;
  --muted: #6f7379;
  --subtle: #8c9097;
  --border: #e2e1dc;
  --border-strong: #c9c7bf;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #eff5ff;
  --danger: #dc2626;
  --danger-soft: #fff1f1;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --success: #15803d;
  --success-soft: #effaf2;
  --shadow: 0 18px 50px rgba(27, 31, 35, 0.08);
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --surface: var(--panel);
  --soft: var(--panel-muted);
  --accent: var(--primary);
  --heading: var(--text);
  /* Infobulles : sombres en thème clair (convention), avec leur propre jeu de
     tokens pour rester lisibles quel que soit le fond de la page. */
  --tip-bg: #232936;
  --tip-text: #f4f4f5;
  --tip-muted: #a8adb8;
  --tip-border: transparent;
}

:host(.dark),
:host(.dark) {
  color-scheme: dark;
  --bg: #111214;
  --panel: #181a1d;
  --panel-muted: #15171a;
  --sidebar: #141619;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --subtle: #85858d;
  --border: #282b30;
  --border-strong: #3a3f46;
  --primary: #60a5fa;
  --primary-ink: #0b1220;
  --primary-soft: #142033;
  --danger: #f87171;
  --danger-soft: #2b1718;
  --warning: #fbbf24;
  --warning-soft: #2b2215;
  --success: #4ade80;
  --success-soft: #13251a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --surface: var(--panel);
  --soft: var(--panel-muted);
  --accent: var(--primary);
  --heading: var(--text);
  /* En thème sombre la bulle se détacherait mal du fond : on l'éclaircit
     légèrement et on lui ajoute une bordure. */
  --tip-bg: #262a31;
  --tip-text: #f4f4f5;
  --tip-muted: #a1a1aa;
  --tip-border: var(--border-strong);
}

/* L'attribut `hidden` doit toujours masquer. Sans cette règle, la moindre
   déclaration `display:` d'auteur (ex. `.dropzone { display: grid }`) bat le
   `[hidden] { display: none }` de la feuille du navigateur, et l'élément reste
   visible alors que le JS le croit masqué : c'est ce qui affichait la barre
   « Envoi en cours… » en même temps que la dropzone dès l'arrivée sur la page.
   Règle de normalisation standard, à garder avant tout le reste. */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

:host,
:host {
  min-height: 100%;
}

:host {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100dvh;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 14px;
}

.sidebar-top,
.topbar,
.topbar-left,
.topbar-actions,
.button-row,
.modal-head,
.section-head,
.field-grid,
.form-footer,
.credits-row,
.history-item,
.user-card,
.entry-card,
.queued-row,
.bulk-head,
.pane-head,
.validation-row,
.public-header,
.switch-line,
.input-with-button {
  display: flex;
  align-items: center;
}

.sidebar-top {
  gap: 8px;
  /* un peu d'air entre le logo et le bouton « Lancer une analyse »
     (s'ajoute au gap:16px de .sidebar → ~24px au total) */
  margin-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.brand:hover {
  text-decoration: none;
}

.brand strong,
.brand small,
.history-item strong,
.history-item small,
.user-card strong,
.user-card small,
.entry-card strong,
.entry-card small,
.queued-row strong,
.queued-row small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 14px;
}

.brand small,
.history-item small,
.user-card small,
.entry-card small,
.queued-row small {
  color: var(--muted);
  font-size: 12px;
}

.primary-action,
.nav-link,
.history-item,
.user-card {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--text);
  color: var(--panel);
  font-weight: 650;
}

:host(.dark) .primary-action {
  background: #f4f4f5;
  color: #111214;
}

.main-nav,
.sidebar-utility-nav {
  display: grid;
  gap: 2px;
}

.sidebar-utility-nav {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--muted);
}

.nav-link:hover,
.nav-link.is-active,
.history-item:hover,
.history-item.is-active,
.user-card:hover,
.credit-manage-button:hover {
  background: var(--panel);
  color: var(--text);
}

.nav-badge {
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
  padding: 1px 6px;
}

.sidebar-section {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.history-list {
  display: grid;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-thumb {
  border: 2px solid var(--sidebar);
  border-radius: 999px;
  background: var(--border-strong);
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  padding: 10px 10px 6px;
  text-transform: uppercase;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 0;
  text-transform: none;
  white-space: nowrap;
}

.history-item {
  gap: 8px;
  min-height: 44px;
  padding: 7px 10px;
}

.history-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.history-dot.danger {
  background: var(--danger);
}

.history-dot.success {
  background: var(--success);
}

.history-dot.warning {
  background: var(--warning);
}

.history-dot.neutral {
  background: var(--subtle);
}

.sidebar-footer {
  display: grid;
  /* minmax(0, …) : sans ça, un email long et insécable (ex. compte de test)
     gonfle la colonne au-delà de la largeur de la sidebar, et le bloc crédits
     déborde puis se fait rogner par overflow:hidden de la sidebar. */
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 0;
}

.credits-widget {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
  text-align: left;
}

.credits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.credit-manage-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-muted);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 4px 8px;
}

.credit-manage-button svg {
  width: 14px;
  height: 14px;
}

.credits-row {
  justify-content: space-between;
  color: var(--muted);
}

.credits-row strong {
  color: var(--text);
}

.credit-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}

.credit-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.credits-meta {
  color: var(--subtle);
  font-size: 12px;
}

.user-card {
  gap: 9px;
  padding: 8px 10px;
}

.user-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

/* Nom + email : tronqués proprement plutôt que d'élargir la sidebar. */
.user-card > span:nth-child(2) strong,
.user-card > span:nth-child(2) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding-bottom: 56px;
}

:host(.auth-mode) .app-shell {
  display: block;
}

:host(.auth-mode) .sidebar,
:host(.auth-mode) .topbar,
:host(.auth-mode) .announcement,
:host(.auth-mode) .support-fab {
  display: none;
}

:host(.auth-mode) .main {
  min-height: 100dvh;
  padding-bottom: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  justify-content: space-between;
  height: 58px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  padding: 0 28px;
  backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-actions {
  gap: 10px;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 13px;
}

.announcement {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 28px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  padding: 10px 12px;
}

.announcement span {
  min-width: 0;
  flex: 1;
}

.screen {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.screen.is-active {
  display: block;
}

.screen.auth-screen {
  position: relative;
  max-width: none;
  min-height: 100dvh;
  padding: 96px 32px 32px;
}

.screen.auth-screen.is-active {
  display: grid;
  align-items: center;
  justify-items: center;
}

/* Pages larges et hautes (onboarding, forfaits) : ancrées en haut, pas
   centrées verticalement, sinon le haut du contenu déborde du viewport. */
.screen.auth-screen.is-active[data-page="choose-plan"],
.screen.auth-screen.is-active[data-page="onboarding-profile"] {
  align-items: start;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(280px, 420px);
  gap: 44px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.auth-shell.single {
  grid-template-columns: minmax(320px, 460px);
}

.auth-card,
.custom-plan-callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

[data-page="login"] .auth-card,
[data-page="signup"] .auth-card {
  gap: 20px;
  padding: 28px;
}

[data-page="login"] .auth-head,
[data-page="signup"] .auth-head {
  margin-bottom: 2px;
}

[data-page="login"] .auth-divider,
[data-page="signup"] .auth-divider {
  margin: 2px 0;
}

[data-page="login"] .field,
[data-page="signup"] .field {
  gap: 8px;
}

[data-page="signup"] .field-grid.two {
  gap: 14px;
}

.auth-brand,
.auth-page-brand {
  width: fit-content;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
}

.auth-page-brand {
  position: absolute;
  top: 32px;
  left: 32px;
}

.auth-head h1,
.auth-head p,
.custom-plan-callout h2,
.custom-plan-callout p,
.plan-billing {
  margin: 0;
}

.auth-head h1 {
  font-size: 30px;
  line-height: 1.1;
}

.auth-head p,
.auth-switch,
.plan-billing {
  color: var(--muted);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.auth-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  line-height: 1.2;
}

.auth-options input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.auth-switch {
  text-align: center;
}

.mail-provider-button {
  width: 100%;
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 50px;
  border: 1px solid #d7d9de;
  border-radius: 12px;
  background: #fff;
  color: #6f7175;
  cursor: pointer;
  font-family: "Roboto", "Inter", Arial, sans-serif;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: 0;
  line-height: 20px;
  padding: 0 18px;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.google-button:hover {
  border-color: #c5c8cf;
  background: #fafafa;
}

.google-button:active {
  background: #f5f5f5;
}

.google-button:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}

.google-logo {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--subtle);
  font-size: 12px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  background: var(--panel);
  padding: 0 10px;
}

.status-card {
  justify-items: start;
  text-align: left;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.status-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.plan-shell {
  display: grid;
  gap: 24px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.plan-topbar,
.custom-plan-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.plan-topbar {
  padding: 4px 0;
}

.billing-tabs {
  margin-bottom: 0;
}

.billing-only.is-hidden {
  display: none;
}

.custom-plan-callout {
  padding: 16px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head.compact {
  margin-bottom: 18px;
}

.page-head.end {
  justify-content: flex-end;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-head.compact h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.page-head .lead {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.button,
.icon-button,
.segment,
.filter-chip,
.pill,
.dashed-button,
.tab {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-weight: 650;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.button.secondary:hover,
.icon-button:hover,
.segment:hover,
.filter-chip:hover,
.pill:hover,
.tab:hover,
.dashed-button:hover {
  border-color: var(--border-strong);
  background: var(--panel-muted);
}

.button.danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background: var(--danger-soft);
  color: var(--danger);
}

.cancellation-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.cancellation-link:hover {
  color: var(--text);
}

/* Résiliation déjà programmée : une phrase à la place du lien d'annulation. */
.cancellation-scheduled {
  align-self: center;
  color: var(--text-muted);
  font-size: 13px;
}

.cancellation-flow h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.cancellation-flow .field {
  display: block;
  margin-top: 14px;
}

.cancellation-flow .field > span {
  display: block;
  margin-bottom: 7px;
  font-weight: 650;
}

.cancellation-reasons {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.cancellation-reasons legend {
  margin-bottom: 8px;
  font-weight: 650;
}

.cancellation-reasons label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.cancellation-reasons input {
  width: auto;
  margin-top: 3px;
}

.cancellation-flow textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
}

.cancellation-step {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

/* Remise « trop cher » : trois choix, dont le refus, toujours visibles. */
.cancellation-offer .modal-actions {
  flex-wrap: wrap;
}

.cancellation-offer strong {
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  padding: 0;
}

.icon-button.small {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.danger-icon {
  color: var(--danger);
}

.button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.entry-grid,
.pricing-grid,
.packs-grid,
.help-grid,
.diff-grid,
.field-grid.two,
.account-grid,
.result-layout {
  display: grid;
  gap: 14px;
}

.entry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
}

.entry-card {
  gap: 12px;
  min-height: 86px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 16px;
  text-decoration: none;
}

.entry-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.entry-card > svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.entry-card > [data-lucide] svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.entry-card span {
  min-width: 0;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.section-head.tight {
  margin: 0 0 12px;
}

.section-head h2,
.mini-panel h2,
.score-panel h2,
.form-panel h2,
.endpoint-card h2,
.diff-pane h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.table-card,
.form-panel,
.mini-panel,
.score-panel,
.diff-pane,
.endpoint-card,
.api-key-panel,
.price-card,
.pack-card,
.custom-pack,
.public-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-muted);
  color: var(--subtle);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:hover td {
  background: var(--panel-muted);
}

.align-right {
  text-align: right;
}

.table-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
  text-align: left;
}

.chip,
.score-chip,
.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  padding: 2px 9px;
  white-space: nowrap;
}

.chip.neutral,
.chip.muted {
  background: var(--panel-muted);
  color: var(--muted);
}

.chip.success,
.notice.success {
  background: var(--success-soft);
  color: var(--success);
}

.chip.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.chip.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.score-chip {
  min-width: 32px;
}

.score-chip.success {
  background: var(--success);
  color: #fff;
}

.score-chip.warning {
  background: var(--warning);
  color: #fff;
}

.score-chip.danger {
  background: var(--danger);
  color: #fff;
}

.filter-row,
.segments,
.pill-row,
.inline-checks,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.compact-filter {
  display: grid;
  gap: 6px;
  min-width: min(280px, 100%);
}

.compact-filter span {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.filter-chip,
.segment,
.pill,
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: var(--muted);
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.history-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
}

.history-summary span {
  color: var(--muted);
}

.history-summary strong {
  font-size: 18px;
}

.history-row.is-filtered-out {
  display: none;
}

.empty-filter-state {
  display: none;
  place-items: center;
  gap: 6px;
  margin-top: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-muted);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.empty-filter-state.is-visible {
  display: grid;
}

.empty-filter-state svg {
  width: 28px;
  height: 28px;
  color: var(--subtle);
}

.empty-filter-state strong {
  color: var(--text);
}

.filter-chip.is-active,
.segment.is-active,
.pill.is-active,
.tab.is-active {
  border-color: var(--text);
  background: var(--text);
  color: var(--panel);
}

:host(.dark) .filter-chip.is-active,
:host(.dark) .segment.is-active,
:host(.dark) .pill.is-active,
:host(.dark) .tab.is-active {
  background: #f4f4f5;
  color: #111214;
}

.filter-chip span {
  color: inherit;
  opacity: 0.7;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.single-column {
  max-width: 960px;
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.field-grid.two,
.account-grid,
.result-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.custom-pack > span {
  color: var(--text);
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 10px;
}

input::placeholder,
textarea::placeholder {
  font-weight: 400;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-color: var(--primary);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toggle-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
  padding: 12px;
  cursor: pointer;
}

.toggle-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: var(--primary-soft);
}

.toggle-card span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--primary);
}

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

.source-panel,
.tab-panel {
  display: none;
}

.source-panel.is-active,
.tab-panel.is-active {
  display: block;
}

.input-with-button {
  gap: 8px;
}

.input-with-button input {
  min-width: 0;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-muted);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.dropzone.large {
  min-height: 240px;
}

.dropzone svg {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.dropzone strong {
  color: var(--text);
  font-size: 16px;
}

.form-footer {
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.cost-callout {
  display: grid;
  gap: 2px;
}

.analysis-footer {
  flex-wrap: wrap;
}

.analysis-footer > .cost-callout {
  flex: 1 1 280px;
}

.analysis-footer > .button-row {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.cost-callout span,
.form-footer > span {
  color: var(--muted);
  font-size: 13px;
}

.context-panel,
.side-stack {
  display: grid;
  gap: 12px;
}

.context-panel {
  position: sticky;
  top: 82px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px;
}

.context-panel h2 {
  margin: 0;
  font-size: 15px;
}

.context-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.context-list div {
  display: flex;
  gap: 9px;
  color: var(--muted);
}

.queued-list,
.bulk-list,
.match-list,
.scan-history,
.endpoint-list,
.video-list,
.tour-steps {
  display: grid;
  gap: 10px;
}

.queued-row {
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.queued-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.notice,
.success-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
  color: var(--muted);
  padding: 12px;
}

.notice .button {
  margin-left: auto;
}

.bulk-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
  padding: 12px;
}

.bulk-head {
  justify-content: space-between;
}

.bulk-item small {
  color: var(--muted);
}

.dashed-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border-style: dashed;
  color: var(--muted);
}

.inline-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.inline-checks input {
  width: auto;
}

.result-layout {
  margin-bottom: 14px;
}

.score-panel,
.plagiarism-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
}

.score-panel {
  text-align: center;
}

.gauge {
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
  margin: 0 auto 6px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--panel) 0 56%, transparent 57%),
    conic-gradient(var(--score-color) var(--score), var(--border) 0);
}

.gauge span {
  color: var(--text);
  font-size: 42px;
  font-weight: 820;
  line-height: 1;
}

.source-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.mini-panel {
  padding: 14px;
}

.mini-panel p {
  margin: 8px 0;
  color: var(--muted);
}

.match-list div,
.scan-history > div {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.scan-history-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.scan-history-row .scan-score {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.scan-history-row .scan-credits {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.match-list small,
.scan-history span {
  color: var(--muted);
  font-size: 12px;
}

.plagiarism-state {
  display: grid;
  gap: 10px;
}

.plagiarism-state.is-hidden {
  display: none;
}

.plagiarism-empty {
  align-content: center;
  min-height: 150px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-muted);
  padding: 14px;
}

.plagiarism-empty p {
  color: var(--text);
  font-weight: 750;
}

.source-editor {
  margin-top: 14px;
}

.source-editor .form-panel {
  margin-top: 14px;
  border: 0;
  padding: 0;
}

.scan-history-panel {
  margin-top: 14px;
}

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pipeline-strip span {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-muted);
  color: var(--muted);
  padding: 8px 10px;
  text-align: center;
}

.pipeline-strip.done span,
.success-banner {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  background: var(--success-soft);
  color: var(--success);
}

.source-verdict,
.validation-row {
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.diff-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.diff-pane {
  padding: 16px;
}

.diff-pane p {
  color: var(--muted);
}

del {
  border-radius: 3px;
  background: var(--danger-soft);
  color: var(--danger);
  text-decoration: none;
}

ins {
  border-radius: 3px;
  background: var(--success-soft);
  color: var(--success);
  text-decoration: none;
}

.validation-row {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 12px;
}

.balance-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.balance-band > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.balance-band span,
.balance-band small {
  color: var(--muted);
}

.balance-band strong {
  font-size: 28px;
}

/* ============================================================
   Forfaits (choose-plan + account/credit) — style repris des
   maquettes landing (toggle annuel/mensuel + cartes épurées)
   ============================================================ */
.pricing-block {
  display: grid;
  gap: 16px;
}

.prepaid-block {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.pricing-head {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.pricing-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.pricing-head p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
}

.billing-toggle-area {
  display: grid;
  justify-items: center;
}

.billing-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.billing-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.billing-toggle button.is-active {
  background: var(--primary);
  color: #fff;
}

.billing-save {
  font-size: 11px;
  font-weight: 700;
}

.billing-toggle button:not(.is-active) .billing-save {
  color: var(--primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 980px);
  margin-inline: auto;
}

.pricing-grid[data-active-billing="annual"] [data-billing="monthly"],
.pricing-grid[data-active-billing="monthly"] [data-billing="annual"] {
  display: none;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px 22px;
  border-radius: 16px;
}

.price-card.is-popular {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Pill « Le plus populaire » à cheval sur le bord haut de la carte (hors flux
   → n'affecte plus l'alignement du contenu entre cartes). */
.price-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
}

.price-card-head {
  display: grid;
  gap: 6px;
}

.price-card-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
}

.price-credits {
  margin: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * Infobulle « À quoi correspond un crédit ? » (cartes d'abonnement)   *
 * Sans JS : :hover (souris) + :focus-within (clavier et tactile).     *
 * ------------------------------------------------------------------ */
.credit-info {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
}

.credit-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: help;
}

.credit-info-panel {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%);
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid var(--tip-border, transparent);
  border-radius: 10px;
  background: var(--tip-bg);
  color: var(--tip-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  text-align: left;
  white-space: normal;
}

.credit-info:hover .credit-info-panel,
.credit-info:focus-within .credit-info-panel {
  opacity: 1;
  visibility: visible;
}

/* Flèche pointant vers le déclencheur. */
.credit-info-panel::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-left: 1px solid var(--tip-border, transparent);
  border-bottom: 1px solid var(--tip-border, transparent);
  background: var(--tip-bg);
}

.credit-info-title {
  color: var(--tip-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.credit-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font-size: 13.5px;
  font-weight: 400;
}

.credit-info-row strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.credit-info-foot {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--tip-text) 16%, transparent);
  color: var(--tip-muted);
  font-size: 12px;
  font-weight: 400;
}

/* Sous 1180px les cartes se resserrent : la bulle passe SOUS le déclencheur
   pour ne pas sortir de l'écran. */
@media (max-width: 1180px) {
  .credit-info-panel {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    max-width: min(320px, 78vw);
  }
  .credit-info-panel::before {
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid var(--tip-border, transparent);
    border-bottom: 0;
    border-top: 1px solid var(--tip-border, transparent);
  }
}

.price-block {
  display: grid;
  gap: 4px;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-billed {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.price-value {
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.price-period {
  color: var(--muted);
  font-size: 14px;
}

.price-features {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
}

.price-features li::before {
  content: "✓";
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

/* Fonctionnalité non incluse dans ce forfait : grisée + barrée. */
.price-features li.is-unavailable {
  color: var(--subtle);
  text-decoration: line-through;
}

.price-features li.is-unavailable::before {
  content: "–";
  color: var(--subtle);
  text-decoration: none;
}

.price-card form {
  display: grid;
  margin: 0;
  margin-top: auto;
}

.price-cta {
  width: 100%;
}

/* Sur la carte blanche, les CTA non-populaires doivent rester lisibles comme
   des boutons (contour marqué) plutôt que du texte flottant. */
.price-cta.secondary,
.pack-card .button.secondary {
  background: var(--surface);
  border-color: var(--border-strong);
}

.price-cta.secondary:hover,
.pack-card .button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pack-card,
.custom-pack {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
}

.pack-card strong,
.pack-card span {
  margin: 0;
}

.packs-grid {
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  width: min(100%, 980px);
  margin-inline: auto;
}

/* Bloc « Montant personnalisé » : champ + unité + aide + CTA empilés proprement. */
.custom-pack form {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.custom-pack-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-pack-input input {
  width: 80px;
  max-width: 80px;
  text-align: right;
}

.custom-pack-input span {
  color: var(--muted);
  font-weight: 600;
}

.custom-pack small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.custom-pack .button {
  width: auto;
}

.account-grid {
  align-items: start;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 680px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 9px 12px;
}

.search-field input {
  border: 0;
  padding: 0;
}

.help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.video-list button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.video-list span {
  color: var(--muted);
  font-size: 12px;
}

.api-key-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px;
}

.api-key-panel span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

code,
pre {
  font-family: var(--mono);
}

code {
  border-radius: 4px;
  background: var(--panel-muted);
  padding: 2px 5px;
}

.endpoint-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.endpoint-card p {
  margin: 0;
  color: var(--muted);
}

pre {
  overflow: auto;
  margin: 0;
  border-radius: 6px;
  background: #101114;
  color: #f4f4f5;
  padding: 14px;
}

.method {
  width: fit-content;
  background: var(--success-soft);
  color: var(--success);
}

.public-report {
  max-width: 980px;
}

.public-header {
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
}

.public-card {
  padding: 22px;
}

.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--text);
  color: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
}

:host(.public-mode) .sidebar,
:host(.public-mode) .topbar,
:host(.public-mode) .announcement,
:host(.public-mode) .support-fab {
  display: none;
}

:host(.public-mode) .app-shell {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  background: rgba(12, 13, 15, 0.48);
}

.modal-backdrop.is-open {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(100%, 560px);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.switch-line {
  gap: 8px;
  margin-bottom: 12px;
}

.switch-line input {
  width: auto;
}

/* Interrupteur (role="switch") : réglage enregistré au clic, sans bouton de
   validation. Volontairement distinct de .choice-row (case à cocher), qui
   suppose un formulaire à soumettre. */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.switch {
  flex: 0 0 auto;
  width: 40px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch:disabled {
  opacity: 0.6;
  cursor: progress;
}

.switch:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.switch[aria-checked="true"] {
  background: var(--primary);
  border-color: var(--primary);
}

.switch-thumb {
  display: block;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(27, 31, 35, 0.25);
  transition: transform 0.15s ease;
}

.switch[aria-checked="true"] .switch-thumb {
  transform: translateX(16px);
}

.switch-text {
  display: grid;
  gap: 2px;
}

.switch-text small {
  color: var(--muted);
}

.tour-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.tour-steps strong {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.mobile-only {
  display: none;
}

.sidebar-scrim {
  display: none;
}

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

  .context-panel {
    position: static;
  }

  .packs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .mobile-only {
    display: inline-grid;
  }

  .sidebar {
    position: fixed;
    z-index: 80;
    transform: translateX(-100%);
    width: min(292px, calc(100vw - 44px));
    transition: transform 160ms ease;
    box-shadow: var(--shadow);
  }

  :host(.sidebar-open) .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 75;
    background: rgba(12, 13, 15, 0.42);
  }

  :host(.sidebar-open) .sidebar-scrim {
    display: block;
  }

  .topbar {
    padding: 0 16px;
  }

  .announcement,
  .screen {
    margin-left: 16px;
    margin-right: 16px;
    padding-left: 0;
    padding-right: 0;
  }

  .page-head,
  .api-key-panel {
    display: grid;
  }

  .entry-grid,
  .field-grid.two,
  .toggle-grid,
  .result-layout,
  .diff-grid,
  .auth-shell,
  .balance-band,
  .account-grid,
  .help-grid,
  .history-summary {
    grid-template-columns: 1fr;
  }

  .plan-topbar,
  .custom-plan-callout {
    display: grid;
  }

  .button-row,
  .form-footer,
  .api-key-panel .button-row {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :host {
    font-size: 13px;
  }

  .topbar-actions .button span {
    display: none;
  }

  .announcement {
    align-items: flex-start;
  }

  /* La marge de 16 px de `.screen` (≤ 920 px) s'ajoutait au padding : 34 px
     perdus de chaque côté, sur un écran de 390. Une seule gouttière de 16 px. */
  .screen.auth-screen {
    margin-left: 0;
    margin-right: 0;
    padding: 84px 16px 18px;
  }

  .auth-page-brand {
    top: 18px;
    left: 16px;
  }

  .google-button {
    white-space: normal;
  }

  .auth-card {
    padding: 18px;
  }

  [data-page="login"] .auth-card,
  [data-page="signup"] .auth-card {
    gap: 18px;
    padding: 20px;
  }

  .button,
  .entry-card,
  .queued-row,
  .input-with-button,
  .modal-actions {
    width: 100%;
  }

  .button-row,
  .input-with-button,
  .queued-row,
  .form-footer,
  .modal-actions {
    display: grid;
  }

  .pipeline-strip {
    grid-template-columns: 1fr;
  }

  .public-header {
    display: grid;
    gap: 10px;
  }
}
/* additions laravel */
[data-lucide] svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
}

.v2-shell {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.v2-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 292px;
  padding: 14px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .2s ease;
  overflow-y: auto;
}

.v2-sidebar > .brand {
  display: flex;
  margin-bottom: 22px;
}

.v2-sidebar-open .v2-sidebar {
  transform: translateX(0);
}

.v2-main {
  min-height: 100vh;
}

.v2-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.v2-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.brand-lockup,
.nav-item,
.recent-item,
.credit-widget,
.topbar-actions,
.inline-actions,
.stat-strip,
.analysis-options,
.form-row,
.choice-row,
.plan-price,
.auth-links {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 10px;
  margin-bottom: 22px;
  font-weight: 800;
  color: var(--heading);
}

.nav-list {
  display: grid;
  gap: 4px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.nav-item {
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  color: var(--heading);
  background: var(--soft);
}

.credit-widget,
.recent-panel,
.panel,
.auth-panel,
.modal-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
}

.credit-widget {
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 22px;
}

.credit-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--heading);
}

.recent-panel {
  padding: 14px;
}

.recent-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.recent-item {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  color: var(--text);
  text-decoration: none;
  border-top: 1px solid var(--border);
}

.recent-item:first-child {
  border-top: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.page-title,
.auth-title {
  margin: 0;
  color: var(--heading);
  letter-spacing: 0;
}

.page-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.page-subtitle,
.muted,
.field-hint {
  color: var(--muted);
}

.grid-3,
.project-grid,
.plans-grid {
  display: grid;
  gap: 16px;
}

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

.project-grid,
.plans-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.metric {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--heading);
}

.button,
.button-primary,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: var(--soft);
  color: var(--heading);
  border-color: var(--border);
}

.button-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border);
}

.button:disabled,
.button-primary:disabled {
  opacity: .6;
  cursor: wait;
}

/* Grisé parce qu'une condition n'est pas remplie (texte trop court), pas parce
   qu'on attend une réponse : le curseur doit dire « impossible », pas « patiente ». */
.button.is-disabled {
  cursor: not-allowed;
}

/* Retour de longueur sous la zone de saisie, mis à jour à la frappe. */
.length-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.length-hint.is-blocking {
  color: #dc2626;
}

.length-hint.is-warning {
  color: #b45309;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.v2-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.v2-table th,
.v2-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.v2-table th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
}

.status-chip,
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 750;
  background: var(--soft);
  color: var(--heading);
}

/* Puce de chargement (point animé + libellé) : un peu plus d'air autour. */
.status-chip:has(.spinner-dot) {
  padding: 2px 12px;
}

.status-chip .spinner-dot {
  flex-shrink: 0;
}

.score-good { background: color-mix(in srgb, #16a34a 16%, var(--surface)); color: #15803d; }
.score-mid { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); color: #b45309; }
.score-low { background: color-mix(in srgb, #ef4444 16%, var(--surface)); color: #dc2626; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: var(--bg);
}

.auth-panel {
  width: min(100%, 480px);
  padding: 28px;
}

.auth-shell.auth-wide {
  grid-template-columns: minmax(320px, 1050px);
}

.auth-wide {
  width: min(100%, 1050px);
}

.auth-card.auth-wide {
  width: min(100%, 1050px);
}

.auth-shell.auth-medium {
  grid-template-columns: minmax(320px, 780px);
}

.auth-card.auth-medium {
  width: min(100%, 780px);
}

/* Les colonnes ci-dessus ont 320 px de minimum : sur un écran de 320 px,
   gouttières comprises, la page défilait de côté. */
@media (max-width: 640px) {
  .auth-shell.single {
    grid-template-columns: minmax(0, 460px);
  }

  .auth-shell.auth-medium {
    grid-template-columns: minmax(0, 780px);
  }

  .auth-shell.auth-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.auth-card .page-header {
  margin-bottom: 0;
}

.auth-options {
  flex-wrap: wrap;
}

.auth-options a.text-link {
  margin-left: auto;
  line-height: 1.2;
}

.auth-options input[type="checkbox"],
.choice-row input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.auth-switch {
  margin: 0;
}

.choice-row {
  gap: 8px;
  line-height: 1.35;
}

/* Contrôles de formulaire uniquement : `.field` est aussi le wrapper de
   groupe de champ dans l'app (label.field/div.field) — ne pas le border. */
input.field,
select.select,
textarea.textarea {
  width: 100%;
  border: 1px solid var(--border);
  /* background-color (pas le raccourci `background`) : le raccourci réinitialise
     background-repeat/position/size et faisait carreler le chevron custom du
     select global (mosaïque de chevrons sur les pages bulk). */
  background-color: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

.textarea {
  min-height: 280px;
  resize: vertical;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--heading);
  font-weight: 750;
}

.form-grid {
  display: grid;
  gap: 15px;
}

/* Un enfant de grille ne descend pas, par défaut, sous la largeur de son
   contenu : le reCAPTCHA (304 px fixes) élargissait toute la colonne, et les
   champs à 100 % débordaient de la carte sur téléphone. */
.form-grid > * {
  min-width: 0;
}

/* reCAPTCHA : largeur fixée par Google. Quand la place manque, on le réduit
   (ses mentions restent visibles) plutôt que de le couper. */
.captcha-field {
  container-type: inline-size;
}

@container (max-width: 303px) {
  .captcha-field .g-recaptcha {
    transform: scale(0.9);
    transform-origin: left top;
    margin-bottom: -8px;
  }
}

@container (max-width: 273px) {
  .captcha-field .g-recaptcha {
    transform: scale(0.8);
    margin-bottom: -16px;
  }
}

.form-row {
  gap: 12px;
}

.form-error,
.validation-errors {
  color: #dc2626;
}

/* Verdict rendu mais peu fiable (texte sous 350 mots) : on avertit sans alarmer,
   donc ambre — ni le rouge d'une erreur, ni le gris d'une note secondaire. */
.form-warning {
  color: #b45309;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--soft);
}

.alert-success {
  color: #15803d;
}

.analysis-options {
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.choice-card {
  flex: 1 1 230px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.modal.is-open {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, .42);
}

.modal-panel {
  width: min(100%, 560px);
  padding: 24px;
}

.modal-panel-large {
  width: min(100%, 960px);
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.bulk-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
}

.file-preview {
  width: 100%;
  min-height: 640px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft);
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-content: start;
}

.page-thumb {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.page-thumb img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.pagination {
  margin-top: 18px;
}

.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pager-summary {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.pager-summary-muted {
  color: var(--muted);
  font-weight: 500;
}

.pager-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pager-list li {
  margin: 0;
}

.pager-link {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.pager-link:hover {
  border-color: var(--border-strong);
  background: var(--panel-muted);
}

.pager-link.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  cursor: default;
}

.pager-link.is-disabled {
  color: var(--subtle);
  background: var(--panel-muted);
  cursor: not-allowed;
}

.pager-link i,
.pager-link svg {
  width: 16px;
  height: 16px;
}

.pager-ellipsis {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 34px;
  color: var(--subtle);
  font-size: 13px;
}

@media (min-width: 1040px) {
  .v2-sidebar {
    transform: none;
  }

  .v2-main {
    margin-left: 292px;
  }

  [data-sidebar-toggle] {
    display: none;
  }
}

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

  .section-head,
  .page-header,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-head .form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .section-head .field {
    min-width: 0;
  }

  .topbar-actions {
    gap: 8px;
  }

  .bulk-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .section-head .form-row {
    grid-template-columns: 1fr;
  }
}


/* Correctifs cascade (2026-07-07) : les ajouts tardifs ne doivent pas
   réafficher les éléments mobile-only sur desktop. */
.mobile-only {
  display: none;
}

@media (max-width: 920px) {
  .mobile-only {
    display: inline-flex;
  }
}


/* Toasts (feedback utilisateur, 2026-07-07) */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  animation: toast-in 0.18s ease-out;
}

.toast svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.toast.success { border-left-color: var(--success); }
.toast.success svg { color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.error svg { color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.warning svg { color: var(--warning); }
.toast.info { border-left-color: var(--primary); }
.toast.info svg { color: var(--primary); }

.toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

/* Erreurs de champ */
.field-error {
  color: var(--danger);
  font-size: 12px;
  margin: 6px 0 0;
}

.field.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
}

/* ============================================================
   Logo landing (2026-07-07) : sparkles nu + wordmark très gras,
   comme lucide-homepage-md-5-variations.html
   ============================================================ */
.brand {
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

/* ============================================================
   Logo de marque (2026-07-17) : <x-brand-logo />, SVG vectorisé.
   Remplace le lockup « sparkles + wordmark texte ». L'encre est en
   currentColor et .brand pose color: var(--text) -> le logo s'inverse
   tout seul en thème sombre. Seule la hauteur est pilotée, la largeur
   suit le ratio du viewBox (162x28 pour le complet, carré pour l'icône).
   ============================================================ */
.brand-logo {
  display: block;
  width: auto;
  flex: none;
}

.brand-logo-full {
  height: 28.8px; /* -10% vs 32px (retour Thomas : encore un poil trop grand dans l'app) */
}

.brand-logo-icon {
  height: 28px;
  width: 28px;
}

.auth-page-brand .brand-logo-full {
  height: 34px;
}

/* ============================================================
   Analyses récentes (sidebar) : version allégée une ligne
   ============================================================ */
.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
}

.history-item:hover {
  background: var(--panel-muted);
  color: var(--text);
  text-decoration: none;
}

.history-item .history-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
}

.history-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 450;
}

.history-meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

/* Badge « Test » de l'analyse de démonstration offerte à l'inscription.
   .history-title porte déjà flex:1 + ellipsis : c'est le titre qui se tronque,
   le badge et le score restent toujours visibles. */
.history-tag {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
}

/* Liens de la sidebar : jamais bleus, jamais soulignés */
.sidebar a {
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: none;
}

.user-card {
  color: var(--text);
}

.user-card strong {
  color: var(--text);
}

/* Page API : détails des cartes endpoint (2026-07-07) */
.endpoint-card h3 {
  margin: 6px 0 0;
  font-size: 13px;
}

.endpoint-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 4px;
}

.endpoint-card code {
  font-family: var(--mono);
  font-size: 12px;
}

.input-with-button form {
  display: contents;
}

/* Fix : code à l'intérieur d'un pre = pas de fond/padding propre (2026-07-07) */
pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre;
}

/* Rapport public : grille de métriques (2026-07-07) */
.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.report-metrics .panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

/* Pages d'erreur (2026-07-07) */
.error-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 24px;
  grid-template-rows: auto auto 1fr;
  padding: 40px 20px;
  background: var(--bg);
  color: var(--text);
}

.error-screen .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.error-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 40px 32px;
}

.error-code {
  margin: 0;
  font-size: 56px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.error-card h1 {
  margin: 0;
  font-size: 22px;
}

.error-card p {
  margin: 0;
  color: var(--muted);
}

/* Analyses récentes : lignes plus compactes + hover visible en light (2026-07-08) */
:host { --hover: #ecebe4; --active: #e3e1d6; }
:host(.dark), :host(.dark) { --hover: #1e2126; --active: #2a2e35; }

.history-item {
  min-height: 30px;
  padding: 4px 8px;
}

.history-item:hover {
  background: var(--hover);
  color: var(--text);
}

/* Analyse en cours de consultation : fond + texte qui tranchent (2026-07-16) */
.history-item.is-active,
.history-item.is-active:hover {
  background: var(--active);
  color: var(--text);
}

.history-item.is-active .history-title {
  font-weight: 600;
  color: var(--text);
}

.history-item.is-active .history-meta {
  color: var(--muted);
}

/* ============================================================
   Tour guidé interactif (spotlight) — 2026-07-08
   ============================================================ */
.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.button.ghost:hover {
  background: var(--panel-muted);
  color: var(--text);
}

.tour-guard {
  position: fixed;
  inset: 0;
  z-index: 88;
  cursor: default;
}

.tour-cutout {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 90;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 17, 20, 0.55);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  pointer-events: none;
  transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.tour-pop {
  position: fixed;
  z-index: 92;
  width: min(340px, calc(100vw - 24px));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: top 0.18s ease, left 0.18s ease;
}

.tour-pop-progress {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.tour-pop h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.tour-pop p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.tour-pop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 8px;
  margin-top: 16px;
}

.tour-pop-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tour-pop-nav .button {
  min-height: 34px;
  padding: 6px 12px;
  white-space: nowrap;
}

.tour-pop [data-tour-skip] {
  font-weight: 500;
}

@media (max-width: 720px) {
  .tour-pop-actions {
    flex-wrap: wrap;
  }
  .tour-pop-nav {
    flex: 1;
    justify-content: flex-end;
  }
}

/* ============================================================
   Centre d'aide — 2026-07-08
   ============================================================ */
.help-search {
  margin: 4px 0 8px;
}

.score-bands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.score-band {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel);
}

.score-band .score-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.score-band .score-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: none;
}
.score-band .score-dot.danger { background: var(--danger); }
.score-band .score-dot.warning { background: var(--warning, #d08a1d); }
.score-band .score-dot.success { background: var(--success, #2f9e57); }

.score-band h3 {
  margin: 8px 0 4px;
  font-size: 14px;
}

.score-band p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.faq-group {
  margin-top: 30px;
}

.faq-group > .eyebrow {
  margin-bottom: 2px;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: none;
}

.faq-item[open] > summary::after {
  transform: rotate(-135deg);
}

.faq-item > summary:hover {
  background: var(--panel-muted);
}

.faq-answer {
  padding: 2px 18px 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer code {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
}
.faq-answer a { color: var(--primary); }

.help-empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 640px) {
  .score-bands {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Menu utilisateur sidebar (Mon compte / Déconnexion) — 2026-07-08
   ============================================================ */
.user-menu {
  position: relative;
}

.user-card > i,
.user-card > svg {
  transition: transform 0.15s ease;
}

.user-card[aria-expanded="true"] > i,
.user-card[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.user-menu-pop {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.user-menu-pop[hidden] {
  display: none;
}

.user-menu-pop form {
  margin: 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

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

.user-menu-item > i,
.user-menu-item > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: none;
}

/* ============================================================
   Select : chevron custom espacé du bord (fix global) — 2026-07-08
   ============================================================ */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236f7379' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

:host(.dark) select,
:host(.dark) select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ============================================================
   Onboarding — choix du profil (cartes radio) — 2026-07-08
   ============================================================ */
.type-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin-inline: auto;
}

.type-card {
  position: relative;
  display: flex;
  flex: 1 1 210px;
  max-width: 232px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.type-card:hover {
  border-color: var(--border-strong);
}

.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

.type-card:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.type-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.type-card-icon svg {
  width: 18px;
  height: 18px;
}

.type-card-label {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* Téléphone : sept cartes empilées faisaient plus de deux écrans. Une liste
   de lignes, pictogramme à gauche du libellé, tient presque en un seul. */
@media (max-width: 640px) {
  .type-cards {
    display: grid;
    gap: 8px;
  }

  .type-card {
    flex-direction: row;
    align-items: center;
    max-width: none;
    gap: 12px;
    padding: 10px 12px;
  }

  .type-card-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
  }
}

.type-details.is-hidden {
  display: none;
}

.auth-head.centered {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

/* Vérification d'email : actions centrées, empilées, largeur homogène. */
.verify-actions {
  margin-top: 10px;
  justify-items: center;
}

.verify-actions form {
  display: grid;
  width: 100%;
}

.verify-actions .button {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   Correctifs recette staging — 2026-07-09
   ============================================================ */

/* 1. Accusé de vérification d'email au-dessus de l'onboarding. */
.onboarding-verified {
  align-items: center;
  margin-bottom: 18px;
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}

/* 6. Bouton « Générer ma clé API » à l'intérieur de l'encart. */
.notice-action {
  align-items: center;
  flex-wrap: wrap;
  row-gap: 10px;
}

.notice-action form {
  margin-left: auto;
}

/* 3. Réassurance /choose-plan : compteurs + logos adaptés au profil. */
.reassurance {
  display: grid;
  gap: 18px;
  width: min(100%, 980px);
  margin: 0 auto 24px;
  text-align: center;
}

.reassurance-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.reassurance-stat {
  display: grid;
  gap: 3px;
  min-width: 132px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.reassurance-stat strong {
  font-size: 24px;
  font-weight: 820;
  line-height: 1;
  color: var(--text);
}

.reassurance-stat span {
  font-size: 12.5px;
  color: var(--muted);
}

.reassurance-stat sup {
  font-size: 0.7em;
}

.reassurance-logos-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logo-strip .logo-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.logo-strip img {
  height: 26px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.72;
}

.reassurance-note {
  margin: 0;
  font-size: 11px;
  color: var(--subtle);
}

/* 8. Panneau plagiat harmonisé avec le panneau de score IA. */
.plagiarism-orb {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 0 auto 6px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--muted);
}

.plagiarism-orb .orb-value {
  font-size: 40px;
  font-weight: 820;
  line-height: 1;
  color: inherit;
}

.plagiarism-orb .orb-value small {
  font-size: 20px;
  font-weight: 750;
}

.plagiarism-orb svg,
.plagiarism-orb [data-lucide] svg {
  width: 46px;
  height: 46px;
}

.plagiarism-orb.is-good {
  background: var(--success-soft);
  color: var(--success);
}

.plagiarism-orb.is-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.plagiarism-orb.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.plagiarism-panel .match-list {
  margin-top: 4px;
  text-align: left;
}

/* ------------------------------------------------------------------ *
 * /choose-plan : 4 cartes alignées (3 abonnements + 1 carte crédits)  *
 * Défini APRÈS .pricing-grid pour gagner la cascade sur ce layout.    *
 * ------------------------------------------------------------------ */
.pricing-grid--credits {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 1180px);
}

/* Tablette : 2×2. Ces règles suivent le @media 860px existant de */
/* .pricing-grid, donc elles gagnent la cascade pour --credits.   */
@media (max-width: 1180px) {
  .pricing-grid--credits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 680px);
  }
}

@media (max-width: 620px) {
  .pricing-grid--credits {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 420px;
  }
}

/* Carte crédits = option SECONDAIRE : fond recessed (= fond de page),
   accents muets (pas de bleu), prix discret. Le CTA reste blanc/secondaire
   (défini par .price-cta.secondary), face aux CTA bleus des abonnements. */
.credit-card {
  background: var(--bg);
  border-color: var(--border);
}

.credit-card h3 {
  color: var(--muted);
  font-size: 17px;
}

.credit-card .price-credits {
  color: var(--muted);
}

.credit-card .price-value {
  color: var(--muted);
  font-size: 30px;
}

.credit-select-field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.credit-select-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--heading);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.credit-select-field select:hover {
  border-color: var(--primary);
}

.credit-select-field select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

/* /choose-plan : pas de "carte" blanche autour du contenu — les plans
   s'affichent directement sur le fond de page. On élargit un peu le conteneur
   pour laisser respirer la grille à 4 colonnes. Défini après .auth-card.auth-wide
   pour gagner la cascade (spécificité égale). Scopé à cette page uniquement. */
.screen.auth-screen[data-page="choose-plan"] .auth-shell.auth-wide {
  grid-template-columns: minmax(320px, 1200px);
}

[data-page="choose-plan"] .auth-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: min(100%, 1200px);
}

/* Remonter le bloc titre → toggle SANS bouger les cartes : on réduit le
   padding-top (ce qui remonte tout), puis on compense par un margin-top sur la
   grille pour que les cartes gardent leur position. Le logo (absolute top:32px)
   et le bandeau (fixed en bas) ne bougent pas non plus. */
.screen.auth-screen[data-page="choose-plan"] {
  padding-top: 32px;
  padding-bottom: 116px;
}

/* Sous 920 px, le titre centré (ou le bouton « Accéder à mon espace »)
   rejoint le logo : on rend le haut habituel des écrans d'authentification. */
@media (max-width: 920px) {
  .screen.auth-screen[data-page="choose-plan"] {
    padding-top: 96px;
  }
}

@media (max-width: 640px) {
  .screen.auth-screen[data-page="choose-plan"] {
    padding-top: 84px;
  }

  .screen.auth-screen[data-page="choose-plan"] .auth-shell.auth-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

[data-page="choose-plan"] .pricing-grid {
  margin-top: 16px;
}

/* « Faites confiance à Lucide » → bandeau STICKY pleine largeur, collé en bas
   de l'écran (toujours visible sans scroll). Layout horizontal compact. */
[data-page="choose-plan"] .reassurance {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 44px);
  flex-wrap: wrap;
  background: var(--panel);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(17, 18, 20, 0.06);
}

/* Note (substantiation du « N°1 ») masquée dans le bandeau compact. */
[data-page="choose-plan"] .reassurance-note {
  display: none;
}

/* Stats aplaties en texte inline (pas de mini-cartes), centrées verticalement. */
[data-page="choose-plan"] .reassurance-stats {
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

[data-page="choose-plan"] .reassurance-stat {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  white-space: nowrap;
}

[data-page="choose-plan"] .reassurance-stat strong {
  font-size: 18px;
}

[data-page="choose-plan"] .reassurance-stat span {
  font-size: 12.5px;
}

/* Logos : sous-titre profilé masqué, strip compact. */
[data-page="choose-plan"] .reassurance-logos {
  display: flex;
  align-items: center;
}

[data-page="choose-plan"] .reassurance-logos-title {
  display: none;
}

[data-page="choose-plan"] .logo-strip {
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
}

/* Logos nus : sans bordure ni fond. */
[data-page="choose-plan"] .logo-strip .logo-cell {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

[data-page="choose-plan"] .logo-strip img {
  height: 24px;
}

/* Mobile : un bandeau horizontal ne tient pas → on repasse la réassurance en
   flux normal, look d'origine (mini-cartes + logos empilés). */
@media (max-width: 620px) {
  .screen.auth-screen[data-page="choose-plan"] {
    padding-bottom: 18px;
  }
  [data-page="choose-plan"] .reassurance {
    position: static;
    width: min(100%, 980px);
    margin: 28px auto 24px;
    padding: 0;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 18px;
    text-align: center;
    background: transparent;
    border-top: 0;
    box-shadow: none;
  }
  [data-page="choose-plan"] .reassurance-note { display: block; }
  [data-page="choose-plan"] .reassurance-logos-title { display: block; }
  [data-page="choose-plan"] .reassurance-stats { flex-wrap: wrap; }
  [data-page="choose-plan"] .reassurance-stat {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 132px;
    padding: 12px 20px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: var(--radius);
  }
  [data-page="choose-plan"] .reassurance-stat strong { font-size: 24px; }
  [data-page="choose-plan"] .logo-strip { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ *
 * /account/credit : bloc dédié « Ajouter des crédits » + forfait courant
 * ------------------------------------------------------------------ */

/* Entrée d'accueil pointant vers une fonctionnalité non incluse : visible mais
   visiblement inactive, et elle mène aux formules (pas à un 403). */
.entry-card.is-locked {
  border-style: dashed;
  color: var(--muted);
}

.entry-card.is-locked strong {
  color: var(--muted);
}

/* ------------------------------------------------------------------ *
 * Bandeau d'offre ponctuelle : Pass 30 jours ou recharge (Pricing V2) *
 * Placé SOUS les 3 cartes d'abonnement, dont il couvre la largeur      *
 * combinée : .pricing-grid et .credit-block partagent width:           *
 * min(100%, 980px) + centrage, donc l'alignement suit sans largeur     *
 * en dur. Deux zones séparées par un filet : l'offre à gauche,         *
 * l'achat à droite. Hérite de .credit-block pour le cadre.             *
 * ------------------------------------------------------------------ */
/* Sélecteur à DEUX classes : `.credit-block` est déclaré plus bas dans ce
   fichier, donc à spécificité égale il gagnerait la cascade et réimposerait
   son align-items:center / gap / padding — ce qui recentrait verticalement la
   colonne de gauche au lieu de l'aligner en haut. */
.credit-block.offer-band {
  align-items: stretch;
  gap: 0;
  margin-top: 18px;
  margin-bottom: 0;
  padding: 24px 28px;
}

.offer-band-main {
  flex: 1 1 380px;
  min-width: 0;
  padding-right: 28px;
}

.offer-band-head h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
}

/* Pastille « Sans abonnement » : inline, contrairement à .price-badge qui est
   positionné en absolu sur le haut des cartes. */
.pass-tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.offer-band-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Mêmes coches que les cartes d'abonnement (.price-features), sur 2 colonnes.
   Défini APRÈS .price-features pour gagner la cascade. */
.offer-band-features {
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}

/* align-content:start -> la colonne d'achat démarre en haut, au même niveau que
   le titre à gauche (le filet, lui, reste pleine hauteur grâce au stretch). */
.offer-band-buy {
  flex: 0 0 auto;
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(100%, 264px);
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

/* Traduction « crédits -> mots » sous le sélecteur du Pass : c'est la seule
   ligne de la page qui donne le taux de change, elle doit se lire sans effort
   (d'ou la teinte --muted et non --subtle) sans pour autant passer devant le
   prix. Marge negative pour la coller au sélecteur malgré le gap de la grille. */
.offer-band-words {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.offer-band-words strong {
  color: var(--heading);
  font-weight: 650;
}

.offer-band-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.offer-band-price .price-value {
  font-size: 32px;
  font-weight: 650;
  line-height: 1;
  color: var(--heading);
}

/* Mentions secondaires (« paiement unique », prix au crédit) : graisse normale
   et teinte claire, pour ne pas concurrencer le prix ni le CTA. */
.offer-band-period {
  color: var(--subtle);
  font-size: 13px;
  font-weight: 400;
}

.offer-band-buy form {
  margin: 0;
  display: grid;
}

.offer-band-note {
  margin: 0;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

/* Le CTA porte en permanence l'aspect que .button.secondary ne prenait qu'au
   survol (fond teinté + bordure marquée) ; le survol pousse alors d'un cran.
   Teintes dérivées des tokens, pas de couleur en dur. */
.offer-band-buy .button.secondary {
  min-height: 42px;
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--border) 40%, var(--panel));
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.offer-band-buy .button.secondary:hover {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--border) 70%, var(--panel));
}

/* Empilé : le filet vertical devient une séparation horizontale. */
@media (max-width: 860px) {
  .credit-block.offer-band {
    flex-direction: column;
    padding: 20px;
    /* La grille passe à une colonne de 420px max : le bandeau s'aligne dessus,
       sinon il déborderait en largeur sous des cartes devenues étroites. */
    max-width: 420px;
  }
  /* En colonne, le flex-basis porte sur la HAUTEUR : sans ce reset, le
     `flex: 1 1 380px` de la vue large imposait 380px de haut à la zone de
     gauche et creusait un grand vide au-dessus du séparateur. */
  .offer-band-main {
    flex: 0 1 auto;
    padding-right: 0;
  }
  .offer-band-buy {
    width: 100%;
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  .offer-band-features {
    grid-template-columns: 1fr;
  }
}

/* Bloc horizontal d'ajout de crédits, au-dessus des abonnements. */
.credit-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
  width: min(100%, 980px);
  margin: 0 auto 26px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.credit-block-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.credit-block-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.credit-block-buy {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.credit-block-buy .credit-select-field {
  min-width: 210px;
}

.credit-block-price .price-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--heading);
}

.credit-block-buy form {
  margin: 0;
  display: grid;
}

/* Wrapper de CTA épinglé en bas de carte (comme .price-card form sur choose-plan),
   pour aligner les boutons même quand le CTA est « Votre forfait » (pas un form). */
.price-card .price-cta-wrap {
  display: grid;
  margin-top: auto;
}

/* Forfait courant : CTA grisé, non cliquable. */
.price-cta.is-current {
  background: color-mix(in srgb, var(--border) 34%, transparent);
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

.price-cta.is-current:hover {
  background: color-mix(in srgb, var(--border) 34%, transparent);
  border-color: var(--border);
  color: var(--muted);
}

@media (max-width: 620px) {
  .credit-block {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .credit-block-buy {
    justify-content: space-between;
  }
}

/* ============================================================
   Import de fichiers v2 : dropzone, progression d'upload,
   écran « Vérifier et lancer », résultat document.
   ============================================================ */
.dropzone[data-upload-dropzone] {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone[data-upload-dropzone]:hover,
.dropzone[data-upload-dropzone]:focus-visible,
.dropzone.is-dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--panel-muted));
}

.upload-progress {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.upload-files {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

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

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.spinner-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: spinner-dot-pulse 1s ease-in-out infinite;
}

@keyframes spinner-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* Aperçu d'un document en vignettes : toutes les pages sont sélectionnées, un clic en écarte une. */
.doc-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.doc-thumb {
  width: 116px;
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 12px;
  color: var(--muted);
}

.doc-thumb img,
.doc-thumb-empty,
.doc-thumb.is-skeleton {
  width: 116px;
  height: 150px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  object-fit: cover;
  object-position: top center;
}

.doc-thumb-empty {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
}

.doc-thumb.is-skeleton {
  background: var(--soft);
  animation: spinner-dot-pulse 1.4s ease-in-out infinite;
}

/* Footer d'action : carte autonome (bordure complète + coins arrondis),
   pas une barre pleine largeur à simple filet du haut (effet « tronqué »). */
.review-footer {
  position: sticky;
  bottom: 16px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  z-index: 5;
}

.review-footer .choice-row {
  margin-right: 8px;
}

/* ------------------------------------------------------------------ *
 * Cartes de résultat « crème chaleureuses » (design Claude, 07/2026)  *
 * Fond crème, coins doux, ombre tiède, anneau SVG dégradé, badge miel *
 * ------------------------------------------------------------------ */
:host {
  --result-card-bg: var(--panel);
  --result-card-border: var(--border);
  --result-card-shadow: var(--shadow);
  --result-track: #e8e7e1;
  --result-eyebrow: var(--subtle);
  --result-body: var(--muted);
  --result-heading: var(--text);
  --result-badge-bg: var(--success-soft);
  --result-badge-ink: var(--success);
  --result-good: #158a42;
  --result-warning: #b45309;
  --result-danger: #dc2626;
}

:host(.dark),
:host(.dark) {
  --result-card-bg: var(--panel);
  --result-card-border: var(--border);
  --result-card-shadow: var(--shadow);
  --result-track: #2f3237;
  --result-eyebrow: var(--subtle);
  --result-body: var(--muted);
  --result-heading: var(--text);
  --result-badge-bg: var(--success-soft);
  --result-badge-ink: var(--success);
  --result-good: #4ade80;
  --result-warning: #fbbf24;
  --result-danger: #f87171;
}

.score-panel,
.plagiarism-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  border: 1px solid var(--result-card-border);
  border-radius: 24px;
  background: var(--result-card-bg);
  box-shadow: var(--result-card-shadow);
  padding: 26px 26px 24px;
}

/* Les pastilles sont groupées à DROITE, pas réparties : avec space-between et
   deux badges (verdict + confiance), le verdict se retrouvait seul au milieu.
   C'est l'intitulé qui absorbe l'espace libre, donc le nombre de badges peut
   varier sans casser l'alignement. */
.score-panel .card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 24px;
}

.score-panel .card-head .eyebrow {
  margin: 0;
  margin-right: auto;
  color: var(--result-eyebrow);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.verdict-badge svg {
  width: 12px;
  height: 12px;
}

.verdict-badge.is-good {
  background: var(--result-badge-bg);
  color: var(--result-badge-ink);
}

.verdict-badge.is-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.verdict-badge.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Pastille de confiance : même forme que le verdict, avec une bulle au survol
   qui explique POURQUOI (la fenêtre du moteur), au lieu d'un simple libellé. */
.confidence-badge {
  position: relative;
  cursor: help;
}

.confidence-tip {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 6px;
  width: max-content;
  max-width: 300px;
  padding: 12px 14px;
  border: 1px solid var(--tip-border, transparent);
  border-radius: 10px;
  background: var(--tip-bg);
  color: var(--tip-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
}

.confidence-badge:hover .confidence-tip,
.confidence-badge:focus-within .confidence-tip,
.confidence-badge:focus .confidence-tip {
  opacity: 1;
  visibility: visible;
}

/* Flèche pointant vers la pastille. */
.confidence-tip::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 18px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-left: 1px solid var(--tip-border, transparent);
  border-top: 1px solid var(--tip-border, transparent);
  background: var(--tip-bg);
}

.confidence-tip-title {
  color: var(--tip-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confidence-tip-hint {
  color: var(--tip-muted);
}

.score-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 172px;
  height: 172px;
  margin-top: 12px;
}

.score-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.score-ring-track {
  fill: none;
  stroke: var(--result-track);
  stroke-width: 13;
}

.score-ring-halo {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
}

.score-ring.is-good .score-ring-halo {
  background: radial-gradient(circle, rgba(46, 168, 88, 0.14), transparent 70%);
}

.score-ring.is-warning .score-ring-halo {
  background: radial-gradient(circle, rgba(217, 146, 32, 0.14), transparent 70%);
}

.score-ring.is-danger .score-ring-halo {
  background: radial-gradient(circle, rgba(220, 60, 50, 0.12), transparent 70%);
}

.score-ring-value {
  position: relative;
  color: var(--result-heading);
  font-size: 50px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.score-ring-value small {
  font-size: 26px;
  font-weight: 700;
}

.score-ring-value svg {
  position: static;
  width: 44px;
  height: 44px;
  color: var(--result-eyebrow);
}

.score-ring.is-muted .score-ring-value {
  color: var(--result-eyebrow);
}

.score-ring.is-tinted.is-good .score-ring-value {
  color: var(--result-good);
}

.score-ring.is-tinted.is-warning .score-ring-value {
  color: var(--result-warning);
}

.score-ring.is-tinted.is-danger .score-ring-value {
  color: var(--result-danger);
}

/* --- Verdict « composition » (chantier verdict-spans) ------------------- */

/* Pastille de verdict à côté du titre de la page. */
.title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.title-with-badge .verdict-badge {
  font-size: 13px;
  padding: 5px 12px;
}

/* La phrase discrète au-dessus de l'anneau : « Nous pensons que ce texte… ». */
.verdict-lede {
  margin: 28px 0 0;
  max-width: 320px;
  color: var(--result-body);
  font-size: 14px;
  line-height: 1.5;
}

/* Même piège que la légende de l'anneau : `.score-panel > p` (8 px, plus bas
   dans ce fichier) est PLUS précis que `.verdict-lede` seul et l'emportait —
   la marge posée le 28/08 (10 -> 18 px) n'a donc jamais rien changé à l'écran.
   Il faut un sélecteur au moins aussi précis pour écarter l'en-tête de carte
   (deux pastilles : détection + confiance) de la phrase de verdict. */
.score-panel > .verdict-lede {
  margin-top: 28px;
}

/* Centre de l'anneau : le % d'IA et sa légende, empilés. */
.verdict-ring-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 118px;
  text-align: center;
}

.verdict-ring .score-ring-value {
  font-size: 42px;
}

/* Graisse légère (recette 27/08) : cette légende accompagne le chiffre, elle ne
   lui dispute pas la vedette — en 600 les deux se battaient au centre de la jauge. */
.verdict-ring-caption {
  color: var(--result-eyebrow);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

/* Centre de la jauge : les petits svg décoratifs restent en flux (la règle
   .score-ring svg du bloc résultat absolutise tout svg enfant). */
.verdict-ring-center svg {
  position: static;
}

/* Légende sous la jauge : « ● IA 27 % · ● Humain 73 % ».
   La marge est NÉGATIVE : la jauge est ouverte en bas, sa boîte garde donc ~17 px
   de vide sous le dernier pixel peint. Une marge positive s'y ajoute et la légende
   se retrouve plus loin de la jauge qu'elle ne l'est du paragraphe suivant — elle
   semble alors appartenir au texte au lieu de nommer les deux arcs. On rattrape le
   vide pour revenir à ~8 px vus, et on écarte franchement le paragraphe. */
.verdict-legend {
  display: flex;
  gap: 12px;
  margin-top: -8px;
  color: var(--result-body);
  font-size: 11.5px;
  font-weight: 650;
}

/* Sélecteur volontairement plus précis que `.score-panel > p` (8 px), défini
   plus bas dans ce fichier : à spécificité égale c'est lui qui l'emporterait et
   la légende resterait à égale distance de la jauge et du paragraphe. */
.score-panel > .verdict-legend + p {
  margin-top: 18px;
}

.verdict-legend .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 1px;
}

.verdict-legend .dot.is-human {
  background: var(--result-good, #158a42);
}

/* Teintes reprises des dégradés de la jauge, pas des tokens de texte : la
   pastille de légende doit être exactement la couleur de l'arc qu'elle nomme. */
.verdict-legend .dot.is-warning {
  background: #e07317;
}

.verdict-legend .dot.is-danger {
  background: var(--result-danger, #c6362a);
}

/* L'avis du client sur son verdict : deux pouces, jamais bloquants. */
.verdict-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--result-eyebrow);
  font-size: 13px;
}

.verdict-feedback .thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid var(--result-card-border);
  border-radius: 10px;
  background: transparent;
  color: var(--result-eyebrow);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.verdict-feedback .thumb:hover {
  color: var(--result-heading);
  border-color: var(--result-heading);
}

.verdict-feedback .thumb.is-up.is-active {
  background: var(--result-badge-bg);
  border-color: transparent;
  color: var(--result-badge-ink);
}

.verdict-feedback .thumb.is-down.is-active {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}

.score-panel h2 {
  margin: 16px 0 0;
  color: var(--result-heading);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.score-panel > p {
  margin: 8px 0 0;
  max-width: 300px;
  color: var(--result-body);
  font-size: 14px;
  line-height: 1.55;
}

.score-panel > a {
  margin-top: 14px;
  font-weight: 650;
}

.score-panel > .button {
  margin-top: 14px;
}

.score-panel > small.muted {
  margin-top: 10px;
}

.score-panel .progress-track {
  width: 100%;
}

.score-panel .match-list {
  width: 100%;
  margin-top: 14px;
  text-align: left;
}

.result-layout {
  gap: 20px;
}

/* Bloc « analyse en cours » : occupe la hauteur restante de la carte (souvent étirée
   par la carte voisine) et centre verticalement loader + titre + texte, sans toucher
   aux autres états. Ne fait rien si la carte n'a pas de hauteur en trop. */
.analyse-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
}

/* Loader « analyse en cours » — boucle d'index qui vibre, variante « Corde » (chantier
   loader-analyse), dessinée dans un canvas par v2/lucide-loader.js. `color` = teinte du
   métal (suit le thème clair/sombre) ; la teinte violette vient de var(--primary). */
.lc-loader-dial {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 2px;
  color: var(--text);
}
.lc-loader-dial canvas {
  display: block;
  width: 168px;
  height: 168px;
}

/* ============================================================
   Fonctionnalités hors formule : montrées, pas cachées.
   Convention reprise du freescan (/detecteur-ia/) : l'élément
   reste visible, grisé, et explique au survol ce qui le
   débloque. Cacher l'option privait l'utilisateur de la seule
   information qui le ferait monter de formule.

   ⚠️ Sélecteurs volontairement spécifiques : `.toggle-card span`
   impose width:34px / grid-row:span 2 / display:grid à TOUS les
   span de la carte. Sans reprendre la main dessus, la pastille
   se replie sur 34 px et l'infobulle sort en colonne de texte.
   ============================================================ */
.is-locked {
  position: relative;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.is-locked > :not(.lc-tooltip):not(.lc-lock-badge) {
  opacity: 0.55;
}

.toggle-card.is-locked,
.segment.is-locked {
  background: var(--panel-muted);
}

.toggle-card.is-locked strong,
.toggle-card.is-locked small,
.segment.is-locked {
  color: var(--muted);
}

.toggle-card .lc-lock-badge,
.segment .lc-lock-badge,
.lc-lock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  grid-row: auto;
  place-items: center;
  align-items: center;
  gap: 3px;
  width: auto;
  height: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 1;
}

.lc-lock-badge svg {
  width: 10px;
  height: 10px;
  flex: none;
}

/* Espacement irrégulier de la pastille de formule, deux causes cumulées :
   1) quand lucide n'a pas initialisé l'icône, le <i data-lucide="lock"> reste un
      élément VIDE de 10px (style inline) + le gap de 3px, soit 13px de blanc à
      gauche du libellé qui décentrent le texte. Une fois l'icône rendue c'est un
      <svg>, donc :empty ne s'applique plus et le verrou s'affiche normalement ;
   2) letter-spacing ajoute son espace APRÈS la dernière lettre, jamais avant :
      le padding droit paraît plus large. On le retranche. */
.lc-lock-badge > i:empty {
  display: none;
}

.lc-lock-badge {
  padding-right: calc(7px - 0.04em);
}

.toggle-card .lc-tooltip,
.segment .lc-tooltip,
.lc-tooltip {
  position: absolute;
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: block;
  grid-row: auto;
  place-items: initial;
  width: min(300px, calc(100vw - 40px));
  height: auto;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--panel);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.is-locked:hover .lc-tooltip,
.is-locked:focus-visible .lc-tooltip,
.is-locked:focus-within .lc-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Première carte de la grille : l'infobulle déborderait à gauche. */
.toggle-grid > .is-locked:first-child .lc-tooltip {
  left: 0;
}

/* Bandeau d'upsell contextuel (ex. plusieurs documents déposés sans
   l'analyse en masse) : apparaît là où l'utilisateur bute, pas dans
   un coin de la page. */
.lc-upsell-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.lc-upsell-inline .button {
  margin-left: auto;
  flex: none;
}

@media (max-width: 640px) {
  .lc-upsell-inline { flex-wrap: wrap; }
  .lc-upsell-inline .button { margin-left: 0; width: 100%; justify-content: center; }
}

/* Icône d'action destructive (retirer un document d'un import). */
.icon-button.danger {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-button.danger:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: var(--danger-soft);
}

.icon-button.danger svg { width: 16px; height: 16px; }

/* Liste des gains d'une montée de formule (modale d'upsell). */
.modal-gains {
  display: grid;
  gap: 7px;
  margin: 14px 0 12px;
  padding: 0;
  list-style: none;
}

.modal-gains li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.modal-gains svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--primary);
}

/* Historique de la barre latérale : empêcher tout débordement horizontal.
   .history-title portait déjà l'ellipse, mais .history-list est une GRILLE :
   ses pistes s'élargissent au contenu (min-width:auto par défaut), si bien
   qu'un titre long poussait la liste et faisait apparaître une barre de
   défilement horizontale. On borne la piste et on coupe net. */
.history-list {
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
}

.history-item {
  min-width: 0;
}

/* ============================================================
   Pied de page légal de /choose-plan (paywall).
   Cet écran est le seul atteignable par un inscrit non payant :
   il porte donc la mention TTC et les liens contractuels, ainsi
   qu'une sortie (déconnexion) — sans quoi la page est un
   cul-de-sac. Liens relatifs : staging doit rester sur staging.
   ============================================================ */
.paywall-legal {
  margin: 28px auto 0;
  max-width: 900px;
  padding: 0 16px 8px;
  text-align: center;
}

.paywall-legal-tax {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.paywall-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.paywall-legal-links form {
  display: inline;
  margin: 0;
}

.paywall-legal-links a,
.paywall-legal-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.paywall-legal-links a:hover,
.paywall-legal-links button:hover {
  color: var(--text);
}

/* Verrou sur une commande d'UNE ligne (bouton), pas sur une carte : la pastille
   .lc-lock-badge est absolue en haut à droite, ce qui la fait chevaucher le
   libellé d'un bouton. Ici elle redevient un élément de flux, à la suite du
   texte, et l'infobulle se centre sous le bouton. */
.is-locked-inline .lc-lock-badge {
  position: static;
  margin-left: 6px;
}

.is-locked-inline .lc-tooltip {
  left: 50%;
  transform: translate(-50%, 4px);
}

.is-locked-inline:hover .lc-tooltip,
.is-locked-inline:focus-visible .lc-tooltip,
.is-locked-inline:focus-within .lc-tooltip {
  transform: translate(-50%, 0);
}

/* ===========================================================================
   Lot 12b — modale « aucun crédit » (test A/B paywall, variante B)
   ---------------------------------------------------------------------------
   Design : projet Claude Design « Lucide Visuals », bloc 12b (928×480, panneau
   420 px). Valeurs reprises du design ; les COULEURS passent par les tokens
   plutôt que par les hex du design :
     - #6D5CF6 EST déjà var(--primary) (kit-5a.css, chargé après ce fichier
       dans les 4 layouts v2) — coder le hex en dur dupliquerait l'accent et
       le figerait le jour où le kit bouge ;
     - le design est clair uniquement, or l'app a un thème sombre : #fff /
       #20242E / #F0EFF9 en dur donneraient une modale blanche illisible en
       sombre. --surface / --text / --primary-soft suivent les deux thèmes.
   Le reste (géométrie, graisses, tailles) est repris au chiffre près.

   Tout est scopé sous .credit-gate : les autres modales de modal-credit.blade
   (confirmation, crédits insuffisants, montée de formule) gardent le style
   .modal-panel générique.
   =========================================================================== */
.credit-gate .modal-panel.credit-gate-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 468 et non les 420 px du design : le titre doit tenir sur UNE ligne à côté
     de l'icône (demande de Thomas 09/08) et il demande 300,5 px dans la pile de
     polices de l'app, contre 292,7 px en Instrument Sans où le design a été
     dessiné. À 420 px il ne reste que 276 px une fois l'icône (44 + 14) et la
     zone de la croix retirées : le titre passerait à la ligne quoi qu'on fasse,
     sauf à le descendre à ~17 px. Élargir le panneau garde la typographie du
     design intacte — c'est le paramètre le moins visible des trois. */
  width: min(100%, 468px);
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  padding: 30px 32px 26px;
  /* Ombre du design (oklch converti en rgb pour les navigateurs sans oklch) :
     très portée et très diffuse, elle décolle le panneau du texte flouté. */
  box-shadow: 0 40px 90px -30px rgba(28, 33, 51, 0.55);
}

.credit-gate-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--subtle);
}

.credit-gate-close:hover {
  background: var(--hover, var(--panel-muted));
  color: var(--text);
}

.credit-gate-close svg {
  width: 15px;
  height: 15px;
}

.credit-gate-head {
  display: flex;
  align-items: center;
  gap: 14px;
  /* Réserve pour la croix (absolue dans le coin haut droit) : 30 px de bouton
     posés à 16 px du bord, moins les 32 px de padding du panneau, + 8 px d'air.
     La largeur du panneau est calculée pour que le titre tienne APRÈS cette
     réserve — la croix ne mord donc jamais sur le texte, contrairement au
     design où les deux se chevauchent de 8 px. */
  padding-right: 22px;
}

.credit-gate-glyph {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
}

.credit-gate-title {
  min-width: 0;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--heading);
  /* Une seule ligne, centrée sur l'icône. La largeur du panneau est dimensionnée
     pour ça ; `balance` reste utile si la police du poste est plus large encore
     (aucune webfont n'est chargée, donc la métrique dépend de l'OS) — le titre
     se coupe alors en deux lignes équilibrées plutôt qu'en orpheline. */
  text-wrap: balance;
}

.credit-gate-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.credit-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 11px;
  /* Le panneau est en gap 10 pour serrer titre et sous-titre ; les actions
     gardent les 16 px du design. */
  margin-top: 6px;
}

.credit-gate-cta {
  display: block;
  border-radius: 12px;
  background: var(--primary);
  padding: 13px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--primary-ink);
  text-decoration: none;
}

.credit-gate-cta:hover {
  filter: brightness(0.95);
  color: var(--primary-ink);
}

.credit-gate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credit-gate-foot button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--subtle);
}

.credit-gate-foot button:hover {
  color: var(--text);
}

.credit-gate-foot span {
  font-size: 11.5px;
  color: var(--subtle);
}

/* En dessous de 468 px + les 36 px de gouttière de .modal, le panneau se
   resserre au lieu de déborder ; la ligne du bas passe en colonne pour que
   « Plus tard » garde une cible tactile correcte. Le titre y repasse sur deux
   lignes, ce qui est normal : c'est la largeur qui manque, pas la règle. */
@media (max-width: 504px) {
  .credit-gate .modal-panel.credit-gate-panel {
    padding: 26px 22px 22px;
  }

  .credit-gate-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ── Modale « Comprendre le verdict Lucide » (chantier verdict-spans, 28/08) ──
   Pédagogie du verdict : ce que le pourcentage mesure, les paliers, les limites.
   Volontairement sans aucun détail d'implémentation (voir le blade). */
.verdict-howto .modal-card { width: min(100%, 620px); }

.verdict-howto .vh-block { margin-bottom: 22px; }
.verdict-howto .vh-block:last-of-type { margin-bottom: 6px; }

.verdict-howto .vh-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.verdict-howto .vh-lede { margin: 0 0 12px; }

.verdict-howto .vh-caption {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Maquette de document : des lignes de texte, deux d'entre elles surlignées.
   Montre la composition sans exposer un vrai extrait. */
.verdict-howto .vh-doc {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2, transparent);
}

.verdict-howto .vh-line {
  height: 7px;
  border-radius: 4px;
  background: var(--border);
}

.verdict-howto .vh-line.short { width: 62%; }
.verdict-howto .vh-line.is-ai { background: #e07317; }
.verdict-howto .vh-line.is-human { background: var(--result-good, #158a42); opacity: .45; }

/* Échelle des paliers : une barre continue, pas des cases — le verdict est un
   continuum, la découper en boîtes suggérerait des seuils nets. */
.verdict-howto .vh-scale {
  display: flex;
  height: 8px;
  margin: 4px 0 14px;
  overflow: hidden;
  border-radius: 5px;
}

.verdict-howto .vh-seg.is-good { background: var(--result-good, #158a42); }
.verdict-howto .vh-seg.is-warn { background: #e0a017; }
.verdict-howto .vh-seg.is-danger { background: #e07317; }
.verdict-howto .vh-seg.is-danger-strong { background: var(--result-danger, #c6362a); }

.verdict-howto .vh-paliers,
.verdict-howto .vh-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.verdict-howto .vh-paliers .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
}

.verdict-howto .vh-paliers .dot.is-human { background: var(--result-good, #158a42); }
.verdict-howto .vh-paliers .dot.is-warning { background: #e07317; }
.verdict-howto .vh-paliers .dot.is-danger { background: var(--result-danger, #c6362a); }

.verdict-howto .vh-notes li {
  padding-left: 14px;
  border-left: 2px solid var(--border);
  color: var(--muted);
}

.verdict-howto .vh-notes b { color: var(--text); }

/* Confirmation de déclaration d'origine (chantier verdict-spans, 28/08). */
.verdict-declare .modal-card { width: min(100%, 480px); }

.verdict-declare .vd-claim {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--brand, #6c5ce7);
  border-radius: 0 8px 8px 0;
  background: var(--panel-2, rgba(108, 92, 231, .06));
  font-size: 14px;
  line-height: 1.5;
}

.verdict-declare .vd-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   Parrainage (« obtenez plus de crédits gratuitement »), 30/08
   ============================================================ */

/* Trois chiffres au lieu des deux de la page Crédits. Le repli mobile est
   redéclaré ici : la règle générique du média 920px ne bat pas
   `.balance-band.trois` (spécificité), il faut la même. */
.balance-band.trois {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 920px) {
  .balance-band.trois {
    grid-template-columns: 1fr;
  }
}

.parrainage-etapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

@media (max-width: 920px) {
  .parrainage-etapes {
    grid-template-columns: 1fr;
  }
}

.parrainage-etapes li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-muted);
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.parrainage-etapes li::before {
  counter-increment: etape;
  content: counter(etape);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}

.parrainage-etapes b {
  color: var(--text);
}

.parrainage-lien input {
  font-family: var(--mono);
  font-size: 13px;
}

/* Notation par étoiles. Les entrées sont posées de 5 à 1 et la ligne est
   inversée (row-reverse) : c'est ce qui permet d'allumer, en CSS seul,
   l'étoile choisie ET toutes celles à sa gauche — `~` ne regarde qu'en avant. */
.note-etoiles {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
}

.note-etoiles input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.note-etoiles label {
  cursor: pointer;
  padding: 0 2px;
  /* Ambre littéral et non var(--warning) : en thème clair ce jeton est un brun
     foncé (#b45309), qui ne se lit pas comme une étoile allumée. */
  color: var(--border-strong);
  font-size: 30px;
  line-height: 1.1;
}

.note-etoiles input:checked ~ label {
  color: #f59e0b;
}

/* Au survol, l'aperçu remplace la sélection : on éteint d'abord tout... */
.note-etoiles:hover input:checked ~ label {
  color: var(--border-strong);
}

/* ...puis on rallume jusqu'à l'étoile survolée (même spécificité, donc c'est
   l'ordre de ces deux règles qui tranche : ne pas les intervertir). */
.note-etoiles:hover label:hover,
.note-etoiles:hover label:hover ~ label {
  color: #f59e0b;
}

/* L'entrée est masquée : sans ceci, le parcours au clavier ne montre rien. */
.note-etoiles input:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.avis-depose {
  display: grid;
  gap: 8px;
}

.avis-depose .avis-note {
  color: #f59e0b;
  font-size: 20px;
  letter-spacing: 3px;
  line-height: 1;
}

.avis-depose blockquote {
  margin: 0;
  border-left: 3px solid var(--border);
  padding-left: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

/* Aperçu des crédits (barre latérale) : barre de COMPOSITION du solde, un
   segment par poche. Avant, un seul segment large de « crédits à vie / solde » :
   un client avec un Pass voyait une barre à moitié pleine sous son solde, ce
   qui se lit comme une consommation — et sa légende oubliait les crédits du
   Pass, donc le total ne tombait pas juste. */
.credit-bar {
  display: flex;
}

.credit-bar span {
  /* Ce sont les bouts de la barre qui sont arrondis (overflow: hidden sur la
     piste), pas chaque segment. */
  border-radius: 0;
}

.credit-bar .poche-pass {
  background: var(--warning);
}

.credit-bar .poche-drip {
  background: var(--primary);
}


/* Écran « Vérifier et lancer » (14/09) : en-tête compact, pages dépliables. */
.review-doc-head {
  display: flex;
  align-items: baseline;   /* titre et « N pages · M mots » sur la même ligne de base */
  gap: 12px;
  flex-wrap: wrap;
}

.review-doc-head h2 {
  margin: 0;
}

.review-doc-head .review-doc-meta {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.review-doc-head .review-doc-actions {
  margin-left: auto;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.review-doc.is-clickable {
  cursor: pointer;
}

.review-doc-toggle {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.review-doc-toggle:hover {
  text-decoration: underline;
}

.review-pages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.doc-thumb.is-selectable {
  position: relative;
  cursor: pointer;
}

.doc-thumb.is-selectable img,
.doc-thumb.is-selectable .doc-thumb-empty {
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.doc-thumb.is-selected img,
.doc-thumb.is-selected .doc-thumb-empty {
  box-shadow: 0 0 0 2px var(--primary);
}

.doc-thumb.is-excluded img,
.doc-thumb.is-excluded .doc-thumb-empty {
  opacity: 0.35;
  filter: grayscale(1);
}

.doc-thumb.is-excluded span {
  text-decoration: line-through;
}

.doc-thumb-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.doc-thumb-check svg {
  width: 14px;
  height: 14px;
}

.doc-thumb.is-excluded .doc-thumb-check {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border-strong);
}

.dropzone.compact {
  min-height: 0;
  padding: 14px 18px;
  grid-auto-flow: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.dropzone.compact svg {
  width: 22px;
  height: 22px;
}

.dropzone.compact strong {
  font-size: 15px;
}

.review-add-doc {
  margin: 4px 0 8px;
}

/* Barre d'avancement alimentée par le polling (3 s) : glisser d'une valeur à
   l'autre plutôt que sauter, la barre paraît continue. */
.progress-fill.is-live {
  transition: width 3s linear;
}

/* Sidebar : analyse en cours (texte collé ou document) — point qui pulse. */
.history-dot.is-pulsing {
  background: var(--primary);
  animation: spinner-dot-pulse 1s ease-in-out infinite;
}

.history-item.is-pending .history-meta {
  color: var(--primary);
  font-style: italic;
}

/* « Sélectionner tout » grisé = rien à faire, pas une attente : curseur normal. */
.review-pages-toolbar .button:disabled {
  cursor: default;
}

/* Grille de pages : les colonnes remplissent la largeur de la carte, la
   dernière colonne affleure le bord droit — aligné avec « Sélectionner tout ». */
.review-doc .doc-thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 12px;
}

.review-doc .doc-thumb,
.review-doc .doc-thumb img,
.review-doc .doc-thumb-empty {
  width: 100%;
}

.review-doc .doc-thumb img,
.review-doc .doc-thumb-empty {
  height: auto;
  aspect-ratio: 116 / 150;
}

/* Sélecteur de langue des écrans de connexion / inscription (01/10/2026). */
.auth-langues { display: flex; justify-content: center; gap: 14px; margin-top: 18px; font-size: 14px; }
.auth-langues a { color: inherit; opacity: .7; text-decoration: none; }
.auth-langues a:hover { opacity: 1; text-decoration: underline; }
.auth-langues a[aria-current] { opacity: 1; font-weight: 600; }

/* Mur de crédits en mots (13/10/2026) : v2/components/mur-credits.blade.php.
   La modale reprend la géométrie de .credit-gate ; seuls s'ajoutent le bouton
   (un <button>, là où .credit-gate-cta était un lien) et la ligne de gain. */
button.credit-gate-cta {
  width: 100%;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

button.credit-gate-cta:disabled {
  cursor: progress;
  opacity: .7;
}

.mur-credits .credit-gate-glyph svg {
  width: 20px;
  height: 20px;
}

.mur-credits-gain {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.mur-credits-bandeau,
.mur-credits-retour,
.mur-credits-contexte {
  align-items: center;
  margin-bottom: 18px;
}

.mur-credits-bandeau > svg,
.mur-credits-retour > svg,
.mur-credits-contexte > svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.mur-credits-bandeau strong,
.mur-credits-retour strong {
  color: var(--heading);
}

.mur-credits-bandeau p,
.mur-credits-retour p,
.mur-credits-contexte p {
  margin: 2px 0 0;
}

.mur-credits-bandeau .button,
.mur-credits-retour .button {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .mur-credits-bandeau,
  .mur-credits-retour {
    flex-wrap: wrap;
  }

  .mur-credits-bandeau .button,
  .mur-credits-retour .button {
    margin-left: 27px;
  }
}

/* ------------------------------------------------------------------ *
 * /choose-plan « 1A-1 » (14/10/2026) : le conseil selon le profil en  *
 * titre, puis toutes les formules côte à côte avec les mêmes lignes   *
 * (alignées d'une carte à l'autre par subgrid), la conseillée mise en *
 * avant. Vue : v2/pages/onboarding/partials/conseil-formule.blade.php *
 * Tout est préfixé .cf- ; couleurs par jetons (thème sombre compris). *
 * ------------------------------------------------------------------ */
.screen.auth-screen[data-page="choose-plan"]:has(.cf) {
  padding-bottom: 40px;
}

.cf {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 80px 0 24px;
  color: var(--text);
  text-align: left;
}

.cf-tete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.cf-tete h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cf-tete p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* La rangée : chaque carte occupe 12 lignes de la grille (tête, prix,
   documents, les 8 fonctions, achat) via subgrid, si bien qu'une même ligne
   tombe à la même hauteur dans toutes les cartes, même quand un libellé
   passe sur deux lignes dans l'une d'elles. */
.cf-grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 14px;
  width: 100%;
  padding-top: 14px;
}

.cf-carte {
  position: relative;
  display: grid;
  grid-row: span 12;
  grid-template-rows: subgrid;
  padding: 24px 20px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cf-carte.is-conseil {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 16px 40px color-mix(in srgb, var(--primary) 16%, transparent);
}

.cf-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cf-carte-tete,
.cf-carte-prix {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cf-carte-tete strong {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.cf-micro {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.cf-prix {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cf-montant {
  color: var(--heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.cf-periode {
  color: var(--muted);
  font-size: 14px;
}

.cf-credits {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.cf-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.cf-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 48px;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cf-option[aria-pressed="true"] {
  padding: 6px 10px;
  border: 2px solid var(--primary);
  background: var(--primary-soft);
}

.cf-option-prix {
  font-size: 15px;
  font-weight: 700;
}

.cf-option-libelle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* Ligne « en documents » : bleue quand le document du profil passe. */
.cf-equivalent {
  align-self: start;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.cf-equivalent.is-off {
  border-color: var(--border);
  background: var(--panel-muted);
  color: var(--muted);
}

.cf-fonctions {
  display: grid;
  grid-row: span 8;
  grid-template-rows: subgrid;
  row-gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cf-fonctions li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  line-height: 1.4;
}

.cf-fonctions svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--success);
}

.cf-fonctions li.is-off,
.cf-fonctions li.is-off svg {
  color: var(--subtle);
}

.cf-carte-achat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-self: end;
}

.cf-carte-achat form {
  margin: 0;
}

.button.cf-cta {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
  text-align: center;
}

.button.cf-cta.secondary {
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
}

/* Paiement à l'année : un lien discret sous le bouton, même formule. */
.cf-annuel {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cf-annuel:hover {
  text-decoration-thickness: 2px;
}

/* Pass 30 jours : bandeau horizontal sous les abonnements, de leur largeur,
   comme sur l'ancienne grille : l'offre et ses lignes (les mêmes que les
   cartes, sur deux colonnes) à gauche, le prix et l'achat à droite. */
.cf-pass {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cf-pass-offre,
.cf-pass-achat {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cf-pass-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: 3px;
}

.cf-pass .cf-fonctions {
  display: grid;
  grid-row: auto;
  grid-template-rows: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 20px;
}

.cf-pass-achat {
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.cf-pass .cf-options {
  margin-top: 0;
}

/* Une colonne, comme les cartes au-dessus. */
@media (max-width: 820px) {
  .cf-pass {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 22px 20px 20px;
  }

  .cf-pass-achat {
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .cf-pass .cf-fonctions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Garanties : trois engagements déjà écrits dans les CGV et l'aide. */
.cf-garanties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cf-garanties li {
  display: flex;
  gap: 12px;
  padding: 18px;
}

.cf-garanties li + li {
  border-left: 1px solid var(--border);
}

.cf-garantie-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}

.cf-garanties div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cf-garanties strong {
  font-size: 14px;
}

.cf-garanties div span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Une colonne : la formule conseillée passe en premier. */
@media (max-width: 820px) {
  .cf-grille {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
    margin: 0 auto;
    row-gap: 28px;
  }

  .cf-grille .cf-carte {
    display: flex;
    flex-direction: column;
    gap: 14px;
    grid-row: auto;
  }

  .cf-grille .cf-fonctions {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .cf-carte.is-conseil {
    order: -1;
  }
}

@media (max-width: 640px) {
  .cf {
    gap: 22px;
    padding-top: 24px;
  }

  .cf-garanties {
    grid-template-columns: minmax(0, 1fr);
  }

  .cf-garanties li + li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* ---- public/v2/kit-5a.css ---- */
/* Kit UI 5a — surcouche palette du design system v2 (accent seul, sobre).
   ---------------------------------------------------------------------------
   Chargée APRÈS redesign.css dans les layouts v2 : SEULS les tokens ci-dessous
   sont redéfinis (les `:root`/`body.dark` d'ici gagnent par ordre de cascade).
   redesign.css reste INCHANGÉ.

   Rollback facile : retirer la ligne <link ... kit-5a.css> des 4 layouts v2
   (app / admin / auth / public), ou `git revert` du commit, puis
   `php artisan view:cache`. Aucune autre trace.

   Périmètre (choix Thomas, 19/07/2026) — « accent seul » :
   - Accent : bleu #2563EB → violet kit #6D5CF6 (liens, boutons, focus, onglets,
     chips actifs, anneaux de focus…). 0 bleu hardcodé ailleurs dans le design
     system ni dans les 76 vues → toute l'app suit via var(--primary).
   - Neutres alignés exactement au kit (border / ink / muted / subtle) : écart
     quasi invisible, cohérence avec la landing.
   - INCHANGÉ volontairement :
       • fond de l'app (--bg / --panel / --sidebar restent clairs) — c'est le
         choix « sobre », pas la crème du marketing ;
       • radius 8px (le kit met 16px sur les CARTES marketing ; l'app a des
         petits contrôles où 16px casserait la maille) ;
       • couleurs de verdict (--success / --warning / --danger + --result-*) :
         elles restent le seul vert / ambre / rouge, ce qui EST la règle du kit.
*/

:host {
  --primary: #6d5cf6;
  --primary-soft: #f1eefe;
  --border: #ede9dc;
  --border-strong: #d6d1c0;
  --text: #20242e;
  --muted: #6f7480;
  --subtle: #8a8f99;
}

:host(.dark),
:host(.dark) {
  --primary: #8b7cf7;
  --primary-soft: #201b33;
}

/* ---- public/v2/spans.css ---- */
/* ============================================================
   Surlignage par phrases (spans_v1) — panneau « Texte analysé ».
   Convention (type Pangram, spec 25/07) :
   - passages IA (zones >= 2 phrases) : surlignés orange par défaut
   - phrases humaines : vert uniquement au survol (ou filtre "Contenu humain")
   - douteux / segments courts : classés humains, jamais orange
   S'appuie sur les tokens de redesign.css (--tip-*, --panel, --border…).
   NB : les <input> de l'app sont stylés comme des champs texte (width:100%) ;
   la case du dropdown est re-normalisée plus bas.
   ============================================================ */

:host {
  --hl-ai-bg: rgba(236, 138, 61, 0.26);
  --hl-ai-bg-strong: rgba(233, 126, 42, 0.44);
  --hl-ai-line: rgba(197, 101, 28, 0.55);
  --hl-h-bg: rgba(67, 188, 106, 0.18);
  --hl-h-bg-strong: rgba(52, 176, 92, 0.34);
  --hl-h-line: rgba(21, 138, 66, 0.5);
  /* « moins humain » : gris neutre, ni orange (= IA) ni vert (= humain confirmé).
     Sert au verdict HUMAIN, où le passage montré n'est pas une accusation. */
  --hl-soft-bg: rgba(120, 132, 158, 0.20);
  --hl-soft-bg-strong: rgba(112, 124, 150, 0.32);
  --hl-soft-line: rgba(96, 108, 134, 0.5);
}
:host(.dark), :host(.dark) {
  --hl-ai-bg: rgba(240, 146, 70, 0.3);
  --hl-ai-bg-strong: rgba(246, 155, 79, 0.46);
  --hl-ai-line: rgba(246, 155, 79, 0.6);
  --hl-h-bg: rgba(74, 200, 118, 0.2);
  --hl-h-bg-strong: rgba(85, 210, 128, 0.36);
  --hl-h-line: rgba(85, 210, 128, 0.55);
  --hl-soft-bg: rgba(152, 164, 190, 0.22);
  --hl-soft-bg-strong: rgba(162, 174, 200, 0.34);
  --hl-soft-line: rgba(172, 184, 210, 0.55);
}

/* ---- carte texte ---- */
.hl-card { padding: 26px 30px; }
/* Variante rapport public : le <section class="panel"> fournit déjà fond,
   bordure et padding — on n'ajoute qu'un rythme vertical. */
.hl-card-plain { display: block; }
.hl-card-plain .hl-doc { max-height: none; }   /* rapport = document à lire en entier */
.hl-card-plain .hl-legend { margin-top: 16px; }

.hl-doc {
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-height: 640px;
  overflow-y: auto;
}

.hl-sent {
  border-radius: 4px;
  padding: 2px 1px;
  margin: -2px -1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-color 0.13s ease, box-shadow 0.13s ease;
  cursor: default;
}

/* IA : orange par défaut quand le filtre est actif */
.hl-doc.show-ai .hl-sent[data-cls="ai"] {
  background: var(--hl-ai-bg);
  box-shadow: inset 0 -2px 0 var(--hl-ai-line);
}
/* « Moins humain » (verdict humain) : gris neutre, JAMAIS l'orange IA. Le verdict
   affiche 0 % d'IA au-dessus du texte — un aplat orange le contredirait à l'écran.
   Même filtre que l'IA (case « Moins humain » du dropdown), donc même .show-ai. */
.hl-doc.show-ai .hl-sent[data-cls="soft"] {
  background: var(--hl-soft-bg);
  box-shadow: inset 0 -2px 0 var(--hl-soft-line);
}
/* Humain : surligné en permanence seulement si le filtre est coché */
.hl-doc.show-human .hl-sent[data-cls="human"] {
  background: var(--hl-h-bg);
  box-shadow: inset 0 -2px 0 var(--hl-h-line);
}
/* Au survol : la phrase se révèle toujours dans sa couleur (tooltip à l'appui) */
.hl-doc .hl-sent[data-cls="ai"]:hover {
  background: var(--hl-ai-bg-strong);
  box-shadow: inset 0 -2px 0 var(--hl-ai-line);
}
.hl-doc .hl-sent[data-cls="soft"]:hover {
  background: var(--hl-soft-bg-strong);
  box-shadow: inset 0 -2px 0 var(--hl-soft-line);
}
.hl-doc .hl-sent[data-cls="human"]:hover,
.hl-doc .hl-sent[data-cls="short"]:hover {
  background: var(--hl-h-bg-strong);
  box-shadow: inset 0 -2px 0 var(--hl-h-line);
}

/* ---- repli : zone V14 (résolution ~165 mots) ----
   DÉLIBÉRÉMENT différent du surlignage par phrase : hachures + bord pointillé,
   pas d'aplat franc. Un bloc orange plein de 330 mots se lit comme « ces mots-là
   sont IA » ; ici on ne sait qu'« autour d'ici ». Le rendu doit le dire. */
.hl-zone {
  background: var(--hl-ai-bg);
  box-shadow: inset 0 -2px 0 var(--hl-ai-line);
  border-radius: 4px;
  padding: 2px 1px;
  margin: -2px -1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hl-dot.zone {
  background: var(--hl-ai-bg);
  box-shadow: inset 0 0 0 1px var(--hl-ai-line);
}

/* ---- tooltip ---- */
.hl-tooltip {
  position: fixed;
  z-index: 90;
  max-width: 300px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--tip-bg, #232936);
  color: var(--tip-text, #f4f4f5);
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(15, 18, 24, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}
.hl-tooltip.is-visible { opacity: 1; transform: translate(-50%, 0); }
.hl-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
.hl-tooltip strong { font-weight: 650; }
.hl-tooltip .hl-tip-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: 1px;
}
.hl-tooltip .hl-tip-dot.ai { background: #f09246; }
.hl-tooltip .hl-tip-dot.human { background: #4ac876; }
.hl-tooltip .hl-tip-dot.soft { background: #93a0b8; }

/* ---- contrôles (dropdown "Surlignage") ---- */
.hl-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hl-dropdown { position: relative; }
.hl-dropdown > button .hl-caret { margin-left: 2px; }
.hl-dropdown-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 70;
  min-width: 178px;
  display: grid;
  gap: 1px;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.hl-dropdown-pop label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.hl-dropdown-pop label:hover { background: var(--hover); }
/* L'app style TOUS les <input> comme des champs texte (width:100%, padding,
   bordure) -> la case ferait 90 px. On remet une case native compacte. */
.hl-dropdown-pop input[type="checkbox"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  accent-color: #6d5cf6;
  cursor: pointer;
}
.hl-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
.hl-dot.ai { background: #f09246; }
.hl-dot.human { background: #4ac876; }
.hl-dot.soft { background: #93a0b8; }

/* ---- légende ---- */
.hl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.hl-legend span { display: inline-flex; align-items: center; gap: 7px; }

/* ---- resources/marketing/detecteur-app/shell.css ---- */
/* ==========================================================================
   Ajouts propres à la copie non connectée de l'app (bras B du test
   « detecteur-app »). Concaténé APRÈS les feuilles de l'app par le build, dans
   la racine fantôme (shadow root) : rien d'ici ne touche la page autour.
   Tout le reste du dessin vient tel quel de public/v2 — ne pas réécrire ici un
   style de l'app, le corriger là-bas et relancer le build.
   ========================================================================== */

/* L'hôte remplace le <body> de l'app. Le build place EN TÊTE de la feuille un
   `:host { all: initial }` qui coupe ce que la page marketing lui ferait
   hériter (police, interlignage, alignement…) ; le `body` de l'app, devenu
   `:host`, repose ensuite les bonnes valeurs, et ceci vient en dernier. */
:host {
  display: block;
  position: relative;
  z-index: 30;
  text-align: left;
}

/* Liste blanche du test Pass 30 jours : la page pose data-pv sur l'hôte. */
:host([data-pv="B"]) [data-pass-only],
:host(:not([data-pv="B"])) [data-pass-alt] {
  display: none;
}

/* Titre de page : dessin du h1 de l'app. Sur l'écran de saisie c'est le H1
   de la page (« Détecteur IA 100 % francophone », recette Thomas 18/10) ; sur
   l'écran résultat, le titre de l'analyse, en h2. */
.da-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-head.compact .da-title {
  font-size: clamp(24px, 3vw, 34px);
}

/* Pied de la barre latérale : les deux boutons du visiteur à la place de la
   carte utilisateur. */
.da-guest {
  display: grid;
  gap: 8px;
}

.da-guest .button {
  justify-content: center;
  width: 100%;
}

/* Exemples sous la zone de saisie. */
.da-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.da-examples span {
  margin-right: 2px;
}

.da-examples .chip {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.da-examples .chip:hover,
.da-examples .chip.is-active {
  border-color: var(--primary);
  color: var(--primary);
}

/* Bloc de conversion à droite de la saisie : fond violet de la marque, qui
   tranche avec l'app (claire et neutre) ; le gratuit en retrait, le premium
   en clair, le bouton en blanc. */
.context-panel.da-offre {
  top: 24px;
  gap: 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(160deg, #7a6af8 0%, #5b48e6 55%, #3f2ec2 100%);
  box-shadow: 0 28px 60px -30px rgba(70, 52, 200, 0.75);
  padding: 20px;
  color: #ffffff;
}

.da-offre h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: inherit;
  font-size: 15px;
}

.da-offre ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.da-offre li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.4;
}

.da-offre li svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.da-offre-gratuit {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.da-offre-gratuit li svg {
  color: rgba(255, 255, 255, 0.5);
}

.da-offre-premium h2 svg {
  width: 17px;
  height: 17px;
  color: #ffd27a;
}

.da-offre-premium li {
  font-weight: 550;
}

.da-offre-premium li svg {
  color: #55e3a5;
}

.da-offre-premium li:last-child {
  font-weight: 400;
  opacity: 0.8;
}

.da-offre-cta {
  display: block;
  margin-top: 18px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px -12px rgba(20, 12, 80, 0.6);
  padding: 12px 16px;
  color: #3f2ec2;
  font-weight: 750;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.da-offre-cta:hover {
  color: #3f2ec2;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(20, 12, 80, 0.7);
}

/* Carte plagiat de l'écran résultat : au repos et verrouillée, pendant
   l'analyse comme après — fond grisé, contenu estompé (règle .is-locked de
   l'app), pas d'ombre, anneau réduit. */
.score-panel.da-plagiat-verrou {
  border-color: var(--border);
  background: var(--panel-muted);
  box-shadow: none;
  justify-content: center;
}

.score-panel.da-plagiat-verrou:hover {
  border-color: var(--border-strong);
}

.da-plagiat-verrou .lc-lock-badge {
  top: 22px;
  right: 22px;
}

.da-plagiat-verrou .card-head {
  position: absolute;
  top: 26px;
  left: 26px;
  width: auto;
}

.da-plagiat-verrou .score-ring {
  width: 120px;
  height: 120px;
}

.da-plagiat-verrou h2 {
  color: var(--muted);
  font-size: 17px;
}

/* Confiance du gratuit, mise en avant dans la carte du score (recette Thomas
   18/10) : « Confiance faible » et sa raison, avec un lien vers les textes
   longs. Couleurs des pastilles d'avertissement de l'app. */
.da-confiance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border));
  border-radius: 12px;
  background: var(--warning-soft);
  padding: 12px 14px;
  color: var(--warning);
  text-align: left;
}

.da-confiance > svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.da-confiance strong,
.da-confiance span {
  display: block;
}

.da-confiance strong {
  font-size: 14px;
}

.da-confiance span {
  margin-top: 2px;
  color: var(--text);
  font-size: 13.5px;
}

.da-confiance a {
  display: inline-block;
  margin-top: 6px;
  color: var(--warning);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Bloc d'incitation de la vue résultat : même violet que le bloc de la
   saisie (.da-offre), en largeur, entre les cartes et le texte analysé. */
.da-offre-resultat {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7a6af8 0%, #5b48e6 55%, #3f2ec2 100%);
  box-shadow: 0 28px 60px -30px rgba(70, 52, 200, 0.75);
  padding: 26px 28px;
  color: #ffffff;
}

.da-offre-resultat[hidden] {
  display: none;
}

.da-offre-resultat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd27a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.da-offre-resultat-badge svg {
  width: 15px;
  height: 15px;
}

.da-offre-resultat h3 {
  margin: 8px 0 0;
  color: inherit;
  font-size: 22px;
  line-height: 1.25;
}

.da-offre-resultat p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.5;
}

.da-offre-resultat ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.da-offre-resultat li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}

.da-offre-resultat li svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #55e3a5;
}

.da-offre-resultat li.da-offre-plus {
  font-weight: 400;
  opacity: 0.8;
}

.da-offre-resultat-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 220px;
}

.da-offre-resultat .da-offre-cta {
  width: 100%;
  margin-top: 0;
}

.da-offre-prix {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 1100px) {
  .da-offre-resultat {
    grid-template-columns: minmax(0, 1fr);
  }

  .da-offre-resultat-action {
    width: 100%;
  }
}

.da-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Texte analysé, en gratuit : la première phrase en clair, le reste flouté
   avec des surlignages devinables, et le verrou posé dessus — même principe
   que l'aperçu premium de la page actuelle (.premium-teaser-sample). Les
   phrases surlignées sous le flou ne sont PAS celles du moteur (le gratuit
   ne les reçoit pas) : leur part suit seulement la part IA du verdict. */
.da-hl-card {
  position: relative;
}

.da-hl-doc {
  max-height: 420px;
}

/* Hauteur plancher : sur un texte court, le verrou dépassait du texte et
   se faisait couper net (recette Thomas 18/10). Marge négative + padding : le
   flou déborde des lettres d'une dizaine de pixels, il doit pouvoir s'étaler
   avant le bord de la zone, sinon il est rogné en arête vive. */
.da-hl-doc.is-flou {
  min-height: 300px;
  max-height: 380px;
  margin: -14px;
  padding: 14px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent);
  mask-image: linear-gradient(to bottom, #000 45%, transparent);
}

.da-hl-doc .da-flou {
  filter: blur(5px);
  user-select: none;
}

.da-hl-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 30px 70px -30px rgba(28, 33, 51, 0.45);
  padding: 22px 22px 20px;
  text-align: center;
}

.da-hl-lock[hidden] {
  display: none;
}

.da-hl-lock-glyph {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.da-hl-lock strong {
  color: var(--text);
  font-size: 16px;
}

.da-hl-lock > span:not(.da-hl-lock-glyph) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.da-hl-lock .button {
  justify-content: center;
  width: 100%;
  margin-top: 6px;
}

/* Les infobulles des segments verrouillés (« Depuis une URL »…) dépassent à
   droite sur téléphone et faisaient défiler toute la page de côté. `clip` et
   non `hidden` : la barre latérale et la barre du haut restent collantes. */
.app-shell {
  overflow-x: clip;
}

/* Barre du haut retirée sur ordinateur (recette Thomas, 16/10) : elle ne sert
   qu'au bouton du menu, qui n'existe que sous 920 px. */
@media (min-width: 921px) {
  .topbar {
    display: none;
  }
}

@media (max-width: 640px) {
  /* « N passages IA repérés » et le bouton verrouillé « Surlignage » : sur deux
     lignes plutôt que coupés au bord de l'écran. */
  .hl-controls {
    flex-wrap: wrap;
  }
}
