/* ============================================
   Accelerateur — Design System Commun
   Partagé entre tous les tools IA
   Style : Crococlick God Mode (Light)
   ============================================ */

:root {
  /* Palette Crococlick / God Mode (Light) */
  --bg: #F4F4F5;
  --surface: #FFFFFF;
  --surface-hover: #FAFAFA;
  --border: #E4E4E7;
  --border-dark: #18181B;

  /* Vert Néon Crococlick */
  --accent: #00eb79;
  --accent-hover: #00d26c;
  --accent-glow: rgba(0, 235, 121, 0.5);

  /* Contrastes */
  --text: #000000;
  --text-muted: #52525B;
  --text-faint: #A1A1AA;
  --danger: #EF4444;

  /* UI God Mode */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-god: 0 24px 48px -12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.02);
  --shadow-neon: 0 0 20px rgba(0, 235, 121, 0.4);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  padding: 80px 24px 120px;
  position: relative;
  overflow-x: hidden;
}

/* Grille de fond "Matrix/Tech" subtile */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* Aura lumineuse en haut */
body::after {
  content: '';
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 60vw; height: 500px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.container {
  max-width: 740px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
.header {
  margin-bottom: 56px;
  text-align: center;
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  color: #FFFFFF;
  font-size: 13px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 32px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulseNeon 2s infinite;
}

@keyframes pulseNeon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 24px;
}

.highlight {
  background: var(--accent);
  color: #000000;
  padding: 0 12px;
  border-radius: 8px;
  display: inline-block;
  transform: rotate(-1deg);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.subtitle {
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 500;
}

/* ---- God Card (Form container) ---- */
.god-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-god);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Liseré haut néon */
.god-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
}

/* ---- Fields ---- */
.field {
  margin-bottom: 40px;
  position: relative;
}

.field:last-child { margin-bottom: 0; }

.field-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.field-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #000000;
  background: var(--accent);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.field-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.field-hint {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
  padding-left: 48px;
}

.input-wrapper {
  padding-left: 48px;
}

textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 20px;
  resize: vertical;
  min-height: 120px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

textarea::placeholder { color: var(--text-faint); }

textarea:hover { background: #EFEFEF; }

textarea:focus {
  background: var(--surface);
  border-color: #000000;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06), 0 0 0 4px var(--accent-glow);
  transform: translateY(-2px);
}

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding-left: 48px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--surface);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ---- Button God Mode ---- */
.btn-analyze {
  width: 100%;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 24px 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  animation: fadeUp 0.6s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  overflow: hidden;
}

/* Effet Swipe Néon au survol */
.btn-analyze::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.btn-analyze span, .btn-analyze div {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.btn-analyze:hover:not(:disabled)::before { transform: translateX(0); }

.btn-analyze:hover:not(:disabled) span,
.btn-analyze:hover:not(:disabled) div {
  color: #000000;
}

.btn-analyze:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 235, 121, 0.4);
}

.btn-analyze:active:not(:disabled) { transform: translateY(0); }

.btn-analyze:disabled {
  background: var(--border);
  color: var(--text-faint);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---- Loading God Mode ---- */
.loading-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 80px 40px;
  text-align: center;
  box-shadow: var(--shadow-god);
  display: none;
  border: 1px solid var(--border);
}

.cyber-loader {
  width: 60px;
  height: 60px;
  margin: 0 auto 32px;
  position: relative;
}

.cyber-loader::before, .cyber-loader::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
}

.cyber-loader::before {
  border-top-color: #000000;
  border-right-color: #000000;
  animation: spin 1s linear infinite;
}

.cyber-loader::after {
  border-bottom-color: var(--accent);
  border-left-color: var(--accent);
  animation: spin 0.8s ease-in-out infinite reverse;
}

.loading-text {
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.loading-subtext {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
}

/* ---- Results ---- */
.result-container {
  display: none;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 3px;
}

/* Data Cards (ICP Grid) */
.icp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

@media (max-width: 640px) { .icp-grid { grid-template-columns: 1fr; } }

.data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.data-card:hover {
  border-color: #000000;
  box-shadow: 4px 4px 0px var(--accent);
  transform: translate(-2px, -2px);
}

.data-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.data-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.data-value.highlight-text {
  display: inline-block;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  color: #000;
}

/* ---- Scores (Jauge sur fond noir) ---- */
.score-container {
  background: #000000;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-god);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}
.score-row:last-child { margin-bottom: 0; }

.score-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  width: 200px;
  flex-shrink: 0;
}

.score-bar-wrap {
  flex: 1;
  height: 12px;
  background: #27272A;
  border-radius: 100px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
  box-shadow: 0 0 10px var(--accent);
}

.score-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  width: 48px;
  text-align: right;
}

/* ---- Network Decision ---- */
.network-decision {
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  box-shadow: 0 16px 32px rgba(0, 235, 121, 0.2);
}

.network-icon {
  font-size: 48px;
  background: #000000;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.1);
}

.network-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 900;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  opacity: 0.8;
}

.network-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.network-reason {
  font-size: 16px;
  font-weight: 500;
  color: rgba(0,0,0,0.8);
  line-height: 1.5;
}

/* ---- Analysis Card ---- */
.analysis-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-god);
  border: 1px solid var(--border);
}

.result-prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}

.result-prose strong { color: var(--text); font-weight: 700; }
.result-prose em {
  color: #000000;
  font-style: normal;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---- Action Cards (Timeline rows) ---- */
.action-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.action-row {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  gap: 24px;
  transition: all 0.3s;
}

.action-row:hover {
  background: #000000;
  border-color: #000000;
}

.action-row:hover .action-num { color: var(--accent); }
.action-row:hover h4 { color: #FFFFFF; }
.action-row:hover p { color: #A1A1AA; }

.action-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--border-dark);
  flex-shrink: 0;
  transition: color 0.3s;
}

.action-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  transition: color 0.3s;
}

.action-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  transition: color 0.3s;
}

/* ---- Reset button ---- */
.btn-reset {
  background: transparent;
  border: 2px solid var(--border-dark);
  color: var(--text);
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 20px 32px;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
}

.btn-reset:hover {
  background: var(--border-dark);
  color: #FFFFFF;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* ---- Error ---- */
.error-card {
  background: #FEF2F2;
  border: 2px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #B91C1C;
  font-size: 15px;
  font-weight: 600;
  display: none;
  margin-bottom: 32px;
  box-shadow: 4px 4px 0px rgba(239, 68, 68, 0.2);
}

/* ---- Animations ---- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Streaming text */
.streaming { min-height: 20px; }
.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 6px;
}
@keyframes blink { 50% { opacity: 0; } }
