/* ==========================================================================
   ASSISTANT DU SITE (plugin car-chatbot, vue widget.blade.php, js/components/chatbot.js)
   ========================================================================== */
.cb {
    --cb-brand: var(--primary-color, #98bc2a);
    --cb-brand-soft: rgba(var(--primary-color-rgb, 152, 188, 42), .14);
    --cb-brand-ink: #56730b;
    --cb-dark: #0f172a;
    --cb-text: #334155;
    --cb-muted: #64748b;
    --cb-line: #e2e8f0;
    --cb-soft: #f1f5f9;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1040;
    font-family: inherit;
    color: var(--cb-text);
}

/* Le thème fixe couleur et taille sur tous les éléments : ici, tout hérite */
.cb * {
    box-sizing: border-box;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.cb [hidden] {
    display: none !important;
}

/* ---------- Bouton d'ouverture ---------- */
.cb-launcher {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-left: auto;
    border: 0;
    border-radius: 50%;
    background: var(--cb-dark);
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .28);
    cursor: pointer;
    transition: transform .15s;
}

.cb-launcher:hover {
    transform: scale(1.06);
}

.cb-launcher svg {
    color: #fff;
}

.cb-launcher__close,
.cb.is-open .cb-launcher__open {
    display: none;
}

.cb.is-open .cb-launcher__close {
    display: block;
}

/* ---------- Fenêtre ---------- */
/* Plein écran (100 % de la largeur et de la hauteur), sur ordinateur comme sur mobile */
.cb-panel {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    /* Sur grand écran, la conversation reste dans une colonne centrée de 900 px */
    --cb-side: max(16px, calc((100vw - 900px) / 2));
}

/* Chat ouvert : la page derrière ne défile plus */
html.cb-locked,
html.cb-locked body {
    overflow: hidden;
}

/* Bouton d'ouverture caché pendant la discussion : on ferme avec la croix de l'en-tête */
.cb.is-open .cb-launcher {
    display: none;
}

.cb-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px var(--cb-side);
    background: var(--cb-dark);
    color: #fff;
}

.cb-panel__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cb-brand);
}

.cb-panel__title {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.cb-panel__title strong {
    font-size: 15px;
    font-weight: 700;
}

.cb-panel__title span {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
}

.cb-panel__reset,
.cb-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
}

.cb-panel__reset:hover,
.cb-panel__close:hover {
    background: rgba(255, 255, 255, .12);
}

.cb-panel__messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px var(--cb-side);
    background: var(--cb-soft);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ---------- Messages ---------- */
.cb-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    word-wrap: break-word;
    /* Arabe de droite à gauche, français de gauche à droite, ligne par ligne */
    unicode-bidi: plaintext;
}

.cb-msg--bot {
    align-self: flex-start;
    border: 1px solid var(--cb-line);
    border-bottom-left-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* Bouton mis en avant parmi les choix rapides (« Voir le prix final ») */
.cb-chip.cb-chip--primary {
    border-color: var(--cb-brand);
    background: var(--cb-brand);
    color: #fff;
    font-weight: 600;
}

.cb-chip.cb-chip--primary:hover {
    filter: brightness(1.06);
}

/* ---------- Texte des réponses : paragraphes, étapes, puces, conseil ---------- */
.cb-msg--bot:not(.cb-msg--cars):not(.cb-msg--estimate):not(.cb-msg--survey) {
    padding: 12px 15px;
}

.cb-rich {
    white-space: normal;
    color: var(--cb-text);
    font-size: 14.5px;
    line-height: 1.6;
}

.cb-rich > * + * {
    margin-top: 8px;
}

.cb-rich p {
    margin-bottom: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Ligne d'introduction d'une liste (« Pour vendre votre voiture : ») */
.cb-rich .cb-rich__lead {
    color: var(--cb-dark);
    font-weight: 700;
}

.cb-rich__lead + ol,
.cb-rich__lead + ul {
    margin-top: 6px;
}

.cb-rich ol,
.cb-rich ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.cb-rich li {
    position: relative;
    padding-inline-start: 28px;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Étapes numérotées : pastilles vertes */
.cb-rich__steps {
    counter-reset: cb-step;
}

.cb-rich__steps li {
    counter-increment: cb-step;
}

.cb-rich__steps li::before {
    content: counter(cb-step);
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cb-brand-soft);
    color: var(--cb-brand-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* Puces */
.cb-rich__bullets li {
    padding-inline-start: 18px;
}

.cb-rich__bullets li::before {
    content: "";
    position: absolute;
    inset-inline-start: 4px;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cb-brand);
}

/* « Conseil : » et « Attention : » : encadré */
.cb-rich .cb-rich__tip {
    padding: 9px 12px;
    border-inline-start: 3px solid var(--cb-brand);
    border-radius: 10px;
    background: var(--cb-brand-soft);
    color: var(--cb-dark);
    font-size: 14px;
}

.cb-rich__tip strong {
    color: var(--cb-brand-ink);
    font-weight: 700;
}

.cb-msg--user {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: var(--cb-dark);
    color: #fff;
    white-space: pre-line;
}

.cb-msg--wide {
    max-width: 100%;
    width: 100%;
}

.cb-msg__text {
    margin: 0;
    white-space: pre-line;
}

.cb-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--cb-line);
}

/* Liens d'action : flèche, qui avance au survol */
.cb-links .cb-link::after {
    content: "→";
    display: inline-block;
    margin-inline-start: 6px;
    transition: transform .2s;
}

.cb-links .cb-link:hover::after {
    transform: translateX(3px);
}

.cb-links .cb-link:dir(rtl)::after {
    content: "←";
}

.cb-links .cb-link:dir(rtl):hover::after {
    transform: translateX(-3px);
}

.cb-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--cb-brand-soft);
    color: var(--cb-brand-ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.cb-links .cb-link {
    margin-top: 0;
}

.cb-link:hover {
    background: var(--cb-brand);
    color: #fff;
}

/* Annonces : cartes de la page liste (.tv-lcar) dans un carrousel horizontal */
.cb-msg--cars {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.cb-icon {
    display: inline-flex;
    flex-shrink: 0;
}

.cb-slider {
    position: relative;
    container-type: inline-size;
}

.cb-slider__track {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.cb-slider__track::-webkit-scrollbar {
    display: none;
}

/* La carte suivante dépasse : on voit qu'on peut faire défiler */
.cb-card {
    flex: 0 0 min(86%, 340px);
    scroll-snap-align: start;
}

.cb-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e3e6e5;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.cb-card__link:hover {
    border-color: var(--cb-brand);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .1);
}

.cb-card__media {
    position: relative;
    display: block;
    aspect-ratio: 372 / 279;
    background: #eef1ef;
    overflow: hidden;
}

.cb-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cb-card__make {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.cb-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
}

.cb-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cb-card__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--cb-dark);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cb-card__price {
    flex-shrink: 0;
    color: var(--cb-brand);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

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

.cb-card__spec {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 4px 6px;
    border: 1px solid #e9eceb;
    border-radius: 8px;
}

.cb-card__spec-icon {
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--cb-brand-soft);
    color: var(--cb-brand-ink);
}

.cb-card__spec-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cb-card__spec-label {
    color: #7a817f;
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cb-card__spec-value {
    overflow: hidden;
    color: var(--cb-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-card__meta {
    color: var(--cb-muted);
    font-size: 12px;
}

.cb-card__city {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4b5250;
    font-size: 13px;
    font-weight: 500;
}

/* Flèches ‹ › sur la photo, compteur « 1 / 3 » */
.cb-slider__nav {
    position: absolute;
    /* milieu de la photo : carte = 86 % de la largeur (340 px au plus), photo au format 372 × 279 */
    top: calc(min(86cqw, 340px) * 279 / 372 / 2);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
    color: var(--cb-dark);
    cursor: pointer;
    transform: translateY(-50%);
}

.cb-slider__nav--prev {
    left: 6px;
}

.cb-slider__nav--next {
    right: 6px;
}

.cb-slider__nav:disabled,
.cb-slider__nav.is-disabled {
    display: none;
}

/* Avec Swiper : la piste glisse (transform) au lieu de défiler ; écart des cartes donné par Swiper */
.cb-slider.is-swiper {
    overflow: hidden;
}

.cb-slider.is-swiper .cb-slider__track {
    position: relative;
    z-index: 1;
    gap: 0;
    overflow: visible;
    scroll-snap-type: none;
    transition-property: transform;
    box-sizing: content-box;
}

.cb-slider.is-swiper .cb-card {
    flex-shrink: 0;
}

.cb-slider__counter {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* Estimation */
.cb-msg--estimate {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cb-estimate__title,
.cb-estimate__note {
    color: var(--cb-muted);
    font-size: 12px;
}

.cb-estimate__price {
    color: var(--cb-dark);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.cb-estimate__range {
    color: var(--cb-text);
    font-weight: 600;
}

/* Critères pour affiner (carburant, boîte, année…) */
.cb-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.cb-filters__field {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.cb-filters__label {
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--cb-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Boutons radio simples */
.cb-filters__field {
    column-gap: 16px;
    row-gap: 4px;
}

.cb-filters__option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--cb-dark);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

/* Le thème peut masquer ou redessiner les radios : on remet le rendu natif */
.cb-filters__option input {
    position: static;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 1;
    appearance: auto;
    -webkit-appearance: radio;
    accent-color: var(--cb-brand);
    cursor: pointer;
}

.cb-filters__option:has(input:disabled) {
    opacity: .55;
    cursor: default;
}

.cb-filters__submit {
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--cb-brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cb-filters__submit:hover {
    filter: brightness(.95);
}

.cb-filters__submit:disabled {
    opacity: .55;
    cursor: default;
}

/* Questionnaire de l'estimation : une carte, questions numérotées, réponses en pastilles */
/* (flex-shrink : sans lui, « overflow: hidden » laisse la carte rétrécir dans la colonne de messages) */
.cb-msg--survey {
    flex-shrink: 0;
    padding: 0;
    overflow: hidden;
}

.cb-survey {
    gap: 0;
    margin-top: 0;
}

.cb-survey__head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--cb-line);
    background: var(--cb-soft);
}

.cb-survey__intro {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--cb-dark);
    font-size: 14px;
    font-weight: 600;
}

.cb-survey__bar {
    height: 6px;
    border-radius: 999px;
    background: var(--cb-line);
    overflow: hidden;
}

.cb-survey__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--cb-brand);
    transition: width .25s;
}

.cb-survey__progress {
    color: var(--cb-muted);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cb-survey__q {
    padding: 14px 16px;
}

.cb-survey__q + .cb-survey__q {
    border-top: 1px solid var(--cb-line);
}

.cb-survey__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--cb-dark);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

/* Numéro de la question, coché une fois répondue */
.cb-survey__num {
    display: inline-flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--cb-line);
    background: #fff;
    color: var(--cb-dark);
    font-size: 12px;
    font-weight: 700;
    transition: background .2s, border-color .2s, color .2s;
}

.cb-survey__q.is-done .cb-survey__num {
    border-color: var(--cb-brand);
    background: var(--cb-brand);
    color: #fff;
    font-size: 0;
}

.cb-survey__q.is-done .cb-survey__num::before {
    content: "";
    width: 5px;
    height: 10px;
    margin-top: -2px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.cb-survey__options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-inline-start: 34px;
}

.cb-survey__chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.cb-survey__chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cb-survey__chip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--cb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cb-text);
    font-size: 13px;
    line-height: 1.3;
    transition: border-color .15s, background .15s, color .15s;
}

.cb-survey__chip:hover span {
    border-color: var(--cb-brand);
}

.cb-survey__chip input:focus-visible + span {
    box-shadow: 0 0 0 3px var(--cb-brand-soft);
}

.cb-survey__chip input:checked + span {
    border-color: var(--cb-brand);
    background: var(--cb-brand-soft);
    color: var(--cb-brand-ink);
    font-weight: 600;
}

.cb-survey__chip input:checked + span::before {
    content: "";
    width: 4px;
    height: 8px;
    margin-top: -2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.cb-survey__chip:has(input:disabled) {
    opacity: .55;
    cursor: default;
}

/* Équipements : une rubrique repliable par catégorie */
.cb-survey__group {
    margin-inline-start: 34px;
    border: 1px solid var(--cb-line);
    border-radius: 10px;
}

.cb-survey__group + .cb-survey__group {
    margin-top: 6px;
}

.cb-survey__group .cb-survey__options {
    padding: 2px 12px 12px;
}

.cb-survey__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: var(--cb-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.cb-survey__summary::-webkit-details-marker {
    display: none;
}

/* Chevron, tourné quand la rubrique est ouverte */
.cb-survey__summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-inline-start: auto;
    border-right: 2px solid var(--cb-muted);
    border-bottom: 2px solid var(--cb-muted);
    transform: rotate(45deg);
    transition: transform .2s;
}

.cb-survey__group[open] > .cb-survey__summary::after {
    transform: rotate(-135deg);
}

/* Nombre d'équipements cochés dans la rubrique */
.cb-survey__count:not(:empty) {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--cb-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.cb-survey__submit {
    margin: 4px 16px 16px;
    height: 44px;
}

@media (max-width: 480px) {
    .cb-survey__options,
    .cb-survey__group {
        padding-inline-start: 0;
        margin-inline-start: 0;
    }
}

/* Indicateur « en train d'écrire » */
.cb-typing {
    display: flex;
    gap: 4px;
    padding: 14px;
}

.cb-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: cb-dot 1.2s infinite ease-in-out;
}

.cb-typing {
    align-items: center;
    flex-wrap: wrap;
}

.cb-typing__note {
    margin-left: 6px;
    color: var(--cb-muted);
    font-size: 12px;
}

.cb-typing span:nth-child(2) {
    animation-delay: .15s;
}

.cb-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes cb-dot {
    0%, 80%, 100% {
        opacity: .3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* ---------- Choix rapides et saisie ---------- */
.cb-panel__quick {
    display: flex;
    gap: 6px;
    padding: 10px var(--cb-side) 0;
    overflow-x: auto;
    background: #fff;
    scrollbar-width: none;
}

.cb-panel__quick::-webkit-scrollbar {
    display: none;
}

.cb-chip {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid var(--cb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cb-text);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.cb-chip:hover {
    border-color: var(--cb-brand);
    color: var(--cb-brand-ink);
}

.cb-panel__form {
    display: flex;
    gap: 8px;
    padding: 10px var(--cb-side) 12px;
    background: #fff;
}

.cb-panel__form input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--cb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cb-dark);
    font-size: 15px;
}

.cb-panel__form input:focus {
    outline: none;
    border-color: var(--cb-brand);
    box-shadow: 0 0 0 3px var(--cb-brand-soft);
}

.cb-panel__form button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--cb-brand);
    color: #fff;
    cursor: pointer;
}

.cb-panel__form button svg {
    color: #fff;
}

/* Recherche vocale : micro discret à côté d'Envoyer, rouge et pulsant pendant l'écoute */
.cb-panel__form .cb-panel__mic {
    background: var(--cb-brand-soft);
    /* Appui maintenu (comme WhatsApp) : pas de défilement, de sélection ni de menu au doigt */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: transform .15s ease;
}

.cb-panel__form .cb-panel__mic.is-listening {
    transform: scale(1.18);
}

.cb-panel__form .cb-panel__mic svg {
    color: var(--cb-brand-ink);
}

.cb-panel__form .cb-panel__mic[hidden] {
    display: none;
}

.cb-panel__form .cb-panel__mic.is-listening {
    background: #e5484d;
    animation: cb-mic-pulse 1.2s ease-out infinite;
}

.cb-panel__form .cb-panel__mic.is-listening svg {
    color: #fff;
}

/* Transcription en cours (envoi de l'enregistrement au serveur) */
.cb-panel__form .cb-panel__mic.is-busy {
    opacity: .55;
    cursor: progress;
}

@keyframes cb-mic-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 72, 77, .45);
    }

    100% {
        box-shadow: 0 0 0 10px rgba(229, 72, 77, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-panel__form .cb-panel__mic.is-listening {
        animation: none;
    }
}

/* ---------- Mobile : fenêtre plein écran ---------- */
@media (max-width: 575px) {
    .cb {
        right: 14px;
        bottom: 14px;
    }

    /* Fiche annonce : au-dessus de la barre d'actions fixée en bas */
    body:has(.cd-mbar) .cb {
        bottom: 84px;
    }

    .cb-launcher {
        width: 52px;
        height: 52px;
    }

    .cb.is-open .cb-launcher {
        display: none;
    }

    .cb-panel {
        position: fixed;
        inset: 0;
        width: auto;
        height: 100%;
        border-radius: 0;
    }

    .cb-panel__form input {
        font-size: 16px; /* évite le zoom automatique d'iOS */
    }
}
