/* ============================================================
   Normes & References - Page Styles
   ============================================================ */

.normes-page { max-width: 1100px; }

/* Search bar */
.normes-search {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 4px; padding: 12px 16px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.normes-search .mdi { font-size: 22px; color: rgba(0,0,0,.38); }
.normes-search input {
  flex: 1; border: none; outline: none; font-size: 15px;
  font-family: 'Roboto', sans-serif; background: transparent;
}
.normes-search__count { font-size: 12px; color: rgba(0,0,0,.38); white-space: nowrap; }

/* Accordion */
.normes-accordion { display: flex; flex-direction: column; gap: 8px; }

.normes-section {
  background: #fff; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  overflow: hidden; transition: box-shadow .2s;
}
.normes-section:hover { box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.normes-section.hidden { display: none; }

.normes-section__header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; user-select: none; transition: background .15s;
  border-left: 4px solid #4CAF50;
}
.normes-section__header:hover { background: rgba(76,175,80,.04); }

.normes-section__icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.normes-section__icon--nfc { background: #1976D2; }
.normes-section__icon--iec61851 { background: #E65100; }
.normes-section__icon--iec62196 { background: #7B1FA2; }
.normes-section__icon--iec62955 { background: #C62828; }
.normes-section__icon--ocpp { background: #00838F; }
.normes-section__icon--en50160 { background: #558B2F; }

.normes-section__info { flex: 1; min-width: 0; }
.normes-section__title { font-size: 15px; font-weight: 500; color: rgba(0,0,0,.87); }
.normes-section__subtitle { font-size: 12px; color: rgba(0,0,0,.54); margin-top: 2px; }

.normes-section__chevron {
  font-size: 24px; color: rgba(0,0,0,.38);
  transition: transform .25s ease; flex-shrink: 0;
}
.normes-section.expanded .normes-section__chevron { transform: rotate(180deg); }

.normes-section__body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease;
}
.normes-section.expanded .normes-section__body {
  max-height: 4000px;
}

.normes-section__content { padding: 0 16px 16px; }

/* Tags / badges */
.normes-tag {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; margin: 2px 4px 2px 0;
  letter-spacing: .3px;
}
.normes-tag--blue { background: #E3F2FD; color: #1565C0; }
.normes-tag--green { background: #E8F5E9; color: #2E7D32; }
.normes-tag--orange { background: #FFF3E0; color: #E65100; }
.normes-tag--red { background: #FFEBEE; color: #C62828; }
.normes-tag--purple { background: #F3E5F5; color: #6A1B9A; }
.normes-tag--teal { background: #E0F2F1; color: #00695C; }

/* Sub-sections within norms */
.normes-sub { margin-top: 16px; }
.normes-sub__title {
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  color: #4CAF50; margin-bottom: 8px; letter-spacing: .5px;
  display: flex; align-items: center; gap: 6px;
}
.normes-sub__title .mdi { font-size: 16px; }

/* Tables inside norms */
.normes-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.normes-table thead th {
  background: #f5f5f5; padding: 8px 10px; text-align: left;
  font-weight: 500; font-size: 12px; color: rgba(0,0,0,.6);
  border-bottom: 2px solid #e0e0e0; white-space: nowrap;
}
.normes-table tbody td {
  padding: 8px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top;
}
.normes-table tbody tr:hover { background: #fafafa; }
.normes-table code {
  background: #f5f5f5; padding: 1px 6px; border-radius: 3px;
  font-size: 12px; font-family: 'Roboto Mono', monospace;
}

/* Key point highlight */
.normes-keypoint {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; margin: 8px 0; border-radius: 4px;
  font-size: 13px; line-height: 1.6;
}
.normes-keypoint .mdi { font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.normes-keypoint--info { background: #E3F2FD; color: #1565C0; }
.normes-keypoint--warn { background: #FFF3E0; color: #E65100; }
.normes-keypoint--danger { background: #FFEBEE; color: #C62828; }
.normes-keypoint--success { background: #E8F5E9; color: #2E7D32; }

/* Highlight matching text in search */
.normes-highlight { background: #FFF176; padding: 0 2px; border-radius: 2px; }

/* No results */
.normes-no-results {
  text-align: center; padding: 48px 16px; color: rgba(0,0,0,.38);
  font-size: 15px;
}
.normes-no-results .mdi { font-size: 48px; display: block; margin-bottom: 12px; }

/* === DARK MODE === */
[data-theme="dark"] .normes-search { background: #16213e; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
[data-theme="dark"] .normes-search input { color: #e0e0e0; }
[data-theme="dark"] .normes-search .mdi { color: rgba(255,255,255,.35); }
[data-theme="dark"] .normes-search__count { color: rgba(255,255,255,.35); }
[data-theme="dark"] .normes-section { background: #16213e; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
[data-theme="dark"] .normes-section:hover { box-shadow: 0 2px 8px rgba(0,0,0,.4); }
[data-theme="dark"] .normes-section__title { color: #e0e0e0; }
[data-theme="dark"] .normes-section__subtitle { color: rgba(255,255,255,.5); }
[data-theme="dark"] .normes-section__chevron { color: rgba(255,255,255,.35); }
[data-theme="dark"] .normes-section__content { color: #e0e0e0; }
[data-theme="dark"] .normes-table thead th { background: #1c2a4a; color: rgba(255,255,255,.6); border-color: #2a2a4a; }
[data-theme="dark"] .normes-table tbody td { border-color: #2a2a4a; }
[data-theme="dark"] .normes-table tbody tr:hover { background: #1c2a4a; }
[data-theme="dark"] .normes-table code { background: #1c2a4a; color: #e0e0e0; }
[data-theme="dark"] .normes-no-results { color: rgba(255,255,255,.3); }
