/* ============================
   GDNA Dark Theme - NIS2 Auditor
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-primary: #071826;
  --bg-secondary: #0B202E;
  --bg-nav: #0A1C2A;
  --bg-card: #0F2A3A;
  --bg-card-hover: #13324A;
  --bg-input: #0A1C2A;
  --accent-cyan: #4EC9CC;
  --accent-cyan-light: #7EE0E2;
  --accent-cyan-dark: #2FAEB1;
  --accent-teal: #3AAFA9;
  --accent-teal-gradient: linear-gradient(135deg, #4EC9CC 0%, #3AAFA9 100%);
  --text-primary: #E8F0F0;
  --text-secondary: #A0B8C8;
  --text-muted: #6A8A9A;
  --border-color: #1A3A4A;
  --border-light: #2A4A5A;
  --danger: #FF5A5F;
  --danger-bg: rgba(255, 90, 95, 0.1);
  --warning: #FFB347;
  --warning-bg: rgba(255, 179, 71, 0.1);
  --success: #4EC9CC;
  --success-bg: rgba(78, 201, 204, 0.1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--accent-cyan-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent-cyan);
}

.text-center {
  text-align: center;
}

/* Navigation Bar */
.navbar {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.navbar-logo img {
  height: 36px;
  width: auto;
}

.navbar-logo .logo-text {
  background: var(--accent-teal-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-teal-gradient);
  transition: var(--transition);
}

.navbar-links a:hover {
  color: var(--text-primary);
}

.navbar-links a:hover::after {
  width: 100%;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(78, 201, 204, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--danger-bg);
  border: 1px solid rgba(255, 90, 95, 0.3);
  border-radius: 100px;
  padding: 0.4rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #E8F0F0 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2, .card-header h3 {
  color: var(--text-primary);
}

/* Question Cards */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1rem;
  display: none;
  animation: fadeIn 0.4s ease;
}

.question-card.active {
  display: block;
}

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

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-teal-gradient);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.option-label:hover {
  border-color: var(--accent-cyan);
  background: rgba(78, 201, 204, 0.05);
}

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

.option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: var(--transition);
}

.option-label input[type="radio"]:checked ~ .option-radio {
  border-color: var(--accent-cyan);
}

.option-label input[type="radio"]:checked ~ .option-radio::after {
  background: var(--accent-cyan);
}

.option-label input[type="radio"]:checked ~ .option-text {
  color: var(--text-primary);
}

.option-label.selected {
  border-color: var(--accent-cyan);
  background: rgba(78, 201, 204, 0.08);
}

.option-label.selected .option-text {
  color: var(--accent-cyan);
  font-weight: 500;
}

.option-points {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.option-label.selected .option-points {
  color: var(--accent-cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-teal-gradient);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(78, 201, 204, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(78, 201, 204, 0.4);
  color: var(--bg-primary);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

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

/* Navigation Buttons */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.question-counter {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Score Gauge */
.score-section {
  padding: 3rem 0;
}

.gauge-container {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.gauge-wrapper {
  position: relative;
  width: 220px;
  height: 110px;
  margin: 0 auto 1.5rem;
  overflow: hidden;
}

.gauge-base {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 110px 110px 0 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.gauge-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 110px 110px 0 0;
  background: conic-gradient(
    from 180deg at 50% 100%,
    var(--danger) 0deg,
    var(--warning) 90deg,
    var(--accent-cyan) 180deg
  );
  mask: conic-gradient(from 180deg at 50% 100%, transparent 0deg, transparent var(--gauge-deg, 0deg), black var(--gauge-deg, 0deg), black 180deg);
  -webkit-mask: conic-gradient(from 180deg at 50% 100%, transparent 0deg, transparent var(--gauge-deg, 0deg), black var(--gauge-deg, 0deg), black 180deg);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-center {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 80px;
  border-radius: 80px 80px 0 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 15px;
}

.gauge-score {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
}

.gauge-score span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gauge-level {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.3rem 1.2rem;
  border-radius: 100px;
  display: inline-block;
  margin-top: 0.5rem;
}

.gauge-level.critique {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 90, 95, 0.3);
}

.gauge-level.intermediaire {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(255, 179, 71, 0.3);
}

.gauge-level.avance {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(78, 201, 204, 0.3);
}

/* Level descriptions */
.level-descriptions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.level-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.level-box.critique {
  border-color: rgba(255, 90, 95, 0.3);
  background: var(--danger-bg);
}

.level-box.intermediaire {
  border-color: rgba(255, 179, 71, 0.3);
  background: var(--warning-bg);
}

.level-box.avance {
  border-color: rgba(78, 201, 204, 0.3);
  background: var(--success-bg);
}

.level-box h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.level-box .range {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.level-box.critique .range { color: var(--danger); }
.level-box.intermediaire .range { color: var(--warning); }
.level-box.avance .range { color: var(--success); }

.level-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* CTA Section */
.cta-section {
  padding: 4rem 0 3rem;
  text-align: center;
}

.cta-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(78, 201, 204, 0.05) 100%);
  border: 1px solid rgba(78, 201, 204, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.cta-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.cta-card p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.cta-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.cta-benefit {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cta-benefit svg, .cta-benefit .icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.progress-dot.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(78, 201, 204, 0.4);
}

.progress-dot.answered {
  background: var(--accent-teal);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.4rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.2rem;
}

.modal-close:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(78, 201, 204, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Footer */
.footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .hero-stats { gap: 1.5rem; }
  
  .navbar-links { display: none; }
  
  .level-descriptions {
    grid-template-columns: 1fr;
  }
  
  .cta-benefits {
    grid-template-columns: 1fr;
  }
  
  .cta-card {
    padding: 2rem 1.5rem;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-brand { max-width: 100%; }
  
  .question-card { padding: 1.5rem; }
  .modal { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .stat-value { font-size: 1.5rem; }
  .btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
  .gauge-wrapper { width: 180px; height: 90px; }
  .gauge-center { width: 130px; height: 65px; padding-top: 10px; }
  .gauge-score { font-size: 1.5rem; }
}

/* Utility */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Success page specific */
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid rgba(78, 201, 204, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: var(--accent-cyan);
}

/* Loading / error states */
.error-message {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 90, 95, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--danger);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.success-message {
  background: var(--success-bg);
  border: 1px solid rgba(78, 201, 204, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--accent-cyan);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Google-like scrollbar for dark theme */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}