/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f4f6f4; color: #1a2e1a; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== VARIABLES ===== */
:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-dim: rgba(34,197,94,0.15);
  --green-border: rgba(34,197,94,0.3);
  --dark: #0a1a0f;
  --dark2: #0f2415;
  --text-muted: rgba(255,255,255,0.55);
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== NAVBAR ===== */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(10,26,15,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(34,197,94,0.15); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.logo-dot.small { width: 8px; height: 8px; }
.logo-text { color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.logo-tag { background: var(--green-dim); border: 1px solid var(--green-border); color: var(--green); font-size: 11px; padding: 2px 8px; border-radius: 999px; font-family: monospace; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: rgba(255,255,255,0.6); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--green); }
.btn-nav { background: var(--green); color: var(--dark) !important; padding: 7px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px !important; transition: background .2s !important; }
.btn-nav:hover { background: var(--green-dark) !important; }

/* ===== HERO ===== */
.hero { background: var(--dark); padding: 5rem 1.5rem 4rem; text-align: center; position: relative; overflow: hidden; }
.grid-bg { position: absolute; inset: 0; background: repeating-linear-gradient(0deg,transparent,transparent 39px,rgba(34,197,94,0.05) 40px),repeating-linear-gradient(90deg,transparent,transparent 39px,rgba(34,197,94,0.05) 40px); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--green-dim); border: 1px solid var(--green-border); border-radius: 999px; padding: 6px 16px; margin-bottom: 2rem; }
.hero-badge span { font-size: 13px; color: rgba(255,255,255,0.7); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.75rem; }
.accent { color: var(--green); }
.hero-sub { font-size: 0.75rem; font-family: monospace; letter-spacing: 0.15em; color: rgba(255,255,255,0.35); margin-bottom: 1.25rem; }
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,0.6); max-width: 520px; margin: 0 auto 2.5rem; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--green); color: var(--dark); padding: 13px 28px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; transition: background .2s, transform .1s; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); padding: 13px 28px; border-radius: var(--radius-sm); font-size: 15px; transition: border-color .2s, color .2s; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ===== DEMO SCAN ===== */
.demo-scan { background: var(--dark2); border-top: 1px solid rgba(34,197,94,0.1); border-bottom: 1px solid rgba(34,197,94,0.1); padding: 2.5rem 1.5rem; }
.container { max-width: 1100px; margin: 0 auto; }
.demo-inner { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.2); border-radius: var(--radius); padding: 2rem; max-width: 700px; margin: 0 auto; }
.qr-box { flex-shrink: 0; text-align: center; }
.qr-label { font-family: monospace; font-size: 12px; color: var(--green); margin-top: 8px; letter-spacing: 0.08em; }
.demo-info { flex: 1; min-width: 200px; }
.demo-eyebrow { font-size: 11px; font-family: monospace; letter-spacing: 0.12em; color: var(--green); margin-bottom: 0.5rem; }
.demo-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.demo-desc { font-size: 0.875rem; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
.demo-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.25rem; }
.tag { font-size: 11px; padding: 4px 10px; border-radius: 999px; font-family: monospace; }
.tag.green { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.tag.blue { background: rgba(59,130,246,0.15); color: #7dd3fc; border: 1px solid rgba(59,130,246,0.3); }
.tag.amber { background: rgba(251,191,36,0.15); color: #fcd34d; border: 1px solid rgba(251,191,36,0.3); }
.btn-demo { display: inline-block; background: var(--green); color: var(--dark); padding: 9px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; transition: background .2s; }
.btn-demo:hover { background: var(--green-dark); }

/* ===== SECTIONS ===== */
.section-label { font-size: 11px; font-family: monospace; letter-spacing: 0.15em; color: var(--green); text-transform: uppercase; margin-bottom: 1.5rem; }

/* ===== FEATURES ===== */
.features { padding: 4rem 1.5rem; background: #f4f6f4; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.feat-card { background: #fff; border: 1px solid #e2e8e2; border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s, transform .2s; }
.feat-card:hover { border-color: var(--green); transform: translateY(-2px); }
.feat-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feat-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: #0a1a0f; }
.feat-card p { font-size: 13px; color: #4a6a4a; line-height: 1.6; }

/* ===== PROFILES ===== */
.profiles { padding: 4rem 1.5rem; background: #eef2ee; }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.profile-card { background: #fff; border: 1px solid #e2e8e2; border-radius: var(--radius); padding: 1.5rem; }
.profile-card.featured { border: 2px solid var(--green); }
.profile-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 0.75rem; }
.profile-icon.blue { background: rgba(59,130,246,0.1); }
.profile-icon.amber { background: rgba(251,191,36,0.1); }
.profile-icon.purple { background: rgba(168,85,247,0.1); }
.profile-icon.green { background: rgba(34,197,94,0.12); }
.profile-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #0a1a0f; }
.profile-card > p { font-size: 12px; color: #6a8a6a; margin-bottom: 0.75rem; }
.profile-card ul li { font-size: 12px; color: #4a6a4a; padding: 3px 0; border-bottom: 1px solid #f0f4f0; }
.profile-card ul li::before { content: '→ '; color: var(--green); }
.profile-card ul li:last-child { border-bottom: none; }

/* ===== STACK ===== */
.stack-section { padding: 3rem 1.5rem; background: var(--dark); }
.stack-section .section-label { color: rgba(34,197,94,0.6); }
.stack-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.stack-item { background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.15); border-radius: var(--radius-sm); padding: 0.75rem 1.25rem; display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.stack-label { font-size: 10px; font-family: monospace; color: rgba(34,197,94,0.5); letter-spacing: 0.1em; text-transform: uppercase; }
.stack-val { font-size: 14px; color: #e2e8e0; font-weight: 500; }

/* ===== ROADMAP ===== */
.roadmap-section { padding: 4rem 1.5rem; background: #f4f6f4; }
.roadmap { max-width: 600px; display: flex; flex-direction: column; gap: 0; }
.rm-item { display: flex; gap: 16px; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid #e2e8e2; }
.rm-item:last-child { border-bottom: none; }
.rm-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; margin-top: 2px; font-weight: 700; }
.rm-item.done .rm-dot { background: rgba(34,197,94,0.15); color: #16a34a; border: 1px solid rgba(34,197,94,0.4); }
.rm-item.active .rm-dot { background: rgba(251,191,36,0.15); color: #d97706; border: 1px solid rgba(251,191,36,0.4); }
.rm-item.next .rm-dot { background: #f0f4f0; color: #9aaa9a; border: 1px solid #dde8dd; }
.rm-body { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.rm-body strong { font-size: 14px; color: #0a1a0f; }
.rm-body span { font-size: 12px; color: #6a8a6a; }

/* ===== FOOTER ===== */
.footer { background: var(--dark); border-top: 1px solid rgba(34,197,94,0.15); padding: 2rem 1.5rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(255,255,255,0.4); font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: var(--green); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.25); }

/* ===== ADMIN / FICHE STYLES ===== */
.admin-page { min-height: 100vh; background: #f4f6f4; }
.admin-header { background: var(--dark); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-header .nav-logo { gap: 10px; }
.admin-header a { color: rgba(255,255,255,0.5); font-size: 13px; margin-left: 1.5rem; transition: color .2s; }
.admin-header a:hover { color: var(--green); }
.admin-content { max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: #0a1a0f; margin-bottom: 0.25rem; }
.page-sub { font-size: 13px; color: #6a8a6a; margin-bottom: 2rem; }
.card { background: #fff; border: 1px solid #e2e8e2; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-title { font-size: 14px; font-weight: 600; color: #0a1a0f; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #f0f4f0; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #2a4a2a; margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 9px 12px; border: 1px solid #d0d8d0; border-radius: var(--radius-sm); font-size: 14px; color: #0a1a0f; background: #fff; transition: border-color .2s; font-family: inherit; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-submit { background: var(--green); color: var(--dark); border: none; padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s; }
.btn-submit:hover { background: var(--green-dark); }
.btn-danger { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; padding: 7px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-danger:hover { background: #fecaca; }
.btn-secondary { background: #f0f4f0; color: #2a4a2a; border: 1px solid #d0d8d0; padding: 9px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: #e2e8e2; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th { text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 600; color: #6a8a6a; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8e2; }
table td { padding: 10px 12px; border-bottom: 1px solid #f0f4f0; color: #2a4a2a; vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #f9fbf9; }
.badge { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 500; }
.badge-green { background: rgba(34,197,94,0.12); color: #16a34a; }
.badge-amber { background: rgba(251,191,36,0.12); color: #d97706; }
.badge-blue { background: rgba(59,130,246,0.12); color: #2563eb; }
.badge-red { background: rgba(239,68,68,0.12); color: #dc2626; }
.empty-state { text-align: center; padding: 3rem; color: #9aaa9a; font-size: 14px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 1.5rem; }
.stat-card { background: #fff; border: 1px solid #e2e8e2; border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-label { font-size: 11px; color: #9aaa9a; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: #0a1a0f; }
.stat-value.green { color: var(--green-dark); }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 1rem; }
.alert-success { background: rgba(34,197,94,0.1); color: #16a34a; border: 1px solid rgba(34,197,94,0.3); }
.alert-error { background: rgba(239,68,68,0.08); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }
.qr-display { text-align: center; padding: 1.5rem; }
.qr-display svg { border: 1px solid #e2e8e2; border-radius: var(--radius-sm); }
.qr-url { font-family: monospace; font-size: 12px; color: #6a8a6a; margin-top: 8px; word-break: break-all; }

/* ===== FICHE PUBLIQUE ===== */
.fiche-page { min-height: 100vh; background: var(--dark); }
.fiche-header { background: rgba(10,26,15,0.95); border-bottom: 1px solid rgba(34,197,94,0.15); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 12px; }
.fiche-header .logo-text { color: #fff; font-size: 1rem; }
.fiche-content { max-width: 700px; margin: 0 auto; padding: 1.5rem; }
.fiche-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(34,197,94,0.2); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.fiche-card-title { font-size: 11px; font-family: monospace; letter-spacing: 0.12em; color: rgba(34,197,94,0.7); margin-bottom: 0.75rem; text-transform: uppercase; }
.fiche-arm-name { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.fiche-arm-loc { font-size: 0.875rem; color: rgba(255,255,255,0.5); margin-bottom: 1rem; }
.fiche-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fiche-meta-item { background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); padding: 8px 12px; }
.fiche-meta-label { font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.fiche-meta-val { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 500; }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-sm); padding: 10px 14px; }
.doc-icon { font-size: 1.2rem; flex-shrink: 0; }
.doc-info { flex: 1; }
.doc-title { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 500; }
.doc-meta { font-size: 11px; color: rgba(255,255,255,0.35); }
.interv-list { display: flex; flex-direction: column; gap: 8px; }
.interv-item { background: rgba(255,255,255,0.03); border-left: 3px solid rgba(34,197,94,0.4); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 14px; }
.interv-date { font-size: 11px; color: rgba(34,197,94,0.7); font-family: monospace; margin-bottom: 3px; }
.interv-desc { font-size: 13px; color: rgba(255,255,255,0.75); }
.no-data { font-size: 13px; color: rgba(255,255,255,0.3); font-style: italic; }

/* ===== LOGIN ===== */
.login-page { min-height: 100vh; background: var(--dark); display: flex; align-items: center; justify-content: center; }
.login-box { background: rgba(255,255,255,0.04); border: 1px solid rgba(34,197,94,0.2); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 380px; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-text { font-size: 1.4rem; color: #fff; display: block; margin-top: 8px; }
.login-logo .logo-tag { display: inline-block; margin-top: 4px; }
.login-box h2 { font-size: 1.1rem; color: #fff; font-weight: 600; margin-bottom: 1.5rem; text-align: center; }
.login-box .form-group label { color: rgba(255,255,255,0.6); }
.login-box .form-group input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: #fff; }
.login-box .form-group input:focus { border-color: var(--green); }
.login-box .btn-submit { width: 100%; margin-top: 0.5rem; padding: 12px; font-size: 15px; }
.login-back { text-align: center; margin-top: 1.25rem; font-size: 13px; }
.login-back a { color: rgba(255,255,255,0.4); transition: color .2s; }
.login-back a:hover { color: var(--green); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .nav-links a:not(.btn-nav) { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .demo-inner { flex-direction: column; text-align: center; }
  .demo-tags { justify-content: center; }
  .fiche-meta { grid-template-columns: 1fr; }
}
