/* ============================================================
   STYLE.CSS — Cible 4 : Force de frappe managériale
   Palette : Midnight / Indigo Prestige / Emerald Performance
   É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:     #05091A;
  --bg-surface:  #0A0F26;
  --bg-card:     #0E1530;
  --border:      rgba(255,255,255,0.07);

  --indigo:      #6366F1;
  --indigo-light:#818CF8;
  --indigo-dark: #4338CA;
  --gold:        #F59E0B;
  --emerald:     #10B981;
  --rose:        #EF4444;
  --teal:        #14B8A6;
  --violet:      #8B5CF6;
  --orange:      #F97316;
  --cyan:        #06B6D4;
  --pink:        #EC4899;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-btn:  0 2px 12px rgba(99,102,241,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, select { font-family: inherit; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 65% 45% at 20% 0%, rgba(99,102,241,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 80% 100%, rgba(16,185,129,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 60% 35%, rgba(245,158,11,0.05) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

#app { position: relative; z-index: 1; max-width: 960px; 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; 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(99,102,241,0.1); border: 1px solid rgba(99,102,241,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(--indigo), var(--gold), var(--emerald)); 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(--emerald); color: var(--emerald); }
.step-indicator.active .step-circle { border-color: var(--indigo); background: var(--indigo); color: white; box-shadow: 0 0 16px rgba(99,102,241,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(--indigo-light); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,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(--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: 580px; margin: 0 auto 2rem; font-size: 1.05rem; }

/* Outil choice cards */
.outil-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.outil-choice-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; cursor: pointer; transition: var(--transition); display: flex; flex-direction: column; gap: 0.5rem; }
.outil-choice-card:hover { border-color: var(--indigo); transform: translateY(-2px); }
.outil-choice-card.selected { border-color: var(--indigo); background: rgba(99,102,241,0.07); box-shadow: 0 0 20px rgba(99,102,241,0.12); }
.outil-choice-card input[type="radio"] { display: none; }
.outil-card-header { display: flex; align-items: center; gap: 0.75rem; }
.outil-card-num { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--indigo); opacity: 0.5; line-height: 1; }
.outil-card-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0.6rem; border-radius: 99px; background: rgba(99,102,241,0.1); color: var(--indigo-light); border: 1px solid rgba(99,102,241,0.2); }
.outil-choice-card.selected .outil-card-badge { background: rgba(99,102,241,0.2); }
.outil-card-name { font-family: 'Outfit', sans-serif; font-size: 0.9rem; font-weight: 700; }
.outil-card-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }
.outil-card-context { font-size: 0.72rem; color: var(--text-muted); font-style: italic; }

/* Perf scale strip */
.perf-scale-strip { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.perf-scale-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 600; padding: 0.4rem 0.9rem; border-radius: 99px; border: 1px solid; }
.perf-scale-item.verte { color: #10B981; background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); }
.perf-scale-item.jaune { color: #F59E0B; background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); }
.perf-scale-item.rouge { color: #EF4444; background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); }

/* 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; }
.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(99,102,241,0.12); }
.form-group input::placeholder { color: var(--text-muted); }

/* Inversion note */
.inversion-note { display: none; background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); border-radius: var(--radius-md); padding: 0.85rem 1.1rem; margin-bottom: 1.5rem; font-size: 0.82rem; color: var(--text-secondary); }
.inversion-note strong { color: var(--gold); }

/* Employee mode banner */
.employee-banner { background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius-md); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; font-size: 0.82rem; color: var(--text-secondary); }
.employee-banner strong { color: var(--emerald); }

/* ============================================================ 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.45rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.4rem; }
.screen-subtitle { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1.5rem; }

.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%; }

.outil-layout { display: grid; grid-template-columns: 1fr 230px; gap: 1.5rem; align-items: start; }
.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-axe-block { margin-bottom: 0.85rem; }
.live-axe-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.live-axe-icon { font-size: 0.9rem; }
.live-axe-name { font-size: 0.7rem; font-weight: 700; flex: 1; }
.live-axe-val { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); transition: color 0.3s; }
.live-bar-wrap { height: 5px; background: var(--bg-surface); border-radius: 99px; overflow: hidden; margin-bottom: 0.2rem; }
.live-bar-fill { height: 100%; border-radius: 99px; transition: width 0.3s ease, background 0.3s ease; width: 0%; }
.live-zone { font-size: 0.62rem; font-weight: 700; transition: color 0.3s; color: var(--text-muted); }
.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; }

/* 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: 0.9rem; font-weight: 700; }
.group-desc { font-size: 0.72rem; 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.88rem; color: var(--text-secondary); margin-bottom: 0.8rem; line-height: 1.5; display: flex; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }
.inv-badge { flex-shrink: 0; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); padding: 0.1rem 0.45rem; border-radius: 99px; margin-top: 2px; }
.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(--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 10px color-mix(in srgb, var(--accent, var(--indigo)) 18%, 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(--indigo-dark), var(--indigo)); border: none; border-radius: var(--radius-md); color: white; 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(99,102,241,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(--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.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(--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; }

/* Performance legend strip in report */
.perf-legend-strip { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.perf-legend-item { font-size: 0.7rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 99px; border: 1px solid; }
.perf-legend-item.verte { color: #10B981; background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); }
.perf-legend-item.jaune { color: #F59E0B; background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); }
.perf-legend-item.rouge { color: #EF4444; background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); }

.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(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25); 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); }
.critique-badge { font-size: 0.78rem; font-weight: 700; padding: 0.35rem 1rem; border-radius: var(--radius-md); border: 1px solid; margin-left: auto; white-space: nowrap; }

/* Risk matrix */
.risk-matrix { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.risk-matrix-4 { grid-template-columns: repeat(4, 1fr); }
.risk-matrix-3 { grid-template-columns: repeat(3, 1fr); }
.matrix-cell { border: 1px solid; border-radius: var(--radius-md); padding: 0.85rem; text-align: center; display: flex; flex-direction: column; gap: 0.25rem; align-items: center; }
.matrix-icon { font-size: 1.3rem; }
.matrix-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); line-height: 1.3; }
.matrix-score { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; }
.matrix-zone { font-size: 0.62rem; font-weight: 600; }

/* Gauges */
.gauges-full { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.gauge-row-full { display: flex; align-items: center; gap: 0.6rem; flex-wrap: nowrap; }
.gauge-label-full { font-size: 0.75rem; color: var(--text-secondary); width: 210px; 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-num { font-size: 0.72rem; font-weight: 700; width: 36px; text-align: right; flex-shrink: 0; }
.zone-tag { font-size: 0.62rem; font-weight: 700; padding: 0.12rem 0.45rem; border-radius: 99px; border: 1px solid; flex-shrink: 0; }

/* 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 + cross */
.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-4 { 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: 100px; }
.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.85rem; font-weight: 800; }
.cross-arrow { color: var(--text-muted); font-size: 1.2rem; 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: 80px; }
.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: var(--gold); }
.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; 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); }

/* ============================================================ 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; }
  .rapport-section { page-break-inside: avoid; }
  .risk-matrix-4 { grid-template-columns: repeat(4,1fr); }
  .risk-matrix-3 { grid-template-columns: repeat(3,1fr); }
  .gauge-label-full { width: 160px; font-size: 0.7rem; }
}

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  .outil-layout { grid-template-columns: 1fr; }
  .live-panel { position: static; }
  .outil-choice-grid { 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-4 { grid-template-columns: repeat(2,1fr); }
  .risk-matrix-3 { grid-template-columns: 1fr; }
  .cross-grid-4 { flex-direction: column; }
  .rapport-header { flex-direction: column; }
  .rapport-meta { text-align: left; }
  .meta-row { justify-content: flex-start; }
  .gauge-label-full { width: 130px; font-size: 0.7rem; }
}


/* ============================================================ 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);
}
