/* Extrait tel quel du monocode V1 — parité totale. */
      /* Languette latérale supprimée — bouton Assistant désormais dans le header */
      #cwk-fab {
        display: none !important;
      }
      /* Bouton Assistant — MÊME STYLE que les boutons d'action grid (action-btn-mandat : orange pastel + border-left 4px) — bien visible sur fond vert pétrole du header */
      #cwk-hdr-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        background: #ffedd5;
        border: 1px solid rgba(234, 88, 12, 0.4);
        border-left: 4px solid #ea580c;
        color: #9a3412;
        border-radius: 10px;
        cursor: pointer;
        font-family: inherit;
        font-size: 12.5px;
        font-weight: 600;
        letter-spacing: 0.01em;
        text-transform: none;
        transition: 0.15s;
        position: relative;
        line-height: 1.2;
      }
      #cwk-hdr-btn:hover {
        background: #fed7aa;
        border-color: #ea580c;
        border-left-color: #ea580c;
        transform: translateY(-1px);
      }
      #cwk-hdr-btn svg {
        width: 15px;
        height: 15px;
        color: #ea580c;
      }
      #cwk-hdr-btn .cwk-hdr-btn-dot {
        display: none; /* point vert clignotant retiré à la demande de Jérémie (21 juin 2026) */
      }
      @keyframes cwkHdrPulseDot {
        0%,
        100% {
          transform: scale(1);
          opacity: 1;
        }
        50% {
          transform: scale(1.18);
          opacity: 0.78;
        }
      }
      #cwk-panel {
        position: fixed;
        top: 0;
        right: -440px;
        width: 420px;
        max-width: 92vw;
        height: 100vh;
        z-index: 9001;
        background: var(--bg);
        border-left: 1px solid var(--gray-200);
        box-shadow: -8px 0 30px rgba(18, 110, 130, 0.12);
        display: flex;
        flex-direction: column;
        transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      }
      #cwk-panel.open {
        right: 0;
      }
      .cwk-head {
        padding: 14px 16px;
        border-bottom: 1px solid var(--gray-200);
        display: flex;
        align-items: center;
        gap: 11px;
        background: var(--white);
      }
      .cwk-av {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--navy);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 13px;
        flex-shrink: 0;
      }
      .cwk-ht {
        font-weight: 700;
        color: var(--navy);
        font-size: 14px;
        line-height: 1.2;
      }
      .cwk-hs {
        font-size: 11px;
        color: var(--gray-500);
        margin-top: 2px;
      }
      .cwk-x {
        margin-left: auto;
        background: none;
        border: none;
        color: var(--gray-500);
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
        padding: 4px 8px;
      }
      .cwk-x:hover {
        color: var(--gray-900);
      }
      .cwk-agents {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 10px 12px;
        border-bottom: 1px solid var(--gray-200);
        background: var(--white);
      }
      .cwk-agent {
        flex-shrink: 0;
        padding: 5px 11px;
        border-radius: 16px;
        font-size: 11.5px;
        font-weight: 600;
        border: 1px solid var(--gray-200);
        background: var(--gray-50);
        color: var(--gray-700);
        cursor: pointer;
        white-space: nowrap;
      }
      .cwk-agent:hover {
        border-color: var(--navy);
        color: var(--navy);
      }
      .cwk-agent.active {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
      }
      .cwk-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 11px;
      }
      .cwk-msg {
        max-width: 90%;
        padding: 10px 13px;
        border-radius: 13px;
        font-size: 13px;
        line-height: 1.55;
        white-space: pre-wrap;
        word-wrap: break-word;
      }
      .cwk-msg.user {
        align-self: flex-end;
        background: var(--navy);
        color: #fff;
        border-bottom-right-radius: 4px;
      }
      .cwk-msg.bot {
        align-self: flex-start;
        background: var(--white);
        color: var(--gray-900);
        border: 1px solid var(--gray-200);
        border-bottom-left-radius: 4px;
      }
      .cwk-msg.bot strong {
        color: var(--navy);
      }
      .cwk-msg.bot code {
        background: var(--gray-100);
        padding: 1px 5px;
        border-radius: 4px;
        font-size: 12px;
      }
      .cwk-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px 2px;
      }
      .cwk-chip {
        background: var(--gray-50);
        border: 1px solid var(--gray-200);
        color: var(--navy);
        padding: 5px 10px;
        border-radius: 14px;
        font-size: 11.5px;
        cursor: pointer;
      }
      .cwk-chip:hover {
        background: var(--navy);
        color: #fff;
        border-color: var(--navy);
      }
      /* Chip-action : déclenche une fonction (organiser, joindre…) — distingué visuellement */
      .cwk-chip.cwk-chip-action {
        background: #ffedd5;
        border-color: rgba(234, 88, 12, 0.4);
        color: #9a3412;
        border-left: 3px solid #ea580c;
        font-weight: 600;
      }
      .cwk-chip.cwk-chip-action:hover {
        background: #fed7aa;
        border-color: #ea580c;
        color: #9a3412;
      }
      .cwk-input {
        padding: 11px 12px;
        border-top: 1px solid var(--gray-200);
        display: flex;
        gap: 8px;
        background: var(--white);
        align-items: flex-end;
      }
      .cwk-input textarea {
        flex: 1;
        resize: none;
        border: 1px solid var(--gray-200);
        border-radius: 10px;
        padding: 9px 11px;
        font-size: 13px;
        font-family: inherit;
        max-height: 110px;
        line-height: 1.4;
        background: var(--bg);
        color: var(--gray-900);
      }
      .cwk-input textarea:focus {
        outline: none;
        border-color: var(--navy);
      }
      /* Bouton "+ Joindre" (upload depuis PC, classement auto) — style action-btn */
      .cwk-attach {
        background: #ffedd5;
        border: 1px solid rgba(234, 88, 12, 0.4);
        border-left: 4px solid #ea580c;
        color: #9a3412;
        border-radius: 10px;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        transition: 0.15s;
      }
      .cwk-attach:hover {
        background: #fed7aa;
        border-color: #ea580c;
        border-left-color: #ea580c;
        transform: translateY(-1px);
      }
      .cwk-attach svg {
        width: 18px;
        height: 18px;
        color: #ea580c;
      }
      .cwk-attach:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        transform: none;
      }
      .cwk-send {
        background: var(--navy);
        color: #fff;
        border: none;
        border-radius: 10px;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
      }
      .cwk-send:hover {
        background: var(--navy-dark);
      }
      .cwk-send svg {
        width: 18px;
        height: 18px;
      }
      .cwk-typing {
        display: flex;
        gap: 4px;
        padding: 4px 2px;
      }
      .cwk-typing i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--gray-400);
        animation: cwkbl 1.2s infinite;
      }
      .cwk-typing i:nth-child(2) {
        animation-delay: 0.2s;
      }
      .cwk-typing i:nth-child(3) {
        animation-delay: 0.4s;
      }
      @keyframes cwkbl {
        0%,
        60%,
        100% {
          opacity: 0.3;
        }
        30% {
          opacity: 1;
        }
      }
      .cwk-foot {
        font-size: 10px;
        color: var(--gray-400);
        text-align: center;
        padding: 6px;
      }
      .cwk-ctx {
        padding: 9px 14px;
        background: linear-gradient(90deg, rgba(18, 110, 130, 0.1), rgba(18, 110, 130, 0.04));
        border-bottom: 1px solid var(--gray-200);
        font-size: 12px;
      }
      .cwk-ctx-row {
        display: flex;
        align-items: center;
        gap: 7px;
      }
      .cwk-ctx-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #22c55e;
        flex-shrink: 0;
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
      }
      .cwk-ctx-label {
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--gray-500);
        font-weight: 600;
      }
      .cwk-ctx-num {
        margin-left: auto;
        font-weight: 700;
        color: var(--navy);
        font-size: 11.5px;
        font-family: "SF Mono", "Menlo", monospace;
      }
      .cwk-ctx-meta {
        margin-top: 3px;
        font-size: 12px;
        color: var(--gray-700);
        font-weight: 500;
      }
