/* ============================================================
   VIRATECH — Design System CSS
   Palette: Fond sombre + Violet électrique + Gradients
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── Variables CSS ── */
:root {
  /* Couleurs principales */
  --color-bg:           #080810;
  --color-bg-secondary: #0d0d1a;
  --color-bg-card:      rgba(255,255,255,0.04);
  --color-bg-card-hover:rgba(255,255,255,0.07);
  --color-surface:      rgba(255,255,255,0.06);
  
  /* Violet électrique — couleur signature VIRATECH */
  --color-primary:      #7c3aed;
  --color-primary-light:#9f67ff;
  --color-primary-dark: #5b21b6;
  --color-secondary:    #a855f7;
  --color-accent:       #ec4899;
  --color-accent-blue:  #3b82f6;
  
  /* Gradients */
  --gradient-primary:   linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
  --gradient-hero:      linear-gradient(135deg, #080810 0%, #0d0520 40%, #150828 70%, #080810 100%);
  --gradient-card:      linear-gradient(135deg, rgba(124,58,237,0.1), rgba(168,85,247,0.05));
  --gradient-text:      linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --gradient-shine:     linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  
  /* Textes */
  --text-primary:       #f8fafc;
  --text-secondary:     #94a3b8;
  --text-muted:         #64748b;
  --text-accent:        #a855f7;
  
  /* Bordures */
  --border-subtle:      rgba(124,58,237,0.15);
  --border-card:        rgba(255,255,255,0.08);
  --border-glow:        rgba(124,58,237,0.4);
  
  /* Effets */
  --shadow-glow:        0 0 40px rgba(124,58,237,0.3);
  --shadow-card:        0 8px 32px rgba(0,0,0,0.4);
  --shadow-button:      0 4px 24px rgba(124,58,237,0.5);
  --shadow-button-hover:0 8px 40px rgba(124,58,237,0.7);
  
  /* Typographie */
  --font-heading:       'Inter', system-ui, sans-serif;
  --font-body:          'Outfit', system-ui, sans-serif;
  
  /* Espacements */
  --section-pad:        120px;
  --section-pad-sm:     80px;
  --container-max:      1280px;
  
  /* Transitions */
  --ease-smooth:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:        cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:      0.15s;
  --duration-mid:       0.3s;
  --duration-slow:      0.5s;
  
  /* Rayons */
  --radius-sm:          8px;
  --radius-md:          16px;
  --radius-lg:          24px;
  --radius-xl:          32px;
  --radius-full:        9999px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar personnalisée ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Utilitaires texte ── */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ── Typographie ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
  padding: 6px 16px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-full);
}

/* ── Boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--duration-mid) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-shine);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease-smooth);
}

.btn:hover::before { transform: translateX(100%); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-card);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--color-bg-card);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ── Cartes ── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--duration-mid) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--duration-mid) var(--ease-smooth);
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.card:hover::before { opacity: 1; }

/* Carte Glass */
.card-glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: rgba(124,58,237,0.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(124,58,237,0.3);
}

.badge-success {
  background: rgba(16,185,129,0.15);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}

.badge-popular {
  background: var(--gradient-primary);
  color: #fff;
}

/* ── Icônes Feature ── */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
  margin-bottom: 20px;
  transition: all var(--duration-mid) var(--ease-smooth);
  flex-shrink: 0;
}

.icon-box svg, .icon-box i {
  color: var(--color-primary-light);
  font-size: 1.5rem;
  width: 24px;
  height: 24px;
}

.card:hover .icon-box {
  background: rgba(124,58,237,0.25);
  transform: scale(1.05);
}

/* ── Sections ── */
section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ── Grille ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── Divider décoratif ── */
.divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  margin: 16px auto 0;
}

/* ── Glow effects ── */
.glow-primary {
  box-shadow: 0 0 60px rgba(124,58,237,0.4);
}

.glow-text {
  text-shadow: 0 0 40px rgba(168,85,247,0.5);
}

/* ── Noise texture ── */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Loader ── */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Notification Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: #1a1a2e;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 320px;
  max-width: 420px;
  animation: toastSlide 0.3s var(--ease-bounce) both;
}

.toast.success { border-left: 3px solid #34d399; }
.toast.error   { border-left: 3px solid #f87171; }
.toast.info    { border-left: 3px solid var(--color-primary); }

@keyframes toastSlide {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Formulaires ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--duration-fast) var(--ease-smooth);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-select option {
  background: #1a1a2e;
  color: var(--text-primary);
}

.form-textarea { resize: vertical; min-height: 120px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 60px; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: 16px 32px; font-size: 1rem; }
  .section-title { font-size: 1.75rem; }
}
