﻿/* ============================================================================
   SOURCEBOT — Bold Decorative Design v3
   Glass cards, gradient banner, floating labels, colorful accents
   ============================================================================ */

:root {
  --primary: #FF6B47;
  --primary-hover: #E55A38;
  --primary-light: #FFE5D9;
  --primary-glow: rgba(255, 107, 71, 0.35);

  --accent-purple: #7C3AED;
  --accent-blue: #3B82F6;
  --accent-green: #10B981;
  --accent-amber: #F59E0B;

  --text-dark: #111827;
  --text-mid: #4B5563;
  --text-light: #6B7280;
  --text-lighter: #9CA3AF;

  --bg-page: #F5F3EF;
  --bg-card: #FFFFFF;
  --bg-card-glass: rgba(255,255,255,0.75);
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 1rem;
  --radius-sm: 0.625rem;

  /* backward compat aliases */
  --primary-color: var(--primary);
  --primary-dark: var(--primary-hover);
  --success-color: var(--success);
  --error-color: var(--error);
  --warning-color: var(--warning);
  --border-color: var(--border);
  --bg-main: var(--bg-page);
  --bg-color: var(--bg-page);
  --primary-bg: #FFF5F0;
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --text-dark: #F3F4F6;
  --text-mid: #D1D5DB;
  --text-light: #9CA3AF;
  --text-lighter: #6B7280;

  --bg-page: #0F172A;
  --bg-card: #1E293B;
  --bg-card-glass: rgba(30, 41, 59, 0.75);
  --border: #334155;
  --border-light: #1E293B;

  --primary-light: #7C2D12;
  --primary-glow: rgba(255, 107, 71, 0.25);
}

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

html, body {
  width: 100%; height: 100%;
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- TOP BANNER ---- */

.top-banner {
  background: linear-gradient(135deg, #1F1F1D 0%, #292524 100%);
  color: white;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: sticky;
  top: 0;
  z-index: 100;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.banner-badge {
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

/* ---- CONTAINER & HEADER ---- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 1.25rem 0;
  margin-bottom: 0;
  border-bottom: none;
  background: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, #FF8F47 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin: 0;
}

.logo-text p, .logo p {
  font-size: 0.75rem;
  color: var(--text-lighter);
  font-weight: 500;
  margin: 0;
}

.header-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-pill {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.nav-pill.active {
  background: var(--text-dark);
  color: white;
}

/* ---- THEME TOGGLE ---- */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  padding: 0;
  margin: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* ---- HERO ---- */

.hero {
  position: relative;
  padding: 3rem 0 2rem;
  overflow: visible;
  background: transparent;
}

[data-theme="dark"] .hero {
  background: rgba(30, 41, 59, 0.5) !important;
  overflow: visible;
}

[data-theme="dark"] .hero::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  right: -100%;
  bottom: -100%;
  background: rgba(30, 41, 59, 0.5);
  z-index: 0;
  pointer-events: none;
}

[data-theme="dark"] .hero-content {
  position: relative;
  z-index: 1;
  background: transparent;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  pointer-events: none;
}

.hero-blob-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-light);
  top: -100px;
  right: -80px;
}

.hero-blob-2 {
  width: 300px;
  height: 300px;
  background: #DDD6FE;
  bottom: -80px;
  left: -60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  background: transparent;
}

.hero-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-tag {
  background: rgba(255, 107, 71, 0.15);
  color: #FF8A65;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 1rem;
  background: transparent;
}

[data-theme="dark"] .hero-title {
  background: transparent !important;
  color: #F3F4F6;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 600px;
}

/* ---- MAIN & SECTION TITLES ---- */

main { flex: 1; margin-bottom: 2rem; }
section { margin-bottom: 2rem; }

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.75rem; }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.5rem; }
p { color: var(--text-mid); line-height: 1.7; }

/* ---- GLASS CARDS ---- */

.glass-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04);
}

.form-container {
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

.card-header-bar {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
}

.card-icon {
  font-size: 1.75rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-top: 0.15rem;
}

/* ---- FORMS — FLOATING LABELS ---- */

.search-form, .quote-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.floating-label {
  position: relative;
}

.floating-label input {
  padding: 1.25rem 1rem 0.5rem;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-dark);
  font-family: var(--font);
  width: 100%;
  transition: var(--transition);
}

.floating-label label {
  position: absolute;
  left: 1rem;
  top: 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-lighter);
  pointer-events: none;
  transition: var(--transition);
  background: transparent;
}

.floating-label input:focus,
.floating-label input:not(:placeholder-shown) {
  border-color: var(--primary);
  background: var(--bg-card);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
  top: -0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-card);
  padding: 0 0.4rem;
  left: 0.75rem;
}

.floating-label input:focus {
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-lighter);
  margin-top: 0.35rem;
  padding-left: 0.25rem;
}

/* Standard inputs (non-floating) */
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

input[type="text"], input[type="email"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-dark);
  transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--bg-card);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group small, .char-counter {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-lighter);
  font-size: 0.75rem;
}

.helper-text {
  color: var(--text-lighter);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* ---- FILE UPLOAD ZONE ---- */

.file-upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-page);
}

.file-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.file-upload-icon {
  font-size: 2rem;
}

.file-upload-label span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ---- BUTTONS ---- */

button, .btn-primary, .btn-secondary {
  font-family: var(--font);
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
}

.btn-primary, button[type="submit"] {
  background: linear-gradient(135deg, var(--primary) 0%, #FF8F47 100%);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover, button[type="submit"]:hover {
  box-shadow: 0 8px 24px var(--primary-glow);
  transform: translateY(-2px);
}

.btn-primary:active, button[type="submit"]:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-glow {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 4px 14px var(--primary-glow); }
  50% { box-shadow: 0 4px 28px var(--primary-glow), 0 0 0 4px var(--primary-light); }
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--text-lighter);
}

.btn-small {
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
}

/* ---- RESULTS ---- */

.results-container {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ---- INFO CARDS — COLORFUL ---- */

.info-container {
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.info-card {
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.info-card-1::before { background: var(--primary); }
.info-card-2::before { background: var(--accent-purple); }
.info-card-3::before { background: var(--accent-blue); }
.info-card-4::before { background: var(--accent-green); }

.info-card-1 { background: #FFF7ED; }
.info-card-2 { background: #F5F3FF; }
.info-card-3 { background: #EFF6FF; }
.info-card-4 { background: #ECFDF5; }

[data-theme="dark"] .info-card-1 { background: #3F2F0F; }
[data-theme="dark"] .info-card-2 { background: #2F1D4F; }
[data-theme="dark"] .info-card-3 { background: #1D2F4F; }
[data-theme="dark"] .info-card-4 { background: #1F3F2F; }

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

.info-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

[data-theme="dark"] .info-icon-wrap {
  background: #2D3748;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.info-icon {
  font-size: 1.5rem;
}

.info-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.info-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ---- RGPD, FOOTER ---- */

.rgpd-notice {
  background: #F0FDF4;
  border-left: 4px solid var(--success);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
}

[data-theme="dark"] .rgpd-notice {
  background: #1E3A1E;
  border-left-color: #10B981;
}

.rgpd-notice h3 { margin-bottom: 0.5rem; }
.rgpd-notice p { font-size: 0.85rem; }
.rgpd-notice a { color: var(--primary); text-decoration: none; font-weight: 600; }
.rgpd-notice a:hover { text-decoration: underline; }

[data-theme="dark"] .rgpd-notice a { color: #FF8A65; }

footer {
  text-align: center;
  padding: 1.25rem 0;
  color: var(--text-lighter);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 0.8rem;
}

/* ---- SPINNER ---- */

.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 4px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

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

/* ---- ALERTS ---- */

.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.875rem; }
.alert-success { background: #F0FDF4; color: #047857; border-left: 4px solid var(--success); }
.alert-error { background: #FEF2F2; color: #991b1b; border-left: 4px solid var(--error); }
.alert-warning { background: #FFFBEB; color: #92400e; border-left: 4px solid var(--warning); }

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-blob { display: none; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .results-list { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem 1rem; }
  .hero-title { font-size: 1.6rem; }
  .info-grid { grid-template-columns: 1fr; }
  .btn-primary, button[type="submit"] { width: 100%; }
  .form-container { padding: 1.25rem; }
  .top-banner { font-size: 0.7rem; }
  .banner-content { flex-wrap: wrap; }
}
