/* ============================================================
   STYLE.CSS — Cible 2 : Virage technologique
   Palette : Deep Navy / Cyber Teal / Amber Warning
   É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:        #060C18;
  --bg-surface:     #0C1828;
  --bg-card:        #101F35;
  --bg-card-hover:  #142540;
  --border:         rgba(255,255,255,0.07);
  --border-active:  rgba(20,184,166,0.5);

  --teal:           #14B8A6;
  --teal-light:     #5EEAD4;
  --teal-dark:      #0F766E;
  --amber:          #F59E0B;
  --amber-light:    #FCD34D;
  --emerald:        #10B981;
  --rose:           #EF4444;
  --violet:         #8B5CF6;
  --indigo:         #6366F1;
  --orange:         #F97316;
  --pink:           #EC4899;
  --cyan:           #06B6D4;

  --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(20,184,166,0.12);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-btn:  0 2px 12px rgba(20,184,166,0.3);

  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

*, *::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 { font-family: inherit; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(20,184,166,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(245,158,11,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 70% 30%, rgba(99,102,241,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 940px;
  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(--amber); }
.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(--teal-light);
  background: rgba(20,184,166,0.1);
  border: 1px solid rgba(20,184,166,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-weight: 500;
}

/* ============================================================ 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(--teal), var(--amber));
  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(--teal); color: var(--teal); }
.step-indicator.active .step-circle {
  border-color: var(--teal); background: var(--teal); color: #001a18;
  box-shadow: 0 0 16px rgba(20,184,166,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); }
}

/* ============================================================ ACCUEIL */
.welcome-hero { text-align: center; padding: 3rem 0 2rem; }
.welcome-eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  color: var(--teal); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem; background: rgba(20,184,166,0.08);
  border: 1px solid rgba(20,184,166,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; margin-bottom: 1rem;
}
.welcome-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal-light), var(--amber));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.welcome-hero p { color: var(--text-secondary); max-width: 560px; 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(--teal); color: var(--text-primary); transform: translateY(-2px); }
.mode-btn.active { border-color: var(--teal); background: rgba(20,184,166,0.08); color: var(--teal-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); }

.outils-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.outil-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; transition: var(--transition);
}
.outil-card:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.outil-num { font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--teal); opacity: 0.35; 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); }

.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; }
.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(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,0.12); }
.form-group input::placeholder { color: var(--text-muted); }

/* ============================================================ 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.5rem; }
.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: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.mini-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: 99px; transition: width 0.3s ease; width: 0%;
}

.outil-layout { display: grid; grid-template-columns: 1fr 220px; 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.7rem; }
.live-icon { font-size: 0.9rem; width: 20px; text-align: center; flex-shrink: 0; }
.live-bar-wrap { flex: 1; height: 5px; 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.72rem; font-weight: 600; color: var(--text-secondary); width: 28px; text-align: right; }
.live-zone { font-size: 0.65rem; font-weight: 700; transition: color 0.3s ease; }

.live-legend { margin-top: 1rem; 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.7rem; margin-bottom: 0.2rem; }

/* 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-icon { font-size: 1.2rem; }
.group-dim { font-family: 'Outfit', sans-serif; font-size: 1rem; 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-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: 82px;
}
.likert-btn:hover { border-color: var(--accent, var(--teal)); color: var(--text-primary); }
.likert-btn.selected {
  background: color-mix(in srgb, var(--accent, var(--teal)) 15%, transparent);
  border-color: var(--accent, var(--teal));
  color: var(--accent, var(--teal));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent, var(--teal)) 20%, 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; }

/* ============================================================ 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(--teal-dark), var(--teal));
  border: none; border-radius: var(--radius-md);
  color: #001a18; 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(20,184,166,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(--teal); 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(--amber));
  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.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.2rem; font-weight: 800; }
.brand-logo span { color: var(--amber); }
.rapport-cible { font-size: 0.72rem; color: var(--teal-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(20,184,166,0.12); border: 1px solid rgba(20,184,166,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(--teal-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); }

/* Posture badge */
.posture-badge {
  margin-left: auto; font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 700;
  padding: 0.35rem 1rem; border-radius: var(--radius-md); border: 1px solid;
  white-space: nowrap;
}

/* Risque badge */
.risque-badge {
  margin-left: auto; font-size: 0.78rem; color: var(--text-muted);
  padding: 0.35rem 1rem; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-surface);
}

/* Score gauges */
.scores-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.gauges-panel { display: flex; flex-direction: column; gap: 0.5rem; }
.gauge-row { display: flex; align-items: center; gap: 0.6rem; }
.gauge-label { font-size: 0.78rem; color: var(--text-secondary); width: 180px; 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.72rem; font-weight: 700; color: var(--text-secondary); width: 36px; text-align: right; }

/* Posture dominant panel */
.posture-dominant-panel {
  background: var(--bg-surface); border: 1px solid; border-radius: var(--radius-lg); padding: 1.25rem;
}
.dominant-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 0.35rem; }
.dominant-name { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 800; margin-bottom: 0.6rem; }
.dominant-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }

/* Risk matrix */
.risk-matrix {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem;
}
.matrix-cell {
  background: var(--bg-surface); border: 1px solid; border-radius: var(--radius-md);
  padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: 0.3rem; align-items: center;
}
.matrix-icon { font-size: 1.4rem; }
.matrix-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.matrix-score { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; }
.matrix-zone { font-size: 0.65rem; font-weight: 600; }

/* Axe details */
.axe-details-panel { display: flex; flex-direction: column; gap: 0.5rem; }
.axe-risque-row {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0.75rem 1rem;
}
.axe-info { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.axe-icon { font-size: 1rem; }
.axe-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); flex: 1; }
.zone-tag {
  font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 99px; border: 1px solid;
}

/* Constats */
.constats-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.constat-box { border-radius: var(--radius-md); padding: 0.9rem 1.1rem; border: 1px solid; }
.constat-box.info { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.2); }
.constat-box.warn { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); }
.constat-box.reject { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }
.constat-box.energy { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,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.55; }

/* 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; }

/* Cross grid */
.cross-grid {
  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;
}
.cross-cell { text-align: center; flex: 1; min-width: 120px; }
.cross-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.3rem; }
.cross-value { font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 800; }
.cross-arrow { color: var(--text-muted); font-size: 1.4rem; font-weight: 300; }
.verdict-cell { border-radius: var(--radius-md); border: 1px solid; padding: 0.75rem; }

/* Directives */
.directives-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.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; }

.avertissement-box {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md); padding: 0.85rem 1.1rem;
  font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5;
}
.avertissement-box strong { color: #F59E0B; }

.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);
}

/* ============================================================ 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(20,184,166,0.4); }

/* ============================================================ PRINT */
@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; }
  .bg-surface, .bg-card { background: #f5f5f8 !important; }
  .rapport-section { page-break-inside: avoid; }
  .risk-matrix { grid-template-columns: repeat(4,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; }
  .risk-matrix { grid-template-columns: repeat(2,1fr); }
  .cross-grid { flex-direction: column; }
  .cross-arrow { transform: rotate(90deg); }
  .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);
}
