.ica-advisor {
  --ica-ink: #17333b;
  --ica-muted: #5a7077;
  --ica-surface: #f6faf8;
  --ica-brand: #207c72;
  --ica-brand-dark: #155e56;
  --ica-border: #d7e5e1;
  --ica-warm: #fff4df;
  box-sizing: border-box;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--ica-border);
  border-radius: 24px;
  background: #fff;
  color: var(--ica-ink);
  box-shadow: 0 12px 35px rgba(22, 70, 65, .08);
}

.ica-advisor *, .ica-advisor *::before, .ica-advisor *::after { box-sizing: border-box; }
.ica-advisor__intro { max-width: 690px; }
.ica-advisor__eyebrow { margin: 0 0 8px; color: var(--ica-brand); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ica-advisor h2 { margin: 0 0 12px; color: var(--ica-ink); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.12; }
.ica-advisor__intro > p:not(.ica-advisor__eyebrow) { margin: 0 0 12px; line-height: 1.55; }
.ica-advisor__privacy { padding: 12px 14px; border-left: 3px solid var(--ica-brand); border-radius: 0 9px 9px 0; background: var(--ica-surface); color: var(--ica-muted); font-size: .9rem; }
.ica-advisor__details { margin: 14px 0 0; color: var(--ica-muted); font-size: .88rem; }
.ica-advisor__details summary { cursor: pointer; font-weight: 700; color: var(--ica-brand-dark); }
.ica-advisor__details p { margin: 8px 0 0; line-height: 1.5; }
.ica-quota__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 0; }
.ica-quota__login { color: var(--ica-brand-dark); font-weight: 700; }
.ica-advisor__status { min-height: 28px; margin: 18px 0 2px; }
.ica-advisor__limit { display: inline-block; margin: 0; padding: 6px 10px; border-radius: 999px; background: #e7f4ef; color: var(--ica-brand-dark); font-size: .88rem; font-weight: 700; }
.ica-advisor__messages { display: grid; gap: 14px; margin: 18px 0; }
.ica-message { max-width: 92%; padding: 16px 18px; border-radius: 16px; }
.ica-message--user { justify-self: end; background: var(--ica-brand); color: #fff; border-bottom-right-radius: 4px; }
.ica-message--assistant, .ica-message--quota { background: var(--ica-surface); border-bottom-left-radius: 4px; }
.ica-message--safety { max-width: 100%; background: #fff4f2; border: 1px solid #efc5bd; }
.ica-message--support { max-width: 100%; background: #fffaf3; border: 1px solid #f1dcc0; }
.ica-message--support .ica-safety-item { padding: 9px 11px; }
.ica-message__label { margin: 0 0 7px; font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .82; }
.ica-message__body { margin: 0; line-height: 1.5; }
.ica-advisor__form { padding-top: 8px; border-top: 1px solid var(--ica-border); }
.ica-advisor textarea { display: block; width: 100%; min-height: 112px; padding: 14px; border: 1px solid #b9cfca; border-radius: 12px; color: var(--ica-ink); font: inherit; line-height: 1.45; resize: vertical; }
.ica-advisor textarea:focus { outline: 3px solid rgba(32, 124, 114, .22); border-color: var(--ica-brand); }
.ica-advisor__form-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; }
.ica-advisor__form-footer p { margin: 0; color: var(--ica-muted); font-size: .83rem; }
.ica-advisor__submit, .ica-quota__cta, .ica-tool-card__link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 15px; border: 0; border-radius: 10px; background: var(--ica-brand); color: #fff !important; font: inherit; font-weight: 800; line-height: 1.1; text-decoration: none !important; cursor: pointer; }
.ica-advisor__submit:hover, .ica-quota__cta:hover, .ica-tool-card__link:hover { background: var(--ica-brand-dark); }
.ica-advisor__submit:disabled { cursor: wait; opacity: .65; }
.ica-tool-list { display: grid; gap: 12px; margin-top: 16px; }
.ica-tool-card { padding: 17px; border: 1px solid var(--ica-border); border-radius: 13px; background: #fff; }
.ica-tool-card__title { margin: 0; font-size: 1.1rem; }
.ica-tool-card__title a { color: var(--ica-brand-dark); text-decoration-thickness: 1px; }
.ica-tool-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.ica-tool-card__format { color: var(--ica-muted); font-size: .84rem; font-weight: 700; text-transform: capitalize; }
.ica-tool-card__price { padding: 3px 9px; border-radius: 999px; background: var(--ica-warm); color: var(--ica-ink); font-size: .84rem; font-weight: 800; }
.ica-tool-card__price--free { background: #e7f4ef; color: var(--ica-brand-dark); }
.ica-tool-card__why { margin: 12px 0 0; line-height: 1.48; }
.ica-tool-card__steps-title { margin: 15px 0 5px; font-weight: 800; }
.ica-tool-card__steps { margin: 0 0 15px 19px; padding: 0; line-height: 1.45; }
.ica-tool-card__steps li + li { margin-top: 4px; }
.ica-tool-card__link { min-height: 36px; padding: 8px 11px; font-size: .9rem; }
.ica-safety-list { display: grid; gap: 9px; margin-top: 13px; }
.ica-safety-item { display: grid; gap: 3px; padding: 11px 12px; border-radius: 10px; background: #fff; color: var(--ica-ink); text-decoration: none; }
.ica-safety-item:hover { outline: 2px solid #d97e6b; }
.ica-safety-item span { font-size: .92rem; line-height: 1.4; }
.ica-advisor__error { margin: 0; padding: 12px 14px; border-radius: 10px; background: #fff4f2; color: #95372c; font-weight: 600; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 560px) {
  .ica-advisor { border-radius: 16px; }
  .ica-message { max-width: 100%; }
  .ica-advisor__form-footer { align-items: stretch; flex-direction: column; }
  .ica-advisor__submit { width: 100%; }
}

/* Thinking indicator (mascot at the laptop) */
.ica-message--thinking { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ica-surface); border-bottom-left-radius: 4px; }
/* Intervo typing: base + two hands tapping in turn + sparks. */
.ica-typing { position: relative; flex: none; width: 128px; aspect-ratio: 320 / 281; animation: ica-bob 1.6s ease-in-out infinite; }
.ica-typing img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; }
.ica-typing__hand { animation: ica-tap .34s ease-in-out infinite; }
.ica-typing__hand--right { animation-delay: -.17s; }
.ica-typing__sparks { transform-origin: 40% 72%; animation: ica-sparks .68s ease-out infinite; }
@keyframes ica-tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.4%); } }
@keyframes ica-sparks { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1); } 55%, 100% { opacity: 0; transform: scale(1.12); } }
@keyframes ica-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5%); } }
.ica-thinking__text { margin: 0; color: var(--ica-muted); font-weight: 700; }
.ica-thinking__dots::after { content: '…'; display: inline-block; width: 1.2em; animation: ica-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes ica-dots { 0% { width: 0; } 100% { width: 1.2em; } }

/* Compact advisor inside the bubble panel */
.ica-advisor--compact { max-width: none; margin: 0; padding: 16px 16px 0; border: 0; border-radius: 0; box-shadow: none; font-size: .95rem; }
.ica-advisor--compact .ica-advisor__intro { text-align: center; }
.ica-advisor--compact .ica-advisor__mascot { display: block; width: 150px; height: auto; margin: 0 auto 6px; transition: width .3s ease, margin .3s ease; }
.ica-advisor--compact, .ica-advisor--compact h2, .ica-advisor--compact .ica-advisor__intro > p { transition: padding .3s ease, font-size .3s ease, margin .3s ease; }
.ica-advisor--compact h2 { font-size: 1.3rem; margin-bottom: 8px; }
.ica-advisor--compact .ica-advisor__intro > p:not(.ica-advisor__eyebrow) { font-size: .93rem; }
.ica-advisor--compact .ica-advisor__privacy { text-align: left; font-size: .82rem; }
.ica-advisor--compact .ica-advisor__details { font-size: .82rem; }
.ica-advisor--compact.ica-advisor--started .ica-advisor__intro { display: none; }
.ica-advisor--compact .ica-advisor__status { margin-top: 10px; min-height: 0; }
.ica-advisor--compact .ica-advisor__messages { margin: 12px 0; }
.ica-advisor--compact .ica-message { padding: 12px 14px; }
.ica-advisor--compact .ica-tool-card { padding: 14px; }
.ica-advisor--compact .ica-advisor__form { position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 16px 14px; background: #fff; }
.ica-advisor--compact textarea { min-height: 76px; }
.ica-advisor--compact .ica-advisor__form-footer p { display: none; }
.ica-advisor--compact .ica-advisor__form-footer { justify-content: flex-end; }

/* Floating bubble */
.ica-bubble { --ica-ink: #17333b; --ica-brand: #207c72; --ica-brand-dark: #155e56; --ica-pink: #f6b9c9; position: fixed; bottom: 22px; z-index: 99990; font-family: inherit; color: var(--ica-ink); }
.ica-bubble--left { left: 22px; }
.ica-bubble--right { right: 22px; }
/* Open panel sits above the floating cart button (z-index 9999997). */
.ica-bubble.is-open, .ica-bubble.is-active { z-index: 10000000; }
.ica-bubble *, .ica-bubble *::before, .ica-bubble *::after { box-sizing: border-box; }
.ica-bubble [hidden] { display: none !important; }
.ica-bubble__launcher { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 18px 4px 4px; border: 2px solid var(--ica-pink); border-radius: 999px; background: #fff; color: var(--ica-brand-dark); font: inherit; font-size: .95rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 8px 24px rgba(23, 51, 59, .18); transition: transform .2s ease, box-shadow .2s ease; }
.ica-bubble__launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(23, 51, 59, .22); background: #fff; color: var(--ica-brand-dark); }
.ica-bubble__launcher:focus-visible { outline: 3px solid rgba(32, 124, 114, .45); outline-offset: 3px; }
.ica-avatar { position: relative; display: block; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #fff4f7; }
.ica-avatar img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); max-width: none; margin: 0; }
.ica-avatar__arm { transform-origin: 98% 62.5%; }
.ica-bubble button.ica-bubble__launcher { overflow: visible !important; }
/* Hello: a little hop and a wave of the hand. */
.ica-bubble.is-waving .ica-avatar { animation: ica-hop 1s ease-in-out 2; }
.ica-bubble.is-waving .ica-avatar__arm { animation: ica-wave 2.4s ease-in-out 1; }
@keyframes ica-hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-14%) rotate(-4deg); } 55% { transform: translateY(0); } 72% { transform: translateY(-5%); } }
@keyframes ica-wave { 0% { transform: rotate(0); } 16% { transform: rotate(-196deg); } 28% { transform: rotate(-174deg); } 40% { transform: rotate(-212deg); } 52% { transform: rotate(-176deg); } 64% { transform: rotate(-210deg); } 78% { transform: rotate(-196deg); } 100% { transform: rotate(0); } }
.ica-bubble__label { display: inline-block; max-width: 160px; overflow: hidden; white-space: nowrap; opacity: 1; }
.ica-bubble__launcher { gap: 0 !important; }
.ica-bubble__launcher .ica-bubble__label { margin-left: 8px; }
.ica-bubble.is-open .ica-bubble__label { max-width: 0; opacity: 0; margin-left: 0; }
.ica-bubble.is-open .ica-bubble__launcher { padding: 4px; }

.ica-bubble__teaser { position: absolute; bottom: calc(100% + 12px); width: 270px; padding: 14px 34px 14px 16px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(23, 51, 59, .2); cursor: pointer; opacity: 0; transform: translateY(8px); transition: opacity .26s ease, transform .26s ease; }
.ica-bubble__teaser.is-visible { opacity: 1; transform: none; }
.ica-bubble--left .ica-bubble__teaser { left: 0; }
.ica-bubble--right .ica-bubble__teaser { right: 0; }
.ica-bubble__teaser p { margin: 0; font-size: .9rem; line-height: 1.45; }
.ica-bubble__hello-title { margin-bottom: 2px !important; font-weight: 800; color: #cb4d61; font-size: 1rem !important; }
.ica-bubble__hello-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ica-bubble button.ica-bubble__hello-yes, .ica-bubble button.ica-bubble__hello-no { min-height: 0 !important; padding: 8px 12px !important; border-radius: 999px !important; font-family: inherit !important; font-size: .85rem !important; font-weight: 700 !important; line-height: 1.1 !important; text-transform: none !important; cursor: pointer; box-shadow: none !important; }
.ica-bubble button.ica-bubble__hello-yes { border: 0 !important; background: #cb4d61 !important; color: #fff !important; }
.ica-bubble button.ica-bubble__hello-yes:hover { background: #b23c50 !important; }
.ica-bubble button.ica-bubble__hello-no { border: 1px solid #d9c4ca !important; background: #fff !important; color: #5a7077 !important; }
.ica-bubble button.ica-bubble__hello-no:hover { background: #faf3f5 !important; color: var(--ica-ink) !important; }
/* Speech-bubble tail pointing at Intervo */
.ica-bubble__teaser::after { content: ''; position: absolute; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(23, 51, 59, .08); }
.ica-bubble--left .ica-bubble__teaser::after { left: 26px; }
.ica-bubble--right .ica-bubble__teaser::after { right: 26px; }
.ica-bubble__teaser-close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #5a7077; font-size: 18px; line-height: 1; cursor: pointer; }
.ica-bubble__teaser-close:hover { background: #f1f5f4; color: var(--ica-ink); }

.ica-bubble__panel { position: absolute; bottom: calc(100% + 12px); display: flex; flex-direction: column; width: 410px; height: min(660px, calc(100vh - 130px)); overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 18px 50px rgba(23, 51, 59, .28); opacity: 0; transform: translateY(14px) scale(.97); transform-origin: bottom left; transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .3, 1); }
.ica-bubble--right .ica-bubble__panel { transform-origin: bottom right; }
.ica-bubble__panel.is-visible { opacity: 1; transform: none; }
.ica-bubble--left .ica-bubble__panel { left: 0; }
.ica-bubble--right .ica-bubble__panel { right: 0; }
.ica-bubble__head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #fff4f7; border-bottom: 1px solid #f7dbe3; }
.ica-bubble__head img { width: 40px; height: 40px; flex: none; }
.ica-bubble__head-text { flex: 1; min-width: 0; }
.ica-bubble__title { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.2; color: var(--ica-ink); }
.ica-bubble__subtitle { margin: 2px 0 0; font-size: .8rem; color: #5a7077; line-height: 1.2; }
.ica-bubble__close { width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ica-ink); font-size: 24px; line-height: 1; cursor: pointer; }
.ica-bubble__close:hover, .ica-bubble__close:focus-visible { background: #fbe3ea; color: var(--ica-ink); }
.ica-bubble__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

@keyframes ica-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .ica-bubble { bottom: 16px; }
  .ica-bubble--left { left: 16px; }
  .ica-bubble--right { right: 16px; }
  .ica-bubble__launcher { padding: 3px; }
  .ica-avatar { width: 50px; height: 50px; }
  .ica-bubble__hello-actions { display: none; }
  .ica-bubble__teaser { padding: 12px 32px 12px 14px; }
  .ica-bubble__label { display: none !important; }
  .ica-bubble__teaser { width: min(270px, calc(100vw - 32px)); }
  .ica-bubble__panel { position: fixed; top: 0; right: 0; bottom: auto; left: 0; width: 100%; height: 100%; border-radius: 0; transform: translateY(18px); }
  .ica-bubble__panel.is-visible { transform: none; }
  /* Keyboard open: a smaller Intervo, so the greeting and the text box stay in view. */
  .ica-bubble.is-typing .ica-advisor__mascot { width: 84px; margin-bottom: 2px; }
  .ica-bubble.is-typing .ica-advisor__learning { display: none; }
  .ica-bubble.is-typing .ica-advisor--compact { padding-top: 10px; }
  .ica-bubble.is-typing .ica-advisor--compact h2 { font-size: 1.15rem; margin-bottom: 4px; }
  .ica-bubble.is-typing .ica-advisor--compact .ica-advisor__intro > p { margin-bottom: 4px; font-size: .88rem; }
  .ica-bubble.is-typing .ica-advisor--compact .ica-advisor__status { margin-top: 4px; }
  .ica-advisor--compact .ica-advisor__mascot { width: 110px; }
  /* The brain stays put under the full-screen panel: no fade of its own. */
  .ica-bubble__panel { z-index: 2; }
  .ica-bubble__launcher { position: relative; z-index: 1; }
  .ica-advisor--compact .ica-advisor__form { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  html.ica-bubble-lock, html.ica-bubble-lock body { overflow: hidden !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ica-bubble__launcher, .ica-bubble__teaser, .ica-bubble__panel, .ica-bubble__label, .ica-advisor--compact, .ica-advisor--compact * { transition: none !important; animation: none; }
  .ica-bubble__panel, .ica-bubble__teaser { transform: none !important; }
  .ica-thinking__dots::after { animation: none; }
  .ica-typing, .ica-typing__hand, .ica-typing__sparks, .ica-bubble.is-waving .ica-avatar, .ica-bubble.is-waving .ica-avatar__arm { animation: none; }
}

/* The theme styles every <button> (pink background, 20px radius): reset ours. */
.ica-bubble button.ica-bubble__launcher { border: 2px solid var(--ica-pink) !important; border-radius: 999px !important; background: #fff !important; color: #cb4d61 !important; font-family: inherit !important; font-size: .95rem !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
.ica-bubble button.ica-bubble__launcher:hover, .ica-bubble button.ica-bubble__launcher:focus { background: #fff !important; color: #b23c50 !important; }
.ica-bubble button.ica-bubble__close, .ica-bubble button.ica-bubble__teaser-close { border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--ica-ink) !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; }
.ica-bubble button.ica-bubble__close:hover, .ica-bubble button.ica-bubble__close:focus-visible { background: #fbe3ea !important; }
.ica-bubble button.ica-bubble__teaser-close:hover { background: #f1f5f4 !important; }

/* Tool hero image (whole image visible, portrait posters and square kits alike). */
.ica-tool-card__media { display: block; margin: 0 0 12px; border-radius: 10px; background: #f7f4f0; overflow: hidden; text-decoration: none !important; }
.ica-tool-card__image { display: block; width: 100%; height: 240px; object-fit: contain; }
.ica-advisor--compact .ica-tool-card__image { height: 210px; }
.ica-tool-card__media:hover .ica-tool-card__image { transform: scale(1.02); transition: transform .2s ease; }

/* Trial launch: "En apprentissage" pill and the learning note. */
.ica-learning-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #fde7ee; color: #b23c50; font-size: .68rem; font-weight: 800; letter-spacing: .02em; text-transform: none; vertical-align: middle; }
.ica-advisor__learning { margin: 0 auto 8px !important; padding: 8px 12px; max-width: 330px; border-radius: 12px; background: #fff4f7; color: #8a3a4a; font-size: .86rem !important; line-height: 1.4; }

/* A site popup (cookie consent, promotion) is open: Intervo steps aside. */
.ica-bubble.is-under-popup { display: none !important; }

/* "Ces suggestions vous aident?" */
.ica-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ica-border, #d7e5e1); }
.ica-feedback__question { margin: 0; font-weight: 700; font-size: .9rem; }
.ica-feedback__buttons { display: flex; gap: 8px; }
.ica-advisor button.ica-feedback__button { min-height: 0 !important; padding: 6px 12px !important; border: 1px solid #d9c4ca !important; border-radius: 999px !important; background: #fff !important; color: var(--ica-ink, #17333b) !important; font-family: inherit !important; font-size: .85rem !important; font-weight: 700 !important; line-height: 1.2 !important; text-transform: none !important; box-shadow: none !important; cursor: pointer; }
.ica-advisor button.ica-feedback__button:hover { background: #fff4f7 !important; border-color: #cb4d61 !important; }
.ica-feedback__thanks { margin: 0; color: #8a3a4a; font-weight: 700; font-size: .9rem; }
