/*
  Comment ça marche ? — styles propres à la page /ccm
  Breakpoints alignés sur le thème : xl 1199px, lg 991px, md 767px, sm 575px
*/

/* -------------------------------------------------- */
/*  En-tête : badge + repères clés                    */
/* -------------------------------------------------- */

.ccm-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 100px;
  background-color: var(--color-purple-3);
  color: var(--color-purple-1);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.ccm-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-purple-1);
  box-shadow: 0 0 0 4px rgba(100, 64, 251, 0.18);
}

.ccm-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 44px;
}

.ccm-fact {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.ccm-fact__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--color-purple-3);
  color: var(--color-purple-1);
  font-size: 20px;
}

.ccm-fact__value {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark-1);
}

.ccm-fact__label {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-light-1);
}

.ccm-lead {
  line-height: 1.6 !important;
}

/* -------------------------------------------------- */
/*  Sélecteur de profil                               */
/* -------------------------------------------------- */

.ccm-profiles__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ccm-profile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 24px 26px;
  text-align: left;
  border: 2px solid var(--color-light-5);
  border-radius: 16px;
  background-color: white;
  transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.25s ease, box-shadow 0.25s ease;
}

.ccm-profile:hover {
  transform: translateY(-4px);
  border-color: var(--color-purple-5);
  box-shadow: 0 14px 30px rgba(20, 3, 66, 0.08);
}

.ccm-profile.is-active {
  border-color: var(--color-purple-1);
  box-shadow: 0 18px 40px rgba(100, 64, 251, 0.16);
}

.ccm-profile__emoji {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--color-light-4);
  font-size: 24px;
  line-height: 1;
  transition: background-color 0.25s ease;
}

.ccm-profile.is-active .ccm-profile__emoji {
  background-color: var(--color-purple-3);
}

.ccm-profile__title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-dark-1);
}

.ccm-profile__text {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-light-1);
}

.ccm-profile__check {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-purple-1);
  color: white;
  font-size: 9px;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ccm-profile.is-active .ccm-profile__check {
  opacity: 1;
  transform: none;
}

.ccm-profiles__pane {
  display: none;
}

.ccm-profiles__pane.is-active {
  display: block;
}

/* -------------------------------------------------- */
/*  Parcours par étapes                               */
/* -------------------------------------------------- */

.ccm-stepper__rail {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.ccm-step {
  position: relative;
  flex: 1 1 0;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 4px;
  text-align: center;
  background: none;
  border: 0;
}

/* Trait de liaison entre deux pastilles */
.ccm-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 27px;
  left: calc(50% + 26px);
  width: calc(100% - 52px);
  height: 2px;
  background-color: var(--color-light-5);
  transition: background-color 0.3s ease;
}

.ccm-step.is-done:not(:last-child)::before {
  background-color: var(--color-purple-5);
}

.ccm-step__dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-light-5);
  background-color: white;
  color: var(--color-light-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ccm-step__label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-light-1);
  transition: color 0.25s ease;
}

.ccm-step:hover .ccm-step__dot {
  border-color: var(--color-purple-4);
  color: var(--color-purple-1);
}

.ccm-step.is-done .ccm-step__dot {
  border-color: var(--color-purple-5);
  background-color: var(--color-purple-3);
  color: var(--color-purple-1);
}

.ccm-step.is-current .ccm-step__dot {
  border-color: var(--color-purple-1);
  background-color: var(--color-purple-1);
  color: white;
  box-shadow: 0 0 0 6px rgba(100, 64, 251, 0.14);
}

.ccm-step.is-current .ccm-step__label {
  color: var(--color-dark-1);
  font-weight: 600;
}

.ccm-panel {
  display: none;
  padding: 36px 40px;
  border: 1px solid var(--color-light-5);
  border-radius: 16px;
  background-color: white;
  box-shadow: 0 18px 40px rgba(20, 3, 66, 0.06);
}

.ccm-panel.is-current {
  display: block;
}

.ccm-panel__rank {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  background-color: var(--color-purple-3);
  color: var(--color-purple-1);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.ccm-panel__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5 / 4;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--color-purple-3) 0%, var(--color-light-7) 100%);
}

/* Médaillon : le pictogramme posé sur un disque clair, plutôt qu'une icône perdue au centre. */
.ccm-panel__media i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(20, 3, 66, 0.07);
  font-size: 64px;
  color: var(--color-purple-1);
}

/* -------------------------------------------------- */
/*  Listes à puces cochées                            */
/* -------------------------------------------------- */

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

.ccm-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-light-1);
}

.ccm-list__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background-color: var(--color-green-7);
  color: var(--color-green-4);
  font-size: 8px;
}

.ccm-list.-white li {
  color: rgba(255, 255, 255, 0.85);
}

.ccm-list.-white .ccm-list__icon {
  background-color: rgba(0, 255, 132, 0.18);
  color: var(--color-green-1);
}

/* -------------------------------------------------- */
/*  Comparatif papier / en ligne                      */
/* -------------------------------------------------- */

.ccm-compare {
  height: 100%;
  padding: 30px 32px;
  border-radius: 16px;
  border: 1px solid var(--color-light-5);
  background-color: white;
}

.ccm-compare.-before {
  background-color: var(--color-light-4);
}

.ccm-compare.-after {
  border-color: var(--color-purple-5);
  box-shadow: 0 18px 40px rgba(100, 64, 251, 0.1);
}

.ccm-compare__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-dark-1);
}

.ccm-compare__list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-light-1);
}

.ccm-compare__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ccm-compare__list li i {
  margin-top: 4px;
  font-size: 11px;
}

.ccm-compare.-before .ccm-compare__list li i {
  color: var(--color-red-3);
}

.ccm-compare.-after .ccm-compare__list li i {
  color: var(--color-green-4);
}

/* -------------------------------------------------- */
/*  Bandeau d'appel à l'action                        */
/* -------------------------------------------------- */

.ccm-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 40px;
  border-radius: 16px;
  background: linear-gradient(115deg, var(--color-dark-1) 0%, var(--color-dark-6) 100%);
}

.ccm-cta.-purple {
  background: linear-gradient(115deg, var(--color-purple-1) 0%, var(--color-purple-4) 100%);
}

.ccm-cta__title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
  color: white;
}

.ccm-cta__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.ccm-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ccm-benefits .coursesCard {
  height: 100%;
}

/* -------------------------------------------------- */
/*  Chiffres clés                                     */
/* -------------------------------------------------- */

.ccm-metric {
  text-align: center;
}

.ccm-metric__number {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-green-1);
}

.ccm-metric__label {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* -------------------------------------------------- */
/*  Adaptations mobiles                               */
/* -------------------------------------------------- */

@media (max-width: 1199px) {
  .ccm-panel {
    padding: 30px 30px;
  }
}

@media (max-width: 991px) {
  /* Trois cartes côte à côte deviennent illisibles : on empile plutôt que de laisser
     la troisième seule sur une deuxième ligne. */
  .ccm-profiles__controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .ccm-profile {
    align-items: center;
  }

  .ccm-metric__number {
    font-size: 36px;
  }
}

@media (max-width: 767px) {
  .ccm-profile {
    padding: 18px 20px;
  }

  .ccm-profile__emoji {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .ccm-facts {
    gap: 18px;
    justify-content: flex-start;
  }

  /* Rail compact et défilable : la pastille reste lisible, le libellé passe en dessous */
  .ccm-stepper__rail {
    gap: 0;
    margin-left: -20px;
    margin-right: -20px;
    padding: 6px 20px 10px;
  }

  .ccm-step {
    min-width: 108px;
  }

  .ccm-step:not(:last-child)::before {
    top: 24px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
  }

  .ccm-step__dot {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .ccm-step__label {
    font-size: 13px;
  }

  .ccm-panel {
    padding: 24px 22px;
  }

  .ccm-panel__media {
    aspect-ratio: 16 / 9;
  }

  .ccm-cta {
    padding: 26px 24px;
  }

  .ccm-cta__title {
    font-size: 20px;
  }

  .ccm-cta__actions .button {
    width: 100%;
  }

  .ccm-compare {
    padding: 24px 22px;
  }
}
