:root {
  --color-brand: #FF6B35;
  --color-cta: #3D5AFE;
  --page-bg: #0D0F12;
  --text-main: #F7F9FA;
  --text-muted: #AAB1B7;
  --border: #2A2F35;
  --card-bg: #13171C;
  --card-bg-alt: #181D23;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}

img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

.cat-hero {
  position: relative;
  min-height: 46vh;
  background-image: url('/images/hero-securite-routiere.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0D0F12;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  z-index: 1;
}

.cat-hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.cat-hero-content h1 {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 700;
  line-height: 0.95;
  color: #F7F9FA;
  text-shadow: 0 0 24px rgba(255,107,53,0.28);
  margin: 0 0 24px 0;
  letter-spacing: 0;
  text-transform: none;
}

.cat-hero-content h1 span {
  color: var(--color-brand);
}

.cat-hero-content p {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: #F7F9FA;
  max-width: 640px;
  margin: 0 auto 32px auto;
}

.cat-hero-cta {
  display: inline-block;
  background: var(--color-cta);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 16px 36px;
  border-radius: 2px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 4px 12px rgba(61,90,254,0.45);
  transition: box-shadow 0.2s, transform 0.2s;
}

.cat-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(61,90,254,0.6);
}

.cat-main {
  background: var(--page-bg);
}

.section-wrap {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.articles-section {
  padding: 60px 0 40px;
}

.articles-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.articles-section-header h2 {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 0.95;
  color: #F7F9FA;
  margin: 0;
}

.articles-section-header h2 span {
  color: var(--color-brand);
}

.articles-count {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.masonry-grid {
  columns: 3;
  column-gap: 20px;
}

.masonry-card {
  break-inside: avoid;
  background: var(--card-bg);
  margin-bottom: 20px;
  overflow: hidden;
  display: block;
}

.masonry-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.masonry-card-body {
  padding: 20px 20px 22px;
}

.masonry-card-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.masonry-card-title {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 10px 0;
}

.masonry-card-title a {
  color: #F7F9FA;
  text-decoration: none;
  transition: color 0.2s;
}

.masonry-card-title a:hover {
  color: var(--color-brand);
}

.masonry-card-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

.no-articles {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 17px;
}

.no-articles strong {
  color: var(--color-brand);
  display: block;
  font-size: 28px;
  margin-bottom: 12px;
}

.svgsep {
  display: block;
  text-align: center;
  color: var(--color-cta);
  font-size: 42px;
  opacity: 0.18;
  margin: 0 0 40px 0;
  line-height: 1;
}

.tabs-section {
  padding: 60px 0;
}

.tabs-section h2 {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 0.95;
  color: #F7F9FA;
  margin: 0 0 32px 0;
}

.tabs-section h2 span {
  color: var(--color-brand);
}

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab-radio {
  display: none;
}

.tab-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 14px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
}

.tab-label:hover {
  color: #F7F9FA;
}

#sr-tab1:checked ~ .tab-nav .tab-label[for="sr-tab1"],
#sr-tab2:checked ~ .tab-nav .tab-label[for="sr-tab2"],
#sr-tab3:checked ~ .tab-nav .tab-label[for="sr-tab3"] {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

.tab-panel {
  display: none;
}

#sr-tab1:checked ~ .tab-panels #sr-panel1,
#sr-tab2:checked ~ .tab-panels #sr-panel2,
#sr-tab3:checked ~ .tab-panels #sr-panel3 {
  display: block;
}

.tab-panel p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.tab-panel p strong {
  color: #F7F9FA;
}

.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table th {
  background: #1A1F26;
  color: var(--color-brand);
  font-weight: 700;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 18px;
  color: #F7F9FA;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:nth-child(even) td {
  background: #13171C;
}

.data-table tr:nth-child(odd) td {
  background: #0D0F12;
}

.data-table tr:hover td {
  background: #181D23;
}

.data-table .val-brand {
  color: var(--color-brand);
  font-weight: 700;
}

.calc-section {
  padding: 60px 0;
}

.calc-section h2 {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 0.95;
  color: #F7F9FA;
  margin: 0 0 12px 0;
}

.calc-section h2 span {
  color: var(--color-brand);
}

.calc-section > .section-wrap > p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.65;
}

.calc-box {
  background: var(--card-bg);
  padding: 36px 32px;
  max-width: 720px;
}

.calc-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}

.calc-field {
  flex: 1;
  min-width: 180px;
}

.calc-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.calc-field input,
.calc-field select {
  width: 100%;
  background: #0D0F12;
  border: 1px solid var(--border);
  color: #F7F9FA;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.calc-field input:focus,
.calc-field select:focus {
  border-color: var(--color-brand);
}

.calc-field select option {
  background: #0D0F12;
}

.calc-btn {
  background: var(--color-cta);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 30px;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 4px 12px rgba(61,90,254,0.45);
  transition: box-shadow 0.2s, transform 0.2s;
  align-self: flex-end;
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(61,90,254,0.6);
}

.calc-result {
  margin-top: 24px;
  background: #0D0F12;
  border: 1px solid var(--border);
  padding: 20px 24px;
  display: none;
}

.calc-result.visible {
  display: block;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: #F7F9FA;
}

.calc-result-row:last-child {
  border-bottom: none;
}

.calc-result-row span:first-child {
  color: var(--text-muted);
}

.calc-result-row span:last-child {
  color: var(--color-brand);
  font-weight: 700;
  font-size: 17px;
}

.calc-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.65;
}

.heatmap-section {
  padding: 60px 0;
}

.heatmap-section h2 {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 0.95;
  color: #F7F9FA;
  margin: 0 0 12px 0;
}

.heatmap-section h2 span {
  color: var(--color-brand);
}

.heatmap-section > .section-wrap > p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.65;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 3px;
}

.heatmap-cell {
  background: var(--card-bg);
  padding: 18px 14px;
  text-align: center;
  transition: background-color 0.2s;
  cursor: default;
}

.heatmap-cell:hover {
  background: #1C2229;
}

.heatmap-cell-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.heatmap-cell-val {
  font-family: Haettenschweiler, 'Arial Narrow Bold', 'Noto Sans SC', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-brand);
  display: block;
  letter-spacing: -0.02em;
}

.heatmap-cell-unit {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.heatmap-cell.level-1 .heatmap-cell-val {
  color: #AAB1B7;
}

.heatmap-cell.level-2 .heatmap-cell-val {
  color: #F7F9FA;
}

.heatmap-cell.level-3 .heatmap-cell-val {
  color: var(--color-brand);
}

.heatmap-cell.level-4 .heatmap-cell-val {
  color: #ff4500;
}

.heatmap-legend {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.heatmap-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.heatmap-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.svgsep-bottom {
  display: block;
  text-align: center;
  color: var(--color-cta);
  font-size: 32px;
  opacity: 0.18;
  margin: 40px 0 0 0;
  line-height: 1;
}

@media (max-width: 1024px) {
  .masonry-grid {
    columns: 2;
    column-gap: 16px;
  }
}

@media (max-width: 768px) {
  .masonry-grid {
    columns: 1;
  }
  .masonry-card-img {
    aspect-ratio: 16/9;
  }
  .masonry-card-body {
    padding: 16px 16px 18px;
  }
  .calc-row {
    flex-direction: column;
    gap: 16px;
  }
  .calc-field {
    min-width: 100%;
  }
  .calc-btn {
    width: 100%;
    text-align: center;
  }
  .heatmap-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2px;
  }
  .heatmap-cell {
    padding: 14px 10px;
  }
  .heatmap-cell-val {
    font-size: 22px;
  }
  .tab-label {
    padding: 10px 14px;
    font-size: 13px;
  }
  .articles-section-header {
    flex-direction: column;
    gap: 6px;
  }
  .calc-box {
    padding: 24px 16px;
  }
  .articles-section {
    padding: 40px 0 24px;
  }
  .tabs-section,
  .calc-section,
  .heatmap-section {
    padding: 40px 0;
  }
  .section-wrap {
    padding: 0 16px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  .heatmap-legend {
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .cat-hero-content {
    padding: 40px 16px;
  }
  .heatmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .heatmap-cell-val {
    font-size: 20px;
  }
  .masonry-card-body {
    padding: 12px 12px 14px;
  }
  .tab-label {
    padding: 8px 10px;
    font-size: 12px;
  }
  .calc-result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .calc-result-row span:last-child {
    font-size: 15px;
  }
}