/* ============================================================
   MODULES IA & GED — styles propres aux pages
   · ged-archivage-electronique-maroc.html (MagicaGED)
   · secretariat-medical-ia.html (SecrétariatIA + Salle d'attente IA)
   Chargé UNIQUEMENT sur ces deux pages, après magica2026.css.
   Les écrans MagicaGED (.ged-*) reproduisent l'interface réelle
   de l'application (Tailwind, bleu #1b65db, fond #f4f6fb) à l'échelle ~0,8.
   Les scènes animées (.va-*, .sa-*) sont pilotées par js/modules-ia-ged.js.
   ============================================================ */

.demo-caption {
    margin-top: 14px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-muted);
}
.demo-caption i { vertical-align: -2px; margin-right: 4px; }

.hero-shot { max-width: 1120px; margin: 8px auto 0; }

[lang="ar"], .rtl-text {
    font-family: 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', 'Arabic Typesetting', sans-serif;
}

/* ============================================================
   1. ÉCRANS MAGICAGED (maquettes fidèles à l'application)
   ============================================================ */
.ged-app {
    display: grid;
    grid-template-columns: 206px minmax(0, 1fr);
    min-height: 540px;
    background: #f4f6fb;
    color: #0f172a;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}
.ged-app * { box-sizing: border-box; }

/* Barre latérale */
.ged-side {
    display: flex; flex-direction: column;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}
.ged-brand { display: flex; align-items: center; gap: 8px; padding: 16px 14px 12px; }
.ged-logo {
    width: 29px; height: 29px; border-radius: 8px;
    background: #1b65db; color: #fff;
    display: grid; place-items: center; font-size: 15px;
}
.ged-brand b { display: block; font-size: 11.5px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.ged-brand small { display: block; font-size: 9.5px; color: #94a3b8; }
.ged-nav { flex: 1; padding: 4px 9px; }
.ged-nav span {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 9px; margin-bottom: 2px;
    border-radius: 7px;
    font-size: 11.2px; font-weight: 500; color: #475569;
}
.ged-nav span i { font-size: 13px; }
.ged-nav span.on { background: #eef6ff; color: #174fb0; }
.ged-nav-label {
    display: block;
    padding: 14px 9px 4px;
    font-size: 9px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: #94a3b8;
}
.ged-user { border-top: 1px solid #e2e8f0; padding: 10px 12px 12px; }
.ged-user b { display: block; font-size: 11px; font-weight: 500; color: #1e293b; }
.ged-user small { display: block; font-size: 9.5px; color: #94a3b8; }
.ged-logout { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 10.5px; color: #475569; }
.ged-editor {
    margin-top: 9px; padding-top: 8px; border-top: 1px solid #f1f5f9;
    text-align: center; font-size: 7.5px; letter-spacing: 0.18em; text-transform: uppercase; color: #cbd5e1;
}
.ged-editor b { display: block; margin-top: 2px; font-size: 10px; letter-spacing: 0.02em; text-transform: none; color: #64748b; font-weight: 650; }

/* Zone principale */
.ged-main { padding: 20px 24px 24px; min-width: 0; }
.ged-main > * + * { margin-top: 16px; }
.ged-h1 { font-size: 18px; font-weight: 700; color: #0f172a; line-height: 1.25; }
.ged-sub { color: #64748b; font-size: 11.5px; margin-top: 2px; }
.ged-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ged-back { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #64748b; }

.ged-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.ged-pad { padding: 14px 16px; }
.ged-card-title { font-size: 11.5px; font-weight: 600; color: #334155; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.ged-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ged-stat { padding: 13px 15px; }
.ged-stat-top { display: flex; align-items: center; justify-content: space-between; color: #64748b; font-size: 11px; font-weight: 500; }
.ged-stat-top i { color: #2f83f5; font-size: 15px; }
.ged-stat b { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -0.01em; }

/* Histogramme 12 mois (même logique que added-timeline.tsx) */
.ged-tl-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ged-tl-head span { font-size: 10px; color: #94a3b8; }
.ged-tl { display: flex; align-items: flex-end; gap: 5px; height: 118px; }
.ged-tl > div { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ged-tl em { font-style: normal; font-size: 8.5px; font-weight: 500; color: #64748b; }
.ged-tl .bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.ged-tl .bar { width: 100%; border-radius: 4px 4px 0 0; background: #bcdcff; }
.ged-tl .bar.cur { background: #1b65db; }
.ged-tl small { font-size: 8px; color: #94a3b8; white-space: nowrap; }

.ged-recent { list-style: none; margin: 0; padding: 0; }
.ged-recent li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid #f1f5f9; }
.ged-recent li:first-child { border-top: none; padding-top: 0; }
.ged-recent b { display: block; font-size: 11.3px; font-weight: 500; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ged-recent small { display: block; font-size: 9.8px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ged-recent time { flex-shrink: 0; font-size: 9.8px; color: #94a3b8; }
.ged-recent div { min-width: 0; }

/* Boutons, champs, badges */
.ged-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 29px; padding: 0 12px; border-radius: 7px;
    font-size: 11px; font-weight: 500; white-space: nowrap;
    background: #1b65db; color: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.ged-btn.sec { background: #fff; color: #334155; border: 1px solid #cbd5e1; box-shadow: none; }
.ged-btn.danger { background: #dc2626; }
.ged-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.ged-filters { display: grid; grid-template-columns: 3fr 3fr 2fr 2fr 2fr; gap: 9px; }
.ged-field {
    position: relative;
    height: 31px; padding: 0 26px 0 10px;
    display: flex; align-items: center;
    border: 1px solid #cbd5e1; border-radius: 7px; background: #fff;
    font-size: 11px; color: #334155;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ged-field.search { padding-left: 28px; color: #94a3b8; }
.ged-field.search::before {
    content: ''; position: absolute; left: 10px; top: 50%;
    width: 9px; height: 9px; border: 1.6px solid #94a3b8; border-radius: 50%;
    transform: translateY(-62%);
}
.ged-field.search::after { content: none; }
.ged-field::after {
    content: ''; position: absolute; right: 10px; top: 50%;
    width: 5px; height: 5px; border-right: 1.5px solid #64748b; border-bottom: 1.5px solid #64748b;
    transform: translateY(-70%) rotate(45deg);
}
.ged-field.active { border-color: #2f83f5; box-shadow: 0 0 0 3px #d9ebff; color: #0f172a; font-weight: 500; }
.ged-field.big { height: 40px; font-size: 13px; padding-left: 36px; color: #0f172a; }
.ged-field.big::before { left: 13px; width: 11px; height: 11px; border-width: 2px; }
.ged-reset { display: inline-block; margin-top: 9px; font-size: 10.5px; color: #1b65db; }
.ged-label { display: block; font-size: 10.5px; font-weight: 500; color: #334155; margin-bottom: 4px; }
.ged-grid3 { display: grid; grid-template-columns: 4fr 5fr 3fr; gap: 10px; margin-top: 10px; }

.ged-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 7px; border-radius: 999px;
    font-size: 9.5px; font-weight: 500; white-space: nowrap;
    color: var(--c, #475569);
    background: color-mix(in srgb, var(--c, #475569) 11%, transparent);
}
.ged-badge.plain { --c: #475569; background: #e2e8f0; }
.ged-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.ged-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ged-table thead th {
    padding: 8px 11px; text-align: left;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    font-size: 9.3px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: #64748b;
}
.ged-table td { padding: 8px 11px; border-top: 1px solid #f1f5f9; color: #64748b; vertical-align: middle; white-space: nowrap; }
.ged-table td:first-child { color: #1e293b; font-weight: 500; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.ged-table tbody tr:first-child td { border-top: none; }
.ged-table .ico { margin-right: 6px; }
.ged-table-wrap { overflow: hidden; }
.ged-pager { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 10.5px; color: #64748b; }

/* Recherche */
.ged-count { font-size: 11px; color: #64748b; }
.ged-result { display: flex; gap: 10px; padding: 12px 14px; }
.ged-result + .ged-result { margin-top: 9px; }
.ged-result .ico { font-size: 19px; line-height: 1; }
.ged-result b { display: block; font-size: 11.8px; font-weight: 500; color: #1e293b; }
.ged-result small { display: block; font-size: 9.8px; color: #94a3b8; }
.ged-result p { margin: 5px 0 6px; font-size: 11px; color: #64748b; line-height: 1.5; }

/* Fiche document */
.ged-doc-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ged-doc-grid > div > * + * { margin-top: 14px; }
.ged-preview-head { padding: 7px 14px; border-bottom: 1px solid #f1f5f9; font-size: 9.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.ged-preview { background: #f1f5f9; padding: 16px 0; border-radius: 0 0 11px 11px; }
.ged-paper {
    width: 72%; margin: 0 auto;
    background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    padding: 22px 24px 26px;
    font-family: Georgia, 'Times New Roman', serif;
    color: #1e293b; font-size: 9px; line-height: 1.55;
}
.ged-paper-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5px solid #1e293b; padding-bottom: 7px; margin-bottom: 10px; }
.ged-paper-head b { font-size: 10.5px; letter-spacing: 0.02em; }
.ged-paper-head small { display: block; font-size: 7.5px; color: #64748b; }
.ged-paper h5 { font-size: 11px; text-align: center; margin: 4px 0 10px; letter-spacing: 0.04em; text-transform: uppercase; }
.ged-paper p { margin-bottom: 7px; }
.ged-paper .ln { height: 5px; background: #e2e8f0; border-radius: 3px; margin: 6px 0; }
.ged-paper .sign { display: flex; justify-content: space-between; margin-top: 16px; font-size: 8px; color: #475569; }
.ged-paper .sign span { border-top: 1px solid #94a3b8; padding-top: 3px; width: 40%; text-align: center; }
.ged-info { display: grid; gap: 6px; font-size: 10.8px; }
.ged-info div { display: flex; justify-content: space-between; gap: 12px; }
.ged-info dt { color: #94a3b8; flex-shrink: 0; }
.ged-info dd { margin: 0; color: #334155; font-weight: 500; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ged-hist { list-style: none; margin: 0; padding: 0; font-size: 10.5px; }
.ged-hist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid #f8fafc; color: #64748b; }
.ged-hist li:last-child { border-bottom: none; }
.ged-hist time { font-size: 9.5px; color: #94a3b8; flex-shrink: 0; }
.ged-hist span { display: flex; align-items: center; gap: 6px; min-width: 0; }

/* Numériser / Importer */
.ged-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ged-drop {
    border: 1.5px dashed #bcdcff; border-radius: 10px; background: #f8fbff;
    padding: 22px 12px; text-align: center; color: #64748b; font-size: 11px;
}
.ged-drop i { font-size: 24px; color: #2f83f5; display: block; margin-bottom: 6px; }
.ged-form-row + .ged-form-row { margin-top: 10px; }
.ged-agent { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 8px; background: #f0fdf4; color: #15803d; font-size: 10.8px; font-weight: 500; }
.ged-agent i { font-size: 14px; }
.ged-muted { font-size: 10.3px; color: #94a3b8; }
.ged-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ged-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--c, #cbd5e1); color: var(--c, #475569); font-size: 10px; font-weight: 500; background: #fff; }
.ged-chip.on { background: var(--c); color: #fff; }
.ged-ok { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 8px; background: #f0fdf4; color: #15803d; font-size: 11px; }
.ged-ok u { font-weight: 600; }
.ged-sep { display: flex; align-items: center; gap: 10px; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.ged-sep::before, .ged-sep::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.ged-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #94a3b8; }
.ged-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.ged-foot { display: flex; justify-content: flex-end; border-top: 1px solid #f1f5f9; padding-top: 12px; margin-top: 12px; }

/* OCR : page scannée → texte reconnu */
.ocr-demo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; }
.ocr-scan { position: relative; padding: 18px 14px; background: #f1f5f9; overflow: hidden; border-right: 1px solid var(--hairline); }
.ocr-scan .ged-paper { padding: 14px 14px 16px; font-size: 8.5px; }
.ocr-scan .ged-paper-head b { font-size: 9px; }
.ocr-scan .ged-paper { width: 100%; transform: rotate(-0.6deg); filter: contrast(0.96); }
.ocr-scan::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 38px;
    background: linear-gradient(180deg, rgba(47, 131, 245, 0), rgba(47, 131, 245, 0.22) 70%, rgba(47, 131, 245, 0.7) 100%);
    border-bottom: 2px solid #2f83f5;
    animation: ocrScan 4.2s ease-in-out infinite;
}
@keyframes ocrScan { 0% { top: -40px; } 70% { top: calc(100% - 20px); } 100% { top: calc(100% - 20px); opacity: 0; } }
.ocr-text { padding: 20px 22px; font-family: Consolas, 'Courier New', monospace; font-size: 0.78rem; line-height: 1.7; color: var(--ink-soft); background: var(--white); }
.ocr-text .lbl { display: block; font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.ocr-text mark { background: #FDE68A; color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* Paramétrage : profils d'accès */
.ged-profiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.ged-plist { list-style: none; margin: 0; padding: 0; }
.ged-plist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid #f1f5f9; font-size: 11px; }
.ged-plist li:first-child { border-top: none; }
.ged-plist li.on { background: #eef6ff; border-radius: 8px; }
.ged-plist b { font-weight: 600; color: #1e293b; display: block; }
.ged-plist small { color: #94a3b8; font-size: 9.8px; }
.ged-tree { list-style: none; margin: 0; padding: 0; font-size: 11px; color: #334155; }
.ged-tree li { display: flex; align-items: center; gap: 7px; padding: 4px 0; }
.ged-tree li.l2 { padding-left: 20px; }
.ged-tree li.l3 { padding-left: 40px; }
.ged-cb {
    width: 13px; height: 13px; border-radius: 3px; flex-shrink: 0;
    border: 1.5px solid #94a3b8; background: #fff; position: relative;
}
.ged-cb.on { background: #1b65db; border-color: #1b65db; }
.ged-cb.on::after {
    content: ''; position: absolute; left: 3.5px; top: 1px;
    width: 3px; height: 6px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.ged-cb.inh { background: #bcdcff; border-color: #8ec6ff; }
.ged-tree .hint { margin-left: auto; font-size: 9.3px; color: #94a3b8; }

/* Visite guidée (onglets) */
.tour-tabs {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin: 0 auto 26px;
}
.tour-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: var(--r-pill);
    border: 1px solid var(--hairline-strong); background: var(--white);
    font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tour-tab i { font-size: 1.05rem; }
.tour-tab:hover { border-color: var(--c-ged); color: var(--c-ged); }
.tour-tab[aria-selected="true"] { background: var(--c-ged); border-color: var(--c-ged); color: #fff; }
.tour-panel[hidden] { display: none; }
.tour-panel { animation: tourIn 0.35s ease; }
@keyframes tourIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tour-caption {
    max-width: 760px; margin: 20px auto 0;
    text-align: center; font-size: 0.95rem; color: var(--ink-muted);
}
.tour-caption strong { color: var(--ink); }

/* ============================================================
   2. ILLUSTRATION ANIMÉE : trois canaux → un circuit
   ============================================================ */
.flow {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 110px minmax(0, 1fr) 110px minmax(0, 0.95fr);
    align-items: center;
}
.flow-sources { display: grid; gap: 14px; }
.flow-card {
    display: flex; align-items: center; gap: 13px;
    background: var(--white);
    border: 1px solid var(--hairline); border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}
.flow-card .fi {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 1.3rem;
    background: var(--t-ged); color: var(--c-ged);
}
.flow-card b { display: block; color: var(--ink); font-size: 0.95rem; line-height: 1.3; }
.flow-card small { display: block; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.4; }

.flow-link { position: relative; height: 100%; min-height: 220px; }
.flow-link::before {
    content: ''; position: absolute; left: 6px; right: 6px; top: 50%;
    border-top: 2px dashed var(--hairline-strong);
}
.flow-link .doc {
    position: absolute; top: 50%; left: 0;
    width: 18px; height: 22px; margin-top: -11px;
    background: var(--white); border: 1.5px solid var(--c-ged); border-radius: 3px;
    box-shadow: 0 3px 8px rgba(27, 95, 201, 0.18);
    animation: flowDoc 3.6s linear infinite;
    opacity: 0;
}
.flow-link .doc::before, .flow-link .doc::after {
    content: ''; position: absolute; left: 3px; right: 3px; height: 1.5px; background: var(--c-ged); opacity: 0.55;
}
.flow-link .doc::before { top: 6px; }
.flow-link .doc::after { top: 11px; right: 6px; }
.flow-link .doc:nth-child(2) { animation-delay: 1.2s; }
.flow-link .doc:nth-child(3) { animation-delay: 2.4s; }
.flow-link.out .doc { border-color: var(--ok); box-shadow: 0 3px 8px rgba(4, 120, 87, 0.18); }
.flow-link.out .doc::before, .flow-link.out .doc::after { background: var(--ok); }
@keyframes flowDoc {
    0% { left: 0; opacity: 0; }
    12% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: calc(100% - 18px); opacity: 0; }
}

.flow-core {
    background: var(--white);
    border: 1.5px solid var(--c-ged);
    border-radius: 18px;
    padding: 20px 20px 16px;
    box-shadow: 0 18px 44px rgba(27, 95, 201, 0.12);
    text-align: center;
}
.flow-core-head { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 14px; }
.flow-core-head .ged-logo { width: 32px; height: 32px; font-size: 1rem; }
.flow-core-head b { font-size: 1.05rem; color: var(--ink); }
.flow-steps { list-style: none; display: grid; gap: 7px; text-align: left; }
.flow-steps li {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 10px;
    background: var(--paper); font-size: 0.86rem; color: var(--ink-soft);
}
.flow-steps li i { color: var(--c-ged); font-size: 1.05rem; }
.flow-steps li::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(27, 95, 201, 0.10), transparent);
    transform: translateX(-100%);
    animation: flowScan 3.6s ease-in-out infinite;
}
.flow-steps li:nth-child(2)::after { animation-delay: 0.45s; }
.flow-steps li:nth-child(3)::after { animation-delay: 0.9s; }
.flow-steps li:nth-child(4)::after { animation-delay: 1.35s; }
@keyframes flowScan { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

.flow-out {
    background: var(--white);
    border: 1px solid var(--hairline); border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-card);
}
.flow-out .ged-field { font-family: var(--sans); height: 38px; font-size: 0.88rem; color: var(--ink); padding-left: 32px; }
.flow-out .ged-field::before { border-color: var(--c-ged); }
.flow-out .typed { border-right: 2px solid var(--c-ged); padding-right: 2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.flow-hits { list-style: none; margin-top: 10px; display: grid; gap: 7px; }
.flow-hits li { font-size: 0.8rem; color: var(--ink-muted); padding: 8px 10px; border-radius: 9px; background: var(--paper); line-height: 1.35; }
.flow-hits li b { display: block; color: var(--ink); font-size: 0.84rem; }
.flow-out-foot { margin-top: 10px; font-size: 0.78rem; color: var(--ok); font-weight: 650; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   3. STOCKAGE MIROIR
   ============================================================ */
.mirror { display: grid; grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); align-items: center; gap: 0; }
.mirror-pane {
    background: var(--white); border: 1px solid var(--hairline); border-radius: 14px;
    overflow: hidden; box-shadow: var(--shadow-card);
}
.mirror-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--hairline); background: #FCFBF8;
    font-size: 0.78rem; font-weight: 650; color: var(--ink-soft);
}
.mirror-head i { font-size: 1rem; color: var(--c-ged); }
.mirror-list { list-style: none; padding: 12px 14px; font-size: 0.84rem; color: var(--ink-soft); }
.mirror-list li { display: flex; align-items: center; gap: 7px; padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mirror-list li i { color: #D69E2E; font-size: 1rem; flex-shrink: 0; }
.mirror-list li.f i { color: #DC2626; }
.mirror-list li.l2 { padding-left: 18px; }
.mirror-list li.l3 { padding-left: 36px; }
.mirror-list li.hl { background: var(--t-ged); border-radius: 6px; margin: 0 -6px; padding: 4px 6px 4px 42px; color: var(--ink); font-weight: 600; white-space: normal; align-items: flex-start; }
.mirror-list li.hl i { margin-top: 2px; }
.mirror-list li.hl code { word-break: break-all; }
.mirror-list code { font-family: Consolas, 'Courier New', monospace; font-size: 0.78rem; }
.mirror-mid { text-align: center; color: var(--c-ged); font-size: 1.6rem; }
.mirror-mid small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }

/* ============================================================
   4. SCÈNE ANIMÉE — SecrétariatIA (appel en direct)
   ============================================================ */
.va-demo {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 20px;
    box-shadow: var(--shadow-frame);
    overflow: hidden;
}
.va-toolbar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hairline);
    background: #FCFBF8;
}
.va-toolbar-title { display: flex; align-items: center; gap: 9px; font-size: 0.82rem; font-weight: 650; color: var(--ink); }
.va-rec { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgba(190, 18, 60, 0.45); }
.va-demo.is-live .va-rec { animation: recPulse 1.6s ease-out infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(190, 18, 60, 0.45); } 100% { box-shadow: 0 0 0 9px rgba(190, 18, 60, 0); } }
.va-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.va-langs { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--paper-deep); gap: 2px; }
.va-langs button {
    border: none; background: transparent;
    padding: 6px 13px; border-radius: var(--r-pill);
    font-size: 0.8rem; font-weight: 650; color: var(--ink-muted);
    transition: background 0.2s, color 0.2s;
}
.va-langs button[aria-selected="true"] { background: var(--white); color: var(--violet-deep); box-shadow: 0 1px 3px rgba(0, 2, 50, 0.1); }
.va-langs button span[lang="ar"] { font-size: 0.86rem; }
.va-replay {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--hairline-strong); background: var(--white);
    padding: 6px 13px; border-radius: var(--r-pill);
    font-size: 0.8rem; font-weight: 650; color: var(--ink-soft);
}
.va-replay:hover { border-color: var(--violet); color: var(--violet-deep); }

/* Bouton son (data-va-sound) : la scène joue muette, le clic la relance avec les voix */
.va-sound { border-color: var(--violet); color: var(--violet-deep); background: var(--violet-tint); }
.va-sound:hover { background: var(--white); }
.va-sound.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.va-sound.on:hover { background: var(--violet-deep); color: #fff; }
.va-sound i { font-size: 1rem; }
.va-sound[hidden] { display: none; }   /* sans JS : pas de bouton son */

.va-stage {
    position: relative;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) minmax(0, 290px);
    gap: 0;
    min-height: 520px;
}

/* Téléphone */
.va-phone-col { padding: 24px 22px; border-right: 1px solid var(--hairline); background: var(--paper); display: flex; align-items: center; justify-content: center; }
.va-phone {
    width: 206px; height: 420px;
    border-radius: 34px;
    border: 7px solid var(--ink);
    background: #FDFCFA;
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    padding: 30px 16px 20px;
    box-shadow: 0 22px 50px rgba(0, 2, 50, 0.18);
}
.va-phone::before {
    content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 64px; height: 17px; border-radius: 12px; background: var(--ink);
}
.va-status { font-size: 0.72rem; color: var(--ink-muted); letter-spacing: 0.02em; }
.va-avatar {
    width: 68px; height: 68px; border-radius: 50%;
    margin: 22px 0 12px;
    background: var(--violet-tint); color: var(--violet-deep);
    display: grid; place-items: center; font-size: 1.9rem;
    position: relative;
}
.va-demo.is-live .va-avatar::after {
    content: ''; position: absolute; inset: -7px; border-radius: 50%;
    border: 2px solid var(--violet); opacity: 0;
    animation: ring 1.8s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
.va-caller { text-align: center; }
.va-caller b { display: block; font-size: 0.98rem; color: var(--ink); line-height: 1.3; }
.va-caller small { display: block; font-size: 0.76rem; color: var(--ink-muted); margin-top: 3px; }
.va-caller small [data-va-timer] { font-variant-numeric: tabular-nums; }

.va-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 46px; margin: 22px 0 8px; }
.va-wave span {
    width: 3px; height: 6px; border-radius: 3px;
    background: var(--hairline-strong);
    transition: background 0.2s;
}
.va-demo.speaking-agent .va-wave span { background: var(--violet); animation: wave 0.9s ease-in-out infinite; }
.va-demo.speaking-patient .va-wave span { background: var(--ink-muted); animation: wave 1.05s ease-in-out infinite; }
.va-wave span:nth-child(3n) { animation-delay: -0.35s !important; }
.va-wave span:nth-child(3n+1) { animation-delay: -0.62s !important; }
.va-wave span:nth-child(4n) { animation-delay: -0.15s !important; }
.va-wave span:nth-child(5n+2) { animation-delay: -0.8s !important; }
@keyframes wave { 0%, 100% { height: 6px; } 30% { height: 34px; } 60% { height: 14px; } }
.va-speaker { min-height: 1.3em; font-size: 0.74rem; font-weight: 600; color: var(--ink-muted); text-align: center; }
.va-call-actions { margin-top: auto; display: flex; gap: 14px; }
.va-call-actions span {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.05rem;
    background: var(--paper-deep); color: var(--ink-soft);
}
.va-call-actions span.end { background: #E11D48; color: #fff; }

/* Transcription */
.va-console { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--hairline); }
.va-console-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    padding: 14px 18px; border-bottom: 1px solid var(--hairline);
}
.va-console-head b { font-size: 0.86rem; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.va-console-head b i { color: var(--violet); font-size: 1.05rem; }
.va-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--r-pill);
    background: var(--paper-deep); color: var(--ink-muted);
    font-size: 0.74rem; font-weight: 650;
    transition: background 0.3s, color 0.3s;
}
.va-chip.on { background: var(--violet-tint); color: var(--violet-deep); }
.va-transcript {
    flex: 1;
    display: flex; flex-direction: column; gap: 11px;
    padding: 18px;
    max-height: 470px; overflow-y: auto;
    scroll-behavior: smooth;
}
.va-msg { max-width: 88%; animation: msgIn 0.35s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.va-msg .who { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.va-msg .bubble { padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.va-msg.agent { margin-inline-end: auto; }
.va-msg.agent .who { color: var(--violet-deep); }
.va-msg.agent .bubble { background: var(--violet-tint); border-start-start-radius: 4px; }
.va-msg.patient { margin-inline-start: auto; }
.va-msg.patient .who { justify-content: flex-end; }
.va-msg.patient .bubble { background: var(--white); border: 1px solid var(--hairline); border-start-end-radius: 4px; }
.va-msg .tr { display: block; margin-top: 5px; font-size: 0.76rem; font-style: italic; color: var(--ink-muted); }
.va-msg .bubble[dir="rtl"] { font-size: 1rem; line-height: 1.7; }
.va-msg.typing .txt::after {
    content: ''; display: inline-block; width: 2px; height: 1em; margin-inline-start: 2px;
    background: currentColor; vertical-align: -2px; animation: caret 0.8s steps(1) infinite;
}
.va-event {
    align-self: center;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--r-pill);
    background: var(--t-ok); color: var(--ok);
    font-size: 0.74rem; font-weight: 650;
    animation: msgIn 0.35s ease both;
}
.va-event.info { background: var(--paper-deep); color: var(--ink-muted); }

/* Agenda synchronisé */
.va-agenda { padding: 16px 16px 18px; display: flex; flex-direction: column; min-width: 0; background: #FCFBF8; }
.va-agenda-head b { display: block; font-size: 0.86rem; color: var(--ink); }
.va-agenda-head small { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--ok); font-weight: 650; margin-top: 3px; }
.va-day { margin-top: 14px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-muted); }
.va-slots { list-style: none; display: grid; gap: 6px; margin-top: 7px; }
.va-slot {
    display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: 10px;
    background: var(--white); border: 1px solid var(--hairline);
    font-size: 0.8rem; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.va-slot time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.va-slot .who { color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.va-slot.busy { background: var(--paper-deep); border-color: transparent; }
.va-slot.busy .who { color: var(--ink-soft); }
.va-slot.free .who { color: var(--ok); font-weight: 600; }
.va-slot.proposed { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-tint); }
.va-slot.booked { background: var(--violet-tint); border-color: var(--violet); animation: slotFlash 0.9s ease; }
.va-slot.booked .who { color: var(--violet-deep); font-weight: 650; }
.va-slot .via { display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--violet); }
@keyframes slotFlash { 0% { transform: scale(1); } 35% { transform: scale(1.04); } 100% { transform: scale(1); } }
.blur { filter: blur(3.5px); user-select: none; }
.va-toast {
    margin-top: auto;
    display: flex; align-items: flex-start; gap: 9px;
    padding: 11px 12px; border-radius: 12px;
    background: var(--white); border: 1px solid var(--hairline);
    box-shadow: var(--shadow-lift);
    font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.4s, transform 0.4s;
}
.va-toast.show { opacity: 1; transform: none; }
.va-toast i { color: var(--ok); font-size: 1.15rem; flex-shrink: 0; }
.va-toast b { color: var(--ink); display: block; }
.va-agenda .va-toast { margin-top: 16px; }

/* ============================================================
   5. SCÈNE ANIMÉE — Agent Salle d'attente IA
   ============================================================ */
.sa-stage { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: 470px; }
.sa-board { padding: 22px 24px; border-right: 1px solid var(--hairline); background: #FCFBF8; display: flex; flex-direction: column; }
.sa-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sa-board-head b { font-size: 0.9rem; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.sa-board-head b i { color: var(--c-humaneo); font-size: 1.1rem; }
.sa-clock {
    font-variant-numeric: tabular-nums;
    padding: 4px 11px; border-radius: var(--r-pill);
    background: var(--white); border: 1px solid var(--hairline);
    font-size: 0.8rem; font-weight: 700; color: var(--ink);
}
.sa-counter { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 6px; }
.sa-counter b {
    font-family: var(--serif); font-weight: 600;
    font-size: 3.6rem; line-height: 1; color: var(--ink);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}
.sa-counter.bump b { animation: bump 0.6s ease; color: var(--c-humaneo); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.sa-counter span { font-size: 0.92rem; color: var(--ink-muted); line-height: 1.35; }
.sa-now { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--ink-soft); padding: 6px 12px; border-radius: 10px; background: var(--t-humaneo); align-self: flex-start; }
.sa-now i { color: var(--c-humaneo); }
.sa-list { list-style: none; display: grid; gap: 6px; margin-top: 16px; }
.sa-ticket {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 10px;
    background: var(--white); border: 1px solid var(--hairline);
    font-size: 0.8rem; color: var(--ink-muted);
    max-height: 44px; overflow: hidden;
    transition: opacity 0.5s, max-height 0.5s 0.2s, padding 0.5s 0.2s, margin 0.5s 0.2s, border-width 0.5s 0.2s;
}
.sa-ticket b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sa-ticket.gone { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -6px; border-width: 0; }
.sa-ticket.new { animation: msgIn 0.4s ease both; }
.sa-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 6px; font-size: 0.76rem; color: var(--ink-muted); }
.sa-foot span { display: flex; align-items: center; gap: 6px; }
.sa-foot i { color: var(--c-humaneo); }
.sa-call { display: flex; flex-direction: column; min-width: 0; }
.sa-call .va-transcript { max-height: 420px; }

/* ============================================================
   6. BLOCS DE PAGE (langues, branchement, agents)
   ============================================================ */
.lang-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lang-card {
    background: var(--white); border: 1px solid var(--hairline); border-radius: var(--r-card);
    padding: 24px 24px 22px;
}
.lang-card .lang-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lang-card .lang-name b { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.lang-card .lang-name span { font-size: 1.05rem; color: var(--violet-deep); }
.lang-card blockquote {
    margin: 0; padding: 12px 14px; border-radius: 12px;
    background: var(--violet-tint); color: var(--ink); font-size: 0.95rem; line-height: 1.6;
}
.lang-card blockquote[dir="rtl"] { font-size: 1.05rem; line-height: 1.8; }
.lang-card p { margin-top: 10px; font-size: 0.84rem; color: var(--ink-muted); line-height: 1.55; }

.agents-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.agent-card {
    position: relative;
    background: var(--white); border: 1px solid var(--hairline); border-radius: 22px;
    padding: 30px 30px 26px;
    transition: transform 0.25s, box-shadow 0.25s;
}
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.agent-card .ic-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.55rem; margin-bottom: 18px; }
.agent-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; margin-bottom: 8px; }
.agent-card > p { font-size: 0.95rem; color: var(--ink-muted); line-height: 1.6; }
.agent-card ul { list-style: none; margin: 16px 0 18px; display: grid; gap: 8px; }
.agent-card li { display: flex; gap: 9px; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }
.agent-card li i { flex-shrink: 0; margin-top: 3px; }
.agent-card .for { font-size: 0.78rem; font-weight: 650; color: var(--ink-muted); padding-top: 14px; border-top: 1px solid var(--hairline); }
.agent-card.acc-gesticab .ic-icon, .agent-card.acc-gesticab li i { color: var(--c-gesticab); }
.agent-card.acc-gesticab .ic-icon { background: var(--t-gesticab); }
.agent-card.acc-humaneo .ic-icon, .agent-card.acc-humaneo li i { color: var(--c-humaneo); }
.agent-card.acc-humaneo .ic-icon { background: var(--t-humaneo); }

.sync-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.1fr) 56px minmax(0, 1fr); align-items: center; }
.sync-node {
    background: var(--white); border: 1px solid var(--hairline); border-radius: 16px;
    padding: 18px; text-align: center;
}
.sync-node.core { border: 1.5px solid var(--violet); box-shadow: 0 16px 40px rgba(100, 71, 214, 0.12); }
.sync-node .ic-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; margin: 0 auto 10px; }
.sync-node b { display: block; color: var(--ink); font-size: 0.98rem; }
.sync-node small { display: block; color: var(--ink-muted); font-size: 0.8rem; line-height: 1.45; margin-top: 4px; }
.sync-arrow { position: relative; height: 2px; margin: 0 6px; background: var(--hairline-strong); }
.sync-arrow::before, .sync-arrow::after {
    content: ''; position: absolute; top: -4px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--violet);
    animation: syncDot 2.4s ease-in-out infinite;
}
.sync-arrow::after { animation-delay: 1.2s; background: var(--ok); animation-direction: reverse; }
@keyframes syncDot { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .va-stage { grid-template-columns: 220px minmax(0, 1fr); }
    .va-agenda { grid-column: 1 / -1; border-top: 1px solid var(--hairline); }
    .va-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .va-console { border-right: none; }
    .va-phone-col { padding: 20px 14px; }
    .va-phone { width: 188px; height: 390px; }
    .flow { grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr); row-gap: 24px; }
    .flow-link.out { display: none; }
    .flow-out { grid-column: 1 / -1; max-width: 520px; width: 100%; margin: 0 auto; }
    .ged-app { grid-template-columns: 176px minmax(0, 1fr); }
    .ged-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ged-filters .ged-field:nth-child(n+4) { display: none; }
    .lang-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
}

@media (max-width: 860px) {
    .ged-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .ged-side { display: none; }
    .ged-main { padding: 16px; }
    .ged-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ged-doc-grid, .ged-2col, .ged-profiles { grid-template-columns: minmax(0, 1fr); }
    .ged-table th:nth-child(3), .ged-table td:nth-child(3),
    .ged-table th:nth-child(5), .ged-table td:nth-child(5) { display: none; }
    .ged-grid3 { grid-template-columns: minmax(0, 1fr); }
    .ged-paper { width: 88%; }

    .va-stage { grid-template-columns: minmax(0, 1fr); }
    .va-phone-col { border-right: none; border-bottom: 1px solid var(--hairline); padding: 16px; }
    .va-phone {
        width: 100%; max-width: 420px; height: auto;
        border-width: 1px; border-color: var(--hairline); border-radius: 18px;
        box-shadow: none; padding: 14px 16px;
        display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "av caller end" "wave wave wave" "spk spk spk";
        align-items: center; column-gap: 12px;
    }
    .va-phone::before, .va-status, .va-call-actions span:not(.end) { display: none; }
    .va-avatar { grid-area: av; width: 48px; height: 48px; margin: 0; font-size: 1.35rem; }
    .va-caller { grid-area: caller; text-align: left; }
    .va-call-actions { grid-area: end; margin: 0; }
    .va-wave { grid-area: wave; margin: 10px 0 2px; height: 36px; }
    .va-speaker { grid-area: spk; }
    .va-transcript { max-height: 380px; }
    .va-slots { grid-template-columns: minmax(0, 1fr); }

    .sa-stage { grid-template-columns: minmax(0, 1fr); }
    .sa-board { border-right: none; border-bottom: 1px solid var(--hairline); }

    .flow { grid-template-columns: minmax(0, 1fr); }
    .flow-link { min-height: 56px; height: 56px; width: 100%; }
    .flow-link::before { left: 50%; right: auto; top: 6px; bottom: 6px; border-top: none; border-left: 2px dashed var(--hairline-strong); }
    .flow-link .doc { left: 50%; top: 0; margin-left: -9px; margin-top: 0; animation-name: flowDocV; }
    .flow-out { grid-column: auto; }
    .mirror { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .mirror-mid { transform: rotate(90deg); }
    .mirror-mid small { transform: rotate(-90deg); }
    .agents-duo, .plug-grid { grid-template-columns: minmax(0, 1fr); }
    .ocr-demo { grid-template-columns: minmax(0, 1fr); }
    .ocr-scan { border-right: none; border-bottom: 1px solid var(--hairline); padding: 18px 18%; }
    .sync-row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
    .sync-arrow { width: 2px; height: 34px; margin: 0 auto; }
    .sync-arrow::before, .sync-arrow::after { left: -3px; animation-name: syncDotV; }
}
@keyframes flowDocV {
    0% { top: 0; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 22px); opacity: 0; }
}
@keyframes syncDotV { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }

@media (max-width: 560px) {
    .tour-tab { padding: 8px 12px; font-size: 0.82rem; }
    .va-toolbar { padding: 10px 12px; }
    .va-langs button { padding: 6px 10px; }
    .sa-board { padding: 18px 16px; }
    .sa-counter b { font-size: 3rem; }
    .agent-card { padding: 24px 20px 20px; }
    .ged-stat b { font-size: 18px; }
    .ged-table th:nth-child(2), .ged-table td:nth-child(2),
    .ged-table th:nth-child(4), .ged-table td:nth-child(4) { display: none; }
    .ged-table td:first-child { white-space: normal; max-width: none; }
    .ged-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ged-filters .ged-field:nth-child(n+3) { display: none; }
    .ged-headrow { flex-wrap: wrap; }
    .ocr-scan { padding: 16px 10%; }
}

@media (prefers-reduced-motion: reduce) {
    .flow-link .doc, .flow-steps li::after, .sync-arrow::before, .sync-arrow::after,
    .va-wave span, .va-avatar::after, .va-rec, .flow-out .typed { animation: none !important; }
    .ocr-scan::after { display: none; }
    .flow-link .doc:first-child { opacity: 1; left: 45%; }
    .tour-panel, .va-msg, .va-event, .sa-ticket.new { animation: none; }
}
