/*
 * Espace client (demandeur) — direction B « net et compact ».
 * Référence : docs/superpowers/specs/maquettes-espace-client/ (espace-client.html, mobile.html, style.html B).
 *
 * Tout est scopé sous .client-shell (pages connectées, templates/client/base.html.twig)
 * ou .client-public (pages publiques) : la feuille peut rester chargée après une navigation
 * Turbo vers une page agent sans rien y changer.
 * Les sections génériques (variables, base, Bootstrap, étiquettes, boutons, cartes, onglets, formulaires,
 * avatars) sont aussi partagées avec l'espace agent (.agent-shell, voir agent.css).
 * Composants préfixés « c- » ; mise en page : < 992 px téléphone (barre du haut + barre du bas),
 * >= 992 px ordinateur (menu latéral fixe).
 */

/* ============================================================
   1. Variables
   ============================================================ */
:is(.client-shell, .client-public, .agent-shell) {
    /* Accent sarcelle */
    --c-accent: #0d9488;
    --c-accent-strong: #0f766e;   /* survol, actif */
    --c-accent-soft: #e6f4f2;     /* fond léger */

    /* Surfaces et bordures */
    --c-bg: #fff;
    --c-bg-menu: #f8fafc;
    --c-bg-subtle: #f1f5f9;
    --c-bg-aside: #fcfdfe;
    --c-bg-highlight: #fffbeb;    /* ligne « À vous de répondre » */
    --c-border: #e9edf2;
    --c-border-soft: #f1f4f8;     /* séparateurs de lignes */
    --c-border-input: #dbe2ea;
    --c-border-strong: #cbd5e1;

    /* Textes (ardoise) */
    --c-text: #0f172a;
    --c-text-2: #334155;
    --c-text-3: #475569;
    --c-text-4: #64748b;
    --c-muted: #94a3b8;
    --c-ink: #0f172a;             /* onglet actif */

    /* Pastilles de statut */
    --c-gray: #94a3b8;
    --c-blue: #3b82f6;
    --c-amber: #f59e0b;
    --c-amber-text: #d97706;
    --c-violet: #8b5cf6;
    --c-green: #10b981;
    --c-red: #ef4444;

    /* Étiquettes T1 à T4 (fond / texte) */
    --c-t1-bg: #fee2e2; --c-t1-fg: #b91c1c;
    --c-t2-bg: #ffedd5; --c-t2-fg: #c2410c;
    --c-t3-bg: #e0f2fe; --c-t3-fg: #0369a1;
    --c-t4-bg: #f1f5f9; --c-t4-fg: #475569;

    /* Typographie */
    --c-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --c-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --c-fs: 13px;
    --c-fs-sm: 12px;
    --c-fs-xs: 11px;
    --c-fs-title: 16px;

    /* Formes */
    --c-radius-xs: 4px;
    --c-radius-sm: 6px;
    --c-radius: 7px;
    --c-radius-lg: 9px;
    --c-focus-ring: 0 0 0 3px var(--c-accent-soft);

    /* Mise en page */
    --c-sidebar-w: 200px;
    --c-bottomnav-h: 58px;
    --c-bottom-offset: 0px;       /* hauteur occupée en bas de l'écran (barre mobile) : pour les éléments collés en bas */
    --c-gutter: 20px;

    /* Bootstrap : l'accent remplace le bleu primaire dans l'espace client */
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-link-color: #0f766e;
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color: #0d9488;
    --bs-link-hover-color-rgb: 13, 148, 136;
    --bs-body-font-family: var(--c-font);
    --bs-body-color: #0f172a;
    --bs-border-color: #e9edf2;
}

@media (max-width: 991.98px) {
    .client-shell {
        --c-fs: 13.5px;
        --c-gutter: 14px;
        --c-bottom-offset: calc(var(--c-bottomnav-h) + env(safe-area-inset-bottom));
    }
}

/* ============================================================
   2. Base
   ============================================================ */
body:is(.client-shell, .client-public, .agent-shell) {
    display: block;               /* annule le flex colonne de app.css */
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;                   /* les marges de sécurité sont gérées par les barres */
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--c-font);
    font-size: var(--c-fs);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

:is(.client-shell, .client-public, .agent-shell) :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4) {
    font-size: var(--c-fs-title);
    font-weight: 600;
    line-height: 1.3;
    color: var(--c-text);
}

:is(.client-shell, .client-public, .agent-shell) :is(h5, h6, .h5, .h6) {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

:is(.client-shell, .client-public, .agent-shell) :focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

:is(.client-shell, .client-public, .agent-shell) .c-mono,
:is(.client-shell, .client-public, .agent-shell) .c-id {
    font-family: var(--c-mono);
}

:is(.client-shell, .client-public, .agent-shell) .c-id { color: var(--c-muted); font-size: var(--c-fs-sm); }
:is(.client-shell, .client-public, .agent-shell) .c-muted { color: var(--c-muted); font-size: var(--c-fs-sm); }

/* Lien d'évitement (clavier) */
.client-shell .c-skip {
    position: absolute;
    left: 8px;
    top: -40px;
    z-index: 1100;
    padding: 6px 10px;
    border-radius: var(--c-radius-sm);
    background: var(--c-ink);
    color: #fff;
    text-decoration: none;
}
.client-shell .c-skip:focus { top: calc(8px + env(safe-area-inset-top)); }

/* Toasts : sous l'encoche */
:is(.client-shell, .client-public, .agent-shell) .toast-container {
    top: calc(12px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
}

/* ============================================================
   3. Bootstrap dans l'espace client (pages au contenu conservé : Travaux…)
   ============================================================ */
:is(.client-shell, .client-public, .agent-shell) .btn-primary {
    --bs-btn-bg: var(--c-accent);
    --bs-btn-border-color: var(--c-accent);
    --bs-btn-hover-bg: var(--c-accent-strong);
    --bs-btn-hover-border-color: var(--c-accent-strong);
    --bs-btn-active-bg: var(--c-accent-strong);
    --bs-btn-active-border-color: var(--c-accent-strong);
    --bs-btn-disabled-bg: var(--c-accent);
    --bs-btn-disabled-border-color: var(--c-accent);
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
}

:is(.client-shell, .client-public, .agent-shell) .btn-outline-primary {
    --bs-btn-color: var(--c-accent-strong);
    --bs-btn-border-color: var(--c-accent);
    --bs-btn-hover-bg: var(--c-accent);
    --bs-btn-hover-border-color: var(--c-accent);
    --bs-btn-active-bg: var(--c-accent-strong);
    --bs-btn-active-border-color: var(--c-accent-strong);
    --bs-btn-focus-shadow-rgb: 13, 148, 136;
}

:is(.client-shell, .client-public, .agent-shell) :is(.form-control, .form-select):focus {
    border-color: var(--c-accent);
    box-shadow: var(--c-focus-ring);
}

:is(.client-shell, .client-public, .agent-shell) .card {
    border-radius: var(--c-radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* ============================================================
   4. Cadre : menu latéral (ordinateur), barres du haut et du bas (téléphone)
   ============================================================ */
.client-shell .c-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.client-shell .c-main {
    min-width: 0;
    padding-bottom: calc(var(--c-bottom-offset) + 24px);
}
.client-shell .c-main:focus { outline: none; }   /* cible du lien d'évitement */

/* Contenu conservé tel quel (ex. Travaux) : la grille Bootstrap occupe la largeur du cadre */
.client-shell .c-main > .container {
    max-width: none;
    padding-left: var(--c-gutter);
    padding-right: var(--c-gutter);
}

/* --- Logo --- */
:is(.client-shell, .client-public, .agent-shell) .c-logo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--c-text);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
:is(.client-shell, .client-public, .agent-shell) .c-logo:hover { color: var(--c-text); }
:is(.client-shell, .client-public, .agent-shell) .c-logo__mark {
    width: 16px;
    height: 16px;
    border-radius: var(--c-radius-xs);
    background: var(--c-accent);
    flex-shrink: 0;
}

/* --- Menu latéral --- */
.client-shell .c-sidebar {
    display: none;
    flex-direction: column;
    gap: 2px;
    background: var(--c-bg-menu);
    border-right: 1px solid var(--c-border);
    padding: calc(14px + env(safe-area-inset-top)) 10px calc(12px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
}

.client-shell .c-sidebar > .c-logo { padding: 2px 8px 14px; }

.client-shell .c-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-shell .c-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    border-radius: var(--c-radius-sm);
    color: var(--c-text-3);
    text-decoration: none;
    line-height: 1.35;
    transition: background-color .12s ease, color .12s ease;
}
.client-shell .c-nav-item:hover { background: #eef2f6; color: var(--c-text); }
.client-shell .c-nav-item.is-active {
    background: var(--c-accent-soft);
    color: var(--c-accent-strong);
    font-weight: 600;
}
.client-shell .c-nav-item__count { color: var(--c-muted); font-size: 11.5px; font-weight: 600; }
.client-shell .c-nav-item.is-active .c-nav-item__count { color: var(--c-accent-strong); }
.client-shell .c-nav-item__ext { color: var(--c-border-strong); font-size: 11px; }
.client-shell .c-nav-item:hover .c-nav-item__ext { color: var(--c-muted); }

.client-shell .c-nav-group {
    padding: 14px 8px 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}

.client-shell .c-sidebar__foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0 0;
    border-top: 1px solid var(--c-border);
}
.client-shell .c-sidebar__foot > .c-svc,
.client-shell .c-sidebar__foot > .c-me { margin: 0 0 3px; }
.client-shell .c-sidebar__foot .c-nav-item { font-size: var(--c-fs-sm); }

/* --- État des services (pastille + libellé, cliquable) --- */
.client-shell .c-svc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--c-radius-sm);
    font-size: var(--c-fs-sm);
    color: var(--c-text-3);
    text-decoration: none;
    min-width: 0;
}
.client-shell .c-svc:hover { background: #eef2f6; color: var(--c-text); }
.client-shell .c-svc.is-active { background: var(--c-accent-soft); color: var(--c-accent-strong); }
.client-shell .c-svc .c-dot { align-self: flex-start; margin-top: 5px; }
.client-shell .c-svc__text {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.4;
}

/* --- Profil --- */
.client-shell .c-me {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0 2px 8px;
    font-size: var(--c-fs-sm);
    min-width: 0;
}
.client-shell .c-me__text { min-width: 0; flex: 1; line-height: 1.3; }
.client-shell .c-me__name,
.client-shell .c-me__org {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.client-shell .c-me__name { font-size: 12.5px; font-weight: 600; color: var(--c-text); }
.client-shell .c-me__org { color: var(--c-muted); }

/* --- Bouton icône (recherche, cloche, fermer) --- */
:is(.client-shell, .client-public, .agent-shell) .c-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: var(--c-radius-sm);
    background: transparent;
    color: var(--c-muted);
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}
:is(.client-shell, .client-public, .agent-shell) .c-icon-btn:hover { background: #eef2f6; color: var(--c-text); }
:is(.client-shell, .client-public, .agent-shell) .c-icon-btn:disabled { cursor: default; background: transparent; color: var(--c-border-strong); }

/* Cloche Web Push : le contrôleur push-notification pose btn-primary (activées),
   btn-secondary, btn-warning (bloquées) ou btn-danger (erreur) */
.client-shell .c-bell.btn-primary { color: var(--c-accent); }
.client-shell .c-bell.btn-warning { color: var(--c-amber-text); }
.client-shell .c-bell.btn-danger { color: var(--c-red); }

/* --- Avatar (initiales) --- */
:is(.client-shell, .client-public, .agent-shell) .c-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--c-radius-sm);
    background: #e2e8f0;
    color: var(--c-text-2);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
    text-transform: uppercase;
}
:is(.client-shell, .client-public, .agent-shell) .c-avatar--sm { width: 20px; height: 20px; border-radius: 5px; font-size: 9px; }
:is(.client-shell, .client-public, .agent-shell) .c-avatar--lg { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; }
:is(.client-shell, .client-public, .agent-shell) .c-avatar--support { background: var(--c-accent); color: #fff; }
:is(.client-shell, .client-public, .agent-shell) button.c-avatar { border: 0; padding: 0; cursor: pointer; }

/* --- Barre du haut (téléphone) --- */
.client-shell .c-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) calc(var(--c-gutter) + env(safe-area-inset-right)) 8px calc(var(--c-gutter) + env(safe-area-inset-left));
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #eef2f6;
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
}
.client-shell .c-topbar .c-logo { font-size: 15px; }
.client-shell .c-topbar__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.client-shell .c-topbar .c-icon-btn { width: 36px; height: 36px; font-size: 17px; color: var(--c-text-4); }
.client-shell .c-topbar .c-avatar { width: 28px; height: 28px; border-radius: 7px; margin-left: 4px; }

/* --- Barre de navigation du bas (téléphone) --- */
.client-shell .c-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    height: calc(var(--c-bottomnav-h) + env(safe-area-inset-bottom));
    padding: 6px calc(4px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(4px + env(safe-area-inset-left));
    background: #fff;
    border-top: 1px solid var(--c-border);
}
.client-shell .c-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--c-text-4);
    font-size: 10.5px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}
.client-shell .c-bottom-nav__item > .bi { font-size: 19px; line-height: 1; }
.client-shell .c-bottom-nav__item.is-active { color: var(--c-accent-strong); font-weight: 600; }
.client-shell .c-bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-top: -8px;
    border-radius: 11px;
    background: var(--c-accent);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(13, 148, 136, .35);
}
.client-shell .c-bottom-nav__item--primary.is-active .c-bottom-nav__icon { background: var(--c-accent-strong); }

/* --- Feuille « Plus » (offcanvas Bootstrap en bas) --- */
.client-shell .c-sheet.offcanvas-bottom {
    height: auto;
    max-height: 88vh;
    border-top: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    font-size: var(--c-fs);
}
.client-shell .c-sheet__handle {
    width: 36px;
    height: 4px;
    margin: 8px auto 2px;
    border-radius: 2px;
    background: #e2e8f0;
}
.client-shell .c-sheet__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--c-border);
}
.client-shell .c-sheet__head .c-me__name { font-size: 14px; }
.client-shell .c-sheet__body {
    overflow-y: auto;
    padding: 4px 10px 12px;
}
.client-shell .c-sheet__body .c-nav-group { padding-top: 12px; }
.client-shell .c-sheet__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 8px;
    border-radius: var(--c-radius);
    color: var(--c-text-2);
    font-size: 14px;
    text-decoration: none;
}
.client-shell .c-sheet__item:hover,
.client-shell .c-sheet__item:active { background: var(--c-bg-menu); color: var(--c-text); }
.client-shell .c-sheet__item > .bi:first-child { width: 20px; font-size: 17px; color: var(--c-text-4); text-align: center; }
.client-shell .c-sheet__item .c-nav-item__ext { margin-left: auto; }
.client-shell .c-sheet__body .c-svc { align-items: center; gap: 12px; min-height: 44px; padding: 8px; font-size: 14px; }
.client-shell .c-sheet__body .c-svc .c-dot { align-self: center; margin: 0 6px; }
.client-shell .c-sheet__sep { height: 1px; margin: 8px 0; background: var(--c-border); }

/* --- Bascule téléphone / ordinateur --- */
@media (min-width: 992px) {
    .client-shell .c-shell {
        display: grid;
        grid-template-columns: calc(var(--c-sidebar-w) + env(safe-area-inset-left)) minmax(0, 1fr);
    }
    .client-shell .c-sidebar {
        display: flex;
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
    }
    .client-shell .c-topbar,
    .client-shell .c-bottom-nav { display: none; }
    .client-shell .c-main { padding-right: env(safe-area-inset-right); }
}

/* ============================================================
   5. En-tête et corps de page
   ============================================================ */
.client-shell .c-page-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 57px;
    padding: 12px var(--c-gutter);
    border-bottom: 1px solid var(--c-border);
}
.client-shell .c-page-head__titles { min-width: 0; margin-right: auto; }
.client-shell .c-page-title {
    margin: 0;
    font-size: var(--c-fs-title);
    font-weight: 600;
    line-height: 1.3;
}
.client-shell .c-page-sub {
    margin: 1px 0 0;
    color: var(--c-muted);
    font-size: var(--c-fs-sm);
}
.client-shell .c-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.client-shell .c-page-body {
    padding: 16px var(--c-gutter);
}

/* Bandeau sous l'en-tête (onglets, filtres) */
.client-shell .c-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px var(--c-gutter);
    border-bottom: 1px solid var(--c-border);
}

/* ============================================================
   6. Étiquettes, pastilles, statuts
   ============================================================ */
/* Étiquette de type T1 à T4 : <span class="c-tag c-tag--t2">T2</span> */
:is(.client-shell, .client-public, .agent-shell) .c-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--c-radius-xs);
    background: var(--c-t4-bg);
    color: var(--c-t4-fg);
    font-size: var(--c-fs-xs);
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
:is(.client-shell, .client-public, .agent-shell) .c-tag--t1 { background: var(--c-t1-bg); color: var(--c-t1-fg); }
:is(.client-shell, .client-public, .agent-shell) .c-tag--t2 { background: var(--c-t2-bg); color: var(--c-t2-fg); }
:is(.client-shell, .client-public, .agent-shell) .c-tag--t3 { background: var(--c-t3-bg); color: var(--c-t3-fg); }
:is(.client-shell, .client-public, .agent-shell) .c-tag--t4 { background: var(--c-t4-bg); color: var(--c-t4-fg); }
:is(.client-shell, .client-public, .agent-shell) .c-tag--lg { padding: 3px 8px; font-size: 11.5px; }

/* Pastille : <i class="c-dot c-dot--amber"></i> (couleurs de client_status_color) */
:is(.client-shell, .client-public, .agent-shell) .c-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-gray);
    flex-shrink: 0;
}
:is(.client-shell, .client-public, .agent-shell) .c-dot--gray { background: var(--c-gray); }
:is(.client-shell, .client-public, .agent-shell) .c-dot--blue { background: var(--c-blue); }
:is(.client-shell, .client-public, .agent-shell) .c-dot--amber { background: var(--c-amber); }
:is(.client-shell, .client-public, .agent-shell) .c-dot--violet { background: var(--c-violet); }
:is(.client-shell, .client-public, .agent-shell) .c-dot--green { background: var(--c-green); }
:is(.client-shell, .client-public, .agent-shell) .c-dot--red { background: var(--c-red); }

/* Statut : pastille + libellé */
:is(.client-shell, .client-public, .agent-shell) .c-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--c-text-2);
    white-space: nowrap;
}

/* Pastille-pilule (en-tête de fiche sur téléphone) */
:is(.client-shell, .client-public, .agent-shell) .c-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--c-bg-subtle);
    color: var(--c-text-3);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
:is(.client-shell, .client-public, .agent-shell) .c-chip--amber { background: #fef3c7; color: #92400e; }
:is(.client-shell, .client-public, .agent-shell) .c-chip--blue { background: #dbeafe; color: #1d4ed8; }
:is(.client-shell, .client-public, .agent-shell) .c-chip--violet { background: #ede9fe; color: #6d28d9; }
:is(.client-shell, .client-public, .agent-shell) .c-chip--green { background: #d1fae5; color: #047857; }

/* Repère « Nouvelle réponse », mention « Support » */
:is(.client-shell, .client-public, .agent-shell) .c-flag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--c-radius-xs);
    background: var(--c-accent-soft);
    color: var(--c-accent-strong);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

/* ============================================================
   7. Boutons
   ============================================================ */
:is(.client-shell, .client-public, .agent-shell) .c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--c-accent);
    border-radius: var(--c-radius);
    background: var(--c-accent);
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
:is(.client-shell, .client-public, .agent-shell) .c-btn:hover { background: var(--c-accent-strong); border-color: var(--c-accent-strong); color: #fff; }
:is(.client-shell, .client-public, .agent-shell) .c-btn:disabled,
:is(.client-shell, .client-public, .agent-shell) .c-btn.is-disabled { opacity: .55; pointer-events: none; }

:is(.client-shell, .client-public, .agent-shell) .c-btn--ghost {
    background: #fff;
    border-color: var(--c-border-input);
    color: var(--c-text-2);
}
:is(.client-shell, .client-public, .agent-shell) .c-btn--ghost:hover { background: var(--c-bg-menu); border-color: var(--c-border-strong); color: var(--c-text); }

:is(.client-shell, .client-public, .agent-shell) .c-btn--quiet {
    background: transparent;
    border-color: transparent;
    color: var(--c-text-3);
}
:is(.client-shell, .client-public, .agent-shell) .c-btn--quiet:hover { background: var(--c-bg-subtle); border-color: transparent; color: var(--c-text); }

:is(.client-shell, .client-public, .agent-shell) .c-btn--danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
:is(.client-shell, .client-public, .agent-shell) .c-btn--danger:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

:is(.client-shell, .client-public, .agent-shell) .c-btn--sm { padding: 4px 9px; font-size: var(--c-fs-sm); }
:is(.client-shell, .client-public, .agent-shell) .c-btn--lg { padding: 11px 16px; border-radius: 10px; font-size: 14px; }
:is(.client-shell, .client-public, .agent-shell) .c-btn--block { display: flex; width: 100%; }
:is(.client-shell, .client-public, .agent-shell) .c-btn--round { width: 34px; height: 34px; padding: 0; border-radius: 50%; }

/* ============================================================
   8. Cartes et chiffres clés
   ============================================================ */
:is(.client-shell, .client-public, .agent-shell) .c-card {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-lg);
    min-width: 0;
}
:is(.client-shell, .client-public, .agent-shell) .c-card + .c-card { margin-top: 14px; }
:is(.client-shell, .client-public, .agent-shell) .c-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--c-border);
}
:is(.client-shell, .client-public, .agent-shell) .c-card__title {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
}
:is(.client-shell, .client-public, .agent-shell) .c-card__title .bi { color: var(--c-muted); margin-right: 4px; }
:is(.client-shell, .client-public, .agent-shell) .c-card__body { padding: 14px; }
:is(.client-shell, .client-public, .agent-shell) .c-card--flush .c-card__body { padding: 0; }

/* Grille de chiffres clés : <div class="c-stats"><div class="c-stat">…</div></div> */
:is(.client-shell, .agent-shell) .c-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
@media (min-width: 768px) {
    :is(.client-shell, .agent-shell) .c-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
:is(.client-shell, .agent-shell) .c-stat {
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-lg);
    background: #fff;
}
:is(.client-shell, .agent-shell) .c-stat__value {
    display: block;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}
:is(.client-shell, .agent-shell) .c-stat__label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--c-text-4);
    font-size: var(--c-fs-sm);
}

/* Barre de proportion */
:is(.client-shell, .client-public, .agent-shell) .c-progress {
    height: 6px;
    border-radius: 3px;
    background: var(--c-bg-subtle);
    overflow: hidden;
}
:is(.client-shell, .client-public, .agent-shell) .c-progress__bar {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--c-accent);
}

/* État vide */
:is(.client-shell, .client-public, .agent-shell) .c-empty {
    padding: 36px 16px;
    text-align: center;
    color: var(--c-text-4);
}
:is(.client-shell, .client-public, .agent-shell) .c-empty > .bi { display: block; margin-bottom: 8px; font-size: 26px; color: var(--c-border-strong); }

/* ============================================================
   9. Onglets et bascules
   ============================================================ */
/* Onglets : <nav class="c-tabs"><a class="c-tab is-active">En cours<b class="c-tab__count">3</b></a></nav> */
:is(.client-shell, .agent-shell) .c-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
:is(.client-shell, .agent-shell) .c-tabs::-webkit-scrollbar { display: none; }
:is(.client-shell, .agent-shell) .c-tab {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: var(--c-radius-sm);
    color: var(--c-text-3);
    text-decoration: none;
    white-space: nowrap;
}
:is(.client-shell, .agent-shell) .c-tab:hover { background: var(--c-bg-subtle); color: var(--c-text); }
:is(.client-shell, .agent-shell) .c-tab__count { margin-left: 4px; font-weight: 600; color: var(--c-muted); }
:is(.client-shell, .agent-shell) .c-tab--warn .c-tab__count { color: var(--c-amber-text); }
:is(.client-shell, .agent-shell) .c-tab.is-active { background: var(--c-ink); color: #fff; }
:is(.client-shell, .agent-shell) .c-tab.is-active .c-tab__count { color: var(--c-muted); }
:is(.client-shell, .agent-shell) .c-tab--warn.is-active .c-tab__count { color: #fbbf24; }
@media (max-width: 991.98px) {
    :is(.client-shell, .agent-shell) .c-tab { border-radius: 999px; background: var(--c-bg-subtle); font-size: 12.5px; }
}

/* Bascule segmentée : <div class="c-seg"><a class="c-seg__item is-active">…</a></div> */
:is(.client-shell, .client-public, .agent-shell) .c-seg {
    display: inline-flex;
    border: 1px solid var(--c-border-input);
    border-radius: var(--c-radius);
    overflow: hidden;
    font-size: var(--c-fs-sm);
    background: #fff;
    flex-shrink: 0;
}
:is(.client-shell, .client-public, .agent-shell) .c-seg__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 0;
    background: transparent;
    color: var(--c-text-3);
    text-decoration: none;
    white-space: nowrap;
}
:is(.client-shell, .client-public, .agent-shell) .c-seg__item + .c-seg__item { border-left: 1px solid var(--c-border-input); }
:is(.client-shell, .client-public, .agent-shell) .c-seg__item:hover { color: var(--c-text); background: var(--c-bg-menu); }
:is(.client-shell, .client-public, .agent-shell) .c-seg__item.is-active { background: var(--c-bg-subtle); color: var(--c-text); font-weight: 600; }

/* ============================================================
   11. Formulaires
   ============================================================ */
:is(.client-shell, .client-public, .agent-shell) .c-field { margin-bottom: 16px; }
:is(.client-shell, .client-public, .agent-shell) .c-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
}
:is(.client-shell, .client-public, .agent-shell) .c-label__hint { color: var(--c-muted); font-weight: 400; }
:is(.client-shell, .client-public, .agent-shell) .c-help { margin-top: 4px; color: var(--c-muted); font-size: 11.5px; }
:is(.client-shell, .client-public, .agent-shell) .c-error { margin-top: 4px; color: #b91c1c; font-size: var(--c-fs-sm); }
:is(.client-shell, .client-public, .agent-shell) .c-error ul { margin: 0; padding: 0; list-style: none; }

:is(.client-shell, .client-public, .agent-shell) .c-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--c-border-input);
    border-radius: var(--c-radius);
    background: #fff;
    color: var(--c-text);
    font-family: inherit;
    font-size: var(--c-fs);
    line-height: 1.4;
    transition: border-color .12s ease, box-shadow .12s ease;
}
:is(.client-shell, .client-public, .agent-shell) .c-input::placeholder { color: var(--c-muted); }
:is(.client-shell, .client-public, .agent-shell) .c-input:focus { outline: none; border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
:is(.client-shell, .client-public, .agent-shell) .c-input.is-invalid { border-color: #f87171; }
:is(.client-shell, .client-public, .agent-shell) textarea.c-input { min-height: 92px; resize: vertical; }
:is(.client-shell, .client-public, .agent-shell) .c-input--search {
    padding-left: 30px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 10px center;
}
@media (max-width: 991.98px) {
    /* 16 px : évite le zoom automatique d'iOS au focus */
    :is(.client-shell, .client-public, .agent-shell) .c-input { font-size: 16px; padding: 9px 11px; border-radius: var(--c-radius-lg); }
    :is(.client-shell, .client-public, .agent-shell) .c-input--search { padding-left: 32px; }
}

/* Cartes à choix unique (type de signalisation) :
   <label class="c-choice"><input type="radio" class="c-choice__input"><span class="c-choice__radio"></span>…</label> */
:is(.client-shell, .client-public, .agent-shell) .c-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 991.98px) {
    :is(.client-shell, .client-public, .agent-shell) .c-choices { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
:is(.client-shell, .client-public, .agent-shell) .c-choice {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid var(--c-border-input);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}
:is(.client-shell, .client-public, .agent-shell) .c-choice:hover { border-color: var(--c-border-strong); }
:is(.client-shell, .client-public, .agent-shell) .c-choice__input { position: absolute; opacity: 0; pointer-events: none; }
:is(.client-shell, .client-public, .agent-shell) .c-choice__radio {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    border: 1.5px solid var(--c-border-strong);
    border-radius: 50%;
    flex-shrink: 0;
    transition: border .12s ease;
}
:is(.client-shell, .client-public, .agent-shell) .c-choice__text { margin: 3px 0 0; color: var(--c-text-3); font-size: var(--c-fs-sm); line-height: 1.35; }
/* Corps de la carte : étiquette T puis définition (dessous sur ordinateur, à côté sur téléphone) */
:is(.client-shell, .client-public, .agent-shell) .c-choice__body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
:is(.client-shell, .client-public, .agent-shell) .c-choice__body > .c-choice__text { display: block; }
@media (max-width: 991.98px) {
    :is(.client-shell, .client-public, .agent-shell) .c-choice:has(.c-choice__body) { align-items: center; padding: 8px 10px; border-radius: var(--c-radius-lg); }
    :is(.client-shell, .client-public, .agent-shell) .c-choice:has(.c-choice__body) .c-choice__radio { margin-top: 0; }
    :is(.client-shell, .client-public, .agent-shell) .c-choice__body { flex-direction: row; align-items: center; gap: 9px; }
    :is(.client-shell, .client-public, .agent-shell) .c-choice__body > .c-tag { flex-shrink: 0; }
    :is(.client-shell, .client-public, .agent-shell) .c-choice__body > .c-choice__text { margin: 0; }
}
:is(.client-shell, .client-public, .agent-shell) .c-choice:has(.c-choice__input:checked),
:is(.client-shell, .client-public, .agent-shell) .c-choice.is-selected { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
:is(.client-shell, .client-public, .agent-shell) .c-choice:has(.c-choice__input:checked) .c-choice__radio,
:is(.client-shell, .client-public, .agent-shell) .c-choice.is-selected .c-choice__radio { border: 4px solid var(--c-accent); }
:is(.client-shell, .client-public, .agent-shell) .c-choice:has(.c-choice__input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Zone de dépôt de fichiers */
:is(.client-shell, .client-public, .agent-shell) .c-drop {
    position: relative;
    display: block;
    padding: 14px;
    border: 1.5px dashed var(--c-border-strong);
    border-radius: 8px;
    color: var(--c-text-4);
    text-align: center;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}
:is(.client-shell, .client-public, .agent-shell) .c-drop:hover,
:is(.client-shell, .client-public, .agent-shell) .c-drop.is-dragover { border-color: var(--c-accent); background: #f6fbfa; }
:is(.client-shell, .client-public, .agent-shell) .c-drop__browse { color: var(--c-accent-strong); font-weight: 600; }
:is(.client-shell, .client-public, .agent-shell) .c-drop small { display: block; margin-top: 3px; color: var(--c-muted); font-size: 11.5px; }
/* Champ fichier transparent posé sur toute la zone : clic = parcourir, glisser-déposer natif
   (_file_upload_field.html.twig, zone: true) ; .c-upload.is-dragover posé par file-upload (dropzone) */
:is(.client-shell, .client-public, .agent-shell) .c-drop__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
:is(.client-shell, .client-public, .agent-shell) .c-drop__input::file-selector-button { cursor: pointer; }
:is(.client-shell, .client-public, .agent-shell) .c-drop:focus-within { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
:is(.client-shell, .client-public, .agent-shell) .c-upload.is-dragover .c-drop { border-color: var(--c-accent); background: #f6fbfa; }
:is(.client-shell, .client-public, .agent-shell) .c-drop__text--mobile { display: none; }
@media (max-width: 991.98px) {
    :is(.client-shell, .client-public, .agent-shell) .c-drop { padding: 10px; border-radius: var(--c-radius-lg); }
    :is(.client-shell, .client-public, .agent-shell) .c-drop__text--desktop { display: none; }
    :is(.client-shell, .client-public, .agent-shell) .c-drop__text--mobile {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--c-accent-strong);
        font-size: 12.5px;
        font-weight: 600;
    }
    :is(.client-shell, .client-public, .agent-shell) .c-drop__text--mobile .bi { font-size: 15px; }
}
/* Fichiers choisis et avertissements sous la zone */
:is(.client-shell, .client-public, .agent-shell) .c-upload__preview { margin-top: 8px; }
:is(.client-shell, .client-public, .agent-shell) .c-upload__error .alert { margin: 8px 0 0; padding: 6px 34px 6px 10px; font-size: var(--c-fs-sm); }
:is(.client-shell, .client-public, .agent-shell) .c-upload__error .alert .btn-close { padding: 9px 10px; }

/* Éditeur riche dans un formulaire (tiptap + _tiptap_toolbar compact) : <div class="tiptap-container c-editor"> ;
   texte d'invite : variable --c-placeholder posée par le template (voir la règle de la zone de réponse) */
.client-shell .c-editor.tiptap-container {
    border: 1px solid var(--c-border-input);
    border-radius: var(--c-radius);
    background: #fff;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.client-shell .c-editor:focus-within { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
.client-shell .c-editor.is-invalid { border-color: #f87171; }
/* tiptap pose min-height: 150px en style en ligne (sa valeur min-height est ignorée) */
.client-shell .c-editor .ProseMirror {
    min-height: 92px !important;
    padding: 10px;
    color: var(--c-text);
    font-size: var(--c-fs);
    line-height: 1.5;
}
.client-shell .c-editor .ProseMirror p { margin: 0 0 .5em; }
.client-shell .c-editor .ProseMirror p:last-child { margin-bottom: 0; }
@media (max-width: 991.98px) {
    .client-shell .c-editor.tiptap-container { border-radius: var(--c-radius-lg); }
    .client-shell .c-editor .ProseMirror { min-height: 74px !important; padding: 9px 11px; font-size: 16px; }   /* pas de zoom d'iOS */
}

/* Actions de formulaire ; sur téléphone, .c-sticky-actions colle le bouton au-dessus de la barre du bas */
:is(.client-shell, .client-public, .agent-shell) .c-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
@media (max-width: 991.98px) {
    .client-shell .c-sticky-actions {
        position: sticky;
        bottom: var(--c-bottom-offset);
        z-index: 1010;
        margin: 0 calc(-1 * var(--c-gutter));
        padding: 10px var(--c-gutter);
        border-top: 1px solid var(--c-border);
        background: #fff;
    }
}

/* ============================================================
   12. Liste « Mes demandes »
   ============================================================ */
/* En-tête : titre, recherche (260 px), « + Nouvelle demande ». Sur téléphone, il est masqué (titre gardé
   pour les lecteurs d'écran) et la loupe de la barre du haut l'ouvre : .is-searching (?search=). */
.client-shell .c-list-search {
    position: relative;
    width: 260px;
    max-width: 100%;
}
.client-shell .c-list-search .c-input { padding-top: 6px; padding-bottom: 6px; padding-right: 32px; }
.client-shell .c-list-search .c-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.client-shell .c-list-search__clear {
    position: absolute;
    top: 50%;
    right: 3px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    transform: translateY(-50%);
}

/* Bandeau : onglets (pastilles défilantes sur téléphone) et bascule de portée des managers */
.client-shell .c-tab__short { display: none; }
.client-shell .c-list-toolbar { flex-wrap: nowrap; }
.client-shell .c-list-toolbar .c-tabs { flex: 1 1 auto; }
.client-shell .c-list-scope { margin-left: auto; }

@media (max-width: 991.98px) {
    .client-shell .c-list-head .c-page-head__titles,
    .client-shell .c-list-head:not(.is-searching) {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 0;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .client-shell .c-list-head:not(.is-searching) .c-list-search,
    .client-shell .c-list-head__new { display: none; }
    .client-shell .c-list-head.is-searching { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .client-shell .c-list-search { flex: 1 1 100%; width: auto; }
    .client-shell .c-list-search .c-input { padding-top: 8px; padding-bottom: 8px; }

    .client-shell .c-list-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
        border-bottom-color: var(--c-border-soft);
    }
    /* Défilement jusqu'aux bords de l'écran */
    .client-shell .c-list-toolbar .c-tabs { flex-basis: 100%; padding: 0 var(--c-gutter); }
    .client-shell .c-tab__long {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
    .client-shell .c-tab__short { display: inline; }
    .client-shell .c-tab__count { margin-left: 3px; }
    .client-shell .c-list-scope { display: flex; flex: 1 1 100%; margin: 0 var(--c-gutter); }
    .client-shell .c-list-scope .c-seg__item { flex: 1; justify-content: center; padding: 6px 10px; }
}

/* Demandes : une carte par demande (téléphone), un tableau dense dès 992 px.
   <div class="c-tlist"><div class="c-tlist__head">…</div><a class="c-trow">…</a></div> ;
   la ligne entière est un lien : .c-trow.is-highlight (À vous de répondre), .c-trow.is-unread. */
.client-shell .c-tlist__head { display: none; }

.client-shell .c-trow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 12px var(--c-gutter);
    border-bottom: 1px solid var(--c-border-soft);
    color: var(--c-muted);
    font-size: var(--c-fs-sm);
    line-height: 1.4;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.client-shell .c-trow:hover,
.client-shell .c-trow:active { background: var(--c-bg-menu); color: var(--c-muted); }
.client-shell .c-trow.is-highlight { background: var(--c-bg-highlight); }
.client-shell .c-trow.is-highlight:hover,
.client-shell .c-trow.is-highlight:active { background: #fef3c7; }
.client-shell .c-trow:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }

.client-shell .c-trow__cell { min-width: 0; }
.client-shell .c-trow__status { order: 1; flex: 1 1 auto; color: var(--c-text-3); }
.client-shell .c-trow__status .c-status { color: inherit; white-space: normal; }
.client-shell .c-trow__id { order: 2; margin-left: auto; }
.client-shell .c-trow__subject,
.client-shell .c-trow__subject-in { display: contents; }
.client-shell .c-trow__title {
    order: 3;
    flex: 1 1 100%;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--c-text);
    font-size: var(--c-fs);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.client-shell .c-trow__type { order: 4; line-height: 1; }
.client-shell .c-trow__agent { order: 5; }
.client-shell .c-trow__agent .c-avatar { display: none; }
.client-shell .c-trow__activity { order: 6; white-space: nowrap; }
.client-shell .c-trow__requester { order: 7; }
.client-shell .c-trow__flag { order: 8; margin-left: auto; }
.client-shell .c-trow__activity::before,
.client-shell .c-trow__requester::before {
    content: "·";
    content: "·" / "";
    margin-right: 6px;
}

@media (min-width: 992px) {
    .client-shell .c-tlist {
        display: table;
        width: 100%;
        border-collapse: collapse;
    }
    .client-shell .c-tlist__head,
    .client-shell .c-trow {
        display: table-row;
        padding: 0;
        border: 0;
        background: none;
        color: var(--c-text-2);
        font-size: var(--c-fs);
    }
    .client-shell .c-tlist__th,
    .client-shell .c-trow__cell {
        display: table-cell;
        padding: 10px;
        border-bottom: 1px solid var(--c-border-soft);
        vertical-align: middle;
        white-space: nowrap;
    }
    .client-shell .c-tlist__th {
        padding-top: 8px;
        padding-bottom: 8px;
        color: var(--c-muted);
        font-size: var(--c-fs-xs);
        font-weight: 500;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .client-shell :is(.c-tlist__th, .c-trow__cell):first-child { padding-left: var(--c-gutter); }
    .client-shell :is(.c-tlist__th, .c-trow__cell):last-child { padding-right: var(--c-gutter); }
    .client-shell .c-tlist__sort {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        color: inherit;
        text-decoration: none;
    }
    .client-shell .c-tlist__sort:hover,
    .client-shell .c-tlist__sort.is-sorted { color: var(--c-text-2); }
    .client-shell .c-tlist__sort .bi { font-size: 10px; }

    .client-shell .c-trow:hover,
    .client-shell .c-trow:active { background: none; color: var(--c-text-2); }
    .client-shell .c-trow:hover > .c-trow__cell { background: var(--c-bg-menu); }
    .client-shell .c-trow.is-highlight { background: none; }
    .client-shell .c-trow.is-highlight > .c-trow__cell { background: var(--c-bg-highlight); }
    .client-shell .c-trow.is-highlight:hover > .c-trow__cell { background: #fef3c7; }
    /* Focus clavier : cadre dessiné sur les cellules (le contour d'une table-row n'est pas fiable) */
    .client-shell .c-trow:focus-visible { outline: none; }
    .client-shell .c-trow:focus-visible > .c-trow__cell { box-shadow: inset 0 2px 0 var(--c-accent), inset 0 -2px 0 var(--c-accent); }
    .client-shell .c-trow:focus-visible > .c-trow__cell:first-child { box-shadow: inset 2px 2px 0 var(--c-accent), inset 0 -2px 0 var(--c-accent); }
    .client-shell .c-trow:focus-visible > .c-trow__cell:last-child { box-shadow: inset -2px 2px 0 var(--c-accent), inset 0 -2px 0 var(--c-accent); }

    .client-shell .c-trow__status { color: var(--c-text-2); }
    .client-shell .c-trow__status .c-status { white-space: nowrap; }
    .client-shell .c-trow__id { margin: 0; }
    /* Sujet : occupe la largeur restante, ellipse ; le repère « Nouvelle réponse » reste visible */
    .client-shell .c-trow__subject { display: table-cell; width: 100%; max-width: 0; }
    .client-shell .c-trow__subject-in { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .client-shell .c-trow__title {
        display: block;
        min-width: 0;
        margin: 0;
        font-size: inherit;
        font-weight: 500;
        line-height: inherit;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }
    .client-shell .c-trow__flag { flex-shrink: 0; margin: 0; }
    .client-shell .c-trow__agent .c-avatar { display: inline-flex; margin-right: 6px; vertical-align: middle; }
    .client-shell .c-trow__person {
        display: inline-block;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }
    .client-shell .c-trow__unassigned { max-width: none; color: var(--c-muted); font-size: var(--c-fs-sm); }
    .client-shell .c-trow__activity { color: var(--c-muted); font-size: var(--c-fs-sm); }
    .client-shell .c-trow__activity::before,
    .client-shell .c-trow__requester::before { content: none; }
}

/* Ordinateur étroit : les libellés longs (statut, « Pas encore attribuée ») passent sur deux lignes
   pour laisser de la place au sujet */
@media (min-width: 992px) and (max-width: 1279.98px) {
    .client-shell .c-trow__status .c-status { min-width: 135px; max-width: 150px; white-space: normal; }
    .client-shell .c-trow__unassigned { max-width: 90px; white-space: normal; }
    .client-shell .c-trow__person { max-width: 120px; }
}

/* Pagination (Bootstrap, gabarit pagination/custom_pagination) aux couleurs du cadre */
.client-shell .c-pager { padding: 16px var(--c-gutter) 4px; }
.client-shell .c-pager .pagination {
    --bs-pagination-padding-x: 10px;
    --bs-pagination-padding-y: 4px;
    --bs-pagination-font-size: var(--c-fs-sm);
    --bs-pagination-color: var(--c-text-3);
    --bs-pagination-bg: #fff;
    --bs-pagination-border-color: var(--c-border-input);
    --bs-pagination-border-radius: var(--c-radius);
    --bs-pagination-hover-color: var(--c-text);
    --bs-pagination-hover-bg: var(--c-bg-menu);
    --bs-pagination-hover-border-color: var(--c-border-strong);
    --bs-pagination-focus-color: var(--c-text);
    --bs-pagination-focus-bg: var(--c-bg-menu);
    --bs-pagination-focus-box-shadow: var(--c-focus-ring);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--c-ink);
    --bs-pagination-active-border-color: var(--c-ink);
    --bs-pagination-disabled-color: var(--c-border-strong);
    --bs-pagination-disabled-bg: #fff;
    --bs-pagination-disabled-border-color: var(--c-border-input);
    margin: 0;
}

.client-shell .c-tickets .c-empty p { margin: 0 0 12px; }

/* ============================================================
   13. Fiche d'une demande (client/ticket/show.html.twig)
   Téléphone (mobile.html, écran 2) : barre de la fiche, en-tête, ligne « Suivie par … — Détails ⌄ »,
   fil, réponse collée en bas (pas de barre du bas). Ordinateur (style.html, B) : fil et réponse à gauche,
   panneau de détails à droite.
   ============================================================ */
.client-shell--fiche {
    --c-details-w: 288px;
    --c-fichebar-h: 53px;
}
.client-shell--fiche .c-main { padding-bottom: 0; }

/* --- Barre du haut de la fiche (téléphone) : ‹  #1284  ⋯ --- */
.client-shell .c-fiche-bar { gap: 4px; }
.client-shell .c-fiche-bar .c-fiche-bar__back { margin-left: -8px; color: var(--c-accent-strong); font-size: 20px; }
.client-shell .c-fiche-bar__id { font-size: 13px; }

/* --- Conteneur --- */
.client-shell .c-fiche {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--c-fichebar-h) - env(safe-area-inset-top));
    min-height: calc(100dvh - var(--c-fichebar-h) - env(safe-area-inset-top));
}
.client-shell .c-fiche__flow {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* --- En-tête : n° en chasse fixe, sujet 16 px, pastille de statut, étiquette T --- */
.client-shell .c-fiche-head {
    padding: 12px var(--c-gutter);
    border-bottom: 1px solid var(--c-border);
    min-width: 0;
}
.client-shell .c-fiche-head__top {
    display: none;                /* téléphone : retour et n° sont dans la barre de la fiche */
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}
.client-shell .c-fiche-head__back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--c-text-4);
    font-size: var(--c-fs-sm);
    text-decoration: none;
}
.client-shell .c-fiche-head__back:hover { color: var(--c-accent-strong); }
.client-shell .c-fiche-head__back .bi { font-size: 11px; }
.client-shell .c-fiche-head__title {
    margin: 0 0 8px;
    font-size: var(--c-fs-title);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.client-shell .c-fiche-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.client-shell .c-fiche-head__meta .c-chip { white-space: normal; }

/* --- Ligne résumée qui déplie le panneau (téléphone) --- */
.client-shell .c-fiche-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px var(--c-gutter);
    border: 0;
    border-bottom: 1px solid var(--c-border);
    background: #fff;
    color: var(--c-text-3);
    font-size: 12.5px;
    text-align: left;
}
.client-shell .c-fiche-summary__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-shell .c-fiche-summary__toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    color: var(--c-accent-strong);
    font-weight: 600;
}
.client-shell .c-fiche-summary .bi,
.client-shell .c-props__toggle .bi { transition: transform .15s ease; }
.client-shell .c-fiche-summary[aria-expanded="true"] .bi,
.client-shell .c-props__toggle[aria-expanded="true"] .bi { transform: rotate(180deg); }

/* --- Panneau de détails --- */
.client-shell .c-fiche__details {
    background: var(--c-bg-aside);
    border-bottom: 1px solid var(--c-border);
}
.client-shell .c-props { padding: 14px var(--c-gutter); }
.client-shell .c-props__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
    margin: 0;
}
.client-shell .c-prop { min-width: 0; }
.client-shell .c-prop[data-sidebar-item="assigned"],
.client-shell .c-prop[data-sidebar-item="requester"],
.client-shell .c-prop[data-sidebar-item="participants"],
.client-shell .c-prop[data-sidebar-item="clickup"] { grid-column: 1 / -1; }
.client-shell .c-prop dt,
.client-shell .c-props__title {
    margin: 0 0 2px;
    color: var(--c-muted);
    font-size: var(--c-fs-xs);
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.client-shell .c-prop dd {
    margin: 0;
    color: var(--c-text);
    overflow-wrap: anywhere;
}
.client-shell .c-prop__value { display: block; }
.client-shell .c-prop__sub { display: block; color: var(--c-text-4); font-size: var(--c-fs-sm); }
.client-shell .c-prop__inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.client-shell .c-prop__inline a { text-decoration: none; }
.client-shell .c-prop .c-prop__info { width: 22px; height: 22px; font-size: 13px; }
.client-shell .c-prop .badge.mini { border-radius: var(--c-radius-xs); }

.client-shell .c-people { display: flex; flex-direction: column; gap: 4px; }
.client-shell .c-person { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.client-shell .c-person__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.client-shell .c-props__section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
}
.client-shell .c-props__title { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.client-shell .c-props__count {
    padding: 0 5px;
    border-radius: 999px;
    background: var(--c-bg-subtle);
    color: var(--c-text-3);
    font-size: 10.5px;
    letter-spacing: 0;
}
.client-shell .c-props__empty { margin: 0; color: var(--c-muted); font-size: var(--c-fs-sm); }
.client-shell .c-props__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--c-muted);
}
.client-shell .c-props__toggle .c-props__title { margin: 0; }
.client-shell .c-props__toggle:hover .c-props__title { color: var(--c-text-3); }

/* Pièces jointes du panneau */
.client-shell .c-attachments__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.client-shell .c-attachment { display: flex; align-items: center; gap: 2px; min-width: 0; }
.client-shell .c-attachment__main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    margin-left: -6px;
    border: 0;
    border-radius: var(--c-radius-sm);
    background: none;
    color: var(--c-text-2);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.client-shell .c-attachment__main:hover { background: var(--c-bg-subtle); color: var(--c-text); }
.client-shell .c-attachment__thumb { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: var(--c-bg-subtle); }
.client-shell .c-attachment__icon { width: 28px; flex-shrink: 0; font-size: 19px; color: var(--c-text-4); text-align: center; }
.client-shell .c-attachment__icon.bi-file-earmark-pdf { color: #dc2626; }
.client-shell .c-attachment__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.client-shell .c-attachment__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.client-shell .c-attachment__meta { color: var(--c-muted); font-size: var(--c-fs-xs); }
.client-shell .c-attachment__download-icon { margin-left: auto; padding: 0 2px; color: var(--c-muted); font-size: 14px; }
.client-shell .c-attachment__main:hover .c-attachment__download-icon,
.client-shell .c-attachment__download:hover { color: var(--c-accent-strong); }

/* Activité (section repliable) */
.client-shell .c-activity { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.client-shell .c-activity__item { display: flex; gap: 8px; color: var(--c-text-2); font-size: 12.5px; line-height: 1.4; }
.client-shell .c-activity__item > .bi { color: var(--c-muted); }
.client-shell .c-activity__date { display: block; color: var(--c-muted); font-size: var(--c-fs-xs); }

/* --- Fil chronologique, sans bulles (fiche et page publique de suivi) --- */
:is(.client-shell, .client-public) .c-thread {
    flex: 1;
    padding: 16px var(--c-gutter) 4px;
    min-width: 0;
}
:is(.client-shell, .client-public) .c-event {
    position: relative;
    display: flex;
    gap: 10px;
    padding-bottom: 18px;
    min-width: 0;
}
/* Trait vertical qui relie les avatars ; pas après le dernier message */
:is(.client-shell, .client-public) .c-event::before {
    content: "";
    position: absolute;
    left: 11.5px;
    top: 30px;
    bottom: 4px;
    width: 1px;
    background: var(--c-border);
}
:is(.client-shell, .client-public) .c-thread__messages > .c-event:last-child::before { display: none; }
:is(.client-shell, .client-public) .c-event__avatar { position: relative; z-index: 1; margin-top: 1px; }
:is(.client-shell, .client-public) .c-event__main { flex: 1; min-width: 0; }
:is(.client-shell, .client-public) .c-event__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 5px;
    margin-bottom: 3px;
    color: var(--c-muted);
    font-size: var(--c-fs-sm);
}
:is(.client-shell, .client-public) .c-event__author { color: var(--c-text); font-weight: 600; }
:is(.client-shell, .client-public) .c-event__via { font-size: 11px; }
:is(.client-shell, .client-public) .c-event__body.ProseMirror {
    min-height: 0;
    padding: 0;
    max-width: 78ch;
    color: var(--c-text-2);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
:is(.client-shell, .client-public) .c-event__body p { margin: 0 0 .55em; }
:is(.client-shell, .client-public) .c-event__body :is(p, ul, ol, blockquote, pre):last-child { margin-bottom: 0; }
:is(.client-shell, .client-public) .c-event__body :is(ul, ol) { margin-bottom: .55em; padding-left: 1.3rem; }
:is(.client-shell, .client-public) .c-event__body img { max-width: 100%; height: auto; border-radius: var(--c-radius-xs); }
:is(.client-shell, .client-public) .c-event__body pre { max-width: 100%; overflow-x: auto; }
:is(.client-shell, .client-public) .c-event__body table { display: block; max-width: 100%; overflow-x: auto; }
:is(.client-shell, .client-public) .c-thread__empty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--c-muted);
    font-size: var(--c-fs-sm);
}
:is(.client-shell, .client-public) .c-thread__empty > .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
    font-size: 14px;
}

/* Pièces jointes d'un élément du fil : vignettes (images) et fichiers */
:is(.client-shell, .client-public) .c-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}
:is(.client-shell, .client-public) .c-files__item { min-width: 0; max-width: 100%; }
:is(.client-shell, .client-public) .c-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: var(--c-radius);
    background: #fff;
    color: var(--c-text-3);
    font-size: var(--c-fs-sm);
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
:is(.client-shell, .client-public) .c-file:hover { border-color: var(--c-border-strong); color: var(--c-text); }
:is(.client-shell, .client-public) .c-file--image { padding: 3px 8px 3px 3px; }
:is(.client-shell, .client-public) .c-file__thumb { width: 30px; height: 30px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: var(--c-bg-subtle); }
:is(.client-shell, .client-public) .c-file__icon { font-size: 15px; color: var(--c-text-4); }
:is(.client-shell, .client-public) .c-file__icon.bi-file-earmark-pdf { color: #dc2626; }
:is(.client-shell, .client-public) .c-file__name { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.client-shell, .client-public) .c-file__size { flex-shrink: 0; color: var(--c-muted); }

/* --- Temps réel du fil (client-thread) : message arrivé, bouton « Nouveau message ↓ » --- */
@keyframes c-event-new {
    from { background-color: var(--c-accent-soft); box-shadow: 0 0 0 6px var(--c-accent-soft); }
    to { background-color: transparent; box-shadow: 0 0 0 6px transparent; }
}
.client-shell .c-event.is-new > .c-event__main { border-radius: var(--c-radius-xs); animation: c-event-new 2.4s ease-out; }
/* Flotte au-dessus de la zone de réponse (dont il suit la hauteur, téléphone et ordinateur) */
.client-shell .c-thread-new {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--c-accent);
    color: #fff;
    font-size: var(--c-fs-sm);
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18);
    cursor: pointer;
}
.client-shell .c-thread-new[hidden] { display: none; }
/* Défilement vers un élément du fil (ancre, scrollIntoView) : sous la barre ou l'en-tête collé en haut, dont
   client-thread mesure la hauteur (--c-sticky-top) */
.client-shell .c-fiche :is(.c-thread, [data-thread-item]) { scroll-margin-top: calc(var(--c-sticky-top, 0px) + 8px); }
.client-shell .c-thread-new:hover { background: var(--c-accent-strong); }
.client-shell .c-thread-new:focus-visible { outline: 2px solid var(--c-accent-strong); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .client-shell .c-event.is-new > .c-event__main { animation: none; }
}

/* --- Zone de réponse : sous le fil, collée en bas de l'écran --- */
.client-shell .c-composer {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--c-border);
}
/* Téléphone : 📎 [ Répondre… ] ➤, puis les fichiers choisis */
.client-shell .c-composer__form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "attach editor send"
        "list list list"
        "error error error";
    align-items: end;
    column-gap: 8px;
    margin: 0;
}
.client-shell .c-composer__field { grid-area: editor; min-width: 0; }
.client-shell .c-composer__files { display: contents; }   /* le contrôleur file-upload répartit ses parties dans la grille */
.client-shell .c-composer .file-upload-compact { grid-area: attach; gap: 6px; }
.client-shell .c-composer .file-upload-compact__preview { grid-area: list; margin-top: 6px; }
.client-shell .c-composer .file-upload-compact__error { grid-area: error; }
.client-shell .c-composer .file-upload-compact__error .alert { margin: 6px 0 0; padding: 6px 34px 6px 10px; font-size: var(--c-fs-sm); }
.client-shell .c-composer .file-upload-compact__error .alert .btn-close { padding: 9px 10px; }
.client-shell .c-composer__actions { grid-area: send; display: flex; align-items: center; gap: 10px; }

.client-shell .c-composer .tiptap-container.c-composer__editor {
    border: 1px solid var(--c-border-input);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.client-shell .c-composer .c-composer__editor:focus-within { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
/* Hauteur plafonnée (téléphone 35vh, ordinateur min(40vh, 320px)) avec défilement interne : le curseur reste visible
   dans l'éditeur, la page ne défile pas pendant la frappe et l'en-tête de la fiche reste à l'écran */
.client-shell .c-composer .ProseMirror {
    padding: 8px 12px;
    max-height: 35vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--c-text);
    font-size: 16px;              /* pas de zoom automatique d'iOS au focus */
    line-height: 1.4;
}
/* tiptap pose min-height: 150px en style en ligne (sa valeur min-height est ignorée) : on le ramène à
   une ligne au repos sur téléphone et à trois lignes sur ordinateur */
.client-shell .c-composer .ProseMirror { min-height: 38px !important; }
/* Texte d'invite (« Répondre… », variable --c-placeholder posée par le template) tant que l'éditeur est vide */
.client-shell :is(.c-composer, .c-editor) .ProseMirror > p:only-child:has(> br.ProseMirror-trailingBreak:only-child)::before {
    content: var(--c-placeholder, "");
    float: left;
    height: 0;
    color: var(--c-muted);
    pointer-events: none;
}
.client-shell .c-composer .ProseMirror p { margin: 0 0 .4em; }
.client-shell .c-composer .ProseMirror p:last-child { margin-bottom: 0; }
.client-shell .c-composer .ProseMirror.drag-over { border: 0; }
.client-shell .c-composer .ProseMirror.drag-over::after { font-size: 13px; padding: 6px 12px; }

/* Barre d'outils réduite (_tiptap_toolbar compact) ; sur téléphone, visible pendant la saisie seulement
   (masquage retardé : le toucher d'un bouton retire le focus de l'éditeur avant le clic) */
.client-shell .c-tools.tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--c-border-soft);
    background: transparent;
}
.client-shell .c-tools .c-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--c-text-4);
    font-size: 15px;
    cursor: pointer;
}
.client-shell .c-tools .c-tool:hover { background: var(--c-bg-subtle); color: var(--c-text); }
.client-shell .c-tools .c-tool.active { background: var(--c-accent-soft); border-color: transparent; color: var(--c-accent-strong); }
@media (max-width: 991.98px) {
    .client-shell .c-composer .c-tools.tiptap-toolbar {
        max-height: 0;
        padding-block: 0;
        border-bottom-width: 0;
        overflow: hidden;
        visibility: hidden;
        transition: max-height 0s .3s, padding 0s .3s, border-width 0s .3s, visibility 0s .3s;
    }
    .client-shell .c-composer:focus-within .c-tools.tiptap-toolbar {
        max-height: 80px;
        padding-block: 4px;
        border-bottom-width: 1px;
        visibility: visible;
        transition-delay: 0s;
    }
}

/* Trombone et envoi */
.client-shell .c-composer .c-composer__attach {
    position: relative;
    width: 36px;
    height: 36px;
    margin: 0;
    color: var(--c-text-4);
    font-size: 19px;
}
.client-shell .c-composer .c-composer__attach:focus-within { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.client-shell .c-composer .file-upload-compact__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.client-shell .c-composer .file-upload-compact__hint { display: none; }
.client-shell .c-composer .c-composer__send {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;                 /* téléphone : icône seule (le texte reste lu par les lecteurs d'écran) */
    gap: 0;
}
.client-shell .c-composer .c-composer__send .bi { margin: 0 !important; font-size: 15px; }

/* Indication du raccourci d'envoi (client-send-shortcut, « Ctrl+Entrée pour envoyer » ou « ⌘+Entrée » sur Mac) :
   à côté des boutons d'envoi, sur ordinateur à pointeur fin seulement (ni téléphone ni écran tactile) */
.client-shell .c-send-hint { display: none; color: var(--c-muted); font-size: var(--c-fs-xs); white-space: nowrap; }
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    .client-shell .c-send-hint { display: inline; }
}
.client-shell .c-nouvelle__actions { align-items: center; }

/* Fichiers choisis (puces créées par le contrôleur file-upload) */
.client-shell :is(.c-composer, .c-upload) .file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.client-shell :is(.c-composer, .c-upload) .attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid var(--c-border-input);
    border-radius: 999px;
    background: var(--c-bg-menu);
    color: var(--c-text-2);
    font-size: var(--c-fs-sm);
}
.client-shell :is(.c-composer, .c-upload) .attachment-chip .chip-icon { color: var(--c-accent-strong) !important; }
.client-shell :is(.c-composer, .c-upload) .attachment-chip .chip-name { min-width: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-shell :is(.c-composer, .c-upload) .attachment-chip .chip-size { color: var(--c-muted); }

/* Glisser-déposer de fichiers sur la zone de réponse */
.client-shell .c-composer.is-dragover .c-composer__editor { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); background: #f6fbfa; }

/* Chat en direct : couleur du cadre ; au-dessus de la zone de réponse sur téléphone */
.client-shell .chat-bubble-trigger { background: var(--c-accent); }
@media (max-width: 991.98px) {
    .client-shell--fiche .chat-bubble-trigger {
        right: 12px;
        bottom: calc(68px + env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
    }
}

/* --- Ordinateur : en-tête collé en haut, fil et réponse collée en bas à gauche, panneau de détails à droite ---
   Une seule colonne dans le flux (un élément collant d'une grille ne quitte pas sa zone : l'en-tête ne pourrait pas
   rester en haut) ; le panneau est fixé à droite de la fenêtre, à la place de la colonne (la fiche occupe toute la
   largeur à droite du menu) */
@media (min-width: 992px) {
    .client-shell .c-fiche {
        padding-right: var(--c-details-w);
        min-height: 100vh;
        min-height: 100dvh;
    }
    .client-shell .c-fiche-head {
        position: sticky;
        top: 0;
        z-index: 1015;
        padding: 14px var(--c-gutter);
        background: #fff;
    }
    .client-shell .c-fiche-head__top { display: flex; }
    .client-shell .c-fiche-summary { display: none; }
    .client-shell .c-fiche__details,
    .client-shell .c-fiche__details.collapse:not(.show) {
        display: block;
        position: fixed;
        top: 0;
        right: env(safe-area-inset-right);
        bottom: 0;
        z-index: 1005;
        width: var(--c-details-w);
        overflow-y: auto;
        border-bottom: 0;
        border-left: 1px solid var(--c-border);
        scrollbar-width: thin;
    }
    .client-shell .c-props { padding: 16px 16px 24px; }
    .client-shell .c-props__list { grid-template-columns: minmax(0, 1fr); }

    .client-shell .c-composer {
        padding: 8px var(--c-gutter) 16px;
        border-top: 0;
        box-shadow: 0 -10px 12px -12px rgba(15, 23, 42, .18);
    }
    /* Une boîte : barre d'outils, texte, puis trombone et « Envoyer » */
    .client-shell .c-composer__form {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "editor editor"
            "attach send"
            "list list"
            "error error";
        align-items: center;
        border: 1px solid var(--c-border-input);
        border-radius: 8px;
        background: #fff;
        transition: border-color .12s ease, box-shadow .12s ease;
    }
    .client-shell .c-composer__form:focus-within { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
    .client-shell .c-composer .tiptap-container.c-composer__editor { border: 0; border-radius: 8px 8px 0 0; }
    .client-shell .c-composer .c-composer__editor:focus-within { box-shadow: none; }
    .client-shell .c-composer.is-dragover .c-composer__form { border-color: var(--c-accent); box-shadow: var(--c-focus-ring); background: #f6fbfa; }
    .client-shell .c-composer .ProseMirror { min-height: 64px !important; max-height: min(40vh, 320px); font-size: var(--c-fs); line-height: 1.5; }
    .client-shell .c-composer .file-upload-compact { padding: 4px 6px 6px; }
    .client-shell .c-composer .c-composer__attach {
        width: auto;
        height: 28px;
        gap: 5px;
        padding: 0 8px;
        font-size: 15px;
    }
    .client-shell .c-composer .file-upload-compact__label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        font-size: var(--c-fs-sm);
    }
    .client-shell .c-composer .file-upload-compact__hint { display: inline; color: var(--c-muted) !important; font-size: var(--c-fs-xs); }
    .client-shell .c-composer__actions { margin: 4px 6px 6px 0; }
    .client-shell .c-composer .c-composer__send {
        width: auto;
        height: auto;
        margin: 0;
        padding: 6px 14px;
        border-radius: var(--c-radius);
        font-size: 12.5px;
        gap: 6px;
    }
    .client-shell .c-composer .c-composer__send .bi { font-size: 13px; }
    .client-shell .c-composer .file-upload-compact__preview { margin: 0; padding: 0 8px 8px; }
    .client-shell .c-composer .file-upload-compact__error { padding: 0 8px; }
}

/* ============================================================
   14. Nouvelle demande (client/ticket/new.html.twig)
   Ordinateur (espace-client.html, écran 2) : champs à gauche, colonne de droite (conseils, demandes
   similaires). Téléphone (mobile.html, écran 3) : barre « ‹ Nouvelle demande », une colonne, pas de barre
   du bas, « Envoyer la demande » collé en bas de l'écran.
   ============================================================ */
.client-shell--nouvelle {
    --c-pagebar-h: 53px;
}
.client-shell.client-shell--nouvelle { --c-bottom-offset: 0px; }   /* pas de barre du bas sur cet écran */
.client-shell--nouvelle .c-main { padding-bottom: 0; }

/* --- Barre du haut propre à un écran (téléphone) : ‹  Titre --- */
.client-shell .c-page-bar { gap: 4px; }
.client-shell .c-page-bar .c-page-bar__back { margin-left: -8px; color: var(--c-accent-strong); font-size: 20px; }
.client-shell .c-page-bar__title {
    min-width: 0;
    overflow: hidden;
    color: var(--c-text);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Erreurs globales du formulaire (jeton CSRF…) --- */
.client-shell .c-nouvelle__errors {
    margin: 14px var(--c-gutter) 0;
    padding: 8px 12px;
    border: 1px solid #fecaca;
    border-radius: var(--c-radius);
    background: #fef2f2;
}

/* --- Téléphone d'abord : une colonne (sujet, demandes similaires, type, description, fichiers, envoi) --- */
.client-shell .c-nouvelle { padding-top: 14px; }
.client-shell .c-nouvelle__cell { padding-left: var(--c-gutter); padding-right: var(--c-gutter); }
.client-shell fieldset.c-nouvelle__type { min-width: 0; margin: 0 0 16px; border: 0; }
.client-shell .c-nouvelle__type > legend { float: none; width: auto; padding: 0; }

.client-shell .c-nouvelle__aside { padding: 0 var(--c-gutter); }
.client-shell .c-nouvelle__tips { display: none; }   /* conseils : colonne de droite sur ordinateur */
.client-shell .c-nouvelle__aside-title {
    margin: 0 0 8px;
    color: var(--c-text);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
}

/* Demandes similaires (rempli par client-similar-tickets ; [hidden] tant qu'il est vide) */
.client-shell .c-similar {
    margin: -4px 0 16px;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-lg);
    background: var(--c-bg-aside);
}
.client-shell .c-similar__list { display: flex; flex-direction: column; gap: 6px; }
.client-shell .c-similar__list a {
    display: block;
    color: var(--c-accent-strong);
    font-size: var(--c-fs-sm);
    line-height: 1.4;
    text-decoration: none;
}
.client-shell .c-similar__list a:hover { color: var(--c-accent); text-decoration: underline; }

@media (max-width: 991.98px) {
    /* Le titre est dans la barre du haut : en-tête de page gardé pour les lecteurs d'écran seulement */
    .client-shell .c-nouvelle-head {
        position: absolute;
        width: 1px;
        height: 1px;
        min-height: 0;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    /* « Envoyer la demande » collé en bas de l'écran, pleine largeur ; « Annuler » = la flèche de la barre */
    .client-shell .c-nouvelle__actions.c-sticky-actions {
        margin: 4px 0 0;
        padding: 10px var(--c-gutter) calc(10px + env(safe-area-inset-bottom));
    }
    .client-shell .c-nouvelle__cancel { display: none; }
    .client-shell .c-nouvelle__submit { flex: 1; padding: 11px 16px; border-radius: 10px; font-size: 14px; }
    /* Barre d'outils flottante de tiptap : sous la barre du haut collée */
    .client-shell--nouvelle .tiptap-toolbar-floating { top: calc(var(--c-pagebar-h) + env(safe-area-inset-top) + 4px) !important; }
}

/* --- Ordinateur : champs à gauche, colonne de droite (250 px) jusqu'en bas de l'écran --- */
@media (min-width: 992px) {
    .client-shell--nouvelle .c-main {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .client-shell .c-nouvelle-form { flex: 1; display: flex; flex-direction: column; }
    .client-shell .c-nouvelle {
        flex: 1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 250px;
        grid-template-rows: auto auto auto auto auto 1fr;
        grid-template-areas:
            "subject aside"
            "type aside"
            "description aside"
            "files aside"
            "actions aside"
            ". aside";
        padding-top: 0;
    }
    .client-shell .c-nouvelle__subject { grid-area: subject; padding-top: 18px; }
    .client-shell .c-nouvelle__type { grid-area: type; }
    .client-shell .c-nouvelle__description { grid-area: description; }
    .client-shell .c-nouvelle__files { grid-area: files; }
    .client-shell .c-nouvelle__actions { grid-area: actions; padding-bottom: 24px; }
    .client-shell .c-nouvelle__aside {
        grid-area: aside;
        padding: 18px 16px;
        border-left: 1px solid var(--c-border);
        background: var(--c-bg-aside);
    }
    .client-shell .c-nouvelle__tips {
        display: block;
        margin-bottom: 14px;
        color: var(--c-text-3);
        font-size: var(--c-fs-sm);
        line-height: 1.5;
    }
    .client-shell .c-nouvelle__tips p { margin: 0; }
    .client-shell .c-nouvelle__tips ul { margin: 6px 0 0; padding-left: 16px; }
    .client-shell .c-nouvelle__aside-title { margin-bottom: 10px; }
    .client-shell .c-similar {
        margin: 0;
        padding: 12px 0 0;
        border: 0;
        border-top: 1px solid var(--c-border);
        border-radius: 0;
        background: none;
    }
}

/* ============================================================
   Pages publiques : connexion, mot de passe oublié, suivi
   ============================================================ */
.client-public .c-public {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: calc(32px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
    background: var(--c-bg-menu);
}
.client-public .c-public__inner {
    width: 100%;
    max-width: 400px;
    margin-top: clamp(0px, 8vh, 72px);
}
.client-public .c-public__inner.c-public__inner--wide { max-width: 760px; margin-top: 0; }
.client-public .c-public__logo { font-size: 17px; margin-bottom: 18px; }
.client-public .c-public__logo .c-logo__mark { width: 20px; height: 20px; border-radius: 6px; }

.client-public .c-public-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 24px;
}
.client-public .c-public-card + .c-public-card { margin-top: 14px; }
.client-public .c-public-card h1 { font-size: 18px; margin: 0 0 4px; }
.client-public .c-public-card__lead { color: var(--c-muted); margin: 0 0 18px; font-size: var(--c-fs); }

.client-public .c-field { margin-bottom: 14px; }
.client-public .c-field label,
.client-public .c-label {
    display: block;
    margin-bottom: 5px;
    font-size: var(--c-fs-sm);
    font-weight: 600;
    color: var(--c-text-2);
}
.client-public .c-field :is(input[type=text], input[type=email], input[type=password]) {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--c-border-input);
    border-radius: var(--c-radius);
    font-size: 16px;
    color: var(--c-text);
    background: var(--c-bg);
}
.client-public .c-field :is(input:focus) { outline: none; border-color: var(--c-accent); box-shadow: var(--c-focus-ring); }
.client-public .c-check { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--c-text-2); }
.client-public .c-check input { width: 16px; height: 16px; accent-color: var(--c-accent); margin: 0; }
.client-public .c-check label { margin: 0; }

.client-public .c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--c-radius);
    background: var(--c-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.client-public .c-btn:hover { background: var(--c-accent-strong); color: #fff; }
.client-public .c-link { color: var(--c-accent-strong); text-decoration: none; }
.client-public .c-link:hover { text-decoration: underline; }
.client-public .c-public-card__foot { margin-top: 16px; text-align: center; font-size: var(--c-fs-sm); }

.client-public .c-alert {
    margin-bottom: 14px;
    padding: 9px 12px;
    border-radius: var(--c-radius);
    font-size: var(--c-fs-sm);
    background: var(--c-accent-soft);
    color: var(--c-accent-strong);
}
.client-public .c-alert--error { background: #fee2e2; color: #b91c1c; }
.client-public .form-error, .client-public .invalid-feedback, .client-public ul.c-errors { color: #b91c1c; font-size: var(--c-fs-sm); list-style: none; padding: 0; margin: 4px 0 0; }

/* Suivi public */
.client-public .c-track-id { display: flex; gap: 6px; margin-top: 10px; max-width: 360px; }
.client-public .c-track-id input {
    flex: 1; min-width: 0; height: 34px; padding: 0 10px;
    border: 1px solid var(--c-border-input); border-radius: var(--c-radius);
    font-family: var(--c-mono); font-size: var(--c-fs-sm); background: var(--c-bg-subtle);
}
.client-public .c-track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.client-public .c-track-dates { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-border-soft); }
.client-public .c-track-dates dt { font-size: 11.5px; font-weight: 600; color: var(--c-muted); }
.client-public .c-track-dates dd { margin: 0; color: var(--c-text-2); }
.client-public .c-track-section { font-size: 14px; margin: 0 0 12px; }
/* Fil de la fiche dans la carte de suivi : la carte porte les marges */
.client-public .c-track-thread .c-thread { padding: 0; }
.client-public .c-track-thread .c-thread__empty { margin-bottom: 0; }
.client-public .c-track-thread .c-event:last-child { padding-bottom: 0; }

.client-public .c-btn--ghost { background: var(--c-bg); border: 1px solid var(--c-border-input); color: var(--c-text-2); }
.client-public .c-btn--ghost:hover { background: var(--c-bg-menu); border-color: var(--c-border-strong); color: var(--c-text); }

/* Accueil public (home/public.html.twig) */
.client-public .c-public__inner.c-public__inner--home { max-width: 860px; margin-top: clamp(0px, 4vh, 40px); }
.client-public .c-home-hero { margin: 6px 0 22px; }
.client-public .c-home-hero h1 { font-size: 24px; letter-spacing: -.01em; margin: 0 0 6px; }
.client-public .c-home-hero p { margin: 0; max-width: 560px; color: var(--c-text-4); font-size: 14px; }
.client-public .c-home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.client-public .c-home-grid > .c-home-card { display: flex; flex-direction: column; margin: 0; }
.client-public .c-home-card h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 4px; }
.client-public .c-home-card h2 .bi { color: var(--c-accent); font-size: 16px; }
.client-public .c-home-card .c-btn { margin-top: auto; }
.client-public .c-home-card .c-field { margin-top: auto; }
.client-public .c-home-card .c-field + .c-btn { margin-top: 0; }
.client-public .c-home-track-input { font-family: var(--c-mono); }

.client-public .c-home-status__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.client-public .c-home-status__head h2 { font-size: 15px; margin: 0; }
.client-public .c-home-incident {
    margin-top: 14px;
    padding: 10px 12px;
    border-left: 3px solid var(--c-amber);
    border-radius: var(--c-radius-xs);
    background: var(--c-bg-highlight);
    color: var(--c-text-2);
}
.client-public .c-home-incident p { margin: 4px 0; }
.client-public .c-home-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 20px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--c-border-soft);
    list-style: none;
}
.client-public .c-home-services li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.client-public .c-home-services__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text-2); }
.client-public .c-home-mail { margin: 18px 0 0; text-align: center; color: var(--c-text-4); font-size: var(--c-fs-sm); }
.client-public .c-home-mail .bi { margin-right: 4px; color: var(--c-muted); }

/* Connexion : panneau de présentation + formulaire */
.client-public .c-public__inner.c-public__inner--login { max-width: 820px; }
.client-public .c-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius-lg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .18);
}
.client-public .c-login__main { padding: 32px; }
.client-public .c-login__main h1 { font-size: 20px; margin: 0 0 4px; }
.client-public .c-login__aside {
    order: -1;
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: linear-gradient(160deg, var(--c-accent-strong) 0%, var(--c-accent) 100%);
    color: #fff;
}
.client-public .c-login__eyebrow { margin: 0 0 10px; font-size: var(--c-fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.client-public .c-login__title { margin: 0 0 18px; font-size: 20px; line-height: 1.3; color: #fff; }
.client-public .c-login__points { margin: 0 0 24px; padding: 0; list-style: none; }
.client-public .c-login__points li { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; font-size: 13.5px; color: rgba(255, 255, 255, .92); }
.client-public .c-login__points .bi { margin-top: 1px; color: #99f6e4; }
.client-public .c-login__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    margin: auto 0 0;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fff;
    font-size: var(--c-fs-sm);
    color: var(--c-text-2);
}
.client-public .c-login__links { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }

@media (max-width: 767.98px) {
    .client-public .c-home-grid { grid-template-columns: 1fr; }
    .client-public .c-home-hero h1 { font-size: 20px; }
    .client-public .c-public__inner.c-public__inner--login { max-width: 400px; }
    /* Téléphone : formulaire seul, l'état des services en pied de carte */
    .client-public .c-login { grid-template-columns: 1fr; }
    .client-public .c-login__aside { order: 0; padding: 12px 24px 16px; background: none; border-top: 1px solid var(--c-border-soft); color: var(--c-text-2); }
    .client-public .c-login__eyebrow,
    .client-public .c-login__title,
    .client-public .c-login__points { display: none; }
    .client-public .c-login__status { padding: 0; background: none; color: var(--c-text-4); }
    .client-public .c-login__main { padding: 24px; }
    .client-public .c-login__links { justify-content: center; }
}
@media (max-width: 480px) {
    .client-public .c-public-card { padding: 18px; }
    .client-public .c-login__main { padding: 18px; }
    .client-public .c-login__aside { padding: 12px 18px 14px; }
}

/* ---------- Annonces : fenêtre surgissante du demandeur ---------- */
.client-shell .c-announce {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .45);
    animation: c-announce-fade .18s ease;
}
.client-shell .c-announce[hidden] { display: none; }
.client-shell .c-announce__card {
    --c-announce-head: var(--c-accent);
    --c-announce-head-fg: #fff;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    background: var(--c-bg);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .22);
    overflow: hidden;
    font-family: var(--c-font);
    animation: c-announce-rise .22s ease;
}
.client-shell .c-announce__card--warning { --c-announce-head: var(--c-amber); --c-announce-head-fg: #1f2937; }
.client-shell .c-announce__card--danger { --c-announce-head: #dc2626; }
.client-shell .c-announce__card--success { --c-announce-head: #059669; }
.client-shell .c-announce__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--c-announce-head);
    color: var(--c-announce-head-fg);
    flex: none;
}
.client-shell .c-announce__head .bi { font-size: 20px; line-height: 1; }
.client-shell .c-announce__title {
    margin: 0;
    font-size: var(--c-fs-title);
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
    overflow-wrap: anywhere;
}
.client-shell .c-announce__body {
    padding: 18px 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--c-text-2);
    overflow-y: auto;
    overflow-wrap: anywhere;
    min-height: 0;
    flex: 1 1 auto;
}
.client-shell .c-announce__body :is(h1, h2, h3, h4) { margin: .8em 0 .4em; color: var(--c-text); font-weight: 700; line-height: 1.3; }
.client-shell .c-announce__body :first-child { margin-top: 0; }
.client-shell .c-announce__body :last-child { margin-bottom: 0; }
.client-shell .c-announce__body h1 { font-size: 1.3em; }
.client-shell .c-announce__body h2 { font-size: 1.15em; }
.client-shell .c-announce__body :is(h3, h4) { font-size: 1.02em; }
.client-shell .c-announce__body p { margin: 0 0 .8em; }
.client-shell .c-announce__body :is(ul, ol) { padding-left: 1.4em; margin: 0 0 .8em; }
.client-shell .c-announce__body li { margin-bottom: .3em; }
.client-shell .c-announce__body a { color: var(--c-accent-strong); text-decoration: underline; }
.client-shell .c-announce__body strong { font-weight: 600; color: var(--c-text); }
.client-shell .c-announce__body blockquote { margin: .8em 0; padding-left: 12px; border-left: 3px solid var(--c-border-strong); color: var(--c-text-4); }
.client-shell .c-announce__body code { padding: 1px 5px; border-radius: var(--c-radius-xs); background: var(--c-bg-subtle); font-family: var(--c-mono); font-size: .9em; }
.client-shell .c-announce__body img { max-width: 100%; height: auto; border-radius: var(--c-radius-lg); }
.client-shell .c-announce__body hr { border: 0; border-top: 1px solid var(--c-border); margin: 1em 0; }
.client-shell .c-announce__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-menu);
    flex: none;
}
@keyframes c-announce-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes c-announce-rise { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .client-shell .c-announce, .client-shell .c-announce__card { animation: none; }
}
@media (max-width: 575.98px) {
    .client-shell .c-announce__body { max-height: 60vh; }
    .client-shell .c-announce__foot { flex-direction: column-reverse; }
    .client-shell .c-announce__foot .c-btn { width: 100%; justify-content: center; }
}
