/* ═══════════════════════════════════════════════════
   TotalEnergies Expert Finder — Design System
   Fidèle aux maquettes "Scientific Community Exploration March 2026"
════════════════════════════════════════════════════ */

:root {
  --te-red:        #D71B1B;
  --te-red-dark:   #A81414;
  --te-red-light:  #F5DCDC;
  --te-navy:       #1A1A2E;
  --te-dark:       #1E1E1E;
  --te-grey:       #6B7280;
  --te-grey-light: #F4F5F7;
  --te-border:     #E5E7EB;
  --te-white:      #FFFFFF;
  --te-success:    #10B981;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --font:          'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--te-dark);
  background: var(--te-white);
  margin: 0;
  line-height: 1.6;
}

/* ── Navbar ─────────────────────────────────────── */
.te-navbar {
  background: var(--te-white);
  border-bottom: 2px solid var(--te-red);
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.te-navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--te-dark);
}

.te-navbar__logo-img {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.te-navbar__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.te-navbar__subtitle {
  font-size: 11px;
  color: var(--te-grey);
  display: block;
}

.te-navbar__nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
}
.te-navbar__nav a {
  color: var(--te-grey);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.te-navbar__nav a:hover, .te-navbar__nav a.active { color: var(--te-red); }

/* ── Hero / Search bar ──────────────────────────── */
.te-hero {
  background: linear-gradient(135deg, #1A1A2E 0%, #2D0A0A 100%);
  color: white;
  padding: 64px 32px;
  text-align: center;
}
.te-hero h1 {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -.5px;
}
.te-hero p {
  font-size: 17px;
  opacity: .85;
  margin: 0 0 32px;
}

.te-search-bar {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.te-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--te-dark);
}
.te-search-bar input::placeholder { color: var(--te-grey); }
.te-search-bar button {
  background: var(--te-red);
  border: none;
  color: white;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
}
.te-search-bar button:hover { background: var(--te-red-dark); }

.te-search-example {
  margin-top: 12px;
  font-size: 13px;
  opacity: .7;
  font-style: italic;
}

/* ── Section ────────────────────────────────────── */
.te-section {
  padding: 48px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.te-section--grey { background: var(--te-grey-light); }
.te-section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--te-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.te-section-title span.badge {
  font-size: 13px;
  background: var(--te-red-light);
  color: var(--te-red);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── Expert card (search results) ──────────────── */
.te-expert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.te-expert-card {
  background: var(--te-white);
  border: 1px solid var(--te-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.te-expert-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.te-expert-card__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.te-expert-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--te-red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--te-red);
  flex-shrink: 0;
  overflow: hidden;
}
.te-expert-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.te-expert-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--te-navy);
  margin: 0 0 3px;
}
.te-expert-card__institution {
  font-size: 12px;
  color: var(--te-grey);
  margin: 0;
}

.te-expert-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.te-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.te-badge--line { background: #EEF2FF; color: #4338CA; }
.te-badge--active { background: #D1FAE5; color: #059669; }
.te-badge--inactive { background: #F3F4F6; color: #6B7280; }
.te-badge--verified { background: #FEF3C7; color: #92400E; }

.te-expert-card__stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--te-grey);
}
.te-expert-card__stats strong { color: var(--te-dark); }

.te-expert-card__topic {
  font-size: 13px;
  color: var(--te-grey);
  font-style: italic;
}

.te-expert-card__pub {
  background: var(--te-grey-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
}
.te-expert-card__pub-title {
  font-weight: 600;
  color: var(--te-dark);
  margin: 0 0 3px;
}
.te-expert-card__pub-meta {
  color: var(--te-grey);
  margin: 0;
}

.te-expert-card__explanation {
  font-size: 13px;
  color: #374151;
  background: #EFF6FF;
  border-left: 3px solid #3B82F6;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.te-expert-card__explanation-label {
  font-size: 11px;
  font-weight: 600;
  color: #3B82F6;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}

/* ── Search page toolbar ────────────────────────── */
.te-search-toolbar {
  background: var(--te-white);
  border-bottom: 1px solid var(--te-border);
  padding: 16px 0;
}
.te-toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.te-search-toolbar .te-search-bar {
  box-shadow: none;
  border: 1.5px solid var(--te-border);
  border-radius: var(--radius);
}
.te-search-toolbar .te-search-bar:focus-within {
  border-color: var(--te-red);
}

.te-filter-select {
  appearance: none;
  background: var(--te-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236B7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid var(--te-border);
  border-radius: var(--radius-sm);
  padding: 8px 30px 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--te-dark);
  cursor: pointer;
  min-width: 130px;
}
.te-filter-select:focus { outline: none; border-color: var(--te-red); }

.te-results-count {
  font-size: 13px;
  color: var(--te-grey);
  white-space: nowrap;
}
.te-results-count strong { color: var(--te-dark); }

.te-inactive-toggle {
  margin-left: auto;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--te-grey);
  cursor: pointer;
}

/* ── Expert profile page ────────────────────────── */
.te-profile-header {
  background: linear-gradient(135deg, #1A1A2E, #2D0A0A);
  color: white;
  padding: 40px 32px;
}
.te-profile-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.te-profile-header__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--te-red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--te-red);
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.3);
}
.te-profile-header__info { flex: 1; }
.te-profile-header__name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
}
.te-profile-header__institution {
  font-size: 15px;
  opacity: .8;
  margin: 0 0 12px;
}
.te-profile-header__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.te-profile-header__stats {
  display: flex;
  gap: 28px;
  margin-top: 20px;
}
.te-stat { text-align: center; }
.te-stat__value { font-size: 26px; font-weight: 700; }
.te-stat__label { font-size: 12px; opacity: .7; }

.te-profile-header__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────── */
.te-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.te-btn--primary { background: var(--te-red); color: white; }
.te-btn--primary:hover { background: var(--te-red-dark); }
.te-btn--outline { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,.5); }
.te-btn--outline:hover { background: rgba(255,255,255,.1); }
.te-btn--grey { background: var(--te-grey-light); color: var(--te-dark); }
.te-btn--grey:hover { background: var(--te-border); }

/* ── AI Explanation block ───────────────────────── */
.te-ai-block {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.te-ai-block__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #1D4ED8;
}
.te-ai-block__icon {
  width: 28px;
  height: 28px;
  background: #1D4ED8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}
.te-ai-block__your-need {
  background: white;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--te-grey);
  margin-bottom: 12px;
}
.te-ai-block__your-need strong { color: var(--te-dark); }

/* ── Tabs ───────────────────────────────────────── */
.te-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--te-border);
  margin-bottom: 28px;
}
.te-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--te-grey);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
  white-space: nowrap;
}
.te-tab.active { color: var(--te-red); border-color: var(--te-red); font-weight: 600; }

/* ── Publication item ───────────────────────────── */
.te-pub-item {
  border: 1px solid var(--te-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.te-pub-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--te-border);
  margin-bottom: 16px;
}
.te-pub-pagination__info {
  font-size: 13px;
  color: var(--te-grey);
}
.te-pub-pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.te-pub-pagination__controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.te-btn--ghost {
  background: transparent;
  border: 1px solid var(--te-border);
  color: var(--te-dark);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.te-btn--ghost:hover:not(:disabled) {
  background: var(--te-grey-light);
}
.te-pub-item__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--te-navy);
  margin: 0 0 6px;
}
.te-pub-item a {
  color: #374151;
  text-decoration: none;
}
.te-pub-item a:hover {
  color: var(--te-dark);
  text-decoration: none;
}
.te-pub-item__meta {
  font-size: 12px;
  color: var(--te-grey);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.te-pub-oa {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #D1FAE5;
  border-radius: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}
.te-pub-restricted {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  background: #F3F4F6;
  border-radius: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}
.te-pub-access-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--te-red);
  background: transparent;
  border: 1px solid var(--te-red);
  border-radius: 12px;
  padding: 2px 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.te-pub-access-btn:hover {
  background: var(--te-red);
  color: #fff;
  text-decoration: none;
}
.te-pub-item__abstract {
  font-size: 12px;
  color: #4B5563;
  line-height: 1.5;
  white-space: pre-line;
}
/* Co-auteurs */
.te-pub-item__authors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}
.te-author-chip {
  position: relative;
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #EEF2FF;
  color: #4338CA;
  white-space: nowrap;
  cursor: default;
  text-decoration: none;
}
.te-author-chip--linked {
  background: #E0E7FF;
  color: var(--te-red);
  font-weight: 600;
  cursor: pointer;
}
.te-author-chip--linked:hover {
  background: var(--te-red);
  color: #fff;
  text-decoration: none;
}
/* Tooltip au survol */
.te-author-chip[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1F2937;
  color: #F9FAFB;
  font-size: 11px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.te-author-chip[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1F2937;
  pointer-events: none;
  z-index: 99;
}
.te-pub-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.te-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--te-grey-light);
  color: var(--te-grey);
}

/* ── Language switcher ───────────────────────────── */
.te-lang-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: 12px;
}
.te-lang-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--te-border);
  background: transparent;
  color: var(--te-grey);
  cursor: pointer;
  transition: all .15s;
}
.te-lang-btn--active {
  background: var(--te-navy);
  color: #fff;
  border-color: var(--te-navy);
}
.te-lang-btn:not(.te-lang-btn--active):hover {
  border-color: var(--te-navy);
  color: var(--te-navy);
}

/* ── Search loading spinner ──────────────────────── */
.te-search-loading {
  text-align: center;
  padding: 64px 24px;
  color: var(--te-grey);
}
.te-search-loading p { margin: 8px 0 0; font-size: 14px; }
.te-search-loading__sub { font-size: 12px !important; opacity: .7; }
.te-search-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--te-grey-light);
  border-top-color: var(--te-red);
  border-radius: 50%;
  animation: te-spin .75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes te-spin { to { transform: rotate(360deg); } }

/* Spinner inline pour les explications IA lazy */
.te-expl-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(99,102,241,.2);
  border-top-color: var(--te-red);
  border-radius: 50%;
  animation: te-spin .75s linear infinite;
  vertical-align: middle;
  margin-left: 4px;
}
.te-expert-card__explanation--loading {
  opacity: .6;
}

/* About section formatting */
.te-about-section {
  font-size: 14px;
  font-weight: 600;
  color: #1E3A5F;
  margin: 16px 0 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
  text-transform: none;
  letter-spacing: 0;
}
.te-about-list {
  margin: 4px 0 8px 0;
  padding-left: 18px;
  list-style: none;
}
.te-about-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 2px;
}
.te-about-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--te-red);
  font-size: 12px;
}
.te-about-para {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.7;
  margin: 0 0 6px;
}

/* ── Abstract expand/collapse ────────────────────── */
.te-abstract-toggle {
  font-size: 12px;
  color: var(--te-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  display: block;
  font-weight: 500;
}
.te-abstract-toggle:hover {
  text-decoration: underline;
}

/* ── Topics grid ────────────────────────────────── */
.te-topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: calc(3 * (37px + 10px) - 10px);
  overflow: hidden;
}
.te-topic-pill {
  padding: 8px 16px;
  border: 1.5px solid var(--te-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--te-dark);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  display: inline-block;
}
.te-topic-pill:hover, .te-topic-pill.active {
  border-color: var(--te-red);
  background: var(--te-red-light);
  color: var(--te-red);
}

/* ── Collab card ────────────────────────────────── */
.te-collab-card {
  background: var(--te-grey-light);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--te-red);
}
.te-collab-card__quote { font-style: italic; color: #374151; margin: 0 0 12px; font-size: 14px; }
.te-collab-card__author { font-size: 13px; font-weight: 600; color: var(--te-grey); }

/* ── Form ───────────────────────────────────────── */
.te-form { max-width: 640px; }
.te-form-group { margin-bottom: 20px; }
.te-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--te-dark);
  margin-bottom: 6px;
}
.te-form-group label .required { color: var(--te-red); margin-left: 3px; }
.te-form-input {
  width: 100%;
  border: 1.5px solid var(--te-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--te-dark);
  transition: border-color .15s;
}
.te-form-input:focus { outline: none; border-color: var(--te-red); }
.te-form-input::placeholder { color: var(--te-grey); }
textarea.te-form-input { resize: vertical; min-height: 100px; }

.te-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Loading skeleton ───────────────────────────── */
.te-skeleton {
  background: linear-gradient(90deg, var(--te-grey-light) 25%, #e0e0e0 50%, var(--te-grey-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Footer ─────────────────────────────────────── */
.te-footer {
  background: var(--te-navy);
  color: rgba(255,255,255,.6);
  padding: 32px;
  text-align: center;
  font-size: 13px;
}
.te-footer a { color: var(--te-red); text-decoration: none; }

/* ── Hamburger nav ──────────────────────────────── */
.te-navbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  margin-left: 8px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 4px;
}
.te-navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--te-dark);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.te-navbar__burger:hover { background: var(--te-grey-light); }

/* ── Expert 2-column layout ─────────────────────── */
.te-expert-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: block;
}

.te-section-card {
  background: var(--te-white);
  border: 1px solid var(--te-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.te-section-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--te-navy);
  margin: 0 0 16px;
}
.te-section-card__sub-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--te-navy);
  margin: 20px 0 10px;
}

/* ── Sidebar blocks ──────────────────────────────── */
.te-sidebar-block {
  background: var(--te-white);
  border: 1px solid var(--te-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.te-sidebar-block--cta { background: var(--te-grey-light); }
.te-sidebar-block__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--te-border);
}
.te-sidebar-block__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--te-navy);
}
.te-sidebar-block__count {
  font-size: 20px;
  font-weight: 700;
  color: var(--te-red);
  white-space: nowrap;
}

/* ── Professional Background ─────────────────────── */
.te-bg-positions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.te-bg-position {
  padding-left: 14px;
  border-left: 3px solid var(--te-red-light);
}
.te-bg-position__role {
  font-size: 13px;
  font-weight: 600;
  color: var(--te-dark);
  margin-bottom: 2px;
}
.te-bg-position__org {
  font-size: 12px;
  color: var(--te-grey);
}
.te-bg-position__period {
  font-size: 11px;
  color: var(--te-grey);
  font-style: italic;
}

/* ── How to work steps ───────────────────────────── */
.te-how-to-work {
  background: var(--te-grey-light);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.te-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}
.te-step { text-align: center; }
.te-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--te-red);
  color: white;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.te-step p {
  font-size: 13px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

/* ── Search filter pills ─────────────────────────── */
.te-search-toolbar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.te-search-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.te-filter-pill {
  appearance: none;
  background: var(--te-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'%3E%3Cpath fill='%236B7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid var(--te-border);
  border-radius: 20px;
  padding: 6px 28px 6px 14px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--te-dark);
  cursor: pointer;
  transition: border-color .15s;
}
.te-filter-pill:focus { outline: none; border-color: var(--te-red); }
.te-filter-pill.active {
  border-color: var(--te-red);
  background-color: var(--te-red-light);
  color: var(--te-red);
}

/* ── Results header (search page) ────────────────── */
.te-results-header {
  padding: 10px 0;
  background: var(--te-white);
  border-bottom: 1px solid var(--te-border);
}
.te-results-header .te-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.te-results-count-big {
  font-size: 14px;
  font-weight: 600;
  color: var(--te-dark);
}
.te-results-count-big strong { color: var(--te-red); font-size: 18px; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .te-expert-grid { grid-template-columns: repeat(2, 1fr); }
  .te-expert-layout { padding: 24px; }
}
@media (max-width: 900px) {
  .te-expert-layout { grid-template-columns: 1fr 300px; gap: 20px; }
  .te-steps { gap: 8px; }
  .te-step__num { width: 30px; height: 30px; font-size: 14px; }
}
@media (max-width: 768px) {
  /* Nav hamburger */
  .te-navbar__burger { display: flex; }
  .te-navbar__nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--te-white);
    flex-direction: column;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--te-border);
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .te-navbar__nav--open { display: flex; }
  .te-navbar__nav a { padding: 10px 0; font-size: 15px; border-bottom: 1px solid var(--te-border); }
  .te-navbar__nav a:last-child { border-bottom: none; }
  /* General */
  .te-hero { padding: 40px 20px; }
  .te-section { padding: 32px 20px; }
  /* Search */
  .te-search-toolbar { padding: 12px 0; }
  .te-search-toolbar .te-toolbar-inner,
  .te-results-header .te-toolbar-inner { padding: 0 16px; }
  .te-results-header { padding: 8px 0; }
  .te-expert-grid { grid-template-columns: 1fr; }
  /* Expert layout: single column */
  .te-expert-layout { grid-template-columns: 1fr; padding: 16px; gap: 0; }
  .te-expert-sidebar { order: -1; }  /* sidebar (publications) goes first on mobile */
  .te-how-to-work { padding: 20px; }
  .te-steps { grid-template-columns: 1fr; gap: 12px; }
  .te-step { display: flex; align-items: flex-start; gap: 12px; text-align: left; }
  .te-step__num { flex-shrink: 0; margin: 0; }
  /* Profile header */
  .te-profile-header__inner { flex-direction: column; }
  .te-profile-header__actions { flex-direction: row; flex-wrap: wrap; }
  /* Forms */
  .te-form-row { grid-template-columns: 1fr; }
  .te-navbar { padding: 0 16px; }
  /* Touch targets */
  .te-btn { min-height: 44px; }
  .te-lang-btn { min-height: 36px; min-width: 36px; }
  .te-filter-pill { min-height: 36px; }
}
