/* IDE — Indice Qualité Réseau eSIM */

.ide-hero {
  padding: 120px 0 48px;
  background: linear-gradient(165deg, #0e1a22 0%, #152530 45%, #1a2f3a 100%);
  position: relative;
  overflow: hidden;
}

.ide-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(184, 160, 122, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(224, 120, 48, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.ide-container {
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  box-sizing: border-box;
}

main {
  overflow-x: clip;
}

.ide-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  flex-wrap: wrap;
  line-height: 1.4;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(184, 160, 122, 0.15);
  border: 1px solid rgba(184, 160, 122, 0.35);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

/* Hero sombre : blanc explicite (--ivory = #1e1a16, illisible sur fond navy) */
.ide-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 820px;
}

.ide-hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.ide-lead {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
  max-width: 720px;
  margin: 0 0 28px;
}

.ide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.ide-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* KPI strip */
.ide-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: -32px 0 48px;
  position: relative;
  z-index: 2;
}

/* Sources bar — 6 revendeurs visibles dès le hero */
.ide-sources-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  max-width: 100%;
  margin: 0 0 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-sizing: border-box;
}

.ide-sources-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-right: 4px;
}

.ide-source-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.ide-source-chip.ide-source-own {
  background: rgba(184, 160, 122, 0.15);
  border-color: rgba(184, 160, 122, 0.45);
  color: var(--ivory);
}

.ide-sources-note {
  flex: 1 1 100%;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .ide-kpi-strip { grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
}

@media (max-width: 420px) {
  .ide-kpi-strip { grid-template-columns: 1fr; }
}

.ide-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.ide-kpi-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.ide-kpi-label {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Answer box */
.ide-answer {
  background: linear-gradient(135deg, rgba(184, 160, 122, 0.12) 0%, rgba(224, 120, 48, 0.06) 100%);
  border: 1px solid rgba(184, 160, 122, 0.3);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.ide-answer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gold);
  margin-bottom: 10px;
}

.ide-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.ide-answer strong { color: var(--ivory); }

/* Body sections */
.ide-body h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 500;
  color: var(--ivory);
  margin: 52px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.ide-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ivory);
  margin: 32px 0 12px;
}

.ide-body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 18px;
}

.ide-body a { color: var(--gold); }

/* Map section */
.ide-map-section {
  margin: 32px 0;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, #faf8f5 0%, #f0ebe3 100%);
  border: 1px solid rgba(184, 160, 122, 0.28);
}

.ide-map-section .ide-map-title {
  color: #1a1a1a;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  margin: 0 0 6px;
}

.ide-map-section .ide-map-sub {
  color: #666;
  font-size: 14px;
  margin: 0 0 18px;
}

.ide-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #555;
}

.ide-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ide-map-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.ide-map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 460px;
  background: #c5d4e3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ide-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #666;
  z-index: 1;
  pointer-events: none;
}

.ide-map-country {
  fill: #e8dcc8;
  stroke: #b9a88a;
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
}

.ide-map-land { opacity: 0.95; }

.ide-map-dot-link {
  cursor: pointer;
  outline: none;
}

.ide-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ide-map-dot {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 1.5;
  transition: transform 0.15s ease, opacity 0.15s ease;
  transform-origin: center;
  transform-box: fill-box;
}

.ide-map-dot:hover,
.ide-map-dot.is-active {
  transform: scale(1.45);
  opacity: 1 !important;
  stroke-width: 2.5;
}

.ide-map-dot.is-dim { opacity: 0.28; }

.ide-map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  min-width: 180px;
  max-width: 260px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(14, 20, 28, 0.94);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.12s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ide-map-tooltip.is-visible { opacity: 1; }

.ide-map-tooltip strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--gold, #b8a07a);
}

.ide-map-tooltip .ppg {
  font-family: var(--font-display);
  font-size: 22px;
  color: #fff;
  margin: 4px 0;
}

.ide-map-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: #777;
}

.ide-map-detail {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: none;
}

.ide-map-detail.is-visible { display: block; }

.ide-map-detail h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #111;
}

.ide-map-detail p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.ide-map-detail a {
  color: #b8860b;
  font-weight: 600;
  font-size: 14px;
}

/* Rankings grid */
.ide-rankings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0;
}

@media (min-width: 960px) {
  .ide-rankings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ide-rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
}

.ide-rank-card .ide-rank-table-wrap {
  margin: 0;
  border: none;
  border-radius: 0;
  max-width: 100%;
  overflow-x: visible;
}

.ide-rank-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}

.ide-rank-table th {
  cursor: default;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.35px;
  padding: 10px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ide-rank-table th:hover {
  color: var(--ivory);
}

.ide-rank-table td {
  padding: 10px 8px;
  vertical-align: middle;
  overflow: hidden;
}

.ide-rank-table th:first-child,
.ide-rank-table td:first-child {
  width: 2.4rem;
  padding-left: 12px;
}

.ide-rank-table th:nth-child(2),
.ide-rank-table td:nth-child(2) {
  width: auto;
}

.ide-rank-table th:nth-child(3),
.ide-rank-table td:nth-child(3),
.ide-rank-table th:nth-child(4),
.ide-rank-table td:nth-child(4) {
  width: 5.8rem;
  text-align: right;
  white-space: nowrap;
}

.ide-rank-country {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ide-rank-country a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ivory);
  font-weight: 600;
  text-decoration: none;
}

.ide-rank-country a:hover {
  color: var(--gold);
}

@media (max-width: 639px) {
  .ide-rank-table {
    font-size: 12px;
  }

  .ide-rank-table th {
    font-size: 9px;
    padding: 8px 6px;
  }

  .ide-rank-table td {
    padding: 8px 6px;
  }

  .ide-rank-table th:nth-child(3),
  .ide-rank-table td:nth-child(3),
  .ide-rank-table th:nth-child(4),
  .ide-rank-table td:nth-child(4) {
    width: 4.9rem;
  }
}

.ide-rank-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ide-rank-card-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ivory);
}

.ide-rank-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
}

.ide-rank-badge.cheap {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.ide-rank-badge.expensive {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.ide-rank-badge.neutral {
  background: rgba(184, 160, 122, 0.15);
  color: var(--gold);
}

.ide-rank-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.ide-rank-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.12s;
}

.ide-rank-list li:last-child { border-bottom: none; }

.ide-rank-list li:hover { background: rgba(255, 255, 255, 0.03); }

.ide-rank-pos {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(184, 160, 122, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ide-rank-pos.gold { background: rgba(255, 215, 0, 0.15); color: #FFD700; }
.ide-rank-pos.silver { background: rgba(192, 192, 192, 0.15); color: #C0C0C0; }
.ide-rank-pos.bronze { background: rgba(205, 127, 50, 0.15); color: #CD7F32; }

.ide-rank-info {
  flex: 1;
  min-width: 0;
}

.ide-rank-info a {
  color: var(--ivory);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.ide-rank-info a:hover { color: var(--gold); }

.ide-rank-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.ide-rank-price {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
  white-space: nowrap;
}

.ide-rank-price small {
  font-family: var(--font-sans, inherit);
  font-size: 11px;
  color: var(--muted);
  display: block;
  text-align: right;
}

/* Region stats */
.ide-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.ide-region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.ide-region-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ivory);
}

.ide-region-card .avg {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}

.ide-region-card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* Full table */
.ide-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 24px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.ide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ide-table th {
  background: var(--surface);
  color: var(--ivory);
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid var(--gold);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ide-table th:hover { color: var(--gold); }

.ide-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.ide-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.ide-table td.num { font-variant-numeric: tabular-nums; }

.ide-table td.tier-excellent { color: #10B981; font-weight: 600; }
.ide-table td.tier-bon { color: #14B8A6; font-weight: 600; }
.ide-table td.tier-moyen { color: #C8860A; font-weight: 600; }
.ide-table td.tier-eleve { color: #E07830; font-weight: 600; }
.ide-table td.tier-tres-eleve { color: #EF4444; font-weight: 600; }

.ide-table-search {
  width: 100%;
  max-width: 360px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
}

.ide-table-search:focus { border-color: var(--gold); }

/* Methodology & cite */
.ide-method-box,
.ide-cite-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 28px 0;
}

.ide-method-box h3,
.ide-cite-box h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ivory);
}

.ide-cite-box pre {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  overflow-x: auto;
  margin: 12px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.ide-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 768px) {
  .ide-insight-grid { grid-template-columns: 1fr; }
}

.ide-insight {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.ide-insight-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.ide-insight p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* FAQ reuse */
.ide-faq { margin-top: 48px; }

.ide-faq .faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.ide-faq .faq-question {
  width: 100%;
  padding: 16px 20px;
  background: var(--surface);
  border: none;
  color: var(--ivory);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ide-faq .faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.ide-faq .faq-item.open .faq-answer {
  padding: 0 20px 18px;
  max-height: 400px;
}

.ide-cta {
  background: linear-gradient(135deg, #1a3d4a 0%, #0e2530 100%);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  margin-top: 56px;
}

.ide-cta h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ivory);
  margin: 0 0 10px;
}

.ide-cta p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  margin: 0 0 22px;
}

.ide-loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
}

.ide-updated-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(184, 160, 122, 0.15);
  border: 1px solid rgba(184, 160, 122, 0.28);
  font-size: 13px;
  color: #555;
  line-height: 1.45;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .ide-map-section { padding: 18px; }
  .ide-map-wrap { max-height: 280px; }
  .ide-hero { padding-top: 100px; }
  .ide-updated-badge {
    display: block;
    width: 100%;
    font-size: 11px;
    padding: 5px 10px;
    line-height: 1.35;
    text-align: center;
  }
}

.ide-market-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 24px 0 12px;
}

@media (max-width: 768px) {
  .ide-market-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .ide-market-kpis { grid-template-columns: 1fr; }
}

.ide-market-kpis-wide {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.ide-kpi-own {
  border-color: rgba(184, 160, 122, 0.45);
  background: rgba(184, 160, 122, 0.08);
}

.ide-kpi-market {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.ide-table-wrap-wide {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ide-table-multi {
  min-width: 920px;
}

.ide-table-multi .ide-sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15);
}

.ide-table-multi thead .ide-sticky-col {
  background: var(--surface);
}

.ide-col-own {
  background: rgba(184, 160, 122, 0.06);
  font-weight: 600;
}

.ide-col-market {
  background: rgba(16, 185, 129, 0.06);
  font-weight: 600;
  color: #10B981;
}

.ide-table-multi th.ide-col-own,
.ide-table-multi th.ide-col-market {
  font-size: 11px;
  white-space: nowrap;
}

.ide-market-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

.ide-table-multi.ide-market-table {
  min-width: 0;
  width: 100%;
}

.ide-market-table th {
  cursor: default;
}

.ide-market-table th:hover {
  color: var(--ivory);
}

.ide-market-table th:nth-child(n+3),
.ide-market-table td:nth-child(n+3) {
  text-align: right;
}

/* Header search — aligné sur index.html (accueil) */
.hsearch-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.hsearch-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

#hsearch-input {
  width: 200px;
  padding: 6px 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

#hsearch-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.hsearch-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  color: #111;
}

.hsearch-close {
  display: none;
  position: absolute;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.hsearch-trigger-mobile {
  display: none;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px;
  opacity: 0.85;
  align-items: center;
  justify-content: center;
}

.hsearch-trigger-mobile:hover { opacity: 1; }

@media (max-width: 767px) {
  .hsearch-wrap { display: none; }
  .hsearch-trigger-mobile { display: inline-flex; }

  body.hsearch-active { overflow: hidden; }

  body.hsearch-active .hsearch-wrap {
    display: flex !important;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    flex-direction: column;
    padding: 20px 16px;
    margin: 0;
  }

  body.hsearch-active .hsearch-icon {
    top: 36px;
    left: 28px;
    opacity: 0.5;
    color: #111;
    width: 18px;
    height: 18px;
  }

  body.hsearch-active #hsearch-input {
    width: 100%;
    height: 48px;
    padding: 10px 50px 10px 44px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    color: #111;
    font-size: 16px;
    border-radius: 12px;
  }

  body.hsearch-active .hsearch-close {
    display: block;
    top: 28px;
    right: 20px;
    color: #111;
    font-size: 32px;
    opacity: 0.7;
  }

  body.hsearch-active .hsearch-close:hover { opacity: 1; }

  body.hsearch-active .hsearch-results {
    position: static;
    margin-top: 16px;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    border: none;
    box-shadow: none;
    background: transparent;
  }
}

/* Historique prix/Go */
.ide-history-page {
  padding-bottom: 64px;
}

.ide-history-controls {
  margin: 32px 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.ide-history-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ivory);
}

.ide-history-select {
  min-width: min(100%, 320px);
  flex: 1;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.ide-history-select:focus {
  border-color: var(--gold);
}

.ide-history-chart-section {
  margin: 32px 0;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.ide-history-chart-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ivory);
}

.ide-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}

.ide-history-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.ide-history-legend-own {
  background: #b8a07a;
}

.ide-history-legend-market {
  background: #10B981;
}

.ide-history-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 8px;
  box-sizing: border-box;
}

.ide-history-svg {
  width: 100%;
  height: auto;
  display: block;
}

.ide-history-grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.ide-history-axis-y,
.ide-history-axis-x {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: end;
}

.ide-history-axis-x {
  text-anchor: middle;
}

.ide-history-dot {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 1.5;
}

.ide-history-dot:hover {
  r: 6;
}

.ide-history-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(14, 20, 28, 0.94);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.12s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ide-history-tooltip.is-visible {
  opacity: 1;
}

.ide-history-tooltip strong {
  display: block;
  color: var(--gold, #b8a07a);
  margin-bottom: 4px;
}

.ide-history-tooltip .ppg {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
}

.ide-tier-excellent{color:#10B981;font-weight:600}
.ide-tier-bon{color:#14B8A6;font-weight:600}
.ide-tier-moyen{color:#C8860A;font-weight:600}
.ide-tier-faible{color:#EF4444;font-weight:600}
.ide-score-badge{display:inline-block;min-width:42px;padding:2px 8px;border-radius:999px;font-size:13px;font-weight:700;text-align:center}
.ide-score-badge.excellent{background:rgba(16,185,129,.15);color:#10B981}
.ide-score-badge.bon{background:rgba(20,184,166,.15);color:#14B8A6}
.ide-score-badge.moyen{background:rgba(200,134,10,.15);color:#C8860A}
.ide-score-badge.faible{background:rgba(239,68,68,.15);color:#EF4444}

.ide-criteria-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:24px 0}
.ide-criteria-card{padding:18px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#fff}
.ide-criteria-head{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:14px}
.ide-criteria-card p{margin:0;font-size:14px;line-height:1.6;color:var(--muted)}
.ide-cite-box,.ide-method-box{padding:20px;border-radius:12px;background:rgba(0,0,0,.04);margin:20px 0}
.ide-cite-box pre{white-space:pre-wrap;font-size:13px;line-height:1.6;margin:8px 0 0}
.ide-download{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}
.ide-download a{padding:10px 16px;border-radius:999px;border:1px solid rgba(0,0,0,.12);text-decoration:none;font-size:14px}

.ide-country-badge{display:inline-flex;align-items:center;gap:8px;margin:12px 0;padding:8px 14px;border-radius:999px;border:1px solid rgba(184,160,122,.35);background:rgba(184,160,122,.12);color:var(--gold);font-size:13px;font-weight:600;text-decoration:none}
.ide-country-badge-score{font-size:15px;color:#fff}
.ide-country-badge-tier{text-transform:capitalize;opacity:.85;font-size:12px}
