/* ============================================================
   IDemployee — système de design (direction C « Comptoir »)
   ============================================================
   Chargé APRÈS Bootstrap 5.3.3. Référence : docs/DESIGN.md.
   Lecture seule pour les postes : un besoin → demande @design.
   CSP 'self' : aucune ressource externe, aucun @import. Polices
   auto-hébergées (assets/fonts/, SIL OFL 1.1). Couleurs dynamiques :
   data-bg / data-fg (app.js) ou classes discrètes (.ide-day--N,
   .ide-heat-N) — jamais style="".

   Sommaire
    0. Polices (@font-face)          11. Écran « une action »
    1. Jetons (variables)            12. Gestes, étapes, attente, code
    2. Correspondance Bootstrap      13. Carte membre, bandeau entreprise
    3. Base et typographie           14. Verdict de scan
    4. Pictogrammes, symbole         15. Statistiques
    5. En-tête, navigation, langue   16. États vides, erreurs
    6. Pied de page                  17. Mouvement
    7. Messages (flash, alertes)     18. Contraste renforcé, couleurs forcées
    8. Boutons                       19. Impression
    9. Formulaires
   10. Panneaux, tableaux, badges
   ============================================================ */

/* ---------- 0. Polices : Bricolage Grotesque (titres) + Lexend (texte) ----------
   Fichiers variables, sous-ensembles latin / latin étendu (le second n'est
   téléchargé que si la page contient ć, š, ł…). Empreintes : assets/vendor/README.md. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 1. Jetons ---------- */
:root {
  /* Couleurs de base (contrastes WCAG 2.x vérifiés, docs/DESIGN.md §3) */
  --ide-ink: #1f2a2e;            /* Encre — 12,9:1 sur --ide-bg, 14,7:1 sur blanc */
  --ide-bg: #faf9f6;             /* Blanc cassé — fond des pages (choix de Vincent, 01.10.2026) */
  --ide-brume: #eaf1f3;          /* Brume du lac — surfaces secondaires : carte membre, survols, pastilles */
  --ide-surface: #ffffff;        /* panneaux, champs, tableaux */
  --ide-surface-2: #dce7ea;      /* zones secondaires, pistes des barres — encre 11,7:1 */
  --ide-muted: #44545a;          /* texte secondaire — 6,9:1 sur --ide-bg, 7,9:1 sur blanc, 6,3:1 sur --ide-surface-2 */
  --ide-line: #cddbdf;           /* séparateurs décoratifs */
  --ide-line-strong: #6a7e85;    /* bords de champs — 3,7:1 sur --ide-bg, 4,3:1 sur blanc */
  --ide-primary: #1f4d3f;        /* Vert sapin — 9,6:1 avec blanc, 8,4:1 comme texte sur --ide-bg */
  --ide-primary-hover: #163b30;  /* 12,3:1 avec blanc */
  --ide-primary-soft: #e3eeea;   /* fond doux de la marque — texte sapin 8,1:1 */
  --ide-on-primary: #ffffff;
  --ide-accent: #f2a65a;         /* Abricot — accents et illustrations ; texte encre dessus 7,3:1, JAMAIS de texte blanc */
  --ide-accent-soft: #fce3c8;    /* encre 11,9:1 */
  --ide-focus: #1f4d3f;          /* anneau de focus sur fond clair — 8,4:1 sur --ide-bg */
  --ide-focus-on-dark: #f2a65a;  /* anneau de focus sur sapin (4,7:1) ou encre (7,3:1) */

  /* Couleurs RÉSERVÉES aux états (couleur + pictogramme + mot, jamais la couleur seule) */
  --ide-valid: #1e7a4c;          /* VALIDE, succès — 5,3:1 avec blanc */
  --ide-valid-ink: #17603c;      /* texte « succès » sur fond doux — 6,6:1 */
  --ide-valid-soft: #e4f2ea;
  --ide-stop: #b42318;           /* NON VALIDE, refus, erreurs — 6,6:1 avec blanc, 5,7:1 sur fond doux */
  --ide-stop-soft: #fcebe9;
  --ide-refused: #f2b705;        /* NON ACCEPTÉE ICI — texte encre 8,1:1 */
  --ide-on-refused: #1f2a2e;
  --ide-error: #3a4a50;          /* VÉRIFICATION IMPOSSIBLE, HORS LIGNE — 9,2:1 avec blanc */
  --ide-on-status: #ffffff;
  --ide-warn: #8a5a00;           /* texte d'avertissement — 5,4:1 sur --ide-warn-soft */
  --ide-warn-soft: #fff4db;
  --ide-info-soft: #ddebf0;      /* fond d'information — encre 12,0:1, sapin 7,9:1 */

  /* Couleur de l'entreprise cliente : remplacée par app.js (data-bg / data-fg) */
  --brand-bg: #1f2a2e;
  --brand-fg: #ffffff;

  /* Couleurs du jour (anti-capture). Jamais vert, rouge ni ambre (réservés). */
  --ide-day-1: #1e5aa8;          /* bleu — 6,8:1 */
  --ide-day-2: #6b3fa0;          /* violet — 7,4:1 */
  --ide-day-3: #b35400;          /* orange — 5,0:1 */
  --ide-day-4: #a3257a;          /* framboise — 6,8:1 */
  --ide-day-5: #00677f;          /* pétrole — 6,5:1 */
  --ide-day-6: #7a4e2d;          /* brun — 7,1:1 */
  --ide-day-7: #3d4b59;          /* ardoise — 8,9:1 */

  /* Typographie : polices auto-hébergées, pile système en repli */
  --ide-font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ide-font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ide-font-num: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; /* chiffres tabulaires (Lexend n'en a pas) */
  --ide-font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ide-fs-sm: .875rem;          /* 14 px : métadonnées du back-office uniquement */
  --ide-fs-base: 1rem;           /* 16 px : back-office */
  --ide-fs-comfort: 1.125rem;    /* 18 px : membre, commerce, public */
  --ide-fs-lg: 1.25rem;          /* 20 px */
  --ide-fs-h2: 1.5rem;
  --ide-fs-h1: clamp(1.75rem, 1.2rem + 2.4vw, 2.375rem);
  --ide-fs-code: 2rem;
  --ide-fs-clock: clamp(1.75rem, 8vw, 2.5rem);
  --ide-fs-status: clamp(2.5rem, 12vw, 4.5rem);
  --ide-fs-status-long: clamp(2rem, 9vw, 3.5rem);
  --ide-lh: 1.55;
  --ide-lh-tight: 1.12;

  /* Espacements (grille de 4/8 px) */
  --ide-space-1: .25rem;  --ide-space-2: .5rem;  --ide-space-3: .75rem; --ide-space-4: 1rem;
  --ide-space-5: 1.5rem;  --ide-space-6: 2rem;   --ide-space-7: 3rem;   --ide-space-8: 4rem;
  --ide-gutter: 1rem;

  /* Formes : généreuses et rondes */
  --ide-radius-sm: 8px;          /* vignettes, cases */
  --ide-radius: 12px;            /* champs, menus */
  --ide-radius-lg: 20px;         /* panneaux, alertes, portes */
  --ide-radius-xl: 28px;         /* bloc du verdict, grands blocs */
  --ide-radius-pill: 999px;      /* boutons, puces, pastilles */
  --ide-radius-card: 1.375rem;   /* carte membre (≈ 5,5 % de sa largeur) */
  --ide-shadow: 0 1px 2px rgb(31 42 46 / .08), 0 14px 32px -14px rgb(31 42 46 / .32); /* carte membre, menus */
  --ide-shadow-sm: 0 1px 2px rgb(31 42 46 / .05), 0 6px 16px -10px rgb(31 42 46 / .16); /* panneaux */

  /* Cibles tactiles */
  --ide-touch: 3rem;             /* 48 px : membre, commerce, public */
  --ide-touch-admin: 2.75rem;    /* 44 px : back-office (souris) */
  --ide-touch-big: 3.5rem;       /* 56 px : bouton principal d'un écran « une action » */

  /* Mouvement */
  --ide-dur-fast: 150ms;
  --ide-dur: 250ms;
  --ide-dur-slow: 400ms;
  --ide-ease: cubic-bezier(.2, .8, .2, 1);
  --ide-ease-pop: cubic-bezier(.3, 1.5, .5, 1); /* petit rebond (« pop ») : apparitions décoratives seulement */

  color-scheme: light;           /* 1er build : clair partout (docs/DESIGN.md, arbitrage A6) */
}

/* ---------- 2. Correspondance Bootstrap 5.3.3 ---------- */
:root {
  --bs-body-font-family: var(--ide-font);
  --bs-font-sans-serif: var(--ide-font);
  --bs-font-monospace: var(--ide-font-mono);
  --bs-body-font-size: var(--ide-fs-base);
  --bs-body-line-height: var(--ide-lh);
  --bs-body-bg: var(--ide-bg);
  --bs-body-bg-rgb: 234, 241, 243;
  --bs-body-color: var(--ide-ink);
  --bs-body-color-rgb: 31, 42, 46;
  --bs-emphasis-color: var(--ide-ink);
  --bs-secondary-color: var(--ide-muted);
  --bs-secondary-bg: var(--ide-surface-2);
  --bs-tertiary-bg: var(--ide-surface-2);
  --bs-border-color: var(--ide-line);
  --bs-border-radius: var(--ide-radius);
  --bs-border-radius-sm: var(--ide-radius-sm);
  --bs-border-radius-lg: var(--ide-radius-lg);
  --bs-border-radius-xl: var(--ide-radius-xl);
  --bs-border-radius-xxl: var(--ide-radius-xl);
  --bs-border-radius-pill: var(--ide-radius-pill);
  --bs-heading-color: var(--ide-ink);
  --bs-link-color: var(--ide-primary);
  --bs-link-color-rgb: 31, 77, 63;
  --bs-link-hover-color: var(--ide-ink);
  --bs-link-hover-color-rgb: 31, 42, 46;
  --bs-primary: var(--ide-primary);
  --bs-primary-rgb: 31, 77, 63;
  --bs-primary-text-emphasis: var(--ide-primary);
  --bs-primary-bg-subtle: var(--ide-primary-soft);
  --bs-primary-border-subtle: #a9c7bb;
  --bs-success: var(--ide-valid);
  --bs-success-rgb: 30, 122, 76;
  --bs-success-text-emphasis: var(--ide-valid-ink);
  --bs-success-bg-subtle: var(--ide-valid-soft);
  --bs-success-border-subtle: #a8d5bb;
  --bs-danger: var(--ide-stop);
  --bs-danger-rgb: 180, 35, 24;
  --bs-danger-text-emphasis: var(--ide-stop);
  --bs-danger-bg-subtle: var(--ide-stop-soft);
  --bs-danger-border-subtle: #eeb4ae;
  --bs-warning-text-emphasis: var(--ide-warn);
  --bs-warning-bg-subtle: var(--ide-warn-soft);
  --bs-warning-border-subtle: #ecc978;
  --bs-info-text-emphasis: var(--ide-primary);
  --bs-info-bg-subtle: var(--ide-info-soft);
  --bs-info-border-subtle: #b3ccd5;
  --bs-secondary-text-emphasis: var(--ide-ink);
  --bs-secondary-bg-subtle: var(--ide-surface-2);
  --bs-secondary-border-subtle: var(--ide-line);
  --bs-focus-ring-color: rgb(31 77 63 / .45);
  --bs-focus-ring-width: 3px;
}
.btn-primary {
  --bs-btn-color: var(--ide-on-primary); --bs-btn-bg: var(--ide-primary); --bs-btn-border-color: var(--ide-primary);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ide-primary-hover); --bs-btn-hover-border-color: var(--ide-primary-hover);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ide-primary-hover); --bs-btn-active-border-color: var(--ide-primary-hover);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--ide-primary); --bs-btn-disabled-border-color: var(--ide-primary);
}
.btn-outline-primary {
  --bs-btn-color: var(--ide-primary); --bs-btn-border-color: var(--ide-primary); --bs-btn-bg: var(--ide-surface);
  --bs-btn-hover-color: var(--ide-primary-hover); --bs-btn-hover-bg: var(--ide-primary-soft); --bs-btn-hover-border-color: var(--ide-primary-hover);
  --bs-btn-active-color: var(--ide-primary-hover); --bs-btn-active-bg: var(--ide-primary-soft); --bs-btn-active-border-color: var(--ide-primary-hover);
  --bs-btn-disabled-color: var(--ide-primary); --bs-btn-disabled-border-color: var(--ide-primary);
  --bs-btn-border-width: 2px;
}
.btn-secondary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ide-muted); --bs-btn-border-color: var(--ide-muted);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ide-ink); --bs-btn-hover-border-color: var(--ide-ink);
  --bs-btn-active-bg: var(--ide-ink); --bs-btn-active-border-color: var(--ide-ink);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ide-ink); --bs-btn-border-color: var(--ide-line-strong); --bs-btn-bg: var(--ide-surface);
  --bs-btn-hover-color: var(--ide-ink); --bs-btn-hover-bg: var(--ide-bg); --bs-btn-hover-border-color: var(--ide-ink);
  --bs-btn-active-color: var(--ide-ink); --bs-btn-active-bg: var(--ide-surface-2); --bs-btn-active-border-color: var(--ide-ink);
}
.btn-danger {
  --bs-btn-color: #fff; --bs-btn-bg: var(--ide-stop); --bs-btn-border-color: var(--ide-stop);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #8f1c13; --bs-btn-hover-border-color: #8f1c13;
  --bs-btn-active-bg: #8f1c13; --bs-btn-active-border-color: #8f1c13;
}
.btn-outline-danger {
  --bs-btn-color: var(--ide-stop); --bs-btn-border-color: var(--ide-stop); --bs-btn-bg: var(--ide-surface);
  --bs-btn-hover-color: #8f1c13; --bs-btn-hover-bg: var(--ide-stop-soft); --bs-btn-hover-border-color: #8f1c13;
  --bs-btn-active-color: #8f1c13; --bs-btn-active-bg: var(--ide-stop-soft); --bs-btn-active-border-color: #8f1c13;
  --bs-btn-border-width: 2px;
}
.btn-success { /* à éviter : le vert est réservé à VALIDE (docs/DESIGN.md §1) */
  --bs-btn-color: #fff; --bs-btn-bg: var(--ide-valid); --bs-btn-border-color: var(--ide-valid);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ide-valid-ink); --bs-btn-hover-border-color: var(--ide-valid-ink);
}
.btn-link { --bs-btn-color: var(--ide-primary); --bs-btn-hover-color: var(--ide-ink); --bs-btn-active-color: var(--ide-ink); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--ide-primary);
  box-shadow: none;
  outline: 3px solid var(--ide-focus);
  outline-offset: 1px;
}
.form-check-input:checked, .form-check-input[type=checkbox]:indeterminate {
  background-color: var(--ide-primary);
  border-color: var(--ide-primary);
}
.form-range::-webkit-slider-thumb { background-color: var(--ide-primary); }
.form-range::-moz-range-thumb { background-color: var(--ide-primary); }
.nav-link:focus-visible { box-shadow: none; outline: 3px solid var(--ide-focus); outline-offset: 2px; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--ide-primary); --bs-nav-pills-border-radius: var(--ide-radius-pill); }
.pagination {
  --bs-pagination-color: var(--ide-primary);
  --bs-pagination-hover-color: var(--ide-ink);
  --bs-pagination-hover-bg: var(--ide-primary-soft);
  --bs-pagination-focus-color: var(--ide-ink);
  --bs-pagination-focus-box-shadow: none;
  --bs-pagination-active-bg: var(--ide-primary);
  --bs-pagination-active-border-color: var(--ide-primary);
  --bs-pagination-border-color: var(--ide-line);
  --bs-pagination-disabled-color: var(--ide-muted);
  --bs-pagination-border-radius: var(--ide-radius-pill);
  flex-wrap: wrap;
  gap: var(--ide-space-1);
}
.page-link { min-width: var(--ide-touch-admin); min-height: var(--ide-touch-admin); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ide-radius-pill) !important; font-family: var(--ide-font-num); font-weight: 600; }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--ide-primary); --bs-progress-bg: var(--ide-surface-2); --bs-progress-border-radius: var(--ide-radius-pill); }
.list-group { --bs-list-group-active-bg: var(--ide-primary); --bs-list-group-active-border-color: var(--ide-primary); --bs-list-group-border-radius: var(--ide-radius-lg); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--ide-primary); --bs-dropdown-box-shadow: var(--ide-shadow); --bs-dropdown-border-radius: var(--ide-radius); box-shadow: var(--ide-shadow); }
.btn-close:focus { box-shadow: none; outline: 3px solid var(--ide-focus); outline-offset: 2px; opacity: 1; }
.accordion { --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-active-bg: var(--ide-primary-soft); --bs-accordion-active-color: var(--ide-ink); --bs-accordion-border-radius: var(--ide-radius-lg); --bs-accordion-inner-border-radius: calc(var(--ide-radius-lg) - 1px); }
.accordion-button:focus-visible { outline: 3px solid var(--ide-focus); outline-offset: -3px; }

/* ---------- 3. Base et typographie ---------- */
/* Jamais de césure automatique (choix de Vincent) : aucun tiret inventé, ni dans un mot ni dans une donnée.
   Les retours à la ligne viennent de text-wrap (pretty / balance) ; overflow-wrap: break-word (body)
   coupe sans tiret un mot plus large que son conteneur, pour ne jamais déborder. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--ide-space-4); hyphens: manual; -webkit-hyphens: manual; }
body {
  background: var(--ide-bg);
  color: var(--ide-ink);
  font-family: var(--ide-font);
  font-size: var(--ide-fs-base);
  line-height: var(--ide-lh);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
  font-synthesis-weight: none; /* les fichiers variables couvrent toutes les graisses : jamais de gras simulé */
}
.ide-area-member, .ide-area-partner, .ide-area-public { font-size: var(--ide-fs-comfort); }
.ide-main { flex: 1 0 auto; padding-block: var(--ide-space-5) var(--ide-space-7); }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--ide-font-display); line-height: var(--ide-lh-tight); font-weight: 700;
  text-wrap: balance; color: var(--ide-ink); letter-spacing: -.01em;
}
h1, .h1 { font-size: var(--ide-fs-h1); font-weight: 800; letter-spacing: -.02em; }
h2, .h2 { font-size: var(--ide-fs-h2); }
h3, .h3 { font-size: var(--ide-fs-lg); }
p, li, dd, dt, figcaption, blockquote, td { text-wrap: pretty; } /* pas de mot seul en fin de paragraphe */
p { max-width: 70ch; }
.lead { font-size: var(--ide-fs-lg); font-weight: 400; color: var(--ide-ink); }
small, .small, .text-muted, .text-body-secondary { color: var(--ide-muted) !important; }
a { color: var(--ide-primary); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ide-ink); text-decoration-thickness: 2px; }
b, strong { font-weight: 600; }
/* Noms techniques (cookies, fichiers) : encre, jamais de tiret de césure inventé */
:root { --bs-code-color: var(--ide-ink); }
code, kbd { overflow-wrap: anywhere; color: var(--ide-ink); }
.ide-num, .ide-tabular { font-family: var(--ide-font-num); font-variant-numeric: tabular-nums; }
.ide-meta { font-size: var(--ide-fs-sm); color: var(--ide-muted); }
.ide-caps { text-transform: uppercase; letter-spacing: .06em; font-size: var(--ide-fs-sm); font-weight: 600; }
.ide-stack > * + * { margin-top: var(--ide-space-4); }
.ide-stack-sm > * + * { margin-top: var(--ide-space-2); }
.ide-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-3); }
.ide-measure { max-width: 70ch; }
::selection { background: var(--ide-accent-soft); color: var(--ide-ink); }

/* Focus visible : 3 px, décalé de 2 px, jamais supprimé sans remplacement */
:focus-visible { outline: 3px solid var(--ide-focus); outline-offset: 2px; }
.btn:focus-visible { outline: 3px solid var(--ide-focus); outline-offset: 2px; box-shadow: none; }
/* Sur un fond de couleur libre (entreprise) : blanc + liseré encre, visible sur toute couleur */
.ide-company-bar :focus-visible,
.ide-card__band :focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ide-ink);
}
/* Sur sapin (en-tête back-office et commerce) et encre (bande vivante) : abricot */
.ide-area-admin .ide-header :focus-visible,
.ide-area-partner .ide-header :focus-visible,
.ide-live :focus-visible { outline-color: var(--ide-focus-on-dark); box-shadow: none; }
.ide-skip:focus {
  position: fixed; top: var(--ide-space-2); left: var(--ide-space-2); z-index: 1080;
  background: var(--ide-surface); color: var(--ide-ink); padding: var(--ide-space-3) var(--ide-space-4);
  border: 2px solid var(--ide-ink); border-radius: var(--ide-radius-pill); font-weight: 600;
}

/* Bandeau hors production (layout_head, APP_ENV !== 'production') : impossible à confondre avec la prod. */


/* ---------- 4. Pictogrammes (layout_icon) et symbole « Rosette » ---------- */
.ide-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.ide-icon--lg { width: 2rem; height: 2rem; }
.ide-icon--xl { width: 3rem; height: 3rem; }
.ide-icon--hero { width: clamp(4rem, 18vw, 6rem); height: clamp(4rem, 18vw, 6rem); }
.ide-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: var(--ide-space-3); padding: 0; list-style: none; }
.ide-icons li { display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-2); padding: var(--ide-space-3); background: var(--ide-surface); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); font-size: var(--ide-fs-sm); }
.ide-icons li .ide-icon { color: var(--ide-primary); }

/* Symbole « Rosette » (layout_brand_mark, logo A1) : couleurs pilotées ici, valeurs d'origine en attributs (sans CSS).
   Rosace sapin, médaillon abricot, « ID » encre (7,3:1 sur abricot). */
.ide-brand__mark {
  --mark-rose: var(--ide-primary); --mark-medal: var(--ide-accent); --mark-id: var(--ide-ink);
  flex: none; overflow: visible;
}
.ide-brand__mark-rose { stroke: var(--mark-rose); }
.ide-brand__mark-ring { fill: var(--mark-rose); }
.ide-brand__mark-medal { fill: var(--mark-medal); }
.ide-brand__mark-id { fill: var(--mark-id); }
/* Sur sapin (en-tête admin / partner) : rosace blanche, médaillon abricot, « ID » encre */
.ide-area-admin .ide-header .ide-brand__mark,
.ide-area-partner .ide-header .ide-brand__mark { --mark-rose: #ffffff; }
/* Dans une pastille d'entreprise : monochrome aux couleurs de l'entreprise */
.ide-card__band .ide-brand__mark,
.ide-company-bar .ide-brand__mark { --mark-rose: var(--brand-fg); --mark-medal: var(--brand-fg); --mark-id: var(--brand-bg); }
/* Petites tailles (carte membre, pastilles) : rosace pleine simplifiée, médaillon agrandi, lisible dès 16 px */
.ide-card__band .ide-brand__mark-rose, .ide-card__foot .ide-brand__mark-rose,
.ide-company-bar .ide-brand__mark-rose, .ide-chip .ide-brand__mark-rose { display: none; }
.ide-card__band .ide-brand__mark-ring, .ide-card__foot .ide-brand__mark-ring,
.ide-company-bar .ide-brand__mark-ring, .ide-chip .ide-brand__mark-ring { display: inline; }
.ide-card__band .ide-brand__mark-seal, .ide-card__foot .ide-brand__mark-seal,
.ide-company-bar .ide-brand__mark-seal, .ide-chip .ide-brand__mark-seal { transform: scale(1.15); transform-origin: 32px 32px; }

/* « Le sceau se pose » : animation du logo de l'EN-TÊTE, jouée UNE FOIS à chaque ouverture de page
   (choix de Vincent, 02.10.2026). La rosace se trace (1,4 s, trois tracés décalés de 0,1 s), puis le médaillon
   « ID » se pose comme un tampon (0,5 s dès 1,5 s) : 2 s, puis le logo reste complet. CSS seul, aucun JS ni stockage.
   Mouvement réduit : logo fixe et complet. Seuls stroke-dashoffset, transform et opacity bougent. */
@media (prefers-reduced-motion: no-preference) {
  .ide-header .ide-brand .ide-brand__mark-rose path {
    stroke-dasharray: 1 2; animation: ide-logo-draw 1.4s cubic-bezier(.45, .05, .25, 1) both;
  }
  .ide-header .ide-brand .ide-brand__mark-rose path:nth-child(2) { animation-delay: .1s; }
  .ide-header .ide-brand .ide-brand__mark-rose path:nth-child(3) { animation-delay: .2s; }
  .ide-header .ide-brand .ide-brand__mark-seal {
    transform-box: view-box; transform-origin: 32px 32px;
    animation: ide-logo-stamp .5s 1.5s cubic-bezier(.3, 1.4, .5, 1) both;
  }
}
@keyframes ide-logo-draw { from { stroke-dashoffset: 1.02; } to { stroke-dashoffset: 0; } } /* tiret 1, blanc 2 : aucun point résiduel au départ */
@keyframes ide-logo-stamp { from { transform: scale(1.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 5. En-tête, navigation, langue ---------- */
.ide-area-admin, .ide-area-partner { --ide-header-bg: var(--ide-primary); --ide-header-fg: #ffffff; --ide-header-hover: rgb(255 255 255 / .12); --ide-header-line: rgb(255 255 255 / .22); }
.ide-area-member, .ide-area-public { --ide-header-bg: var(--ide-bg); --ide-header-fg: var(--ide-ink); --ide-header-hover: var(--ide-surface-2); --ide-header-line: var(--ide-line); }
.ide-header {
  background: var(--ide-header-bg);
  color: var(--ide-header-fg);
  border-bottom: 1px solid var(--ide-header-line);
  padding-top: env(safe-area-inset-top);
}
.ide-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--ide-space-2) var(--ide-space-4);
  padding-block: var(--ide-space-2);
  min-height: 4rem;
}
.ide-brand {
  display: inline-flex; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch); color: inherit; text-decoration: none;
  line-height: 1;
}
.ide-brand:hover { color: inherit; }
.ide-brand .ide-brand__mark { width: 2.75rem; height: 2.75rem; }
.ide-brand__name {
  font-family: var(--ide-font-display); font-weight: 800; font-size: 1.5rem;
  letter-spacing: -.03em; text-transform: lowercase; white-space: nowrap;
  color: var(--ide-primary); padding-bottom: .1em;
}
.ide-brand__name b { font-weight: inherit; }
.ide-area-admin .ide-brand__name, .ide-area-partner .ide-brand__name { color: #ffffff; }
.ide-header__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2) var(--ide-space-3); margin-left: auto; }
.ide-account-link {
  display: inline-flex; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch-admin); padding-inline: var(--ide-space-3);
  color: inherit; text-decoration: none; border-radius: var(--ide-radius-pill);
  max-width: 100%;
}
.ide-account-link span { overflow-wrap: anywhere; }
.ide-account-link:hover { color: inherit; background: var(--ide-header-hover); }
.ide-logout { margin: 0; }
.ide-logout .btn { min-height: var(--ide-touch-admin); }
.ide-company-switch { display: flex; align-items: center; gap: var(--ide-space-2); margin: 0; }
.ide-company-switch__label { display: inline-flex; margin: 0; }
.ide-company-switch .form-select {
  min-height: var(--ide-touch-admin); min-width: 11rem; max-width: 18rem; padding-inline: var(--ide-space-4) 2.5rem;
  font-size: var(--ide-fs-base); font-weight: 600; color: inherit; background-color: transparent;
  border: 1px solid rgb(255 255 255 / .45); border-radius: var(--ide-radius-pill);
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  cursor: pointer;
}
.ide-company-switch .form-select:hover { background-color: var(--ide-header-hover); }
.ide-company-switch .form-select:focus { border-color: rgb(255 255 255 / .45); box-shadow: none; }
.ide-company-switch option { color: var(--ide-ink); background: var(--ide-surface); } /* liste déroulante native : encre sur blanc */

/* Navigation principale (back-office). .ide-nav = zone repliable (outils + liens). */
.ide-nav { display: contents; }
.ide-nav__main { flex-basis: 100%; order: 10; border-top: 1px solid var(--ide-header-line); margin-inline: calc(-1 * var(--ide-space-1)); }
.ide-nav__main ul { display: flex; flex-wrap: wrap; gap: var(--ide-space-1); list-style: none; margin: 0; padding: var(--ide-space-2) 0 var(--ide-space-1); }
.ide-nav__main a {
  display: inline-flex; align-items: center; min-height: var(--ide-touch-admin);
  padding: var(--ide-space-2) var(--ide-space-4); border-radius: var(--ide-radius-pill);
  color: inherit; text-decoration: none; font-weight: 400;
}
.ide-nav__main a:hover { background: var(--ide-header-hover); color: inherit; }
@media (min-width: 992px) {
  .ide-nav__main { min-width: 0; max-width: calc(100% + 2 * var(--ide-space-1)); }
  .ide-nav__main ul { flex-wrap: nowrap; gap: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .35) transparent; }
  .ide-nav__main li { flex: none; }
  .ide-nav__main a { padding-inline: var(--ide-space-3); white-space: nowrap; }
}
@media (min-width: 992px) and (max-width: 1199.98px) { .ide-nav__main a { padding-inline: var(--ide-space-2); } }
/* Page courante : pastille claire + trait abricot (la graisse et le trait la signalent sans la couleur seule) */
.ide-nav__main a[aria-current="page"] { font-weight: 600; background: rgb(255 255 255 / .16); box-shadow: inset 0 -3px 0 var(--ide-accent); }
.ide-nav-toggle {
  display: none; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch); padding: 0 var(--ide-space-4);
  margin-left: auto; background: transparent; color: inherit;
  border: 1px solid rgb(255 255 255 / .45); border-radius: var(--ide-radius-pill); font-weight: 600;
}
.ide-nav-toggle[aria-expanded="true"] { background: var(--ide-header-hover); }
/* Mobile : repli seulement si JS actif (sinon tout reste visible, aucune perte). */
@media (max-width: 991.98px) and (scripting: enabled) {
  .ide-nav-toggle { display: inline-flex; }
  .ide-nav { display: none; flex-basis: 100%; padding-bottom: var(--ide-space-3); }
  .ide-nav.is-open { display: flex; flex-direction: column; gap: var(--ide-space-3); }
  .ide-nav .ide-header__tools { flex-direction: column; align-items: stretch; margin-left: 0; order: 0; }
  .ide-nav .ide-company-switch .form-select { max-width: none; flex: 1; min-height: var(--ide-touch); }
  .ide-area-admin .ide-nav .ide-lang-menu summary { min-height: var(--ide-touch); }
  .ide-nav .ide-logout .btn { width: 100%; min-height: var(--ide-touch); }
  .ide-nav__main { order: 1; margin: 0; border-top: 1px solid var(--ide-header-line); }
  .ide-nav__main ul { flex-direction: column; gap: var(--ide-space-1); }
  .ide-nav__main a { display: flex; min-height: var(--ide-touch); }
  .ide-nav__main a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--ide-accent); }
}

/* Sélecteur de langue compact (en-tête) : <details> natif */
.ide-lang-menu { position: relative; }
.ide-lang-menu summary {
  display: inline-flex; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch); padding: 0 var(--ide-space-4);
  border: 1px solid var(--ide-header-line); border-radius: var(--ide-radius-pill);
  cursor: pointer; list-style: none; font-weight: 600; user-select: none;
}
.ide-area-member .ide-lang-menu summary, .ide-area-public .ide-lang-menu summary { background: var(--ide-surface); border-color: var(--ide-line-strong); }
.ide-area-admin .ide-lang-menu summary { min-height: var(--ide-touch-admin); border-color: rgb(255 255 255 / .45); }
.ide-area-partner .ide-lang-menu summary { border-color: rgb(255 255 255 / .45); }
.ide-lang-menu summary::-webkit-details-marker { display: none; }
.ide-lang-menu summary:hover { background: var(--ide-header-hover); }
.ide-lang-menu__chevron { width: 1rem; height: 1rem; transition: transform var(--ide-dur-fast) var(--ide-ease); }
.ide-lang-menu details[open] .ide-lang-menu__chevron { transform: rotate(180deg); }
.ide-lang-menu ul {
  position: absolute; right: 0; top: calc(100% + var(--ide-space-2)); z-index: 1030;
  min-width: 12rem; margin: 0; padding: var(--ide-space-2); list-style: none;
  background: var(--ide-surface); color: var(--ide-ink);
  border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); box-shadow: var(--ide-shadow);
}
.ide-lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ide-space-4);
  min-height: var(--ide-touch); padding: 0 var(--ide-space-3);
  color: var(--ide-ink); text-decoration: none; border-radius: var(--ide-radius);
}
.ide-lang-menu a:hover { background: var(--ide-brume); }
.ide-lang-menu a[aria-current="true"] { font-weight: 600; background: var(--ide-primary-soft); box-shadow: inset 4px 0 0 var(--ide-primary); }
.ide-lang-menu a:focus-visible { outline-color: var(--ide-focus); box-shadow: none; }
.ide-lang__code { font-size: var(--ide-fs-sm); color: var(--ide-muted); font-weight: 600; }
.ide-nav .ide-lang-menu ul { position: static; box-shadow: none; margin-top: var(--ide-space-1); }
@media (min-width: 992px) { .ide-nav .ide-lang-menu ul { position: absolute; box-shadow: var(--ide-shadow); } }

/* Sélecteur de langue en ligne (pied de page) */
.ide-lang ul { display: flex; flex-wrap: wrap; gap: var(--ide-space-1); list-style: none; margin: 0; padding: 0; }
.ide-lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--ide-touch); min-height: var(--ide-touch); padding: 0 var(--ide-space-2);
  color: inherit; text-decoration: none; font-weight: 600; border-radius: var(--ide-radius-pill);
}
.ide-lang a:hover { background: var(--ide-brume); color: var(--ide-ink); }
.ide-lang a[aria-current="true"] { color: var(--ide-on-primary); background: var(--ide-primary); }

/* Écran plein (vérification) : ni en-tête ni pied */
.ide-bare .ide-header, .ide-bare .ide-footer { display: none; }
.ide-bare .ide-main { padding: 0; display: flex; flex-direction: column; }

/* ---------- 6. Pied de page ---------- */
.ide-footer {
  background: var(--ide-surface); color: var(--ide-muted);
  border-top: 1px solid var(--ide-line);
  padding: var(--ide-space-4) 0 calc(var(--ide-space-4) + env(safe-area-inset-bottom));
  font-size: var(--ide-fs-base);
}
.ide-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ide-space-3); }
.ide-footer__legal { margin: 0; }
.ide-footer a { color: var(--ide-ink); }
.ide-footer__legal a { display: inline-block; padding-block: var(--ide-space-2); }

/* ---------- 7. Messages (flash, alertes) ---------- */
.ide-flashes { margin-bottom: var(--ide-space-4); }
.alert {
  --bs-alert-border-radius: var(--ide-radius-lg);
  --bs-alert-color: var(--ide-ink);
  --bs-alert-link-color: var(--ide-ink);
  --bs-alert-padding-x: var(--ide-space-4);
  --bs-alert-padding-y: var(--ide-space-3);
}
.alert-success { --bs-alert-bg: var(--ide-valid-soft); --bs-alert-border-color: #a8d5bb; --ide-alert-accent: var(--ide-valid-ink); }
.alert-danger  { --bs-alert-bg: var(--ide-stop-soft);  --bs-alert-border-color: #eeb4ae; --ide-alert-accent: var(--ide-stop); }
.alert-warning { --bs-alert-bg: var(--ide-warn-soft);  --bs-alert-border-color: #ecc978; --ide-alert-accent: var(--ide-warn); }
.alert-info    { --bs-alert-bg: var(--ide-info-soft);  --bs-alert-border-color: #b3ccd5; --ide-alert-accent: var(--ide-primary); }
.alert-secondary, .alert-light { --bs-alert-bg: var(--ide-surface-2); --bs-alert-border-color: var(--ide-line-strong); --ide-alert-accent: var(--ide-ink); }
.alert .ide-icon { color: var(--ide-alert-accent, currentColor); }
.alert-heading { color: var(--ide-ink); font-size: var(--ide-fs-lg); }
.ide-flash, .ide-alert { display: flex; align-items: flex-start; gap: var(--ide-space-3); }
/* Pictogramme du message dans une pastille ronde blanche */
.ide-flash__icon, .ide-alert > .ide-icon {
  width: 2rem; height: 2rem; padding: .3rem; margin-top: -.15rem;
  background: var(--ide-surface); border-radius: 50%;
}
.ide-flash__msg, .ide-alert__body { flex: 1; margin: 0; max-width: none; }
.ide-flash__msg { padding-top: .1rem; }
.ide-flash .btn-close { flex: none; width: 1.5rem; height: 1.5rem; padding: .75rem; margin: -.5rem -.5rem -.5rem 0; opacity: .75; border-radius: 50%; }
.ide-alert__body > :last-child { margin-bottom: 0; }
.ide-alert__action { margin-top: var(--ide-space-3); }
/* Résumé d'erreurs de formulaire (focus posé dessus par la page) */
.ide-errsum ul { margin: var(--ide-space-2) 0 0; padding-left: 1.25rem; }
.ide-errsum a { font-weight: 600; }

/* ---------- 8. Boutons ---------- */
.btn {
  --bs-btn-font-family: var(--ide-font);
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: var(--ide-radius-pill);
  --bs-btn-border-radius-sm: var(--ide-radius-pill);
  --bs-btn-border-radius-lg: var(--ide-radius-pill);
  --bs-btn-padding-x: 1.125rem;
  --bs-btn-focus-box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch-admin);
  white-space: normal; text-wrap: balance; text-align: center;
  transition: background-color var(--ide-dur-fast) var(--ide-ease), border-color var(--ide-dur-fast) var(--ide-ease), color var(--ide-dur-fast) var(--ide-ease), transform var(--ide-dur-fast) var(--ide-ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.25rem; --bs-btn-padding-x: .875rem; }
.btn-lg { min-height: var(--ide-touch); }
@media (pointer: coarse) { .btn { min-height: var(--ide-touch); } .btn-sm { min-height: var(--ide-touch-admin); } }
.ide-area-member .btn, .ide-area-partner .btn, .ide-area-public .btn { min-height: var(--ide-touch); font-size: var(--ide-fs-comfort); }
.btn .ide-icon { width: 1.25em; height: 1.25em; color: currentColor; } /* suit le texte du bouton, même dans une alerte (passe après « .alert .ide-icon ») */
.btn:disabled, .btn.disabled { opacity: .6; }
.btn.is-copied { box-shadow: inset 0 0 0 2px var(--ide-valid); }

/* Bouton géant : action principale d'un écran (membre, commerce, activation) */
.btn.ide-bigbtn { /* .btn.ide-bigbtn : passe devant « .ide-area-member .btn » sans !important */
  width: 100%;
  min-height: var(--ide-touch-big);
  padding: var(--ide-space-3) var(--ide-space-5);
  font-size: var(--ide-fs-comfort);
  line-height: 1.25;
}
.ide-bigbtn .ide-icon { width: 1.5rem; height: 1.5rem; }
.btn.ide-bigbtn--auto { width: auto; min-width: min(100%, 16rem); }
/* Action du verdict (posée sur la brume, sous le bloc d'état) : encre, jamais vert ni rouge */
.ide-bigbtn--onstatus {
  --bs-btn-color: #ffffff; --bs-btn-bg: var(--ide-ink); --bs-btn-border-color: var(--ide-ink);
  --bs-btn-hover-color: #ffffff; --bs-btn-hover-bg: #34454b; --bs-btn-hover-border-color: #34454b;
  --bs-btn-active-color: #ffffff; --bs-btn-active-bg: #11181a; --bs-btn-active-border-color: #11181a;
}
.ide-verdict--refused .ide-bigbtn--onstatus { --bs-btn-border-color: var(--ide-ink); }
/* Lien d'action secondaire sous un bouton géant */
.ide-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch); padding-block: 0; padding-inline: 0;
  font-weight: 600; color: var(--ide-primary);
}
.ide-actions { display: flex; flex-wrap: wrap; gap: var(--ide-space-3); align-items: center; }
.ide-actions--end { justify-content: flex-end; }

/* ---------- 9. Formulaires ---------- */
/* Preuve de travail (shield) : pas d'écart tant que pow.js n'a rien à dire ; l'input caché _pow reste envoyé */
.ide-pow:has(> .ide-pow__status:empty) { display: none; }
.form-label { font-weight: 600; margin-bottom: var(--ide-space-1); }
.form-text { color: var(--ide-muted); font-size: var(--ide-fs-sm); }
.ide-area-member .form-text, .ide-area-partner .form-text, .ide-area-public .form-text { font-size: 1rem; }
.form-control, .form-select {
  min-height: var(--ide-touch-admin);
  border-color: var(--ide-line-strong);
  border-radius: var(--ide-radius);
  background-color: var(--ide-surface);
  font-size: max(1rem, 16px); /* ≥ 16 px : pas de zoom automatique sur iPhone */
  padding-inline: .875rem;
}
.form-control-sm, .form-select-sm { min-height: 2.25rem; }
.ide-area-member .form-control, .ide-area-member .form-select,
.ide-area-partner .form-control, .ide-area-partner .form-select,
.ide-area-public .form-control, .ide-area-public .form-select { min-height: var(--ide-touch); font-size: var(--ide-fs-comfort); }
.form-control::placeholder { color: #66777d; opacity: 1; } /* 4,7:1 sur blanc */
.form-control:disabled, .form-select:disabled { background-color: var(--ide-surface-2); }
.form-check { min-height: var(--ide-touch-admin); display: flex; align-items: center; gap: var(--ide-space-2); padding-left: 0; }
.form-check .form-check-input { float: none; margin: 0; width: 1.375rem; height: 1.375rem; flex: none; border-color: var(--ide-line-strong); }
.form-check .form-check-input[type=checkbox] { border-radius: 6px; }
.form-check-label { cursor: pointer; }
.form-control.is-invalid, .form-select.is-invalid, .was-validated .form-control:invalid { border-color: var(--ide-stop); border-width: 2px; }
.invalid-feedback { color: var(--ide-stop); font-weight: 600; font-size: .9375rem; }
.ide-field { margin-bottom: var(--ide-space-4); }
.ide-fieldset { border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); padding: var(--ide-space-4); margin-bottom: var(--ide-space-4); background: var(--ide-surface); }
.ide-fieldset > legend { float: none; width: auto; padding: 0 var(--ide-space-2); font-family: var(--ide-font-display); font-size: var(--ide-fs-lg); font-weight: 700; margin: 0; }
/* Code à 6 chiffres : un seul champ, chiffres espacés */
.ide-code-input {
  display: block; width: 100%; max-width: 15rem; margin-inline: auto;
  text-align: center; font-family: var(--ide-font-num); font-size: var(--ide-fs-code) !important; font-weight: 700;
  letter-spacing: .35em; padding-left: calc(.875rem + .35em);
  font-variant-numeric: tabular-nums; border-radius: var(--ide-radius-lg);
}
/* Mot de passe + bouton « Afficher » (aria-pressed, JS du poste auth) */
/* Dépôt de fichier : vrai <input type=file> dans un <label> (glisser n'est jamais le seul moyen) */
.ide-drop {
  display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-3);
  padding: var(--ide-space-6) var(--ide-space-4); text-align: center;
  background: var(--ide-surface); border: 2px dashed var(--ide-line-strong); border-radius: var(--ide-radius-xl);
}
.ide-drop.is-dragover { border-color: var(--ide-primary); background: var(--ide-primary-soft); }
.ide-drop > .ide-icon { width: 3.25rem; height: 3.25rem; padding: .625rem; color: var(--ide-primary); background: var(--ide-primary-soft); border-radius: 50%; }
.ide-drop input[type=file] { width: 100%; max-width: 28rem; }
/* Champ fichier : bouton « Choisir un fichier » sur toute la largeur, nom du fichier en dessous, centré.
   Côte à côte, le navigateur tronquait le nom dans une colonne étroite (« Auc…choisi »). */
.form-control[type=file] { padding: 0 var(--ide-space-2) var(--ide-space-2); line-height: var(--ide-lh); text-align: center; text-align-last: center; }
.form-control[type=file]::file-selector-button {
  display: block; width: calc(100% + 2px + 2 * var(--ide-space-2)); min-height: calc(var(--ide-touch-admin) - 2px);
  margin: -1px calc(-1px - var(--ide-space-2)) var(--ide-space-2); padding: var(--ide-space-2) var(--ide-space-4);
  font-weight: 600; color: var(--ide-ink); background-color: var(--ide-surface-2);
  border: 0; border-bottom: 1px solid var(--ide-line-strong); border-radius: var(--ide-radius) var(--ide-radius) 0 0;
}
.form-control[type=file]:hover:not(:disabled)::file-selector-button { background-color: var(--ide-brume); }
/* Recherche */
.ide-search { position: relative; max-width: 32rem; }
.ide-search > .ide-icon { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); color: var(--ide-muted); pointer-events: none; }
.ide-search .form-control { padding-left: 2.75rem; border-radius: var(--ide-radius-pill); }
/* Pot de miel (poste shield) : conteneur aria-hidden="true", champ tabindex="-1" */
.ide-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* ---------- 10. Panneaux, en-tête de page, tableaux, badges, filtres ---------- */
.ide-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ide-space-3) var(--ide-space-5); margin-bottom: var(--ide-space-5); }
.ide-pagehead__text { flex: 1 1 22rem; min-width: 0; }
.ide-pagehead h1 { margin: 0; }
.ide-pagehead__lead { margin: var(--ide-space-2) 0 0; color: var(--ide-muted); }
.ide-pagehead__actions { display: flex; flex-wrap: wrap; gap: var(--ide-space-2); }
@media (max-width: 575.98px) { .ide-pagehead__actions, .ide-pagehead__actions .btn { width: 100%; } }
.ide-panel {
  background: var(--ide-surface); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg);
  padding: var(--ide-space-4); margin-bottom: var(--ide-space-4);
  box-shadow: var(--ide-shadow-sm);
}
@media (min-width: 768px) { .ide-panel { padding: var(--ide-space-5); } }
.ide-panel__title { font-size: var(--ide-fs-lg); margin: 0 0 var(--ide-space-3); }
.ide-panel__title > .ide-icon { margin-right: var(--ide-space-2); color: var(--ide-primary); }
.ide-panel--flush { --ide-flush-x: var(--ide-space-4); padding: 0; overflow: hidden; }
@media (min-width: 768px) { .ide-panel--flush { --ide-flush-x: var(--ide-space-5); } }
/* Panneau sans marge : titre, légende, texte (.ide-panel__inset) et 1re / dernière colonne prennent le
   retrait des autres panneaux (--ide-flush-x), pour que tout reste aligné d'un panneau à l'autre. */
.ide-panel--flush > .ide-panel__title { padding: var(--ide-space-4) var(--ide-flush-x) 0; }
.ide-panel--flush > .ide-panel__inset { padding-inline: var(--ide-flush-x); }
.ide-panel--flush > .table, .ide-panel--flush .table-responsive > .table { margin: 0; }
.ide-panel--flush .table caption { padding: var(--ide-space-4) var(--ide-flush-x) var(--ide-space-2); }
.ide-panel--flush .table > :not(caption) > * > :first-child { padding-inline-start: var(--ide-flush-x); }
.ide-panel--flush .table > :not(caption) > * > :last-child { padding-inline-end: var(--ide-flush-x); }
.ide-panel--flush > .ide-empty { margin: var(--ide-space-3) var(--ide-flush-x) var(--ide-space-4); }
/* Mobile : les lignes deviennent des cartes, posées avec une marge dans le panneau (jamais bord à bord) */
@media (max-width: 767.98px) {
  .ide-panel--flush .table.ide-table--stack { padding: 0 var(--ide-space-3) var(--ide-space-1); }
  .ide-panel--flush .table.ide-table--stack caption { padding-inline: var(--ide-space-1); }
}
.ide-dl { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: var(--ide-space-2) var(--ide-space-4); margin: 0; }
.ide-dl dt { font-weight: 600; color: var(--ide-muted); }
.ide-dl dd { margin: 0; }
@media (max-width: 575.98px) { .ide-dl { grid-template-columns: 1fr; } .ide-dl dd { margin-bottom: var(--ide-space-2); } }

.table {
  --bs-table-bg: var(--ide-surface);
  --bs-table-color: var(--ide-ink);
  --bs-table-border-color: var(--ide-line);
  --bs-table-striped-bg: #f6fafb;
  --bs-table-hover-bg: #f0f6f7;
  --bs-table-active-bg: var(--ide-primary-soft);
  vertical-align: middle;
}
.table > :not(caption) > * > * { padding: var(--ide-space-3); }
.table thead th, .table > thead > tr > th { font-weight: 600; color: var(--ide-muted); background: var(--ide-surface); border-bottom: 2px solid var(--ide-line-strong); white-space: nowrap; }
.table caption { caption-side: top; color: var(--ide-ink); font-family: var(--ide-font-display); font-weight: 700; padding: 0 0 var(--ide-space-2); }
.table .ide-num, .table td.num, .table th.num { text-align: right; font-family: var(--ide-font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-sm > :not(caption) > * > * { padding: var(--ide-space-2); }
.ide-table__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ide-space-2); }
.ide-table__photo { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 50%; background: var(--ide-surface-2); }
.ide-table__who { display: flex; align-items: center; gap: var(--ide-space-3); }
/* Tableau empilé en cartes sous 768 px : chaque <td> porte data-label="…" (texte traduit) */
@media (max-width: 767.98px) {
  .ide-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ide-table--stack, .ide-table--stack tbody, .ide-table--stack tr, .ide-table--stack td { display: block; width: 100%; }
  .ide-table--stack tr { border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); margin-bottom: var(--ide-space-3); background: var(--ide-surface); padding: var(--ide-space-2) 0; overflow: hidden; }
  .ide-table--stack > :not(caption) > * > * { border-bottom-width: 0; padding: var(--ide-space-2) var(--ide-space-4); }
  .ide-table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--ide-fs-sm); font-weight: 600; color: var(--ide-muted); }
  .ide-table--stack caption { display: block; width: 100%; }
  .table.ide-table--stack td.num, .table.ide-table--stack .ide-num { text-align: left; }
  .ide-table--stack .ide-table__actions { justify-content: flex-start; }
}

/* Badges d'état : pictogramme (forme) + mot, jamais la couleur seule */
.ide-badge {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .75rem .25rem .5rem; border-radius: var(--ide-radius-pill);
  font-size: var(--ide-fs-sm); font-weight: 600; line-height: 1.3;
  max-width: 100%; overflow-wrap: break-word; /* un libellé long passe à la ligne : jamais de défilement horizontal */
  background: var(--ide-surface-2); color: var(--ide-ink); border: 1px solid transparent;
}
.table .ide-badge { white-space: nowrap; }
.ide-area-member .ide-badge, .ide-area-partner .ide-badge { font-size: 1rem; }
.ide-badge .ide-icon { width: 1.05em; height: 1.05em; vertical-align: 0; }
.ide-badge--ok   { background: var(--ide-valid-soft); color: var(--ide-valid-ink); border-color: #a8d5bb; }
.ide-badge--off  { background: var(--ide-stop-soft);  color: var(--ide-stop);  border-color: #eeb4ae; }
.ide-badge--wait { background: var(--ide-surface);    color: var(--ide-muted); border-color: var(--ide-line-strong); }
.ide-badge--warn { background: var(--ide-warn-soft);  color: var(--ide-warn);  border-color: #ecc978; }
.ide-badge--info { background: var(--ide-info-soft);  color: var(--ide-primary); border-color: #b3ccd5; }
.ide-badge--neutral { background: var(--ide-surface-2); color: var(--ide-ink); border-color: var(--ide-line); }

/* Filtres en puces (GET : aria-current="true" ; bouton : aria-pressed) */
.ide-chips { display: flex; flex-wrap: wrap; gap: var(--ide-space-2); list-style: none; margin: 0 0 var(--ide-space-4); padding: 0; }
.ide-chip {
  display: inline-flex; align-items: center; gap: var(--ide-space-2);
  min-height: var(--ide-touch-admin); padding: 0 var(--ide-space-4);
  background: var(--ide-surface); color: var(--ide-ink); text-decoration: none; font-weight: 600;
  border: 1px solid var(--ide-line-strong); border-radius: var(--ide-radius-pill);
}
.ide-chip:hover { color: var(--ide-ink); background: var(--ide-primary-soft); border-color: var(--ide-primary); }
.ide-chip[aria-current="true"], .ide-chip[aria-pressed="true"] { background: var(--ide-primary); color: #ffffff; border-color: var(--ide-primary); }
.ide-chip__count { font-family: var(--ide-font-num); font-variant-numeric: tabular-nums; font-weight: 500; }
.ide-chip[aria-current="true"] .ide-chip__count, .ide-chip[aria-pressed="true"] .ide-chip__count { color: var(--ide-accent); }

/* Liste « À faire » (tableau de bord) et santé du système */
.ide-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ide-space-2); }
.ide-todo li {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-3);
  padding: var(--ide-space-3) var(--ide-space-4) var(--ide-space-3) var(--ide-space-5);
  background: var(--ide-surface); position: relative;
  border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg);
}
/* Pastille d'accent à gauche (sapin, brun ou rouge) : le texte porte le sens */
.ide-todo li::before {
  content: ""; position: absolute; left: var(--ide-space-2); top: var(--ide-space-3); bottom: var(--ide-space-3);
  width: 5px; border-radius: var(--ide-radius-pill); background: var(--ide-primary);
}
.ide-todo li.is-warn::before { background: var(--ide-warn); }
.ide-todo li.is-stop::before { background: var(--ide-stop); }
.ide-todo__text { flex: 1 1 auto; max-width: none; margin: 0; }

/* ---------- 11. Écran « une action » (membre, commerce, activation) ---------- */
.ide-screen {
  display: flex; flex-direction: column; gap: var(--ide-space-4);
  width: 100%; max-width: 34rem; margin-inline: auto;
  padding: var(--ide-space-4) var(--ide-gutter) calc(var(--ide-space-4) + env(safe-area-inset-bottom));
  min-height: calc(100svh - 12rem);
  text-align: center;
}
.ide-screen--inline { min-height: 0; } /* écran intégré dans une page (vignette, back-office) */
/* Pictogramme dans un grand disque doux : la forme ronde porte la marque */
.ide-screen__icon {
  align-self: center; width: clamp(5rem, 22vw, 7rem); height: clamp(5rem, 22vw, 7rem);
  padding: clamp(.875rem, 4vw, 1.25rem); border-radius: 50%;
  color: var(--ide-primary); background: var(--ide-primary-soft);
}
.ide-screen--success .ide-screen__icon { color: var(--ide-valid); background: var(--ide-valid-soft); }
.ide-screen--error .ide-screen__icon { color: var(--ide-stop); background: var(--ide-stop-soft); }
.ide-screen--warn .ide-screen__icon { color: var(--ide-warn); background: var(--ide-warn-soft); }
.ide-screen__title { margin: 0; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.25rem); }
.ide-screen__lead { margin: 0 auto; font-size: var(--ide-fs-comfort); max-width: 32ch; }
.ide-screen__body { display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-4); }
.ide-screen__body > * { max-width: 100%; }
.ide-screen__body--left { align-items: stretch; text-align: left; }
.ide-screen__actions { margin-top: auto; display: grid; gap: var(--ide-space-2); padding-top: var(--ide-space-4); }
.ide-screen__help { font-size: var(--ide-fs-comfort); color: var(--ide-muted); margin: 0 auto; }
.ide-screen__help a { color: var(--ide-ink); }
/* Aiguillage « Vous êtes… » (promo, landing) : portes de même poids */
.ide-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--ide-space-3); list-style: none; margin: 0; padding: 0; text-align: left; }
.ide-door {
  display: flex; flex-direction: column; gap: var(--ide-space-2); height: 100%;
  padding: var(--ide-space-5) var(--ide-space-4); background: var(--ide-surface); color: var(--ide-ink);
  border: 2px solid var(--ide-line); border-radius: var(--ide-radius-lg); text-decoration: none;
  box-shadow: var(--ide-shadow-sm);
  transition: border-color var(--ide-dur-fast) var(--ide-ease), transform var(--ide-dur-fast) var(--ide-ease);
}
.ide-door:hover { border-color: var(--ide-primary); color: var(--ide-ink); transform: translateY(-2px); }
.ide-door > .ide-icon { width: 3rem; height: 3rem; padding: .625rem; color: var(--ide-primary); background: var(--ide-accent-soft); border-radius: 50%; }
.ide-door__title { font-family: var(--ide-font-display); font-size: var(--ide-fs-lg); font-weight: 700; line-height: var(--ide-lh-tight); }
.ide-door__text { color: var(--ide-muted); font-size: var(--ide-fs-comfort); }
/* Bandeau d'information (page promo : « se vérifie uniquement… ») */
.ide-note {
  display: flex; align-items: flex-start; gap: var(--ide-space-3); text-align: left;
  padding: var(--ide-space-3) var(--ide-space-4); background: var(--ide-info-soft); color: var(--ide-ink);
  border: 1px solid #b3ccd5; border-radius: var(--ide-radius-lg);
}
.ide-note > .ide-icon { color: var(--ide-primary); width: 2rem; height: 2rem; padding: .3rem; background: var(--ide-surface); border-radius: 50%; }
.ide-note p { margin: 0; }

/* ---------- 12. Gestes, étapes, attente, codes, QR ---------- */
/* Les 2 gestes ① viser ② toucher */
.ide-gestures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: var(--ide-space-3); list-style: none; margin: 0; padding: 0; counter-reset: ide-gesture; }
.ide-gestures li {
  counter-increment: ide-gesture; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-2);
  padding: var(--ide-space-5) var(--ide-space-3) var(--ide-space-4); background: var(--ide-surface);
  border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); font-weight: 600; text-align: center;
  box-shadow: var(--ide-shadow-sm);
}
/* Numéro en pastille abricot (texte encre 7,3:1) */
.ide-gestures li::before {
  content: counter(ide-gesture); position: absolute; top: var(--ide-space-2); left: var(--ide-space-2);
  display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%;
  background: var(--ide-accent); color: var(--ide-ink); font-family: var(--ide-font-num); font-size: 1rem; font-weight: 800;
}
.ide-gestures li > .ide-icon { width: 2.75rem; height: 2.75rem; color: var(--ide-primary); }

/* Étapes (import) : <ol> + aria-current="step" */
.ide-steps { display: flex; flex-wrap: wrap; gap: var(--ide-space-2) var(--ide-space-4); list-style: none; margin: 0 0 var(--ide-space-2); padding: 0; counter-reset: ide-step; }
.ide-steps li { counter-increment: ide-step; display: flex; align-items: center; gap: var(--ide-space-2); color: var(--ide-muted); }
.ide-steps li::before {
  content: counter(ide-step); display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 2px solid var(--ide-line-strong); background: var(--ide-surface); color: var(--ide-muted);
  font-family: var(--ide-font-num); font-weight: 800;
}
.ide-steps li.is-done { color: var(--ide-ink); }
.ide-steps li.is-done::before { content: "✓"; background: var(--ide-primary-soft); border-color: var(--ide-primary); color: var(--ide-primary); }
.ide-steps li[aria-current="step"] { color: var(--ide-ink); font-weight: 600; }
.ide-steps li[aria-current="step"]::before { background: var(--ide-primary); border-color: var(--ide-primary); color: #ffffff; }
.ide-steps__count { font-size: var(--ide-fs-sm); color: var(--ide-muted); margin: 0 0 var(--ide-space-4); }

/* Attente en direct (activation) : zone aria-live présente dès le chargement */
.ide-waiting { display: inline-flex; align-items: center; gap: var(--ide-space-3); font-weight: 600; margin: 0; }
.ide-waiting__dot { width: .875rem; height: .875rem; border-radius: 50%; background: var(--ide-primary); flex: none; animation: ide-pulse 1.2s var(--ide-ease) infinite; }
.ide-waiting.is-done .ide-waiting__dot { animation: none; background: var(--ide-valid); }
.ide-countdown { color: var(--ide-muted); font-variant-numeric: tabular-nums; margin: 0; }

/* Code affiché (secours) : groupes 3 + 3 */
.ide-code { display: inline-flex; gap: .5em; font-family: var(--ide-font-num); font-size: var(--ide-fs-code); font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; line-height: 1.1; }
/* Mot de confiance (formation, résultat) */
.ide-trustword {
  display: inline-flex; align-items: center; gap: var(--ide-space-3);
  padding: var(--ide-space-2) var(--ide-space-5); background: var(--ide-surface); color: var(--ide-ink);
  border: 2px solid var(--ide-ink); border-radius: var(--ide-radius-pill);
  font-family: var(--ide-font-display); font-size: var(--ide-fs-code); font-weight: 800; line-height: 1.2;
}
/* Cadre de QR : toujours noir sur blanc, zone de silence intacte */
.ide-qr {
  display: inline-block; width: 100%; max-width: 20rem;
  background: #ffffff; color: #000000; padding: var(--ide-space-3);
  border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg);
}
.ide-qr svg, .ide-qr img { display: block; width: 100%; height: auto; }
.ide-qr--sm { max-width: 12rem; }
.ide-qr__caption { margin: var(--ide-space-2) 0 0; font-size: 1rem; color: var(--ide-muted); text-align: center; }
.ide-qr.is-expired svg { opacity: .12; }

/* ---------- 13. Carte membre (format ID-1) ----------
   Direction C : fond brume, rond sapin en haut à droite, petit rond abricot en bas,
   fente de badge, photo ronde, prénom + NOM, entreprise en pastille à sa couleur.
   Le corps et l'identité sont « aplatis » (display: contents) pour que la pastille
   se place sous le nom sans changer le balisage des postes.
   Pas d'overflow:hidden : un nom long agrandit la carte au lieu d'être coupé. */
.ide-card {
  container-type: inline-size;
  position: relative; isolation: isolate;
  width: min(100%, 26.25rem);
  aspect-ratio: 85.6 / 54;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 29% minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "photo ." "photo first" "photo last" "photo label" "photo band" "photo ." "foot foot";
  column-gap: 5%;
  padding: 1.125rem 1.25rem .875rem;
  background: var(--ide-brume); color: var(--ide-ink);
  border-radius: var(--ide-radius-card);
  box-shadow: var(--ide-shadow), inset 0 0 0 1px rgb(31 42 46 / .07);
  text-align: left;
}
/* Formes rondes de la marque (fond, découpé aux coins de la carte). Le grand rond sapin est
   ancré en bas à droite, sous la zone de texte : l'encre n'est jamais posée sur le sapin, même
   quand un nom long agrandit la carte. Le petit rond abricot (encre dessus : 7,3:1) peut, lui,
   passer sous un prénom long. */
.ide-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(circle 24cqw at calc(100% - 2cqw) calc(100% + 8cqw), var(--ide-primary) calc(100% - .5px), transparent 100%),
    radial-gradient(circle 10cqw at calc(100% + 1cqw) 2cqw, var(--ide-accent) calc(100% - .5px), transparent 100%);
}
/* Fente du badge */
.ide-card::after {
  content: ""; position: absolute; top: 2.2cqw; left: 50%; translate: -50% 0; z-index: -1;
  width: 12cqw; height: 1.8cqw; border-radius: 1cqw; background: var(--ide-ink); opacity: .16;
}
.ide-card__body, .ide-card__id { display: contents; }
.ide-card__photo {
  grid-area: photo; align-self: center;
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: .9cqw solid #ffffff; background: var(--ide-surface-2);
  box-shadow: 0 2px 6px -2px rgb(31 42 46 / .25);
}
.ide-card__photo--none { display: grid; place-items: center; color: var(--ide-muted); }
.ide-card__photo--none .ide-icon { width: 55%; height: 55%; }
.ide-card__first { grid-area: first; margin: 0; font-size: clamp(1rem, 5.2cqw, 1.375rem); font-weight: 500; line-height: 1.15; overflow-wrap: anywhere; }
.ide-card__last {
  grid-area: last; margin: .4cqw 0 0;
  font-family: var(--ide-font-display); font-size: clamp(1.25rem, 7.4cqw, 2rem); font-weight: 800;
  line-height: 1.02; letter-spacing: -.02em; overflow-wrap: anywhere;
}
.ide-card__label { grid-area: label; margin: 1.5cqw 0 0; font-size: clamp(.875rem, 3.6cqw, 1rem); color: var(--ide-muted); }
/* Pastille de l'entreprise, à sa couleur (contraste garanti par le poste companies) */
.ide-card__band {
  grid-area: band; justify-self: start;
  display: inline-flex; align-items: center; gap: 1.6cqw;
  max-width: 100%; margin-top: 2.6cqw; padding: 1.1cqw 2.8cqw 1.1cqw 2.2cqw;
  background: var(--brand-bg); color: var(--brand-fg);
  border-radius: var(--ide-radius-pill);
}
.ide-card__logo { height: 5cqw; min-height: 1.125rem; max-width: 22cqw; width: auto; object-fit: contain; flex: none; }
.ide-card__company { font-weight: 600; font-size: clamp(.875rem, 3.5cqw, 1rem); line-height: 1.2; overflow-wrap: anywhere; }
.ide-card__band .ide-brand__mark { width: auto; height: 5cqw; min-height: 1.125rem; }
.ide-card__foot {
  grid-area: foot;
  display: flex; align-items: center; gap: 1.8cqw;
  margin-top: 2.4cqw;
  font-size: clamp(.875rem, 3.4cqw, 1rem); font-weight: 600; color: var(--ide-ink);
}
.ide-card__foot .ide-brand__mark { width: auto; height: 6cqw; min-height: 1.25rem; min-width: 0; }
/* Exemple flouté (page promo, landing) : aucune donnée réelle, conteneur aria-hidden="true" */
.ide-card.is-sample .ide-card__photo,
.ide-card.is-sample .ide-card__id,
.ide-card.is-sample .ide-card__first,
.ide-card.is-sample .ide-card__last,
.ide-card.is-sample .ide-card__logo,
.ide-card.is-sample .ide-card__company { filter: blur(6px); }
/* QR de la carte : sous la carte, grand (≥ 15 rem), toujours noir sur blanc */
.ide-card-qr { width: min(100%, 26.25rem); margin: var(--ide-space-5) auto 0; text-align: center; }
.ide-card-qr .ide-qr { max-width: 18rem; border-radius: var(--ide-radius-xl); box-shadow: var(--ide-shadow-sm); }
.ide-card-qr__hint { margin: var(--ide-space-3) auto 0; font-size: var(--ide-fs-comfort); }
.ide-card.is-off { filter: grayscale(1); opacity: .7; }

/* Bandeau de l'entreprise (écrans membre, P8) */
.ide-company-bar {
  display: flex; align-items: center; gap: var(--ide-space-3);
  padding: var(--ide-space-3) var(--ide-gutter); background: var(--brand-bg); color: var(--brand-fg);
  font-weight: 600; font-size: var(--ide-fs-lg);
}
.ide-company-bar img { height: 2rem; width: auto; max-width: 8rem; object-fit: contain; }
.ide-company-bar__name { overflow-wrap: anywhere; }

/* Offres (membre) */
.ide-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ide-space-3); text-align: left; }
.ide-offer { padding: var(--ide-space-4); background: var(--ide-surface); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); box-shadow: var(--ide-shadow-sm); }
.ide-offer__shop { display: flex; align-items: center; gap: var(--ide-space-2); margin: 0; font-family: var(--ide-font-display); font-weight: 700; font-size: var(--ide-fs-lg); }
.ide-offer__shop .ide-icon { color: var(--ide-primary); }
.ide-offer__city { margin: 0; color: var(--ide-muted); font-size: 1rem; }
.ide-offer__title { margin: var(--ide-space-2) 0 0; }
.ide-offer__dates { margin: var(--ide-space-1) 0 0; color: var(--ide-muted); font-size: 1rem; }

/* ---------- 14. Verdict de scan (écran de vérification) ---------- */
/* Direction C : écran brume, verdict dans un grand bloc arrondi PLEIN vert / rouge / ambre / ardoise.
   Identique en mode clair/sombre, jamais animé à l'entrée. DOM : corps (verdict) d'abord pour que
   le lecteur d'écran lise le verdict en premier ; le bandeau de confiance et l'horloge sont remontés
   visuellement (order). */
.ide-verdict {
  --verdict-bg: var(--ide-error);
  --verdict-fg: var(--ide-on-status);
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  background: var(--ide-bg); color: var(--ide-ink);
  font-size: var(--ide-fs-comfort);
  color-scheme: light;
}
.ide-verdict--valid   { --verdict-bg: var(--ide-valid); }
.ide-verdict--invalid { --verdict-bg: var(--ide-stop); }
.ide-verdict--unknown { --verdict-bg: var(--ide-stop); }
.ide-verdict--refused { --verdict-bg: var(--ide-refused); --verdict-fg: var(--ide-on-refused); }
.ide-verdict--error, .ide-verdict--offline { --verdict-bg: var(--ide-error); }

/* Bandeau de confiance : nom du commerce + mot de confiance (toujours présent) */
.ide-trustbar {
  order: -2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--ide-space-1) var(--ide-space-4);
  padding: calc(var(--ide-space-3) + env(safe-area-inset-top)) var(--ide-gutter) var(--ide-space-3);
  background: var(--ide-surface); color: var(--ide-ink);
  font-size: var(--ide-fs-lg); font-weight: 600; line-height: 1.25;
}
.ide-trustbar__shop { display: inline-flex; align-items: center; gap: var(--ide-space-2); overflow-wrap: anywhere; font-family: var(--ide-font-display); font-weight: 700; }
.ide-trustbar__shop .ide-icon { color: var(--ide-primary); }
.ide-trustbar__word { display: inline-flex; align-items: center; gap: var(--ide-space-2); font-weight: 400; }
.ide-trustbar__word strong { font-family: var(--ide-font-display); font-weight: 800; }
/* Sur l'écran de vérification, le bandeau est posé sur la brume */
.ide-verdict > .ide-trustbar { background: transparent; }
/* Dans un écran « une action » (ex. /partner/activate.php, écran terminé), le bandeau suit le texte qui l'annonce ; le verdict garde order: -2 */
.ide-screen__body > .ide-trustbar { order: 0; border-radius: var(--ide-radius-lg); border: 1px solid var(--ide-line); padding: var(--ide-space-3) var(--ide-space-4); }

/* Bande vivante : heure de Zurich + jour (couleur + nom) + barre des secondes. aria-hidden="true". */
.ide-live {
  order: -1;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--ide-space-2) var(--ide-space-3);
  margin: 0 var(--ide-gutter);
  padding: var(--ide-space-2) var(--ide-space-4) var(--ide-space-3);
  background: var(--ide-ink); color: #ffffff;
  border-radius: var(--ide-radius-lg);
}
.ide-live__time { font-family: var(--ide-font-num); font-size: var(--ide-fs-clock); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; line-height: 1.1; }
.ide-live__day {
  display: inline-flex; align-items: center; justify-self: end;
  padding: .25rem .875rem; border-radius: var(--ide-radius-pill);
  background: var(--ide-day-bg, #3d4b59); color: #ffffff; font-weight: 600; font-size: 1rem;
  border: 2px solid #ffffff;
}
.ide-live__bar { grid-column: 1 / -1; height: .375rem; background: rgb(255 255 255 / .25); border-radius: var(--ide-radius-pill); overflow: hidden; }
.ide-live__sweep {
  display: block; height: 100%; width: 100%; background: #ffffff;
  transform-origin: left center; transform: scaleX(0);
  animation: ide-sweep 60s linear infinite;
  animation-delay: var(--ide-live-offset, 0s); /* verify.js pose -<secondes>s via setProperty */
}
.ide-day--1 { --ide-day-bg: var(--ide-day-1); }
.ide-day--2 { --ide-day-bg: var(--ide-day-2); }
.ide-day--3 { --ide-day-bg: var(--ide-day-3); }
.ide-day--4 { --ide-day-bg: var(--ide-day-4); }
.ide-day--5 { --ide-day-bg: var(--ide-day-5); }
.ide-day--6 { --ide-day-bg: var(--ide-day-6); }
.ide-day--7 { --ide-day-bg: var(--ide-day-7); }

/* Corps : bloc d'état coloré, puis personne, horodatage, action (sur la brume) */
.ide-verdict__body {
  flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-4);
  padding: var(--ide-space-4) var(--ide-gutter) calc(var(--ide-space-4) + env(safe-area-inset-bottom));
  text-align: center;
  background: var(--ide-bg); color: var(--ide-ink); /* ici (et pas seulement sur la section) pour que le grisé s'applique */
  animation: ide-stale 1ms linear 120s forwards; /* résultat grisé après 2 min, même sans JS */
}
/* Le bloc d'état : plein, arrondi, au moins ~40 % de la hauteur de l'écran */
.ide-verdict__state {
  width: 100%; max-width: 36rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ide-space-2);
  min-height: clamp(13rem, 40svh, 24rem);
  padding: var(--ide-space-6) var(--ide-space-4);
  background: var(--verdict-bg); color: var(--verdict-fg);
  border-radius: var(--ide-radius-xl);
}
.ide-verdict__icon { width: clamp(4rem, 20vw, 6rem); height: clamp(4rem, 20vw, 6rem); }
.ide-verdict__word {
  margin: 0; color: inherit;
  font-family: var(--ide-font-display); font-size: var(--ide-fs-status); font-weight: 800; line-height: .95;
  text-transform: uppercase; letter-spacing: -.01em;
  overflow-wrap: break-word; text-wrap: balance; max-width: 100%;
}
.ide-verdict--refused .ide-verdict__word,
.ide-verdict--unknown .ide-verdict__word,
.ide-verdict--error .ide-verdict__word,
.ide-verdict--offline .ide-verdict__word { font-size: var(--ide-fs-status-long); }
.ide-verdict__say { margin: 0; max-width: 30ch; font-size: var(--ide-fs-lg); font-weight: 600; line-height: 1.3; color: inherit; }
.ide-verdict__person { display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-2); }
/* Photo : portrait 5:6 (comparer le visage est le geste clé), coins très arrondis */
.ide-verdict__photo {
  width: clamp(8rem, 40vw, 10rem); aspect-ratio: 5 / 6; object-fit: cover;
  border: 4px solid #ffffff; border-radius: var(--ide-radius-xl); background: var(--ide-surface-2);
  box-shadow: var(--ide-shadow);
}
.ide-verdict__name { margin: 0; font-family: var(--ide-font-display); font-size: 1.75rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.ide-verdict__company {
  margin: 0; display: inline-flex; align-items: center; gap: var(--ide-space-2);
  padding: .25rem var(--ide-space-4) .25rem var(--ide-space-2); min-height: 2.5rem;
  background: var(--ide-surface); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-pill);
  font-size: var(--ide-fs-comfort); font-weight: 600;
}
.ide-verdict__company img { height: 1.75rem; width: auto; max-width: 6rem; object-fit: contain; background: #ffffff; border-radius: var(--ide-radius-pill); padding: 2px; }
/* Offre(s) à accorder (VALIDE seulement) : carte claire bordée de vert, titre en grand */
.ide-verdict__offers {
  width: 100%; max-width: 36rem; padding: var(--ide-space-4); text-align: left;
  background: var(--ide-surface); border: 2px solid var(--ide-valid); border-radius: var(--ide-radius-xl); box-shadow: var(--ide-shadow-sm);
}
.ide-verdict__offers-title {
  display: flex; align-items: center; gap: var(--ide-space-2); margin: 0 0 var(--ide-space-2);
  font-size: var(--ide-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ide-valid-ink);
}
.ide-verdict__offers-title .ide-icon { flex: none; width: 1.75rem; height: 1.75rem; padding: .3rem; border-radius: 50%; background: var(--ide-valid-soft); color: var(--ide-valid-ink); }
.ide-verdict__offers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ide-space-2); }
.ide-verdict__offers li { display: flex; flex-direction: column; gap: .125rem; }
.ide-verdict__offers li + li { padding-top: var(--ide-space-2); border-top: 1px solid var(--ide-line); }
.ide-verdict__offers strong { font-family: var(--ide-font-display); font-size: 1.375rem; line-height: 1.2; overflow-wrap: anywhere; }
.ide-verdict__offers span { color: var(--ide-muted); font-size: var(--ide-fs-comfort); }
@media (forced-colors: active) { .ide-verdict__offers { border-color: CanvasText; } }
.ide-verdict__stamp { margin: 0; font-size: var(--ide-fs-comfort); font-variant-numeric: tabular-nums; color: var(--ide-muted); }
.ide-verdict__stale {
  margin: 0; padding: var(--ide-space-3) var(--ide-space-4);
  background: #ffffff; color: var(--ide-ink); border: 2px solid var(--ide-ink); border-radius: var(--ide-radius-lg); font-weight: 600;
  visibility: hidden; max-height: 0; overflow: hidden; padding-block: 0;
  animation: ide-stale-show 1ms linear 120s forwards;
}
.ide-verdict__actions { width: 100%; max-width: 26rem; margin-top: auto; display: grid; gap: var(--ide-space-2); }
.ide-verdict.is-stale .ide-verdict__body { filter: grayscale(1); }
.ide-verdict.is-stale .ide-verdict__stale { visibility: visible; max-height: none; padding-block: var(--ide-space-3); }
/* Vignette (formation du vendeur, guide de style) : pas plein écran, pas de minuterie */
.ide-verdict--mini { min-height: 0; max-width: 22rem; margin-inline: auto; border-radius: var(--ide-radius-xl); overflow: hidden; box-shadow: var(--ide-shadow); font-size: 1rem; border: 1px solid var(--ide-line); }
.ide-verdict--mini .ide-trustbar { font-size: 1rem; padding: var(--ide-space-3) var(--ide-space-3) var(--ide-space-2); }
.ide-verdict--mini .ide-live { margin-inline: var(--ide-space-3); padding-inline: var(--ide-space-3); }
.ide-verdict--mini .ide-live__time { font-size: 1.5rem; }
.ide-verdict--mini .ide-verdict__body { padding: var(--ide-space-3); gap: var(--ide-space-3); animation: none; }
.ide-verdict--mini .ide-verdict__state { min-height: 0; padding: var(--ide-space-4) var(--ide-space-3); border-radius: var(--ide-radius-lg); }
.ide-verdict--mini .ide-verdict__stale { animation: none; }
.ide-verdict--mini .ide-verdict__icon { width: 3rem; height: 3rem; }
.ide-verdict--mini .ide-verdict__word { font-size: 2rem; }
.ide-verdict--mini .ide-verdict__say { font-size: 1rem; }
.ide-verdict--mini .ide-verdict__photo { width: 5rem; border-radius: var(--ide-radius-lg); }
.ide-verdict--mini .ide-verdict__name { font-size: 1.25rem; }
.ide-verdict--mini .ide-verdict__company { font-size: 1rem; }

/* ---------- 15. Statistiques ---------- */
.ide-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--ide-space-3); list-style: none; margin: 0 0 var(--ide-space-5); padding: 0; }
.ide-kpi { padding: var(--ide-space-4) var(--ide-space-5); background: var(--ide-surface); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); box-shadow: var(--ide-shadow-sm); }
.ide-kpi__value { display: block; font-family: var(--ide-font-num); font-size: 2.25rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ide-primary); }
.ide-kpi__label { display: block; margin-top: var(--ide-space-1); font-weight: 600; }
.ide-kpi__trend { display: block; margin-top: var(--ide-space-1); font-size: var(--ide-fs-sm); color: var(--ide-muted); }
/* Barres : <meter> (ou <progress>) — la largeur vient de value/max, jamais de style="" */
.ide-bars { margin: 0 0 var(--ide-space-5); }
.ide-bars figcaption, .ide-bars__title { font-weight: 600; margin-bottom: var(--ide-space-3); }
.ide-bars__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ide-space-2); }
.ide-bars__row { display: grid; grid-template-columns: minmax(5rem, 32%) 1fr minmax(3rem, auto); align-items: center; gap: var(--ide-space-3); }
.ide-bars__label { overflow-wrap: anywhere; }
.ide-bars__value { text-align: right; font-family: var(--ide-font-num); font-weight: 700; font-variant-numeric: tabular-nums; }
meter.ide-bar, progress.ide-bar {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  display: block; width: 100%; height: 1.25rem; border: 0; border-radius: var(--ide-radius-pill);
  background: var(--ide-surface-2); color: var(--ide-primary); overflow: hidden;
}
progress.ide-bar::-webkit-progress-bar { background: var(--ide-surface-2); border-radius: var(--ide-radius-pill); }
progress.ide-bar::-webkit-progress-value { background: var(--ide-primary); border-radius: var(--ide-radius-pill); }
progress.ide-bar::-moz-progress-bar { background: var(--ide-primary); border-radius: var(--ide-radius-pill); }
meter.ide-bar::-webkit-meter-bar { background: var(--ide-surface-2); border: 0; border-radius: var(--ide-radius-pill); height: 1.25rem; }
meter.ide-bar::-webkit-meter-optimum-value,
meter.ide-bar::-webkit-meter-suboptimum-value,
meter.ide-bar::-webkit-meter-even-less-good-value { background: var(--ide-primary); border-radius: var(--ide-radius-pill); }
meter.ide-bar::-moz-meter-bar { background: var(--ide-primary); border-radius: var(--ide-radius-pill); }
/* Série secondaire (ex. refus) : encre hachurée, distinguable en niveaux de gris */
progress.ide-bar--alt::-webkit-progress-value, meter.ide-bar--alt::-webkit-meter-optimum-value,
meter.ide-bar--alt::-webkit-meter-suboptimum-value, meter.ide-bar--alt::-webkit-meter-even-less-good-value {
  background: repeating-linear-gradient(135deg, var(--ide-ink) 0 4px, var(--ide-muted) 4px 8px);
}
progress.ide-bar--alt::-moz-progress-bar, meter.ide-bar--alt::-moz-meter-bar {
  background: repeating-linear-gradient(135deg, var(--ide-ink) 0 4px, var(--ide-muted) 4px 8px);
}
/* Carte de chaleur jour × heure : 5 niveaux calculés côté serveur, nombre écrit dans chaque case */
.ide-heat caption { caption-side: top; color: var(--ide-ink); font-family: var(--ide-font-display); font-weight: 700; padding: 0 0 var(--ide-space-2); }
.ide-heat { border-collapse: separate; border-spacing: 3px; font-family: var(--ide-font-num); font-variant-numeric: tabular-nums; font-size: var(--ide-fs-sm); }
.ide-heat th { font-family: var(--ide-font); font-weight: 600; color: var(--ide-muted); padding: var(--ide-space-1); text-align: center; white-space: nowrap; }
.ide-heat td { min-width: 2.25rem; height: 2rem; text-align: center; border-radius: var(--ide-radius-sm); padding: 0 var(--ide-space-1); }
.ide-heat-0 { background: var(--ide-surface); color: var(--ide-muted); border: 1px solid var(--ide-line); }
.ide-heat-1 { background: #dcebe5; color: var(--ide-ink); }        /* encre 11,9:1 */
.ide-heat-2 { background: #b5d3c6; color: var(--ide-ink); }        /* encre 9,2:1 */
.ide-heat-3 { background: #2e6352; color: #ffffff; }               /* blanc 7,0:1 */
.ide-heat-4 { background: var(--ide-primary); color: #ffffff; font-weight: 700; }
.ide-trust-line { display: inline-flex; align-items: center; gap: var(--ide-space-2); font-weight: 600; }
.ide-trust-line .ide-icon { color: var(--ide-primary); }

/* ---------- 16. États vides, pages d'erreur, chargement ---------- */
.ide-empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--ide-space-3);
  padding: var(--ide-space-7) var(--ide-space-4); text-align: center;
  background: var(--ide-surface); border: 2px dashed var(--ide-line); border-radius: var(--ide-radius-xl);
}
.ide-empty > .ide-icon { width: 4rem; height: 4rem; padding: .875rem; color: var(--ide-primary); background: var(--ide-brume); border-radius: 50%; }
.ide-empty__title { margin: 0; font-family: var(--ide-font-display); font-size: var(--ide-fs-lg); font-weight: 700; }
.ide-empty__text { margin: 0; color: var(--ide-muted); max-width: 44ch; }
.ide-error { padding: var(--ide-space-7) var(--ide-gutter); text-align: center; }
.ide-error p { margin-inline: auto; }
/* Squelette de chargement (affiché après 300 ms par le JS du poste, toujours avec un texte) */
.ide-skeleton { display: block; background: var(--ide-surface-2); border-radius: var(--ide-radius-pill); min-height: 1em; animation: ide-shimmer 1.4s ease-in-out infinite; }
.ide-loading { display: inline-flex; align-items: center; gap: var(--ide-space-2); color: var(--ide-muted); font-weight: 600; }
.ide-loading::before { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ide-spin .8s linear infinite; }

/* ---------- 17. Mouvement ---------- */
@keyframes ide-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes ide-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ide-stale { to { filter: grayscale(1); } }
@keyframes ide-stale-show { to { visibility: visible; max-height: 20rem; padding-block: var(--ide-space-3); } }
@keyframes ide-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes ide-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .ide-door:hover { transform: none; }
  /* L'heure est une information : la barre avance par sauts d'une seconde. */
  .ide-live__sweep { animation-duration: 60s !important; animation-iteration-count: infinite !important; animation-timing-function: steps(60, end) !important; }
  .ide-waiting__dot { animation: none !important; }
  .ide-skeleton, .ide-loading::before { animation: none !important; }
}

/* ---------- 18. Contraste renforcé, couleurs forcées ---------- */
@media (prefers-contrast: more) {
  :root { --ide-muted: var(--ide-ink); --ide-line: var(--ide-line-strong); --ide-line-strong: var(--ide-ink); --ide-shadow-sm: none; }
  .form-control, .form-select, .ide-chip, .ide-panel, .ide-door { border-width: 2px; }
  .ide-card::before, .ide-card::after { opacity: .35; } /* formes décoratives atténuées : le texte d'abord */
}
@media (forced-colors: active) {
  .ide-verdict__body, .ide-verdict__state, .ide-trustbar, .ide-live, .ide-card, .ide-panel, .ide-badge, .ide-chip, .ide-door { border: 2px solid CanvasText; }
  .ide-card::before, .ide-card::after { display: none; }
  .ide-live__sweep, .ide-waiting__dot { background: CanvasText; forced-color-adjust: none; }
  .ide-steps li[aria-current="step"]::before { border: 3px solid Highlight; }
  .ide-brand__mark { forced-color-adjust: none; }
}

/* ---------- 19. Impression ---------- */
@media print {
  @page { margin: 15mm; }
  :root { --ide-bg: #ffffff; }
  body { background: #ffffff !important; color: #000000; font-size: 12pt; display: block; }
  .ide-header, .ide-footer, .ide-flashes, .ide-acting, .ide-skip, .ide-nav-toggle, .ide-noprint,
  .btn, .ide-bigbtn, .ide-screen__actions, .ide-pagehead__actions, .ide-table__actions, .pagination, .ide-chips { display: none !important; }
  .ide-main { padding: 0; }
  a { color: #000000; text-decoration: none; }
  h1 { font-size: 20pt; } h2 { font-size: 16pt; } h3 { font-size: 13pt; }
  .ide-panel, .ide-kpi, .ide-empty, .ide-door, .ide-offer { border: 1px solid #000000; box-shadow: none; break-inside: avoid; }
  .table { --bs-table-bg: #ffffff; }
  .table thead th { color: #000000; border-bottom: 2px solid #000000; }
  .ide-qr { border: 0; padding: 0; box-shadow: none; break-inside: avoid; }
  .ide-card { box-shadow: none; border: 1px solid #000000; background: #eaf1f3; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; }
  .ide-card::before, .ide-card__band { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ide-badge, .ide-heat td, .ide-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ide-page-break { break-after: page; }
  .ide-print-only { display: block !important; }
}
.ide-print-only { display: none; }

/* Superadmin en mode « agir pour » : bandeau permanent sous l'en-tête (nom de l'entreprise + « Quitter ») */
.ide-acting { margin-bottom: var(--ide-space-4); }
.ide-acting__bar { align-items: center; flex-wrap: wrap; margin: 0; }
.ide-acting__text { flex: 1; margin: 0; min-width: 12rem; overflow-wrap: anywhere; }
.ide-acting__leave { margin: 0; }

/* Nom de l'entreprise gérée (admin) dans l'en-tête */
.ide-company-name {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis;
  padding: .25rem .875rem .25rem .625rem; border-radius: var(--ide-radius-pill); background: rgb(255 255 255 / .12);
}


/* Nom de champ + badge (ex. « obligatoire ») : toujours empilés, alignés à gauche, quelle que soit la longueur du nom */
.ide-field-name { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .375rem; }
.ide-field-name .ide-badge { margin: 0; }
/* Valeur d'exemple ou donnée brute (email, numéro, date) : jamais de césure, coupure seulement si indispensable */
.ide-sample { white-space: nowrap; font-variant-numeric: tabular-nums; } /* une valeur d'exemple (email, date…) tient sur une ligne */

/* ---------- Revue visuelle — admin ---------- */
/* Adresse email affichée (listes, fiches) : toujours sur une ligne, jamais coupée au tiret ni au point.
   Si elle ne tient vraiment pas (écran étroit), elle se termine par « … » ; l'adresse complète reste dans title. */
.ide-email { display: inline-block; max-width: 100%; vertical-align: bottom; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Boutons d'action dans un tableau : libellé sur une ligne ; sur bureau, empilés et alignés à droite */
.ide-area-admin .table .ide-table__actions .btn { white-space: nowrap; }
@media (min-width: 768px) {
  .ide-area-admin .table td > .ide-table__actions { flex-direction: column; align-items: flex-end; }
}
/* Liste « libellé : valeur » dans une colonne étroite : valeur sous le libellé, badges sur une ligne */
.ide-dl.ide-dl--stack { grid-template-columns: 1fr; row-gap: 0; }
.ide-dl--stack dt:not(:first-child) { margin-top: var(--ide-space-3); }
.ide-dl--stack dd { margin: var(--ide-space-1) 0 0; }
.ide-dl--stack .ide-badge { white-space: nowrap; }
/* Six chiffres clés (ex. vérification d'import) : 3 + 3 au lieu de 5 + 1 orphelin */
@media (min-width: 768px) {
  .ide-area-admin .ide-kpis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* En-tête long au-dessus de valeurs courtes (ex. « Dernière connexion » / « Jamais ») : peut tenir sur deux lignes */
.ide-area-admin .table thead th.ide-th-wrap { white-space: normal; }
/* Nom de l'entreprise (en-tête) : la pastille garde sa marge droite ; seul le nom se termine par « … » s'il est trop long */
.ide-area-admin .ide-company-name { max-width: min(32ch, 100%); overflow: visible; }
.ide-area-admin .ide-company-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Liste déroulante : le texte s'arrête avant le chevron (le padding-inline commun l'effaçait) */
.ide-area-admin .form-select { padding-inline-end: 2.5rem; }
/* Filtre (liste déroulante ou recherche) + bouton : largeur de lecture, bouton à côté sur bureau */
.ide-filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ide-space-2) var(--ide-space-3); }
.ide-filterbar > .ide-field, .ide-filterbar > .ide-search { flex: 1 1 18rem; max-width: 32rem; margin: 0; }
/* Rangée de boutons d'un formulaire : sur téléphone, chaque bouton prend toute la largeur (comme l'en-tête de page) */
.ide-actions--form { margin-top: var(--ide-space-4); }
@media (max-width: 575.98px) {
  .ide-actions--form { flex-direction: column; align-items: stretch; }
  .ide-actions--form > form { display: flex; flex-direction: column; }
  .ide-actions--form .btn { width: 100%; }
}
/* Remise en main propre (member-activate) : QR, gestes et boutons sur une même colonne, alignés au contenu de la page */
.ide-area-admin .ide-screen--handover { max-width: 24rem; padding-inline: 0; }
.ide-screen--handover .ide-qr { max-width: none; }
.ide-screen--handover .ide-screen__body > :is(.ide-qr, .ide-gestures) { width: 100%; }
.ide-screen--handover .ide-screen__lead { max-width: none; }
/* Sélecteur de couleur : une vraie pastille de couleur, visible même en blanc sur blanc */
.ide-area-admin .form-control-color { width: 4.5rem; padding: .3125rem; cursor: pointer; }
.ide-area-admin .form-control-color::-webkit-color-swatch-wrapper { padding: 0; }
.ide-area-admin .form-control-color::-webkit-color-swatch { border: 1px solid var(--ide-line-strong); border-radius: calc(var(--ide-radius) - 4px); }
.ide-area-admin .form-control-color::-moz-color-swatch { border: 1px solid var(--ide-line-strong); border-radius: calc(var(--ide-radius) - 4px); }
.ide-colors { gap: var(--ide-space-3) var(--ide-space-6); }
.ide-colors > .ide-field { margin-bottom: var(--ide-space-3); }
/* Aperçu du bandeau de l'entreprise dans un panneau : coins arrondis comme les autres blocs */
.ide-area-admin .ide-panel .ide-company-bar { border-radius: var(--ide-radius); padding-inline: var(--ide-space-4); margin-bottom: var(--ide-space-4); }
/* Logo actuel + case « Retirer le logo » côte à côte */
.ide-logo-current { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2) var(--ide-space-4); margin-bottom: var(--ide-space-2); }
.ide-logo-current img { height: 3rem; width: auto; max-width: 10rem; object-fit: contain; border-radius: var(--ide-radius-sm); }
.ide-logo-current .form-check { margin: 0; }
/* Statistiques : un nom de commerce ne se coupe jamais au milieu d'un mot ; sur téléphone, le libellé passe au-dessus de sa barre */
.ide-area-admin .ide-bars__label { overflow-wrap: break-word; }
@media (max-width: 575.98px) {
  .ide-area-admin .ide-bars__list { gap: var(--ide-space-3); }
  .ide-area-admin .ide-bars__row { grid-template-columns: 1fr minmax(2.5rem, auto); row-gap: var(--ide-space-1); }
  .ide-area-admin .ide-bars__label { grid-column: 1 / -1; }
}
/* Version tableau d'un graphique : alignée sur les barres (bords du panneau), légende détachée du « Voir en tableau » */
.ide-area-admin .ide-bars + details .table caption { padding-top: var(--ide-space-3); }
.ide-area-admin .ide-bars + details .table > :not(caption) > * > :first-child { padding-inline-start: 0; }
.ide-area-admin .ide-bars + details .table > :not(caption) > * > :last-child { padding-inline-end: 0; }
.ide-area-admin .ide-bars + details .table { margin-bottom: 0; }
/* Renommer un appareil (Face ID) : champ et bouton sur une ligne, à droite sur bureau */
.ide-rename { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2); }
.ide-rename .form-control { flex: 1 1 12rem; width: auto; min-width: 0; }
@media (min-width: 768px) {
  .ide-rename { flex-direction: column; align-items: flex-end; }
  .ide-rename .form-control { flex: none; width: 12rem; }
}
@media (min-width: 992px) {
  .ide-rename { flex-direction: row; flex-wrap: nowrap; }
  .ide-rename .form-control { width: 15rem; }
}

/* Signature du développeur (logo Tima → vincehub.ch), après « Aide » dans le pied de page */
.ide-footer__dev { display: inline-flex; vertical-align: middle; margin-right: .5rem; opacity: .9; transition: opacity var(--ide-dur-fast, .15s); }
.ide-footer__dev:hover, .ide-footer__dev:focus-visible { opacity: 1; }
.ide-footer .ide-footer__dev { padding-block: 0; }
.ide-footer .ide-footer__dev img { height: 2.25rem !important; width: auto !important; max-width: none; display: block; }
.ide-footer .ide-footer__legal { max-width: none; display: flex; flex-wrap: wrap; align-items: center; column-gap: .25rem; }

/* Bouton « Connexion » de l'en-tête public (à côté du choix de langue) */
.ide-login-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding-inline: 1rem; border-radius: var(--ide-radius-pill); font-weight: 600; white-space: nowrap; }
.ide-login-link .ide-icon { width: 1.125rem; height: 1.125rem; }
@media (max-width: 30rem) {
  .ide-login-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ide-login-link { width: 2.75rem; padding-inline: 0; justify-content: center; }
  .ide-area-public .ide-header__inner { flex-wrap: nowrap; }
  .ide-area-public .ide-header__tools { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: .5rem; margin-left: auto; }
}

/* Fiche commerce : gérants (nom + email, statut, renvoyer l'invitation) */
.ide-managers { list-style: none; margin: 0 0 var(--ide-space-3); padding: 0; display: grid; gap: var(--ide-space-2); }
.ide-managers__item {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2) var(--ide-space-4);
  padding: var(--ide-space-3) var(--ide-space-4); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg);
}
.ide-managers__item > div { flex: 1 1 14rem; min-width: 0; }
.ide-managers__item .ide-meta { overflow-wrap: anywhere; }
.ide-managers__item form { margin: 0; }
.ide-devices-tabs { margin: 0 var(--ide-space-4) var(--ide-space-3); }

/* Avertissement « Votre session va se fermer » (fixé en bas, au-dessus de tout, sans voile bloquant) */
.ide-idle { position: fixed; z-index: 1080; left: 50%; bottom: max(var(--ide-space-4), env(safe-area-inset-bottom)); translate: -50% 0; width: min(calc(100% - 2rem), 40rem); }
.ide-idle[hidden] { display: none; }
.ide-idle__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-3) var(--ide-space-4);
  padding: var(--ide-space-4) var(--ide-space-5); background: var(--ide-surface); color: var(--ide-ink);
  border: 2px solid var(--ide-accent); border-radius: var(--ide-radius-xl); box-shadow: var(--ide-shadow);
}
.ide-idle__icon { flex: none; width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: 50%; background: var(--ide-accent); color: var(--ide-ink); }
.ide-idle__body { flex: 1 1 16rem; min-width: 0; }
.ide-idle__title { margin: 0 0 var(--ide-space-1); font-weight: 700; }
.ide-idle__text { margin: 0; font-variant-numeric: tabular-nums; }
@media (forced-colors: active) { .ide-idle__inner { border-color: CanvasText; } }
@media print { .ide-idle { display: none !important; } }

/* Tableau de bord admin : carte « Bien démarrer » (3 étapes, cochées d'après les données réelles) */
.ide-guide { border: 2px solid var(--ide-accent); padding: clamp(1.25rem, 1rem + 1.2vw, 2rem); }
.ide-guide__title { font-size: var(--ide-fs-h2); margin: 0 0 var(--ide-space-1); }
.ide-guide__lead { color: var(--ide-muted); margin-bottom: var(--ide-space-4); }
.ide-guide__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ide-space-3); }
@media (min-width: 62rem) { .ide-guide__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ide-guide__step { display: flex; gap: var(--ide-space-3); padding: var(--ide-space-4); border: 1px solid var(--ide-line); border-radius: var(--ide-radius-lg); background: var(--ide-surface); }
.ide-guide__step.is-next { border: 2px solid var(--ide-primary); box-shadow: var(--ide-shadow-sm); }
.ide-guide__step.is-done { background: var(--ide-valid-soft); border-color: transparent; }
.ide-guide__num { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ide-accent); color: var(--ide-ink); font-family: var(--ide-font-num); font-weight: 800; }
.ide-guide__step.is-done .ide-guide__num { background: var(--ide-valid); color: var(--ide-on-status); }
.ide-guide__num .ide-icon { width: 1.25rem; height: 1.25rem; }
.ide-guide__body { min-width: 0; }
.ide-guide__body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-2); font-size: var(--ide-fs-lg); margin: .2rem 0 var(--ide-space-2); }
.ide-guide__body h3 > .ide-icon { color: var(--ide-primary); }
.ide-guide__body p { margin-bottom: var(--ide-space-3); }
.ide-more { margin: var(--ide-space-4) 0; border-top: 1px solid var(--ide-line); padding-top: var(--ide-space-2); }
.ide-more > summary { cursor: pointer; font-weight: 700; min-height: var(--ide-touch); display: flex; align-items: center; }
.ide-guide__count { font-weight: 700; font-family: var(--ide-font-num); }
.ide-guide__step:not(.is-next) .ide-guide__body h3 { margin-bottom: 0; }
.ide-guide__step:not(.is-next) .ide-guide__count { margin: var(--ide-space-1) 0 0; }
.ide-guide__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ide-space-3); margin: 0; }
.ide-guide__menu { margin-top: var(--ide-space-4); }
.ide-guide__menu summary { cursor: pointer; font-weight: 700; min-height: var(--ide-touch); display: flex; align-items: center; }
.ide-guide__menu ul { margin: var(--ide-space-2) 0 0; padding-left: 1.25rem; }
.ide-guide__menu li + li { margin-top: var(--ide-space-1); }
.ide-guide__hide { margin: var(--ide-space-2) 0 0; text-align: right; }
@media (forced-colors: active) { .ide-guide, .ide-guide__step { border: 2px solid CanvasText; } }
/* Légende avec pictogramme (formulaire « Ajouter un commerce ») : espace entre l'icône et le texte */
.ide-fieldset > legend:has(.ide-icon) { display: flex; align-items: center; gap: var(--ide-space-2); }
.ide-fieldset > legend > .ide-icon { flex: none; color: var(--ide-primary); }
.ide-guide__menu summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: var(--ide-space-2); border-radius: 50%; background: var(--ide-primary-soft); color: var(--ide-primary); font-family: var(--ide-font-num); }
.ide-guide__menu[open] summary::before { content: "\2212"; }
.ide-guide__menu summary::-webkit-details-marker { display: none; }
.ide-guide__menu summary { list-style: none; }

/* Fiche commerce : offres du commerce (plus de menu « Offres ») */
.ide-shop-offers { list-style: none; padding: 0; margin: 0 0 var(--ide-space-3); display: grid; gap: var(--ide-space-3); }
.ide-shop-offers__item { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--ide-space-2); }

/* Formulaire d'offre : traductions facultatives, repliées */
.ide-offer-tr > summary { gap: var(--ide-space-2); }
.ide-offer-tr > summary > .ide-icon { flex: none; color: var(--ide-primary); }
.ide-offer-tr__lang { border-top: 1px solid var(--ide-line); margin-top: var(--ide-space-3); padding-top: var(--ide-space-3); }
.ide-offer-tr__lang > legend { font-size: 1rem; font-weight: 700; }

/* Tableau de bord RH : ligne « Votre contrat » (discrète) */
.ide-contract-line { display: flex; align-items: center; gap: var(--ide-space-2); color: var(--ide-ink-soft, #555); font-size: .95rem; margin-top: var(--ide-space-4); }
