:root {
  --main-green-color: #0891B2;
  --lp-left-bg     : #097994;
  --lp-accent      : #0891B2;
  --lp-left-text   : #ffffff;
  --lp-right-bg    : #f4f6f8;
  --lp-body-text   : #1a1a1a;
  --lp-label-color : #374151;
  --lp-muted       : #6b7280;
  --lp-border      : #d1d5db;
  --lp-error-bg    : #fef2f2;
  --lp-error-border: #fecaca;
  --lp-error-text  : #dc2626;
  --ld-color-brand-primary: #0891B2 !important;
  --ld-color-button-bg: #0891B2 !important;
  --ld-color-primitives-blue-500: #0891B2 !important;
  --ld-color-button-bg-hover: #097994 !important;
  --admin-bar-size: 0px;
  --header-height: 124px;
  interpolate-size: allow-keywords;
}

html {
  scrollbar-gutter: stable;
  body {
    --admin-bar-size: 32px;
    @media (max-width: 767px) {
      --admin-bar-size: 46px;
    }
  }
}

.lp-body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--lp-body-text);

  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
}

.lp-wrap {
  display: flex;
  min-height: 100vh;
}

.lp-left {
  flex: 0 0 45%;
  background-color: var(--lp-left-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  text-align: center;
  background-image: url("../images/login-bg.svg");
  background-size: cover;
  background-position: center;
}

.lp-logo {
  max-width: 220px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lp-site-name {
  color: var(--lp-left-text);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lp-right {
  flex: 1;
  background-color: var(--lp-right-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.lp-form-inner {
  width: 100%;
  max-width: 380px;

  h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--main-green-color);
    margin-bottom: 0.4rem;
  }
}

.lp-subtitle {
  color: var(--lp-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.lp-error {
  background: var(--lp-error-bg);
  border: 1px solid var(--lp-error-border);
  color: var(--lp-error-text);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.lp-field {
  margin-bottom: 1.25rem;

  label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--lp-label-color);
    margin-bottom: 0.4rem;
  }

  input[type="text"],
  input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--lp-border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--lp-body-text);
    background: #f9fafb;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;

    &:focus {
      border-color: var(--lp-accent);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-accent) 20%, transparent);
      background: #fff;
    }
  }
}

.lp-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--lp-muted);
  cursor: pointer;
  user-select: none;

  input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lp-accent);
    cursor: pointer;
    flex-shrink: 0;
  }
}

.lp-submit {
  width: 100%;
  padding: 0.8rem;
  background: var(--lp-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-bottom: 1.25rem;

  &:hover,
  &:focus-visible {
    opacity: 0.88;
    outline: none;
  }
}

.lp-lost-pw {
  font-size: 0.85rem;

  a {
    color: var(--lp-accent);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

@media (max-width: 768px) {
  .lp-wrap {
    flex-direction: column;
  }

  .lp-left {
    flex: 0 0 auto;
    min-height: 200px;
    padding: 2rem 1.5rem;
  }

  .lp-logo {
    max-width: 160px;
  }

  .lp-right {
    padding: 2.5rem 1.5rem;
    align-items: flex-start;
  }
}



html {
  scrollbar-gutter: stable;
}

:root body {
  --ld-color-brand-primary: var(--main-green-color) !important;
  --ld-color-button-bg: var(--main-green-color) !important;
  --ld-color-primitives-blue-500: var(--main-green-color) !important;
  --ld-color-button-bg-hover: #097994 !important;
}
.ld-accordion__content .ld-accordion__item {
  background-color: #f8f8f8;
}

.ld-accordion__content .ld-accordion__item:has(.ld-accordion__item-attribute--progress) {
  background-color: #eef6f9;
}

.ld-accordion__item-title {
  font-weight: 500;
  text-decoration: none !important;
}

.learndash-wrapper .ld-primary-background {
  color: white !important;
}

.elementor-widget-theme-post-content {
  .wp-block-quote {
    border-left: 5px solid var(--main-green-color);
  }

  p, li {
    a {
      color: var(--main-green-color) !important;
    }
  }
}

.elementor .elementor-element.e-flex {
  --flex-wrap-mobile: no-wrap !important;
}

p, li, figcaption {
  text-wrap: pretty;
}

.elementor-widget-text-editor {
  .elementor-widget-container {
    h1, h2, h3 {
      &:not(:last-child) {
        padding-bottom: 6px;
      }
    }

    ul, ol {
      padding-left: 18px;
    }
  }

  p:last-child {
    margin-bottom: 0;
  }
}

.elementor-widget-theme-post-content {
  h2.wp-block-heading {
    font-size: 22px;
    line-height: 26px;
    font-weight: bold;
    margin-block: 8px;
  }

  h3.wp-block-heading {
    font-size: 19px;
    line-height: 25px;
    font-weight: bold;
    margin-bottom: 8px;
  }

  h4.wp-block-heading {
    font-size: 16px;
    line-height: 22px;
    font-weight: bold;
    margin-bottom: 8px;
  }

  .wp-block-image {
    margin-block: 24px;
    &.alignleft {
      float: left;
      margin: .5em 1em .5em 0;
    }
    &.alignright {
      float: right;
      margin: .5em 0 .5em 1em;
    }
  }

  .wp-block-quote {
    padding: 6px 0 6px 12px;
    margin: 20px 0;
    font-size: 115%;
    p {
      margin-bottom: 10px;
    }
  }

  details {
    margin-bottom: 16px;
    summary {
      cursor: pointer;
      margin-bottom: 8px;
    }

    p {
      margin-top: 0;
      padding-top: 0;
    }
  }

  ul, ol {
    padding-left: 18px;
    margin-bottom: 16px;
    li {
      margin-bottom: 5px;
    }
  }

  .wp-block-buttons {
    margin-bottom: 24px;
    .wp-element-button {
      border: none;
    }
  }

  .wp-block-media-text {
    margin-bottom: 24px;
  }
}

.ld-course-list-items .ld_course_grid .btn-primary {
  background-color: var(--main-green-color) !important;
  border-color: var(--main-green-color) !important;
}

.ld-course-list-items .ld_course_grid .thumbnail.course .ribbon.enrolled {
  background-color: var(--main-green-color) !important;
}

.ld-course-list-items .ld_course_grid .thumbnail.course .ribbon.enrolled:before {
  border-top: 4px solid var(--main-green-color) !important;
  border-right: 4px solid var(--main-green-color) !important;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) label.is-selected,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) label:has(input:checked),
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) label:focus-within {
  border-color: var(--main-green-color) !important;
  background-color: #f2f6f7;
}

.wpProQuiz_quiz input[type="checkbox"],
.wpProQuiz_quiz input[type="radio"] {
  accent-color: var(--main-green-color);
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_button:not([disabled]):not(.wpProQuiz_button_reShowQuestion):not(.wpProQuiz_button_restartQuiz) {
  color: white !important;
}

a {
  color: var(--main-green-color);
}

#ld-tab-panel-content {
  p a {
    color: var(--main-green-color);
  }
}

.wp-block-file {
  .wp-block-file__button {
    text-decoration: none;
    &:hover {
      color: white !important;
    }
  }

  a:not(.wp-block-file__button) {
    color: var(--main-green-color);
  }
}

.ld-table-list {
  background-color: white;
  border-radius: 18px !important;
  border: 1px solid #ECE6DC;
}

.ld-table-list .ld-table-list-items {
  border: none !important;
}

.ld-table-list .ld-table-list-items .ld-table-list-item {
  border-bottom: none !important;
  position: relative;
}

.ld-table-list .ld-table-list-items .ld-table-list-item:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  height: 100%;
  width: 2px;
  background: #1F9AAB;
  opacity: 0.35;
}

.ld-table-list .ld-table-list-items .ld-table-list-item:first-child:before {
  top: 22px;
  height: calc(100% - 22px);
}

.ld-table-list .ld-table-list-items .ld-table-list-item:last-child:before {
  height: calc(100% - 22px);
}

.learndash-wrapper .ld-table-list .ld-table-list-header {
  background-color: white !important;
  color: #5A6573 !important;
  padding-bottom: 14px !important;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start !important;
}

.learndash-wrapper .ld-table-list .ld-table-list-header .ld-lesson-list-steps {
  display: none !important;
}

.ld-icon-quiz:before {
  background-color: white !important;
}

/* ── Navigation LearnDash (fil d'ariane) ───────────────────────────────── */

.ld-breadcrumb {
  font-size: 0.85rem;
  line-height: 1.4;
}

.ld-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ld-breadcrumb__item {
  display: flex;
  align-items: center;
}

.ld-breadcrumb__link {
  color: currentColor;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.15s;

  &:hover,
  &:focus-visible {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.ld-breadcrumb__label {
  opacity: 1;
}

.ld-breadcrumb__sep {
  margin: 0 0.4em;
  opacity: 0.4;
  font-style: normal;
}

/* ── Leçon en cours ────────────────────────────────────────────────────── */

.ld-current-lesson {
  display: inline-flex;
  align-items: center;
}

.ld-current-lesson__title {
  color: #929292;
  font-size: 12px;
  font-weight: 500;
}

/* ── Chapitre en cours ─────────────────────────────────────────────────── */

/* ── Bouton "Chapitre Suivant" (remplace le flux mark-complete natif) ──── */

.ld-current-chapter {
  display: inline-flex;
  padding: 6px 11.828px 5.594px 12px;
  justify-content: center;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  background: #E6F4F6;
  color: #1F9AAB;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 17px;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.48px;
  text-transform: uppercase;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) label {
  border: 1px solid #ECE6DC !important;
  padding: 12px 14px !important;
  background-color: white;
  font-size: 15px;
  line-height: 23px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) label input {
  margin-right: 4px !important;
}

/* ── Mes formations (grille de cartes) ─────────────────────────────────── */

.ld-formations__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ld-formations__empty {
  color: #6b7280;
  font-size: 0.95rem;
}

.ld-formation-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;

  &:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
  }
}

.ld-formation-card__visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
  text-decoration: none;
}

.ld-formation-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;

  .ld-formation-card:hover & {
    transform: scale(1.03);
  }
}

.ld-formation-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e6f4f6 0%, #cde9ee 100%);
}

.ld-formation-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--main-green-color, #0891B2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.ld-formation-card__badge--done {
  background: #065f46;
}

.ld-formation-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.ld-formation-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.35;

  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      color: var(--main-green-color, #0891B2);
    }
  }
}

.ld-formation-card__progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ld-formation-card__progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.ld-formation-card__progress-bar {
  height: 100%;
  background: var(--main-green-color, #0891B2);
  border-radius: 999px;
  min-width: 4px;
  transition: width 0.3s ease;
}

.ld-formation-card__percent {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--main-green-color, #0891B2);
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

.ld-formation-card__step {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ld-formation-card__step-label {
  font-weight: 600;
  color: #9ca3af;
  margin-right: 2px;
}

.ld-formation-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 10px 18px;
  background: var(--main-green-color, #0891B2);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  text-align: center;

  &:hover {
    opacity: 0.88;
    color: #fff;
    text-decoration: none;
  }
}

.ld-formation-card--done .ld-formation-card__btn {
  background: #f3f4f6;
  color: #374151;

  &:hover {
    opacity: 1;
    background: #e5e7eb;
    color: #111827;
  }
}

@media (max-width: 768px) {
  .ld-formations__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Menu Mon Compte (dropdown) ────────────────────────────────────────── */

.ld-account-menu {
  position: relative;
  display: inline-block;
}

.ld-account-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 7px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.ld-account-menu__trigger::-webkit-details-marker {
  display: none;
}

.ld-account-menu__trigger::marker {
  content: none;
}

.ld-account-menu__trigger:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ld-account-menu__avatar {
  width: 28px;
  height: 28px;
  background: var(--main-green-color, #0891B2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ld-account-menu__chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
  opacity: 0.5;
}

.ld-account-menu[open] .ld-account-menu__chevron {
  transform: rotate(180deg);
}

.ld-account-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 6px;
  z-index: 9999;
  animation: ld-dropdown-in 0.15s ease;
}

@keyframes ld-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ld-account-menu__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.12s;

  &:hover {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
  }
}

.ld-account-menu__link--logout {
  color: #6b7280;

  &:hover {
    color: #dc2626;
    background: #fef2f2;
  }
}

/* ── Page Mon Compte ────────────────────────────────────────────────────── */

.ld-account-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ld-account-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.ld-account-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
}

.ld-account-section__desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 16px;
}

.ld-account-section--danger {
  border-color: #fecaca;
}

.ld-account-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.ld-account-info__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ld-account-info__label {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.ld-account-info__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
}

/* Boutons */
.ld-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1;

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}

.ld-account-btn--primary {
  background: var(--main-green-color, #0891B2);
  color: #fff;
  border-color: var(--main-green-color, #0891B2);

  &:hover {
    opacity: 0.88;
    color: #fff;
    text-decoration: none;
  }
}

.ld-account-btn--outline {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;

  &:hover {
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
  }
}

.ld-account-btn--danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;

  &:hover {
    opacity: 0.88;
    color: #fff;
    text-decoration: none;
  }
}

.ld-account-btn--danger-outline {
  background: transparent;
  color: #dc2626;
  border-color: #fca5a5;

  &:hover {
    background: #fef2f2;
    border-color: #dc2626;
    text-decoration: none;
  }
}

/* Formations */
.ld-account-courses {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ld-account-course {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ld-account-course__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ld-account-course__title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.ld-account-course__status {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ld-account-course__status--new {
  background: #f3f4f6;
  color: #6b7280;
}

.ld-account-course__status--progress {
  background: #e6f4f6;
  color: #1F9AAB;
}

.ld-account-course__status--done {
  background: #d1fae5;
  color: #065f46;
}

.ld-account-course__progress-wrap {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.ld-account-course__progress-bar {
  height: 100%;
  background: var(--main-green-color, #0891B2);
  border-radius: 999px;
  transition: width 0.3s ease;
  min-width: 4px;
}

.ld-account-course__progress-text {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
}

/* Notice (reset MDP) */
/* ── Page définir mot de passe ────────────────────────────────────────────── */
.ld-setpwd {
  max-width: 440px;
}

.ld-setpwd__intro {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
}

.ld-setpwd__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ld-setpwd__hint {
  margin: -8px 0 0;
  font-size: 0.8125rem;
  color: #9ca3af;
}

.ld-setpwd-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9375rem;
}

.ld-setpwd-msg--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ld-setpwd-msg--info {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* ── Formulaire changement de mot de passe ────────────────────────────────── */
.ld-password-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.ld-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ld-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.ld-form-input {
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: 0.9375rem;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;

  &:focus {
    border-color: #1091b2;
    box-shadow: 0 0 0 3px rgba(16, 145, 178, 0.15);
  }
}

.ld-account-notice {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.875rem;
}

.ld-account-notice--success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.ld-account-notice--error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* Modale de confirmation suppression */
.ld-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: ld-overlay-in 0.15s ease;
}

@keyframes ld-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ld-modal {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: ld-modal-in 0.18s ease;
}

@keyframes ld-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.ld-modal__icon {
  width: 56px;
  height: 56px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ld-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.ld-modal__desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

.ld-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;

  .ld-account-btn {
    width: 100%;
    justify-content: center;
  }
}

.ld-content-action  .learndash_mark_complete_button {
  padding: 10px 12px !important;
  font-size: 16px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-weight: 600 !important;
  background-color: #1091b2 !important;
  color: #ffffff !important;
  border-color: #1091b2 !important;
  font-family: Manrope, sans-serif;
  &:hover, &:active, &:focus {
    background-color: #066379 !important;
    color: #ffffff !important;
  }
}

/* ── Bouton Commencer / Reprendre le cours ─────────────────────────────────── */
/* ── Encadré cours terminé ─────────────────────────────────────────────────── */
.ld-course-completed-notice {
  gap: 18px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  border-radius: 14px;
  text-align: center;
  width: 100%;
}

.ld-course-completed-notice__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-inline: auto;
  margin-bottom: 16px;
}

.ld-course-completed-notice__body {
  flex: 1;
  min-width: 0;
}

.ld-course-completed-notice__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.ld-course-completed-notice__text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  line-height: 1.55;
}

.ld-course-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background-color: #1091b2;
  color: #ffffff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: Manrope, sans-serif;
  text-decoration: none;
  transition: background-color 0.15s;

  &:hover,
  &:active,
  &:focus {
    background-color: #066379;
    color: #ffffff;
    text-decoration: none;
  }
}

.quiz_continue_link a {
  position: relative;
  color: transparent !important;
  width: 136px !important;
  &:before {
    content: "Chapitre suivant";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    text-decoration: none;
  }
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionList[data-type="free_answer"] .wpProQuiz_questionListItem:not(.ld-sortable__item) label {
  padding: 0 !important;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionList[data-type="free_answer"] .wpProQuiz_questionListItem:not(.ld-sortable__item) label input {
  width: 100% !important;
  border-radius: 6px;
}

.learndash-wrapper .ld-item-list .ld-item-list-item {
  border: 1px solid #ECE6DC;
}

.learndash-wrapper .ld-item-list .ld-item-list-item .ld-table-list {
  border: none;
  border-top: 1px solid #ECE6DC;
  border-radius: 0 !important;
}

.learndash-wrapper .ld-course-status.ld-course-status-enrolled {
  background-color: white;
  color: #5A6573 !important;
  padding: 16px 0;
  border-radius: 10px !important;
  border: 1px solid #ECE6DC;
}

.learndash-wrapper .ld-course-status.ld-course-status-enrolled .ld-progress-stats .ld-progress-percentage {
  color: #5A6573 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
  margin-bottom: 8px;
}

.learndash-wrapper .ld-course-status.ld-course-status-enrolled .ld-progress-stats .ld-progress-steps {
  font-size: 14px;
  line-height: 17px;
}

.wpProQuiz_question_text p {
  font-weight: 700;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_header {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 0 !important;
}

.ld-lesson-topic-list + .ld-content-actions {
  display: none;
}

.ld-table-list .ld-table-list-lesson-details {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
}

.elementor-widget-ld-course-content {
  .learndash-wrapper {
    .ld-content-actions {
      padding-top: 32px;
      display: flex;
      width: 100%;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      .ld-button:not([disabled]):not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css)  {
        padding: 10px 12px;
        font-size: 16px !important;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        &:hover, &:active, &:focus {
          background-color: #066379 !important;
          color: #ffffff !important;
        }
        &:has(.ld-icon-arrow-left) {
          color: #1f9aab !important;
          background-color: #e6f4f6 !important;
          &:hover, &:active, &:focus {
            color: #ffffff !important;
            background-color: #48b3c2 !important;
          }
        }
      }
    }
  }
}


.learndash-wrapper .ld-table-list .ld-table-list-items {
  padding: 0 !important;
  .ld-table-list-item {
    .ld-topic-row {
      padding: 16px;
      align-items: center;
      .ld-topic-title,
      .ld-item-title {
        font-size: 11px !important;
        font-weight: 500 !important;
        font-family: "Montserrat", Sans-serif !important;
      }
    }

    .ld-is-current-item {
      background: #eef6f9;
    }
  }
}

.learndash-wrapper .ld-table-list .ld-table-list-header {
  padding: 24px 20px 20px 20px !important;
  .ld-table-list-title {
    display: none;
    .ld-item-icon {
      font-size: 1em;
      font-size: 11px !important;
    }
    .ld-text {
      font-size: 11px !important;
      font-weight: 500 !important;
      text-transform: unset !important;
      font-family: "Montserrat", Sans-serif !important;
    }
  }
}

.learndash-wrapper .ld-progress {
  .ld-progress-heading {
    .ld-progress-stats .ld-progress-percentage,
    .ld-progress-label {
      font-size: 12px !important;
      font-weight: 800 !important;
      text-transform: uppercase !important;
    }
  }
}

.ld-tab-bar__panel {
  .wp-block-heading:not(:first-child) {
    margin-top: 24px;
  }
}

.single-sfwd-topic {
  #content {
    max-width: 850px;
  }

  .ld-navigation {
    .ld-navigation__previous-link {
      opacity: 0.4;
      text-decoration: none;
      &:hover, &:active, &:focus {
        opacity: 1;
      }
    }

    .ld-navigation__next-link {
      background-color: #0891B2 !important;
      text-decoration: none;
      color: white !important;
      &:hover, &:active, &:focus {
        background-color: #097994 !important;
      }
    }

    .ld-navigation__back-to-course  {
      display: none;
    }
  }
}

.ld-breadcrumbs__items {
  li {
    a[href=""] {
      text-decoration: none;
    }
  }
}

.ld-accordion__content .ld-accordion__item {
  background-color: #f8f8f8;
}

.ld-accordion__content .ld-accordion__item:has(.ld-accordion__item-attribute--progress) {
  background-color: #eef6f9;
}

.ld-accordion__item-title {
  font-weight: 500;
  text-decoration: none !important;
}

.learndash-wrapper .ld-primary-background {
  color: white !important;
}

.elementor .elementor-element.e-flex {
  --flex-wrap-mobile: no-wrap !important;
}

p, li, figcaption {
  text-wrap: pretty;
}

.elementor-widget-text-editor {
  .elementor-widget-container {
    h1, h2, h3 {
      &:not(:last-child) {
        padding-bottom: 6px;
      }
    }

    ul, ol {
      padding-left: 18px;
    }
  }

  p:last-child {
    margin-bottom: 0;
  }
}

/* ── Bannière quiz déjà complété ──────────────────────────────────────────── */
.ld-quiz-completed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  flex-wrap: wrap;
}

.ld-quiz-completed-banner__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  padding-top: 3px;
  padding-right: 2px;
}

.ld-quiz-completed-banner__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ld-quiz-completed-banner__text {
  margin: 0 !important;
  font-size: 15px;
  color: #15803d;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ld-quiz-completed-banner__score {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 12px;
}

.ld-quiz-completed-banner__stats-link {
  font-size: 13px;
  color: #15803d !important;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;

  &:hover {
    color: #166534 !important;
  }
}

.ld-quiz-completed-banner__btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 8px 18px;
  background: var(--main-green-color);
  color: #fff !important;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;

  &:hover {
    background: var(--lp-left-bg);
    color: #fff !important;
  }
}

.lp-submit{
  border-color: var(--main-green-color) !important;
  color: var(--main-green-color) !important;
  margin-bottom: 12px;
  &:hover, &:active, &:focus {
    background-color: var(--main-green-color) !important;
    color: white !important;
  }
}