/* Chat en ligne Capurso — bulle + fenêtre (aperçu, réponse de démonstration). Aux couleurs du site. */
.cc-chat { --cc-accent: var(--jaune, #f5b400); --cc-accent-2: var(--jaune-fonce, #d99c00); --cc-dark: var(--noir, #141414);
  --cc-side: 20px; font-family: var(--texte, system-ui, sans-serif); }
.cc-chat[data-pos="left"] .cc-btn, .cc-chat[data-pos="left"] .cc-win { right: auto; left: max(var(--cc-side), env(safe-area-inset-left)); }
.cc-btn { position: fixed; z-index: 95; right: max(var(--cc-side), env(safe-area-inset-right)); bottom: max(var(--cc-side), env(safe-area-inset-bottom));
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: var(--cc-accent); color: var(--cc-dark);
  display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(20,20,20,.45), 0 0 0 0 rgba(245,180,0,.55);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3), box-shadow .3s, background .2s; animation: cc-pop .6s cubic-bezier(.2,.9,.3,1.4) .8s both, cc-pulse 2.6s ease-out 2s 2; -webkit-tap-highlight-color: transparent; }
.cc-btn:hover { transform: translateY(-3px) scale(1.05); background: var(--cc-accent-2); }
.cc-btn:focus-visible { outline: 3px solid var(--cc-dark); outline-offset: 3px; }
.cc-btn svg { width: 28px; height: 28px; transition: transform .35s, opacity .25s; }
.cc-btn .cc-x { position: absolute; opacity: 0; transform: rotate(-90deg) scale(.6); }
.cc-open .cc-btn .cc-ico { opacity: 0; transform: rotate(90deg) scale(.6); }
.cc-open .cc-btn .cc-x { opacity: 1; transform: none; }
.cc-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brique, #b4532a); color: #fff;
  font: 700 12px/20px var(--texte, sans-serif); text-align: center; border: 2px solid #fff; transform: scale(0); transition: transform .3s cubic-bezier(.2,.9,.3,1.4); }
.cc-badge.on { transform: scale(1); }
.cc-teaser { position: fixed; z-index: 95; right: calc(max(var(--cc-side), env(safe-area-inset-right)) + 72px); bottom: calc(max(var(--cc-side), env(safe-area-inset-bottom)) + 8px);
  max-width: 230px; padding: 10px 14px; background: #fff; color: var(--cc-dark); border-radius: 14px 14px 4px 14px; font-size: 14px; line-height: 1.35;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .35s, transform .35s; pointer-events: none; }
.cc-teaser.on { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.cc-chat[data-pos="left"] .cc-teaser { right: auto; left: calc(max(var(--cc-side), env(safe-area-inset-left)) + 72px); border-radius: 14px 14px 14px 4px; }

.cc-win { position: fixed; z-index: 96; right: max(var(--cc-side), env(safe-area-inset-right)); bottom: calc(max(var(--cc-side), env(safe-area-inset-bottom)) + 76px);
  width: 370px; height: min(560px, calc(100vh - 130px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 30px 70px -20px rgba(20,20,20,.5), 0 0 0 1px rgba(20,20,20,.06);
  opacity: 0; transform: translateY(24px) scale(.94); transform-origin: bottom right; filter: blur(6px); visibility: hidden;
  transition: opacity .32s ease, transform .42s cubic-bezier(.2,.9,.3,1.15), filter .32s, visibility 0s .42s; }
.cc-open .cc-win { opacity: 1; transform: none; filter: none; visibility: visible; transition-delay: 0s; }
.cc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: var(--cc-head, var(--cc-dark)); color: var(--cc-head-fg, #fff); padding-top: 16px; }
.cc-av { width: 42px; height: 42px; border-radius: 50%; background: var(--cc-accent); display: grid; place-items: center; flex: none; position: relative; }
.cc-av img { width: 28px; height: 28px; }
.cc-av::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #3ccf6e; border: 2px solid var(--cc-dark); }
.cc-head b { display: block; font: 700 18px/1.1 var(--titre, sans-serif); letter-spacing: .02em; text-transform: uppercase; }
.cc-head small { display: block; font-size: 13px; opacity: .75; margin-top: 2px; }
.cc-close { margin-left: auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .3s; }
.cc-close:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }
.cc-close svg { width: 18px; height: 18px; }
.cc-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, rgba(244,241,234,.7), rgba(255,255,255,.4)); }
.cc-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.4; word-wrap: break-word; white-space: pre-wrap;
  animation: cc-in .38s cubic-bezier(.2,.9,.3,1.2) both; }
.cc-msg.bot { align-self: flex-start; background: #fff; color: var(--cc-dark); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px -4px rgba(0,0,0,.2); }
.cc-msg.me { align-self: flex-end; background: var(--cc-accent); color: var(--cc-dark); border-bottom-right-radius: 4px; }
.cc-msg time { display: block; font-size: 11px; opacity: .55; margin-top: 4px; }
.cc-note { align-self: center; font-size: 12px; color: var(--gris, #6b6b6b); text-align: center; padding: 2px 10px; }
.cc-typing { align-self: flex-start; background: #fff; border-radius: 16px; padding: 12px 14px; display: flex; gap: 4px; animation: cc-in .3s both; }
.cc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gris, #6b6b6b); animation: cc-dot 1s infinite; }
.cc-typing i:nth-child(2) { animation-delay: .15s; } .cc-typing i:nth-child(3) { animation-delay: .3s; }
.cc-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-quick button { border: 1.5px solid var(--cc-dark); background: transparent; color: var(--cc-dark); border-radius: 20px; padding: 7px 12px; font: 600 14px var(--texte, sans-serif); cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.cc-quick button:hover { background: var(--cc-dark); color: #fff; transform: translateY(-1px); }
.cc-id { display: grid; gap: 8px; background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px -6px rgba(0,0,0,.3); animation: cc-in .38s both; }
.cc-id p { margin: 0; font-size: 14px; }
.cc-id input { width: 100%; box-sizing: border-box; }
.cc-id button { justify-self: start; }
.cc-chat input, .cc-chat textarea { font: 16px/1.35 var(--texte, sans-serif); color: var(--cc-dark); border: 1.5px solid var(--ligne, #e3ded3); border-radius: 12px; padding: 10px 12px; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.cc-chat input:focus, .cc-chat textarea:focus { border-color: var(--cc-accent); box-shadow: 0 0 0 3px rgba(245,180,0,.25); }
.cc-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(20,20,20,.08); background: #fff; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.cc-foot textarea { flex: 1; resize: none; max-height: 120px; min-height: 44px; }
.cc-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cc-accent); color: var(--cc-dark); cursor: pointer; display: grid; place-items: center; transition: transform .2s, background .2s, opacity .2s; }
.cc-send:hover { background: var(--cc-accent-2); transform: scale(1.06); }
.cc-send:disabled { opacity: .45; cursor: default; transform: none; }
.cc-send svg { width: 20px; height: 20px; }
.cc-btn-txt { background: var(--cc-dark); color: #fff; border: 0; border-radius: 22px; padding: 10px 18px; font: 700 14px var(--texte, sans-serif); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.cc-btn-txt:hover { background: #000; }
.cc-legal { font-size: 11px; color: var(--gris, #6b6b6b); text-align: center; padding: 0 12px 8px; background: #fff; margin: 0; }
.cc-legal a { color: inherit; }

/* Mobile : plein écran, clavier iOS sans zoom (16 px), encoche */
@media (max-width: 560px) {
  .cc-win { inset: 0; width: auto; height: auto; height: 100dvh; border-radius: 0; transform: translateY(40px); transform-origin: bottom center; }
  .cc-head { padding-top: max(16px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .cc-open .cc-btn, .cc-open .cc-teaser { opacity: 0; pointer-events: none; transform: scale(.6); }
  .cc-btn { width: 56px; height: 56px; }
  .cc-teaser { display: none; }
}
html.cc-lock, html.cc-lock body { overflow: hidden; }

@keyframes cc-pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cc-pulse { 0% { box-shadow: 0 12px 30px -8px rgba(20,20,20,.45), 0 0 0 0 rgba(245,180,0,.55); } 70%, 100% { box-shadow: 0 12px 30px -8px rgba(20,20,20,.45), 0 0 0 18px rgba(245,180,0,0); } }
@keyframes cc-in { from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cc-dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cc-btn, .cc-msg, .cc-id, .cc-typing { animation: none !important; }
  .cc-win { transition: opacity .15s, visibility 0s .15s; transform: none !important; filter: none !important; }
}
@media print { .cc-chat { display: none; } }
/* Mode réel Novadesko : vérification + consentement (Anthony 11:40) */
.cc-id .cc-cap { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.cc-id .cc-cap input { width: 64px; flex: 0 0 auto; text-align: center; }
.cc-id .cc-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; color: #444; }
.cc-id .cc-ok input { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; padding: 0; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--cc-accent); }
.cc-id .cc-err { color: #b42318; font-size: 13px; min-height: 0; }
.cc-id .cc-err:empty { display: none; }
.cc-id button:disabled { opacity: .5; }

.cc-offmsg { margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.05); font-size: 14px; }
.cc-offline .cc-btn::after { content: ""; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; border: 2px solid #fff; }
.cc-offline .cc-av::after { background: #9ca3af; }
