/* ============================================================
   STYLE.CSS — Cible 6 : Rentabilité et Alignement Stratégique
   Palette : Dark Executive / Emerald ROI / Amber Alert / Cyan Systems
   Évaluerlechangement.ca™
   ============================================================ */

@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');

:root {
  --bg-base:        #070D18;
  --bg-surface:     #0D192B;
  --bg-card:        #12223C;
  --bg-card-hover:  #182B4B;
  --border:         rgba(255,255,255,0.08);
  --border-active:  rgba(16,185,129,0.5);

  --emerald:        #10B981;
  --emerald-light:  #6EE7B7;
  --emerald-dark:   #047857;
  --teal:           #14B8A6;
  --teal-light:     #5EEAD4;
  --amber:          #F59E0B;
  --amber-light:    #FCD34D;
  --rose:           #EF4444;
  --rose-light:     #FCA5A5;
  --indigo:         #6366F1;
  --indigo-light:   #A5B4FC;
  --cyan:           #06B6D4;
  --cyan-light:     #67E8F9;
  --violet:         #8B5CF6;

  --text-primary:   #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-glow: 0 0 30px rgba(16,185,129,0.15);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.45);
  --shadow-btn:  0 2px 8px rgba(16,185,129,0.25);

  --transition: all 0.22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(16,185,129,0.08) 0%, rgba(99,102,241,0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ============================================================ HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.brand span { color: var(--emerald); }
.brand-sub {
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header-tag {
  font-size: 0.75rem;
  color: var(--emerald-light);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ============================================================ PROGRESS */
.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(--emerald), var(--cyan), var(--amber));
  border-radius: 99px;
  transition: width 0.4s 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.65; 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: 700;
  background: var(--bg-card); transition: var(--transition);
}
.step-indicator.done .step-circle { border-color: var(--emerald); color: var(--emerald); }
.step-indicator.active .step-circle {
  border-color: var(--emerald); background: var(--emerald); color: #042f1f;
  box-shadow: 0 0 16px rgba(16,185,129,0.4);
}
.step-label { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }
.step-indicator.active .step-label { color: var(--text-primary); }

/* ============================================================ SCREENS */
.screen { display: none; animation: fadeSlideIn 0.35s ease; }
.screen.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ ACCUEIL */
.welcome-hero { text-align: center; padding: 2.5rem 0 2rem; }
.welcome-eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  color: var(--emerald); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem; background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25); padding: 0.3rem 1.2rem; border-radius: 99px;
}
.welcome-hero h1 {
  font-family: 'Outfit', sans-serif; font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem;
}
.welcome-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--emerald-light), var(--cyan-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.welcome-hero p { color: var(--text-secondary); max-width: 620px; 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: 210px;
}
.mode-btn:hover { border-color: var(--emerald); color: var(--text-primary); transform: translateY(-2px); }
.mode-btn.active { border-color: var(--emerald); background: rgba(16,185,129,0.08); color: var(--emerald-light); box-shadow: var(--shadow-btn); }
.mode-icon { font-size: 1.4rem; }
.mode-info { text-align: left; }
.mode-title { font-weight: 700; color: var(--text-primary); }
.mode-desc { font-size: 0.75rem; color: var(--text-muted); }

.outils-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.outil-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.6rem; transition: var(--transition);
}
.outil-card:hover { border-color: var(--emerald); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.outil-num { font-family: 'Outfit', sans-serif; font-size: 2.6rem; font-weight: 800; color: var(--emerald); opacity: 0.35; line-height: 1; margin-bottom: 0.5rem; }
.outil-name { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; }
.outil-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

.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.15rem; font-weight: 700; margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.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.75rem 1rem;
  color: var(--text-primary); font-size: 0.95rem; transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.form-group input::placeholder { color: var(--text-muted); }

/* Quick scenario buttons for consultant mode */
.scenario-bar {
  display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem;
  padding: 0.75rem 1rem; background: var(--bg-surface); border-radius: var(--radius-md);
  border: 1px dashed var(--border); flex-wrap: wrap;
}
.scenario-bar span { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.scenario-chip {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 0.75rem; padding: 0.35rem 0.75rem; transition: var(--transition);
}
.scenario-chip:hover { border-color: var(--emerald); color: var(--emerald-light); }

/* ============================================================ QUESTIONS */
.outil-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.screen-title { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.4rem; }
.screen-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

.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: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.mini-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: 99px; transition: width 0.3s ease; width: 0%;
}

.outil-layout { display: grid; grid-template-columns: 1fr 240px; gap: 1.5rem; align-items: start; }

/* Live panel */
.live-panel {
  position: sticky; top: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.live-panel-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 1rem; }
.live-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.live-icon { font-size: 0.95rem; width: 22px; text-align: center; flex-shrink: 0; }
.live-bar-wrap { flex: 1; height: 6px; background: var(--bg-surface); border-radius: 99px; overflow: hidden; }
.live-bar-fill { height: 100%; border-radius: 99px; transition: width 0.3s ease, background 0.3s ease; width: 0%; }
.live-val { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); width: 32px; text-align: right; }
.live-zone { font-size: 0.65rem; font-weight: 700; transition: color 0.3s ease; }

.live-legend { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.live-legend-title { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.live-legend div { font-size: 0.72rem; margin-bottom: 0.25rem; }

/* Question groups */
.question-group {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1.25rem; 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-icon { font-size: 1.2rem; }
.group-dim { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 700; }
.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-item.has-inv { position: relative; }
.inv-pill {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  background: rgba(245,158,11,0.12); color: var(--amber-light);
  border: 1px solid rgba(245,158,11,0.3); border-radius: 99px;
  padding: 0.1rem 0.5rem; margin-left: 0.5rem; text-transform: uppercase;
}
.question-text { font-size: 0.92rem; 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.55rem 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: 82px;
}
.likert-btn:hover { border-color: var(--accent, var(--emerald)); color: var(--text-primary); }
.likert-btn.selected {
  background: color-mix(in srgb, var(--accent, var(--emerald)) 15%, transparent);
  border-color: var(--accent, var(--emerald));
  color: var(--accent, var(--emerald));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent, var(--emerald)) 20%, transparent);
}
.likert-num { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700; }
.likert-lbl { font-size: 0.62rem; text-align: center; line-height: 1.2; }

/* ============================================================ 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(--emerald-dark), var(--emerald));
  border: none; border-radius: var(--radius-md);
  color: #032014; font-size: 0.9rem; font-weight: 700;
  transition: var(--transition); box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(16,185,129,0.4); }
.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(--emerald); 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, #059669, var(--teal));
  border: none; border-radius: var(--radius-md);
  color: #02261b; font-size: 0.9rem; font-weight: 700;
  transition: var(--transition); box-shadow: 0 2px 12px rgba(20,184,166,0.3);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(20,184,166,0.4); }

/* ============================================================ 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-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.25rem; font-weight: 800; }
.brand-logo span { color: var(--emerald); }
.rapport-cible { font-size: 0.72rem; color: var(--emerald-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.rapport-meta { display: flex; flex-direction: column; gap: 0.25rem; text-align: right; }
.meta-row { display: flex; gap: 0.75rem; font-size: 0.8rem; 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: 1.5rem; }
.section-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.section-num {
  flex-shrink: 0; width: 34px; height: 34px;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--emerald-light);
}
.section-header h2 { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 0.15rem; }
.section-sub { font-size: 0.75rem; color: var(--text-muted); }

.badge-tag {
  margin-left: auto; font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 700;
  padding: 0.4rem 1.1rem; border-radius: var(--radius-md); border: 1px solid;
  white-space: nowrap;
}

/* 2-col grids */
.scores-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.gauges-panel { display: flex; flex-direction: column; gap: 0.6rem; }
.gauge-row { display: flex; align-items: center; gap: 0.6rem; }
.gauge-label { font-size: 0.78rem; color: var(--text-secondary); width: 170px; flex-shrink: 0; }
.gauge-track { flex: 1; height: 6px; background: var(--bg-surface); border-radius: 99px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.gauge-val { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); width: 38px; text-align: right; }

.panel-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.panel-card-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-muted); }
.panel-card-val { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; }
.panel-card-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }

/* Matrix of 3 axes */
.axes-matrix-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.25rem;
}
.matrix-cell {
  background: var(--bg-surface); border: 1px solid; border-radius: var(--radius-md);
  padding: 1.1rem; text-align: center; display: flex; flex-direction: column; gap: 0.35rem; align-items: center;
}
.matrix-icon { font-size: 1.5rem; }
.matrix-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.matrix-score { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 800; }
.matrix-zone { font-size: 0.68rem; font-weight: 700; }
.matrix-note { font-size: 0.62rem; color: var(--text-muted); }

/* Constats boxes */
.constats-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 1rem; }
.constat-box { border-radius: var(--radius-md); padding: 1rem 1.2rem; border: 1px solid; }
.constat-box.warn { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.25); }
.constat-box.fuite { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.25); }
.constat-box.info { background: rgba(6,182,212,0.06); border-color: rgba(6,182,212,0.25); }
.constat-box.success { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.25); }
.constat-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45rem; color: var(--text-secondary); }
.constat-text { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.55; }

/* Diagnostic Croisé / Verdict */
.verdict-banner {
  border: 1px solid; border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
}
.verdict-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.verdict-label { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.verdict-tag { font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.7rem; border-radius: 99px; }
.verdict-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* Directives */
.directives-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.directive-box { border-radius: var(--radius-md); padding: 1.1rem 1.25rem; border: 1px solid; }
.directive-box.do { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.25); }
.directive-box.stop { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.25); }
.directive-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; color: var(--text-secondary); }
.directive-text { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.55; min-height: 70px; }
.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; }

.avertissement-box {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-md); padding: 0.9rem 1.2rem;
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 1.25rem;
}
.avertissement-box strong { color: var(--amber-light); }

.rapport-footer {
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-muted);
}

/* ============================================================ 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.45); 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(16,185,129,0.4); }

/* ============================================================ PRINT */
@media print {
  body { background: white !important; color: #0f172a !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: #0f172a; }
  .bg-surface, .bg-card, .panel-card, .constat-box, .directive-box, .verdict-banner, .matrix-cell {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
  }
  .rapport-section { page-break-inside: avoid; }
  .axes-matrix-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  .outil-layout { grid-template-columns: 1fr; }
  .live-panel { position: static; }
  .outils-grid { grid-template-columns: 1fr; }
  .scores-grid-2col { grid-template-columns: 1fr; }
  .constats-row-2 { grid-template-columns: 1fr; }
  .directives-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .axes-matrix-3 { grid-template-columns: 1fr; }
  .rapport-header { flex-direction: column; }
  .rapport-meta { text-align: left; }
  .meta-row { justify-content: flex-start; }
  .gauge-label { width: 130px; font-size: 0.72rem; }
}


/* ============================================================ 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);
}
