/* =============================================================================
   MERIDIANPICK v2 - STYLESHEET VANILLA CSS PUR (ZERO IMAGE)
   Performance maximale (< 20 Ko) - Typographie CSS - Symboles Unicode/ASCII
   ============================================================================= */

:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-input: #0b1120;
  
  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-focus: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
  
  --container-max: 1140px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

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

/* --- Navigation Header ------------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--text-main);
  text-decoration: none;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  text-decoration: none;
}

/* --- Buttons (Zéro image, pur CSS) ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none !important;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
}

.btn-primary:hover {
  background: #0ea5e9;
  border-color: #0284c7;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* --- Cards & Surfaces ------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}

.card-elevated {
  background: var(--bg-surface-elevated);
  border-color: var(--border-medium);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Badges & Tags (ASCII / Unicode) ----------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.badge-cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.25); }
.badge-green { background: rgba(16, 185, 129, 0.12); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-amber { background: rgba(245, 158, 11, 0.12); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-purple { background: rgba(139, 92, 246, 0.12); color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.25); }

/* --- Forms & Inputs --------------------------------------------------------- */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

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

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}

.form-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Honeypot anti-spam : caché aux humains, visible par les robots sans CSS */
.sr-only, .hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Hero & Sections -------------------------------------------------------- */
.hero {
  padding: 50px 0 30px;
  text-align: center;
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Chat & Prompt Workspace (Module Clé) ----------------------------------- */
.chat-workspace {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 40px;
}

.chat-toolbar {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-action {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-medium);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.btn-action.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 3px;
}

.mode-btn {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.mode-btn.active.unrestricted {
  color: var(--accent-amber);
}

.chat-body {
  padding: 20px;
}

.shield-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--accent-green);
}

.chat-response-card {
  margin-top: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.response-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
}

/* --- Features Grid ---------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.feature-icon {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  display: inline-block;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Extension Simulator (Module Interactif) -------------------------------- */
.sim-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0 50px;
}

@media (max-width: 860px) {
  .sim-container { grid-template-columns: 1fr; }
}

.sim-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.sim-header {
  background: var(--bg-surface-elevated);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.sim-body {
  padding: 16px;
}

/* --- Cookie Consent Banner & Modal (RGPD Strict) ---------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 1000;
  display: none;
}

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

/* --- Toast Alerts ----------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.2s ease;
  min-width: 280px;
  max-width: 420px;
}

.toast-success { border-color: var(--accent-green); color: #a7f3d0; }
.toast-error { border-color: var(--accent-red); color: #fca5a5; }

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

/* --- Tables & Stats --------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Progress Meter --------------------------------------------------------- */
.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* --- Footer ----------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 18px;
  list-style: none;
}

/* --- Alert Banners ---------------------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

.alert-icon {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.4;
}

.alert-message {
  flex: 1;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.alert-info {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #7dd3fc;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
