.levels-page {
  background: #f6fbfa;
}

.levels-section {
  padding: clamp(72px, 8vw, 118px) 0;
  background: #fff;
}

.levels-section + .levels-section {
  border-top: 1px solid rgba(16, 48, 45, 0.12);
}

.levels-section--intro {
  background: linear-gradient(135deg, #ffffff 0%, #f4fbfa 58%, #e7f8f5 100%);
}

.levels-section--soft {
  background: #eef8f6;
}

.levels-section--examples {
  background: linear-gradient(135deg, #f6fbfa 0%, #ffffff 48%, #e9f8f5 100%);
}

.levels-section--comparisons {
  background: #eef8f6;
}

.levels-intro {
  max-width: 980px;
}

.levels-intro__body {
  max-width: 940px;
  color: #55736d;
  font-size: clamp(1.05rem, 1.35vw, 1.35rem);
  line-height: 1.72;
}

.levels-comparison-stack {
  display: grid;
  gap: clamp(44px, 5vw, 68px);
  margin-top: clamp(38px, 5vw, 62px);
}

.levels-comparison-group {
  padding-top: 24px;
  border-top: 1px solid rgba(16, 48, 45, 0.18);
}

.levels-comparison-group > h3 {
  margin: 0 0 22px;
  color: #172824;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

.levels-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.levels-path-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.levels-path-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(16, 48, 45, 0.16);
  border-top: 4px solid #4eccb8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(16, 48, 45, 0.07);
}

.levels-path-card[data-kind="tp"] {
  border-top-color: #ff9f00;
}

.levels-path-card__topline {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.levels-path-card__kind,
.levels-path-card__level {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.levels-path-card__kind {
  background: rgba(78, 204, 184, 0.14);
  color: #278f80;
}

.levels-path-card[data-kind="tp"] .levels-path-card__kind {
  background: rgba(255, 159, 0, 0.14);
  color: #a85f00;
}

.levels-path-card__level {
  border: 1px solid rgba(16, 48, 45, 0.14);
  color: #385d56;
}

.levels-path-card h4 {
  margin: 0 0 18px;
  color: #172824;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
}

.levels-path-card__rncp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
  padding: 8px 11px;
  border: 1px solid rgba(78, 204, 184, 0.34);
  border-radius: 6px;
  background: #edf9f7;
  color: #196f64;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.levels-path-card__rncp > span:first-child {
  font-weight: 950;
}

.levels-path-card__rncp:hover {
  border-color: #4eccb8;
  background: #e3f7f3;
  color: #104f48;
}

.levels-path-card__issuer {
  margin: 0 0 16px;
  color: #385d56;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.5;
}

.levels-path-card__body {
  margin: 0;
  color: #55736d;
  font-size: 1rem;
  line-height: 1.62;
}

.levels-path-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding: 24px 0 0;
  color: #8c5000;
  font-weight: 950;
  line-height: 1.25;
  text-decoration: none;
}

.levels-path-card__action:hover {
  color: #5e3500;
}

.levels-path-card__action svg {
  flex: 0 0 auto;
  transition: transform 0.18s ease;
}

.levels-path-card__action:hover svg {
  transform: translateX(4px);
}

.levels-principle-grid,
.levels-card-grid,
.levels-examples-grid {
  display: grid;
  gap: 0;
  margin-top: clamp(34px, 4vw, 56px);
  border-top: 4px solid #4eccb8;
  background: #fff;
}

.levels-principle-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.levels-card-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.levels-principle-card,
.levels-info-card,
.levels-example-card {
  min-height: 280px;
  padding: clamp(30px, 3.4vw, 48px);
  border-right: 1px solid rgba(16, 48, 45, 0.14);
  border-bottom: 1px solid rgba(16, 48, 45, 0.14);
  background: #fff;
}

.levels-principle-card:nth-child(3n),
.levels-info-card:nth-child(4n),
.levels-example-card:nth-child(3n) {
  border-right: 0;
}

.levels-principle-card__icon,
.levels-info-card__icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  border-radius: 18px;
  background: rgba(78, 204, 184, 0.12);
  color: #4eccb8;
}

.levels-principle-card h3,
.levels-info-card h3,
.levels-example-card h3,
.levels-choice-card h3 {
  margin: 0 0 16px;
  color: #172824;
  font-size: clamp(1.35rem, 1.8vw, 1.95rem);
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
}

.levels-principle-card p,
.levels-info-card p,
.levels-example-card p,
.levels-choice-card p {
  margin: 0;
  color: #55736d;
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  line-height: 1.62;
}

.levels-table-wrap {
  margin-top: clamp(34px, 4vw, 56px);
  overflow-x: auto;
  border: 1px solid rgba(78, 204, 184, 0.42);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(16, 48, 45, 0.08);
}

.levels-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  color: #172824;
}

.levels-table th,
.levels-table td {
  padding: 24px 28px;
  border-right: 1px solid rgba(16, 48, 45, 0.1);
  border-bottom: 1px solid rgba(16, 48, 45, 0.12);
  text-align: left;
  vertical-align: top;
}

.levels-table th:last-child,
.levels-table td:last-child {
  border-right: 0;
}

.levels-table tbody tr:last-child th,
.levels-table tbody tr:last-child td {
  border-bottom: 0;
}

.levels-table thead th {
  background: #4eccb8;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.levels-table tbody th {
  width: 22%;
  color: #4eccb8;
  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
  font-weight: 950;
}

.levels-table td strong {
  display: inline-block;
  color: #172824;
  font-size: clamp(1.05rem, 1.4vw, 1.32rem);
  font-weight: 950;
}

.levels-table td {
  color: #55736d;
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  line-height: 1.58;
}

.levels-note {
  margin: 22px 0 0;
  max-width: 940px;
  color: #55736d;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.65;
}

.levels-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: clamp(34px, 4vw, 56px);
}

.levels-choice-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: clamp(28px, 3vw, 38px);
  border: 1px solid rgba(78, 204, 184, 0.38);
  border-radius: 24px;
  background: #fff;
}

.levels-choice-card__step {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #4eccb8;
  color: #172824;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.levels-example-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 320px;
}

.levels-example-card__level {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(78, 204, 184, 0.14);
  color: #4eccb8;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.levels-example-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 13px 22px;
  border-radius: 999px;
  background: #ff9f00;
  color: #fff;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(255, 159, 0, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.levels-example-card__link:hover {
  background: #ffad24;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(255, 159, 0, 0.32);
}

[data-theme="dark"] .levels-page,
[data-theme="dark"] .levels-section {
  background: var(--bg-page);
}

[data-theme="dark"] .levels-section + .levels-section {
  border-top-color: var(--border-dark);
}

[data-theme="dark"] .levels-section--intro,
[data-theme="dark"] .levels-section--examples,
[data-theme="dark"] .levels-section--comparisons {
  background:
    linear-gradient(135deg, var(--bg-page) 0%, var(--bg-dark) 54%, var(--bg-dark-2) 100%);
}

[data-theme="dark"] .levels-section--soft {
  background: var(--bg-dark);
}

[data-theme="dark"] .levels-principle-grid,
[data-theme="dark"] .levels-card-grid,
[data-theme="dark"] .levels-examples-grid,
[data-theme="dark"] .levels-principle-card,
[data-theme="dark"] .levels-info-card,
[data-theme="dark"] .levels-example-card,
[data-theme="dark"] .levels-choice-card,
[data-theme="dark"] .levels-table-wrap,
[data-theme="dark"] .levels-path-card {
  background: var(--bg-dark);
}

[data-theme="dark"] .levels-table-wrap {
  border-color: rgba(78, 204, 184, 0.34);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .levels-principle-card,
[data-theme="dark"] .levels-info-card,
[data-theme="dark"] .levels-example-card,
[data-theme="dark"] .levels-choice-card,
[data-theme="dark"] .levels-table th,
[data-theme="dark"] .levels-table td {
  border-color: var(--border-dark);
}

[data-theme="dark"] .levels-comparison-group {
  border-top-color: var(--border-dark);
}

[data-theme="dark"] .levels-path-card {
  border-color: var(--border-dark);
  border-top-color: #4eccb8;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .levels-path-card[data-kind="tp"] {
  border-top-color: #ff9f00;
}

[data-theme="dark"] .levels-table {
  color: var(--text-primary);
}

[data-theme="dark"] .levels-principle-card h3,
[data-theme="dark"] .levels-info-card h3,
[data-theme="dark"] .levels-example-card h3,
[data-theme="dark"] .levels-choice-card h3,
[data-theme="dark"] .levels-comparison-group > h3,
[data-theme="dark"] .levels-path-card h4,
[data-theme="dark"] .levels-table td strong {
  color: var(--text-primary);
}

[data-theme="dark"] .levels-intro__body,
[data-theme="dark"] .levels-principle-card p,
[data-theme="dark"] .levels-info-card p,
[data-theme="dark"] .levels-example-card p,
[data-theme="dark"] .levels-choice-card p,
[data-theme="dark"] .levels-table td,
[data-theme="dark"] .levels-note {
  color: var(--text-muted);
}

[data-theme="dark"] .levels-path-card__level {
  border-color: var(--border-dark);
  color: var(--text-muted);
}

[data-theme="dark"] .levels-path-card__kind {
  color: #64dfcb;
}

[data-theme="dark"] .levels-path-card[data-kind="tp"] .levels-path-card__kind {
  color: #ffb94d;
}

[data-theme="dark"] .levels-path-card__rncp {
  border-color: rgba(78, 204, 184, 0.34);
  background: rgba(78, 204, 184, 0.1);
  color: #64dfcb;
}

[data-theme="dark"] .levels-path-card__rncp:hover {
  border-color: #4eccb8;
  background: rgba(78, 204, 184, 0.16);
  color: #8cebdc;
}

[data-theme="dark"] .levels-path-card__issuer,
[data-theme="dark"] .levels-path-card__body {
  color: var(--text-muted);
}

[data-theme="dark"] .levels-path-card__action {
  color: #ffb94d;
}

[data-theme="dark"] .levels-path-card__action:hover {
  color: #ffd28a;
}

@media (max-width: 1100px) {
  .levels-examples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .levels-example-card:nth-child(3n) {
    border-right: 1px solid rgba(16, 48, 45, 0.14);
  }

  .levels-example-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .levels-table-wrap::before {
    content: "\2194  Faites glisser pour voir toutes les colonnes";
    position: sticky;
    left: 0;
    z-index: 2;
    display: block;
    width: max-content;
    max-width: calc(100vw - 66px);
    box-sizing: border-box;
    padding: 10px 14px;
    background: color-mix(in oklab, var(--teal) 14%, var(--bg-page));
    color: var(--text-primary);
    font-family: 'Josefin Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
  }
  .levels-section {
    padding: 58px 0;
  }

  .levels-principle-grid,
  .levels-card-grid--four,
  .levels-examples-grid,
  .levels-path-grid,
  .levels-path-grid--three,
  .levels-choice-grid {
    grid-template-columns: 1fr;
  }

  .levels-principle-card,
  .levels-principle-card:nth-child(3n),
  .levels-info-card,
  .levels-info-card:nth-child(4n),
  .levels-example-card,
  .levels-example-card:nth-child(3n),
  .levels-example-card:nth-child(2n) {
    border-right: 0;
  }

  .levels-path-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .levels-path-card {
    padding: 24px;
  }

  .levels-path-card__topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
