/* ewill check — mêmes couleurs, tailles et composants que l'application de bureau
   (apps/desktop/src/renderer/styles.css) : fond bleuté, barre latérale claire, cartes bordées,
   bleu primaire, sarcelle pour les réussites, orange pour les écarts, dégradé bleu → sarcelle. */
:root {
    --blue: #1a6fe0; --blue-dark: #1558b8; --blue-soft: #e8f1fd;
    --teal: #13b39f; --teal-soft: #e3f7f4;
    --red: #d93d42; --red-soft: #fdecec;
    --orange: #d9822b; --orange-soft: #fdf1e4;
    --slate: #2b3340; --muted: #677384; --border: #e2e7ee;
    --bg: #f4f6fa; --surface: #fff; --sidebar: #fbfcfe;
    --gradient: linear-gradient(135deg, #1a6fe0 0%, #13b39f 100%);
    --radius: 10px;
    /* Graphiques (palette validée) et statuts */
    --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --grid: #edf1f7;
    --good: #13b39f; --warn-mark: #fab219; --critical: #d93d42; /* statuts = couleurs de l'app (séparation daltonisme vérifiée) */
    --violet: #5b3fc4; --violet-soft: #efeafd; --violet-line: #c9bcf5; /* blocs « Si » / « Pour chaque » */
    color-scheme: light; /* thème clair uniquement, même si le système est en mode sombre */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--slate); background: var(--bg); }
h1 { font-size: 1.35rem; margin: 0 0 4px; line-height: 1.3; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
h3 { font-size: .95rem; margin: 0 0 8px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.mono, kbd { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { flex: none; }

/* ---------------------------------------------------------------------------
   Mise en page : barre latérale de l'app + contenu */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 280px; flex: none; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; justify-content: center; padding: 18px 18px 12px; color: var(--slate); }
.brand:hover { text-decoration: none; }
/* Marque : logo « Check », « by ewill » aligné sur la fin du mot (comme Studia) */
.brand-inner { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.brand-logo { display: block; height: 34px; width: auto; }
.brand-by { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--muted); margin-top: -1px; line-height: 1; }
.ewill-logo { display: block; height: 13px; width: auto; }
.auth-brand { display: flex; justify-content: center; margin: 0 auto 22px; }
.auth-brand .brand-logo { height: 46px; }
.auth-brand .brand-by { font-size: 12px; }
.auth-brand .ewill-logo { height: 15px; }

.filter { position: relative; margin: 0 14px 8px; }
.filter input { padding-right: 52px; }
.filter kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 1px 6px; border: 1px solid var(--border); border-radius: 5px; font-size: .7rem; color: var(--muted); background: var(--bg); pointer-events: none; }
.tree { flex: 1; overflow: auto; padding: 4px 8px 12px; }
.tree .client { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 10px 4px; }
.tree a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--slate); }
.tree a .icon { color: var(--muted); }
.tree a:hover { background: var(--bg); text-decoration: none; }
.tree a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.tree a.active .icon { color: var(--blue); }
.tree .count { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 500; }
.tree .count.alert { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-weight: 700; text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Haut du menu : logo et bouton pour réduire le menu en icônes */
.sidebar-top { display: flex; align-items: center; gap: 4px; padding-right: 12px; }
.sidebar-top .brand { flex: 1; }
.sidebar-toggle { width: 30px; height: 30px; flex: none; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sidebar-toggle:hover { color: var(--slate); background: var(--bg); }
/* Menus déroulants du menu : organisation, compte */
.sidebar details > summary { list-style: none; cursor: pointer; }
.sidebar details > summary::-webkit-details-marker { display: none; }
.sidebar details[data-menu] { position: relative; }
.org-switcher { margin: 0 14px 10px; }
.org-switcher > summary { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.org-switcher > summary:hover { border-color: var(--blue); }
.org-switcher[open] > summary { border-color: var(--blue); }
.org-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--slate); color: #fff; font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.org-mark.small-mark { width: 22px; height: 22px; font-size: .72rem; }
.org-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.org-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-panel { position: absolute; left: 0; right: 0; z-index: 30; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(43, 51, 64, .14); padding: 6px; display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font: inherit; color: var(--slate); cursor: pointer; }
.menu-item:hover { background: var(--bg); text-decoration: none; }
.menu-item .icon { color: var(--muted); }
.menu-item.current { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.menu-item.muted-item { color: var(--blue); font-weight: 600; font-size: .85rem; }
.menu-item.danger-item, .menu-item.danger-item .icon { color: var(--red); }
/* Projets récents : nom du projet, son client dessous */
.tree .recent { padding: 5px 10px; }
.recent-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.recent-mark.tint-1 { background: var(--red-soft); color: #b4232f; }
.recent-mark.tint-2 { background: var(--teal-soft); color: #0a7568; }
.recent-mark.tint-3 { background: var(--violet-soft); color: var(--violet); }
.recent-mark.tint-4 { background: var(--orange-soft); color: #93500d; }
.tree .recent .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tree .recent-text { display: flex; flex-direction: column; line-height: 1.25; }
.tree .recent-text > span, .tree .recent-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .recent-text small { font-size: .74rem; color: var(--muted); font-weight: 400; }
/* Clients (ou services) puis leurs projets */
.tree .menu-clients-head { display: flex; justify-content: space-between; align-items: baseline; }
.tree .menu-clients-all { display: inline; font-size: .72rem; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 0; color: var(--blue); }
.tree a[data-collapsed-only] { display: none; }
.menu-client > summary { display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 10px; border-radius: 7px; cursor: pointer; list-style: none; font-weight: 650; color: #1f2733; font-size: .9rem; }
.menu-client > summary::-webkit-details-marker { display: none; }
.menu-client > summary:hover { background: var(--bg); }
.menu-client > summary > .icon:last-child { color: var(--muted); transform: rotate(-90deg); transition: transform .15s; flex: none; }
.menu-client[open] > summary > .icon:last-child { transform: none; }
@media (prefers-reduced-motion: reduce) { .menu-client > summary > .icon:last-child { transition: none; } }
.client-mark { width: 22px; height: 22px; border-radius: 6px; background: #eef1f5; color: #4d5868; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.client-mark .icon { color: #4d5868; }
.client-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-count { font-size: .72rem; font-weight: 600; color: var(--muted); background: #f1f3f6; border-radius: 999px; padding: 1px 7px; }
.menu-projects { margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1.5px solid #dfe4ec; display: flex; flex-direction: column; gap: 1px; }
.tree .menu-project { padding: 5px 8px; font-size: .87rem; gap: 8px; }
.menu-project .project-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #b8c1cc; }
.state-dot.passed { background: var(--teal); }
.state-dot.failed { background: var(--red); }
.menu-empty { padding: 4px 10px; margin: 0; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
/* Administration : se déplie en sous-menu */
.admin-group { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.admin-group > summary { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--slate); }
.admin-group > summary:hover { background: var(--bg); }
.admin-group > summary .icon { color: var(--muted); }
.admin-group > summary .icon:last-child { margin-left: auto; transform: rotate(-90deg); transition: transform .15s; }
.admin-group[open] > summary .icon:last-child { transform: none; }
.admin-links { margin: 2px 0 0 18px; padding-left: 10px; border-left: 1px solid var(--border); }
/* Compte : menu sous le nom */
.account-menu { border-top: 1px solid var(--border); }
.account-menu > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.account-menu > summary:hover { background: var(--bg); }
.account-menu > summary .icon { color: var(--muted); }
.account-menu .menu-panel { top: auto; bottom: calc(100% + 6px); margin: 0; left: 10px; right: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.account-menu .user { flex: 1; display: flex; flex-direction: column; }
.account-menu .user .muted { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Menu réduit en icônes (sur grand écran) : le nom s'affiche au survol et au clavier */
@media (min-width: 961px) {
    html.sidebar-collapsed .sidebar { width: 64px; }
    html.sidebar-collapsed .sidebar .nav-label, html.sidebar-collapsed .tree .client, html.sidebar-collapsed .sidebar .filter, html.sidebar-collapsed .brand,
    html.sidebar-collapsed .admin-group > summary .icon:last-child, html.sidebar-collapsed .org-switcher > summary > .icon, html.sidebar-collapsed .account-menu > summary > .icon { display: none; }
    html.sidebar-collapsed .sidebar-top { justify-content: center; padding: 16px 0 12px; }
    html.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
    html.sidebar-collapsed .tree { overflow: visible; padding: 4px 8px; }
    html.sidebar-collapsed .tree a, html.sidebar-collapsed .admin-group > summary { justify-content: center; padding: 9px 0; }
    html.sidebar-collapsed .tree .count.alert { position: absolute; top: 2px; right: 2px; min-width: 16px; padding: 0 4px; font-size: .65rem; }
    html.sidebar-collapsed .menu-clients, html.sidebar-collapsed .menu-clients-head { display: none; }
    html.sidebar-collapsed .tree a[data-collapsed-only] { display: flex; }
    html.sidebar-collapsed .nav-sep { margin: 8px 10px; }
    html.sidebar-collapsed .admin-links { margin-left: 0; padding-left: 0; border-left: 0; }
    html.sidebar-collapsed .org-switcher { margin: 0 8px 8px; }
    html.sidebar-collapsed .org-switcher > summary { justify-content: center; padding: 6px 0; border: 0; background: none; }
    html.sidebar-collapsed .account-menu > summary { justify-content: center; padding: 12px 0; }
    html.sidebar-collapsed .menu-panel { left: 56px; right: auto; width: 240px; }
    html.sidebar-collapsed .org-switcher .menu-panel { top: 0; margin-top: 0; }
    html.sidebar-collapsed .account-menu .menu-panel { left: 56px; bottom: 6px; }
    html.sidebar-collapsed .sidebar [data-label] { position: relative; }
    html.sidebar-collapsed .sidebar [data-label]:hover::after, html.sidebar-collapsed .sidebar [data-label]:focus-visible::after {
        content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 40; pointer-events: none;
        background: var(--slate); color: #fff; font-size: .8rem; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap;
    }
}
.user { font-size: .85rem; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.user { color: var(--slate); }
a.user:hover { text-decoration: none; }
a.user:hover strong { color: var(--blue); }
.content { flex: 1; min-width: 0; padding: 26px 30px 60px; }
/* Téléphone et petite tablette : barre en haut, menu en volet par-dessus la page */
.mobile-bar, .sidebar-close { display: none; }
@media (max-width: 960px) {
    .mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 50; height: 56px; padding: 0 8px 0 12px; background: var(--sidebar); border-bottom: 1px solid var(--border); }
    .mobile-bar .brand { padding: 0; justify-content: flex-start; }
    .mobile-bar .brand-logo { height: 26px; }
    .mobile-bar .brand-by { display: none; }
    .mobile-actions { display: flex; gap: 4px; }
    .mobile-button { position: relative; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--slate); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .mobile-button:hover, .mobile-button:focus-visible { background: var(--bg); }
    .mobile-count { position: absolute; top: 6px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .65rem; font-weight: 700; line-height: 17px; text-align: center; }
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(320px, 88vw); height: 100%; transform: translateX(-105%); transition: transform .2s ease, visibility 0s linear .2s; box-shadow: 0 0 40px rgba(43, 51, 64, .2); visibility: hidden; }
    html.menu-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
    html.menu-open { overflow: hidden; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(43, 51, 64, .35); }
    .sidebar-toggle { display: none; }
    .sidebar-close { display: inline-flex; width: 40px; height: 40px; border: 0; border-radius: 9px; background: none; color: var(--slate); align-items: center; justify-content: center; cursor: pointer; }
    .sidebar-close:hover { background: var(--bg); }
    .sidebar-top { padding-right: 8px; }
    .sidebar-top .brand { justify-content: flex-start; }
    .tree a, .admin-group > summary { padding: 9px 10px; }
    .content { padding: 18px 16px 48px; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* En-têtes de page */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-header h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-header p { margin: 0; color: var(--muted); }
.breadcrumb, .crumb { font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.breadcrumb a { color: var(--muted); }

/* Cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-header, .card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-header h2, .card-title h2 { margin: 0; }
.run-steps-card .card-title { flex-wrap: wrap; }
.card-header p { margin: 2px 0 0; }
.card.flush > .card-header { padding: 16px 18px 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid > .card { margin: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.cols > * { min-width: 0; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty strong { display: block; color: var(--slate); font-size: 1.05rem; margin-bottom: 4px; }

/* Fiche : rangée d'informations sous le titre (scénario, exécution) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-right: 1px solid var(--border); min-width: 0; }
.fact:last-child { border-right: 0; }
.fact .icon { color: var(--muted); margin-top: 2px; }
.fact > span { display: flex; flex-direction: column; min-width: 0; }
.fact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); }
.fact-value { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact-note { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.counter { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.counter strong { display: block; font-size: 1.35rem; line-height: 1.15; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--blue-soft) 40%, transparent); }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
/* Tableau plus large que sa carte (formulaires ouverts dans les cellules) : défilement horizontal plutôt que débordement */
.table-scroll { overflow-x: auto; }
.cell-title { display: flex; align-items: center; gap: 12px; }
.cell-title > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cell-title strong { color: var(--slate); }
.cell-title a:hover strong { color: var(--blue); }
.tile, .initial { flex: none; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--blue-soft); color: var(--blue); }
.tile.sm { width: 24px; height: 24px; border-radius: 6px; font-size: .72rem; }
.tile.c1 { background: var(--teal-soft); color: var(--teal); }
.tile.c2 { background: var(--orange-soft); color: var(--orange); }
.tile.c3 { background: color-mix(in srgb, var(--blue) 18%, var(--surface)); color: var(--blue-dark); }
.tile.c4 { background: color-mix(in srgb, var(--teal) 22%, var(--surface)); color: var(--teal); }
.tile.c5 { background: var(--red-soft); color: var(--red); }
.trend { font-size: .78rem; font-weight: 700; }
.trend.up { color: var(--teal); } .trend.down { color: var(--red); }
.rate { font-weight: 700; }

/* Badges (mêmes que l'app) ; .pill = badge précédé d'un point */
.badge, .pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600;
    background: var(--bg); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.passed, .badge.success, .pill.good { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.badge.failed, .badge.danger, .pill.bad { background: var(--red-soft); color: var(--red); border-color: transparent; }
.badge.error, .badge.partial, .badge.warning, .pill.warn { background: var(--orange-soft); color: var(--orange); border-color: transparent; }
.badge.aborted { background: var(--bg); color: var(--slate); }
.badge.running, .badge.info, .badge.violet, .pill.info { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.badge.skipped { opacity: .7; }
.run-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.badge.alert-count { background: var(--orange-soft); color: var(--orange); border-color: transparent; font-variant-numeric: tabular-nums; }
a.badge:hover { text-decoration: none; filter: brightness(.97); }
.badges, .browser-runs { display: flex; gap: 4px; flex-wrap: wrap; }

/* Boutons (mêmes que l'app) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface); color: var(--slate); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.gradient { background: var(--gradient); border: 0; color: #fff; padding: 9px 15px; }
.btn.gradient:hover { filter: brightness(1.05); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--bg); }
.btn.small { padding: 4px 10px; font-size: .8rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Formulaires (mêmes que l'app) */
label { display: block; font-weight: 600; font-size: .85rem; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=time], input[type=number], select, textarea {
    width: 100%; padding: 8px 11px; font: inherit; color: var(--slate); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--blue) 35%, transparent); border-color: var(--blue); }
select.inline { width: auto; padding: 4px 8px; font-size: .85rem; }
/* Listes déroulantes : flèche dessinée, à distance du bord et du texte (la flèche du système collait au bord) */
select:not([multiple]):not([size]) { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23677384' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; background-size: 15px; padding-right: 36px; }
select.inline:not([multiple]):not([size]) { padding-right: 30px; background-position: right 8px center; background-size: 13px; }
select:disabled { opacity: .6; }
.field { margin-bottom: 12px; }
.field-before-submit { margin-bottom: 22px; }
.help-text, .form-help { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.form-error, ul.errors { color: var(--red); font-size: .85rem; margin: 4px 0 0; padding: 0; list-style: none; }
.code-input { font-size: 1.6rem !important; letter-spacing: .35em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1; min-width: 160px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0 14px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { flex: 1; min-width: 220px; width: auto; }
.filters select { width: auto; min-width: 160px; }
/* Boutons d'une barre de filtres : même hauteur que les listes et les champs */
.filters .btn { min-height: 42px; padding-top: 0; padding-bottom: 0; font-size: .9rem; }
.period-filter select { width: auto; }
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a { min-width: 34px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; text-align: center; color: var(--slate); background: var(--surface); }
.pagination a:hover { background: var(--bg); text-decoration: none; }
.pagination a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Messages */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: .9rem; }
.flash.success { background: var(--teal-soft); color: var(--teal); }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.info { background: var(--blue-soft); color: var(--blue); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.banner.info { background: var(--blue-soft); color: var(--blue); }
.banner.warning { background: var(--orange-soft); color: var(--orange); }
.banner.success { background: var(--teal-soft); color: var(--teal); }

/* Authentification (mêmes écrans que l'app) */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 40%),
                radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 40%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 30px; box-shadow: 0 8px 30px rgba(20, 30, 50, .08); }
.auth-card h1 { text-align: center; }
.lead { text-align: center; color: var(--muted); margin: 6px 0 18px; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr img { border-radius: 8px; background: #fff; padding: 6px; }
.secret { text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; word-break: break-all; color: var(--muted); }
.user-code { font: 700 1.9rem/1 ui-monospace, Menlo, monospace; letter-spacing: .15em; text-align: center; margin: 8px 0 12px; }

/* Onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--slate); }
.tabs a.active { color: var(--blue); border-color: var(--blue); }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; align-content: start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--slate); }
a.kpi:hover { text-decoration: none; border-color: color-mix(in srgb, var(--tint, var(--blue)) 45%, var(--border)); }
.kpi.blue, .kpi.violet { --tint: var(--blue); --tint-soft: var(--blue-soft); }
.kpi.teal, .kpi.green { --tint: var(--teal); --tint-soft: var(--teal-soft); }
.kpi.amber, .kpi.orange { --tint: var(--orange); --tint-soft: var(--orange-soft); }
.kpi.red { --tint: var(--red); --tint-soft: var(--red-soft); }
.kpi-icon { width: 30px; height: 30px; border-radius: 8px; margin-bottom: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--tint-soft, var(--blue-soft)); color: var(--tint, var(--blue)); }
.kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); margin-bottom: 6px; line-height: 1.25; }
.kpi-icon .icon { width: 17px; height: 17px; }
.kpi-value, .kpi-note { grid-column: 1 / -1; }
.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; display: flex; align-items: baseline; gap: 8px; }
.kpi-note { font-size: .8rem; color: var(--muted); }
.delta { font-size: .8rem; font-weight: 700; color: var(--muted); }
.delta.good { color: var(--teal); } .delta.bad { color: var(--red); }

/* Tableau de bord */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-main > .card, .dash-side > .card { margin: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.title-icon { display: flex; align-items: flex-start; gap: 12px; }
.icon-badge { width: 34px; height: 34px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-badge.teal { background: var(--teal-soft); color: var(--teal); }
.icon-badge.orange { background: var(--orange-soft); color: var(--orange); }
.icon-badge.red { background: var(--red-soft); color: var(--red); }
.chart-card .card-header { align-items: flex-start; flex-wrap: wrap; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--good); }
.swatch.warning { background: var(--warn-mark); } .swatch.critical { background: var(--critical); }
.chart-plot { position: relative; width: 100%; min-height: 220px; }
.dash-svg { display: block; overflow: visible; }
.dash-svg .grid { stroke: var(--grid); stroke-width: 1; }
.dash-svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dash-svg .bar.good { fill: var(--good); } .dash-svg .bar.warning { fill: var(--warn-mark); } .dash-svg .bar.critical { fill: var(--critical); }
.dash-svg .col-highlight { fill: color-mix(in srgb, var(--blue) 7%, transparent); }
.dash-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke: var(--series-1); }
.dash-svg .line.s2 { stroke: var(--series-2); }
.dash-svg .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; } .dash-svg .dot.s2 { fill: var(--series-2); }
.dash-svg .crosshair { stroke: var(--muted); stroke-width: 1; }
.dash-svg .hit:focus { outline: none; }
.chart-table { margin-top: 8px; }
details > summary { cursor: pointer; font-weight: 600; font-size: .85rem; }
.chart-table table td, .chart-table table th { padding: 6px 10px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.side-card .card-header, .wide-card .card-header { padding: 16px 18px 0; }
.feed { list-style: none; margin: 8px 0 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 12px 1fr; column-gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); }
.feed li > :not(.feed-dot):not(.initial):not(.tile) { grid-column: 2; }
.feed li.empty { display: block; color: var(--muted); }
.feed-dot { grid-row: 1 / 4; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.feed-dot.good { background: var(--good); } .feed-dot.warning { background: var(--warn-mark); } .feed-dot.critical { background: var(--critical); } .feed-dot.info { background: var(--blue); }
.projects-feed li { grid-template-columns: 34px 1fr; }
.projects-feed .initial, .projects-feed .tile { grid-row: 1 / 4; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 18px 18px; }
.quick-action { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--slate); background: var(--surface); }
.quick-action:hover { border-color: var(--blue); background: var(--blue-soft); text-decoration: none; }
.quick-action .icon { color: var(--blue); }

/* Clients */
.client-card h2 { display: flex; align-items: center; gap: 10px; }
.client-card ul { list-style: none; margin: 10px 0 0; padding: 0; }
.client-card li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }

/* Étapes (mêmes que l'app) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); }
.steps li:first-child { border-top: 0; }
.step-index { counter-increment: step; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); font-size: .72rem; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.step-index::before { content: counter(step); }
.step-body { flex: 1; min-width: 0; }
/* Type de l'étape, en français, avec une pastille de couleur */
.step-action { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; color: var(--blue-dark); }
.step-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.step-action.check { color: #0a7568; }
.step-action.act { color: #93500d; }
.step-action.block { color: var(--violet); }
.step-action.other { color: var(--muted); }
.step-meta { font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.step-error { margin-top: 5px; padding: 7px 9px; border-radius: 6px; background: var(--red-soft); color: var(--red); font-size: .82rem; white-space: pre-wrap; }
.step-note { font-size: .78rem; color: var(--blue); margin-top: 3px; }
.step-warning { font-size: .8rem; color: var(--orange); background: var(--orange-soft); border-radius: 6px; padding: 5px 8px; margin-top: 5px; }
/* Blocs « Si » / « Pour chaque » : étapes en retrait, ouvertures et fins de bloc en violet (mêmes que l'app) */
.steps li[style*="--depth"] { --indent: calc(var(--depth) * 26px); padding-left: var(--indent);
    background: linear-gradient(to right, transparent calc(var(--indent) - 14px), var(--violet-line) calc(var(--indent) - 14px), var(--violet-line) calc(var(--indent) - 12px), transparent calc(var(--indent) - 12px)); }
.steps li.step-block .step-action, .steps li.step-marker .step-action { color: var(--violet); }
.steps li.step-marker { padding-top: 5px; padding-bottom: 5px; }
.steps li.step-marker .step-body > div:not(.step-action):not(.step-meta), .steps li.step-marker .step-info span { color: var(--violet); font-weight: 600; }
.badge.cond { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.tours { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.tour { font-size: .74rem; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tour.passed { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.tour.failed { background: var(--red-soft); color: var(--red); border-color: transparent; }
.shot { display: block; margin-top: 6px; max-width: 520px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; }
.shot-viewer { margin-top: 6px; max-width: 520px; }
.shot-viewer .shot { position: relative; margin-top: 0; display: inline-block; vertical-align: top; }
.shot-viewer .shot img { width: auto; max-width: 100%; }
.shot-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.shot-tabs button { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; padding: 3px 10px; cursor: pointer; }
.shot-tabs button + button { border-left: 1px solid var(--border); }
.shot-tabs button.active { background: var(--blue-soft); color: var(--blue); }
.issue-box { position: absolute; border: 2px solid var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); border-radius: 3px; pointer-events: none; }
.issue-box.error { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
/* Élément de l'étape sur sa capture : cadre, et zoom autour de lui (options au-dessus du déroulé) */
.shot-canvas { position: relative; display: block; }
.target-box { position: absolute; border: 2px solid var(--blue); border-radius: 3px; box-shadow: 0 0 0 2px rgb(255 255 255 / .75); pointer-events: none; }
.target-box.failed { border-color: var(--red); }
.shot-options { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; }
.shots-no-frame .target-box { display: none; }
.shots-zoom .shot-viewer .shot[data-zoomable] { display: block; width: 100%; aspect-ratio: var(--zoom-ratio); }
.shots-zoom .shot[data-zoomable] .shot-canvas { position: absolute; width: var(--zoom-width); left: var(--zoom-left); top: var(--zoom-top); }
.shots-zoom .shot[data-zoomable] .shot-canvas img { width: 100%; max-width: none; }
.issue-line { font-size: .82rem; margin-top: 4px; color: var(--orange); }
.issue-line.error { color: var(--red); }
.issue-item { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); color: var(--slate); }
.issue-item:first-of-type { border-top: 0; }
.issue-item:hover { text-decoration: none; background: var(--bg); }
.issue-item .mono, .issue-item .small { flex-basis: 100%; }
pre.json { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow: auto; max-height: 460px; font-size: .8rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: break-word; }
.perf-line { font-size: .76rem; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.perf-line > .icon { vertical-align: -2px; margin-right: 3px; }
.perf-line .slower { color: var(--orange); font-weight: 700; }
.perf-line .faster { color: var(--teal); font-weight: 700; }

/* Graphique des temps de chargement (page scénario) */
.perf-card .card-header { align-items: flex-start; }
.perf-variant select { width: auto; max-width: 420px; font-size: .85rem; padding: 6px 9px; }
.perf-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.perf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--series-1); }
.key.s2 { background: var(--series-2); } .key.s3 { background: var(--series-3); }
.perf-plot { position: relative; width: 100%; }
.perf-svg { display: block; overflow: visible; }
.perf-svg .grid { stroke: var(--grid); stroke-width: 1; }
.perf-svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.perf-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke: var(--series-1); }
.perf-svg .line.s2 { stroke: var(--series-2); } .perf-svg .line.s3 { stroke: var(--series-3); }
.perf-svg .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.perf-svg .dot.s2 { fill: var(--series-2); } .perf-svg .dot.s3 { fill: var(--series-3); }
.perf-svg .end-label { fill: var(--slate); font-size: 11px; font-weight: 600; }
.perf-svg .crosshair { stroke: var(--muted); stroke-width: 1; }
.perf-svg rect:focus { outline: none; }
.perf-tooltip { position: absolute; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 50, .12); padding: 8px 10px; font-size: .8rem; pointer-events: none; z-index: 2; }
.perf-tooltip .tt-head { color: var(--muted); margin-bottom: 4px; }
.perf-tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.perf-tooltip .tt-row strong { font-variant-numeric: tabular-nums; min-width: 58px; }
.perf-tooltip .tt-row span { color: var(--muted); }
.perf-tooltip .tt-warn { color: var(--orange); margin-top: 4px; }
.perf-table { margin-top: 10px; }
.perf-table table td, .perf-table table th { padding: 6px 10px; font-size: .8rem; font-variant-numeric: tabular-nums; }

/* Matrices (dernier état, configurations) — mêmes que l'app */
.matrix th, .matrix td { text-align: center; padding: 8px; }
.matrix tbody th { text-align: left; background: none; text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--slate); font-weight: 500; }
.matrix tr.group th, .config-matrix tr.group th { background: var(--bg); text-transform: uppercase; font-size: .68rem; letter-spacing: .05em; color: var(--muted); padding: 4px 8px; text-align: left; }
.matrix input[type=checkbox], .config-matrix input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }
.format-name { font-weight: 600; }

/* Formats d'écran */
.toggle { width: 38px; height: 22px; border-radius: 999px; border: 0; background: var(--border); position: relative; cursor: pointer; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.toggle.on { background: var(--blue); } .toggle.on span { left: 19px; }
.library { display: flex; flex-direction: column; gap: 6px; }
.preset { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--slate); font: inherit; text-align: left; cursor: pointer; }
.preset:hover { border-color: var(--blue); background: var(--blue-soft); }
.preset > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.preset-add { font-weight: 700; color: var(--blue); }
.preset-icon { flex: none; border: 2px solid var(--muted); border-radius: 4px; }
.preset-icon.desktop { width: 22px; height: 15px; } .preset-icon.tablet { width: 15px; height: 20px; } .preset-icon.mobile { width: 11px; height: 19px; border-radius: 3px; }

/* Variables */
.variable-form { padding: 14px 18px 18px; border-top: 1px solid var(--border); background: var(--bg); }
.var-name { font-weight: 600; color: var(--blue); background: var(--blue-soft); border-color: transparent; }

/* Santé des scénarios : grilles de graphiques, combinaisons d'un lancement, pastilles d'alerte */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-2 > .card { margin: 0; }
/* Boîte de test (administration) */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 > .card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.mailbox-state, .mailbox-domain { font-size: 1.15rem; }
.mailbox-state { display: inline-flex; align-items: center; gap: 8px; }
.mailbox-state::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.mailbox-state.good { color: var(--teal-dark, #0a7568); }
.mailbox-state.bad { color: var(--red, #b4232f); }
.mailbox-checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mailbox-checklist li { padding-left: 24px; position: relative; }
.mailbox-checklist li::before { position: absolute; left: 0; font-weight: 700; }
.mailbox-checklist li.ok::before { content: '✓'; color: #0a7568; }
.mailbox-checklist li.todo::before { content: '!'; color: #93500d; }
.mailbox-checklist li.neutral::before { content: '·'; color: var(--muted, #5c6878); }
.mailbox-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.mailbox-messages { margin-bottom: 16px; }
.mailbox-messages td.mono { overflow-wrap: anywhere; }
.mailbox-headers { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
.mailbox-headers dt { color: var(--muted, #5c6878); }
.mailbox-headers dd { margin: 0; overflow-wrap: anywhere; }
.mailbox-render { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.mailbox-text pre { white-space: pre-wrap; font-size: .85rem; max-height: 400px; overflow: auto; }
.mailbox-addresses .copy-field { display: flex; margin: 6px 0 4px; }
.mailbox-addresses .copy-field code { padding: 3px 8px; font-size: .8rem; white-space: nowrap; }
.prefixed-input { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.prefixed-input > span { display: flex; align-items: center; padding: 0 2px 0 10px; color: var(--muted); font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .85rem; }
.prefixed-input input { border: 0; border-radius: 0; flex: 1; min-width: 0; padding-left: 1px; font-family: var(--mono, ui-monospace, Menlo, monospace); }
.prefixed-input input:focus { outline: none; box-shadow: none; }
.prefixed-input:focus-within { outline: 2px solid var(--blue, #1a6fe0); outline-offset: 1px; }
.mailbox-inbox { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.mailbox-list { display: flex; flex-direction: column; padding: 6px; }
.mailbox-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; border: 1px solid transparent; }
.mailbox-list a:hover { background: var(--bg); }
.mailbox-list a.active { background: var(--blue-soft, #e8f0fd); border-color: var(--blue-border, #a9c8f5); }
.mailbox-list-head { display: flex; justify-content: space-between; gap: 10px; }
.mailbox-detail .card + .card { margin-top: 16px; }
@media (max-width: 900px) { .mailbox-inbox { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; font-size: .72rem; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.chip.error { background: var(--red-soft); color: var(--red); border-color: transparent; }
.chip.warning { background: var(--orange-soft); color: var(--orange); border-color: transparent; }
.chip.info { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.scenario-health td, .history-table td { vertical-align: top; }
.history-table tr:target td { background: var(--blue-soft); }
.history-table .chips { margin-top: 4px; }
.history-table .select-cell { width: 28px; padding-right: 0; }
.history-table .select-cell input { margin: 3px 0 0; }
.card-header-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.browser-logo { display: inline-block; vertical-align: -3px; }
.config-matrix th.browser-col span, .matrix th.browser-col span { display: block; margin-top: 4px; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--slate); }
.matrix th.browser-col { text-align: center; }
.matrix tbody th { white-space: nowrap; }

/* Lancer sur mon poste */
.launch-card .card-header { margin-bottom: 8px; }
.launch-form .field { margin-bottom: 10px; }
.request-list { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.request-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.config-matrix th, .config-matrix td { padding: 8px 5px; }
.config-matrix th.browser-col span { font-size: .72rem; }
/* Carte étroite : taille du format sous son nom, pour laisser la place aux quatre navigateurs */
.config-matrix { width: 100%; }
.config-matrix tbody th { white-space: normal; }
.config-matrix tbody th .mono { display: block; font-size: .72rem; }
.config-matrix thead th:first-child { text-align: left; }

/* Accessibilité (RGAA) */
.issue-box.a11y { border-style: dashed; border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.issue-line.a11y, .issue-line.seo { display: block; color: var(--blue); }
.seo-facts { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; }
.a11y-theme { margin: 14px 0 4px; font-size: .9rem; }
.a11y-item { gap: 4px 8px; }
.a11y-code { display: block; flex-basis: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.a11y-review { margin-top: 12px; }
a.counter:hover { text-decoration: none; border-color: var(--blue); }
.rgaa-grid tr.group th { background: var(--bg); color: var(--slate); text-transform: none; letter-spacing: 0; font-size: .85rem; padding: 8px 14px; }
.rgaa-grid td { padding: 7px 14px; }
.rgaa-grid td.mono { color: var(--muted); width: 1%; }
.a11y-card .card-header { margin-bottom: 8px; }

/* Audits du projet : pages distinctes */
.audit-pages { margin-top: 10px; }
.audit-page { border-top: 1px solid var(--border); }
.audit-page summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 18px; list-style: none; }
.audit-page summary::-webkit-details-marker { display: none; }
.audit-page summary:hover { background: var(--bg); }
.audit-page[open] summary { background: color-mix(in srgb, var(--blue-soft) 45%, transparent); }
.audit-page-path { display: flex; flex-direction: column; min-width: 0; }
.audit-page-path .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-page-counts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.audit-page-seen { grid-column: 1 / -1; }
.audit-page-body { padding: 4px 18px 14px; }

/* Titre « Client / Projet », roue crantée, paramètres du projet */
.h1-client { color: var(--muted); font-weight: 600; }
.btn.icon-only { padding: 8px; width: 40px; height: 40px; }
.btn.icon-only .icon { margin: 0; }
.settings-summary .settings-line { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); color: var(--slate); }
.settings-summary .settings-line:first-of-type { border-top: 0; }
.settings-summary .settings-line:hover { text-decoration: none; color: var(--blue); }
.settings-summary .settings-line .icon { grid-row: 1 / 3; color: var(--muted); }
.settings-summary .settings-line .muted { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); }
/* Réglages d'audit : explication à gauche, choix à droite (50/50), empilés sur un écran étroit */
.audit-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.audit-setting select { width: 100%; }
.audit-setting > .check-inline, .audit-setting > span { justify-self: start; }
@media (max-width: 760px) { .audit-setting { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
#environnements, #variables, #audits { scroll-margin-top: 56px; }
.text-danger { color: var(--red); font-weight: 600; }
.audit-option { border-top-style: dashed; }
.capture-zones { align-items: start; }
.capture-zones textarea { width: 100%; font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: .85rem; }

/* Projets suivis (administration) */
.tracked-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--border); }
.tracked-filters input[type=search] { flex: 1 1 260px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented a { padding: 6px 12px; font-size: .85rem; color: var(--muted); }
.segmented a + a { border-left: 1px solid var(--border); }
.segmented a:hover { text-decoration: none; color: var(--slate); background: var(--bg); }
.segmented a.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.segmented button { border: 0; background: var(--surface); padding: 6px 12px; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button:hover { color: var(--slate); background: var(--bg); }
.segmented button.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.combo-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.combo-hint { margin: 0 0 10px; }
.tracked-table td { vertical-align: middle; }
.tracked-table tr.group th { background: var(--bg); text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--slate); padding: 9px 16px; }
.track-form { display: inline-flex; margin: 0; }
.switch { position: relative; width: 40px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: #cbd3de; cursor: pointer; transition: background .15s; }
.switch .switch-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.switch.on { background: var(--blue); }
.switch.on .switch-knob { left: 21px; }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch:disabled { opacity: .6; }
.untracked-banner { gap: 12px; flex-wrap: wrap; }
.untracked-banner > span { flex: 1 1 320px; }

/* Télécharger l'app */
.download-link { display: flex; align-items: center; gap: 8px; margin: 0 10px 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.download-link:hover, .download-link.active { text-decoration: none; background: var(--blue-soft); color: var(--blue-dark); }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.download-grid .card { margin-bottom: 0; }
.download-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.download-card.current { border-color: #a9c8f5; }
.download-head { display: flex; align-items: center; gap: 10px; }
.download-head h2 { margin: 0; }
.download-card p { margin: 0; }
.download-main { margin-top: 6px; }
.install-steps { margin: 0; padding-left: 22px; }
.install-steps li { margin-bottom: 12px; padding-left: 4px; }
.install-steps li::marker { font-weight: 700; color: var(--blue); }
.install-steps li > span { display: block; margin-top: 3px; }
.install-steps li > .copy-field { display: inline-flex; margin-top: 6px; }
.copy-field { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.copy-field code { padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; }
.download-help { margin-top: 14px; }
.download-help summary, details.card summary { cursor: pointer; }
.older-releases { margin: 10px 0 0; padding-left: 18px; }

/* Robots de rejeu */
.token-card { border-color: #a9c8f5; background: var(--blue-soft); }
.token-env { margin: 8px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }

/* Constats d'un déroulé : tuiles repliées, un clic ouvre le détail sous la rangée */
.findings { margin-bottom: 16px; }
.findings-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.findings-head h2 { margin: 0; }
.finding-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.finding-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; text-align: left; font: inherit; color: var(--slate); background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.finding-tile:hover { border-color: var(--muted); }
.finding-tile.active { box-shadow: 0 0 0 2px var(--blue); border-color: var(--blue); }
.finding-tile.good { border-top-color: var(--good); } .finding-tile.warning { border-top-color: var(--warn-mark); } .finding-tile.critical { border-top-color: var(--critical); }
.finding-label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.finding-value { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.finding-tile.good .finding-value { color: var(--teal); } .finding-tile.warning .finding-value { color: var(--orange); } .finding-tile.critical .finding-value { color: var(--red); }
.finding-note { font-size: .74rem; color: var(--muted); }
.finding-panel { margin-top: 10px; }
.finding-panel > .card { margin-bottom: 0; }
.finding-grid:not([hidden]) { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
/* Déroulé pleine largeur : informations de l'étape à gauche, capture à droite */
.run-steps .step-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 4px 20px; align-items: start; }
.run-steps .step-info { min-width: 0; }
.run-steps .step-shot { margin-top: 0; max-width: 480px; }
@media (max-width: 1100px) { .run-steps .step-body { grid-template-columns: minmax(0, 1fr); } }

/* Bloc à onglets (Étapes / Variables du scénario) : les panneaux gardent leur carte */
.tabbed > .tabs { margin-bottom: 10px; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--muted); font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button:hover { color: var(--slate); }
.tabs button.active { color: var(--blue); border-color: var(--blue); }
.latest-card .matrix td { white-space: nowrap; }

/* Écran du code de double authentification : case « appareil de confiance » */
.trusted-device { margin: 4px 0 14px; font-size: .9rem; color: var(--slate); }

/* EcoIndex (méthode ecoindex.fr) : pastilles de note aux couleurs officielles, tableau des pages */
.ecoindex-grade { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px; font-weight: 800; font-size: .95rem; line-height: 1; }
.ecoindex-grade.small { min-width: 22px; height: 22px; font-size: .8rem; }
.finding-value .ecoindex-grade { vertical-align: -2px; }
.ecoindex-grade small { font-weight: 600; font-size: .7rem; }
.ecoindex-grade.empty { opacity: .35; }
.ecoindex-scale { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ecoindex-table { width: 100%; border-collapse: collapse; }
.ecoindex-table th, .ecoindex-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.ecoindex-table th.num, .ecoindex-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ecoindex-table .ecoindex-url { max-width: 420px; overflow-wrap: anywhere; }
.ecoindex-table .ecoindex-url a { margin-left: 6px; }
.ecoindex-credit { margin-top: 10px; }
.ecoindex-about h2, .privacy h2 { margin-top: 18px; }
.ecoindex-about h2:first-child, .privacy h2:first-child { margin-top: 0; }
.text-bad { color: var(--red); }
.text-good { color: var(--teal); }
.ecoindex-pages { display: flex; flex-direction: column; gap: 6px; }
.ecoindex-page { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ecoindex-page > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; cursor: pointer; list-style: none; }
.ecoindex-page > summary::-webkit-details-marker { display: none; }
.ecoindex-page > summary::after { content: '▸'; margin-left: auto; color: var(--muted); }
.ecoindex-page[open] > summary::after { content: '▾'; }
.ecoindex-page[open] > summary { border-bottom: 1px solid var(--border); }
.ecoindex-detail { padding: 12px; }
.ecoindex-detail h3 { margin: 12px 0 6px; font-size: .85rem; }
.ecoindex-criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ecoindex-criterion { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.ecoindex-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.ecoindex-bar span { display: block; height: 100%; border-radius: 999px; }
.ecoindex-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ecoindex-table.compact td { padding: 4px 8px; font-size: .85rem; }
/* Rapport d'un rejeu (lien du job d'intégration continue) */
.replay-report .card h3 { margin: 18px 0 8px; }
.replay-report .ecoindex-table td.ecoindex-url { min-width: 160px; }
.ecoindex-url { overflow-wrap: anywhere; }
.ecoindex-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; color: var(--slate); background: var(--surface); margin-top: 4px; }
.ecoindex-chip:hover { text-decoration: none; border-color: var(--blue); }

/* Lighthouse : scores aux seuils de Lighthouse (vert dès 90, orange dès 50, rouge en dessous) */
.lh-score { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 999px; border: 3px solid var(--border); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.lh-score.small { min-width: 26px; height: 26px; border-width: 2px; font-size: .78rem; }
.lh-score.good { border-color: #0c9d59; color: #0b7a45; }
.lh-score.warning { border-color: #f4a100; color: #a35c00; }
.lh-score.critical { border-color: #e1321f; color: #b42318; }
.lh-gauge { display: inline-flex; align-items: center; gap: 6px; }
.lh-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 6px; }
.lh-metric { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 0; }
.lh-metric.good { border-left-color: #0c9d59; }
.lh-metric.warning { border-left-color: #f4a100; }
.lh-metric.critical { border-left-color: #e1321f; }
.lh-reco { border-top: 1px solid var(--border); padding: 6px 0; }
.lh-reco > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.lh-reco p { margin: 6px 0; }
.lh-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex: none; }
.lh-dot.good { background: #0c9d59; }
.lh-dot.warning { background: #f4a100; }
.lh-dot.critical { background: #e1321f; }
.lh-cell { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.lh-cell:hover { text-decoration: none; }
.lh-chip .lh-score.small { min-width: 22px; height: 22px; font-size: .72rem; }

/* En-têtes HTTP d'un environnement (paramètres du projet) */
.env-headers { min-width: 140px; }
.env-headers[open] { min-width: 320px; }
.env-header-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.env-header-list form.inline { display: inline; }
.env-header-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.env-header-form input { flex: 1 1 140px; min-width: 0; }
.env-headers p { margin: 4px 0 0; }
/* Identifiant et mot de passe HTTP d'un environnement (même présentation que les en-têtes) */
.env-http-auth { min-width: 140px; }
.env-http-auth[open] { min-width: 280px; }
.env-http-auth-current { margin: 8px 0; font-size: .85rem; }
.env-http-auth-current form.inline { display: inline; }
.env-http-auth-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.env-http-auth-form input { flex: 1 1 140px; min-width: 0; }
.env-http-auth p { margin: 4px 0 0; }

/* Fenêtres (<dialog>) : export PDF d'une exécution */
dialog.modal { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(20, 30, 50, .35); color: var(--slate); }
dialog.modal::backdrop { background: rgba(20, 30, 50, .45); }
dialog.modal header { padding: 18px 22px 12px; border-bottom: 1px solid var(--border); }
dialog.modal header h2 { margin: 0; font-size: 1.2rem; }
dialog.modal header p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
dialog.modal .modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 16px 22px 4px; }
dialog.modal fieldset { border: 0; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
dialog.modal legend { font-weight: 600; font-size: .85rem; margin-bottom: 6px; padding: 0; }
dialog.modal .check-inline { font-size: .85rem; }
dialog.modal textarea { width: 100%; font: inherit; font-size: .85rem; }
dialog.modal .report-logo { max-height: 38px; max-width: 160px; object-fit: contain; align-self: flex-start; border: 1px solid var(--border); border-radius: 6px; padding: 4px; }
dialog.modal footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); background: var(--sidebar); }
@media (max-width: 760px) { dialog.modal .modal-body { grid-template-columns: 1fr; } }

/* Modification des étapes d'un scénario : mêmes écrans que l'app */
.step-editor-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.steps .step-tools { display: flex; flex-wrap: wrap; gap: 4px; flex: none; }
.btn.tiny { padding: 3px 8px; font-size: .8rem; }
.step-panel { margin-top: 8px; padding: 12px 14px; background: var(--sidebar); border: 1px solid var(--border); border-radius: 8px; }
.step-panel label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.email-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.email-summary .step-meta { flex-basis: 100%; }
.email-waits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.email-waits .field { margin-bottom: 0; }
@media (max-width: 760px) { .email-waits { grid-template-columns: minmax(0, 1fr); } }
.email-hints .banner { margin-bottom: 8px; padding: 8px 12px; font-size: 13px; }
.email-choices { margin: 4px 0 12px; display: grid; gap: 8px; }
.email-choices > .btn { justify-self: start; }
.email-choice-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.email-choice { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface, #fff); cursor: pointer; }
.email-choice.on { border-color: var(--blue); background: var(--blue-soft); }
.email-choice-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.email-choice-links > .muted { flex-basis: 100%; }
.email-check-row { display: grid; grid-template-columns: 130px 130px minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 760px) { .email-check-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.step-panel input[type=text], .step-panel input[type=number], .step-panel select { width: 100%; }
.step-panel .row-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.step-panel .row-controls select, .step-panel .row-controls input { flex: 1 1 140px; width: auto; min-width: 0; }
.step-panel .check-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.selector-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 6px; align-items: start; margin-bottom: 6px; }
.selector-values { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.selector-tools { display: flex; gap: 4px; padding-top: 4px; }
.step-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 16px 22px; }
.step-choices .btn { white-space: normal; }
@media (max-width: 720px) { .selector-row { grid-template-columns: minmax(0, 1fr); } }

/* Recettes : tri des anomalies, annotation d'une capture */
.review-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-link { display: inline-flex; align-items: center; padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--slate); font-size: .85rem; font-weight: 600; }
.chip-link:hover { background: var(--bg); text-decoration: none; }
.chip-link.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.anomaly-row { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--border); }
.anomaly-row:first-child { border-top: 0; }
.anomaly-row.off { background: var(--bg); }
.anomaly-shot { flex: 0 0 240px; }
.anomaly-shot img { display: block; width: 100%; max-height: 170px; object-fit: contain; object-position: top; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.anomaly-shot .no-shot { display: flex; align-items: center; justify-content: center; height: 120px; background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: .85rem; }
.anomaly-main { flex: 999 1 320px; min-width: 0; }
.anomaly-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.anomaly-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: .75rem; font-weight: 700; }
.anomaly-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 8px; }
.anomaly-controls select { width: auto; }
.anomaly-context { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 8px; }
.anomaly-errors { color: var(--red); }
.annotate-area { position: relative; border: 2px dashed var(--border); border-radius: 10px; background: var(--bg); min-height: 220px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.annotate-area.dragging { border-color: var(--blue); background: var(--blue-soft); }
.annotate-area canvas { display: block; max-width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.annotate-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
/* Anomalie sur un e-mail : fenêtre à la largeur de la capture (800 px), corps qui défile */
dialog.modal.email-report-dialog { width: min(900px, calc(100vw - 32px)); }
dialog.modal.email-report-dialog[open] { display: flex; flex-direction: column; }
.email-report-body { overflow: auto; padding: 16px 22px 8px; }
.email-report-body .annotate-area { align-items: flex-start; }
.shot-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.shot-bar .shot-tabs { margin-bottom: 0; }
.shot-bar .report-anomaly { margin-left: auto; }

/* Outils de tickets */
.check-list { list-style: none; margin: 0 0 10px; padding: 0; }
.check-list li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: .9rem; }
.check-list li::before { content: '✓'; color: var(--teal); font-weight: 700; }
.check-list li.warn::before { content: '!'; color: var(--orange); }
.map-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.map-row:first-of-type { border-top: 0; }
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.ticket-grid h3 { margin-top: 0; }
.ticket-preview { background: var(--sidebar); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; font-size: .85rem; }
.ticket-preview pre { white-space: pre-wrap; font: inherit; margin: 6px 0 0; }
.send-progress { height: 6px; border-radius: 999px; background: var(--blue-soft); overflow: hidden; margin-top: 10px; }
.send-progress span { display: block; height: 100%; background: var(--blue); transition: width .25s; }
@media (prefers-reduced-motion: reduce) { .send-progress span { transition: none; } }
.anomaly-followup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
/* Recette : une barre d'actions par anomalie (Vérifier dans l'app, autres actions), verdict, étapes et « Créer un scénario » */
.anomaly-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--grid); }
.anomaly-actions select { width: auto; min-width: 150px; }
.anomaly-verdict { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: .85rem; overflow-wrap: anywhere; }
.anomaly-verdict.fixed { background: var(--teal-soft); color: #0b6b5e; }
.anomaly-verdict.still { background: var(--red-soft); color: #8f2327; }
.anomaly-steps-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px 12px; background: var(--sidebar); border: 1px solid var(--grid); border-radius: 8px; }
.anomaly-steps-row > details { flex: 1 1 260px; min-width: 0; }
.anomaly-steps-row > details > summary { font-weight: 600; font-size: .85rem; cursor: pointer; }
.anomaly-steps-row form { margin: 0; }
.review-transmit { justify-content: space-between; flex-wrap: wrap; color: #7a440f; }
/* Menu « ··· » des anomalies : il peut dépasser de la carte */
.card.flush.anomaly-list { overflow: visible; }
.anomaly-list > .anomaly-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.anomaly-list > .anomaly-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.anomaly-followup select { width: auto; }
.anomaly-followup form { margin: 0; }

/* ---------------------------------------------------------------------------
   Administration d'une organisation : tableau + volet à droite (invitation, création, réglages) */
.with-drawer { display: flex; gap: 20px; align-items: flex-start; }
.with-drawer-main { flex: 1; min-width: 0; }
.drawer { width: 370px; flex: none; position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 34px rgba(43, 51, 64, .12); padding: 18px 20px; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.drawer-header h2 { margin: 0; font-size: 1.05rem; }
.drawer fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.drawer legend { font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.drawer .muted.small { margin: 8px 0 0; }
.choice-card { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 6px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.choice-card input { margin-top: 3px; }
.choice-card { font-weight: 400; }
.choice-card span { display: flex; flex-direction: column; }
.choice-card .muted { font-weight: 400; }
.drawer label.check, .filters label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 4px 0; }
.scope-clients { margin: 4px 0 0 24px; max-height: 220px; overflow: auto; }
.field-pair { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.filter-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--slate); font-size: .85rem; font-weight: 600; }
.filter-chips a:hover { text-decoration: none; border-color: var(--blue); }
.filter-chips a.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.filter-chips .count { color: var(--muted); font-weight: 500; }
.actions-cell { text-align: right; white-space: nowrap; width: 1%; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; font-weight: 800; letter-spacing: .1em; }
.row-menu > summary.btn.primary { font-weight: 600; letter-spacing: normal; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu .menu-panel { left: auto; right: 0; width: 260px; text-align: left; }
.row-menu .menu-panel form { margin: 0; }
.group-row th, .group-row td { background: var(--bg); }
.group-row th { text-align: left; font-size: .92rem; text-transform: none; letter-spacing: 0; color: var(--slate); font-weight: 700; }
.group-row th .muted { font-weight: 500; }
.group-row th .badge { margin-left: 6px; }
.org-cell { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1100px) {
    .with-drawer { flex-direction: column-reverse; align-items: stretch; }
    .drawer { width: 100%; position: static; }
}
.badge.local { background: var(--violet-soft); color: var(--violet); border-color: transparent; }

/* ---------------------------------------------------------------------------
   Grille d'un lancement : navigateur × format, une case par combinaison (symbole + couleur) */
.run-grid { display: inline-grid; grid-template-columns: auto repeat(var(--cols, 3), 20px); gap: 3px; align-items: center; font-size: .68rem; color: var(--muted); }
.run-grid-head { text-align: center; font-weight: 600; }
.run-grid-browser { padding-right: 4px; display: inline-flex; align-items: center; justify-content: center; }
.run-cell { width: 20px; height: 18px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; line-height: 1; }
a.run-cell:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--blue-soft), 0 0 0 3px var(--blue); }
.run-cell.passed { background: var(--good); color: #fff; }
.run-cell.noted { background: var(--warn-mark); color: #4a2c00; }
.run-cell.partial { background: var(--orange); color: #fff; }
.run-cell.failed { background: var(--critical); color: #fff; }
.run-cell.none { background: var(--grid); border: 1px dashed #c6cedb; }
.run-grid-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: flex-end; font-size: .78rem; color: var(--muted); margin: 0 0 8px; }
.run-grid-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.run-grid-legend .run-cell { width: 16px; height: 16px; font-size: .65rem; }
/* Constats d'un lancement, un par ligne */
.findings-list { list-style: none; margin: 0; padding: 0; font-size: .82rem; line-height: 1.45; }
.findings-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.findings-list .finding-mark { font-size: .65rem; margin-right: 6px; }
.findings-list .error .finding-mark { color: var(--red); }
.findings-list .warning .finding-mark { color: var(--orange); }
.findings-list .more { color: var(--muted); }

/* ---------------------------------------------------------------------------
   Projet : en-tête commun et onglets (défilent à l'horizontale sur téléphone) */
.project-header { margin-bottom: 8px; }
.project-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }
.project-tabs a { padding: 8px 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.project-tabs a:hover { color: var(--slate); text-decoration: none; }
.project-tabs a.active { color: var(--blue-dark); border-bottom-color: var(--blue); }
.tab-count { font-size: .72rem; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0 7px; color: var(--muted); font-weight: 600; }
.audit-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 18px; }
.audit-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--slate); font-size: .85rem; font-weight: 600; }
.audit-nav a .icon { color: var(--muted); }
.audit-nav a:hover { border-color: var(--blue); text-decoration: none; }
.audit-nav a.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.audit-nav a.active .icon { color: var(--blue); }
.btn.secondary { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.btn.secondary:hover { background: #dbe9fc; }

/* Projet : vue d'ensemble (synthèse, qualité des pages, rejeu à droite) */
.overview-main { min-width: 0; }
/* Rejouer : bouton de l'en-tête du projet qui ouvre le formulaire de rejeu */
.replay-menu { position: relative; display: inline-block; }
.replay-menu > summary { list-style: none; font-size: inherit; }
.replay-menu > summary::-webkit-details-marker { display: none; }
.replay-menu[open] > summary { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.replay-menu > summary .icon:last-child { transition: transform .15s; }
.replay-menu[open] > summary .icon:last-child { transform: rotate(180deg); }
.replay-panel { left: auto; right: 0; width: 360px; max-width: calc(100vw - 32px); padding: 16px 18px; display: block; text-align: left; font-weight: 400; }
.replay-panel .card-header h2 { font-size: 1rem; }
.replay-panel .request-list { margin-top: 10px; }
.replay-schedules { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.small-pill { padding: 0 7px; font-size: .7rem; }
/* Sur téléphone, le formulaire de rejeu prend la largeur de l'écran, sous le bouton */
@media (max-width: 640px) { .replay-panel { position: fixed; left: 16px; right: 16px; width: auto; } }
/* Vue d'ensemble : une ligne par scénario, combinaisons regroupées par navigateur */
.scenario-lines { display: flex; flex-direction: column; }
.scenario-lines > .card-header { padding-bottom: 12px; margin: 0; }
.scenario-line { padding: 11px 18px; border-top: 1px solid var(--border); }
.scenario-line.more { font-size: .88rem; }
.scenario-line-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scenario-line-name { font-weight: 700; color: var(--slate); margin-right: auto; }
.scenario-line .run-strip { margin-top: 7px; }
.run-strip { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.run-strip-browser { display: inline-flex; align-items: center; gap: 3px; }
.run-strip-browser .browser-logo { margin-right: 2px; }
.run-strip .run-cell { width: 18px; height: 18px; text-decoration: none; }
.run-strip-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 10px 18px 12px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.run-strip-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.run-strip-legend .run-cell { width: 16px; height: 16px; font-size: .62rem; }
.overview-bottom { align-items: start; }
.synthesis-head { display: flex; align-items: center; gap: 10px; }
.synthesis-head h2 { margin: 0; font-size: 1.1rem; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); }
.status-dot.good { background: var(--good); } .status-dot.warn { background: var(--orange); } .status-dot.bad { background: var(--critical); } .status-dot.none { background: #c6cedb; }
.synthesis-sub { margin: 2px 0 0 22px; color: var(--muted); font-size: .9rem; }
.failing-list { list-style: none; margin: 10px 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.synthesis-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border-top: 1px solid var(--border); }
.synthesis-figures > div { display: flex; flex-direction: column; padding: 12px 12px 0; border-left: 1px solid var(--border); min-width: 0; }
.synthesis-figures > div:first-child { padding-left: 0; border-left: 0; }
.figure-label { font-size: .8rem; color: var(--muted); }
.figure-value { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.figure-value.warn { color: #93500d; }
.figure-note { font-size: .8rem; color: var(--muted); }
a.figure-note { color: var(--blue); }
@media (max-width: 640px) {
    .synthesis-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .synthesis-figures > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
.quality-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .quality-grid { grid-template-columns: minmax(0, 1fr); } }
.quality-tile { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--slate); min-width: 0; }
.quality-tile:hover { text-decoration: none; border-color: var(--blue); }
.quality-icon { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--bg); color: var(--muted); }
.quality-label { display: block; font-size: .8rem; color: var(--muted); }
.quality-tile strong { display: block; }
.quality-tile.bad .quality-icon { background: var(--red-soft); color: #b4232f; } .quality-tile.bad strong { color: #b4232f; }
.quality-tile.warn .quality-icon { background: var(--orange-soft); color: #93500d; } .quality-tile.warn strong { color: #93500d; }
.quality-tile.good .quality-icon { background: var(--teal-soft); color: #0a7568; } .quality-tile.good strong { color: #0a7568; }
.quality-tile.none strong { color: var(--muted); font-weight: 600; }
.settings-summary .summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .9rem; }
.launch-card .card-header { flex-wrap: wrap; }
.section-title { font-size: 1.15rem; margin: 0 0 4px; }
/* Icône devant un titre ou un libellé (audits, variables secrètes) */
h1.with-icon, h2.with-icon { display: flex; align-items: center; gap: 8px; }
strong.with-icon, .badge.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.badge.with-icon { gap: 4px; }
.with-icon > .icon { color: var(--muted); }
.issue-line > .icon { vertical-align: -3px; margin-right: 5px; }
.tab-intro { margin: -8px 0 14px; }

/* Exécutions : une ligne par lancement, combinaisons dépliables */
.expand-cell { width: 44px; padding-right: 0 !important; }
.expand-button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.expand-button:hover { color: var(--slate); border-color: var(--blue); }
.expand-button .icon { transform: rotate(-90deg); transition: transform .15s; }
.expand-button[aria-expanded="true"] .icon { transform: none; }
.launch-detail > td { background: var(--bg); padding-top: 4px !important; padding-bottom: 10px !important; }
.launch-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.launch-runs a { display: grid; grid-template-columns: 170px 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); color: var(--slate); }
.launch-runs a:hover { text-decoration: none; border-color: var(--blue); }
.launch-runs .combo { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) { .launch-runs a { grid-template-columns: minmax(0, 1fr) auto; } .launch-runs a > .small.muted { grid-column: 1 / -1; } }

/* Exécution : étapes à gauche, détail de l'étape choisie à droite */
.run-context { color: var(--muted); font-size: .88rem; margin: 2px 0 0; }
.run-layout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }
.run-step-nav { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-right: 14px; border-right: 1px solid var(--border); }
.segmented { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 8px; }
.segmented button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-dark); }
.segmented button:disabled { cursor: default; opacity: .55; }
.run-step-list { list-style: none; margin: 0; padding: 0; }
.run-step-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 7px; color: var(--slate); font-size: .86rem; }
.run-step-list li[style*="--depth"] a { padding-left: calc(8px + var(--depth) * 14px); }
.run-step-list a:hover { background: var(--bg); text-decoration: none; }
.run-step-list a.active { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.run-step-list a.step-marker .step-label, .run-step-list a.step-block .step-label { color: var(--violet); font-weight: 600; }
.step-number { font-size: .72rem; font-weight: 700; color: var(--muted); text-align: right; }
.step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-findings { font-size: .7rem; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--orange-soft); color: #93500d; }
.step-status { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 800; background: var(--bg); color: var(--muted); }
.step-status.passed { background: var(--teal-soft); color: #0a7568; }
.step-status.failed { background: var(--red-soft); color: var(--red); }
.run-layout.is-enhanced .run-step-details > li { border-top: 0; padding-top: 0; }
.run-step-details .step-body { grid-template-columns: minmax(0, 1fr) !important; }
.run-step-details .step-shot { max-width: 720px; }
@media (max-width: 960px) {
    .run-layout { grid-template-columns: minmax(0, 1fr); }
    .run-step-nav { position: static; max-height: 280px; padding-right: 0; border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
}
.findings-head { flex-wrap: wrap; }
.run-result { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 12px; border-radius: 8px; background: var(--teal-soft); color: #0a7568; margin-right: 8px; }
.run-result.failed { background: var(--red-soft); color: var(--red); }
.run-result.partial, .run-result.aborted { background: var(--orange-soft); color: #93500d; }
.issue-group { margin: 2px 0; }
.issue-group > summary { cursor: pointer; list-style: none; }
.issue-group > summary::-webkit-details-marker { display: none; }
.issue-group > summary::after { content: ' ›'; color: var(--muted); }
.issue-group[open] > summary::after { content: ' ⌄'; }
.issue-group > .issue-line { padding-left: 18px; }
.issue-group-count { font-weight: 700; }
.chart-empty-note { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .85rem; text-align: center; max-width: 90%; }

/* Mon compte : appareils regroupés */
.device-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.device-row:first-of-type { border-top: 0; }
.device-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.device-name { display: flex; flex-direction: column; min-width: 0; }
.device-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-history { margin-top: 12px; }
.device-history > summary { cursor: pointer; font-weight: 600; color: var(--blue); }
@media (max-width: 640px) { .device-row { grid-template-columns: 36px minmax(0, 1fr); } .device-row > .small, .device-row > form { grid-column: 2; } }
.launch-table tbody tr:not(.launch-detail) > td:nth-child(2) { min-width: 190px; }
@media (max-width: 640px) { .launch-table tr > :nth-child(3) { display: none; } }

/* Utilisation (admin complet) : tableau par organisation, limites indicatives */
.month-nav { display: inline-flex; align-items: center; gap: 8px; }
.month-nav strong { min-width: 140px; text-align: center; }
.btn.disabled { opacity: .4; pointer-events: none; }
.usage-table td { white-space: nowrap; }
.usage-table thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; font-size: .66rem; letter-spacing: .02em; }
.usage-table th, .usage-table td { padding-left: 8px; padding-right: 8px; }
.usage-table th:first-child, .usage-table td:first-child { padding-left: 18px; }
.usage-table td:not(:first-child), .usage-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.usage-table tfoot th, .usage-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); background: var(--bg); }
.usage-table .org-cell { display: inline-flex; align-items: center; gap: 8px; color: var(--slate); }
.usage-figure.over, .over-text { color: var(--red); font-weight: 700; }
.usage-limit { color: var(--muted); font-weight: 400; }
.usage-figure.over .usage-limit { color: var(--red); }
.usage-change { display: inline-block; margin-left: 4px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.usage-ecoindex { margin: 0; font-size: 1rem; }
.usage-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.usage-detail > .card { margin: 0; }
@media (max-width: 1100px) { .usage-detail { grid-template-columns: minmax(0, 1fr); } }
.quota-input { display: flex; align-items: center; gap: 10px; }
.quota-input input { width: 120px; }

/* Navigateur d'un déroulé dans une liste : logo puis nom court */
.browser-name { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: -3px; }
.browser-name .browser-logo { flex: none; }

/* Cahier de recette : sélection des scénarios, fenêtre d'export, menu « Exporter » d'une recette */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.link-button { font: inherit; font-size: inherit; padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; text-decoration: underline; }
.scenario-health .select-cell { width: 30px; padding-right: 0; }
.scenario-health .select-cell input { margin: 3px 0 0; }
.scenario-health tr:has(.select-cell input:checked) { background: var(--blue-soft); }
dialog.modal input[type=text], dialog.modal select { width: 100%; }
dialog.modal .modal-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 22px 14px; padding: 10px 12px; border-radius: 8px; background: var(--sidebar); color: var(--muted); font-size: .82rem; }
dialog.modal .modal-note .icon { flex: none; margin-top: 2px; }
dialog.modal button .icon, .export-panel button .icon { margin-right: 6px; vertical-align: -3px; }
.export-panel { width: 340px; }
.export-panel h2 { margin: 0 0 4px; font-size: 1rem; }
.export-panel form { display: flex; flex-direction: column; gap: 8px; }
.export-panel fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.export-panel .check-inline { font-size: .85rem; }
.export-panel form .btn { align-self: flex-start; }
.export-more { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--slate); text-decoration: none; }
.export-more:hover strong { color: var(--blue); }
.export-more .icon { flex: none; margin-top: 2px; color: var(--muted); }
.export-more > span { display: flex; flex-direction: column; }
#test-plan .check-inline, .export-panel .check-inline { align-items: flex-start; }
#test-plan .check-inline input, .export-panel .check-inline input { margin-top: 3px; flex: none; }
.menu-item.danger { color: var(--red); }
/* E-mails de la boîte de test d'un projet */
.emails-count { margin-left: auto; }
.emails-delete { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.emails-table td { vertical-align: top; }
.email-snippet { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-header .btn-row { align-items: center; }
.email-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.email-main { display: flex; flex-direction: column; gap: 12px; }
.email-views { align-self: flex-start; }
.email-text { white-space: pre-wrap; font: 13px/1.5 ui-monospace, Menlo, monospace; margin: 0; max-height: 640px; overflow: auto; }
.email-side { display: flex; flex-direction: column; gap: 14px; }
.email-side .card { margin: 0; }
.email-side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.email-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; overflow-wrap: anywhere; }
.email-attachment { display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 1100px) { .email-layout { grid-template-columns: minmax(0, 1fr); } }
/* Aperçu en pleine page (lien signé, navigateur de la recette) */
.email-preview { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.email-preview-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.email-preview-frame { flex: 1; width: 100%; border: 0; background: #fff; }
/* Recette : e-mails reçus aux adresses fixes */
.review-emails { margin-bottom: 16px; }
/* Titre repliable (les e-mails sont repliés par défaut) : séparé des e-mails par leur propre filet */
.card.flush.review-emails > summary { list-style: none; justify-content: flex-start; flex-wrap: wrap; margin: 0; padding: 14px 18px; font-size: inherit; font-weight: inherit; border-radius: inherit; }
.review-emails > summary::-webkit-details-marker { display: none; }
.review-emails > summary:hover { background: var(--bg); }
.review-emails > summary > .icon { color: var(--muted); transform: rotate(-90deg); transition: transform .15s; flex: none; }
.review-emails[open] > summary > .icon { transform: none; }
@media (prefers-reduced-motion: reduce) { .review-emails > summary > .icon { transition: none; } }
.review-email { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 18px; border-top: 1px solid var(--grid); }
.review-email-main { flex: 999 1 320px; min-width: 0; }

/* Page d'un scénario : carte « Connexion » (liste de choix et bouton sur une ligne, textes d'aide en dessous) */
.login-card .login-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.login-card .login-form select { flex: 1 1 100%; min-width: 0; }
.login-card .banner { margin: 0 0 10px; padding: 8px 12px; font-size: 13px; }
.login-card p { margin: 0 0 8px; }
.login-card p:last-child { margin-bottom: 0; }

.warning-text { color: var(--orange); }
/* En tête des étapes d'un scénario qui commence connecté */
.login-first { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 9px; background: var(--blue-soft); color: var(--slate); }
.login-first > svg { flex: none; color: var(--blue); }
.login-first > span { flex: 1; }

/* Rapport d'un run : connexion jouée avant les étapes, repliée en tête du déroulé */
.login-run { border: 1px solid var(--border); border-radius: 9px; margin: 0 0 14px; background: var(--surface); }
.login-run.failed { border-color: var(--orange); }
.login-run > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.login-run > summary .muted { font-weight: 400; }
.login-run > summary a { margin-left: auto; font-weight: 400; }
.login-run > .step-error { margin: 0 14px 10px; }
.login-run-steps { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 6px; }
.login-run-steps li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; font-size: .9rem; }
.login-run-steps li.skipped { color: var(--muted); }
.login-run-steps .step-error { display: block; margin-top: 4px; }
.login-run-shot { grid-column: 2 / -1; }
.login-run-shot img { max-width: 100%; max-height: 320px; border: 1px solid var(--border); border-radius: 6px; }


/* Point cliqué d'une étape « clic » (carte, zone de dessin) */
.position-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.position-offset { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 400; }
.step-panel .position-offset input { width: 90px; flex: none; }
