.dd-step-content .dd-hl-blue {
  background-color: #e7faf9;
  display: inline;
  padding: 0 .15em;
}
.dd-step-content .dd-hl-orange {
  background-color: #fbe4e2;
  display: inline;
  padding: 0 .15em;
}

/* Ensure inline formatting behaves inline inside paragraphs */
.dd-step-content b,
.dd-step-content i,
.dd-step-content span.dd-hl-blue,
.dd-step-content span.dd-hl-orange {
  font-weight: inherit;
  font-style: inherit;
}
.dd-step-content b { font-weight: 700; }
.dd-step-content i { font-style: italic; }
/* DD Learning App Styles */

:root {
  --dd-primary: #0095A5;
  --dd-secondary: #AFD2D0;
  --dd-accent: #DB4300;
  --dd-accent-hover: #C13D02;
  --dd-text: #6C6C6C;
  --dd-background: #ffffff;
  --dd-light: #f8f9fa;
  --dd-border: #e9ecef;
  --dd-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --dd-radius: 8px;
  --dd-transition: all 0.3s ease;

  /* Welcome Screen Variables */
  --dd-welcome-gradient-from: #0095A5;
  --dd-welcome-gradient-to: #007A87;
  --dd-welcome-text-rotation-duration: 2.5s;
  --dd-welcome-fade-duration: 0.3s;
  --dd-welcome-slide-duration: 0.5s;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

.dd-learning-app {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dd-text);
  background: var(--dd-background);
  overflow-x: hidden;
  /* Mobile optimizations */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Force hardware acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* Prevent zoom on input focus */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.dd-app-container {
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100); /* Use CSS custom property for mobile */
  display: flex;
  flex-direction: column;
}

/* Main content wrapper to clear fixed progress bar */
.main-content {
  padding-top: 80px;
}

/* Account shortcut */
.dd-account-shortcut {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2000;
  pointer-events: auto;
}

/* Mode onboarding - positionné juste au-dessus de la première question */
.dd-account-shortcut.onboarding-mode {
  top: 120px;
  /* Sous la barre de progression */
  right: 2rem;
  z-index: 1000;
  /* Sous la barre de progression */
}

/* Masquer l'icône après la première question d'onboarding */
.dd-account-shortcut.onboarding-mode:not(.first-question) {
  display: none;
}

/* Mode dashboard supprimé - l'icône n'apparaît plus quand l'utilisateur est connecté avec un abonnement actif */

.dd-account-shortcut.has-message {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: var(--dd-shadow);
  backdrop-filter: blur(8px);
}

.dd-account-message {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dd-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.dd-account-message:hover {
  color: var(--dd-primary);
}

.dd-account-highlight {
  font-weight: 700;
}

.dd-account-cta {
  font-weight: 600;
  color: var(--dd-primary);
}

.dd-account-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--dd-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--dd-shadow);
  transition: transform 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.dd-account-link:hover {
  background: var(--dd-accent);
  transform: translateY(-1px) scale(1.02);
}

.dd-account-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  color:#fff;
}

@media (max-width: 640px) {
  .dd-account-shortcut {
    top: 1rem;
    right: 1rem;
    gap: 0.5rem;
  }

  .dd-account-shortcut.has-message {
    padding: 0.4rem 0.6rem;
  }

  .dd-account-message {
    font-size: 0.75rem;
  }

  /* Ajustements pour le mode onboarding sur mobile */
  .dd-account-shortcut.onboarding-mode {
    top: 100px;
    right: 1rem;
  }

  /* Mode dashboard supprimé - plus de styles responsives nécessaires */
  
  /* Streak card mobile layout */
  .dd-streak-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .dd-streak-right {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100%;
  }
  
  .dd-streak-right .dd-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Main content mobile - remove side padding for lessons */
  .main-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Progress bar mobile adjustments */
  .dd-progress-container {
    padding: 0.5rem 1rem;
  }
  
  .dd-progress-bar {
    margin: 0.5rem 0;
  }
  
  /* Hide progress text on mobile to prevent overflow */
  .dd-lesson-meta {
    display: none;
  }
}

@media (max-width: 460px) {
  .dd-account-message {
    display: none;
  }

  .dd-account-shortcut.has-message {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

/* Loading Screen */
.dd-loading-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  height: calc(var(--vh, 1vh) * 100) !important; /* Use CSS custom property for mobile */
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  backdrop-filter: blur(10px) !important;
  /* Force hardware acceleration for mobile */
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  /* Prevent scrolling during loading */
  overflow: hidden !important;
  overflow-x: hidden !important;
  /* Ensure proper mobile rendering */
  -webkit-overflow-scrolling: touch !important;
  /* Override any WordPress theme styles */
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  /* Ensure visibility by default */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force loading screen to be visible by default */
.dd-loading-screen:not([data-hide="1"]) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 999999 !important;
}

.dd-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 400px;
  width: 90%;
  margin: 0 auto; /* Centrer horizontalement */
  box-sizing: border-box; /* Inclure padding et border dans la largeur */
}

/* Icons carousel */
.dd-loading-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
  width: 100%;
  height: 60px;
  position: relative;
}

.dd-loading-icon {
  font-size: 2.5rem;
  opacity: 0;
  animation: dd-icon-sequence 2.5s ease-in-out infinite;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.dd-loading-icon:nth-child(1) { animation-delay: 0s; }
.dd-loading-icon:nth-child(2) { animation-delay: 0.5s; }
.dd-loading-icon:nth-child(3) { animation-delay: 1s; }
.dd-loading-icon:nth-child(4) { animation-delay: 1.5s; }
.dd-loading-icon:nth-child(5) { animation-delay: 2s; }

@keyframes dd-icon-sequence {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.3);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) scale(1.3);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  45% {
    opacity: 0.8;
    transform: translateX(-50%) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.3);
  }
}


.dd-loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0095A5;
  text-align: center;
  animation: dd-text-pulse 2s ease-in-out infinite;
  letter-spacing: 0.5px;
}

@keyframes dd-text-pulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* Loading dots animation */
.dd-loading-dots {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.dd-loading-dot {
  width: 8px;
  height: 8px;
  background: #0095A5;
  border-radius: 50%;
  animation: dd-dot-bounce 1.4s ease-in-out infinite both;
}

.dd-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.dd-loading-dot:nth-child(2) { animation-delay: -0.16s; }
.dd-loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes dd-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Header */
.dd-header {
  background: var(--dd-primary);
  color: white;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--dd-shadow);
}

.dd-header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dd-logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

.dd-user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dd-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dd-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--dd-primary);
}

/* Main Content */
.dd-main {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Login Form */
.dd-login-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
}

.dd-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dd-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dd-form-label {
  font-weight: 600;
  color: var(--dd-text);
}

.dd-form-input {
  padding: 0.75rem;
  border: 2px solid var(--dd-border);
  border-radius: var(--dd-radius);
  font-size: 1rem;
  transition: var(--dd-transition);
}

.dd-form-input:focus {
  outline: none;
  border-color: var(--dd-primary);
  box-shadow: 0 0 0 3px rgba(0, 149, 165, 0.1);
}

/* Buttons */
.dd-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--dd-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--dd-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dd-btn-primary {
  background: #DB4300 ;
  color: white;
}

.dd-btn-primary:hover {
  background: #C13D02;
  transform: translateY(-1px);
}

.dd-btn-secondary {
  background: var(--dd-secondary);
  color: var(--dd-primary);
}

.dd-btn-secondary:hover {
  background: var(--dd-primary);
  color: white;
}

.dd-btn-outline {
  background: transparent;
  border: 2px solid var(--dd-primary);
  color: var(--dd-primary);
}

.dd-btn-outline:hover {
  background: var(--dd-primary);
  color: white;
}

.dd-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Onboarding */
.dd-onboarding {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.dd-onboarding-progress {
  width: 100%;
  height: 8px;
  background: var(--dd-light);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.dd-onboarding-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dd-primary), var(--dd-secondary));
  transition: width 0.5s ease;
}

.dd-onboarding-question {
  background: white;
  padding: 2rem;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  margin-bottom: 2rem;
}

.dd-onboarding-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--dd-primary);
  margin-bottom: 1rem;
}

.dd-onboarding-options {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.dd-onboarding-option {
  padding: 1rem;
  border: 2px solid var(--dd-border);
  border-radius: var(--dd-radius);
  cursor: pointer;
  transition: var(--dd-transition);
  background: white;
}

.dd-onboarding-option:hover {
  border-color: var(--dd-primary);
  transform: translateY(-2px);
  box-shadow: var(--dd-shadow);
}

.dd-onboarding-option.selected {
  border-color: var(--dd-accent);
  background: rgba(219, 67, 0, 0.06);
}

/* Lesson Player */
.dd-lesson-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Dashboard: Streak + Capsules */
.dd-streak-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.dd-announcement {
  margin-bottom: 1.5rem;
}

.dd-announcement-content {
  background: linear-gradient(135deg, rgba(0, 149, 165, 0.1) 0%, rgba(175, 210, 208, 0.1) 100%);
  border-left: 4px solid var(--dd-primary);
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  padding: 1.25rem 1.5rem;
  color: var(--dd-text);
  line-height: 1.6;
}

.dd-announcement-content p {
  margin: 0 0 0.75rem 0;
}

.dd-announcement-content p:last-child {
  margin-bottom: 0;
}

.dd-announcement-content strong {
  color: var(--dd-primary);
  font-weight: 600;
}

.dd-announcement-content a {
  color: var(--dd-primary);
  text-decoration: underline;
}

.dd-announcement-content a:hover {
  color: var(--dd-accent);
}

.dd-streak-left h3 {
  margin: 0 0 .25rem 0;
}

.dd-streak-row {
  display: flex;
  gap: .5rem;
  margin-top: .5rem;
}

.dd-streak-day {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dd-light);
  color: #777;
  font-weight: 600;
  font-size: 0.8rem;
}

.dd-streak-day.today {
  outline: 2px solid #0095a5;
  color: #0095a5;
  background: #fff;
}

.dd-streak-day.today.active {
  background: #0095a5;
  color: #fff;
}

.dd-streak-day.completed {
  background: #0095a5;
  color: #fff;
}

.dd-streak-day.missed {
  background: #e0e0e0;
  color: #999;
}

.dd-capsules h2 {
  margin: .5rem 1rem 1rem;
}

.dd-capsules-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dd-capsule-card {
  background: #fff;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1.5rem 1.5rem 2.5rem 1.5rem;
  gap: 1.5rem;
  width: 100%;
  position: relative;
}

.dd-capsule-card.locked {
  opacity: .8;
  filter: grayscale(.2);
}

.dd-capsule-thumb {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.dd-capsule-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dd-capsule-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dd-capsule-body h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dd-primary);
  width: 100%;
}

.dd-capsule-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: auto;
}

.dd-progress-line {
  position: absolute;
  bottom: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  height: 8px;
  background: var(--dd-light);
  border-radius: 6px;
  overflow: hidden;
}

.dd-progress-line.large {
  height: 12px;
}

.dd-progress-line span {
  display: block;
  height: 100%;
  background: var(--dd-primary);
}

/* Capsule view */
.dd-capsule-view.dd-capsule-map-view {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.dd-capsule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.75rem 3rem;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--dd-shadow);
  position: relative;
  overflow: visible;
}

.dd-capsule-header::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(91, 141, 239, 0.28), transparent 70%);
  transform: rotate(15deg);
}

.dd-capsule-header-text {
  max-width: 580px;
  position: relative;
  z-index: 1;
}

.dd-capsule-header-text h2 {
  margin: 0.25rem 0 0.75rem;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  color: #1d2d3f;
}

.dd-capsule-header-text p {
  margin: 0;
  font-size: 1.05rem;
  color: #516071;
  line-height: 1.6;
}

.dd-capsule-kicker-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dd-back-to-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.15), rgba(34, 211, 238, 0.15));
  color: #3d6fe0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(91, 141, 239, 0.2);
  border: 1px solid rgba(91, 141, 239, 0.2);
}

.dd-back-to-home:hover {
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.25), rgba(34, 211, 238, 0.25));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(91, 141, 239, 0.3);
  border-color: rgba(91, 141, 239, 0.3);
}

.dd-back-to-home:active {
  transform: translateY(-1px) scale(1.02);
}

.dd-back-to-home svg {
  width: 18px;
  height: 18px;
}

.dd-back-to-home:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dd-back-to-capsule:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Small spinner for buttons */
.dd-spinner-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.dd-spinner-ring {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(91, 141, 239, 0.3);
  border-top: 2px solid #3d6fe0;
  border-radius: 50%;
  animation: dd-spin 1s linear infinite;
}

/* Step button spinner styles */
#dd-next-step:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

#dd-next-step .dd-spinner-small {
  margin-right: 8px;
}

#dd-next-step:disabled .dd-spinner-small {
  display: inline-flex;
}

@keyframes dd-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.dd-capsule-kicker {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(91, 141, 239, 0.12);
  color: #3d6fe0;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dd-capsule-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  z-index: 1;
}

.dd-progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #f0f5ff;
  color: #3256b0;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dd-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3256b0;
  color: #fff;
  font-weight: 700;
}

.dd-chip-label {
  font-size: 0.9rem;
  max-width: 160px;
  line-height: 1.3;
}

.dd-progress-reminder {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(255, 189, 105, 0.18);
  color: #b76b12;
  font-weight: 600;
  text-align: center;
  max-width: 300px;
  line-height: 1.4;
}

.dd-progress-reminder.muted {
  margin-top: 1.25rem;
  background: rgba(91, 141, 239, 0.12);
  color: #3b5ba8;
}

.dd-capsule-body {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(260px, 1fr);
  gap: 2rem;
  align-items: start;
}

.dd-capsule-map {
  position: relative;
  background: #fff;
  border-radius: 28px;
  padding: 3rem 2.75rem;
  box-shadow: 0 30px 70px rgba(40, 83, 140, 0.12);
  overflow: visible; /* allow tooltips to overflow */
}

.dd-capsule-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(240, 245, 255, 0.6), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.dd-capsule-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1; /* Above background (z-index: 0) but below interactive nodes (z-index: 5+) */
}

.dd-map-path-base {
  fill: none;
  stroke: #dce6f8;
  stroke-width: 14;
  stroke-linecap: round;
}

.dd-map-path-progress {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
  /* Visual depth effect for the progress path */
  filter: drop-shadow(0 2px 4px rgba(0, 149, 165, 0.3));
  transition: stroke-dashoffset 1.1s ease;
}

/* Safari/iOS: drop-shadow on stroked paths can break gradient strokes */
@supports (-webkit-touch-callout: none) {
  .dd-map-path-progress {
    filter: none;
    -webkit-filter: none;
  }
}

.dd-map-nodes {
  position: relative;
  z-index: 5; /* Passer au-dessus du trait du parcours */
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  column-gap: 3rem;
  row-gap: 4rem;
}

.dd-map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  position: relative;
  z-index: 10; /* Passer au-dessus du trait du parcours */
}

.dd-map-node:not(.status-locked) {
  cursor: pointer;
}

.dd-map-node:nth-child(odd) {
  justify-self: flex-start;
}

.dd-map-node:nth-child(even) {
  justify-self: flex-end;
}

.dd-node-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(91, 141, 239, 0.18);
  position: relative;
  z-index: 10; /* Passer au-dessus du trait du parcours */
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 1; /* Default opacity for active nodes */
}

.dd-node-circle svg {
  width: 72px;
  height: 72px;
}

.status-completed .dd-node-circle {
  box-shadow: 0 16px 38px rgba(46, 204, 113, 0.26);
}

.status-current .dd-node-circle {
  transform: scale(1.08);
  box-shadow: 0 20px 46px rgba(124, 58, 237, 0.38);
}

.status-current .dd-node-circle::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.38), transparent 65%);
  animation: dd-pulse 2.4s ease-in-out infinite;
  z-index: -1;
}

.status-locked .dd-node-circle {
  opacity: 0.75; /* Reduced opacity to indicate locked/unavailable state */
  box-shadow: 0 12px 28px rgba(123, 138, 161, 0.18);
  cursor: not-allowed;
}

.status-next .dd-node-circle {
  opacity: 0.85; /* Slightly reduced opacity to indicate upcoming/not yet available state */
  background: #f3f6ff;
  box-shadow: 0 14px 32px rgba(123, 138, 161, 0.18);
}

.status-next h3 {
  color: #8d9ab0;
}

.status-next .dd-node-step {
  color: #9fb3cc;
}

.status-next .dd-node-meta {
  color: #a7b6c7;
}

.dd-map-node:not(.status-locked):hover .dd-node-circle {
  transform: scale(1.12);
  box-shadow: 0 22px 44px rgba(91, 141, 239, 0.32);
}

.dd-map-node:not(.status-locked):hover h3 {
  color: #24324a;
}

.dd-node-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 260px;
}

.dd-node-step {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5f6f80;
  font-weight: 700;
}

.dd-map-node h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #1f2a37;
}

.status-locked h3 {
  color: #9aa7b8;
}

.dd-node-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #708297;
}

.dd-node-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  position: relative;
  z-index: 10; /* Passer au-dessus du trait du parcours */
}

.dd-node-action {
  border: none;
  background: linear-gradient(135deg, #5b8def, #7c3aed);
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 32px rgba(91, 141, 239, 0.22);
  position: relative;
  z-index: 10; /* Passer au-dessus du trait du parcours */
  opacity: 1 !important; /* Forcer l'opacité à 1 pour masquer le trait */
}

.dd-node-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(91, 141, 239, 0.26);
}

/* Styles pour les boutons de leçon dans les nœuds de la carte */
.dd-node-action.dd-start-lesson {
  background: linear-gradient(135deg, #0095A5, #007A87) !important;
  color: #fff !important;
  box-shadow: 0 16px 32px rgba(0, 149, 165, 0.22);
  z-index: 10; /* Passer au-dessus du trait du parcours */
  opacity: 1 !important; /* Forcer l'opacité à 1 pour masquer le trait */
  border: none;
}

.dd-node-action.dd-start-lesson:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 149, 165, 0.26);
  background: linear-gradient(135deg, #00a5b5, #008a97) !important;
}

.dd-node-action.dd-open-lesson {
  background: linear-gradient(135deg, #00b894, #019874) !important;
  color: #fff !important;
  box-shadow: 0 16px 30px rgba(0, 184, 148, 0.22);
  z-index: 10; /* Passer au-dessus du trait du parcours */
  opacity: 1 !important; /* Forcer l'opacité à 1 pour masquer le trait */
}

.dd-node-action.dd-open-lesson:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 184, 148, 0.25);
}

.dd-btn.dd-open-lesson {
  background: linear-gradient(135deg, #019874, #017A5C) !important;
  color: #fff !important;
  border: none;
}

.dd-btn.dd-open-lesson:hover {
  background: linear-gradient(135deg, #00b894, #019874) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(1, 152, 116, 0.3);
}

.status-completed .dd-node-action {
  background: linear-gradient(135deg, #00b894, #019874);
  box-shadow: 0 16px 30px rgba(0, 184, 148, 0.22);
}

.status-completed .dd-node-action:hover {
  box-shadow: 0 18px 32px rgba(0, 184, 148, 0.25);
}

.dd-node-hint {
  font-size: 0.85rem;
  color: #7f8ea4;
  background: rgba(219, 228, 243, 0.7);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.dd-empty-map {
  background: #f2f6fd;
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  font-weight: 600;
  color: #516071;
}

.dd-capsule-summary {
  position: sticky;
  top: 120px;
}

.dd-certificate-card {
  background: linear-gradient(155deg, #ffffff, #f5f8ff 68%);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(39, 102, 176, 0.18);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: stretch;
}

.dd-cert-thumb {
  width: 100%;
  height: 200px;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.dd-cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.3s ease;
}

/* Certificate grayscale until completion */
.dd-certificate-card.is-incomplete .dd-cert-thumb img {
  filter: grayscale(100%);
}

.dd-certificate-card.is-complete .dd-cert-thumb img {
  filter: none;
  animation: dd-certificate-celebration 2s ease-out;
}

/* Certificate celebration animation */
@keyframes dd-certificate-celebration {
  0% {
    transform: scale(0.8) rotate(-5deg);
    opacity: 0.7;
  }
  
  20% {
    transform: scale(1.1) rotate(2deg);
    opacity: 1;
  }
  
  40% {
    transform: scale(0.95) rotate(-1deg);
  }
  
  60% {
    transform: scale(1.05) rotate(1deg);
  }
  
  80% {
    transform: scale(0.98) rotate(-0.5deg);
  }
  
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.dd-cert-info h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #1f2a37;
}

.dd-cert-info p {
  margin: 0;
  color: #5b6b7d;
}

.dd-progress-meter {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dd-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(51, 102, 204, 0.12);
  overflow: hidden;
  position: relative;
}

.dd-progress-track span {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b8def, #22d3ee);
  transition: width 0.6s ease;
}

.dd-progress-label {
  font-size: 0.85rem;
  color: #5f6f80;
  font-weight: 600;
}

.dd-completion-container {
  position: relative;
  min-height: calc(100vh - 120px);
  padding: 4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(91, 141, 239, 0.12), rgba(34, 211, 238, 0.08));
  overflow: hidden;
}

.dd-completion-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 28px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 30px 70px rgba(45, 85, 146, 0.22);
  position: relative;
  z-index: 1;
}

/* Certificate celebration styles */
.dd-certificate-celebration {
  position: relative;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dd-certificate-medal {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  animation: dd-medal-spin 3s ease-in-out;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
  border: 4px solid #ffd700;
  position: relative;
  z-index: 2;
}

.dd-certificate-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
  animation: dd-glow-pulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes dd-medal-spin {
  0% {
    transform: scale(0.3) rotate(-180deg);
    opacity: 0;
  }
  
  20% {
    transform: scale(0.8) rotate(-90deg);
    opacity: 0.8;
  }
  
  40% {
    transform: scale(1.1) rotate(0deg);
    opacity: 1;
  }
  
  60% {
    transform: scale(0.95) rotate(10deg);
  }
  
  80% {
    transform: scale(1.05) rotate(-5deg);
  }
  
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes dd-glow-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

.dd-completion-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.25), rgba(124, 58, 237, 0.25));
  color: #5b8def;
  font-size: 2.5rem;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.dd-completion-card h1 {
  margin: 0 0 1rem;
  font-size: 2.1rem;
  color: #1f2a37;
}

.dd-completion-message {
  margin: 0;
  font-size: 1.15rem;
  color: #2c405a;
  font-weight: 600;
}

.dd-completion-sub {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: #5b6b7d;
}

.dd-completion-badge {
  margin-top: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  color: #0f8ca6;
  font-weight: 700;
  font-size: 0.95rem;
}

.dd-capsule-review {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 18px;
  background: linear-gradient(145deg, #f8fbff 0%, #f1f5f9 100%);
  border: 1px solid #e5e7eb;
  text-align: left;
}

.dd-review-title h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

.dd-review-title p {
  margin: 6px 0 14px 0;
  color: #475569;
}

.dd-review-stars {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px 0;
  justify-content: center;
}

.dd-capsule-review-star {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #fff;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}

.dd-capsule-review-star:hover {
  transform: translateY(-2px);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.dd-capsule-review-star.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.25);
}

.dd-review-question {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #0f172a;
}

.dd-review-feedback {
  width: 100%;
  min-height: 110px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dd-review-feedback:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.dd-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
  flex-direction: column;
}

.dd-review-status {
  color: #0ea5e9;
  font-weight: 600;
  text-align: center;
}

.dd-review-status.error {
  color: #ef4444;
}

.dd-review-next-action {
  margin-top: 14px;
  padding: 12px 14px;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  display: none;
  text-align: center;
}

.dd-review-thanks {
  margin: 0 0 8px 0;
  color: #0f172a;
  font-weight: 700;
}

.dd-review-next-note {
  margin: 10px 0 0;
  text-align: center;
  color: #0f172a;
  font-weight: 600;
}

.dd-review-progress {
  position: relative;
  margin-top: 12px;
  width: 100%;
  height: 8px;
  background: #e0f2fe;
  border-radius: 999px;
  overflow: hidden;
}

.dd-review-progress span {
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  border-radius: 999px;
}

.dd-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Fireworks effect */
.dd-fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.dd-firework {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: dd-firework-burst 1.5s ease-out forwards;
}

.dd-firework::before,
.dd-firework::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.dd-firework::before {
  animation: dd-firework-spark 1.5s ease-out forwards;
}

.dd-firework::after {
  animation: dd-firework-spark 1.5s ease-out 0.2s forwards;
}

@keyframes dd-firework-burst {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes dd-firework-spark {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  
  50% {
    transform: translate(var(--spark-x, 20px), var(--spark-y, -20px)) scale(0.8);
    opacity: 0.8;
  }
  
  100% {
    transform: translate(calc(var(--spark-x, 20px) * 1.5), calc(var(--spark-y, -20px) * 1.5)) scale(0);
    opacity: 0;
  }
}

.dd-confetti span {
  position: absolute;
  top: -10%;
  width: 12px;
  height: 18px;
  border-radius: 4px;
  opacity: 0;
  animation: dd-confetti-fall 3.6s linear infinite;
  background: linear-gradient(180deg, rgba(91, 141, 239, 0.95), rgba(124, 58, 237, 0.85));
  transform-origin: center;
}

.dd-confetti span:nth-child(3n) {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.95), rgba(91, 141, 239, 0.85));
}

.dd-confetti span:nth-child(3n+1) {
  background: linear-gradient(180deg, rgba(255, 189, 105, 0.95), rgba(255, 140, 88, 0.85));
}

@keyframes dd-confetti-fall {
  0% {
    transform: translate3d(0, -12%, 0) rotate(0deg) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translate3d(0, 120vh, 0) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

@keyframes dd-pulse {
  0% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 0;
    transform: scale(1.15);
  }

  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@media (max-width: 1100px) {

  .dd-capsule-summary {
    position: static;
  }
}

/* Mobile: Réorganiser l'ordre d'affichage */
@media (max-width: 768px) {
  .dd-capsule-body {
    display: flex;
    flex-direction: column;
    gap: 0; /* Supprimer l'espace entre les éléments */
  }
  
  .dd-capsule-map {
    order: 1; /* Afficher en premier */
    width: 100%; /* Utiliser toute la largeur */
    margin: 0; /* Supprimer les marges */
  }
  
  .dd-capsule-summary {
    order: 2; /* Afficher après dd-capsule-map */
    margin-top: 1rem !important; /* Ajouter une marge en haut */
    margin-left: auto !important; /* Centrer horizontalement */
    margin-right: auto !important; /* Centrer horizontalement */
    width: 100% !important; /* Utiliser toute la largeur */
    max-width: none !important; /* Supprimer toute limitation de largeur */
    display: flex;
    justify-content: center; /* Centrer le contenu */
  }
  
}

@media (max-width: 900px) {
  .dd-capsule-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dd-capsule-header-actions {
    justify-content: flex-start;
  }

  .dd-map-nodes {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3.5rem;
  }

  .dd-map-node {
    justify-self: center !important;
  }

  .dd-capsule-map {
    padding: 2rem 1.5rem;
    width: 100%; /* Utiliser toute la largeur disponible */
  }

  .dd-capsule-summary {
    width: 100% !important; /* Utiliser toute la largeur disponible */
    margin-top: 1rem !important; /* Ajouter une marge en haut */
    margin-left: auto !important; /* Centrer horizontalement */
    margin-right: auto !important; /* Centrer horizontalement */
    max-width: none !important; /* Supprimer toute limitation de largeur */
    display: flex;
    justify-content: center; /* Centrer le contenu */
  }
}

@media (max-width: 640px) {
  .dd-capsule-header {
    padding: 2.2rem 1.6rem;
  }

  .dd-capsule-map {
    padding: 1.5rem 1rem;
    border-radius: 0; /* Supprimer les coins arrondis sur mobile */
  }

  .dd-capsule-summary {
    margin: 1rem auto 0 auto !important; /* Centrer horizontalement */
    padding: 1.5rem 1rem !important;
    border-radius: 0 !important; /* Supprimer les coins arrondis sur mobile */
    width: 100% !important; /* Forcer la largeur complète */
    max-width: none !important; /* Supprimer toute limitation de largeur */
    display: flex;
    justify-content: center; /* Centrer le contenu */
  }

  /* Responsive capsules grid - stack in single column on mobile */
  .dd-capsule-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .dd-capsule-thumb {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
  }

  .dd-capsule-body {
    margin-bottom: 1rem;
  }

  .dd-capsule-actions {
    justify-content: center;
    width: 100%; /* Prendre toute la largeur */
  }
  
  .dd-capsule-actions .dd-btn,
  .dd-capsule-actions .dd-open-capsule {
    width: 100% !important; /* Prendre toute la largeur */
    padding: 1rem 2rem !important; /* Aérer le bouton */
    text-align: center;
    display: block;
  }

  .dd-node-circle {
    width: 86px;
    height: 86px;
  }

  /* Responsive lesson breadcrumb */
  .dd-lesson-breadcrumb {
    padding: 0.875rem 1.25rem;
    gap: 0.75rem;
  }

  .dd-back-to-home {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .dd-back-to-home svg {
    width: 16px;
    height: 16px;
  }

  .dd-back-to-capsule {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .dd-back-to-capsule svg {
    width: 18px;
    height: 18px;
  }

  .dd-breadcrumb-capsule {
    font-size: 0.9rem;
  }

  .dd-node-circle svg {
    width: 64px;
    height: 64px;
  }

  .dd-completion-card {
    padding: 2.5rem 1.75rem;
  }

  .dd-completion-card h1 {
    font-size: 1.8rem;
  }

  .dd-completion-message {
    font-size: 1.05rem;
  }
}

.dd-lesson-breadcrumb {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.12), rgba(34, 211, 238, 0.12));
  padding: 1.25rem 1.75rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(91, 141, 239, 0.2);
  box-shadow: 0 4px 16px rgba(91, 141, 239, 0.1);
  backdrop-filter: blur(10px);
}

.dd-back-to-capsule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.18), rgba(34, 211, 238, 0.18));
  color: #3d6fe0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(91, 141, 239, 0.25);
  border: 1px solid rgba(91, 141, 239, 0.25);
}

.dd-back-to-capsule:hover {
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.28), rgba(34, 211, 238, 0.28));
  transform: translateX(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(91, 141, 239, 0.35);
  border-color: rgba(91, 141, 239, 0.35);
}

.dd-back-to-capsule:active {
  transform: translateX(-2px) scale(1.02);
}

.dd-back-to-capsule svg {
  width: 20px;
  height: 20px;
}

.dd-breadcrumb-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dd-breadcrumb-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
}

.dd-breadcrumb-capsule {
  font-size: 1rem;
  font-weight: 600;
  color: #1d2d3f;
}

.dd-lesson-header {
  background: white;
  padding: 2rem;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  margin-bottom: 2rem;
  text-align: center;
}

.dd-lesson-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--dd-primary);
  margin-bottom: 1rem;
}

.dd-lesson-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--dd-text);
  font-size: 0.9rem;
}

.dd-step-container {
  background: white;
  padding: 2rem;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  margin-bottom: 2rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.dd-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Rich text container ensures inline content does not stretch full width per span */
.dd-richtext {
  display: inline;
  white-space: pre-wrap; /* Preserve author-entered line breaks alongside HTML (lists, spans) */
}
.dd-richtext p { display: inline; }
.dd-richtext br { display: inline; }

.dd-responsive-iframe {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
}

.dd-responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.dd-video-desc {
  margin-top: .75rem;
  color: var(--dd-text);
  white-space: pre-wrap; /* Preserve line breaks in video descriptions */
}

/* Text holes */
.dd-text-holes { margin-top: 1rem; }
.dd-holes-text { line-height: 1.7; }
.dd-holes-text .dd-hole {
  display: inline-block;
  min-width: 2.5ch;
  padding: 0 .35em;
  margin: 0 .2em;
  border-bottom: 2px dashed var(--dd-muted, #cbd5e1);
  background: #f8fafc;
  border-radius: 4px;
  cursor: pointer;
}
.dd-holes-text .dd-hole.active {
  background: #eef2ff;
  border-bottom-color: var(--dd-primary, #6366f1);
}
.dd-badges-row {
  margin-top: .9rem;
  padding: .6rem;
  background: #f5f7fb;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.dd-badge {
  padding: .35rem .6rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: all .15s ease;
}
.dd-badge:hover { border-color: var(--dd-primary, #6366f1); box-shadow: 0 1px 0 rgba(0,0,0,.04); }

.dd-holes-feedback { margin-top: .8rem; }
.dd-holes-result { font-weight: 600; margin-bottom: .2rem; }
.dd-holes-result.correct { color: #10b981; }
.dd-holes-result.incorrect { color: #ef4444; }

/* Action list custom checkboxes */
.dd-action-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }

/* Action list header */
.dd-action-header {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 2px solid #fdcb6e;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(253, 203, 110, 0.2);
}

.dd-action-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d63031;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dd-action-header h4::before {
  content: "⚠️";
  font-size: 1.2rem;
}
.dd-action-item { display: flex; align-items: center; gap: .9rem; cursor: pointer; user-select: none; padding: .9rem 1rem; border: 2px solid #e2e8f0; border-radius: 12px; background: #fff; transition: box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.dd-action-item:hover { border-color: var(--dd-primary, #6366f1); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.dd-action-item input.dd-action-checkbox { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; appearance: none; -webkit-appearance: none; pointer-events: none; }
.dd-action-box { width: 32px; height: 32px; border-radius: 8px; border: 2px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center; background: #fff; transition: all .15s ease; flex: 0 0 auto; }
.dd-action-item:hover .dd-action-box { border-color: var(--dd-primary, #6366f1); }
.dd-action-item .dd-action-checkbox:checked + .dd-action-box { background: var(--dd-primary, #6366f1); border-color: var(--dd-primary, #6366f1); box-shadow: 0 2px 8px rgba(99,102,241,.25); }
.dd-action-item .dd-action-checkbox:checked + .dd-action-box::after { content: '✓'; color: #fff; font-weight: 800; font-size: 18px; line-height: 1; }
.dd-action-item .dd-action-checkbox:checked ~ .dd-action-text { color: #64748b; text-decoration: line-through; }
.dd-action-text { line-height: 1.6; font-size: 1.05rem; }
.dd-action-feedback { margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; background: #ecfdf5; border: 1px solid #bbf7d0; }
.dd-action-result { font-weight: 700; margin-bottom: .2rem; color: #10b981; }

/* Feedback */
.dd-feedback textarea.dd-feedback-text { width: 100%; min-height: 120px; padding: 1rem; border-radius: 10px; border: 2px solid #e2e8f0; background: #fff; resize: vertical; font-size: 1rem; line-height: 1.5; }
.dd-feedback textarea.dd-feedback-text:focus { outline: none; border-color: var(--dd-primary, #6366f1); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.dd-feedback textarea.dd-feedback-text.invalid { border-color: #ef4444; background: #fff5f5; }
.dd-fb-meta { margin-top: .4rem; color: #64748b; font-size: .9rem; }
.dd-feedback-error { margin-top: .6rem; padding: .6rem .8rem; border-radius: 8px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-size: .95rem; }
.dd-feedback-disclaimer { margin-top: .6rem; font-size: .85rem; color: #64748b; }

/* Tooltip over node circle */
.dd-map-node { position: relative; }
.dd-map-node .dd-node-circle { position: relative; }
.dd-node-tooltip { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin: 0 0 8px 0; width: 280px; max-width: 90vw; background: rgba(31,33,32,.92); color: #fff; padding: .75rem 1rem; border-radius: 12px; opacity: 0; transition: opacity .15s ease; pointer-events: none; box-shadow: 0 10px 26px rgba(0,0,0,.22); z-index: 99999; font-size: .95rem; visibility: hidden; }
.dd-node-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border-width: 6px 6px 0 6px; border-style: solid; border-color: rgba(31,33,32,.92) transparent transparent transparent; }
.dd-map-node:hover .dd-node-tooltip { opacity: 1; visibility: visible; }
.dd-node-tooltip h4 { margin: 0 0 .25rem 0; font-size: .95rem; font-weight: 700; }
.dd-node-tooltip p { margin: 0; font-size: .95rem; line-height: 1.45; color: #e5e7eb; }

/* Quiz styles */
.dd-quiz-container {
  margin: 1rem 0;
}

.dd-quiz-question {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.dd-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dd-quiz-option {
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.dd-quiz-option:hover {
  border-color: var(--dd-primary);
  background: #f8fafc;
}

.dd-quiz-option.selected {
  border-color: #10b981;
  background: #ecfdf5;
}

.dd-quiz-option.correct-answer {
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
}

.dd-quiz-feedback {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.dd-quiz-result {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dd-quiz-result.correct {
  color: #10b981;
}

.dd-quiz-result.incorrect {
  color: #ef4444;
}
.dd-btn.dd-btn-primary.dd-btn-disabled,
.dd-btn.dd-btn-outline.dd-btn-disabled,
.dd-btn-disabled {
  opacity: .5;
  pointer-events: none;
}

.dd-quiz-message {
  color: var(--dd-text);
  font-size: 0.95rem;
}

.dd-alert {
  background: #fff3cd;
  color: #664d03;
  padding: .75rem 1rem;
  border-radius: 6px;
  border: 1px solid #ffe69c;
}

.dd-checklist {
  margin: .75rem 0 0 0;
  padding-left: 1rem;
}

.dd-step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--dd-border);
}

/* Download button */
.dd-download-desc { margin-bottom: 1rem; }
.dd-download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--dd-primary);
  color: #fff;
  border: none;
  border-radius: var(--dd-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--dd-transition);
  cursor: pointer;
}
.dd-download-button:hover {
  background: var(--dd-primary-dark, #008a9a);
  box-shadow: 0 4px 12px rgba(0, 149, 165, 0.3);
  transform: translateY(-1px);
}
.dd-download-button:active {
  transform: translateY(0);
}
.dd-download-button .dd-download-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.dd-download-button .dd-download-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}
.dd-download-button .dd-download-label {
  color: #fff;
}

.dd-step-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dd-text);
  font-size: 0.9rem;
}






/* Quiz Styles */
.dd-quiz-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--dd-primary);
}

.dd-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dd-quiz-option {
  padding: 1rem;
  border: 2px solid var(--dd-border);
  border-radius: var(--dd-radius);
  cursor: pointer;
  transition: var(--dd-transition);
  background: white;
}

.dd-quiz-option:hover {
  border-color: var(--dd-primary);
  background: rgba(0, 149, 165, 0.05);
}

.dd-quiz-option.selected {
  border-color: var(--dd-accent);
  background: rgba(219, 67, 0, 0.05);
}

.dd-quiz-option.correct {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.dd-quiz-option.incorrect {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
}

/* Progress & Gamification */
.dd-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--dd-background);
  box-shadow: var(--dd-shadow);
  padding: 1rem 2rem;
}

.dd-progress-bar {
  width: 100%;
  height: 12px;
  background: var(--dd-light);
  overflow: hidden;
  margin: 1rem 0;
}
.post-wrap {
  padding:10px !important;
}
.dd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dd-primary), var(--dd-secondary));
  transition: width 0.8s ease;
}

.dd-progress-text {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--dd-text);
}

.dd-xp-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--dd-accent);
}

.dd-stars {
  display: flex;
  gap: 0.25rem;
}

.dd-star {
  width: 24px;
  height: 24px;
  color: #ffc107;
}

.dd-star.empty {
  color: var(--dd-border);
}

/* Animations */
.dd-fade-in {
  animation: dd-fade-in 0.5s ease;
}

@keyframes dd-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dd-slide-in-right {
  animation: dd-slide-in-right 0.5s ease;
}

@keyframes dd-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dd-bounce {
  animation: dd-bounce 0.6s ease;
}

@keyframes dd-bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .dd-main {
    padding: 1rem;
  }

  .dd-lesson-header {
    padding: 1.5rem;
  }

  .dd-lesson-title {
    font-size: 1.5rem;
  }

  .dd-lesson-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dd-step-container {
    padding: 1.5rem;
  }

  .dd-character {
    flex-direction: column;
    text-align: center;
  }

  .dd-character-bubble::before,
  .dd-character-bubble::after {
    display: none;
  }

  .dd-onboarding-options {
    grid-template-columns: 1fr;
  }
  
  /* Mobile-specific loading improvements */
  .dd-loading-screen {
    /* Ensure proper mobile viewport handling */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%; /* occuper 100% du conteneur, pas plus */
    max-width: 100%;
    transform: translate3d(0, 0, 0); /* Force hardware acceleration */
    -webkit-transform: translate3d(0, 0, 0);
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Use CSS custom property for mobile */
    overflow-x: hidden; /* empêcher tout débordement horizontal */
    box-sizing: border-box;
  }
  
  /* Mobile loading adjustments */
  .dd-loading {
    gap: 2rem;
    max-width: 95%; /* Largeur relative simple */
    width: 95%; /* Largeur relative simple */
    padding: 0;
    margin: 0 auto; /* Centrer avec auto */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrer le contenu */
    justify-content: center;
    box-sizing: border-box !important; /* Forcer border-box */
  }
  
  .dd-loading-icons {
    height: 70px; /* Plus grand */
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .dd-loading-icon {
    font-size: 3rem; /* Plus gros */
    animation-duration: 2s;
  }
  
  
  .dd-loading-text {
    font-size: 1.2rem; /* Plus gros */
    line-height: 1.5;
    width: 100%; /* Prendre toute la largeur */
    text-align: center;
  }
  
  .dd-loading-dots {
    margin-top: 0.5rem;
  }
  
  .dd-loading-dot {
    width: 8px; /* Plus gros */
    height: 8px;
  }
  
  /* Prevent mobile zoom issues */
  .dd-learning-app {
    font-size: 16px; /* Prevent zoom on iOS */
    -webkit-text-size-adjust: 100%;
  }
  
  /* Ensure proper mobile rendering */
  .dd-app-container {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* Use CSS custom property for mobile */
    /* Force hardware acceleration */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 480px) {
  .dd-header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .dd-step-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .dd-btn {
    width: 100%;
  }

  .dd-capsule-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1rem 2.5rem 1rem;
  }

  .dd-capsule-thumb {
    width: 100px;
    height: 100px;
  }

  .dd-capsule-actions {
    width: 100%;
  }

  .dd-capsule-actions .dd-btn {
    width: 100%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.dd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.dd-btn:focus,
.dd-form-input:focus,
.dd-quiz-option:focus,
.dd-onboarding-option:focus {
  outline: 2px solid var(--dd-accent);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --dd-border: #000000;
    --dd-text: #000000;
    --dd-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

/* Welcome Screen Styles - Following onboarding design */
.dd-welcome-screen {
  min-height: 100vh;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dd-text);
  overflow-x: hidden;
  position: relative;
}

.dd-welcome-container {
  min-height: 100vh;
  background: transparent;
  font-family: inherit;
  color: var(--dd-text);
  overflow-x: hidden;
}

/* Welcome Header - Clean and minimal like onboarding */
.dd-welcome-header {
  text-align: center;
  padding: 1rem;
  background: #ffffff;
  color: var(--dd-text);
  position: relative;
  border-bottom: 1px solid rgba(0, 149, 165, 0.1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}


.dd-welcome-logo {
  height: 50px;
  width: auto;
  max-width: 150px;
}

/* Hero Section - Same style as onboarding */
.dd-welcome-hero {
  text-align: center;
  padding: 0 16px;
  background: #ffffff;
  color: var(--dd-text);
  position: relative;
}

.dd-welcome-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  color: var(--dd-primary);
  background: linear-gradient(135deg, var(--dd-primary), #1BA5B8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-wrap: break-word;
  hyphens: auto;
}

.dd-welcome-subtitle {
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  font-weight: 700;
  min-height: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  margin-bottom: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.dd-rotating-text {
  position: relative;
  font-weight: 700;
  color: var(--dd-primary);
  background: linear-gradient(135deg, var(--dd-primary), #1BA5B8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dd-rotating-text .dd-text-item {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  width: 80%;
  opacity: 0;
  transition: all 0.6s ease-in-out;
  white-space: nowrap;
  color: var(--dd-primary);
  background: linear-gradient(135deg, var(--dd-primary), #1BA5B8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  word-break: break-word;
}

.dd-rotating-text .dd-text-item.active {
  opacity: 1;
  transform: translateY(0);
}

.dd-rotating-text .dd-text-item.exit {
  opacity: 0;
  transform: translateY(-20px);
}

#dd-start-trial {
  width:90%;
  padding:30px;
}
/* Testimonial Section - Same style as onboarding intro */
.dd-welcome-testimonial {
  margin: 0 2rem 1rem 2rem;
  padding: 1.5rem;
  background: rgba(0, 149, 165, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(0, 149, 165, 0.1);
}

.dd-testimonial-text {
  font-size: 1.1rem;
  margin: 0.5rem 0;
  line-height: 1.6;
  color: #6c6c6c;
}

.dd-testimonial-text:last-of-type {
  font-weight: 600;
  margin-top: 1rem;
  color: #6c6c6c;
  margin-bottom: 0;
}

.dd-testimonial-source {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dd-primary);
  margin-top: 0.5rem;
  display: block;
}

/* Action Buttons */
.dd-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

.dd-welcome-btn {
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-decoration: none;

  /* Accessibility */
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.dd-welcome-btn:focus-visible {
  outline: 2px solid var(--dd-primary);
  outline-offset: 2px;
}

.dd-welcome-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Bouton principal - "Commencer mon test gratuit" */
.dd-welcome-btn-primary {
  background: #DB4300;
  color: #fff;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  min-width: 280px;
  box-shadow: 0 4px 20px rgba(0, 149, 165, 0.3);
}

.dd-welcome-btn-primary:hover {
  background: #C13D02;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 149, 165, 0.4);
}

.dd-welcome-btn-primary:active {
  transform: translateY(0);
}

/* Bouton secondaire - "Déjà membre, me connecter" - Plus petit */
.dd-welcome-btn-secondary {
  background: transparent;
  color: var(--dd-primary);
  border: 1px solid var(--dd-primary);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-width: 220px;
  box-shadow: none;
}

.dd-welcome-btn-secondary:hover {
  background: var(--dd-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 149, 165, 0.3);
}

/* Trial subtitle */
.dd-trial-subtitle {
  text-align: center;
  margin: 0.5rem 0;
  color: #fff;
  line-height: 1.4;
  font-size: 0.7rem; 
  margin-top: 0.5rem; 
  opacity: 0.9;
}

/* Test link */
.dd-test-link {
  display: block;
  text-align: center;
  margin: 1rem 0;
  color: var(--dd-primary);
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.dd-test-link:hover {
  color: #007A87;
  text-decoration: none;
  background: none;
}

.dd-test-link:focus {
  outline: 2px solid var(--dd-primary);
  outline-offset: 2px;
  border-radius: 4px;
  background: none;
}

/* Login Form - Same style as onboarding */
.dd-welcome-login-form {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background: rgba(0, 149, 165, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(0, 149, 165, 0.1);
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease, max-height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
}

.dd-welcome-login-form.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  margin: 2rem auto 0;
  padding: 1.5rem;
}

/* Welcome Image */
.dd-welcome-image {
  text-align: center;
  margin: 2rem auto 0;
  opacity: 1;
  visibility: visible;
  max-height: 400px;
  overflow: hidden;
  transition: all 0.5s ease, max-height 0.5s ease, margin 0.5s ease;
}

.dd-welcome-image.hide {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin: 0 auto;
}

.dd-welcome-image img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.dd-login-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dd-login-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dd-primary);
  margin: 0;
  flex: 1;
  text-align: center;
}

.dd-login-form-close {
  background: none;
  border: none;
  color: var(--dd-text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.dd-login-form-close:hover {
  background: rgba(0, 149, 165, 0.1);
  color: var(--dd-primary);
}

.dd-login-form-close:focus {
  outline: 2px solid var(--dd-primary);
  outline-offset: 2px;
}

.dd-login-form-group {
  margin-bottom: 1rem;
}

.dd-login-form-label {
  display: block;
  font-weight: 600;
  color: var(--dd-text);
  margin-bottom: 0.5rem;
}

.dd-login-form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--dd-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.dd-login-form-input:focus {
  outline: none;
  border-color: var(--dd-primary);
  box-shadow: 0 0 0 3px rgba(0, 149, 165, 0.1);
}

.dd-login-form-input:focus-visible {
  outline: 2px solid var(--dd-primary);
  outline-offset: 2px;
}

.dd-login-form-input:invalid {
  border-color: #dc3545;
}

.dd-login-form-input:invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.dd-login-form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.dd-login-form-submit {
  width: 100%;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--dd-primary), #1BA5B8);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 149, 165, 0.3);
}

.dd-login-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 149, 165, 0.4);
}

.dd-login-form-submit:active {
  transform: translateY(0);
}

.dd-login-form-forgot {
  text-align: center;
  font-size: 0.9rem;
}

.dd-login-form-forgot a {
  color: var(--dd-primary);
  text-decoration: none;
}

.dd-login-form-forgot a:hover {
  text-decoration: underline;
}

.dd-login-form-error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Responsive Design - Following onboarding patterns */
@media (min-width: 768px) {
  .dd-welcome-actions {
    /* Garder les boutons centrés verticalement même sur desktop */
    flex-direction: column;
    gap: 1rem;
  }

  .dd-welcome-hero {
    padding: 16px;
  }
  
  .dd-welcome-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }

  .dd-welcome-subtitle {
    font-size: clamp(2rem, 3vw, 2.8rem);
    min-height: clamp(2.5rem, 4vw, 3.5rem);
  }
}

@media (max-width: 640px) {
  .dd-welcome-header {
    padding: 2rem 1rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .dd-welcome-logo {
    order: 1;
    height: 40px;
  }

  .dd-welcome-hero {
    padding: 16px;
  }

  .dd-welcome-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 1rem;
  }

  .dd-welcome-subtitle {
    font-size: clamp(1.35rem, 5vw, 2.2rem);
    min-height: clamp(1.8rem, 4.5vw, 2.4rem);
    padding: 0 0.5rem;
    margin-bottom: 0.25rem;
  }
  .dd-rotating-text .dd-text-item {
    left: 5%;
    right: 5%;
    width: 90%;
    font-size: inherit;
    white-space: normal;
    line-height: 1.2;
    padding: 0;
  }

  .dd-welcome-testimonial {
    padding: 0.875rem;
    margin: 0.25rem auto 0.875rem;
  }

  .dd-welcome-actions {
    padding: 0 1rem;
  }

  .dd-welcome-btn {
    min-width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }

  .dd-welcome-login-form {
    margin: 1rem auto 0;
    padding: 1rem;
    transition: opacity 0.1s ease;
    transform: none !important;
  }

  .dd-welcome-login-form.show {
    margin: 1rem auto 0;
    padding: 1rem;
  }

  .dd-welcome-image {
    margin: 1rem auto 0;
  }

  .dd-login-form-header {
    flex-direction: row;
    gap: 1rem;
  }

  .dd-login-form-title {
    font-size: 1.3rem;
  }
}

/* Très petits écrans - pour les textes rotatifs longs */
@media (max-width: 480px) {
  .dd-welcome-subtitle {
    min-height: clamp(3rem, 8vw, 4rem);
  }
  
  .dd-rotating-text .dd-text-item {
    left: 2%;
    right: 2%;
    width: 96%;
    font-size: clamp(0.9rem, 3.5vw, 1.4rem);
    white-space: normal;
    line-height: 1.2;
    padding: 0;
  }
  
  .dd-welcome-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }
}

/* Accessibility and Performance - Following onboarding patterns */
@media (prefers-reduced-motion: reduce) {
  .dd-rotating-text .dd-text-item {
    transition: opacity 0.1s ease;
    transform: none !important;
  }

  .dd-welcome-btn {
    transition: background-color 0.1s ease;
  }

  .dd-welcome-btn:hover {
    transform: none !important;
  }

  .dd-welcome-login-form {
    transition: opacity 0.1s ease;
    transform: none !important;
  }
}

/* Screen reader only content */
.dd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard navigation */
.dd-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--dd-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.dd-skip-link:focus {
  top: 6px;
}

/* Step Images Styles */
.dd-step-image {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
}

.dd-step-image img {
  max-width: 100%;
  height: auto;
  transition: var(--dd-transition);
}

.dd-step-image img:hover {
  transform: scale(1.02);
}

/* Responsive image sizing */
@media (min-width: 768px) {
  .dd-step-image img {
    max-width: 600px;
  }
}

@media (max-width: 767px) {
  .dd-step-image {
    margin: 1.5rem 0;
    padding: 0.5rem;
  }
  
  .dd-step-image img {
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .dd-step-image {
    margin: 1rem 0;
    padding: 0;
  }
}

/* Custom List Styles */
.dd-custom-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.dd-custom-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Bullet list styles */
ul.dd-custom-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background-color: #0095A5;
  border-radius: 50%;
  transform: translateY(-50%);
}

/* Numbered list styles */
ol.dd-custom-list li::before {
  content: counter(list-counter);
  counter-increment: list-counter;
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #0095A5;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transform: translateY(-0.1rem);
}

ol.dd-custom-list {
  counter-reset: list-counter;
}

/* Nested lists */
ul.dd-custom-list ul,
ol.dd-custom-list ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  margin-left:1rem;
}

ul.dd-custom-list ul li::before {
  width: 6px;
  height: 6px;
  background-color: #AFD2D0;
}

ol.dd-custom-list ol li::before {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.7rem;
  background-color: #AFD2D0;
}

/* Formatting toolbar styles */
.dd-formatting-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  flex-wrap: wrap;
}

.dd-format-btn,
.dd-btn-mini {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dd-format-btn:hover,
.dd-btn-mini:hover {
  background-color: #0095A5;
  color: white;
  border-color: #0095A5;
}

.dd-format-btn:active,
.dd-btn-mini:active {
  transform: translateY(1px);
}

/* Link button specific styling */
.dd-btn-mini.dd-link {
  white-space: nowrap;
  min-width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Text editor container */
.dd-text-editor {
  position: relative;
}

.dd-text-editor textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: inherit;
  resize: vertical;
}

.dd-text-editor textarea:focus {
  outline: none;
  border-color: #0095A5;
  box-shadow: 0 0 0 2px rgba(0, 149, 165, 0.2);
}

/* Pre-lesson profile question */
.dd-pre-lesson-question {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 3rem 1.5rem;
  background: var(--dd-light);
}

.dd-pre-lesson-card {
  width: 100%;
  max-width: 720px;
  background: var(--dd-background);
  border-radius: 24px;
  padding: 2.5rem 3rem;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.08);
}

.dd-pre-lesson-header {
  margin-bottom: 2rem;
}

.dd-pre-lesson-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--dd-accent);
  margin-bottom: 0.75rem;
}

.dd-pre-lesson-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  color: #1f2933;
}

.dd-pre-lesson-options {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dd-pre-lesson-options-scale {
  grid-template-columns: 1fr;
}

.dd-pre-lesson-option {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  border: 2px solid rgba(0, 0, 0, 0.05);
  background: var(--dd-background);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dd-pre-lesson-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.dd-pre-lesson-option.selected {
  border-color: var(--dd-accent);
  background: linear-gradient(135deg, rgba(219, 67, 0, 0.1), rgba(219, 67, 0, 0.05));
  box-shadow: 0 20px 38px rgba(219, 67, 0, 0.18);
  transform: translateY(-3px);
}

.dd-pre-lesson-option-emoji {
  font-size: 2rem;
  line-height: 1;
}

.dd-pre-lesson-option-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dd-pre-lesson-option-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2933;
}

.dd-pre-lesson-option-desc {
  font-size: 0.95rem;
  color: var(--dd-text);
}

.dd-pre-lesson-scale {
  flex-direction: column;
  align-items: flex-start;
}

.dd-pre-lesson-scale-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2933;
}

.dd-pre-lesson-scale-desc {
  font-size: 0.95rem;
  color: var(--dd-text);
  margin-top: 0.35rem;
}

.dd-pre-lesson-helper {
  margin: 10px;
  color: var(--dd-text);
  font-size: 0.95rem;
  text-align: center;
}

.dd-pre-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.dd-pre-lesson-actions .dd-btn {
  min-width: 200px;
}

@media (max-width: 768px) {
  .dd-pre-lesson-question {
    min-height: auto;
    padding: 2rem 1rem;
  }

  .dd-pre-lesson-card {
    padding: 2rem 1.75rem;
    border-radius: 20px;
  }

  .dd-pre-lesson-options {
    grid-template-columns: 1fr;
  }

  .dd-pre-lesson-actions {
    flex-direction: column-reverse;
  }

  .dd-pre-lesson-actions .dd-btn {
    width: 100%;
    min-width: unset;
  }
}

/* Spinner pour le bouton de sauvegarde */
.dd-save-lesson {
  position: relative;
  transition: all 0.3s ease;
}

.dd-save-lesson:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.dd-save-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: dd-spin 1s linear infinite;
  margin-right: 8px;
}

.dd-save-lesson.saving .dd-save-spinner {
  display: inline-block;
}

.dd-save-lesson.saving .dd-save-text {
  opacity: 0.7;
}

@keyframes dd-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Activity Rating Step Styles */
.dd-activity-rating {
  margin: 2rem 0;
}

.dd-activity-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--dd-light);
  border-radius: var(--dd-radius);
  border-left: 4px solid var(--dd-primary);
}

.dd-activity-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.dd-activity-details {
  flex: 1;
}

.dd-activity-name {
  font-size: 1.1rem;
  color: var(--dd-primary);
  margin: 0;
  font-weight: 600;
}

.dd-rating-scale {
  text-align: center;
}

.dd-rating-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--dd-text);
}

.dd-rating-min,
.dd-rating-max {
  font-weight: 500;
}

.dd-rating-slider-container {
  position: relative;
  margin: 1.5rem 0;
}

.dd-rating-slider {
  width: 100%;
  height: 8px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.dd-rating-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--dd-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 149, 165, 0.3);
  transition: var(--dd-transition);
}

.dd-rating-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 149, 165, 0.4);
}

.dd-rating-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--dd-primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 149, 165, 0.3);
  transition: var(--dd-transition);
}

.dd-rating-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 149, 165, 0.4);
}

.dd-rating-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--dd-light);
  border-radius: 4px;
  transform: translateY(-50%);
  pointer-events: none;
}

.dd-rating-fill {
  height: 100%;
  background: var(--dd-primary);
  border-radius: 4px;
  transition: var(--dd-transition);
  width: 0%;
}

.dd-rating-value {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--dd-light);
  border-radius: var(--dd-radius);
  border: 2px solid transparent;
  transition: var(--dd-transition);
}

.dd-rating-value.has-rating {
  background: #e7faf9;
  border-color: var(--dd-primary);
}

.dd-rating-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dd-primary);
  margin-bottom: 0.5rem;
}

.dd-rating-text {
  font-size: 1rem;
  color: var(--dd-text);
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dd-rating-handle {
    width: 24px;
    height: 24px;
  }
  
  .dd-rating-number {
    font-size: 1.5rem;
  }
}

/* Sidebar Styles */
.dd-capsules-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.dd-capsules-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dd-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-radius: var(--dd-radius);
  box-shadow: var(--dd-shadow);
  padding: 1.5rem;
  position: sticky;
  top: 2rem;
}

.dd-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dd-sidebar-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--dd-primary);
  font-weight: 600;
}

/* Certificates Styles */
.dd-certificates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
}

.dd-certificate {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  background: var(--dd-light);
  border-radius: var(--dd-radius);
  border-left: 4px solid var(--dd-primary);
  transition: var(--dd-transition);
}

.dd-certificate:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 149, 165, 0.2);
}

.dd-certificate-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dd-certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dd-no-certificates {
  text-align: center;
  color: var(--dd-text);
  font-style: italic;
  padding: 1rem;
  grid-column: 1 / -1;
}

/* Activity Rankings Styles */
.dd-activity-ranking {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dd-activity-item {
  padding: 0.75rem;
  background: var(--dd-light);
  border-radius: var(--dd-radius);
  border-left: 4px solid var(--dd-primary);
  transition: var(--dd-transition);
}

.dd-activity-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 149, 165, 0.1);
}

.dd-activity-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dd-activity-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.dd-activity-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: var(--dd-transition);
}

.dd-activity-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dd-activity-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dd-activity-name {
  font-weight: 600;
  color: var(--dd-primary);
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.dd-activity-rating-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.dd-rating-stars {
  color: #ffc107;
  font-size: 0.9rem;
}

/* Progress Stats */
.dd-progress-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dd-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--dd-bg-light);
  border-radius: 8px;
  border: 1px solid var(--dd-border);
}

.dd-stat-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dd-accent-light);
  border-radius: 50%;
}

.dd-stat-content {
  flex: 1;
}

.dd-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dd-accent);
  line-height: 1;
}

/* Star display styles using Font Awesome */
.dd-star-full,
.dd-star-full.fa {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

.dd-star-half,
.dd-star-half.fa {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

.dd-star-empty,
.dd-star-empty.fa {
    color: #ddd;
    font-size: 16px;
    margin-right: 3px;
}

/* Font Awesome star icons (FA4) */
.fa.fa-star {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

.fa.fa-star-o {
    color: #ddd;
    font-size: 16px;
    margin-right: 3px;
}

.fa.fa-star-half-o {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

/* Font Awesome star icons (FA5+) */
.fas.fa-star {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

.far.fa-star {
    color: #ddd;
    font-size: 16px;
    margin-right: 3px;
}

.fas.fa-star-half-alt,
.fas.fa-star-half {
    color: #ffd700;
    font-size: 16px;
    margin-right: 3px;
}

/* Emoji fallback styles */
.dd-star-full,
.dd-star-half,
.dd-star-empty {
    font-size: 16px;
    margin-right: 3px;
    display: inline-block;
}

.dd-star-empty {
    opacity: 0.3;
}

.dd-stat-label {
  font-size: 0.875rem;
  color: var(--dd-text-muted);
  margin-top: 0.25rem;
}

/* Step Completion Feedback */
.dd-step-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  border: 1px solid var(--dd-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease-out;
}

.dd-feedback-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.dd-feedback-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dd-accent-light);
  border-radius: 50%;
}

.dd-feedback-text {
  flex: 1;
}

.dd-feedback-title {
  font-weight: 600;
  color: var(--dd-text);
  margin-bottom: 0.25rem;
}

.dd-feedback-stats {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.dd-feedback-xp {
  background: var(--dd-accent);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.dd-feedback-stars {
  color: #ffc107;
  font-size: 1rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.dd-rating-number {
  font-size: 0.8rem;
  color: var(--dd-text);
  font-weight: 500;
}

.dd-no-ratings {
  text-align: center;
  color: var(--dd-text);
  font-style: italic;
  padding: 1rem;
}

/* Resources Styles */
.dd-resources {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dd-resource-item {
  padding: 0.75rem;
  background: var(--dd-light);
  border-radius: var(--dd-radius);
  border-left: 4px solid var(--dd-primary);
  transition: var(--dd-transition);
}

.dd-resource-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 149, 165, 0.1);
}

.dd-resource-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dd-resource-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.dd-resource-details {
  flex: 1;
  min-width: 0;
}

.dd-resource-title {
  font-weight: 600;
  color: var(--dd-primary);
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-resource-source {
  font-size: 0.8rem;
  color: var(--dd-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-resource-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--dd-primary);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--dd-transition);
  flex-shrink: 0;
}

.dd-resource-download:hover {
  background: var(--dd-primary-dark);
  transform: scale(1.05);
  color: white;
  text-decoration: none;
}

.dd-no-resources {
  text-align: center;
  color: var(--dd-text);
  font-style: italic;
  padding: 1rem;
  margin: 0;
}

/* Sidebar Placeholder/Welcome */
.dd-sidebar-placeholder {
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #e7faf9 0%, #f0f8ff 100%);
  border-radius: var(--dd-radius);
  text-align: center;
}

.dd-sidebar-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dd-welcome-icon {
  font-size: 3rem;
  animation: dd-pulse 2s ease-in-out infinite;
}

@keyframes dd-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.dd-sidebar-welcome h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--dd-primary);
  font-weight: 700;
}

.dd-sidebar-welcome > p {
  margin: 0.5rem 0;
  color: var(--dd-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dd-sidebar-benefits {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dd-sidebar-benefits li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--dd-text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: var(--dd-transition);
}

.dd-sidebar-benefits li:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 8px rgba(0, 149, 165, 0.1);
}

.dd-benefit-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.dd-sidebar-cta {
  margin-top: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 2px dashed var(--dd-primary);
}

.dd-cta-text {
  margin: 0;
  color: var(--dd-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

/* Responsive adjustments for sidebar */
@media (max-width: 1024px) {
  .dd-capsules-layout {
    flex-direction: column;
  }
  
  .dd-sidebar {
    width: 100%;
    position: static;
    order: -1; /* Afficher avant dd-capsules-grid */
  }
}

@media (max-width: 768px) {
  .dd-capsules-layout {
    gap: 1rem;
    flex-direction: column;
  }
  
  .dd-capsules-grid {
    order: 0; /* Afficher en premier dans dd-capsules-layout */
  }
  
  .dd-sidebar {
    padding: 1rem;
    order: 1; /* Afficher après dd-capsules-grid */
  }
  
  .dd-sidebar-content {
    gap: 1.5rem;
  }
}

/* Badges System */
.dd-badges-section {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.dd-badges-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--dd-text-main, #1f2937);
}

.dd-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.dd-badge-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dd-badge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dd-badge-card.locked {
    opacity: 0.7;
    background: #f9fafb;
}

.dd-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dd-badge-info {
    overflow: hidden;
}

.dd-badge-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dd-text-main, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-badge-stage {
    font-size: 0.8rem;
    color: var(--dd-text-muted, #6b7280);
}

/* Badge Unlock Overlay */
.dd-badge-unlock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dd-badge-unlock-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.dd-badge-unlock-celebration {
    font-weight: 700;
    color: var(--dd-primary, #6366f1);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.dd-badge-unlock-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.dd-badge-unlock-content h2 {
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
}

.dd-badge-unlock-content p {
    color: var(--dd-text-muted, #6b7280);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.dd-badge-unlock-stage {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2rem;
}

.dd-badge-unlock-close {
    width: 100%;
    padding: 1rem;
    font-weight: 600;
}
