/* ===================================
   Seed I.T - Effet Machine à Écrire
   Variables et styles globaux
   =================================== */

:root {
  /* Variables Seed I.T officielles */
  --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 composant */
  --seedit-typewriter-cursor-width: 2px;
  --seedit-typewriter-cursor-color: var(--seedit-primary-light);
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffffff;
  min-height: 100vh;
  padding: 2rem;
}

/* ===================================
   Conteneur principal de démonstration
   =================================== */

.seedit-typewriter-demo {
  max-width: 1000px;
  margin: 0 auto;
}

.seedit-typewriter-demo__title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  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;
}

.seedit-typewriter-demo__description {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3rem;
}

/* ===================================
   Sections de démonstration
   =================================== */

.seedit-typewriter-demo__section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--seedit-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.seedit-typewriter-demo__section--hero {
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  box-shadow: var(--seedit-shadow);
}

.seedit-typewriter-demo__section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--seedit-primary-light);
}

.seedit-typewriter-demo__section-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

/* ===================================
   Composant Machine à Écrire - Structure
   =================================== */

.seedit-typewriter {
  display: block;
  font-size: 1.75rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  min-height: 2.5rem;
}

/* Variante inline (pour intégration dans un titre) */
.seedit-typewriter--inline {
  display: inline-flex;
  align-items: center;
  vertical-align: bottom;
}

/* Variante multi-phrases */
.seedit-typewriter--multi {
  min-height: 3rem;
}

/* ===================================
   Texte de la machine à écrire
   =================================== */

.seedit-typewriter__text {
  display: inline-block;
  min-width: 1ch;
  color: inherit;
}

/* ===================================
   Curseur clignotant
   =================================== */

.seedit-typewriter__cursor {
  display: inline;
  color: var(--seedit-typewriter-cursor-color);
  margin-left: 2px;
  animation: seedit-typewriter-blink 1s step-end infinite;
  font-weight: 400;
}

/* Animation de clignotement du curseur */
@keyframes seedit-typewriter-blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Masquer le curseur si désactivé */
.seedit-typewriter[data-cursor="false"] .seedit-typewriter__cursor {
  display: none;
}

/* ===================================
   Section Hero avec effet machine à écrire
   =================================== */

.seedit-hero {
  text-align: center;
  padding: 3rem 2rem;
}

.seedit-hero__title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seedit-hero__static {
  display: inline-block;
}

.seedit-hero__subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.seedit-hero__button {
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: calc(var(--seedit-radius) / 1.5);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--seedit-transition);
  backdrop-filter: blur(10px);
}

.seedit-hero__button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.seedit-hero__button:active {
  transform: translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .seedit-typewriter-demo__title {
    font-size: 2rem;
  }

  .seedit-typewriter-demo__section {
    padding: 1.5rem;
  }

  .seedit-typewriter {
    font-size: 1.5rem;
  }

  .seedit-hero__title {
    font-size: 2.25rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .seedit-hero__subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 375px) {
  .seedit-typewriter-demo__title {
    font-size: 1.75rem;
  }

  .seedit-typewriter-demo__description {
    font-size: 1rem;
  }

  .seedit-typewriter-demo__section {
    padding: 1.25rem;
  }

  .seedit-typewriter {
    font-size: 1.25rem;
    min-height: 2rem;
  }

  .seedit-hero {
    padding: 2rem 1rem;
  }

  .seedit-hero__title {
    font-size: 1.75rem;
  }

  .seedit-hero__subtitle {
    font-size: 1rem;
  }

  .seedit-hero__button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}
