/*
 * ContactCGT – interface conversationnelle 2026
 * Chargée après style.css uniquement sur le parcours Contact CGT.
 */

:root {
  --chat-red: #e62d35;
  --chat-red-dark: #c91f28;
  --chat-red-soft: #fff1f2;
  --chat-ink: #18181a;
  --chat-muted: #6b6b70;
  --chat-line: #e5e3df;
  --chat-surface: #ffffff;
  --chat-canvas: #f4f3f0;
  --chat-bot: #efefed;
  --chat-focus: #1d63d8;
  --chat-radius: 18px;
  --chat-shadow: 0 18px 60px rgba(24, 24, 26, 0.08);
}

body.single-chat,
body.page-template-front-page {
  background: var(--chat-canvas);
  color: var(--chat-ink);
}

body.single-chat {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  min-height: 100dvh;
}

body.single-chat #sb-site,
body.single-chat .global-container,
body.single-chat .site-content,
body.single-chat .content-area {
  min-height: 100%;
}

body.single-chat .global-container {
  background: var(--chat-canvas);
}

.contact-chat-app {
  width: min(900px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  background: var(--chat-surface);
  border: 1px solid rgba(24, 24, 26, 0.08);
  border-radius: 24px;
  box-shadow: var(--chat-shadow);
  overflow: clip;
}

.contact-chat-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--chat-line);
}

.contact-chat-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.contact-chat-brand__mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--chat-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
}

.contact-chat-brand__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.contact-chat-brand__title {
  color: var(--chat-ink);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.contact-chat-brand__subtitle {
  margin-top: 3px;
  color: var(--chat-muted);
  font-size: 12px;
  font-weight: 500;
}

.contact-chat-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff2cc;
  color: #664d03;
  font-size: 12px;
  font-weight: 650;
}

.contact-chat-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.contact-chat-restart {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--chat-muted);
  padding: 8px 9px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
}

.contact-chat-restart:hover {
  background: #f4f4f2;
  color: var(--chat-ink);
}

.contact-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-chat-log {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 34px 38px 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message-row {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.chat-message-row--user {
  justify-content: flex-end;
}

.chat-message-row--cgt {
  justify-content: flex-start;
}

.chat-message-row.is-new,
.chat-message-row--user:not(.chat-message-row--opening):last-of-type,
.chat-options:last-child,
.chat-response-prompt:last-of-type {
  animation: chat-enter 180ms ease-out both;
}

.chat-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 9px;
  background: var(--chat-red);
  color: #fff;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.chat-bubble {
  position: relative;
  max-width: min(76%, 610px);
  padding: 11px 15px 12px;
  border-radius: var(--chat-radius);
  font-size: 17px;
  line-height: 1.42;
  letter-spacing: -0.012em;
  word-break: break-word;
}

.chat-bubble--cgt {
  background: var(--chat-bot);
  color: var(--chat-ink);
  border-bottom-left-radius: 7px;
}

.chat-bubble--user {
  max-width: min(72%, 560px);
  background: var(--chat-ink);
  color: #fff;
  border-bottom-right-radius: 7px;
  font-weight: 520;
}

.chat-bubble p,
.chat-bubble ul,
.chat-bubble ol,
.chat-response-prompt p,
.chat-response-prompt ul,
.chat-response-prompt ol {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  line-height: inherit;
}

.chat-bubble p + p,
.chat-bubble p + ul,
.chat-bubble p + ol,
.chat-bubble ul + p,
.chat-bubble ol + p {
  margin-top: 0.7em;
}

.chat-bubble ul,
.chat-bubble ol {
  margin-top: 0.45em;
  padding-left: 1.2em;
}

.chat-bubble ul {
  list-style: disc;
}

.chat-bubble ol {
  list-style: decimal;
}

.chat-bubble li + li {
  margin-top: 0.25em;
}

.chat-bubble a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.chat-response-prompt {
  align-self: flex-end;
  width: min(100%, 650px);
  margin-top: 12px;
  padding-right: 2px;
  color: var(--chat-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
}

.chat-response-prompt p + p {
  margin-top: 5px;
}

.chat-options {
  align-self: flex-end;
  width: min(100%, 650px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 1px;
}

.chat-option {
  appearance: none;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px 14px 12px 16px;
  border: 1px solid #d9d8d4;
  border-radius: 14px;
  background: #fff;
  color: var(--chat-ink);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 620;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(24, 24, 26, 0.02);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.chat-option:hover {
  border-color: rgba(230, 45, 53, 0.55);
  background: var(--chat-red-soft);
  color: var(--chat-ink);
  transform: translateY(-1px);
}

.chat-option:active {
  transform: translateY(0);
}

.chat-option:disabled,
.chat-option[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.chat-option.is-selected {
  border-color: var(--chat-red);
  background: var(--chat-red);
  color: #fff;
  opacity: 1;
}

.chat-option__label {
  min-width: 0;
}

.chat-option__arrow {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f2ef;
  color: var(--chat-muted);
  font-size: 16px;
  line-height: 1;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.chat-option:hover .chat-option__arrow {
  background: #fff;
  color: var(--chat-red);
  transform: translateX(1px);
}

.chat-option.is-selected .chat-option__arrow {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.chat-module {
  width: calc(100% - 39px);
  max-width: 740px;
  margin: 9px 0 11px 39px;
  border-radius: 17px;
}

.chat-module--demo,
.chat-module--html,
.chat-module--shortcode,
.chat-module--brevo {
  overflow: hidden;
  border: 1px solid var(--chat-line);
  background: #fff;
}

.chat-module--html,
.chat-module--shortcode,
.chat-module--brevo {
  padding: 20px;
}

.chat-demo-frame {
  width: 100%;
  height: var(--chat-demo-height, 620px);
  display: block;
  border: 0;
  background: #fff;
}

.chat-module form {
  max-width: 100%;
}

.chat-module input,
.chat-module select,
.chat-module textarea,
.chat-module button {
  max-width: 100%;
  font-family: inherit;
}

.chat-module input,
.chat-module select,
.chat-module textarea {
  min-height: 46px;
  border: 1px solid #d9d8d4;
  border-radius: 10px;
  background: #fff;
}

.chat-module textarea {
  min-height: 120px;
}

.chat-connectivity-note {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #e6c04e;
  border-radius: 10px;
  background: #fff7d6;
  color: #5d4a00;
  font-size: 13px;
  line-height: 1.4;
}

.chat-completion {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0 39px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f1f1ef;
  color: var(--chat-muted);
  font-size: 12.5px;
  font-weight: 650;
}

.chat-completion > span:first-child {
  color: var(--chat-red);
}

.contact-chat-noscript {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 38px 24px;
  color: var(--chat-muted);
  font-size: 13px;
}

/* Focus accessible : l'ancien reset du thème supprimait tous les outlines. */
.contact-chat-app :focus {
  outline: none;
}

.contact-chat-app :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--chat-focus) 70%, transparent);
  outline-offset: 3px;
}

/* Barre d'édition WP discrète, séparée de l'interface publique. */
.single-chat .contact-chat-admin {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 20px;
  text-align: center;
}

.single-chat .contact-chat-admin a {
  display: inline-block;
  margin: 3px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--chat-line);
  color: var(--chat-muted);
  font-size: 12px;
}

/* Écran d'entrée */
.contact-chat-launch {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.contact-chat-launch__card {
  width: min(560px, 100%);
  padding: 38px;
  border: 1px solid rgba(24, 24, 26, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--chat-shadow);
  text-align: left;
}

.contact-chat-launch__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 12px;
  background: var(--chat-red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: lowercase;
}

.contact-chat-launch h1 {
  margin: 0;
  color: var(--chat-ink);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.contact-chat-launch p {
  margin: 15px 0 0;
  color: var(--chat-muted);
  font-size: 17px;
  line-height: 1.48;
}

.contact-chat-launch__button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 12px 14px 12px 17px;
  border-radius: 14px;
  background: var(--chat-red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease;
}

.contact-chat-launch__button:hover {
  background: var(--chat-red-dark);
  color: #fff;
  transform: translateY(-1px);
}

.contact-chat-launch__button span:last-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
}

@keyframes chat-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .contact-chat-app {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .contact-chat-header {
    min-height: 62px;
    padding: 9px 13px;
  }

  .contact-chat-brand__mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    border-radius: 9px;
  }

  .contact-chat-brand__subtitle {
    display: none;
  }

  .contact-chat-restart {
    padding-inline: 7px;
    font-size: 12.5px;
  }

  .contact-chat-log {
    padding: 24px 15px 34px;
    gap: 10px;
  }

  .chat-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 8px;
    font-size: 8px;
  }

  .chat-bubble,
  .chat-bubble--user {
    max-width: 86%;
    padding: 10px 13px 11px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.4;
  }

  .chat-bubble--cgt {
    border-bottom-left-radius: 6px;
  }

  .chat-bubble--user {
    border-bottom-right-radius: 6px;
  }

  .chat-response-prompt {
    width: calc(100% - 36px);
    margin-top: 10px;
    font-size: 13px;
  }

  .chat-options {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-option {
    min-height: 54px;
    padding: 11px 12px 11px 14px;
    border-radius: 13px;
    font-size: 15px;
  }

  .chat-module {
    width: calc(100% - 36px);
    margin-left: 36px;
  }

  .chat-module--html,
  .chat-module--shortcode,
  .chat-module--brevo {
    padding: 14px;
  }

  .chat-demo-frame {
    min-height: 460px;
  }

  .chat-completion {
    margin-left: 36px;
  }

  .contact-chat-noscript {
    padding: 0 15px 20px 51px;
  }

  .contact-chat-launch {
    padding: 0;
    background: #fff;
  }

  .contact-chat-launch__card {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 22px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}



/* --------------------------------------------------------------------------
 * Outils ouverts depuis une option ACF
 * ----------------------------------------------------------------------- */

.chat-option--modal .chat-option__arrow {
  background: var(--chat-red-soft);
  color: var(--chat-red-dark);
}

html.chat-modal-open,
body.chat-modal-open {
  overflow: hidden !important;
}

.chat-tool-modal[hidden] {
  display: none !important;
}

.chat-tool-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 18, 20, 0.58);
  opacity: 0;
  transition: opacity 140ms ease;
}

.chat-tool-modal.is-open {
  opacity: 1;
}

.chat-tool-modal__dialog {
  width: min(1180px, 100%);
  height: min(860px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(24, 24, 26, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  transform: translateY(8px) scale(0.995);
  transition: transform 140ms ease;
}

.chat-tool-modal.is-open .chat-tool-modal__dialog {
  transform: translateY(0) scale(1);
}

.chat-tool-modal__header {
  min-height: 64px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--chat-line);
  background: #fff;
}

.chat-tool-modal__heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-tool-modal__eyebrow {
  color: var(--chat-red);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-tool-modal__title {
  overflow: hidden;
  color: var(--chat-ink);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tool-modal__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-tool-modal__external {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--chat-muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.chat-tool-modal__external:hover {
  background: #f4f4f2;
  color: var(--chat-ink);
}

.chat-tool-modal__close {
  appearance: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f3f3f1;
  color: var(--chat-ink);
  font: inherit;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.chat-tool-modal__close:hover {
  background: #e9e9e6;
}

.chat-tool-modal__body {
  min-height: 0;
  flex: 1 1 auto;
  background: #fff;
}

.chat-tool-modal__frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.chat-module--demo-launcher {
  border: 0;
  background: transparent;
  overflow: visible;
}

.chat-module-launch {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid var(--chat-line);
  border-radius: 14px;
  background: #fff;
  color: var(--chat-ink);
  text-decoration: none;
}

.chat-module-launch:hover {
  border-color: #d2cfca;
  background: #fafaf8;
  color: var(--chat-ink);
}

.chat-module-launch__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-module-launch__eyebrow {
  color: var(--chat-red);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.chat-module-launch__title {
  font-size: 16px;
  font-weight: 720;
}

.chat-module-launch__meta {
  color: var(--chat-muted);
  font-size: 12px;
}

.chat-module-launch__arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chat-red-soft);
  color: var(--chat-red-dark);
  font-size: 16px;
}

@media (max-width: 720px) {
  .chat-tool-modal {
    padding: 0;
    background: #fff;
  }

  .chat-tool-modal__dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .chat-tool-modal.is-open .chat-tool-modal__dialog {
    transform: none;
  }

  .chat-tool-modal__header {
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px 14px;
  }

  .chat-tool-modal__external {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-message-row.is-new,
  .chat-message-row--user:not(.chat-message-row--opening):last-of-type,
  .chat-options:last-child,
  .chat-response-prompt:last-of-type,
  .chat-option,
  .contact-chat-launch__button,
  .chat-tool-modal,
  .chat-tool-modal__dialog {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
 * Brevo dans le fil de conversation — intégration Contact CGT
 * V6
 *
 * Les formulaires Brevo embarquent leur propre CSS + beaucoup de styles
 * inline. Les !important ci-dessous sont donc volontaires et restent
 * strictement limités aux modules Brevo du chat.
 * ----------------------------------------------------------------------- */

.chat-module--brevo {
  max-width: none;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
}

.chat-module--brevo,
.chat-module--brevo *,
.chat-module--brevo *::before,
.chat-module--brevo *::after {
  box-sizing: border-box;
}

/* Supprime la "carte dans la carte" créée par Brevo. */
.chat-module--brevo .sib-form,
.chat-module--brevo .sib-form-container,
.chat-module--brevo #sib-container,
.chat-module--brevo .sib-container--large,
.chat-module--brevo .sib-container--vertical {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.chat-module--brevo .sib-form {
  padding: 18px 20px 16px !important;
  text-align: left !important;
}

.chat-module--brevo #sib-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* Brevo entoure chaque bloc d'un div avec style="padding: 8px 0". */
.chat-module--brevo #sib-form > div[style*="padding"] {
  padding: 5px 0 !important;
}

.chat-module--brevo .sib-form-block,
.chat-module--brevo .form__entry,
.chat-module--brevo .form__label-row,
.chat-module--brevo .entry_block,
.chat-module--brevo .entry_mcq {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.chat-module--brevo .sib-form-block {
  padding: 0 !important;
}

/* Typo : le formulaire reprend exactement celle de la conversation. */
.chat-module--brevo,
.chat-module--brevo input,
.chat-module--brevo select,
.chat-module--brevo textarea,
.chat-module--brevo button,
.chat-module--brevo label,
.chat-module--brevo span,
.chat-module--brevo a,
.chat-module--brevo .entry__label,
.chat-module--brevo .entry__specification,
.chat-module--brevo .entry__error,
.chat-module--brevo .sib-form-message-panel {
  font-family: inherit !important;
}

.chat-module--brevo .entry__label {
  display: block !important;
  width: 100% !important;
  margin: 0 0 6px !important;
  color: var(--chat-ink) !important;
  font-size: 14.5px !important;
  font-weight: 680 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
}

.chat-module--brevo .entry__label[data-required]::after {
  color: var(--chat-red) !important;
}

.chat-module--brevo .entry__field {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.chat-module--brevo .entry__field .input,
.chat-module--brevo input.input,
.chat-module--brevo select.input,
.chat-module--brevo textarea.input {
  width: 100% !important;
  max-width: none !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid #d6d5d1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--chat-ink) !important;
  font-size: 15px !important;
  font-weight: 450 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  box-shadow: none !important;
  outline: none !important;
}

.chat-module--brevo select.input {
  padding-right: 38px !important;
}

.chat-module--brevo textarea.input {
  min-height: 96px !important;
  resize: vertical;
}

.chat-module--brevo .entry__field .input:hover,
.chat-module--brevo input.input:hover,
.chat-module--brevo select.input:hover,
.chat-module--brevo textarea.input:hover {
  border-color: #bdbbb5 !important;
}

.chat-module--brevo .entry__field .input:focus,
.chat-module--brevo input.input:focus,
.chat-module--brevo select.input:focus,
.chat-module--brevo textarea.input:focus {
  border-color: var(--chat-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-focus) 14%, transparent) !important;
}

.chat-module--brevo input::placeholder,
.chat-module--brevo textarea::placeholder,
.chat-module--brevo #sib-container input::placeholder,
.chat-module--brevo #sib-container textarea::placeholder {
  color: #9a9aa0 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 450 !important;
  text-transform: none !important;
  opacity: 1 !important;
}

/* Texte d'aide Brevo : discret. */
.chat-module--brevo .entry__specification {
  display: block !important;
  margin: 5px 0 0 !important;
  color: var(--chat-muted) !important;
  font-size: 11.5px !important;
  font-weight: 450 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

/* Le texte "Personnalisez ce texte..." est un reliquat de l'éditeur Brevo. */
.chat-module--brevo .entry_block:has(#CODE_POSTAL) > .entry__specification {
  display: none !important;
}

/* Erreurs et confirmations plus compactes. */
.chat-module--brevo .entry__error {
  margin: 5px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #b4232a !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  text-align: left !important;
}

.chat-module--brevo .entry__error:empty {
  display: none !important;
}

.chat-module--brevo .sib-form-message-panel {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Séparateurs : presque invisibles et moins hauts. */
.chat-module--brevo .sib-divider-form-block {
  padding: 3px 0 !important;
}

.chat-module--brevo .sib-divider-form-block > div {
  border-bottom-color: var(--chat-line) !important;
}

/* Cases à cocher : on retire le rose Brevo et on revient aux codes du chat. */
.chat-module--brevo .sib-checkbox-group .entry__choice {
  margin: 0 !important;
}

.chat-module--brevo .checkbox__label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  margin: 0 !important;
  color: var(--chat-ink) !important;
  font-size: 14px !important;
  font-weight: 520 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  cursor: pointer;
}

.chat-module--brevo .checkbox__label > span:last-child {
  color: var(--chat-ink) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 520 !important;
  line-height: 1.35 !important;
}

.chat-module--brevo .checkbox {
  flex: 0 0 20px !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  border-color: #c9c7c1 !important;
  border-radius: 6px !important;
}

.chat-module--brevo .input_replaced:checked + .checkbox {
  border-color: var(--chat-red) !important;
  background-color: var(--chat-red) !important;
}

/* Bouton : composant du chat, pas bouton Brevo. */
.chat-module--brevo .sib-form-block__button {
  width: 100% !important;
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 2px 0 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--chat-red) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-transform: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.chat-module--brevo .sib-form-block__button:hover {
  background: var(--chat-red-dark) !important;
}

.chat-module--brevo .sib-form-block__button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--chat-focus) 70%, transparent) !important;
  outline-offset: 3px !important;
}

.chat-module--brevo .sib-form-block__button .icon {
  width: 16px !important;
  height: 16px !important;
}

/* Les liens éventuels suivent aussi le langage du chat. */
.chat-module--brevo #sib-container a {
  color: var(--chat-red-dark) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
}

@media (max-width: 720px) {
  /*
   * Sur mobile, un formulaire est une vraie étape interactive :
   * il utilise toute la largeur disponible au lieu de rester aligné
   * sur le retrait de l'avatar CGT.
   */
  .chat-module--brevo {
    width: 100% !important;
    max-width: none !important;
    margin: 6px 0 10px !important;
    border-radius: 14px !important;
  }

  .chat-module--brevo .sib-form {
    padding: 14px 13px 13px !important;
  }

  .chat-module--brevo #sib-form > div[style*="padding"] {
    padding: 4px 0 !important;
  }

  .chat-module--brevo .entry__label {
    margin-bottom: 5px !important;
    font-size: 14px !important;
    line-height: 1.28 !important;
  }

  .chat-module--brevo .entry__field .input,
  .chat-module--brevo input.input,
  .chat-module--brevo select.input,
  .chat-module--brevo textarea.input {
    min-height: 43px !important;
    padding: 8px 11px !important;
    border-radius: 9px !important;
    font-size: 16px !important; /* évite le zoom automatique iOS */
  }

  .chat-module--brevo select.input {
    padding-right: 36px !important;
  }

  .chat-module--brevo .checkbox__label,
  .chat-module--brevo .checkbox__label > span:last-child {
    font-size: 13.5px !important;
  }

  .chat-module--brevo .sib-form-block__button {
    min-height: 46px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }
}
