/* ============================================================
   style.css — Souveraineté Numérique
   Thème : clair, bleu, police système
   ============================================================ */

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

/* ── Police système ── */
:root {
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
          'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Consolas', 'Courier New', monospace;

  --blue-600:  #2563eb;
  --blue-700:  #1d4ed8;
  --blue-800:  #1e40af;
  --blue-50:   #eff6ff;
  --blue-100:  #dbeafe;
  --blue-200:  #bfdbfe;
  --blue-300:  #93c5fd;

  --bg:        #f8faff;
  --bg2:       #f1f5fd;
  --surface:   #ffffff;
  --surface2:  #f3f6fc;
  --border:    #e2e8f4;
  --border2:   #c7d4ee;

  --text:      #0f172a;
  --muted:     #475569;
  --hint:      #94a3b8;      /* décoratif uniquement (bordures, placeholders) */
  --label:     #586578;      /* labels, meta-textes — 5.9:1 sur blanc, 5.5:1 sur surface2 */
  --blue-text: var(--blue-700); /* textes bleus — #1d4ed8 = 6.07:1 sur hero eef4ff ✓ */

  --accent:       var(--blue-600);
  --accent-hover: var(--blue-700);

  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --ok-bg:    #dcfce7; --ok-tx:   #15803d;
  --warn-bg:  #fef9c3; --warn-tx: #a16207;
  --bad-bg:   #fee2e2; --bad-tx:  #b91c1c;
  --blue-bg:  #dbeafe; --blue-tx: #1e40af;
  --teal-bg:  #ccfbf1; --teal-tx: #0f766e;
  --amber-bg: #fef3c7; --amber-tx:#92400e;
  --green-bg: #dcfce7; --green-tx:#166534;
  --gray-bg:  #f1f5f9; --gray-tx: #475569;
  --red-bg:   #fee2e2; --red-tx:  #991b1b;
  --purple-bg:#ede9fe; --purple-tx:#5b21b6;
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════ HEADER ══════════════════════ */
.site-header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--blue-600);
  color: #fff;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-text strong { font-weight: 700; color: var(--text); }
.logo-text { font-weight: 400; color: var(--muted); }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
}
.header-nav a:hover { color: var(--text); background: var(--surface2); }
.header-nav-cta {
  background: var(--blue-600) !important;
  color: #fff !important;
}
.header-nav-cta:hover { background: var(--blue-700) !important; }

/* ══════════════════════ LAYOUT ══════════════════════ */
.page-wrapper { flex: 1; display: flex; flex-direction: column; }

/* ══════════════════════ HERO ══════════════════════ */
.hero-section {
  background: linear-gradient(155deg, #eef4ff 0%, #f8faff 60%, #f0f7ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 5.5rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: rgba(37,99,235,0.07);
  border: 1px solid rgba(37,99,235,0.18);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 1.75rem;
}
.hero-eyebrow-dot {
  width: 7px; height: 7px;
  background: var(--blue-600);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero-title-accent {
  color: var(--blue-600);
  position: relative;
  display: inline-block;
}
.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-300));
  border-radius: 2px;
  opacity: 0.35;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 2.5rem;
}
.hero-form-wrap {
  max-width: 580px;
  margin: 0 auto 1.5rem;
}
.hero-hint {
  font-size: 0.875rem;
  color: #454545;
  line-height: 1.5;
  margin-top: 0.6rem;
}
.site-counter {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.site-counter strong { color: var(--blue-text); font-weight: 700; }

/* ══════════════════════ SEARCH FORM ══════════════════════ */
.search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}
.search-input-wrap { position: relative; flex: 1; }
.search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--hint);
  display: flex;
  pointer-events: none;
}
.search-form input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.75rem;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}
.search-form input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14), 0 1px 4px rgba(15,23,42,0.06);
}
.search-form input::placeholder { color: var(--hint); }
.search-form button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.9rem 1.5rem;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(37,99,235,0.3), 0 4px 12px rgba(37,99,235,0.2);
  flex-shrink: 0;
}
.search-form button:hover  { background: var(--blue-700); box-shadow: 0 2px 8px rgba(37,99,235,0.35), 0 6px 20px rgba(37,99,235,0.22); }
.search-form button:active { transform: scale(0.97); }
.search-form button:disabled { opacity: 0.45; cursor: not-allowed; }
.search-form button:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 2px; }

/* ══════════════════════ CONTAINER ══════════════════════ */
.container {
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 1.25rem 3rem;
}
@media (min-width: 1000px) {
  .container { max-width: 1280px; padding: 2.5rem 2rem 4rem; }
}

/* ══════════════════════ LOADER ══════════════════════ */
.loader { display: none; padding: 1.5rem 0; }
.loader.active { display: block; }
.loader-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
}
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border2);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { flex: 1; }
.loader-step {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.loader-steps-dots {
  display: flex;
  gap: 5px;
}
.loader-steps-dots span {
  width: 32px; height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.loader-steps-dots span:first-child {
  background: var(--blue-600);
}

/* ── Erreur ── */
.error-box {
  display: none;
  background: var(--bad-bg); color: var(--bad-tx);
  border-radius: var(--radius-sm); padding: 0.9rem 1.1rem;
  font-size: 0.9rem; margin-bottom: 1.25rem;
  border: 1px solid rgba(185,28,28,0.2);
  font-weight: 500;
}

/* ══════════════════════ RÉSULTATS GRID ══════════════════════ */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}
@media (min-width: 1000px) {
  .results-grid {
    grid-template-columns: minmax(0,1fr) minmax(0,1.45fr);
    gap: 0 32px;
  }
  .sovereignty-score { grid-column: 1 / -1; }
  .col-right > .section-sep:first-child { margin-top: 20px; }
}
.col-left, .col-right { min-width: 0; }

/* ══════════════════════ SECTION SEP ══════════════════════ */
.section-sep {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blue-600);
  margin: 28px 0 10px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  border-radius: 1px;
}

/* ══════════════════════ CARD ══════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 4px 16px rgba(15,23,42,0.03);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: 0 2px 8px rgba(15,23,42,0.08), 0 8px 24px rgba(15,23,42,0.05);
  border-color: var(--border2);
}
.card-title {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blue-600);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ══════════════════════ SCORE SOUVERAINETÉ ══════════════════════ */
.sovereignty-score {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 4px 16px rgba(15,23,42,0.03);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 1000px) {
  .sovereignty-score { flex-direction: row; align-items: flex-start; }
  .score-left { display: flex; align-items: flex-start; gap: 18px; flex-shrink: 0; min-width: 360px; max-width: 460px; }
  .score-summary-panel { flex: 1; min-width: 0; border-left: 1px solid var(--border); padding-left: 24px; align-self: stretch; }
}
@media (max-width: 999px) {
  .score-left { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  .score-summary-panel { border-top: 1px solid var(--border); padding-top: 16px; }
}
.score-summary-title {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--blue-600);
  margin-bottom: 10px;
}
.score-circle {
  width: 78px; height: 78px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -0.04em;
  border: 3px solid transparent;
  box-shadow: 0 2px 14px rgba(15,23,42,0.13);
}
.score-circle.bad  { background: #dc2626; border-color: #dc2626; color: #fff; }
.score-circle.warn { background: #d97706; border-color: #d97706; color: #fff; }
.score-circle.ok   { background: #16a34a; border-color: #16a34a; color: #fff; }
.score-info  { flex: 1; min-width: 0; }
.score-label { font-size: 1.05rem; font-weight: 700; }
.score-sub   { font-size: 0.81rem; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.score-sub2  { font-size: 0.77rem; color: var(--label); margin-top: 2px; }
.score-bars  { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.score-bar-row { display: flex; align-items: center; gap: 9px; }
.score-bar-label { font-size: 0.78rem; color: var(--muted); width: 130px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.score-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.65s cubic-bezier(0.4,0,0.2,1); }
.score-bar-fill.bad  { background: #dc2626; }
.score-bar-fill.warn { background: #d97706; }
.score-bar-fill.ok   { background: #16a34a; }
.score-bar-val { font-size: 0.75rem; font-weight: 700; width: 28px; text-align: right; color: var(--label); }

/* Résumé souveraineté */
.sovereignty-summary-list { display: flex; flex-direction: column; }
.sov-summary-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.sov-summary-row:last-child { border-bottom: none; }
.sov-summary-icon  { font-size: 1.05rem; flex-shrink: 0; width: 22px; text-align: center; }
.sov-summary-label { font-size: 0.69rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--label); width: 130px; flex-shrink: 0; }
.sov-summary-value { font-weight: 600; flex: 1; min-width: 120px; word-break: break-word; }
.sov-summary-note  { font-size: 0.82rem; color: var(--label); width: 100%; padding-left: 31px; margin-top: 1px; line-height: 1.45; }

/* ══════════════════════ INFRA / HOST ══════════════════════ */
.host-main { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.host-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.host-name { font-size: 1.1rem; font-weight: 700; }
.host-sub  { font-size: 0.83rem; color: var(--muted); margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item label { display: block; font-size: 0.69rem; color: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.info-item span  { font-size: 0.92rem; font-weight: 500; word-break: break-all; }
.cms-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem; flex-wrap: wrap;
}
.cms-label { color: var(--label); font-size: 0.69rem; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.divider   { height: 1px; background: var(--border); margin: 16px 0; }

/* TLS */
.tls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tls-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.79rem; font-weight: 600; padding: 4px 11px; border-radius: 20px; margin-top: 5px; }
.tls-eu   { background: var(--ok-bg);   color: var(--ok-tx); }
.tls-us   { background: var(--bad-bg);  color: var(--bad-tx); }
.tls-neut { background: var(--gray-bg); color: var(--gray-tx); }

/* ══════════════════════ DNS ══════════════════════ */
.dns-section-label { font-size: 0.69rem; color: var(--label); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.dns-section-label--mb { margin-bottom: 6px; }
.dns-section-label--mt { margin-top: 12px; }
.sov-dns-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.registrar-row { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.whois-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.whois-registrar { font-size: 0.95rem; font-weight: 600; }
.whois-note      { font-size: 0.78rem; color: var(--muted); }
.ns-list { display: flex; flex-direction: column; gap: 5px; }
.ns-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.81rem; font-family: var(--font-mono);
  background: var(--surface2); border-radius: var(--radius-xs);
  border: 1px solid var(--border); padding: 6px 10px; color: var(--text); min-width: 0;
}
.ns-host { flex: 1 1 auto; min-width: 0; word-break: break-all; }
.ns-ip   { font-size: 0.74rem; color: var(--label); flex-shrink: 0; white-space: nowrap; }
.ns-item .region-pill { flex-shrink: 0; white-space: nowrap; }
.ns-country { font-size: 0.72rem; color: var(--muted); font-family: var(--font); white-space: nowrap; flex-shrink: 0; }

/* Region pills */
.region-pill { display: inline-block; font-size: 0.69rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; vertical-align: middle; letter-spacing: 0.03em; }
.region-eu   { background: var(--ok-bg);   color: var(--ok-tx); }
.region-us   { background: var(--bad-bg);  color: var(--bad-tx); }
.region-neut { background: var(--gray-bg); color: var(--gray-tx); }

/* ══════════════════════ TECH ══════════════════════ */
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0; }
.tech-row  { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 20px; font-size: 0.79rem; font-weight: 500;
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
}
.tech-pill.eu  { background: var(--teal-bg); border-color: var(--teal-tx); color: var(--teal-tx); }
.tech-pill.usa { background: var(--warn-bg); border-color: var(--warn-tx); color: var(--warn-tx); }
.tech-pill.bad { background: var(--bad-bg);  border-color: var(--bad-tx);  color: var(--bad-tx); }
.tech-group { width: 100%; margin-top: 10px; margin-bottom: 2px; }
.tech-group:first-child { margin-top: 0; }
.tech-group-label { font-size: 0.67rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--label); margin-bottom: 5px; }

/* ══════════════════════ DOMAINES EXTERNES ══════════════════════ */
.ext-domain-list { display: flex; flex-direction: column; gap: 5px; }
.ext-domain-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: var(--radius-sm);
  background: var(--surface2); font-size: 0.85rem;
  flex-wrap: wrap; border-left: 3px solid transparent;
  transition: background 0.12s;
}
.ext-domain-row:hover { background: var(--bg2); }
.ext-domain-row .ext-flag { font-size: 1rem; flex-shrink: 0; }
.ext-domain-row .ext-name { font-weight: 600; flex: 1; min-width: 0; word-break: break-word; }
.ext-domain-row .ext-host { font-size: 0.74rem; color: var(--muted); font-family: var(--font-mono); word-break: break-all; max-width: 100%; }
.ext-domain-row.us      { border-left-color: #dc2626; }
.ext-domain-row.eu      { border-left-color: #16a34a; }
.ext-domain-row.neutral { border-left-color: #cbd5e1; }

.ext-links-list { display: flex; flex-direction: column; gap: 5px; }
.ext-link-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  background: var(--surface2); font-size: 0.82rem;
  border-left: 3px solid transparent;
}
.ext-link-row.us      { border-left-color: #dc2626; }
.ext-link-row.eu      { border-left-color: #16a34a; }
.ext-link-row.neutral { border-left-color: #cbd5e1; }
.ext-link-name { flex: 1; font-weight: 500; }
.ext-link-host { font-size: 0.73rem; color: var(--label); font-family: var(--font-mono); }
.link-badge {
  font-size: 0.61rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; padding: 1px 6px; border-radius: 8px;
  background: var(--surface); color: var(--label); border: 1px solid var(--border2);
  flex-shrink: 0;
}

/* ══════════════════════ BADGES ══════════════════════ */
.badge { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; margin: 1px 2px; }
.b-ok   { background: var(--ok-bg);   color: var(--ok-tx); }
.b-fail { background: var(--bad-bg);  color: var(--bad-tx); }
.b-warn { background: var(--warn-bg); color: var(--warn-tx); }
.b-info { background: var(--blue-bg); color: var(--blue-tx); }
.b-neu  { background: var(--gray-bg); color: var(--gray-tx); }
.badge--sm { font-size: 0.72rem; }

.badge-amber  { background:var(--amber-bg);  color:var(--amber-tx);  font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-blue   { background:var(--blue-bg);   color:var(--blue-tx);   font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-teal   { background:var(--teal-bg);   color:var(--teal-tx);   font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-green  { background:var(--green-bg);  color:var(--green-tx);  font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-purple { background:var(--purple-bg); color:var(--purple-tx); font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-gray   { background:var(--gray-bg);   color:var(--gray-tx);   font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }
.badge-red    { background:var(--red-bg);    color:var(--red-tx);    font-size:.74rem; font-weight:500; padding:3px 10px; border-radius:20px; margin:3px 3px 3px 0; display:inline-block; }

.pill-ok   { display:inline-block; font-size:.71rem; font-weight:600; padding:1px 8px; border-radius:20px; background:var(--ok-bg);   color:var(--ok-tx); }
.pill-warn { display:inline-block; font-size:.71rem; font-weight:600; padding:1px 8px; border-radius:20px; background:var(--warn-bg); color:var(--warn-tx); }
.pill-bad  { display:inline-block; font-size:.71rem; font-weight:600; padding:1px 8px; border-radius:20px; background:var(--bad-bg);  color:var(--bad-tx); }
.pill-gray { display:inline-block; font-size:.71rem; font-weight:600; padding:1px 8px; border-radius:20px; background:var(--gray-bg); color:var(--gray-tx); }

.status-pill { display:inline-block; font-size:.71rem; font-weight:600; padding:2px 8px; border-radius:20px; margin-left:6px; vertical-align:middle; }
.s2xx { background:var(--ok-bg);   color:var(--ok-tx); }
.s3xx { background:var(--warn-bg); color:var(--warn-tx); }
.s4xx,.s5xx { background:var(--bad-bg); color:var(--bad-tx); }

/* Ctx badges */
.ctx-badge { font-size:.62rem; font-weight:600; text-transform:uppercase; letter-spacing:.04em; padding:1px 6px; border-radius:8px; white-space:nowrap; flex-shrink:0; }
.ctx-script     { background:var(--bad-bg);    color:var(--bad-tx); }
.ctx-iframe     { background:var(--warn-bg);   color:var(--warn-tx); }
.ctx-img        { background:var(--blue-bg);   color:var(--blue-tx); }
.ctx-font       { background:var(--purple-bg); color:var(--purple-tx); }
.ctx-stylesheet { background:var(--purple-bg); color:var(--purple-tx); }
.ctx-preconnect { background:var(--gray-bg);   color:var(--gray-tx); }
.ctx-inline_js  { background:var(--bad-bg);    color:var(--bad-tx); }
.ctx-form       { background:var(--warn-bg);   color:var(--warn-tx); }
.ctx-data_attr  { background:var(--gray-bg);   color:var(--gray-tx); }
.ctx-cat        { background:var(--surface);   border:1px solid var(--border2); color:var(--muted); }
.ctx-badge.ctx-cookie { background:var(--warn-bg); color:var(--warn-tx); }

/* Filtres */
.filter-row { display:flex; gap:6px; margin-bottom:12px; flex-wrap:wrap; }
.filter-btn {
  font-size:.74rem; font-weight:600; padding:5px 13px;
  border-radius:20px; border:1.5px solid var(--border2);
  background:var(--surface2); color:var(--muted);
  cursor:pointer; transition:all 0.15s; touch-action:manipulation; min-height:34px;
  letter-spacing:.01em; font-family:var(--font);
}
.filter-btn:hover { border-color:var(--accent); color:var(--text); }
.filter-btn.active-us   { background:var(--bad-bg);  color:var(--bad-tx);  border-color:#dc2626; }
.filter-btn.active-eu   { background:var(--ok-bg);   color:var(--ok-tx);   border-color:#16a34a; }
.filter-btn.active-all  { background:var(--blue-50); color:var(--blue-600);border-color:var(--blue-600); }
.filter-btn.active-neut { background:var(--gray-bg); color:var(--gray-tx); border-color:var(--border2); }

/* Sous-pages label */
.subpage-source-label {
  font-size:.72rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  color:var(--label); background:var(--surface2); border:1px solid var(--border);
  border-radius:6px; padding:4px 10px; margin:12px 0 6px; display:inline-block;
}
.subpage-source-label:first-child { margin-top:0; }

/* DNS grid compat */
.dns-grid { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.dns-item { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:8px; font-size:.83rem; font-weight:500; }
.dns-ok   { background:var(--ok-bg);   border:1px solid var(--ok-tx);   color:var(--ok-tx); }
.dns-fail { background:var(--bad-bg);  border:1px solid var(--bad-tx);  color:var(--bad-tx); }
.dns-neu  { background:var(--gray-bg); border:1px solid var(--border2); color:var(--muted); }

/* SSL grid */
.ssl-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0; }
.ssl-card { border:1px solid var(--border); border-radius:var(--radius-sm); padding:11px 13px; display:flex; flex-direction:column; gap:3px; background:var(--surface); }
.ssl-card.ok   { border-color:var(--ok-tx);   background:var(--ok-bg); }
.ssl-card.fail { border-color:var(--bad-tx);  background:var(--bad-bg); }
.ssl-card.warn { border-color:var(--warn-tx); background:var(--warn-bg); }
.ssl-card--full { grid-column:1/-1; }
.ssl-label { font-size:.73rem; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.ssl-value { font-size:.88rem; font-weight:500; word-break:break-all; }
.ssl-value--sm   { font-size:.81rem; }
.ssl-value--xs   { font-size:.79rem; display:block; }
.ssl-value-muted { color:var(--muted); }

/* Alert blocks */
.alert-block { border-left:4px solid; border-radius:0 8px 8px 0; padding:11px 15px; margin-bottom:9px; font-size:.88rem; line-height:1.5; }
.alert-block.critical { background:var(--bad-bg);   border-color:var(--bad-tx);  color:var(--bad-tx); }
.alert-block.high     { background:var(--warn-bg);  border-color:var(--warn-tx); color:var(--warn-tx); }
.alert-block.ok       { background:var(--ok-bg);    border-color:var(--ok-tx);   color:var(--ok-tx); }
.alert-block.info     { background:var(--surface2); border-color:var(--muted);   color:var(--text); }
.alert-block .fix     { font-size:.8rem; color:var(--muted); margin-top:5px; }
.alert-block .fix strong { color:var(--ok-tx); }
.alert-block--mt { margin-top:4px; }

/* Compat divers */
.section-title { margin:22px 0 9px; font-size:1rem; font-weight:600; border-bottom:1px solid var(--border); padding-bottom:6px; display:flex; align-items:center; gap:8px; }
.section-desc  { font-size:.85rem; color:var(--muted); margin-bottom:10px; }
.redirect-chain { font-size:.81rem; color:var(--muted); padding:7px 12px; background:var(--surface2); border-left:3px solid var(--border2); border-radius:0 6px 6px 0; margin-bottom:10px; }
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:10px; }
.data-table { border-collapse:collapse; width:100%; font-size:.85rem; min-width:360px; }
.data-table th { background:var(--surface2); font-weight:600; padding:7px 10px; text-align:left; border-bottom:2px solid var(--border2); }
.data-table td { padding:7px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.data-table tr.row-fail td { background:var(--bad-bg); }
.data-table tr.row-warn td { background:var(--warn-bg); }
.data-table .note-cell { font-size:.8rem; color:var(--muted); line-height:1.4; }
.cell-center { text-align:center; }
.cell-muted  { font-size:.81rem; color:var(--muted); }
.pts-na      { color:var(--label); }
.res-critical td { background:var(--bad-bg) !important; }
.status-info     { color:var(--muted); }
.status-critical { color:var(--bad-tx); font-weight:600; }
.status-warn     { color:var(--warn-tx); font-weight:600; }
.status-ok       { color:var(--ok-tx); }
.grade-row { display:flex; align-items:center; gap:16px; padding:1rem 1.25rem; border-radius:var(--radius-sm); margin-bottom:12px; background:var(--surface); border:1px solid var(--border); flex-wrap:wrap; }
.grade-circle { width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.6rem; font-weight:700; color:#fff; flex-shrink:0; }
.grade-info  { flex:1; min-width:0; }
.grade-label { font-size:1rem; font-weight:600; }
.grade-sub   { font-size:.82rem; color:var(--muted); margin-top:2px; }
.score-bar-wrap { background:var(--surface2); border-radius:6px; height:10px; overflow:hidden; margin-top:6px; max-width:360px; }
.score-bar      { height:100%; border-radius:6px; transition:width .6s; min-width:4px; }
.score-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:10px; margin-bottom:14px; }
.score-card  { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.sc-icon  { font-size:1.3rem; }
.sc-label { font-size:.82rem; font-weight:600; color:var(--text); }
.sc-pts   { font-size:.77rem; color:var(--muted); }
.sc-note  { font-size:.8rem;  color:var(--muted); line-height:1.4; }
.sc-bar   { height:5px; border-radius:3px; margin-top:4px; }
.info-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px 16px; margin-bottom:10px; }
.info-card .ic-label { font-size:.73rem; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.info-card .ic-value { font-size:.95rem; font-weight:500; margin-top:2px; word-break:break-word; }
.services-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px; margin-bottom:14px; }
.service-card  { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; }
.service-card.risk-high   { border-left:4px solid #c0392b; }
.service-card.risk-medium { border-left:4px solid #d68910; }
.service-card.risk-low    { border-left:4px solid #1d9e75; }
.svc-name    { font-size:.88rem; font-weight:600; }
.svc-type    { font-size:.76rem; color:var(--muted); margin-top:2px; }
.svc-country { font-size:.76rem; margin-top:4px; }
.svc-note    { font-size:.76rem; color:var(--muted); margin-top:5px; line-height:1.4; font-style:italic; }
.ck-category    { display:inline-block; padding:1px 7px; border-radius:10px; font-size:.74rem; font-weight:600; }
.ck-analytics   { background:var(--warn-bg); color:var(--warn-tx); }
.ck-advertising { background:var(--bad-bg);  color:var(--bad-tx); }
.ck-functional  { background:var(--ok-bg);   color:var(--ok-tx); }
.ck-consent     { background:var(--blue-bg); color:var(--blue-tx); }
.ck-preference  { background:var(--gray-bg); color:var(--gray-tx); }
.ck-unknown     { background:var(--gray-bg); color:var(--gray-tx); }
.legal-grid { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.legal-item { display:inline-flex; align-items:center; gap:5px; padding:5px 12px; border-radius:8px; font-size:.83rem; font-weight:500; }
.legal-ok   { background:var(--ok-bg);  border:1px solid var(--ok-tx);  color:var(--ok-tx); }
.legal-fail { background:var(--bad-bg); border:1px solid var(--bad-tx); color:var(--bad-tx); }
.legal-link       { font-size:.75rem; margin-left:4px; color:inherit; text-decoration:none; }
.legal-link:hover { text-decoration:underline; }
.param-code { font-size:.8rem; margin-left:4px; opacity:.8; }

/* Notes */
.note { font-size:.82rem; color:var(--label); margin-top:10px; line-height:1.5; }
.note-mt      { margin-top:10px; }
.note-mb      { margin-bottom:8px; }
.note-top-neg { margin-top:-4px; }
.empty-note   { color:var(--label); font-size:.85rem; }
.col-right-sep {}

code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px;
}

/* Hidden */
#results { display:none; }
#rgpdResults { display:none; }
.site-nav { display:none; }
.header   { display:none; }

/* ══════════════════════ FEATURES SECTION ══════════════════════ */
.features-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 5rem 1.5rem 5.5rem;
}
.features-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.features-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.75rem;
}
.features-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--blue-300);
  box-shadow: 0 4px 24px rgba(37,99,235,0.09);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px; height: 44px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-600);
  margin-bottom: 1.1rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.55rem;
  letter-spacing: -0.01em;
}
.feature-card > p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.feature-card ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.feature-card ul li {
  font-size: .82rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.feature-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  background: var(--blue-300);
  border-radius: 50%;
}

/* ══════════════════════ FOOTER ══════════════════════ */
.site-footer {
  background: var(--text);
  color: #94a3b8;
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.footer-brand {
  display: flex; align-items: center; gap: 9px;
  color: #f1f5f9; font-size: .97rem; margin-bottom: .6rem;
}
.footer-logo-icon {
  width: 32px; height: 32px;
  background: var(--blue-600);
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.footer-brand strong { font-weight: 700; color: #f1f5f9; }
.footer-desc { font-size: .83rem; color: #94a3b8; line-height: 1.6; max-width: 360px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.footer-links a {
  display: flex; align-items: center; gap: 6px;
  color: #94a3b8; text-decoration: none;
  font-size: .85rem; transition: color 0.15s;
}
.footer-links a:hover { color: #f1f5f9; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.1rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  font-size: .78rem;
  color: #94a3b8;
}
.footer-bottom strong { color: #cbd5e1; font-weight: 500; }

/* ══════════════════════ ACCESSIBILITÉ ══════════════════════ */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
:focus-visible { outline:2px solid var(--blue-600); outline-offset:2px; }
a:focus-visible, button:focus-visible { outline:3px solid var(--blue-600); outline-offset:2px; border-radius:2px; }

/* ══════════════════════ RESPONSIVE ══════════════════════ */
@media (max-width: 999px) {
  .results-grid { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  .site-footer-inner { grid-template-columns:1fr; }
  .footer-links { align-items:flex-start; }
  .features-grid { grid-template-columns:1fr; }
  .hero-section { padding:3.5rem 1.25rem 3.5rem; }
}
@media (max-width: 540px) {
  .search-form { flex-direction:column; }
  .search-form button { width:100%; justify-content:center; }
  .ssl-grid { grid-template-columns:1fr; }
  .ssl-card--full { grid-column:1; }
  .sov-dns-grid { grid-template-columns:1fr; }
  .tls-grid { grid-template-columns:1fr; }
  .info-grid { grid-template-columns:1fr; }
  .score-cards { grid-template-columns:1fr 1fr; }
  .site-header-inner { padding:0 1rem; }
  .header-nav a:not(.header-nav-cta) { display:none; }
}
@media (max-width: 380px) {
  .score-cards { grid-template-columns:1fr; }
  .score-bar-label { width:80px; font-size:.72rem; }
  .sov-summary-label { width:80px; }
}


/* ══════════════════════ MODE SOMBRE ══════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --blue-600:  #3b82f6;
    --blue-700:  #2563eb;
    --blue-800:  #1d4ed8;
    --blue-50:   #1e3a5f;
    --blue-100:  #1e3a8a;
    --blue-200:  #1e40af;
    --blue-300:  #2563eb;

    --bg:        #0f172a;
    --bg2:       #1e293b;
    --surface:   #1e293b;
    --surface2:  #273549;
    --border:    #334155;
    --border2:   #475569;

    --text:      #f1f5f9;
    --muted:     #94a3b8;   /* 5.7:1 sur #1e293b ✓ */
    --hint:      #475569;   /* décoratif uniquement */
    --label:     #94a3b8;   /* labels/meta — 5.7:1 sur #1e293b ✓ */
    --blue-text: #60a5fa;   /* textes bleus sur fond sombre — 5.75:1 sur #1e293b ✓ */

    --accent:       var(--blue-600);
    --accent-hover: var(--blue-700);

    --ok-bg:    #14532d; --ok-tx:   #86efac;
    --warn-bg:  #713f12; --warn-tx: #fde68a;
    --bad-bg:   #7f1d1d; --bad-tx:  #fca5a5;
    --blue-bg:  #1e3a8a; --blue-tx: #93c5fd;
    --teal-bg:  #134e4a; --teal-tx: #5eead4;
    --amber-bg: #78350f; --amber-tx:#fde68a;
    --green-bg: #14532d; --green-tx:#86efac;
    --gray-bg:  #1e293b; --gray-tx: #94a3b8;
    --red-bg:   #7f1d1d; --red-tx:  #fca5a5;
    --purple-bg:#3b0764; --purple-tx:#c4b5fd;
  }

  .site-header {
    background: rgba(15,23,42,0.92);
    border-bottom-color: var(--border);
  }

  .hero-section {
    background: linear-gradient(155deg, #111827 0%, #0f172a 60%, #111827 100%);
    border-bottom-color: var(--border);
  }
  .hero-section::before {
    background-image:
      linear-gradient(rgba(59,130,246,0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(59,130,246,0.07) 1px, transparent 1px);
  }
  .hero-section::after {
    background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
  }

  .search-form input {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border2);
  }
  .search-form input::placeholder { color: var(--hint); }
  .search-form input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.22), 0 1px 4px rgba(0,0,0,0.2);
  }

  .loader-inner { background: var(--surface); }

  .features-section { background: var(--bg2); border-top-color: var(--border); }
  .feature-card { background: var(--surface); border-color: var(--border); }
  .feature-card:hover { border-color: var(--blue-300); box-shadow: 0 4px 24px rgba(59,130,246,0.12); }

  /* Footer : fond encore plus sombre pour contraste max */
  .site-footer { background: #020617; }
  .footer-desc { color: #94a3b8; }   /* 7.1:1 sur #020617 ✓ */
  .footer-links a { color: #94a3b8; }
  .footer-links a:hover { color: #f1f5f9; }
  .footer-bottom { color: #94a3b8; border-top-color: #1e293b; }
  .footer-bottom strong { color: #cbd5e1; }
  .footer-brand { color: #f1f5f9; }
  .footer-brand strong { color: #f1f5f9; }

  .ns-item { background: var(--surface2); border-color: var(--border); color: var(--text); }
  code { background: var(--surface2); border-color: var(--border); color: var(--text); }

  .filter-btn { background: var(--surface2); color: var(--muted); border-color: var(--border); }
  .filter-btn:hover { border-color: var(--accent); color: var(--text); }
  .filter-btn.active-all { background: #1e3a8a; color: #93c5fd; border-color: var(--blue-600); }

  .header-nav a:hover { background: var(--surface2); }
  .header-nav-cta { background: var(--blue-600) !important; color: #fff !important; }
  .header-nav-cta:hover { background: var(--blue-700) !important; }

  /* Textes bleus sur fonds sombres : blue-600 (#3b82f6) donne 3.98:1 sur surface,
     on surcharge avec --blue-text (#60a5fa) = 5.75:1 sur surface ✓ */
  .section-sep,
  .card-title,
  .score-summary-title,
  .hero-eyebrow,
  .site-counter strong {
    color: var(--blue-text);
  }
  .hero-title-accent { color: var(--blue-text); }
  .hero-eyebrow { border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.08); }
  .hero-title-accent::after { background: linear-gradient(90deg, var(--blue-text), #93c5fd); }
  .section-sep::after { background: var(--border); }
}
