/* ============================================================
   AGGLO-THEME.CSS — Design System Haute-Correze Communaute
   Diagnostic Organisationnel
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --hcc-dark-blue: #283E5D;
  --hcc-dark-blue-light: #3A5478;
  --hcc-dark-blue-dark: #1B2C42;
  --hcc-olive: #AEB738;
  --hcc-olive-light: #C4CC5C;
  --hcc-olive-dark: #8A922D;
  --hcc-magenta: #AF337E;
  --hcc-magenta-light: #C94F96;
  --hcc-magenta-dark: #8A2864;

  /* Neutrals */
  --hcc-bg: #F5F6F8;
  --hcc-card: #FFFFFF;
  --hcc-text: #1A1A2E;
  --hcc-text-secondary: #5A5F7A;
  --hcc-text-muted: #8B90A5;
  --hcc-border: #E2E4EA;
  --hcc-border-light: #F0F1F4;

  /* Semantic */
  --hcc-success: #2D9F5C;
  --hcc-warning: #E5A100;
  --hcc-danger: #D94452;
  --hcc-info: #3B82C4;

  /* Gauge / Heatmap Colors */
  --gauge-green: #2D9F5C;
  --gauge-yellow: #E5C100;
  --gauge-orange: #E88D30;
  --gauge-red: #D94452;
  --gauge-dark-red: #9B1B30;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(40, 62, 93, 0.08);
  --shadow-md: 0 4px 12px rgba(40, 62, 93, 0.10);
  --shadow-lg: 0 8px 30px rgba(40, 62, 93, 0.12);
  --shadow-xl: 0 16px 48px rgba(40, 62, 93, 0.15);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --nav-height: 64px;
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-xs: 600px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--hcc-text);
  background-color: var(--hcc-bg);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hcc-dark-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--hcc-magenta); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--hcc-text);
}
h1 { font-size: var(--font-size-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--font-size-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); font-weight: 600; }
h6 { font-size: var(--font-size-base); font-weight: 600; }

.text-muted { color: var(--hcc-text-muted); }
.text-secondary { color: var(--hcc-text-secondary); }
.text-center { text-align: center; }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-lg { font-size: var(--font-size-lg); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container--narrow { max-width: var(--container-narrow); }
.container--xs { max-width: var(--container-xs); }

/* --- Navigation --- */
.nav {
  background: var(--hcc-dark-blue);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav__logo {
  height: 36px;
  width: auto;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: #fff;
  font-weight: 700;
  font-size: var(--font-size-lg);
}
.nav__tagline {
  color: var(--hcc-olive);
  font-size: var(--font-size-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}
.nav__links a {
  color: rgba(255,255,255,0.8);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav__links a:hover,
.nav__links a.active {
  color: #fff;
}
.nav__links a.active {
  border-bottom: 2px solid var(--hcc-olive);
  padding-bottom: 2px;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
}

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--hcc-dark-blue);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
  }
  .nav__links.open { display: flex; }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--hcc-dark-blue) 0%, var(--hcc-dark-blue-dark) 60%, #1a2538 100%);
  color: #fff;
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(174,183,56,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(175,51,126,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-lg);
}
.hero__logo {
  height: 56px;
  margin: 0 auto var(--space-lg);
}
.hero h1 {
  color: #fff;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-3xl);
}
.hero__subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}
.hero__badge {
  display: inline-block;
  background: rgba(174,183,56,0.2);
  color: var(--hcc-olive-light);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(174,183,56,0.3);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--hcc-olive);
  color: var(--hcc-dark-blue-dark);
  border-color: var(--hcc-olive);
}
.btn--primary:hover {
  background: var(--hcc-olive-light);
  border-color: var(--hcc-olive-light);
  color: var(--hcc-dark-blue-dark);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--hcc-dark-blue);
  border-color: var(--hcc-dark-blue);
}
.btn--outline:hover {
  background: var(--hcc-dark-blue);
  color: #fff;
}

.btn--magenta {
  background: var(--hcc-magenta);
  color: #fff;
  border-color: var(--hcc-magenta);
}
.btn--magenta:hover {
  background: var(--hcc-magenta-light);
  border-color: var(--hcc-magenta-light);
  color: #fff;
}

.btn--dark {
  background: var(--hcc-dark-blue);
  color: #fff;
  border-color: var(--hcc-dark-blue);
}
.btn--dark:hover {
  background: var(--hcc-dark-blue-light);
  border-color: var(--hcc-dark-blue-light);
  color: #fff;
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.4rem 1rem;
  font-size: var(--font-size-sm);
}

.btn--block { width: 100%; }

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* --- Cards --- */
.card {
  background: var(--hcc-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hcc-border-light);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card--clickable:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  cursor: pointer;
}
.card--bordered {
  border: 2px solid var(--hcc-border);
}
.card--accent-top {
  border-top: 4px solid var(--hcc-olive);
}
.card--accent-magenta {
  border-top: 4px solid var(--hcc-magenta);
}
.card--accent-blue {
  border-top: 4px solid var(--hcc-dark-blue);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}
.card__icon--blue {
  background: rgba(40, 62, 93, 0.1);
  color: var(--hcc-dark-blue);
}
.card__icon--olive {
  background: rgba(174, 183, 56, 0.15);
  color: var(--hcc-olive-dark);
}
.card__icon--magenta {
  background: rgba(175, 51, 126, 0.1);
  color: var(--hcc-magenta);
}

.card__title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.card__text {
  color: var(--hcc-text-secondary);
  line-height: 1.7;
}

/* Card grid */
.card-grid {
  display: grid;
  gap: var(--space-xl);
}
.card-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.card-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--hcc-text);
  font-size: var(--font-size-sm);
}
.form-label--required::after {
  content: ' *';
  color: var(--hcc-danger);
}
.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--hcc-text);
  background: var(--hcc-card);
  border: 2px solid var(--hcc-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}
.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--hcc-dark-blue);
  box-shadow: 0 0 0 3px rgba(40, 62, 93, 0.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235A5F7A' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.form-textarea {
  min-height: 100px;
  resize: vertical;
}
.form-hint {
  font-size: var(--font-size-xs);
  color: var(--hcc-text-muted);
  margin-top: var(--space-xs);
}

/* Radio / Checkbox custom */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.radio-group--horizontal,
.checkbox-group--horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1rem;
  background: var(--hcc-card);
  border: 2px solid var(--hcc-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--font-size-sm);
}
.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--hcc-dark-blue-light);
  background: rgba(40, 62, 93, 0.02);
}
.radio-option.selected,
.checkbox-option.selected {
  border-color: var(--hcc-dark-blue);
  background: rgba(40, 62, 93, 0.05);
  font-weight: 600;
}

/* Likert scale */
.likert-scale {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}
.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: var(--hcc-card);
  border: 2px solid var(--hcc-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 70px;
  text-align: center;
}
.likert-option:hover {
  border-color: var(--hcc-dark-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.likert-option.selected {
  border-color: var(--hcc-dark-blue);
  background: var(--hcc-dark-blue);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.likert-option__value {
  font-size: var(--font-size-xl);
  font-weight: 700;
}
.likert-option__label {
  font-size: var(--font-size-xs);
  line-height: 1.3;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--hcc-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hcc-dark-blue), var(--hcc-olive));
  border-radius: var(--radius-xl);
  transition: width var(--transition-slow);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--hcc-text-secondary);
}

/* --- Gauges --- */
.gauge {
  position: relative;
  width: 140px;
  height: 70px;
  margin: 0 auto;
}
.gauge__svg {
  width: 100%;
  height: 100%;
}
.gauge__value {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-xl);
  font-weight: 800;
}
.gauge__label {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--hcc-text-secondary);
}

.gauge-container {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

/* --- Heatmap Colors --- */
.heat-1 { background-color: #2D9F5C; color: #fff; }
.heat-2 { background-color: #7BC67D; color: #1A1A2E; }
.heat-3 { background-color: #E5C100; color: #1A1A2E; }
.heat-4 { background-color: #E88D30; color: #fff; }
.heat-5 { background-color: #D94452; color: #fff; }

.heat-cell {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

/* --- Dashboard Components --- */
.stat-card {
  background: var(--hcc-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hcc-border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.stat-card__value {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--hcc-dark-blue);
  line-height: 1;
}
.stat-card__label {
  font-size: var(--font-size-sm);
  color: var(--hcc-text-secondary);
  font-weight: 500;
}
.stat-card__trend {
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.stat-card__trend--up { color: var(--hcc-success); }
.stat-card__trend--down { color: var(--hcc-danger); }

/* --- Accordion --- */
.accordion {}
.accordion__item {
  background: var(--hcc-card);
  border: 1px solid var(--hcc-border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.accordion__item:hover {
  box-shadow: var(--shadow-sm);
}
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  color: var(--hcc-text);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  gap: var(--space-md);
}
.accordion__header:hover {
  background: rgba(40, 62, 93, 0.02);
}
.accordion__chevron {
  transition: transform var(--transition-base);
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  color: var(--hcc-text-muted);
}
.accordion__item.open .accordion__chevron {
  transform: rotate(180deg);
}
.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.accordion__item.open .accordion__body {
  max-height: 2000px;
}
.accordion__content {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--hcc-text-secondary);
  line-height: 1.7;
}

/* --- Badges / Tags --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge--olive { background: rgba(174,183,56,0.15); color: var(--hcc-olive-dark); }
.badge--blue { background: rgba(40,62,93,0.1); color: var(--hcc-dark-blue); }
.badge--magenta { background: rgba(175,51,126,0.1); color: var(--hcc-magenta); }
.badge--danger { background: rgba(217,68,82,0.1); color: var(--hcc-danger); }
.badge--success { background: rgba(45,159,92,0.1); color: var(--hcc-success); }
.badge--warning { background: rgba(229,161,0,0.1); color: var(--hcc-warning); }

/* --- Alert / Notice --- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border-left: 4px solid;
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
}
.alert--info {
  background: rgba(59,130,196,0.08);
  border-color: var(--hcc-info);
  color: var(--hcc-info);
}
.alert--warning {
  background: rgba(229,161,0,0.08);
  border-color: var(--hcc-warning);
  color: #8B6914;
}
.alert--danger {
  background: rgba(217,68,82,0.08);
  border-color: var(--hcc-danger);
  color: var(--hcc-danger);
}
.alert--success {
  background: rgba(45,159,92,0.08);
  border-color: var(--hcc-success);
  color: var(--hcc-success);
}
.alert__title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--hcc-border-light);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--hcc-border-light);
  font-size: var(--font-size-sm);
}
th {
  background: var(--hcc-dark-blue);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}
tr:hover td { background: rgba(40,62,93,0.02); }

/* --- Confidentiality Block --- */
.confidentiality {
  background: linear-gradient(135deg, var(--hcc-dark-blue) 0%, var(--hcc-dark-blue-dark) 100%);
  color: #fff;
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  text-align: center;
}
.confidentiality__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}
.confidentiality__title {
  color: #fff;
  margin-bottom: var(--space-sm);
}
.confidentiality__text {
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  counter-reset: step;
}
.step {
  text-align: center;
  position: relative;
}
.step__number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--hcc-dark-blue);
  color: #fff;
  font-weight: 800;
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}
.step__title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.step__text {
  font-size: var(--font-size-sm);
  color: var(--hcc-text-secondary);
}

/* --- Karasek Chart --- */
.karasek-chart {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 2px solid var(--hcc-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.karasek-chart__quadrant {
  position: absolute;
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  opacity: 0.85;
}
.karasek-chart__quadrant--passif { top: 0; left: 0; background: rgba(229,193,0,0.15); color: #8B6914; }
.karasek-chart__quadrant--strain { top: 0; right: 0; background: rgba(217,68,82,0.15); color: var(--hcc-danger); }
.karasek-chart__quadrant--detendu { bottom: 0; left: 0; background: rgba(45,159,92,0.15); color: var(--hcc-success); }
.karasek-chart__quadrant--actif { bottom: 0; right: 0; background: rgba(59,130,196,0.15); color: var(--hcc-info); }
.karasek-chart__dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hcc-magenta);
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transform: translate(-50%, -50%);
}
.karasek-chart__axis-label {
  position: absolute;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--hcc-text-muted);
}

/* --- Radar / Bar Chart Container --- */
.chart-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.bar-chart { width: 100%; }
.bar-chart__row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.bar-chart__label {
  width: 140px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}
.bar-chart__track {
  flex: 1;
  height: 24px;
  background: var(--hcc-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.bar-chart__fill {
  height: 100%;
  border-radius: var(--radius-xl);
  transition: width var(--transition-slow);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: #fff;
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
}
.section--alt {
  background: var(--hcc-card);
}
.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section__header h2 {
  margin-bottom: var(--space-sm);
}
.section__header p {
  color: var(--hcc-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--font-size-lg);
}

/* --- Question Card --- */
.question-card {
  background: var(--hcc-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl) var(--space-xl);
  max-width: var(--container-narrow);
  margin: 0 auto;
  animation: fadeInUp 0.4s ease;
}
.question-card__block {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(40, 62, 93, 0.08);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--hcc-dark-blue);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.question-card__number {
  font-size: var(--font-size-sm);
  color: var(--hcc-text-muted);
  margin-bottom: var(--space-sm);
}
.question-card__text {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--hcc-text);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}
.question-card__nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--hcc-border-light);
}

/* --- Footer --- */
.footer {
  background: var(--hcc-dark-blue);
  color: rgba(255,255,255,0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.footer__logo { height: 32px; }
.footer__text {
  font-size: var(--font-size-sm);
}
.footer__tagline {
  color: var(--hcc-olive);
  font-weight: 600;
  font-style: italic;
}
.footer a { color: rgba(255,255,255,0.8); }
.footer a:hover { color: var(--hcc-olive); }

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }
.py-1 { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-2 { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-xl); }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in { animation: fadeIn 0.4s ease; }
.fade-in-up { animation: fadeInUp 0.4s ease; }
.slide-in-right { animation: slideInRight 0.4s ease; }

/* --- Print --- */
@media print {
  .nav, .footer, .btn, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .hero { background: #fff; color: #000; padding: 1rem 0; }
  .hero h1 { color: #000; font-size: 18pt; }
  .section { padding: 1rem 0; }
  @page { margin: 2cm; }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  .hero { padding: var(--space-2xl) 0; }
}

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }
  .hero__subtitle { font-size: var(--font-size-base); }
  .card { padding: var(--space-lg); }
  .section { padding: var(--space-2xl) 0; }
  .container { padding: 0 var(--space-md); }
  .likert-scale { gap: var(--space-xs); }
  .likert-option { padding: var(--space-sm); min-width: 55px; }
  .question-card { padding: var(--space-lg) var(--space-md); }
  .gauge-container { gap: var(--space-lg); }
  .steps { gap: var(--space-lg); }
  .footer__inner { flex-direction: column; text-align: center; }
  .bar-chart__label { width: 100px; font-size: var(--font-size-xs); }
}

@media (max-width: 480px) {
  :root { font-size: 14px; }
  .hero { padding: var(--space-xl) 0; }
  .likert-option { padding: var(--space-xs); min-width: 48px; font-size: var(--font-size-xs); }
  .likert-option__value { font-size: var(--font-size-base); }
  .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
}

/* --- Dashboard-specific --- */
.dashboard-filters {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: var(--hcc-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hcc-border-light);
}
.dashboard-filters .form-select {
  max-width: 220px;
}

.heatmap-grid {
  display: grid;
  gap: 2px;
  padding: var(--space-md);
}

/* Login overlay */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.login-box {
  background: var(--hcc-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  text-align: center;
}
.login-box h2 { margin-bottom: var(--space-lg); }
.login-error {
  color: var(--hcc-danger);
  font-size: var(--font-size-sm);
  margin-top: var(--space-sm);
  display: none;
}

/* --- Search input --- */
.search-input {
  position: relative;
}
.search-input input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  border: 2px solid var(--hcc-border);
  border-radius: var(--radius-md);
  background: var(--hcc-card);
  transition: border-color var(--transition-fast);
}
.search-input input:focus {
  outline: none;
  border-color: var(--hcc-dark-blue);
}
.search-input::before {
  content: '\1F50D';
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.4;
}

/* Conflict category tag */
.conflict-category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-xl);
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-right: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.conflict-category--hierarchique { background: rgba(40,62,93,0.1); color: var(--hcc-dark-blue); }
.conflict-category--interservices { background: rgba(174,183,56,0.15); color: var(--hcc-olive-dark); }
.conflict-category--politique { background: rgba(175,51,126,0.1); color: var(--hcc-magenta); }
.conflict-category--rps { background: rgba(217,68,82,0.1); color: var(--hcc-danger); }
.conflict-category--collectif { background: rgba(229,161,0,0.1); color: var(--hcc-warning); }
.conflict-category--individuel { background: rgba(59,130,196,0.1); color: var(--hcc-info); }

/* Canvas charts */
canvas {
  max-width: 100%;
  height: auto !important;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hcc-text);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
[data-tooltip]:hover::after { opacity: 1; }
