/* ====================================
   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 au Pomodoro */
  --seedit-pomodoro-work: #037CFB;
  --seedit-pomodoro-short-break: #10b981;
  --seedit-pomodoro-long-break: #a855f7;
  --seedit-pomodoro-ring-bg: rgba(255, 255, 255, 0.1);
}

/* ====================================
   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-pomodoro-demo {
  width: 100%;
  max-width: 500px;
}

.seedit-pomodoro-demo__container {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--seedit-radius);
  padding: 2.5rem;
  box-shadow: var(--seedit-shadow);
}

.seedit-pomodoro-demo__title {
  font-size: 1.75rem;
  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-pomodoro-demo__subtitle {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-bottom: 2rem;
}

/* ====================================
   Widget Pomodoro
   ==================================== */
.seedit-pomodoro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ====================================
   Indicateur de phase
   ==================================== */
.seedit-pomodoro__phase {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  border: 2px solid var(--seedit-primary);
  transition: all var(--seedit-transition);
}

.seedit-pomodoro__phase--work {
  border-color: var(--seedit-pomodoro-work);
}

.seedit-pomodoro__phase--short-break {
  border-color: var(--seedit-pomodoro-short-break);
}

.seedit-pomodoro__phase--long-break {
  border-color: var(--seedit-pomodoro-long-break);
}

.seedit-pomodoro__phase-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.seedit-pomodoro__phase-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* ====================================
   Progress Ring
   ==================================== */
.seedit-pomodoro__ring-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seedit-pomodoro__ring {
  position: absolute;
  top: 0;
  left: 0;
}

.seedit-pomodoro__ring-bg {
  stroke: var(--seedit-pomodoro-ring-bg);
}

.seedit-pomodoro__ring-progress {
  stroke: var(--seedit-pomodoro-work);
  stroke-dasharray: 754;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

/* Couleurs selon la phase */
.seedit-pomodoro__ring-progress--work {
  stroke: var(--seedit-pomodoro-work);
}

.seedit-pomodoro__ring-progress--short-break {
  stroke: var(--seedit-pomodoro-short-break);
}

.seedit-pomodoro__ring-progress--long-break {
  stroke: var(--seedit-pomodoro-long-break);
}

/* Affichage du temps au centre */
.seedit-pomodoro__time {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #ffffff;
  text-align: center;
  z-index: 1;
  user-select: none;
}

/* ====================================
   Compteur de sessions
   ==================================== */
.seedit-pomodoro__sessions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

.seedit-pomodoro__sessions-label {
  font-weight: 500;
}

.seedit-pomodoro__sessions-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--seedit-primary-light);
  font-family: 'Courier New', monospace;
}

.seedit-pomodoro__sessions-total {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ====================================
   Contrôles
   ==================================== */
.seedit-pomodoro__controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.seedit-pomodoro__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: calc(var(--seedit-radius) - 2px);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--seedit-transition);
  outline: none;
  font-family: inherit;
}

.seedit-pomodoro__btn:focus-visible {
  outline: 2px solid var(--seedit-primary-light);
  outline-offset: 2px;
}

.seedit-pomodoro__btn--primary {
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  color: #ffffff;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.seedit-pomodoro__btn--primary:hover {
  box-shadow: 0 6px 20px rgba(77, 182, 255, 0.4);
  transform: translateY(-2px);
}

.seedit-pomodoro__btn--primary:active {
  transform: translateY(0);
}

.seedit-pomodoro__btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.seedit-pomodoro__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.seedit-pomodoro__btn--secondary:active {
  transform: scale(0.95);
}

/* ====================================
   Légende des phases
   ==================================== */
.seedit-pomodoro__legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.seedit-pomodoro__legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.seedit-pomodoro__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.seedit-pomodoro__legend-dot--work {
  background: var(--seedit-pomodoro-work);
  box-shadow: 0 0 8px var(--seedit-pomodoro-work);
}

.seedit-pomodoro__legend-dot--short-break {
  background: var(--seedit-pomodoro-short-break);
  box-shadow: 0 0 8px var(--seedit-pomodoro-short-break);
}

.seedit-pomodoro__legend-dot--long-break {
  background: var(--seedit-pomodoro-long-break);
  box-shadow: 0 0 8px var(--seedit-pomodoro-long-break);
}

.seedit-pomodoro__legend-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ====================================
   Informations
   ==================================== */
.seedit-pomodoro-demo__info {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 1.5rem;
}

.seedit-pomodoro-demo__info-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.seedit-pomodoro-demo__info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seedit-pomodoro-demo__info-list li {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  padding-left: 1.5rem;
  position: relative;
}

.seedit-pomodoro-demo__info-list li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: var(--seedit-primary-light);
  font-weight: bold;
}

.seedit-pomodoro-demo__info-list li strong {
  color: var(--seedit-primary-light);
  font-weight: 600;
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 768px) {
  .seedit-pomodoro-demo__container {
    padding: 2rem 1.5rem;
  }

  .seedit-pomodoro-demo__title {
    font-size: 1.5rem;
  }

  .seedit-pomodoro-demo__subtitle {
    font-size: 0.875rem;
  }

  .seedit-pomodoro__ring-container {
    width: 240px;
    height: 240px;
  }

  .seedit-pomodoro__ring {
    width: 240px;
    height: 240px;
  }

  .seedit-pomodoro__time {
    font-size: 2.75rem;
  }

  .seedit-pomodoro__controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 375px) {
  .seedit-pomodoro-demo__container {
    padding: 1.5rem 1rem;
  }

  .seedit-pomodoro-demo__title {
    font-size: 1.25rem;
  }

  .seedit-pomodoro__ring-container {
    width: 220px;
    height: 220px;
  }

  .seedit-pomodoro__ring {
    width: 220px;
    height: 220px;
  }

  .seedit-pomodoro__time {
    font-size: 2.5rem;
  }

  .seedit-pomodoro__btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .seedit-pomodoro__btn--primary {
    padding: 0.75rem 1.25rem;
  }
}

/* ====================================
   Animations
   ==================================== */
@keyframes seedit-pomodoro-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Animation du compteur de sessions */
.seedit-pomodoro__sessions-count {
  animation: seedit-pomodoro-pulse 1.5s ease-in-out;
}
