.fc-conseiller-launcher {
  position: fixed;
  right: 30px;
  bottom: 178px;
  right: max(30px, env(safe-area-inset-right));
  bottom: calc(max(30px, env(safe-area-inset-bottom)) + 148px);
  z-index: 102;
  display: flex;
  min-width: 64px;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 6px 16px 6px 6px;
  background: var(--teal, #0F9D8C);
  box-shadow:
    0 18px 44px rgba(11, 111, 98, 0.28),
    0 0 0 5px rgba(15, 157, 140, 0.09);
  color: var(--on-teal, #052a25);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

/* Languette repliée : seul élément visible au repos (bord droit, fine) */
.fc-conseiller-tab {
  position: fixed;
  right: 0;
  bottom: 150px;
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 132px);
  z-index: 101;
  width: 24px;
  min-width: 24px;
  height: 104px;
  min-height: 104px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 0;
  background: rgba(15, 157, 140, 0.88);
  box-shadow: -6px 8px 22px rgba(11, 111, 98, 0.2);
  cursor: pointer;
}

.fc-conseiller-tab-chevron {
  width: 12px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Micro-flèche de repli : visible quand le K est déployé, à droite du badge */
.fc-conseiller-collapse {
  position: fixed;
  right: 2px;
  bottom: 199px;
  right: max(2px, env(safe-area-inset-right));
  bottom: calc(max(30px, env(safe-area-inset-bottom)) + 169px);
  z-index: 102;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 157, 140, 0.55);
  border-radius: 50%;
  padding: 0;
  background: #fff;
  box-shadow: 0 4px 10px rgba(20, 34, 79, 0.14);
  cursor: pointer;
}

.fc-conseiller-collapse svg {
  width: 9px;
  height: 13px;
  fill: none;
  stroke: #0B6F62;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-conseiller-tab[hidden],
.fc-conseiller-collapse[hidden] {
  display: none !important;
}

.fc-conseiller-launcher:hover {
  background: var(--teal-dark, #0B6F62);
  box-shadow:
    0 14px 34px rgba(11, 111, 98, 0.34),
    0 0 0 5px rgba(15, 157, 140, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.fc-conseiller-launcher:focus-visible,
.fc-conseiller-tab:focus-visible,
.fc-conseiller-collapse:focus-visible,
.fc-conseiller-window-close:focus-visible,
.fc-conseiller-action:focus-visible {
  outline: 2px solid var(--teal, #0F9D8C);
  outline-offset: 3px;
}

.fc-conseiller-launcher-mark {
  display: block;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  filter: drop-shadow(0 7px 12px rgba(20, 34, 79, 0.18));
}

.fc-k-mark {
  display: block;
  width: 100%;
  height: 100%;
}

.fc-conseiller-launcher-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.15;
}

.fc-conseiller-launcher-copy strong {
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.fc-conseiller-launcher-copy small {
  opacity: 0.82;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.fc-conseiller-launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
}

.fc-conseiller-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(14, 24, 54, 0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.fc-conseiller-backdrop[hidden] {
  display: none !important;
}

.formations-guided-panel.fc-conseiller-widget {
  position: fixed;
  right: 18px;
  bottom: 96px;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px);
  z-index: 101;
  display: none;
  width: min(460px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 132px));
  max-height: min(720px, calc(100dvh - 132px));
  margin: 0;
  border: 1px solid rgba(15, 157, 140, 0.42);
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  gap: 0;
  background: #fbfaf5;
  box-shadow:
    0 26px 72px rgba(20, 34, 79, 0.24),
    0 0 0 5px rgba(15, 157, 140, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.formations-guided-panel.fc-conseiller-widget::before {
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 2;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: rgba(91, 100, 115, 0.34);
  content: "";
  transform: translateX(-50%);
}

/* La poignée de glissement n'a de sens qu'en bottom sheet mobile */
@media (min-width: 701px) {
  .formations-guided-panel.fc-conseiller-widget::before {
    display: none;
  }
}

.formations-guided-panel.fc-conseiller-widget.is-open {
  display: flex;
  flex-direction: column;
}

.fc-conseiller-window-head {
  display: flex;
  min-height: 80px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(231, 225, 210, 0.92);
  padding: 22px 16px 14px 18px;
  background:
    radial-gradient(circle at 88% 0, rgba(217, 149, 33, 0.08), transparent 26%),
    linear-gradient(145deg, #fffefb 0%, #f7fbf9 100%);
}

.fc-conseiller-window-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.fc-conseiller-window-brand > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.15;
}

.fc-conseiller-window-brand strong {
  color: var(--navy, #14224F);
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.fc-conseiller-window-brand small {
  color: var(--teal-dark, #0B6F62);
  font-size: 0.82rem;
  font-weight: 800;
}

.fc-conseiller-window-status {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--teal, #0F9D8C);
  box-shadow: 0 0 0 8px rgba(15, 157, 140, 0.1);
}

.fc-conseiller-window-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line, #E7E1D2);
  border-radius: 16px;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(20, 34, 79, 0.07);
  color: var(--navy, #14224F);
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.fc-conseiller-window-close:hover {
  border-color: rgba(15, 157, 140, 0.45);
  background: rgba(15, 157, 140, 0.08);
  color: var(--teal-dark, #0B6F62);
}

.fc-conseiller-window-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.fc-conseiller-window-body {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  gap: 16px;
  padding: 18px 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 100% 10%, rgba(217, 149, 33, 0.055), transparent 24%),
    #fbfaf5;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 157, 140, 0.35) transparent;
}

.fc-conseiller-intro {
  display: grid;
  gap: 4px;
}

.fc-conseiller-intro-title {
  margin: 0;
  color: var(--navy, #14224F);
  font-size: 1.06rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.fc-conseiller-intro-copy {
  margin: 0;
  color: var(--slate, #5B6473);
  font-size: 0.78rem;
  line-height: 1.45;
}

.fc-conseiller-needs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fc-conseiller-action {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 96px;
  width: 100%;
  align-items: center;
  align-content: center;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  gap: 10px;
  border: 1px solid rgba(15, 157, 140, 0.26);
  border-radius: 18px;
  padding: 14px 12px;
  background:
    radial-gradient(circle at 96% 4%, rgba(217, 149, 33, 0.06), transparent 30%),
    rgba(255, 255, 255, 0.92);
  box-shadow:
    0 9px 22px rgba(20, 34, 79, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  color: var(--navy, #14224F);
  text-align: left;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.fc-conseiller-action:hover {
  border-color: rgba(15, 157, 140, 0.64);
  background:
    radial-gradient(circle at 96% 4%, rgba(217, 149, 33, 0.09), transparent 30%),
    #fff;
  box-shadow: 0 14px 30px rgba(11, 111, 98, 0.12);
  transform: translateY(-1px);
}

/* P2 V2 : dernier besoin choisi, conservé à la réouverture */
.fc-conseiller-action.is-last-used {
  border-color: rgba(15, 157, 140, 0.72);
  background:
    radial-gradient(circle at 96% 4%, rgba(217, 149, 33, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(225, 245, 239, 0.9), rgba(244, 251, 248, 0.9));
  box-shadow:
    0 0 0 3px rgba(15, 157, 140, 0.14),
    0 14px 30px rgba(11, 111, 98, 0.12);
}

/* P1 V2 : ring discret détachant le panneau du fond sur desktop */
.formations-guided-panel.fc-conseiller-widget.is-open:focus-visible {
  outline: 2px solid rgba(15, 157, 140, 0.5);
  outline-offset: 4px;
}

.fc-conseiller-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(15, 157, 140, 0.08);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(225, 245, 239, 0.98), rgba(244, 251, 248, 0.98));
}

.fc-conseiller-icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.fc-conseiller-label {
  min-width: 0;
  color: var(--navy, #14224F);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.28;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.fc-conseiller-chevron {
  display: grid;
  width: 16px;
  height: 22px;
  place-items: center;
  color: var(--teal-dark, #0B6F62);
}

.fc-conseiller-chevron svg {
  display: block;
  width: 16px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-conseiller-trust {
  display: grid;
  min-width: 0;
  min-height: 70px;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(20, 34, 79, 0.08);
  border-radius: 18px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 10px 28px rgba(20, 34, 79, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.fc-conseiller-trust-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(15, 157, 140, 0.12);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(238, 250, 247, 0.98), rgba(255, 255, 255, 0.96));
  color: var(--teal-dark, #0B6F62);
}

.fc-conseiller-trust-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-conseiller-trust-copy {
  margin: 0;
  color: var(--slate, #5B6473);
  font-size: 0.76rem;
  line-height: 1.45;
}

.fc-conseiller-scroll-lock {
  overflow: hidden !important;
}

@media (min-width: 701px) {
  .fc-conseiller-backdrop {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .fc-conseiller-launcher {
    right: 26px;
    bottom: 150px;
    right: max(26px, env(safe-area-inset-right));
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 132px);
    width: 62px;
    min-width: 62px;
    height: 62px;
    min-height: 62px;
    border-radius: 20px;
    padding: 5px;
  }

  .fc-conseiller-launcher-copy {
    display: none;
  }

  .fc-conseiller-tab {
    bottom: 124px;
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 106px);
  }

  .fc-conseiller-collapse {
    right: 2px;
    bottom: 168px;
    right: max(2px, env(safe-area-inset-right));
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 150px);
  }

  .fc-conseiller-launcher-mark {
    width: 52px;
    height: 52px;
  }

  .formations-guided-panel.fc-conseiller-widget {
    right: 8px;
    bottom: 82px;
    left: 8px;
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 74px);
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100vh - 98px);
    max-height: calc(100dvh - 98px);
    border-radius: 20px;
  }

  .fc-conseiller-window-head {
    min-height: 78px;
    padding: 22px 12px 12px 16px;
  }

  .fc-conseiller-window-brand strong {
    font-size: 1.02rem;
  }

  .fc-conseiller-window-brand small {
    font-size: 0.74rem;
  }

  .fc-conseiller-window-body {
    gap: 14px;
    padding: 16px 14px 18px;
  }

  .fc-conseiller-needs-grid {
    gap: 10px;
  }

  .fc-conseiller-action {
    min-height: 92px;
    grid-template-columns: 40px minmax(0, 1fr) 14px;
    gap: 10px;
    padding: 12px 10px;
  }

  .fc-conseiller-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .fc-conseiller-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .fc-conseiller-needs-grid {
    grid-template-columns: 1fr;
  }

  .fc-conseiller-action {
    min-height: 68px;
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    padding: 10px 12px;
  }

  .fc-conseiller-label {
    font-size: 0.84rem;
  }
}

@media (max-height: 680px) {
  .fc-conseiller-window-body {
    gap: 12px;
  }

  .fc-conseiller-action {
    min-height: 78px;
  }
}

/* Mode parcours : questions, cases à cocher, navigation, résultat */
.fc-conseiller-parcours {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fc-parcours-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  background: transparent;
  color: var(--ink, #141413);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.fc-parcours-back svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--teal-dark, #0B6F62);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fc-parcours-back:hover {
  background: rgba(15, 157, 140, 0.08);
}

.fc-parcours-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--slate, #5b6578);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fc-parcours-progress-track {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 157, 140, 0.14);
}

.fc-parcours-progress-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal, #0F9D8C);
  transition: width 0.2s ease;
}

.fc-parcours-question {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

.fc-parcours-question-title {
  padding: 0;
  color: var(--navy, #14224F);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.fc-parcours-question-hint {
  margin: 0;
  color: var(--slate, #5b6578);
  font-size: 0.84rem;
  line-height: 1.45;
}

.fc-parcours-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.fc-parcours-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(231, 225, 210, 0.9);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--paper, #FBF7EC);
  color: var(--ink, #141413);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.fc-parcours-option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--teal, #0F9D8C);
}

.fc-parcours-option:has(input:checked) {
  border-color: var(--teal, #0F9D8C);
  background: rgba(15, 157, 140, 0.08);
  box-shadow: 0 0 0 1px rgba(15, 157, 140, 0.35);
}

.fc-parcours-option:hover {
  border-color: rgba(15, 157, 140, 0.55);
}

.fc-parcours-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.fc-parcours-prev,
.fc-parcours-next {
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.fc-parcours-prev {
  border: 1px solid rgba(231, 225, 210, 0.9);
  background: #fff;
  color: var(--navy, #14224F);
}

.fc-parcours-next {
  margin-left: auto;
  border: 1px solid var(--teal, #0F9D8C);
  background: var(--teal, #0F9D8C);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 157, 140, 0.25);
}

.fc-parcours-next:disabled {
  border-color: rgba(231, 225, 210, 0.9);
  background: #fff;
  color: #a7adbd;
  box-shadow: none;
  cursor: not-allowed;
}

/* Résultat du parcours */
.fc-parcours-result-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-parcours-result-title {
  margin: 0;
  color: var(--navy, #14224F);
  font-size: 1.05rem;
  font-weight: 800;
}

.fc-parcours-result-sub {
  margin: 0;
  color: var(--slate, #5b6578);
  font-size: 0.86rem;
  line-height: 1.45;
}

.fc-parcours-courses {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-parcours-course a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(231, 225, 210, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.fc-parcours-course a:hover {
  border-color: rgba(15, 157, 140, 0.55);
  box-shadow: 0 6px 16px rgba(20, 34, 79, 0.08);
}

.fc-parcours-course-title {
  color: var(--ink, #141413);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.fc-parcours-course-level {
  flex: none;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(15, 157, 140, 0.1);
  color: var(--teal-dark, #0B6F62);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.fc-parcours-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.fc-parcours-cta,
.fc-parcours-cta-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.fc-parcours-cta {
  border: 1px solid var(--teal, #0F9D8C);
  background: var(--teal, #0F9D8C);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 157, 140, 0.25);
}

.fc-parcours-cta-sub {
  border: 1px solid rgba(231, 225, 210, 0.9);
  background: #fff;
  color: var(--navy, #14224F);
}

.fc-parcours-cta:hover,
.fc-parcours-cta-sub:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fc-conseiller-launcher,
  .fc-conseiller-window-close,
  .fc-conseiller-action {
    transition: none !important;
  }

  .fc-conseiller-launcher:hover,
  .fc-conseiller-action:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .fc-conseiller-launcher,
  .formations-guided-panel.fc-conseiller-widget,
  .fc-conseiller-window-head,
  .fc-conseiller-window-close,
  .fc-conseiller-action,
  .fc-conseiller-trust,
  .fc-conseiller-trust-icon,
  .fc-conseiller-icon {
    border: 1px solid CanvasText;
    background: Canvas;
    box-shadow: none;
    color: CanvasText;
  }

  .fc-conseiller-backdrop {
    background: Canvas;
  }
}

@media print {
  .fc-conseiller-launcher,
  .fc-conseiller-backdrop,
  .formations-guided-panel.fc-conseiller-widget {
    display: none !important;
  }
}
