/* ===================================
   Seed I.T - Input avec Effet Focus Animé
   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 aux inputs */
  --seedit-input-height: 48px;
  --seedit-input-padding: 16px;
  --seedit-input-bg: rgba(255, 255, 255, 0.05);
  --seedit-input-border: rgba(255, 255, 255, 0.2);
  --seedit-input-text: #ffffff;
  --seedit-input-placeholder: rgba(255, 255, 255, 0.4);

  /* Couleurs de validation */
  --seedit-success: #10B981;
  --seedit-error: #EF4444;
}

/* 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-focus-input-demo {
  max-width: 1000px;
  margin: 0 auto;
}

.seedit-focus-input-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-focus-input-demo__description {
  text-align: center;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================
   Sections de démonstration
   =================================== */

.seedit-focus-input-demo__section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--seedit-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.seedit-focus-input-demo__section--dark {
  background: rgba(0, 0, 0, 0.3);
}

.seedit-focus-input-demo__section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--seedit-primary-light);
  text-align: center;
}

.seedit-focus-input-demo__section-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  text-align: center;
}

.seedit-focus-input-demo__examples {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.seedit-focus-input-demo__examples--column {
  flex-direction: column;
  align-items: stretch;
}

.seedit-focus-input-demo__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 280px;
  flex: 1;
}

.seedit-focus-input-demo__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.seedit-focus-input-demo__hint {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.seedit-focus-input-demo__hint--success {
  color: var(--seedit-success);
}

.seedit-focus-input-demo__hint--error {
  color: var(--seedit-error);
}

/* ===================================
   Input de base
   =================================== */

.seedit-focus-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.seedit-focus-input__field {
  width: 100%;
  height: var(--seedit-input-height);
  padding: 0 var(--seedit-input-padding);
  background: var(--seedit-input-bg);
  border: 2px solid var(--seedit-input-border);
  border-radius: 8px;
  color: var(--seedit-input-text);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--seedit-transition);
}

.seedit-focus-input__field::placeholder {
  color: var(--seedit-input-placeholder);
}

.seedit-focus-input__field:focus {
  outline: none;
}

/* ===================================
   EFFET : Bordure Underline (depuis la gauche)
   =================================== */

.seedit-focus-input--underline {
  position: relative;
}

.seedit-focus-input--underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  transition: width 0.3s ease;
}

.seedit-focus-input--underline .seedit-focus-input__field:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.seedit-focus-input--underline:has(.seedit-focus-input__field:focus)::after {
  width: 100%;
}

/* ===================================
   EFFET : Bordure Underline (depuis le centre)
   =================================== */

.seedit-focus-input--underline-center {
  position: relative;
}

.seedit-focus-input--underline-center::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  transition: width 0.4s ease;
}

.seedit-focus-input--underline-center .seedit-focus-input__field:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.seedit-focus-input--underline-center:has(.seedit-focus-input__field:focus)::after {
  width: 100%;
}

/* ===================================
   EFFET : Glow (lueur)
   =================================== */

.seedit-focus-input--glow .seedit-focus-input__field:focus {
  border-color: var(--seedit-primary-light);
  box-shadow:
    0 0 0 3px rgba(77, 182, 255, 0.1),
    0 0 20px rgba(77, 182, 255, 0.3);
}

/* ===================================
   EFFET : Glow Intense
   =================================== */

.seedit-focus-input--glow-intense .seedit-focus-input__field:focus {
  border-color: var(--seedit-primary-light);
  box-shadow:
    0 0 0 4px rgba(77, 182, 255, 0.2),
    0 0 30px rgba(77, 182, 255, 0.5),
    0 0 50px rgba(77, 182, 255, 0.3);
}

/* ===================================
   EFFET : Scale (zoom)
   =================================== */

.seedit-focus-input--scale .seedit-focus-input__field {
  transition: all 0.3s ease;
}

.seedit-focus-input--scale .seedit-focus-input__field:focus {
  transform: scale(1.02);
  border-color: var(--seedit-primary-light);
  box-shadow: 0 4px 12px rgba(77, 182, 255, 0.2);
}

/* ===================================
   EFFET : Scale avec bordure
   =================================== */

.seedit-focus-input--scale-border .seedit-focus-input__field {
  transition: all 0.3s ease;
}

.seedit-focus-input--scale-border .seedit-focus-input__field:focus {
  transform: scale(1.03);
  border-color: var(--seedit-primary-light);
  border-width: 3px;
  box-shadow:
    0 0 0 3px rgba(77, 182, 255, 0.1),
    0 4px 12px rgba(77, 182, 255, 0.3);
}

/* ===================================
   EFFET : Bordure rotative
   =================================== */

.seedit-focus-input--rotating-border {
  position: relative;
  padding: 3px;
  background: linear-gradient(
    60deg,
    var(--seedit-primary),
    var(--seedit-primary-light),
    var(--seedit-primary)
  );
  background-size: 300% 300%;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.seedit-focus-input--rotating-border::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--seedit-bg-darker);
  border-radius: 6px;
  z-index: 0;
}

.seedit-focus-input--rotating-border .seedit-focus-input__field {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
}

.seedit-focus-input--rotating-border:has(.seedit-focus-input__field:focus) {
  animation: seedit-border-rotate 2s ease infinite;
}

@keyframes seedit-border-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===================================
   EFFET : Label flottant
   =================================== */

.seedit-focus-input--floating-label {
  position: relative;
}

.seedit-focus-input--floating-label .seedit-focus-input__field {
  padding-top: 20px;
}

.seedit-focus-input__floating-label {
  position: absolute;
  left: var(--seedit-input-padding);
  top: 50%;
  transform: translateY(-50%);
  color: var(--seedit-input-placeholder);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
  background: transparent;
}

/* Label monte quand l'input a le focus ou contient du texte */
.seedit-focus-input--floating-label .seedit-focus-input__field:focus ~ .seedit-focus-input__floating-label,
.seedit-focus-input--floating-label .seedit-focus-input__field:not(:placeholder-shown) ~ .seedit-focus-input__floating-label {
  top: 5px;
  font-size: 0.75rem;
  color: var(--seedit-primary-light);
  transform: translateY(0);
}

/* Effet sur la bordure */
.seedit-focus-input--floating-label .seedit-focus-input__field:focus {
  border-color: var(--seedit-primary-light);
  box-shadow: 0 0 0 3px rgba(77, 182, 255, 0.1);
}

/* ===================================
   EFFET : Transition de couleur
   =================================== */

.seedit-focus-input--color-transition .seedit-focus-input__field {
  transition: all 0.5s ease;
}

.seedit-focus-input--color-transition .seedit-focus-input__field:focus {
  background: rgba(3, 124, 251, 0.1);
  border-color: var(--seedit-primary);
  box-shadow: 0 0 0 3px rgba(77, 182, 255, 0.1);
}

/* ===================================
   EFFET : Transition gradient
   =================================== */

.seedit-focus-input--gradient-transition .seedit-focus-input__field {
  transition: all 0.5s ease;
  background: var(--seedit-input-bg);
}

.seedit-focus-input--gradient-transition .seedit-focus-input__field:focus {
  background: linear-gradient(135deg, rgba(3, 124, 251, 0.1) 0%, rgba(77, 182, 255, 0.1) 100%);
  border-color: var(--seedit-primary-light);
  box-shadow: 0 0 0 3px rgba(77, 182, 255, 0.15);
}

/* ===================================
   VARIANTE : Small
   =================================== */

.seedit-focus-input--small {
  --seedit-input-height: 36px;
  --seedit-input-padding: 12px;
}

.seedit-focus-input--small .seedit-focus-input__field {
  font-size: 0.875rem;
}

/* ===================================
   VARIANTE : Large
   =================================== */

.seedit-focus-input--large {
  --seedit-input-height: 56px;
  --seedit-input-padding: 20px;
}

.seedit-focus-input--large .seedit-focus-input__field {
  font-size: 1.125rem;
}

/* ===================================
   ÉTAT : Success
   =================================== */

.seedit-focus-input--success .seedit-focus-input__field {
  border-color: var(--seedit-success);
}

.seedit-focus-input--success .seedit-focus-input__field:focus {
  border-color: var(--seedit-success);
  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.1),
    0 0 20px rgba(16, 185, 129, 0.3);
}

/* ===================================
   ÉTAT : Error
   =================================== */

.seedit-focus-input--error .seedit-focus-input__field {
  border-color: var(--seedit-error);
}

.seedit-focus-input--error .seedit-focus-input__field:focus {
  border-color: var(--seedit-error);
  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.1),
    0 0 20px rgba(239, 68, 68, 0.3);
}

/* ===================================
   Formulaire d'exemple
   =================================== */

.seedit-focus-input-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--seedit-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.seedit-focus-input-form__submit {
  width: 100%;
  height: 48px;
  padding: 0 24px;
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--seedit-transition);
}

.seedit-focus-input-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 182, 255, 0.4);
}

.seedit-focus-input-form__submit:active {
  transform: translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .seedit-focus-input-demo__title {
    font-size: 2rem;
  }

  .seedit-focus-input-demo__section {
    padding: 1.5rem;
  }

  .seedit-focus-input-demo__examples {
    gap: 1.5rem;
    flex-direction: column;
  }

  .seedit-focus-input-demo__item {
    min-width: 0;
    width: 100%;
  }

  .seedit-focus-input-form {
    padding: 1.5rem;
  }
}

@media (max-width: 375px) {
  body {
    padding: 1rem;
  }

  .seedit-focus-input-demo__title {
    font-size: 1.75rem;
  }

  .seedit-focus-input-demo__description {
    font-size: 1rem;
  }

  .seedit-focus-input-demo__section {
    padding: 1.25rem;
  }

  .seedit-focus-input {
    --seedit-input-height: 44px;
    --seedit-input-padding: 14px;
  }

  .seedit-focus-input__field {
    font-size: 0.9375rem;
  }

  .seedit-focus-input-form {
    padding: 1.25rem;
    gap: 1.25rem;
  }
}
