/* ============================================================
   STYLE.CSS — Design System Évaluerlechangement.ca™
   Palette : Deep Navy / Electric Indigo / Gold Accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ——— TOKENS ——— */
:root {
  --bg-base:        #070C1A;
  --bg-surface:     #0D1526;
  --bg-card:        #121C33;
  --bg-card-hover:  #16223D;
  --bg-glass:       rgba(18, 28, 51, 0.7);
  --border:         rgba(255,255,255,0.07);
  --border-active:  rgba(79,70,229,0.5);

  --indigo:         #4F46E5;
  --indigo-light:   #818CF8;
  --indigo-dark:    #3730A3;
  --gold:           #F59E0B;
  --gold-light:     #FCD34D;
  --emerald:        #10B981;
  --rose:           #EF4444;
  --amber:          #F97316;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-glow:  0 0 30px rgba(79,70,229,0.15);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-btn:   0 2px 12px rgba(79,70,229,0.3);

  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

/* ——— RESET ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ——— BACKGROUND MESH ——— */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(79,70,229,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245,158,11,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ——— APP WRAPPER ——— */
#app {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.brand span { color: var(--gold); }
.brand-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header-tag {
  font-size: 0.75rem;
  color: var(--indigo-light);
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-weight: 500;
}

/* ============================================================
   PROGRESS BAR & STEP INDICATORS
   ============================================================ */
.progress-wrap {
  margin-bottom: 2.5rem;
}
.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 1rem;
}
#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--gold));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
  width: 0%;
}
.steps-row {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  opacity: 0.35;
  transition: var(--transition);
  cursor: default;
}
.step-indicator.done { opacity: 0.6; cursor: pointer; }
.step-indicator.active { opacity: 1; }
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  background: var(--bg-card);
  transition: var(--transition);
}
.step-indicator.done .step-circle {
  border-color: var(--indigo);
  color: var(--indigo);
}
.step-indicator.active .step-circle {
  border-color: var(--indigo);
  background: var(--indigo);
  color: white;
  box-shadow: 0 0 16px rgba(79,70,229,0.4);
}
.step-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.step-indicator.active .step-label { color: var(--text-secondary); }

/* ============================================================
   SCREENS
   ============================================================ */
.screen { display: none; animation: fadeSlideIn 0.4s ease; }
.screen.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SCREEN 0 — ACCUEIL
   ============================================================ */
.welcome-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.welcome-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.25rem 1rem;
  border-radius: 99px;
}
.welcome-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.welcome-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--indigo-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.welcome-hero p {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.mode-selector {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  min-width: 200px;
}
.mode-btn:hover {
  border-color: var(--indigo);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.mode-btn.active {
  border-color: var(--indigo);
  background: rgba(79,70,229,0.1);
  color: var(--indigo-light);
  box-shadow: var(--shadow-btn);
}
.mode-icon { font-size: 1.4rem; }
.mode-info { text-align: left; }
.mode-title { font-weight: 600; color: var(--text-primary); }
.mode-desc { font-size: 0.75rem; color: var(--text-muted); }

/* Info form */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}
.info-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-group input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}
.form-group input::placeholder { color: var(--text-muted); }

/* Outil summary cards */
.outils-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.outil-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}
.outil-card:hover {
  border-color: var(--indigo);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.outil-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--indigo);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.outil-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.outil-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ============================================================
   SECTION HEADER (shared)
   ============================================================ */
.screen-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.screen-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ============================================================
   OUTIL 1 — Questionnaire Likert
   ============================================================ */
.outil1-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.mini-progress {
  flex: 0 0 280px;
}
.mini-progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.mini-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.mini-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--gold));
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Live score sidebar */
.outil1-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 1.5rem;
  align-items: start;
}
.live-scores-panel {
  position: sticky;
  top: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.live-scores-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.live-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.live-score-dim {
  font-weight: 700;
  font-size: 0.85rem;
  width: 18px;
}
.live-score-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--bg-surface);
  border-radius: 99px;
  overflow: hidden;
}
.live-score-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}
.live-score-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 28px;
  text-align: right;
}

/* Question groups */
.question-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
}
.group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.group-dim {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
}
.group-label {
  font-weight: 700;
  font-size: 0.85rem;
}
.group-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}
.question-item {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.question-item:last-child { border-bottom: none; }
.question-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}
.likert-scale {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
  flex: 1;
  min-width: 72px;
}
.likert-btn:hover {
  border-color: var(--accent, var(--indigo));
  color: var(--text-primary);
}
.likert-btn.selected {
  background: color-mix(in srgb, var(--accent, var(--indigo)) 15%, transparent);
  border-color: var(--accent, var(--indigo));
  color: var(--accent, var(--indigo));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent, var(--indigo)) 25%, transparent);
}
.likert-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.likert-lbl {
  font-size: 0.62rem;
  text-align: center;
  line-height: 1.2;
}

/* ============================================================
   OUTIL 2 — Cartes Flash (Tabs)
   ============================================================ */
.tabs-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text-primary); border-color: var(--indigo); }
.tab-btn.active {
  background: rgba(79,70,229,0.12);
  border-color: var(--indigo);
  color: var(--indigo-light);
}
.tab-badge {
  background: var(--indigo);
  color: white;
  font-size: 0.65rem;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.tab-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
}
.tab-dim {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
}
.tab-label { font-weight: 600; }
.tab-count {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.tab-instruction {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-style: italic;
}
.items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}
.card-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-collapse: collapse;
  cursor: pointer;
  transition: var(--transition);
}
.card-item:hover {
  background: rgba(255,255,255,0.03);
}
.card-item.checked {
  background: color-mix(in srgb, var(--accent, var(--indigo)) 8%, transparent);
}
.card-item input { display: none; }
.card-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-top: 1px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-item.checked .card-check {
  background: var(--accent, var(--indigo));
  border-color: var(--accent, var(--indigo));
}
.card-item.checked .card-check::after {
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}
.card-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.card-item.checked .card-text { color: var(--text-primary); }

/* Outil 2 totals bar */
.o2-totals {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.o2-totals-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.o2-total-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.o2-total-dim { font-weight: 700; font-size: 0.85rem; width: 18px; }
.o2-total-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 99px;
  overflow: hidden;
}
.o2-total-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}
.o2-total-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 32px;
  text-align: right;
}

.tab-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.5rem;
}

/* ============================================================
   OUTIL 3 — Duels de Tensions
   ============================================================ */
.axe-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.axe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.axe-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}
.axe-score-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.vs {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.duel-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.duel-item:last-child { border-bottom: none; }
.duel-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.duel-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-align: left;
  transition: var(--transition);
  line-height: 1.4;
}
.duel-btn:hover {
  background: color-mix(in srgb, var(--accent, var(--indigo)) 8%, transparent);
  color: var(--text-primary);
}
.duel-btn.chosen {
  background: color-mix(in srgb, var(--accent, var(--indigo)) 14%, transparent);
  color: var(--text-primary);
}
.duel-btn.chosen .duel-letter {
  font-size: 1.1rem;
}
.duel-letter {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: var(--transition);
}
.duel-btn.right { flex-direction: row-reverse; text-align: right; }
.duel-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ============================================================
   BUTTONS (Navigation)
   ============================================================ */
.nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--indigo), #6366F1);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(79,70,229,0.45);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.btn-secondary:hover {
  border-color: var(--indigo);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #D97706, var(--gold));
  border: none;
  border-radius: var(--radius-md);
  color: #1A0F00;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(245,158,11,0.45);
}
.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
}

/* ============================================================
   RAPPORT
   ============================================================ */
.rapport-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
#rapport-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

/* Rapport HTML (generated) */
.rapport-container {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}
.rapport-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.rapport-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.brand-logo span { color: var(--gold); }
.rapport-cible {
  font-size: 0.72rem;
  color: var(--indigo-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.rapport-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: right;
}
.meta-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  justify-content: flex-end;
  align-items: center;
}
.meta-row span { color: var(--text-muted); }
.meta-row strong { color: var(--text-primary); }

.rapport-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.rapport-section { margin-bottom: 1rem; }
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.section-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(79,70,229,0.15);
  border: 1px solid rgba(79,70,229,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--indigo-light);
}
.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.section-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.code-badge {
  margin-left: auto;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--indigo-light);
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.25);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.05em;
}

/* Scores grid in rapport */
.scores-grid { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.score-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.score-dim { font-weight: 800; font-family: 'Outfit', sans-serif; font-size: 0.85rem; width: 16px; }
.score-dimname { font-size: 0.78rem; color: var(--text-muted); width: 90px; }
.score-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 99px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
.score-val { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); width: 36px; text-align: right; }
.interp-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.interp-tag.dominant { background: rgba(16,185,129,0.15); color: #10B981; }
.interp-tag.neutre   { background: rgba(148,163,184,0.1); color: var(--text-muted); }
.interp-tag.rejet    { background: rgba(239,68,68,0.12);  color: #EF4444; }

.constats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Constat boxes */
.constat-box {
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  border: 1px solid;
}
.constat-box.energy {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.2);
}
.constat-box.reject {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
}
.constat-box.warn {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.2);
}
.constat-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}
.constat-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Axe bars in rapport */
.axe-bars-container { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.5rem; }
.axe-bar-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.axe-label { font-size: 0.78rem; font-weight: 700; width: 40px; }
.axe-label.left { text-align: right; }
.axe-bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--bg-surface);
  display: flex;
  overflow: hidden;
}
.axe-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.axe-fill.left { border-radius: 99px 0 0 99px; }
.axe-fill.right { border-radius: 0 99px 99px 0; }
.rigid-tag {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(239,68,68,0.15);
  color: #EF4444;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Verdict */
.verdict-box {
  border: 1px solid;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.verdict-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.verdict-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Codes summary */
.codes-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.code-col { text-align: center; flex: 1; }
.code-col-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.3rem; }
.code-col-code { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; }
.code-arrow { color: var(--text-muted); font-size: 1.2rem; }

/* Directives */
.directives-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.directive-box {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid;
}
.directive-box.do {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.2);
}
.directive-box.stop {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
}
.directive-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.directive-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 60px;
}
.directive-text.editable {
  outline: none;
  cursor: text;
}
.directive-text.editable:focus {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  padding: 0.25rem;
  margin: -0.25rem;
}

/* Rapport footer */
.rapport-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Badge dim */
.badge-dim {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid;
  margin: 0.1rem;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 9999;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
#toast.toast-error { border-color: rgba(239,68,68,0.4); }
#toast.toast-warn  { border-color: rgba(245,158,11,0.4); }
#toast.toast-info  { border-color: rgba(79,70,229,0.4); }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: white !important;
    color: #1a1a2e !important;
  }
  body::before { display: none; }
  .app-header, .progress-wrap, .rapport-actions, .nav-footer,
  .screen:not(.active), #toast { display: none !important; }
  #rapport-content {
    background: white;
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .rapport-container {
    color: #1a1a2e;
  }
  .rapport-header { page-break-inside: avoid; }
  .rapport-section { page-break-inside: avoid; }
  .bg-surface, .bg-card { background: #f5f5f8 !important; }
  .text-muted { color: #666 !important; }
  .score-bar-wrap, .axe-bar { background: #e5e7eb !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .outil1-layout { grid-template-columns: 1fr; }
  .live-scores-panel { position: static; }
  .outils-grid { grid-template-columns: 1fr; }
  .items-grid { grid-template-columns: 1fr; }
  .constats-row { grid-template-columns: 1fr; }
  .directives-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .codes-summary { flex-direction: column; gap: 0.5rem; }
  .likert-scale { flex-wrap: wrap; }
  .likert-btn { min-width: 55px; }
  .rapport-header { flex-direction: column; }
  .rapport-meta { text-align: left; }
  .meta-row { justify-content: flex-start; }
}


/* ============================================================ DASHBOARD LINK */
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-dashboard {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary, #94A3B8);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: var(--transition, all 0.2s ease);
}
.btn-dashboard:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary, #F8FAFC);
  border-color: var(--teal, #14B8A6);
  transform: translateX(-2px);
}
.btn-nav-portal {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 99px;
  color: var(--text-muted, #64748B);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition, all 0.2s ease);
}
.btn-nav-portal:hover {
  border-color: var(--text-secondary, #94A3B8);
  color: var(--text-primary, #F8FAFC);
}
