/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f18;
  --surface:   #13162a;
  --surface2:  #1c2040;
  --border:    #2a2f52;
  --accent:    #6366f1;
  --accent-h:  #4f46e5;
  --accent-dim:#6366f130;
  --success:   #10b981;
  --danger:    #ef4444;
  --text:      #e2e8f0;
  --text-dim:  #94a3b8;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,.45);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* ===== NAVBAR ===== */
.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 32px;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.topnav .brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-right: auto;
}

.topnav .brand span { color: var(--accent); }

.topnav a {
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.topnav a:hover, .topnav a.active {
  color: var(--text);
  background: var(--surface2);
}

/* ===== PAGE WRAPPER ===== */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

/* ===== PAGE TITLE ===== */
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: var(--bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  fill: var(--text-dim);
  display: block;
  transition: fill 0.2s;
}

.upload-zone:hover .upload-icon {
  fill: var(--accent);
}

.upload-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.upload-hint span {
  color: var(--accent);
  font-weight: 600;
}

/* ===== PREVIEW ===== */
#preview-container {
  display: none;
  margin-top: 20px;
  position: relative;
}

#preview-container img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

#preview-name {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

/* ===== SIZE SELECTOR ===== */
.size-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.size-option input[type="radio"] { display: none; }

.size-option label {
  display: block;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: all 0.15s;
  user-select: none;
}

.size-option label:hover { border-color: var(--accent); }

.size-option input:checked + label {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.size-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.size-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.size-option input:checked + label .size-name { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  justify-content: center;
  margin-top: 20px;
  padding: 12px;
  font-size: 1rem;
}

.btn-primary:hover { background: var(--accent-h); color: #fff; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover { background: var(--danger); color: #fff; }

/* ===== MESSAGES ===== */
.messages { list-style: none; margin-bottom: 24px; }

.messages li {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.messages .success, .messages .info { background: #10b98120; color: var(--success); border: 1px solid #10b98140; }
.messages .error, .messages .warning { background: #ef444420; color: var(--danger); border: 1px solid #ef444440; }

/* ===== STATUS BANNER ===== */
.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 10px;
  background: #10b98115;
  border: 1px solid #10b98135;
  margin-top: 24px;
  color: var(--success);
}

.status-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #10b98140;
  border-top-color: var(--success);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.status-text strong { display: block; font-size: 0.95rem; }
.status-text span { font-size: 0.82rem; opacity: 0.75; }

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 36px 0;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.section-badge {
  font-size: 0.78rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ===== IMAGE GRID ===== */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.img-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.img-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.img-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.img-card-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.img-card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 7px;
  font-size: 0.82rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  fill: var(--border);
}

.empty-state p { font-size: 0.95rem; }

/* ===== AUTH FORMS ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.auth-logo {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-logo span { color: var(--accent); }

.auth-tagline {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 32px;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-dim); opacity: 0.6; }

.auth-link {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .card { padding: 24px 18px; }
  .img-grid { grid-template-columns: 1fr 1fr; }
  .topnav { padding: 0 16px; }
}

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

/* ===== LANDING PAGE ===== */
.lp-nav {
  display: flex;
  align-items: center;
  padding: 0 48px;
  height: 64px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,15,24,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.lp-nav .brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-right: auto;
}

.lp-nav .brand span { color: var(--accent); }

.lp-nav-links { display: flex; gap: 8px; }

.lp-nav .btn-outline {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: .88rem;
  font-weight: 500;
  transition: all .15s;
}

.lp-nav .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.lp-nav .btn-filled {
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  transition: background .15s;
}

.lp-nav .btn-filled:hover { background: var(--accent-h); color: #fff; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #6366f128, transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, #4f46e515, transparent);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  margin-bottom: 24px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text);
  max-width: 780px;
  margin: 0 auto 20px;
}

.hero h1 span { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-cta .cta-primary {
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  transition: all .15s;
  box-shadow: 0 4px 24px #6366f140;
}

.hero-cta .cta-primary:hover { background: var(--accent-h); transform: translateY(-1px); }

.hero-cta .cta-secondary {
  padding: 14px 32px;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: all .15s;
}

.hero-cta .cta-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

.hero-stat span {
  font-size: .82rem;
  color: var(--text-dim);
}

/* Sections communes */
.lp-section {
  padding: 96px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.lp-section-header .eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.lp-section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 14px;
}

.lp-section-header p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* Étapes */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  transition: border-color .2s;
}

.step-card:hover { border-color: var(--accent); }

.step-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.6;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}

.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg { fill: var(--accent); width: 22px; height: 22px; }

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Specs / Tech */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.spec-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}

.spec-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* CTA section */
.lp-cta {
  text-align: center;
  padding: 96px 24px;
  background: linear-gradient(135deg, #6366f110, #4f46e508);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lp-cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.lp-cta p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

/* Footer */
.lp-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: .82rem;
  border-top: 1px solid var(--border);
}

.lp-footer a { color: var(--text-dim); }
.lp-footer a:hover { color: var(--accent); }

/* Séparateur */
.lp-divider {
  height: 1px;
  background: var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .lp-nav { padding: 0 20px; }
  .hero-stats { gap: 28px; }
  .lp-nav-links .btn-outline { display: none; }
}
