/* ==========================================================================
   Page « Clawbot » — l'orange porte la page (comme le ticketing),
   le bleu signale l'outillage (ERP, accès), le vert ce que l'utilisateur valide.
   Le livrable du hero réutilise .ticket / .agent-note de styles.css.
   ========================================================================== */

.hero .breadcrumb {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.cb-inbox {
  font-weight: 600;
}

.cb-note {
  max-width: 76ch;
  margin-top: clamp(28px, 4vw, 44px);
  color: var(--fg-2);
}

.cb-note strong {
  color: var(--fg);
}

.agent-note__head img {
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   Il travaille seul : quand, et où on le joint
   -------------------------------------------------------------------------- */

.cb-when {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.cb-when__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(24px, 3vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.cb-when__card p {
  color: var(--fg-2);
}

.cb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding: 0;
  list-style: none;
}

.cb-tags li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--o-100);
  color: var(--orange-ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.cb-tags--blue li {
  background: var(--b-100);
  color: var(--blue-ink);
}

.cb-channels {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 64px);
}

.cb-channels__head h3 {
  margin-bottom: 8px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.cb-channels__head p {
  color: var(--fg-2);
}

.cb-channels__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.cb-channels__list li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: var(--r-md);
  background: #fff;
}

.cb-channels__list li:last-child {
  border-left-color: var(--line-2);
  background: var(--paper);
}

.cb-channels__list span {
  color: var(--fg-3);
  font-size: 0.9rem;
}

/* Chaque canal reçoit tour à tour un exemple de message */
.cb-bubble {
  align-self: flex-start;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 10px 10px 10px 3px;
  background: var(--o-100);
  color: var(--orange-ink);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
  max-width: 100%;
}

/* Trait orange qui balaie le bas de la fiche au survol */
.cb-channels__list li::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.cb-channels__list li:hover::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  .cb-bubble {
    opacity: 0;
    animation: cb-bubble-in 10s ease-out infinite;
  }

  .cb-channels__list li:nth-child(2) .cb-bubble { animation-delay: 2s; }
  .cb-channels__list li:nth-child(3) .cb-bubble { animation-delay: 4s; }
  .cb-channels__list li:nth-child(4) .cb-bubble { animation-delay: 6s; }
  .cb-channels__list li:nth-child(5) .cb-bubble { animation-delay: 8s; }
}

@keyframes cb-bubble-in {
  0% { opacity: 0; transform: translateY(8px) scale(0.96); }
  4%, 34% { opacity: 1; transform: none; }
  40%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   À la voix : conversation d'exemple
   -------------------------------------------------------------------------- */

.cb-voice {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.cb-voice h2 {
  margin-bottom: 18px;
}

.cb-voice__list {
  margin-top: 24px;
}

.cb-chat {
  margin: 0;
  text-align: center;
}

.cb-chat__phone {
  text-align: left;
}

.cb-chat__phone {
  max-width: 380px;
  margin-inline: auto;
  overflow: hidden;
  background: #F1F5F9;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  box-shadow: 0 36px 60px -34px rgba(15, 23, 42, 0.4), 0 6px 16px -8px rgba(15, 23, 42, 0.15);
  font-size: 14.5px;
  line-height: 1.5;
}

.cb-chat__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.cb-chat__bar img {
  border-radius: 6px;
}

.cb-chat__bar span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.cb-chat__bar small {
  color: var(--fg-3);
  font-size: 12.5px;
}

.cb-chat__thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px 22px;
}

.cb-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 86%;
  padding: 12px 14px 8px;
  border-radius: 18px;
}

.cb-msg--me {
  align-self: flex-end;
  background: var(--o-100);
  border-bottom-right-radius: 6px;
}

.cb-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.cb-msg__transcript {
  color: var(--fg-2);
  font-size: 13.5px;
  font-style: italic;
}

.cb-msg__time {
  align-self: flex-end;
  color: var(--fg-3);
  font-size: 11.5px;
}

.cb-voice-note {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cb-voice-note__play {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
}

.cb-voice-note__play svg {
  width: 18px;
  height: 18px;
}

.cb-voice-note__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}

.cb-voice-note__wave i {
  width: 3px;
  height: 40%;
  border-radius: 2px;
  background: var(--orange-ink);
  opacity: 0.75;
}

/* Hauteurs variées pour dessiner une onde vocale */
.cb-voice-note__wave i:nth-child(3n) { height: 85%; }
.cb-voice-note__wave i:nth-child(3n + 1) { height: 55%; }
.cb-voice-note__wave i:nth-child(4n) { height: 100%; }
.cb-voice-note__wave i:nth-child(5n) { height: 30%; }

@media (prefers-reduced-motion: no-preference) {
  .cb-voice-note__wave i {
    animation: cb-wave 1.6s ease-in-out infinite;
  }

  .cb-voice-note__wave i:nth-child(2n) { animation-delay: -0.4s; }
  .cb-voice-note__wave i:nth-child(3n) { animation-delay: -0.8s; }
}

@keyframes cb-wave {
  50% { transform: scaleY(0.55); }
}

.cb-voice-note__time {
  color: var(--fg-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.cb-chat__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 4px;
}

.cb-chat__actions span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.cb-chat__actions .ticket__reject {
  background: #fff;
}

/* --------------------------------------------------------------------------
   Sans configuration : fichiers techniques contre une phrase
   -------------------------------------------------------------------------- */

.cb-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  margin-bottom: clamp(48px, 6vw, 80px);
}

.cb-compare__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-lg);
}

.cb-compare__side--before {
  background: var(--paper);
  border: 1px dashed var(--line-2);
}

.cb-compare__side--after {
  background: linear-gradient(180deg, var(--o-50) 0%, #fff 70%);
  border: 2px solid var(--orange);
  box-shadow: var(--shadow);
}

.cb-compare__label {
  color: var(--fg-3);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cb-files {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.cb-files li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: rgba(180, 35, 24, 0.45);
}

.cb-files li::before {
  content: '×';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--r-100);
  color: #B42318;
  font-weight: 700;
  line-height: 1;
}

.cb-compare__quote {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.cb-compare__result {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  color: var(--fg-2);
}

.cb-compare__result svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--green);
}

/* --------------------------------------------------------------------------
   Captures de l'application
   -------------------------------------------------------------------------- */

.cb-screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.cb-screen {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
}

.cb-screen img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--line-2);
  border-radius: 26px;
  box-shadow: 0 36px 60px -34px rgba(15, 23, 42, 0.4), 0 6px 16px -8px rgba(15, 23, 42, 0.15);
}

.cb-screen figcaption {
  text-align: center;
}

.cb-screen h3 {
  margin-bottom: 8px;
}

.cb-screen p {
  color: var(--fg-2);
}

.cb-screens__caption {
  margin-top: 22px;
  color: var(--fg-3);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Exemples d'équipes
   -------------------------------------------------------------------------- */

.cb-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.cb-example {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.cb-example__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.cb-example__head .icon {
  margin: 0;
}

.cb-example__head h3 {
  margin-bottom: 6px;
  font-size: clamp(1.25rem, 1.8vw, 1.45rem);
}

.cb-example__head p {
  color: var(--fg-2);
}

/* Le travail qui passe d'un assistant à l'autre : étapes reliées */
.cb-flow {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  counter-reset: cb-step;
}

.cb-flow li {
  position: relative;
  padding: 0 0 20px 50px;
  counter-increment: cb-step;
}

.cb-flow li:last-child {
  padding-bottom: 0;
}

.cb-flow li::before {
  content: counter(cb-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--o-100);
  color: var(--orange-ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.cb-flow li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 38px;
  bottom: 4px;
  left: 15px;
  width: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(180deg, var(--orange) 0 6px, transparent 6px 11px);
  opacity: 0.55;
}

/* La dernière étape est le livrable : elle prend la couleur pleine */
.cb-flow li:last-child::before {
  background: var(--orange);
  color: var(--ink);
}

.cb-flow--blue li::before {
  background: var(--b-100);
  color: var(--blue-ink);
}

.cb-flow--blue li:not(:last-child)::after {
  background: repeating-linear-gradient(180deg, var(--blue) 0 6px, transparent 6px 11px);
}

.cb-flow--blue li:last-child::before {
  background: var(--blue);
  color: #fff;
}

.cb-flow h4 {
  margin-bottom: 2px;
  padding-top: 4px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cb-flow p {
  color: var(--fg-2);
}

.cb-example__limit {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 0.95rem;
}

.cb-example__limit strong {
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   Garde-fous
   -------------------------------------------------------------------------- */

.cb-trust {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.cb-trust h2 {
  margin-bottom: 18px;
}

.cb-checklist {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.cb-checklist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg-2);
}

.cb-checklist .icon {
  margin: 0;
}

.cb-checklist strong {
  color: #fff;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   Offres
   -------------------------------------------------------------------------- */

/* Sur site (le moins cher) à gauche, Cloud au centre et plus large, Accompagné à droite */
.cb-offers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
  align-items: stretch;
}

.cb-offer.cb-offer--featured {
  padding: clamp(28px, 3vw, 38px);
  box-shadow: 0 36px 60px -34px rgba(255, 122, 0, 0.55), var(--shadow);
}

.cb-offer--featured .cb-offer__price {
  font-size: clamp(2.3rem, 3.2vw, 2.8rem);
}

.cb-offer--featured .cb-offer__badge {
  background: var(--orange);
  color: var(--ink);
}

.cb-offer.cb-offer--plus {
  border: 2px solid var(--blue);
  background: linear-gradient(180deg, var(--b-50) 0%, #fff 55%);
}

.cb-offer__badge.cb-offer__badge--blue {
  background: var(--blue);
}

.btn--blue {
  background: var(--blue);
  color: #fff;
}

.btn--blue:hover {
  background: var(--blue-ink);
}

/* Les autres offres restent sobres : la carte sur site est en retrait */
.cb-offer:not(.cb-offer--featured):not(.cb-offer--plus) {
  background: var(--paper);
  box-shadow: none;
}

.cb-scale {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: clamp(20px, 2.6vw, 30px);
  padding: clamp(20px, 2.6vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.cb-scale .icon {
  margin: 0;
}

.cb-scale h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.cb-scale p {
  color: var(--fg-2);
}

.cb-offer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 2.4vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.cb-offer.cb-offer--featured {
  border: 2px solid var(--orange);
  background: linear-gradient(180deg, var(--o-50) 0%, #fff 55%);
}

.cb-offer__badge {
  position: absolute;
  top: -13px;
  left: clamp(22px, 2.4vw, 28px);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
}

.cb-offer h3 {
  font-size: 1.15rem;
}

@media (min-width: 1081px) {
  .cb-offer h3 {
    white-space: nowrap;
  }
}

.cb-offer__for {
  min-height: 3.2em;
  color: var(--fg-2);
  font-size: 0.97rem;
}

.cb-offer__price {
  margin-top: 6px;
  font-size: clamp(1.9rem, 2.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.cb-offer__tax {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fg-3);
}

.cb-offer__terms {
  min-height: 3.2em;
  color: var(--fg-3);
  font-size: 0.9rem;
}

.cb-offer .tick-list {
  margin: 8px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.cb-offer .btn {
  margin-top: auto;
}

.cb-offers__note {
  max-width: 80ch;
  margin-top: 22px;
  color: var(--fg-3);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Questions
   -------------------------------------------------------------------------- */

.cb-faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.cb-faq__list {
  display: grid;
  gap: 10px;
}

.cb-faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.cb-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.cb-faq summary::after {
  content: '+';
  flex-shrink: 0;
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
}

.cb-faq details[open] summary::after {
  content: '−';
}

.cb-faq summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--r-md);
}

.cb-faq details p {
  padding: 0 22px 20px;
  color: var(--fg-2);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .cb-offers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }

  .cb-offer.cb-offer--featured {
    grid-column: 1 / -1;
    order: -1;
  }

  .cb-trust,
  .cb-faq,
  .cb-voice,
  .cb-channels {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .cb-when,
  .cb-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb-channels__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb-scale {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb-screens {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .cb-screen img {
    max-width: 260px;
  }

  .cb-examples {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .cb-channels__list,
  .cb-offers {
    grid-template-columns: minmax(0, 1fr);
  }

  .cb-offer__for,
  .cb-offer__terms {
    min-height: 0;
  }

  .cb-example__head {
    grid-template-columns: minmax(0, 1fr);
  }
}
