/* ==========================================================================
   LET'S EUDAMED — COUCHE DE DESIGN (refonte 2026-11)

   Chargée APRÈS style.css par les trois socles (public_base, base,
   admin_base). style.css garde la structure et l'historique de ses
   correctifs ; ce fichier fixe le LANGAGE visuel commun, et lui seul :

     1. Matière   : surfaces pleines, filets nets, ombres discrètes. Plus de
                    verre dépoli ni de dégradés teintés sur les panneaux de
                    travail -- un écran réglementaire se lit, il ne brille pas.
     2. Mouvement : aucune animation décorative en boucle. Restent les
                    transitions de survol et les mouvements qui portent un
                    sens (visite produit du héros, chargement).
     3. Contrôles : une hauteur, un rayon, un anneau de focus pour tous les
                    boutons et champs, dans les deux thèmes.
     4. Essai     : l'action « Essai gratuit » est visible à toutes les
                    largeurs, y compris dans l'en-tête mobile.

   Règle d'écriture : uniquement des jetons (var(--…)). Les valeurs
   littérales n'apparaissent que dans les blocs qui DÉFINISSENT un thème.
   Aucune règle ici ne masque de contenu ni ne change un texte.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. JETONS
   -------------------------------------------------------------------------- */
:root {
  --ds-radius-control: 8px;
  --ds-radius-card: 12px;
  --ds-radius-panel: 14px;
  --ds-control-h: 44px;
  --ds-control-h-sm: 36px;

  /* Anneau de focus : 3:1 minimum contre les deux fonds (WCAG 2.2, 1.4.11). */
  --ds-focus: var(--c-brand-500);
  --ds-focus-ring: 0 0 0 3px color-mix(in srgb, var(--c-brand-500) 28%, transparent);

  /* Surfaces de travail (espace connecté) — thème clair */
  --ds-canvas: var(--c-ink-50);
  --ds-panel: #ffffff;
  --ds-panel-sub: var(--c-ink-50);
  --ds-line: var(--c-ink-200);
  --ds-line-strong: var(--c-ink-300);
  --ds-line-accent: var(--c-brand-300);
  --ds-field: #ffffff;
  --ds-shadow: 0 1px 2px rgba(13, 47, 71, .05), 0 1px 1px rgba(13, 47, 71, .03);
  --ds-shadow-hover: 0 6px 18px -8px rgba(13, 47, 71, .22);

  /* Action principale : bleu marque plein, sombre dans les deux thèmes
     (le texte blanc y tient 6,4:1). */
  --ds-primary: #1d6295;
  --ds-primary-hover: #175078;
  --ds-on-primary: #ffffff;

  /* Bandeau d'essai */
  --ds-trial-bg: var(--c-brand-50);
  --ds-trial-line: var(--c-brand-200);
  --ds-trial-tag-bg: #12795b;
  --ds-trial-tag-ink: #ffffff;
}
:root[data-theme="dark"] {
  --ds-focus: #6cb2ea;
  --ds-focus-ring: 0 0 0 3px rgba(108, 178, 234, .32);
  --ds-canvas: #0f171e;
  --ds-panel: #151f28;
  --ds-panel-sub: #111a22;
  --ds-line: #26343f;
  --ds-line-strong: #34444f;
  --ds-line-accent: #3d6684;
  --ds-field: #0f171e;
  --ds-shadow: 0 1px 2px rgba(0, 0, 0, .28);
  --ds-shadow-hover: 0 10px 24px -12px rgba(0, 0, 0, .6);
  --ds-primary: #1f6aa5;
  --ds-primary-hover: #2a7bba;
  --ds-trial-bg: #0d2233;
  --ds-trial-line: #1d4763;
  --ds-trial-tag-bg: #12795b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ds-focus: #6cb2ea;
    --ds-focus-ring: 0 0 0 3px rgba(108, 178, 234, .32);
    --ds-canvas: #0f171e;
    --ds-panel: #151f28;
    --ds-panel-sub: #111a22;
    --ds-line: #26343f;
    --ds-line-strong: #34444f;
    --ds-line-accent: #3d6684;
    --ds-field: #0f171e;
    --ds-shadow: 0 1px 2px rgba(0, 0, 0, .28);
    --ds-shadow-hover: 0 10px 24px -12px rgba(0, 0, 0, .6);
    --ds-primary: #1f6aa5;
    --ds-primary-hover: #2a7bba;
    --ds-trial-bg: #0d2233;
    --ds-trial-line: #1d4763;
    --ds-trial-tag-bg: #12795b;
  }
}

/* --------------------------------------------------------------------------
   2. FONDATIONS — focus, typographie, mouvement
   -------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; }

/* Un seul anneau de focus clavier, partout. `:focus-visible` seulement :
   un clic souris ne laisse pas de cadre, la tabulation en montre un. */
:where(a, button, summary, [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
  border-radius: max(var(--r-xs), 4px);
}
:where(input, select, textarea):focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 1px;
}
/* La zone principale reçoit le focus via le lien d'évitement : pas de
   cadre autour de toute la page. */
main[tabindex="-1"]:focus { outline: none; }

/* Titres : interlignage serré, césure propre, jamais de veuve sur deux mots. */
:where(h1, h2, h3) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }

/* Mouvement décoratif retiré. Les éléments ci-dessous bouclaient en
   permanence (reflets de bouton, chiffres « qui respirent », étiquettes
   flottantes, lignes de balayage) : autant de signaux qui ne disent rien et
   détournent l'œil des données. Les transitions de survol restent. */
.public-site .market-kicker > span::after,
.public-site .blueprint-layer,
.public-site .market-primary::before,
.public-site .market-ghost::before,
.public-site .marketing-cta::before,
.public-site .market-primary span,
.public-site .desktop-secondary-link span,
.public-site .home-guide-card a span,
.public-site .market-capabilities article::after,
.public-site .workflow-track article::after,
.public-site .project-phases article::after,
.public-site .market-capabilities strong,
.public-site .home-visual-media video,
.public-site .problem-photo img,
.public-site .market-approach .approach-image,
.public-site .approach-tag,
.public-site .workflow-arrow,
.public-site .market-demo-diagram,
.public-site .transform-arrow,
.public-site .validation-window::after,
.public-site .rule-source-bar i::after,
.public-site .desktop-mini-line,
.public-site .return-steps::before,
.public-site .audience-flow li::before,
.public-site .home-guide-card::before,
.public-site .module-nav-item.is-active .module-nav-icon,
.public-site .module-op-status,
body.user-shell .module-header-icon,
body.user-shell :is(.admin-users-hero-icon, .xsd-admin-hero-icon) {
  animation: none !important;
}
.public-site .market-primary::before,
.public-site .market-ghost::before,
.public-site .marketing-cta::before,
.public-site .market-capabilities article::after,
.public-site .workflow-track article::after,
.public-site .project-phases article::after,
.public-site .validation-window::after,
.public-site .home-guide-card::before,
.public-site .market-kicker > span::after { content: none; }
.public-site .home-visual-media video,
.public-site .problem-photo img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   3. CONTRÔLES — boutons
   -------------------------------------------------------------------------- */
/* Gabarit commun à tous les boutons : même hauteur minimale, même rayon,
   même graisse. Les variantes ne changent que la couleur. */
:is(.btn, .market-primary, .market-ghost, .marketing-cta, .marketing-login) {
  border-radius: var(--ds-radius-control);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
/* Cible tactile : 44 px pour les boutons standards ; les petits boutons de
   tableau (.btn-sm) gardent leur gabarit compact, 32 px minimum. */
.btn:not(.btn-sm) { min-height: var(--ds-control-h); }
.btn.btn-sm { min-height: 32px; }
:is(.btn, .market-primary, .market-ghost, .marketing-cta, .marketing-login):hover { transform: none; filter: none; }
:is(.btn, .market-primary, .market-ghost, .marketing-cta, .marketing-login):focus-visible {
  outline: 2px solid var(--ds-focus);
  outline-offset: 2px;
  box-shadow: var(--ds-focus-ring);
}

/* Action principale : aplat plein, sans dégradé ni reflet. */
.market-primary,
.marketing-cta,
.responsive-nav-primary,
body.user-shell .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger):not(.btn-secondary):not(.btn-link) {
  border: 1px solid transparent;
  background: var(--ds-primary);
  color: var(--ds-on-primary);
  box-shadow: 0 1px 2px rgba(13, 47, 71, .18);
}
.market-primary:hover,
.marketing-cta:hover,
.responsive-nav-primary:hover,
body.user-shell .btn:not(.btn-outline):not(.btn-ghost):not(.btn-danger):not(.btn-secondary):not(.btn-link):hover {
  background: var(--ds-primary-hover);
  color: var(--ds-on-primary);
  box-shadow: 0 4px 12px -4px rgba(13, 47, 71, .35);
}

/* Action secondaire : contour, fond de carte. */
.market-ghost,
.marketing-login,
body.user-shell :is(.btn-outline, .btn-ghost, .btn-secondary) {
  border: 1px solid var(--ds-line-strong);
  background: var(--card);
  color: var(--primary-ink);
  box-shadow: none;
}
.market-ghost:hover,
.marketing-login:hover,
body.user-shell :is(.btn-outline, .btn-ghost, .btn-secondary):hover {
  border-color: var(--ds-line-accent);
  background: var(--primary-tint);
  color: var(--primary-ink);
}
body.user-shell .btn-ghost { color: var(--text-muted); }
body.user-shell .btn-ghost:hover { color: var(--text); }

/* Le bouton désactivé ne doit pas ressembler à un bouton actif pâli
   par erreur : opacité nette + curseur. */
:is(.btn, .market-primary, .market-ghost):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   4. CONTRÔLES — champs de saisie
   -------------------------------------------------------------------------- */
/* Les règles de base des champs (style.css) restent l'autorité : plusieurs
   composants posent un champ SANS bordure dans un cadre (connexion, listes
   à filtre, recherche). Ici seulement ce qui vaut partout. */
:where(input, textarea, select):disabled { cursor: not-allowed; }
::placeholder { color: var(--text-faint); opacity: 1; }

/* L'espace connecté posait un fond teinté semi-transparent sur TOUS les
   champs : en thème clair système (sans bascule explicite), il tombait sur
   un gris-bleu soutenu qui faisait passer chaque champ actif pour un champ
   désactivé. Un champ éditable est blanc. */
body.user-shell :is(input[type=text], input[type=email], input[type=password], input[type=tel],
    input[type=number], input[type=search], input:is([type=date], [type=datetime-local]), textarea, select) {
  border-color: var(--ds-line-strong);
  background-color: var(--ds-field);
  box-shadow: none;
}
body.user-shell :is(input[type=text], input[type=email], input[type=password], input[type=tel],
    input[type=number], input[type=search], input:is([type=date], [type=datetime-local]), textarea, select):focus {
  border-color: var(--c-brand-500);
  box-shadow: var(--ds-focus-ring);
}
body.user-shell :is(input, textarea, select):disabled { background-color: var(--ds-panel-sub); }

/* Zone de dépôt : une cible, pas un bloc gris. */
body.user-shell .file-drop-zone {
  border: 1.5px dashed var(--ds-line-accent);
  background: var(--ds-panel-sub);
  color: var(--primary-ink);
}
body.user-shell .file-drop-zone:hover,
body.user-shell .file-drop-zone:focus-within,
body.user-shell .file-drop-zone.is-dragover {
  border-color: var(--c-brand-500);
  background: var(--primary-tint);
  box-shadow: none;
}

/* Libellés : contraste plein, graisse moyenne. */
:where(label) { color: var(--text); }

/* Groupes de champs : un fond à peine retiré, un filet, la légende en
   titre de groupe. */
body.user-shell .pullform-group {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-panel-sub);
}
body.user-shell .pullform-group > legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 650;
}
/* Aide sous un champ : texte courant, pas de monospace — c'est une phrase. */
body.user-shell .field-hint-meta {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   5. EN-TÊTE PUBLIC ET BANDEAU D'ESSAI
   -------------------------------------------------------------------------- */
.marketing-header {
  background: color-mix(in srgb, var(--card) 96%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.marketing-header.is-scrolled { box-shadow: 0 1px 0 var(--border), 0 6px 16px -12px rgba(13, 47, 71, .28); }
.marketing-links a { font-weight: 500; color: var(--text); }
.marketing-links a:hover { color: var(--primary-ink); }

/* L'appel à l'action « Essai gratuit » restait masqué sous 720 px : le
   visiteur mobile n'avait plus que le hamburger pour le trouver. Il revient
   dans l'en-tête, compact ; seul « Se connecter » part dans le menu (il y
   figure déjà). */
@media (max-width: 720px) {
  .marketing-actions > .marketing-cta {
    display: inline-flex;
    min-height: 38px;
    padding: 0 12px;
    font-size: .82rem;
    white-space: nowrap;
  }
  .marketing-actions .util-btn,
  .marketing-actions .lang-switcher-trigger-icon { width: 36px; height: 36px; }
  .marketing-brand .brand-logo { width: 100px; }
  .marketing-header-inner { gap: 6px; padding-inline: 12px; }
  .marketing-actions, .marketing-actions .public-utils { gap: 4px; }
}
@media (max-width: 374px) {
  /* Écrans très étroits (320 px) : le sélecteur de thème cède sa place au
     bouton d'essai ; le thème système continue de s'appliquer. */
  .marketing-actions .theme-toggle { display: none; }
  .marketing-brand .brand-logo { width: 92px; }
}

/* Bandeau d'essai : une ligne, aligné à gauche sur la grille de la page,
   étiquette en tête. Sur mobile il occupait 170 px avant le premier titre. */
.beta-banner {
  justify-content: center;
  gap: 6px 12px;
  padding: 10px var(--gutter);
  background: var(--ds-trial-bg);
  border-bottom: 1px solid var(--ds-trial-line);
  font-size: .875rem;
  line-height: 1.45;
  color: var(--text);
}
:root[data-theme="dark"] .beta-banner { background: var(--ds-trial-bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .beta-banner { background: var(--ds-trial-bg); }
}
.beta-banner-tag {
  flex: none;
  padding: 3px 9px;
  border-radius: var(--r-xs);
  background: var(--ds-trial-tag-bg);
  color: var(--ds-trial-tag-ink);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.beta-banner-text { max-width: 92ch; }
.beta-banner a { color: var(--primary-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 720px) {
  /* Bloc et non flex : l'étiquette s'insère en tête de la première ligne
     et le texte coule autour, sur toute la largeur. */
  .beta-banner {
    display: block;
    text-align: left;
    padding: 9px 16px;
    font-size: .8rem;
    line-height: 1.45;
  }
  .beta-banner-tag {
    display: inline-block;
    margin-right: 6px;
    font-size: .62rem;
    padding: 1px 6px;
    vertical-align: 1px;
  }
}

/* --------------------------------------------------------------------------
   5 bis. FORMULAIRES D'ACCÈS (création de compte, connexion)
   -------------------------------------------------------------------------- */
/* Bouton d'envoi : même bleu que l'appel à l'action de l'en-tête. Il
   portait un bleu plus clair, ce qui faisait de la page d'essai la seule où
   l'action principale paraissait secondaire. */
.auth-submit {
  min-height: var(--ds-control-h);
  border-radius: var(--ds-radius-control);
  background: var(--ds-primary);
  color: var(--ds-on-primary);
  font-weight: 600;
}
.auth-submit:hover:not(:disabled) { background: var(--ds-primary-hover); }
.auth-submit:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }

/* Choix « Test / Production » : deux options de même largeur, côte à
   côte, au lieu de deux pastilles de tailles différentes sur deux lignes. */
.auth-choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.auth-choice-group > legend { grid-column: 1 / -1; }
.auth-choice-group > label {
  margin: 0;
  min-height: var(--ds-control-h);
  align-items: center;
}
.auth-choice-group > label:has(input:checked) {
  border-color: var(--c-brand-500);
  background: var(--primary-tint);
}
@media (max-width: 420px) {
  .auth-choice-group { grid-template-columns: minmax(0, 1fr); }
}

/* « Votre besoin (facultatif) » : la mention reste sur la ligne du libellé. */
.auth-form-left > label:has(> span):not(.auth-input-wrap) {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
}
.auth-form-left > label:has(> span):not(.auth-input-wrap) > span { color: var(--text-faint); font-weight: 500; }
.auth-form-left > label:has(> span):not(.auth-input-wrap) > input { flex-basis: 100%; }

/* --------------------------------------------------------------------------
   6. SITE PUBLIC — cartes et rythme
   -------------------------------------------------------------------------- */
.public-site .market-capabilities article,
.public-site .workflow-track article,
.public-site .project-phases article,
.public-site .home-guide-card,
.public-site .pricing-card {
  border-radius: var(--ds-radius-card);
}
.public-site .market-capabilities article:hover,
.public-site .workflow-track article:hover,
.public-site .project-phases article:hover {
  transform: none;
  border-color: var(--ds-line-accent);
  box-shadow: var(--ds-shadow-hover);
}
.public-site .problem-list li:hover,
.public-site .pillar-exchange:hover,
.public-site .return-steps li:hover,
.public-site .trust-rows > div:hover,
.public-site .rule-sources li:hover { transform: none; }

/* Grille tarifaire : rayon aligné sur le reste du site, et le palier
   d'essai — la porte d'entrée de l'offre — porte un vrai bouton plein.
   Les autres paliers gardent un lien : un seul bouton plein par rangée. */
.public-site .pricing-card { border-radius: var(--ds-radius-panel); padding: var(--sp-5); }
.public-site .pricing-card.is-trial {
  border-color: var(--c-ok-line);
  background: linear-gradient(180deg, var(--c-ok-bg), var(--card) 46%);
}
.public-site .pricing-card.is-trial > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: end;
  width: 100%;
  min-height: var(--ds-control-h);
  margin-top: var(--sp-3);
  padding: 8px 12px;
  line-height: 1.25;
  text-align: center;
  border-radius: var(--ds-radius-control);
  background: var(--ds-primary);
  color: var(--ds-on-primary);
  text-decoration: none;
}
.public-site .pricing-card.is-trial > a:hover { background: var(--ds-primary-hover); color: var(--ds-on-primary); }
.public-site .pricing-card.is-trial > a:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }

/* Mention « par an, HT » toujours sous le montant : selon la largeur du
   prix elle passait à côté ou dessous, et les cinq cartes ne s'alignaient
   plus. */
.public-site .pricing-amount small { flex-basis: 100%; }
/* La liste « Compris dans chaque palier » est une grille à deux colonnes
   (coche, texte). Le lien « Contrôles → » formait un troisième élément et
   repartait seul sous la coche, en décalant le texte de sa ligne. */
.public-site .pricing-included li a { grid-column: 2; margin-top: 0; }

/* Le premier chiffre-clé était animé à partir de 0 : sur une capture ou une
   connexion lente, « 0 module couvert » restait affiché. La valeur servie
   est la bonne, on la montre telle quelle. */
.public-site .market-capabilities strong { text-shadow: none; }

/* --------------------------------------------------------------------------
   7. ESPACE CONNECTÉ — matière des surfaces
   -------------------------------------------------------------------------- */
/* Les jetons --app-* pilotent ~50 règles de style.css. Les redéfinir ici
   suffit à passer toute l'application sur des surfaces pleines, dans les
   deux thèmes, sans toucher à la structure. Auparavant le thème clair n'était
   appliqué qu'avec la bascule explicite : un poste en clair système recevait
   des panneaux teintés de marine (#e2e7ea) et des champs gris. */
body.user-shell {
  --app-canvas: var(--ds-canvas);
  --app-panel: var(--ds-panel);
  --app-panel-strong: var(--ds-panel);
  --app-panel-soft: var(--ds-panel-sub);
  --app-line: var(--ds-line);
  --app-line-bright: var(--ds-line-accent);
  --app-glow: transparent;
  --app-teal-glow: transparent;
  background-color: var(--ds-canvas);
  background-image: none;
}
:root[data-theme="light"] body.user-shell {
  --app-canvas: var(--ds-canvas);
  --app-panel: var(--ds-panel);
  --app-panel-strong: var(--ds-panel);
  --app-panel-soft: var(--ds-panel-sub);
  --app-line: var(--ds-line);
  --app-line-bright: var(--ds-line-accent);
}

/* En-têtes de page : un panneau sobre, sans cercles ni équerres décoratives. */
body.user-shell :is(.dashboard-topbar, .module-header-compact, .app-page-hero, .admin-users-hero, .admin-user-detail-hero, .xsd-admin-hero, .email-preview-hero) {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-panel);
  box-shadow: var(--ds-shadow);
}
body.user-shell :is(.dashboard-topbar, .module-header-compact, .app-page-hero, .admin-users-hero, .admin-user-detail-hero, .xsd-admin-hero, .email-preview-hero)::before,
body.user-shell :is(.dashboard-topbar, .module-header-compact, .app-page-hero, .admin-users-hero, .admin-user-detail-hero, .xsd-admin-hero, .email-preview-hero)::after {
  content: none;
}
body.user-shell .module-header-copy p { color: var(--primary-ink); }
body.user-shell .module-header-icon,
body.user-shell :is(.admin-users-hero-icon, .xsd-admin-hero-icon),
body.user-shell .tile-icon,
body.user-shell .operation-card .op-icon,
body.user-shell :is(.card-heading-icon, .resource-card-icon),
body.user-shell .kpi-card--standard .kpi-card-icon {
  border: 1px solid var(--ds-line);
  background: var(--primary-tint);
  color: var(--primary-ink);
  box-shadow: none;
}

/* Cartes et panneaux : fond plein, filet, ombre minimale. */
body.user-shell :is(.card, .tile, .operation-card, .detail-panel, .resource-card, .admin-block, .admin-users-directory, .admin-user-create-panel, .xsd-profile-card, .xsd-company-panel, .rbac-create-panel, .support-thread-card, .feedback-card, .validation-issues-card, .admin-quicklink) {
  border-color: var(--ds-line);
  background: var(--ds-panel);
  box-shadow: var(--ds-shadow);
}
body.user-shell :is(.card, .detail-panel, .resource-card, .admin-block, .admin-users-directory, .admin-user-create-panel, .xsd-profile-card, .xsd-company-panel, .rbac-create-panel, .validation-issues-card) {
  border-radius: var(--ds-radius-panel);
}
body.user-shell :is(.tile, .operation-card, .admin-quicklink) { border-radius: var(--ds-radius-card); }
/* Le filet vertical dégradé sur chaque carte cliquable est retiré : il
   donnait le même poids visuel à toutes les cartes. Le survol suffit. */
body.user-shell :is(.tile, .operation-card, .resource-card, .admin-quicklink, .kpi-card)::before { content: none; }
body.user-shell :is(.tile, .operation-card, .resource-card, .admin-quicklink, a.kpi-card):hover,
body.user-shell :is(.tile, .operation-card, .resource-card, .admin-quicklink, a.kpi-card):focus-within {
  transform: none;
  border-color: var(--ds-line-accent);
  background: var(--ds-panel);
  box-shadow: var(--ds-shadow-hover);
}

/* Zone des modules : même panneau que le reste. Son filet dégradé et sa
   légende générée en CSS (« MODULE / OPERATION / XML », non traduite et
   lue par certains lecteurs d'écran) sont retirés. */
body.user-shell .dashboard-modules-zone {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-panel);
  background: var(--ds-panel);
  box-shadow: var(--ds-shadow);
}
body.user-shell .dashboard-modules-zone::before,
body.user-shell .dashboard-modules-zone::after { content: none; }

/* Halo qui suivait le pointeur sur les cartes : décoratif, retiré. */
body.user-shell .app-pointer-glow::after { content: none; }

/* Indicateurs chiffrés */
body.user-shell .kpi-card-grid .kpi-card,
body.admin-shell .admin-users-stats.kpi-card-grid .kpi-card,
body.user-shell .dashboard-topbar-stats .kpi-card {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-panel-sub);
  box-shadow: none;
}
/* Le liseré coloré à gauche de chaque indicateur est une demande explicite
   (voir style.css, « rajouter les couleurs à gauche de chaque ») : il est
   conservé, à 3 px, sur la carte désormais neutre. */
body.user-shell .kpi-card-grid .kpi-card { border-left-width: 3px; }
/* Libellés et sous-libellés d'indicateurs : ils descendaient à 7 px et
   9,9 px — illisibles, et sous tout seuil raisonnable pour du texte réel. */
body.user-shell .kpi-card-grid .kpi-card-label,
body.user-shell .kpi-card--standard .kpi-card-label { font-size: .7rem; }
body.user-shell .kpi-card-sub,
body.user-shell .kpi-card--standard .kpi-card-sub { font-size: .72rem; color: var(--text-muted); }
body.user-shell .admin-block::before,
body.admin-shell .admin-block.app-kpi-band::after { content: none; }

body.user-shell .kpi-card--standard .kpi-card-value,
body.admin-shell .admin-users-stats .kpi-card strong { color: var(--text); }

/* Bandeaux d'état et de version */
body.user-shell .version-badge,
body.user-shell .admin-xsd-indicator {
  border-color: var(--ds-line);
  background: var(--ds-panel);
  box-shadow: none;
}

/* Étapes Préparer / Analyser / Exporter : l'étape courante était écrite en
   bleu sur bleu (1,9:1 en sombre). Elle devient un aplat plein, lisible. */
body.user-shell .process-mini-flow span {
  border-color: var(--ds-line);
  background: var(--ds-panel);
  color: var(--text-muted);
}
body.user-shell .process-mini-flow .is-current {
  border-color: var(--ds-primary);
  background: var(--ds-primary);
  color: var(--ds-on-primary);
  box-shadow: none;
}
body.user-shell .process-mini-flow .is-current * { color: inherit; }

body.user-shell .info-trigger {
  border-color: var(--ds-line-strong);
  background: var(--ds-panel);
  color: var(--primary-ink);
}
body.user-shell .info-trigger:hover { border-color: var(--ds-line-accent); background: var(--primary-tint); }

/* Synthèse de validation : la couleur d'état est portée par un filet
   gauche franc, la carte reste neutre. */
body.user-shell .validation-summary > div,
body.user-shell .validation-summary-success > div,
body.user-shell .validation-summary-error > div {
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-panel);
  box-shadow: inset 3px 0 var(--c-brand-500);
}
body.user-shell .validation-summary-success > div { box-shadow: inset 3px 0 var(--c-ok); }
body.user-shell .validation-summary-error > div { box-shadow: inset 3px 0 var(--c-danger); }
body.user-shell .result-list li { border-color: var(--ds-line); background: var(--ds-panel-sub); }

/* Recherche du tableau de bord */
body.user-shell .dashboard-search input {
  border-color: var(--ds-line-strong);
  background: var(--ds-field);
}

/* --------------------------------------------------------------------------
   8. TABLEAUX
   -------------------------------------------------------------------------- */
body.user-shell .datatable-wrap,
body.user-shell .dg-wrap {
  border-color: var(--ds-line);
  border-radius: var(--ds-radius-card);
  background: var(--ds-panel);
  box-shadow: var(--ds-shadow);
}
body.user-shell :is(.dg-topbar, .admin-toolbar, .datatable-pagination, .dg-bottombar) {
  border-color: var(--ds-line);
  background: var(--ds-panel);
}
/* En-têtes de colonne : sans-serif lisible plutôt que monospace en
   capitales espacées — les libellés EUDAMED sont longs (« Basic UDI-DI »,
   « Risk class »), la mono les rendait illisibles à .67rem. */
body.user-shell table.datatable thead th,
body.user-shell .dg-table thead th,
body.user-shell .validation-table thead th {
  border-color: var(--ds-line);
  background: var(--ds-panel-sub);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
}
body.user-shell table.datatable td,
body.user-shell .dg-table td,
body.user-shell .validation-table td { border-color: var(--ds-line); }
body.user-shell table.datatable tbody tr:hover,
body.user-shell .dg-table tbody tr:hover {
  background: color-mix(in srgb, var(--c-brand-500) 6%, transparent);
  box-shadow: inset 2px 0 var(--c-brand-500);
}
:where(td, th).num,
:where(td, th)[data-type="number"] { font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------------------------
   9. ADMINISTRATION
   -------------------------------------------------------------------------- */
body.admin-shell .admin-shell-body { background: none; }
body.user-shell .admin-block-heading { border-bottom-color: var(--ds-line); }

/* --------------------------------------------------------------------------
   10. MOBILE — garde-fous anti-débordement
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  :where(img, video, svg, canvas, iframe) { max-width: 100%; }
  :where(pre, code) { overflow-wrap: anywhere; }
  :where(pre) { white-space: pre-wrap; }
  /* Les rangées de boutons passent en pleine largeur : cible tactile
     de 44 px, aucun bouton coupé au bord. */
  .public-site .market-hero-actions > :is(.market-primary, .market-ghost) { width: 100%; }
  body.user-shell > .page,
  body.user-shell > .breadcrumb { width: calc(100% - 24px); }
}

/* Lien vers la page d'échéance, sur sa propre ligne dans le bandeau d'essai. */
.beta-banner-deadline { display: block; margin-top: .25rem; }
