:root {
  --bg: #07090c;
  --bg-soft: #0b0e13;
  --sidebar: #080b10;
  --panel: #0f1319;
  --panel-2: #12171e;
  --panel-3: #0b0f14;
  --border: #202732;
  --border-soft: #171d25;
  --text: #f6f7f9;
  --muted: #8b94a3;
  --muted-2: #657080;
  --orange: #ff7417;
  --orange-2: #ff9552;
  --orange-soft: rgba(255, 116, 23, .12);
  --green: #46d890;
  --red: #ff6b73;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }

/* V5.2.1 — garantir que l’attribut HTML hidden reste prioritaire sur les styles de boutons/cartes */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; color-scheme: dark; width: 100%; max-width: 100%; overflow-x: hidden; }
body { width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 45% -10%, rgba(57, 76, 104, .14), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(255, 116, 23, .07), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { width: 100%; max-width: 100%; min-height: 100vh; display: grid; grid-template-columns: 214px minmax(0, 1fr); column-gap: 0; overflow-x: clip; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 214px;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 22px;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(12, 16, 22, .98), rgba(6, 9, 13, .98));
}
.brand { display: flex; align-items: center; gap: 11px; padding: 5px 8px 20px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--orange-2), var(--orange));
  color: white; box-shadow: 0 12px 26px rgba(255,116,23,.22);
}
.brand-mark svg { width: 22px; height: 22px; fill: white; stroke: none; }
.brand-copy strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10px; }

.side-nav { display: grid; gap: 8px; margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 12px; color: #9aa3b1; text-decoration: none;
  font-size: 12px; font-weight: 680; transition: .18s ease;
}
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { color: #e7e9ee; background: rgba(255,255,255,.025); }
.nav-item.active { color: #fff; border-color: rgba(255,116,23,.18); background: linear-gradient(90deg, rgba(255,116,23,.14), rgba(255,255,255,.025)); }
.nav-item.active svg { color: var(--orange); }

.sidebar-note {
  margin-top: auto; padding: 18px 16px; border: 1px solid var(--border); border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,116,23,.025));
}
.sidebar-note .mini-icon { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 11px; border-radius: 9px; color: var(--orange); background: var(--orange-soft); }
.sidebar-note strong { display: block; font-size: 12px; }
.sidebar-note p { margin: 7px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.sidebar-note a { color: var(--orange-2); font-size: 10px; font-weight: 750; text-decoration: none; }

.workspace { grid-column: 2; width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
.topbar {
  position: sticky; top: 0; z-index: 24; height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 28px; border-bottom: 1px solid rgba(255,255,255,.055); background: rgba(7, 9, 12, .78); backdrop-filter: blur(18px);
}
.top-search {
  width: min(640px, 65vw); min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 12px; background: #0d1117; color: var(--muted); cursor: pointer; text-align: left;
}
.top-search svg { width: 16px; height: 16px; }
.top-search span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
kbd { padding: 4px 7px; border: 1px solid #242c37; border-radius: 7px; background: #151a21; color: #7e8795; font: inherit; font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.quiet-link { color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; }
.quiet-link:hover { color: white; }

.content { width: min(1560px, calc(100% - 52px)); max-width: calc(100% - 52px); min-width: 0; margin: 28px auto 56px; display: grid; gap: 18px; }
.panel {
  border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.015), transparent), var(--panel); box-shadow: var(--shadow);
}

main, section, article, aside, .panel, .hero-copy, .hero-visual, .dashboard-grid, .dashboard-grid > *, .metrics > *, .telemetry > * { min-width: 0; max-width: 100%; }

.metrics + .telemetry { margin-top: -4px; }

.hero-card { position: relative; min-height: 382px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .68fr); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; padding: 42px 44px 38px; }
.eyebrow { color: var(--orange); font-size: 9px; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.hero-copy > h1 { margin: 9px 0 0; color: #cfd4dc; font-size: 13px; font-weight: 730; letter-spacing: -.01em; }
.hero-title { max-width: 780px; margin: 10px 0 16px; font-size: clamp(36px, 4vw, 58px); line-height: 1.01; letter-spacing: -.045em; }
.hero-title span { color: var(--orange-2); }
.hero-copy > p { max-width: 760px; margin: 0; color: #a5adba; font-size: 14px; line-height: 1.75; }

.hero-visual { position: relative; min-height: 100%; border-left: 1px solid rgba(255,255,255,.04); background: radial-gradient(circle at 55% 45%, rgba(255,116,23,.24), transparent 28%), linear-gradient(145deg, rgba(255,116,23,.05), transparent 55%); }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--panel), transparent 30%); pointer-events: none; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,145,78,.14); border-radius: 50%; transform: rotate(-18deg); }
.orbit-one { width: 290px; height: 150px; right: 24px; top: 88px; }
.orbit-two { width: 230px; height: 115px; right: 53px; top: 107px; }
.yt-cube {
  position: absolute; z-index: 2; right: 78px; top: 84px; width: 142px; height: 142px; border-radius: 36px; transform: rotate(-12deg);
  background: linear-gradient(145deg, #ffb275 0%, #ff7430 35%, #8d3514 100%); box-shadow: 0 34px 75px rgba(255, 90, 19, .28), inset 0 1px rgba(255,255,255,.55);
}
.yt-cube::before { content: ""; position: absolute; inset: 9px; border-radius: 30px; background: linear-gradient(145deg, #401a10, #130d0b 68%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.yt-cube-inner { position: absolute; z-index: 2; inset: 35px; display: grid; place-items: center; border-radius: 21px; background: linear-gradient(145deg, #ff9a58, #f25118); box-shadow: 0 10px 30px rgba(255, 84, 20, .35); }
.yt-cube-inner span { width: 0; height: 0; border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-left: 22px solid white; margin-left: 5px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.visual-label { position: absolute; z-index: 3; right: 28px; bottom: 26px; width: 180px; color: #cdd2da; font-size: 10px; line-height: 1.45; text-align: right; }
.visual-label span { display: inline-block; width: 28px; height: 1px; margin: 0 8px 3px 0; background: var(--orange); }

.discover-form { margin-top: 28px; }
.search-main-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(128px, 146px) minmax(188px, auto); gap: 12px; min-width: 0; }
.search-field, .filter-search { display: flex; align-items: center; gap: 10px; border: 1px solid #2b333e; background: #0a0e13; }
.search-field { min-height: 54px; padding: 0 16px; border-radius: 15px; }
.search-field svg, .filter-search svg { flex: 0 0 auto; width: 16px; height: 16px; color: #8791a0; }
.search-field input, .filter-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: white; }
input::placeholder { color: #5e6876; }
select, input { color: var(--text); }
select {
  width: 100%; border: 1px solid #2b333e; border-radius: 13px; outline: 0; background: #0a0e13; padding: 12px 13px; font-size: 11px;
}
select:focus, .search-field:focus-within, .filter-search:focus-within { border-color: rgba(255,116,23,.58); box-shadow: 0 0 0 3px rgba(255,116,23,.08); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent; cursor: pointer; text-decoration: none; font-weight: 790; font-size: 11px; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #160c05; background: linear-gradient(135deg, #ff9654, #ff6b0f); box-shadow: 0 10px 26px rgba(255,116,23,.18); }
.button.secondary { color: #d8dce3; background: #10151b; border-color: #29313c; }
.button.compact { min-height: 36px; padding: 0 12px; }
.button.small { min-height: 36px; padding: 0 12px; font-size: 10px; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

.quick-queries { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-queries > span { margin-right: 2px; color: var(--muted-2); font-size: 9px; }
.quick-queries button { padding: 4px 8px; border: 1px solid #242b35; border-radius: 999px; background: #10151b; color: #9ca5b2; font-size: 9px; cursor: pointer; }
.quick-queries button:hover { color: white; border-color: #3a4654; }

.search-options-row { display: grid; grid-template-columns: minmax(150px, 180px) minmax(140px, 165px) minmax(140px, 165px) minmax(140px, 165px) minmax(190px, 1fr); gap: 12px; margin-top: 18px; }
.option-group { min-width: 0; padding: 12px 13px; border: 1px solid #202731; border-radius: 14px; background: rgba(7,10,14,.62); }
.option-label { display: block; margin-bottom: 8px; color: #697381; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.option-group select { padding: 8px 9px; border-radius: 9px; font-size: 10px; }
.mode-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 5px; border-radius: 11px; background: #070a0e; border: 1px solid #1e252e; }
.mode-btn { border: 0; border-radius: 8px; padding: 9px 10px; background: transparent; color: #697381; font-size: 9px; font-weight: 780; cursor: pointer; }
.mode-btn.active { color: #1a0c04; background: linear-gradient(135deg, #ff995c, #ff7417); }
.deep-hint { display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; border: 1px solid rgba(255,116,23,.18); border-radius: 14px; background: linear-gradient(135deg, rgba(255,116,23,.07), rgba(255,116,23,.015)); }
.deep-hint strong { font-size: 10px; }
.deep-hint span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.metric-card { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,.018), rgba(255,116,23,.012)), var(--panel); }
.metric-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--orange); background: var(--orange-soft); font-size: 15px; }
.metric-card strong { display: block; font-size: 22px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }

.telemetry { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; }
.telemetry > div { padding: 13px 14px; border: 1px solid var(--border-soft); border-radius: 14px; background: #0a0e13; }
.telemetry strong { display: block; font-size: 15px; }
.telemetry span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(260px, .62fr); gap: 18px; align-items: start; width: 100%; max-width: 100%; }
.discovery-panel, .domains-panel, .links-panel, .exports-panel { padding: 24px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head.compact { align-items: center; }
h2 { margin: 5px 0 0; font-size: 19px; letter-spacing: -.025em; }
.muted { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.text-link { color: var(--orange-2); text-decoration: none; font-size: 9px; font-weight: 760; }

.result-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sort-control { display: flex; flex-direction: column; gap: 5px; }
.sort-control > span { color: var(--muted-2); font-size: 8px; font-weight: 820; text-transform: uppercase; letter-spacing: .1em; }
.sort-control select { width: 128px; padding: 9px 10px; }
.bulk-actions { display: flex; gap: 10px; }
.bulk-actions select { width: 155px; padding: 9px 10px; }

.bulk-progress { margin: 0 0 16px; padding: 14px 15px; border: 1px solid #232b35; border-radius: 13px; background: #0a0e13; }
.bulk-progress-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.bulk-progress-top strong { color: #e3e7ed; }
.progress-track { height: 5px; border-radius: 99px; overflow: hidden; background: #1b222b; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff5d0a, #ff9b57); transition: width .25s ease; }

.channel-table-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 0 12px 8px; color: #5f6978; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.channel-list { display: grid; gap: 10px; }
.channel-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 15px; border: 1px solid #1f2730; border-radius: 16px; background: #0a0e13; transition: .16s ease; }
.channel-card:hover { transform: translateY(-1px); border-color: #303b48; background: #0c1117; }
.avatar { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; background: #151b22; }
.channel-info { min-width: 0; }
.channel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 820; }
.channel-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-top: 7px; color: #7f8997; font-size: 9px; }
.channel-meta strong { color: #c2c9d3; }
.channel-meta a { color: #8e98a6; }
.channel-meta a:hover { color: var(--orange-2); }
.fr-badge, .cache-badge, .discover-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 999px; font-size: 8px; font-weight: 760; line-height: 1.4; }
.fr-badge { color: #91e8b9; border: 1px solid rgba(70,216,144,.18); background: rgba(70,216,144,.08); }
.cache-badge { color: #bcb3ff; border: 1px solid rgba(139,120,255,.16); background: rgba(139,120,255,.08); }
.discover-badge { color: #8f98a6; border: 1px solid #252e38; background: #11161d; }
.channel-actions { display: flex; align-items: center; gap: 7px; }
.scan-select { width: 92px; padding: 8px; border-radius: 9px; font-size: 9px; }

.domain-list { display: grid; gap: 6px; }
.domain-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #1c232c; }
.domain-row:last-child { border-bottom: 0; }
.domain-rank { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #798391; background: #151b22; font-size: 9px; font-weight: 850; }
.domain-row:nth-child(-n+3) .domain-rank { color: var(--orange); background: var(--orange-soft); }
.domain-name { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: #dce1e8; text-align: left; cursor: pointer; font: inherit; font-size: 10px; font-weight: 780; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-name:hover { color: var(--orange-2); }
.domain-sub { margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.domain-count { color: #aab2be; font-size: 9px; font-weight: 800; }

.links-panel { margin-top: 0; scroll-margin-top: 88px; }
.links-head { align-items: flex-end; }
.filters { display: grid; grid-template-columns: minmax(260px, 380px) 126px 156px; gap: 10px; }
.filter-search { min-height: 44px; padding: 0 13px; border-radius: 12px; }
.filter-search input { font-size: 10px; }
.filters select { padding: 9px 10px; border-radius: 10px; font-size: 10px; }
.table-wrap { overflow: auto; border: 1px solid #1f2730; border-radius: 14px; background: #090d12; }
table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 9px; }
th { position: sticky; top: 0; z-index: 2; padding: 13px 14px; background: #0c1117; color: #687383; text-align: left; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
td { max-width: 290px; padding: 13px 14px; border-top: 1px solid #1c232c; color: #aeb6c1; vertical-align: middle; }
tbody tr:hover td { background: rgba(255,255,255,.012); }
td a { color: #dfe3e9; text-decoration: none; }
td a:hover { color: var(--orange-2); }
.truncate { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.views-cell { color: #dce1e8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.views-cell strong { color: #f4f6f8; }
.date-cell { color: #9aa3af; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; padding: 3px 6px; border-radius: 7px; background: #151b22; color: #9ca5b2; font-size: 7px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.badge.high { color: #ff9c5f; background: rgba(255,116,23,.1); }
.badge.possible { color: #ffd06a; background: rgba(255,208,106,.08); }
.badge.low { color: #7de0aa; background: rgba(70,216,144,.08); }
.empty-state, .empty-cell { padding: 42px 16px; color: #626d7b; font-size: 10px; text-align: center; }

.exports-panel { margin-top: 0; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.export-card { min-width: 0; min-height: 88px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px; border: 1px solid #222a34; border-radius: 15px; background: #0a0e13; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
button.export-card { width: 100%; font: inherit; }
.export-card:hover:not(:disabled) { border-color: #35404e; transform: translateY(-1px); }
.export-card:disabled { opacity: .45; cursor: not-allowed; }
.export-card.featured { border-color: rgba(255,116,23,.24); background: linear-gradient(135deg, rgba(255,116,23,.075), #0a0e13); }
.export-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--orange-2); background: var(--orange-soft); font-size: 9px; font-weight: 900; }
.export-card strong { display: block; font-size: 10px; }
.export-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.export-card b { color: #77818f; font-size: 14px; }

.footer { display: flex; justify-content: space-between; gap: 18px; padding: 8px 2px 0; color: #56606e; font-size: 8px; }
.toast { position: fixed; z-index: 80; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 11px 13px; border: 1px solid #313a46; border-radius: 11px; background: #11171e; box-shadow: 0 18px 60px rgba(0,0,0,.48); color: #dde2e8; font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,107,115,.4); color: #ffb5ba; }
.loading::after { content: ""; width: 11px; height: 11px; border: 2px solid rgba(0,0,0,.24); border-top-color: #17100a; border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { width: 76px; padding-inline: 10px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand-copy, .nav-item span, .sidebar-note { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item svg { width: 18px; height: 18px; }
  .content { width: min(100% - 32px, 1540px); }
  .hero-card { grid-template-columns: 1fr 290px; }
  .search-options-row { grid-template-columns: repeat(3, 1fr); }
  .deep-hint { grid-column: 1 / -1; }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: 58px; flex-direction: row; align-items: center; padding: 7px 10px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .brand { padding: 0; margin-right: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .side-nav { display: flex; flex: 1; overflow-x: auto; gap: 3px; }
  .nav-item { min-width: 38px; min-height: 38px; }
  .workspace { min-width: 0; }
  .topbar { top: 58px; height: 60px; padding: 0 12px; }
  .top-search { width: 100%; }
  .topbar-actions { display: none; }
  .content { width: min(100% - 24px, 1540px); margin-top: 16px; gap: 14px; }
  .hero-card { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 30px 22px 26px; }
  .hero-visual { min-height: 230px; border-left: 0; border-top: 1px solid rgba(255,255,255,.04); }
  .yt-cube { right: 50%; transform: translateX(50%) rotate(-12deg); top: 34px; width: 120px; height: 120px; }
  .visual-label { right: 20px; bottom: 18px; }
  .search-main-row, .search-options-row { grid-template-columns: 1fr; }
  .quick-queries { margin-bottom: 2px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .domains-panel { order: -1; }
  .section-head, .links-head { align-items: stretch; flex-direction: column; }
  .result-actions, .bulk-actions { width: 100%; }
  .sort-control, .sort-control select, .bulk-actions select, .bulk-actions .button { flex: 1; width: auto; }
  .filters { width: 100%; grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .top-search kbd { display: none; }
  .hero-title { font-size: 34px; }
  .hero-copy > p { font-size: 12px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 74px; padding: 12px; }
  .metric-icon { width: 34px; height: 34px; }
  .metric-card strong { font-size: 19px; }
  .discovery-panel, .domains-panel, .links-panel, .exports-panel { padding: 18px; }
  .channel-card { grid-template-columns: 42px minmax(0, 1fr); }
  .avatar { width: 42px; height: 42px; }
  .channel-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .channel-table-head { display: none; }
  .bulk-actions { display: grid; grid-template-columns: 1fr; }
  .export-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}

/* V4.1 — filtres avancés, pagination compacte et export post-scan */
.search-options-row {
  grid-template-columns: 160px 145px 145px 140px minmax(220px, 1fr);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 4px 2px;
}
.pagination[hidden] { display: none; }
.pagination-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #28313c;
  border-radius: 9px;
  background: #0c1117;
  color: #c8d0da;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
  transition: .16s ease;
}
.pagination-btn:hover:not(:disabled) { border-color: rgba(255,116,23,.55); color: #fff; }
.pagination-btn:disabled { opacity: .35; cursor: not-allowed; }
.pagination-info { min-width: 150px; color: #7f8997; text-align: center; font-size: 9px; font-weight: 700; }

body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3,5,8,.74);
  backdrop-filter: blur(10px);
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: min(480px, 100%);
  padding: 26px;
  border: 1px solid rgba(255,116,23,.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255,116,23,.16), transparent 220px),
    #10151c;
  box-shadow: 0 30px 90px rgba(0,0,0,.58);
}
.modal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(89,222,155,.2);
  border-radius: 12px;
  background: rgba(89,222,155,.08);
  color: #71e5ad;
  font-size: 19px;
  font-weight: 900;
}
.modal-card h2 { margin: 7px 0 8px; font-size: 21px; letter-spacing: -.03em; }
.modal-card p { margin: 0; color: #929dab; font-size: 11px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

@media (max-width: 1180px) {
  .search-options-row { grid-template-columns: repeat(4, 1fr); }
  .deep-hint { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .search-options-row { grid-template-columns: 1fr 1fr; }
  .deep-hint { grid-column: 1 / -1; }
  .pagination { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .search-options-row { grid-template-columns: 1fr; }
  .deep-hint { grid-column: auto; }
  .modal-card { padding: 21px; }
  .modal-actions { display: grid; grid-template-columns: 1fr; }
  .modal-actions .button { width: 100%; }
}


/* V4.3 — polish visuel : plus compact, plus premium, sans changer les workflows */
:root {
  --shadow: 0 22px 70px rgba(0, 0, 0, .30);
}

.sidebar {
  width: 204px;
  padding: 20px 13px 16px;
}
.app-shell { grid-template-columns: 204px minmax(0, 1fr); }
.topbar { height: 66px; padding: 0 22px; }
.top-search { width: min(700px, 68vw); min-height: 42px; border-radius: 13px; background: rgba(14, 19, 26, .88); }
.content { width: min(1500px, calc(100% - 34px)); margin: 18px auto 44px; }

.panel {
  border-color: #242d38;
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 38%),
    var(--panel);
}

.hero-card {
  min-height: 338px;
  grid-template-columns: minmax(0, 1.72fr) minmax(270px, .56fr);
  border-color: #29323d;
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 8%, rgba(255,116,23,.75) 38%, rgba(255,116,23,.2) 70%, transparent 94%);
  pointer-events: none;
}
.hero-copy { padding: 30px 34px 27px; }
.hero-copy > h1 { margin-top: 8px; font-size: 12px; }
.hero-title { max-width: 800px; margin: 6px 0 11px; font-size: clamp(32px, 3.65vw, 54px); line-height: 1.01; letter-spacing: -.047em; }
.hero-copy > p { max-width: 790px; color: #9fa8b5; font-size: 12px; line-height: 1.62; }
.hero-visual { background: radial-gradient(circle at 52% 43%, rgba(255,116,23,.22), transparent 27%), linear-gradient(145deg, rgba(255,116,23,.045), transparent 56%); }
.yt-cube { right: 66px; top: 77px; width: 132px; height: 132px; border-radius: 33px; }
.yt-cube::before { border-radius: 27px; }
.yt-cube-inner { inset: 33px; border-radius: 19px; }
.orbit-one { width: 270px; height: 138px; right: 17px; top: 83px; }
.orbit-two { width: 214px; height: 106px; right: 44px; top: 101px; }
.visual-label { right: 24px; bottom: 22px; width: 170px; color: #aeb6c2; font-size: 9px; }

.discover-form { margin-top: 18px; }
.search-main-row { grid-template-columns: minmax(0, 1fr) 132px 180px; gap: 7px; }
.search-field { min-height: 46px; }
#discoverBtn { min-height: 46px; border-radius: 12px; }
.quick-queries { margin-top: 8px; }
.search-options-row { gap: 7px; margin-top: 10px; }
.option-group { padding: 8px 9px; border-color: #242c36; background: rgba(7,10,14,.72); }
.deep-hint { min-height: 58px; padding: 8px 11px; }

.metrics { gap: 9px; margin: 10px 0; }
.metric-card {
  min-height: 78px;
  padding: 13px 14px;
  border-color: #232c37;
  background: linear-gradient(145deg, rgba(255,255,255,.024), rgba(255,116,23,.014)), #0e1319;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.metric-card:hover { transform: translateY(-1px); border-color: #354151; background: linear-gradient(145deg, rgba(255,255,255,.03), rgba(255,116,23,.025)), #10161d; }
.metric-icon { width: 36px; height: 36px; border-radius: 11px; }
.metric-card strong { font-size: 21px; }

.telemetry { gap: 7px; margin-bottom: 10px; }
.telemetry > div { padding: 9px 11px; border-radius: 11px; }
.dashboard-grid { gap: 10px; }
.discovery-panel, .domains-panel, .links-panel, .exports-panel { padding: 18px; }
.section-head { margin-bottom: 12px; }
.channel-card { padding: 9px 10px; border-color: #222b35; }
.channel-card:hover { border-color: #3a4654; box-shadow: 0 10px 26px rgba(0,0,0,.14); }

.links-panel, .exports-panel { margin-top: 10px; }
.table-wrap { border-color: #242d38; }
th { background: #0d1218; }

.exports-panel {
  background: linear-gradient(180deg, rgba(255,116,23,.018), transparent 50%), var(--panel);
}
.export-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.export-card { min-height: 72px; border-color: #26303b; background: #0b1016; }
.export-card:hover:not(:disabled) { border-color: rgba(255,116,23,.38); background: #0d131a; }

.footer { padding-top: 16px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { width: 76px; }
  .hero-card { grid-template-columns: 1fr 245px; }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .sidebar { width: 100%; }
  .hero-card { grid-template-columns: 1fr; }
  .search-main-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .export-grid { grid-template-columns: 1fr; }
}


/* V4.4 — densité premium, hero plus court et liste chaînes en vrai tableau SaaS */
:root {
  --radius: 16px;
}

/* Sidebar / topbar */
.sidebar {
  width: 194px;
  padding: 17px 12px 14px;
}
.app-shell { grid-template-columns: 194px minmax(0, 1fr); }
.brand { padding: 4px 8px 16px; }
.brand-copy strong { font-size: 14px; }
.brand-copy small { display: none !important; }
.side-nav { gap: 4px; }
.nav-item { min-height: 39px; border-radius: 11px; font-size: 11px; }
.sidebar-note { padding: 12px; border-radius: 13px; }

.topbar { height: 60px; padding: 0 20px; }
.top-search { min-height: 39px; border-radius: 12px; }
.topbar .button.secondary:hover {
  color: #fff;
  border-color: rgba(255,116,23,.48);
  background: rgba(255,116,23,.075);
  box-shadow: 0 0 0 3px rgba(255,116,23,.045);
}
.content { width: min(1480px, calc(100% - 30px)); margin: 14px auto 38px; }

/* Hero : moins haut, plus d'information visible au premier écran */
.hero-card {
  min-height: 292px;
  grid-template-columns: minmax(0, 1fr) 225px;
  border-radius: 17px;
}
.hero-copy { padding: 24px 30px 22px; }
.hero-copy > h1 { margin-top: 6px; font-size: 11px; }
.hero-title {
  max-width: 760px;
  margin: 5px 0 9px;
  font-size: clamp(30px, 3.15vw, 46px);
  line-height: 1.015;
  letter-spacing: -.043em;
}
.hero-copy > p { max-width: 760px; font-size: 11px; line-height: 1.55; }
.hero-visual {
  min-width: 0;
  background: radial-gradient(circle at 52% 43%, rgba(255,116,23,.21), transparent 27%), linear-gradient(145deg, rgba(255,116,23,.035), transparent 58%);
}
.yt-cube { right: 47px; top: 67px; width: 116px; height: 116px; border-radius: 29px; }
.yt-cube::before { inset: 8px; border-radius: 24px; }
.yt-cube-inner { inset: 29px; border-radius: 17px; }
.yt-cube-inner span { border-top-width: 12px; border-bottom-width: 12px; border-left-width: 19px; }
.orbit-one { width: 225px; height: 118px; right: 0; top: 71px; }
.orbit-two { width: 177px; height: 90px; right: 24px; top: 85px; }
.visual-label { display: none !important; }

/* Recherche et filtres : bloc plus compact et plus lié visuellement */
.discover-form { margin-top: 14px; }
.search-main-row { grid-template-columns: minmax(0, 1fr) 124px 174px; gap: 6px; }
.search-field, #discoverBtn { min-height: 43px; }
.quick-queries { margin-top: 6px; gap: 5px; }
.quick-queries button { padding: 3px 7px; }
.search-options-row {
  grid-template-columns: 150px 132px 132px 128px minmax(190px, 1fr);
  gap: 6px;
  margin-top: 7px;
}
.option-group { padding: 7px 8px; border-radius: 10px; }
.option-label { margin-bottom: 5px; font-size: 7.5px; }
.option-group select { padding: 7px 8px; }
.mode-btn { padding: 6px 7px; }
.deep-hint { min-height: 50px; padding: 7px 10px; border-radius: 10px; }
.deep-hint strong { font-size: 9px; }
.deep-hint span { margin-top: 3px; font-size: 8px; }

/* Stats moins hautes */
.metrics { gap: 8px; margin: 8px 0; }
.metric-card { min-height: 66px; padding: 10px 12px; border-radius: 13px; }
.metric-icon { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.metric-card strong { font-size: 19px; }
.metric-card small { margin-top: 4px; font-size: 8px; }
.telemetry { gap: 6px; margin-bottom: 8px; }
.telemetry > div { padding: 7px 10px; border-radius: 10px; }
.telemetry strong { font-size: 14px; }

/* Discovery : vrai tableau compact */
.discovery-panel, .domains-panel, .links-panel, .exports-panel { padding: 16px; }
.section-head { margin-bottom: 10px; }
.discovery-head { align-items: center; }
.channel-table-head {
  display: grid;
  grid-template-columns: minmax(250px, 1.6fr) 86px 72px 116px 188px;
  align-items: center;
  gap: 10px;
  padding: 0 10px 6px;
  color: #606b79;
  font-size: 7px;
  letter-spacing: .1em;
}
.channel-list { gap: 4px; }
.channel-card {
  display: grid;
  grid-template-columns: minmax(250px, 1.6fr) 86px 72px 116px 188px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 7px 9px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(255,255,255,.009), transparent 42%), #090d12;
}
.channel-card:hover { transform: none; background: #0b1016; }
.channel-primary { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 9px; }
.avatar { width: 38px; height: 38px; border-radius: 10px; }
.channel-info { min-width: 0; }
.channel-name-row { min-width: 0; display: flex; align-items: center; gap: 7px; }
.channel-name { min-width: 0; font-size: 10.5px; }
.channel-open { flex: 0 0 auto; color: #697482; text-decoration: none; font-size: 11px; }
.channel-open:hover { color: var(--orange-2); }
.channel-source-meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; min-width: 0; }
.channel-stat { min-width: 0; }
.channel-stat strong { display: block; color: #dce2ea; font-size: 10px; font-variant-numeric: tabular-nums; }
.channel-stat span { display: none; color: #687382; font-size: 7px; }
.channel-score { min-width: 0; }
.fr-badge, .cache-badge, .discover-badge { font-size: 7px; }
.discover-badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-actions { justify-content: flex-end; gap: 6px; }
.scan-select { width: 86px; padding: 7px 7px; font-size: 8px; }
.channel-actions .button.small { min-height: 32px; padding: 0 11px; font-size: 9px; }

.dashboard-grid { gap: 8px; }
.links-panel, .exports-panel { margin-top: 8px; }
.footer { padding-top: 13px; }

@media (max-width: 1260px) {
  .hero-card { grid-template-columns: minmax(0, 1fr) 205px; }
  .search-options-row { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .deep-hint { grid-column: 1 / -1; }
  .channel-table-head,
  .channel-card { grid-template-columns: minmax(230px, 1.5fr) 76px 66px 106px 178px; }
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { width: 72px; }
  .hero-card { grid-template-columns: minmax(0, 1fr) 195px; }
  .channel-table-head,
  .channel-card { grid-template-columns: minmax(210px, 1.45fr) 72px 64px 100px 168px; gap: 7px; }
}

@media (max-width: 920px) {
  .sidebar { width: 100%; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-copy { padding: 22px 18px 18px; }
  .hero-visual { min-height: 170px; }
  .yt-cube { right: 50%; transform: translateX(50%) rotate(-12deg); top: 26px; width: 105px; height: 105px; }
  .search-main-row { grid-template-columns: 1fr; }
  .search-options-row { grid-template-columns: 1fr 1fr; }
  .channel-table-head { display: none; }
  .channel-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 9px;
  }
  .channel-primary { grid-column: 1 / -1; }
  .channel-stat, .channel-score { display: inline-flex; align-items: center; gap: 4px; }
  .channel-stat span { display: inline; }
  .channel-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 620px) {
  .hero-title { font-size: 31px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .search-options-row { grid-template-columns: 1fr; }
  .channel-card { grid-template-columns: 1fr; }
  .channel-stat, .channel-score, .channel-actions { grid-column: 1; }
  .channel-actions { justify-content: stretch; }
  .channel-actions .scan-select, .channel-actions .button { flex: 1; width: auto; }
}

/* V4.6 — anti-overflow + mobile header on one line */
.search-main-row > *, .search-options-row > *, .result-actions > *, .bulk-actions > *, .filters > * { min-width: 0; }
.hero-card, .metrics, .telemetry, .dashboard-grid, .links-panel, .exports-panel { width: 100%; max-width: 100%; }
.table-wrap { max-width: 100%; }

@media (max-width: 1380px) and (min-width: 921px) {
  .content { width: min(100% - 36px, 1480px); max-width: calc(100% - 36px); }
  .hero-card { grid-template-columns: minmax(0, 1fr) 250px; }
  .hero-copy { padding: 36px 34px 34px; }
  .hero-title { font-size: clamp(34px, 4vw, 52px); }
  .search-options-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deep-hint { grid-column: 1 / -1; min-height: 66px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(245px, .55fr); }
}

@media (max-width: 920px) {
  html, body { overflow-x: hidden; }
  .app-shell { display: block; width: 100%; max-width: 100%; overflow-x: hidden; }

  /* Le menu compact et la recherche partagent exactement la même ligne. */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: auto;
    z-index: 35;
    width: 176px;
    height: 58px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 8px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(8, 11, 16, .96);
    backdrop-filter: blur(18px);
    overflow: hidden;
  }
  .brand { flex: 0 0 auto; padding: 0; margin: 0 4px 0 0; gap: 0; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand-copy { display: none; }
  .side-nav { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; margin: 0; overflow: hidden; }
  .nav-item { flex: 0 0 30px; width: 30px; min-width: 30px; min-height: 36px; height: 36px; justify-content: center; padding: 0; border-radius: 9px; }
  .nav-item span { display: none; }
  .nav-item svg { width: 16px; height: 16px; }
  .side-nav .nav-item:nth-child(5) { display: none; }
  .sidebar-note { display: none; }

  .workspace { width: 100%; max-width: 100%; overflow-x: hidden; }
  .topbar {
    position: fixed;
    top: 0; left: 176px; right: 0;
    z-index: 34;
    width: auto;
    height: 58px;
    padding: 8px 10px 8px 4px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(7, 9, 12, .96);
    backdrop-filter: blur(18px);
  }
  .top-search { width: 100%; max-width: none; min-width: 0; min-height: 40px; padding: 0 10px; border-radius: 11px; }
  .top-search span { min-width: 0; font-size: 10px; }
  .top-search kbd { display: none; }
  .topbar-actions { display: none; }

  .content { width: calc(100% - 20px); max-width: calc(100% - 20px); margin: 74px auto 36px; gap: 14px; overflow-x: hidden; }
  .hero-card { grid-template-columns: 1fr; min-height: 0; width: 100%; }
  .hero-copy { padding: 30px 22px 26px; }
  .hero-visual { min-height: 230px; border-left: 0; border-top: 1px solid rgba(255,255,255,.04); overflow: hidden; }
  .search-main-row, .search-options-row { grid-template-columns: minmax(0, 1fr); }
  .deep-hint { grid-column: auto; }
  .quick-queries { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; scrollbar-width: none; }
  .quick-queries::-webkit-scrollbar { display: none; }
  .quick-queries > * { flex: 0 0 auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .domains-panel { order: -1; }
  .section-head, .links-head { align-items: stretch; flex-direction: column; }
  .result-actions, .bulk-actions { width: 100%; max-width: 100%; }
  .sort-control, .sort-control select, .bulk-actions select, .bulk-actions .button { flex: 1 1 0; width: auto; min-width: 0; }
  .filters { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .export-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .sidebar { width: 154px; }
  .topbar { left: 154px; }
  .side-nav .nav-item:nth-child(4) { display: none; }
  .content { width: calc(100% - 16px); max-width: calc(100% - 16px); }
  .hero-copy { padding: 26px 18px 22px; }
  .hero-title { font-size: 32px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 82px; padding: 13px; }
}

/* V4.7 — responsive mobile stabilisé + header compact */
@media (max-width: 920px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body { min-width: 0; }
  *, *::before, *::after { min-width: 0; }

  .app-shell,
  .workspace,
  .content,
  .hero-card,
  .hero-copy,
  .metrics,
  .telemetry,
  .dashboard-grid,
  .discovery-panel,
  .domains-panel,
  .links-panel,
  .exports-panel {
    max-width: 100%;
  }

  /* Header mobile : navigation + recherche sur UNE seule ligne */
  .sidebar {
    width: 166px;
    height: 56px;
    padding: 7px 6px 7px 8px;
    gap: 4px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .brand-mark svg { width: 19px; height: 19px; }

  .side-nav { gap: 2px; }
  .nav-item {
    flex: 0 0 29px;
    width: 29px;
    min-width: 29px;
    height: 34px;
    min-height: 34px;
    border-radius: 9px;
  }
  .nav-item svg { width: 15px; height: 15px; }
  .side-nav .nav-item:nth-child(5) { display: none; }

  .topbar {
    left: 166px;
    right: 0;
    height: 56px;
    padding: 7px 8px 7px 4px;
    justify-content: flex-start;
  }

  /* Recherche du header volontairement plus courte */
  .top-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    margin-left: auto;
  }
  .top-search svg { width: 15px; height: 15px; }
  .top-search span {
    font-size: 9.5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }

  .content {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 72px auto 34px;
    gap: 14px;
  }

  /* Hero : pas d'illustration décorative sur mobile, priorité à l'outil */
  .hero-card {
    display: block;
    min-height: 0;
    overflow: hidden;
  }
  .hero-copy { padding: 26px 22px 24px; }
  .hero-visual { display: none; }

  .hero-title {
    max-width: 100%;
    font-size: clamp(32px, 7.2vw, 40px);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }
  .hero-copy > p {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.65;
  }

  .discover-form { margin-top: 20px; }
  .search-main-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .search-field {
    width: 100%;
    min-height: 48px;
  }
  .search-field input {
    min-width: 0;
    font-size: 12.5px;
  }
  #maxResults,
  #discoverBtn {
    width: 100%;
    min-height: 46px;
  }

  /* Les exemples ne sont plus coupés sur la droite */
  .quick-queries {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
  }

  /* 2 colonnes sur tablette/mobile large, bien plus compact */
  .search-options-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 13px;
  }
  .option-group {
    width: 100%;
    padding: 10px;
  }
  .deep-hint {
    grid-column: 1 / -1;
    min-height: 58px;
    padding: 11px 13px;
  }

  .metrics,
  .telemetry {
    gap: 10px;
  }
  .metric-card {
    min-width: 0;
    min-height: 78px;
  }

  .dashboard-grid { gap: 14px; }
  .discovery-panel,
  .domains-panel,
  .links-panel,
  .exports-panel { padding: 18px; }

  .section-head,
  .links-head {
    gap: 12px;
  }

  .result-actions,
  .bulk-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .sort-control {
    width: 100%;
  }
  .sort-control select,
  .bulk-actions select,
  .bulk-actions .button {
    width: 100%;
  }

  /* Cartes chaînes : aucune largeur forcée */
  .channel-card {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .channel-primary,
  .channel-stat,
  .channel-score,
  .channel-actions {
    grid-column: 1;
    width: 100%;
  }
  .channel-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .channel-actions .scan-select { width: 100%; }
  .channel-name-row { flex-wrap: wrap; }
  .channel-source-meta { flex-wrap: wrap; }

  /* Le tableau de liens scrolle à l'intérieur, jamais la page entière */
  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .filters { width: 100%; }
  .pagination { max-width: 100%; }
}

@media (max-width: 620px) {
  /* Garde 4 icônes à gauche et colle la recherche à droite */
  .sidebar {
    width: 176px;
    padding: 7px 6px 7px 8px;
  }
  .topbar {
    left: 176px;
    right: 0;
    padding: 7px 8px 7px 4px;
  }
  .side-nav .nav-item:nth-child(4) { display: flex; }
  .side-nav .nav-item:nth-child(5) { display: none; }
  .top-search {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: auto;
  }

  .content {
    width: calc(100% - 18px);
    max-width: calc(100% - 18px);
    margin-top: 68px;
  }
  .hero-copy { padding: 24px 18px 22px; }
  .eyebrow { font-size: 8px; }
  .hero-copy > h1 { font-size: 11px; }
  .hero-title {
    font-size: clamp(30px, 9.2vw, 36px);
    line-height: 1.03;
    margin-bottom: 12px;
  }
  .hero-copy > p { font-size: 11.5px; }

  .quick-queries > span { width: 100%; }

  /* Sur smartphone étroit, une seule colonne évite les champs tassés */
  .search-options-row { grid-template-columns: minmax(0, 1fr); }
  .deep-hint { grid-column: 1; }

  .metrics,
  .telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card {
    min-height: 74px;
    padding: 12px;
    gap: 10px;
  }
  .metric-icon { width: 32px; height: 32px; }
  .metric-card strong { font-size: 18px; }

  .result-actions,
  .bulk-actions { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }

  .channel-actions { grid-template-columns: minmax(0, 1fr); }
  .channel-actions .button,
  .channel-actions .scan-select { width: 100%; }

  .pagination {
    gap: 6px;
    justify-content: space-between;
  }
  .pagination-info {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 420px) {
  .sidebar {
    width: 150px;
    padding-left: 6px;
    gap: 3px;
  }
  .brand { margin-right: 2px; }
  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .brand-mark svg { width: 17px; height: 17px; }
  .topbar {
    left: 150px;
    right: 0;
    padding-right: 6px;
  }
  .nav-item {
    flex: 0 0 26px;
    width: 26px;
    min-width: 26px;
    height: 32px;
    min-height: 32px;
  }
  .side-nav .nav-item:nth-child(3),
  .side-nav .nav-item:nth-child(4) { display: flex; }
  .side-nav .nav-item:nth-child(5) { display: none; }
  .top-search {
    width: 100%;
    max-width: none;
    min-height: 36px;
    padding: 0 9px;
  }
  .top-search span { font-size: 9px; }

  .content {
    width: calc(100% - 14px);
    max-width: calc(100% - 14px);
  }
  .hero-copy { padding: 22px 16px 20px; }
  .hero-title { font-size: 29px; }

  .metrics { gap: 7px; }
  .metric-card { padding: 10px; }
  .metric-icon { display: none; }
  .metric-card strong { font-size: 17px; }

  .discovery-panel,
  .domains-panel,
  .links-panel,
  .exports-panel { padding: 14px; }
}

/* V5 — comptes, crédits et paiement */
.hero-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-account-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 0 10px; border: 1px solid #2b333e; border-radius: 999px;
  background: rgba(10,14,19,.82); color: #b6bec9; font-size: 9px; font-weight: 780; cursor: pointer;
}
.hero-account-button:hover { border-color: rgba(255,116,23,.45); color: #fff; }
.credit-pill {
  min-height: 36px; padding: 0 11px; border: 1px solid rgba(255,116,23,.26); border-radius: 10px;
  background: rgba(255,116,23,.08); color: var(--orange-2); font-size: 10px; font-weight: 820; cursor: pointer;
}
.search-price-note { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; color: #727d8c; font-size: 8px; }
.search-price-note span { color: #9ca5b1; }
.search-price-note strong { color: var(--orange-2); font-size: 9px; }
.search-price-note small { font-size: 8px; }

.modal-card { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid #28313b; border-radius: 9px; background: #0b1016; color: #8993a0; font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: #fff; border-color: #3b4654; }
.account-modal-icon { color: var(--orange-2); border-color: rgba(255,116,23,.2); background: rgba(255,116,23,.08); }
.credit-modal-icon { color: var(--orange-2); border-color: rgba(255,116,23,.2); background: rgba(255,116,23,.08); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 20px 0 14px; padding: 4px; border: 1px solid #242c35; border-radius: 12px; background: #090d12; }
.auth-tab { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: #727d8c; font-size: 10px; font-weight: 780; cursor: pointer; }
.auth-tab.active { background: #161d25; color: #fff; box-shadow: inset 0 0 0 1px #2a3440; }
.auth-form { display: grid; gap: 11px; }
.auth-form label { display: grid; gap: 6px; }
.auth-form label > span { color: #778291; font-size: 8px; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.auth-form input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #2a333e; border-radius: 11px; outline: 0; background: #090d12; color: #fff; font-size: 11px; }
.auth-form input:focus { border-color: rgba(255,116,23,.58); box-shadow: 0 0 0 3px rgba(255,116,23,.08); }
.auth-form .button { width: 100%; margin-top: 3px; }
.form-error { margin-top: 11px !important; padding: 9px 11px; border: 1px solid rgba(255,107,115,.25); border-radius: 9px; background: rgba(255,107,115,.06); color: #ffabb0 !important; }

.purchase-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.purchase-summary > div { padding: 12px; border: 1px solid #262f3a; border-radius: 11px; background: #0a0f15; }
.purchase-summary span { display: block; color: #75808e; font-size: 8px; }
.purchase-summary strong { display: block; margin-top: 5px; font-size: 15px; }
.purchase-protection { margin-top: 10px; padding: 10px 11px; border: 1px solid rgba(70,216,144,.15); border-radius: 10px; background: rgba(70,216,144,.05); color: #8bdcaf; font-size: 9px; line-height: 1.5; }

.account-panel-card { width: min(620px, 100%); }
.account-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-right: 40px; }
.account-header h2 { margin-top: 7px; }
.account-header p { margin-top: 4px; color: #7e8997; }
.account-credit-box { min-width: 90px; padding: 12px 14px; border: 1px solid rgba(255,116,23,.22); border-radius: 13px; background: rgba(255,116,23,.07); text-align: center; }
.account-credit-box strong { display: block; color: var(--orange-2); font-size: 24px; }
.account-credit-box span { display: block; margin-top: 3px; color: #8993a1; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.account-actions { display: flex; gap: 8px; margin-top: 18px; }
.account-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #242c35; }
.account-history-head strong { font-size: 12px; }
.account-history-head span { color: #6f7987; font-size: 8px; }
.account-history { display: grid; gap: 7px; max-height: 320px; margin-top: 10px; overflow: auto; }
.history-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #222b35; border-radius: 11px; background: #0a0f15; }
.history-main { min-width: 0; }
.history-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.history-main span { display: block; margin-top: 3px; color: #727d8b; font-size: 8px; }
.history-count { color: #aab2bd; font-size: 9px; white-space: nowrap; }
.history-open { min-height: 30px; padding: 0 9px; border: 1px solid #2b3541; border-radius: 8px; background: #11171e; color: #dce1e7; font-size: 8px; font-weight: 780; cursor: pointer; }
.history-open:hover { border-color: rgba(255,116,23,.45); color: #fff; }
.history-status { display: inline-flex; margin-left: 5px; padding: 2px 5px; border-radius: 99px; background: #151c24; color: #75808e; font-size: 7px; }
.history-status.completed { color: #7fe0ab; background: rgba(70,216,144,.08); }
.history-status.refunded { color: #ffcf75; background: rgba(255,207,117,.08); }
.history-empty { padding: 24px; color: #687381; text-align: center; font-size: 9px; }

@media (max-width: 920px) {
  .hero-topline { align-items: flex-start; }
  .hero-account-button { min-height: 28px; flex: 0 0 auto; }
}

@media (max-width: 620px) {
  .search-price-note { align-items: flex-start; }
  .search-price-note small { flex-basis: 100%; }
  .account-header { align-items: center; }
  .account-actions { display: grid; grid-template-columns: 1fr; }
  .history-row { grid-template-columns: minmax(0,1fr) auto; }
  .history-count { grid-column: 1; }
  .history-open { grid-column: 2; grid-row: 1 / span 2; }
}


/* V5.2 — compte administrateur */
.admin-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 8px; border: 1px solid rgba(255,116,23,.34); border-radius: 999px;
  color: var(--orange-2); background: rgba(255,116,23,.09);
  font-size: 8px; font-weight: 900; letter-spacing: .09em;
}
.account-title-line { display: flex; align-items: center; gap: 8px; }
.admin-credit-pill {
  border-color: rgba(255,116,23,.36) !important;
  color: var(--orange-2) !important;
  background: linear-gradient(135deg, rgba(255,116,23,.12), rgba(255,116,23,.035)) !important;
}
