/* ========================================
   Seed I.T — Bouton Retour en Haut
   ======================================== */

/* Variables CSS Seed I.T (obligatoires) */
: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);
}

/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Style du body avec gradient de fond Seed I.T */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffffff;
  line-height: 1.7;
  min-height: 100vh;
  scroll-behavior: smooth;
}

/* Conteneur de démonstration */
.seedit-demo {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.seedit-demo__header {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(3, 124, 251, 0.3);
}

.seedit-demo__header h1 {
  font-size: 2.5rem;
  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-demo__header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
}

.seedit-demo__section {
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--seedit-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.seedit-demo__section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--seedit-primary-light);
}

.seedit-demo__section p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.seedit-demo__section code {
  background: rgba(3, 124, 251, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--seedit-primary-light);
}

/* ========================================
   COMPOSANT : Bouton Retour en Haut
   ======================================== */

/* Bouton principal fixe en bas à droite */
.seedit-scroll-top {
  /* Positionnement */
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;

  /* Dimensions */
  width: 56px;
  height: 56px;

  /* Style visuel */
  background: linear-gradient(135deg, var(--seedit-primary) 0%, var(--seedit-primary-light) 100%);
  border: none;
  border-radius: 50%;
  box-shadow: var(--seedit-shadow);
  cursor: pointer;

  /* Centrage de l'icône */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Transitions fluides */
  transition: transform var(--seedit-transition),
              box-shadow var(--seedit-transition),
              opacity var(--seedit-transition);

  /* Masqué par défaut */
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
}

/* État visible (ajouté dynamiquement par JS) */
.seedit-scroll-top.seedit-scroll-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* État hover */
.seedit-scroll-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(3, 124, 251, 0.5);
}

/* État focus (accessibilité clavier) */
.seedit-scroll-top:focus {
  outline: 3px solid var(--seedit-primary-light);
  outline-offset: 4px;
}

/* État actif (au clic) */
.seedit-scroll-top:active {
  transform: translateY(-2px) scale(1.02);
}

/* Icône SVG à l'intérieur du bouton */
.seedit-scroll-top__icon {
  width: 28px;
  height: 28px;
  color: #ffffff;
  transition: transform var(--seedit-transition);
}

/* Animation de l'icône au hover */
.seedit-scroll-top:hover .seedit-scroll-top__icon {
  transform: translateY(-3px);
}

/* ========================================
   Responsive — Mobile
   ======================================== */

@media (max-width: 768px) {
  /* Ajustements du contenu de démo */
  .seedit-demo {
    padding: 2rem 1.5rem;
  }

  .seedit-demo__header h1 {
    font-size: 2rem;
  }

  .seedit-demo__section {
    padding: 1.5rem;
  }

  .seedit-demo__section h2 {
    font-size: 1.5rem;
  }

  /* Bouton légèrement plus petit sur mobile */
  .seedit-scroll-top {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .seedit-scroll-top__icon {
    width: 24px;
    height: 24px;
  }
}

/* Adaptation ultra-petits écrans */
@media (max-width: 375px) {
  .seedit-scroll-top {
    width: 48px;
    height: 48px;
    bottom: 1rem;
    right: 1rem;
  }
}
