/* ====================================
   Variables CSS Seed I.T
   ==================================== */
:root {
  --seedit-primary: #037CFB;
  --seedit-primary-light: #4DB6FF;
  --seedit-bg-dark: #1a1a2e;
  --seedit-bg-darker: #16213e;
  --seedit-radius: 12px;
  --seedit-transition: 0.25s ease;
  --seedit-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

  /* Variables spécifiques aux progress bars */
  --seedit-progress-height: 12px;
  --seedit-progress-bg: rgba(255, 255, 255, 0.1);
  --seedit-progress-radius: 999px;
}

/* ====================================
   Reset & Base
   ==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--seedit-bg-dark) 0%, var(--seedit-bg-darker) 100%);
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ====================================
   Conteneur de démonstration
   ==================================== */
.seedit-progress-demo {
  width: 100%;
  max-width: 700px;
}

.seedit-progress-demo__container {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--seedit-radius);
  padding: 2.5rem;
  box-shadow: var(--seedit-shadow);
}

.seedit-progress-demo__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.seedit-progress-demo__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ====================================
   Section progress
   ==================================== */
.seedit-progress-section {
  margin-bottom: 2.5rem;
}

.seedit-progress-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.seedit-progress-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.seedit-progress-section__value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--seedit-primary-light);
  font-family: 'Courier New', monospace;
}

.seedit-progress-section__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--seedit-primary-light);
  background: rgba(77, 182, 255, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

/* ====================================
   Progress Bar (Base)
   ==================================== */
.seedit-progress-bar {
  width: 100%;
  height: var(--seedit-progress-height);
  background: var(--seedit-progress-bg);
  border-radius: var(--seedit-progress-radius);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ====================================
   Progress Bar Fill
   ==================================== */
.seedit-progress-bar__fill {
  height: 100%;
  position: relative;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--seedit-progress-radius);
  overflow: hidden;
}

/* Gradient animé à l'intérieur du fill */
.seedit-progress-bar__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--seedit-primary) 0%,
    var(--seedit-primary-light) 25%,
    #ffffff 50%,
    var(--seedit-primary-light) 75%,
    var(--seedit-primary) 100%
  );
  background-size: 200% 100%;
  animation: seedit-progress-gradient-flow 2s linear infinite;
}

/* ====================================
   Progress Bar Indéterminée
   ==================================== */
.seedit-progress-bar__fill--indeterminate {
  width: 100%;
  background: transparent;
}

.seedit-progress-bar__fill--indeterminate .seedit-progress-bar__gradient {
  animation: seedit-progress-indeterminate 1.5s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--seedit-primary) 25%,
    var(--seedit-primary-light) 50%,
    var(--seedit-primary) 75%,
    transparent 100%
  );
  background-size: 50% 100%;
}

/* ====================================
   Progress Bar Segmentée
   ==================================== */
.seedit-progress-bar--segmented {
  display: flex;
  gap: 0.5rem;
  background: transparent;
  height: auto;
}

.seedit-progress-bar__segment {
  flex: 1;
  height: var(--seedit-progress-height);
  background: var(--seedit-progress-bg);
  border-radius: var(--seedit-progress-radius);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seedit-progress-bar__segment--completed .seedit-progress-bar__gradient,
.seedit-progress-bar__segment--active .seedit-progress-bar__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--seedit-primary) 0%,
    var(--seedit-primary-light) 50%,
    var(--seedit-primary) 100%
  );
  background-size: 200% 100%;
}

.seedit-progress-bar__segment--completed .seedit-progress-bar__gradient {
  animation: none;
  background-position: 0% 50%;
}

.seedit-progress-bar__segment--active .seedit-progress-bar__gradient {
  animation: seedit-progress-gradient-flow 2s linear infinite;
}

.seedit-progress-bar__segment-label {
  position: relative;
  z-index: 1;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ====================================
   Contrôles
   ==================================== */
.seedit-progress-controls {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.seedit-progress-controls__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(var(--seedit-radius) - 4px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--seedit-transition);
  outline: none;
}

.seedit-progress-controls__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.seedit-progress-controls__btn:active {
  transform: scale(0.97);
}

.seedit-progress-controls__btn--primary {
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  border-color: transparent;
  color: #ffffff;
}

.seedit-progress-controls__btn--primary:hover {
  box-shadow: 0 4px 12px rgba(77, 182, 255, 0.4);
  transform: translateY(-1px);
}

.seedit-progress-controls__btn svg {
  width: 16px;
  height: 16px;
}

/* ====================================
   Steps (pour progress segmentée)
   ==================================== */
.seedit-progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
}

.seedit-progress-steps__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  opacity: 0.5;
  transition: opacity var(--seedit-transition);
}

.seedit-progress-steps__step--completed,
.seedit-progress-steps__step--active {
  opacity: 1;
}

.seedit-progress-steps__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all var(--seedit-transition);
}

.seedit-progress-steps__step--completed .seedit-progress-steps__icon {
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  border-color: var(--seedit-primary-light);
  color: #ffffff;
}

.seedit-progress-steps__step--active .seedit-progress-steps__icon {
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  border-color: var(--seedit-primary-light);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(77, 182, 255, 0.2);
}

.seedit-progress-steps__label {
  font-size: 0.75rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.seedit-progress-steps__step--active .seedit-progress-steps__label {
  color: var(--seedit-primary-light);
  font-weight: 600;
}

/* ====================================
   Informations
   ==================================== */
.seedit-progress-demo__info {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.seedit-progress-demo__info-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.seedit-progress-demo__info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seedit-progress-demo__info-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  padding-left: 1.5rem;
  position: relative;
}

.seedit-progress-demo__info-list li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: var(--seedit-primary-light);
  font-weight: bold;
}

.seedit-progress-demo__info-list li strong {
  color: var(--seedit-primary-light);
  font-weight: 600;
}

/* ====================================
   Animations Keyframes
   ==================================== */

/* Animation du gradient qui se déplace */
@keyframes seedit-progress-gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* Animation indéterminée (va-et-vient) */
@keyframes seedit-progress-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 768px) {
  .seedit-progress-demo__container {
    padding: 2rem 1.5rem;
  }

  .seedit-progress-demo__title {
    font-size: 1.5rem;
  }

  .seedit-progress-demo__subtitle {
    font-size: 0.875rem;
  }

  .seedit-progress-controls {
    flex-direction: column;
  }

  .seedit-progress-steps {
    flex-wrap: wrap;
  }

  .seedit-progress-steps__step {
    min-width: 60px;
  }

  .seedit-progress-steps__label {
    font-size: 0.6875rem;
  }
}

@media (max-width: 375px) {
  .seedit-progress-demo__container {
    padding: 1.5rem 1rem;
  }

  .seedit-progress-demo__title {
    font-size: 1.25rem;
  }

  .seedit-progress-demo__subtitle {
    font-size: 0.8125rem;
  }

  .seedit-progress-section {
    margin-bottom: 2rem;
  }

  .seedit-progress-controls__btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .seedit-progress-steps__icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}
