/* CognitiShop - Propriete ITaiB.fr. Tous droits reserves. */

.cs-assistant-root,
.cs-assistant-root * {
  box-sizing: border-box;
}

.cs-assistant-root {
  --cs-assistant-green: #2f7f0f;
  --cs-assistant-green-dark: #0f4f19;
  --cs-assistant-lime: #8fc52f;
  --cs-assistant-orange: #ff7418;
  --cs-assistant-ink: #07231f;
  --cs-assistant-muted: #557065;
  --cs-assistant-border: rgba(47, 127, 15, 0.2);
  --cs-assistant-shadow: 0 22px 54px rgba(4, 30, 20, 0.24);
  position: fixed;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 88;
  font-family: inherit;
  color: var(--cs-assistant-ink);
}

.cs-assistant-launcher {
  width: min(286px, calc(100vw - 28px));
  min-height: 104px;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  background: transparent;
  position: relative;
}

.cs-assistant-launcher:focus-visible,
.cs-assistant-close:focus-visible,
.cs-assistant-submit:focus-visible,
.cs-assistant-chip:focus-visible,
.cs-assistant-source a:focus-visible,
.cs-assistant-actions a:focus-visible {
  outline: 3px solid rgba(255, 116, 24, 0.35);
  outline-offset: 3px;
}

.cs-assistant-root.is-open .cs-assistant-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
  visibility: hidden;
}

.cs-assistant-mascot {
  height: 98px;
  position: relative;
  width: 98px;
  z-index: 2;
}

.cs-assistant-mascot-img {
  display: block;
  height: auto;
  pointer-events: none;
  width: 98px;
}

.cs-assistant-launcher-text {
  background: linear-gradient(135deg, #ffffff, #f2ffe6 58%, #fff3dc);
  border: 1px solid rgba(47, 127, 15, 0.22);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(20, 75, 29, 0.18);
  display: grid;
  min-width: 178px;
  opacity: 0;
  padding: 12px 34px 12px 16px;
  pointer-events: none;
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translate(34px, -50%) scale(0.96);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  z-index: 1;
  text-align: left;
}

.cs-assistant-launcher:hover .cs-assistant-launcher-text,
.cs-assistant-launcher:focus-visible .cs-assistant-launcher-text {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}

.cs-assistant-launcher-text strong {
  color: #154f15;
  font-size: .98rem;
  font-weight: 950;
}

.cs-assistant-launcher-text span {
  color: var(--cs-assistant-muted);
  font-size: .75rem;
  font-weight: 800;
}

.cs-assistant-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 13px);
  width: min(560px, calc(100vw - 24px));
  max-height: min(690px, calc(100vh - 132px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--cs-assistant-border);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 255, 243, 0.98)),
    #fff;
  box-shadow: var(--cs-assistant-shadow);
}

.cs-assistant-panel[hidden] {
  display: none;
}

.cs-assistant-head {
  padding: 14px 15px 13px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.25), transparent 68px),
    linear-gradient(135deg, #103f16, #2f7f0f 68%, #ff7418);
}

.cs-assistant-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cs-assistant-eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cs-assistant-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.08;
}

.cs-assistant-head p {
  margin: 8px 0 0;
  max-width: 30rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cs-assistant-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.cs-assistant-body {
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 13px;
  -webkit-overflow-scrolling: touch;
}

.cs-assistant-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.cs-assistant-label {
  display: grid;
  gap: 7px;
  color: var(--cs-assistant-ink);
  font-weight: 950;
  font-size: 0.9rem;
}

.cs-assistant-input {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid rgba(47, 127, 15, 0.25);
  border-radius: 16px;
  padding: 12px 13px;
  color: var(--cs-assistant-ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font: inherit;
  line-height: 1.38;
}

.cs-assistant-input:focus {
  border-color: rgba(47, 127, 15, 0.58);
  outline: 3px solid rgba(143, 197, 47, 0.18);
}

.cs-assistant-options {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(143, 197, 47, 0.12);
  color: #17351c;
  font-size: 0.82rem;
  line-height: 1.25;
}

.cs-assistant-options input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--cs-assistant-green);
}

.cs-assistant-submit {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--cs-assistant-orange), #ff8d2a);
  box-shadow: 0 14px 28px rgba(255, 116, 24, 0.26);
  font-weight: 950;
  font-size: 0.94rem;
}

.cs-assistant-submit[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.cs-assistant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cs-assistant-chip {
  border: 1px solid rgba(47, 127, 15, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  cursor: pointer;
  color: #21441f;
  background: #fff;
  font-weight: 850;
  font-size: 0.78rem;
}

.cs-assistant-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 0;
  color: var(--cs-assistant-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.cs-assistant-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(47, 127, 15, 0.18);
  border-top-color: var(--cs-assistant-green);
  animation: csAssistantSpin 0.72s linear infinite;
}

.cs-assistant-answer {
  display: grid;
  gap: 11px;
}

.cs-assistant-message {
  border: 1px solid rgba(47, 127, 15, 0.18);
  border-radius: 18px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(143, 197, 47, 0.13), rgba(255, 255, 255, 0.96)),
    #fff;
}

.cs-assistant-message h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.2;
}

.cs-assistant-message p {
  margin: 0;
  color: #314b42;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cs-assistant-private {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 11px;
  border-radius: 15px;
  color: #17351c;
  background: rgba(8, 129, 107, 0.1);
  font-size: 0.82rem;
  line-height: 1.36;
}

.cs-assistant-private::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #0aa070;
  box-shadow: 0 0 0 5px rgba(10, 160, 112, 0.14);
}

.cs-assistant-private-history {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(8, 129, 107, 0.18);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(8, 129, 107, 0.1), rgba(255, 255, 255, 0.96)),
    #fff;
}

.cs-assistant-private-meta {
  margin: 0;
  color: #31594f;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

.cs-assistant-private-signal {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(8, 129, 107, 0.11);
}

.cs-assistant-private-signal strong {
  color: #07231f;
  font-size: 0.84rem;
  line-height: 1.22;
}

.cs-assistant-private-signal small {
  color: #5a7067;
  font-size: 0.74rem;
  line-height: 1.3;
}

.cs-assistant-sources {
  display: grid;
  gap: 8px;
}

.cs-assistant-section-title {
  margin: 0;
  font-size: 0.79rem;
  color: #244c1d;
  font-weight: 950;
  text-transform: uppercase;
}

.cs-assistant-source {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(47, 127, 15, 0.14);
  border-radius: 15px;
  background: #fff;
}

.cs-assistant-source.is-video {
  border-color: rgba(255, 116, 24, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 116, 24, 0.13), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 12px 26px rgba(255, 116, 24, 0.14);
}

.cs-assistant-source-type {
  align-self: start;
  border-radius: 999px;
  padding: 4px 7px;
  color: #123f12;
  background: #e8f7d2;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cs-assistant-source.is-video .cs-assistant-source-type {
  color: #833300;
  background: #fff0df;
}

.cs-assistant-source a {
  color: #052d25;
  text-decoration: none;
  font-weight: 950;
  line-height: 1.22;
}

.cs-assistant-source a:hover {
  color: var(--cs-assistant-green);
  text-decoration: underline;
}

.cs-assistant-source small {
  display: block;
  margin-top: 4px;
  color: #5a7067;
  font-size: 0.76rem;
  line-height: 1.32;
}

.cs-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-assistant-actions li {
  border-radius: 999px;
  color: #294722;
  background: #f2fbdf;
  font-weight: 850;
  font-size: 0.74rem;
}

.cs-assistant-actions li,
.cs-assistant-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
}

.cs-assistant-actions li.has-link {
  padding: 0;
  background: transparent;
}

.cs-assistant-actions a {
  border-radius: inherit;
  color: #8a3500;
  background: #fff0df;
  text-decoration: none;
}

.cs-assistant-actions a:hover {
  color: #642600;
  text-decoration: underline;
}

.cs-assistant-empty {
  padding: 12px;
  border-radius: 16px;
  color: #3b5149;
  background: #fff8ed;
  font-size: 0.86rem;
  line-height: 1.42;
}

@keyframes csAssistantSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .cs-assistant-root {
    right: 13px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .cs-assistant-launcher {
    min-height: 90px;
    width: min(242px, calc(100vw - 22px));
  }

  .cs-assistant-mascot {
    height: 82px;
    width: 82px;
  }

  .cs-assistant-mascot-img {
    width: 82px;
  }

  .cs-assistant-launcher-text {
    min-width: 152px;
    padding: 10px 28px 10px 13px;
    right: 58px;
  }

  .cs-assistant-launcher-text span {
    display: none;
  }

  .cs-assistant-panel {
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: calc(100vh - 78px - env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 18px 18px;
  }

  .cs-assistant-head {
    padding: 13px;
  }

  .cs-assistant-title {
    font-size: 1.08rem;
  }

  .cs-assistant-body {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .cs-assistant-root {
    right: 10px;
  }

  .cs-assistant-launcher-text strong {
    max-width: 7.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cs-assistant-source {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-assistant-launcher,
  .cs-assistant-launcher-text,
  .cs-assistant-mascot,
  .cs-assistant-spinner {
    animation: none;
    transition: none;
  }
}
