@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.float { animation: float 6s ease-in-out infinite; }
.float-delay-1 { animation: float 6s ease-in-out infinite -2s; }
.float-delay-2 { animation: float 6s ease-in-out infinite -4s; }
.pulse-node { animation: pulse 3s ease-in-out infinite; }
.slide-up { animation: slideUp 0.8s ease-out; }

.gradient-text {
    background: linear-gradient(135deg, #00d4ff, #0099ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #0099ff);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.gradient-border:hover::before {
    transform: scaleX(1);
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Hide floating cards on mobile */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}


  /* === Couleurs thème === */
  :root {
    --dark: #121314;
    --dark-light: #1a1b1e;
    --dark-border: #2a2b2e;
    --cyan: #00d4ff;
    --cyan-dark: #0099ff;
  }

  /* === Toast container === */
  #imengia-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .imengia-toast {
    background: var(--dark-light);
    border-left: 4px solid var(--cyan);
    color: white;
    min-width: 260px;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
    font-family: system-ui, sans-serif;
    animation: imengia-fadeIn 0.4s ease;
    overflow: hidden;
  }

  .imengia-toast.success {
    border-color: #0f0;
  }

  .imengia-toast.error {
    border-color: #f33;
  }

  .imengia-toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
  }

  .imengia-toast-close {
    cursor: pointer;
    font-size: 18px;
    color: var(--cyan);
  }

  .imengia-toast-progress {
    height: 3px;
    background: var(--cyan);
    animation: imengia-progress linear forwards;
  }

  @keyframes imengia-fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes imengia-fadeOut {
    to {
      opacity: 0;
      transform: translateY(-10px);
    }
  }

  @keyframes imengia-progress {
    from {
      width: 100%;
    }
    to {
      width: 0%;
    }
  }

  /* === Popup Overlay === */
  #imengia-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
  }

  #imengia-popup-box {
    background: var(--dark-light);
    border: 1px solid var(--dark-border);
    color: white;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    padding: 24px;
    width: 320px;
    text-align: center;
    animation: imengia-popupIn 0.3s ease;
  }

  #imengia-popup-message {
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.4;
  }

  #imengia-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .imengia-btn {
    background: var(--cyan);
    color: var(--dark);
    font-weight: 600;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .imengia-btn:hover {
    background: var(--cyan-dark);
  }

  .imengia-btn.cancel {
    background: var(--dark-border);
    color: #ccc;
  }

  .imengia-btn.cancel:hover {
    background: #222;
  }

  @keyframes imengia-popupIn {
    from {
      transform: scale(0.9);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }