/* ══════════════════════════════════════════════════════════════════════════════
   Name Checker — CSS spécifique. Le chrome commun (tokens, header, boutons, .tool-head,
   footer + pilules de retour, toast…) vient de ../shared/innospira-ui.css, lié AVANT ce
   fichier — y compris le « footer collé en bas » (body en colonne flex).
   Ne redéfinir ici QUE ce qui est propre à l'outil.
   ══════════════════════════════════════════════════════════════════════════════ */

.layout {
  max-width: 1080px;
  width: 100%;
  margin: 22px auto 40px;
  padding: 0 24px;
}

/* ═══ Barre de recherche ══════════════════════════════════════════════════════ */
.search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
}
.search__input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  font-size: 17px;
  color: var(--text);
  background: var(--panel);
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search__input::placeholder { color: var(--muted-2); }
.search__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}
.search__btn { flex-shrink: 0; min-width: 120px; }
.search__hint {
  text-align: center;
  margin: 12px auto 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.search__hint a { color: var(--brand-strong); text-decoration: none; font-weight: 700; }
.search__hint a:hover { text-decoration: underline; }

/* ═══ Résultats ═══════════════════════════════════════════════════════════════ */
.results { margin-top: 34px; scroll-margin-top: 20px; }

/* Bandeau récap + score */
.summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 20px;
  background: var(--brand-wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.summary__id { min-width: 0; }
.summary__label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.summary__name {
  display: block;
  font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -.02em; color: var(--text); line-height: 1.1; word-break: break-all;
}
.summary__sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* Note globale (pastille) — couleur selon le niveau */
.summary__badge {
  display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px;
  padding: 12px 20px; border-radius: var(--radius); flex-shrink: 0;
  background: var(--panel); border: 1.5px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.summary__score { grid-row: 1; font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--muted); }
.summary__out   { grid-row: 1; font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.summary__grade { grid-column: 1 / -1; grid-row: 2; font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.summary__badge.is-excellent { border-color: var(--ok); }
.summary__badge.is-excellent .summary__score, .summary__badge.is-excellent .summary__grade { color: var(--ok); }
.summary__badge.is-good { border-color: var(--brand); }
.summary__badge.is-good .summary__score, .summary__badge.is-good .summary__grade { color: var(--brand-strong); }
.summary__badge.is-mid  { border-color: var(--line-2); }
.summary__badge.is-mid  .summary__score, .summary__badge.is-mid  .summary__grade { color: var(--muted); }
.summary__badge.is-low  { border-color: var(--danger); }
.summary__badge.is-low  .summary__score, .summary__badge.is-low  .summary__grade { color: var(--danger); }

/* Grille : colonne domaines (principale) + colonne latérale empilée */
.grid { display: flex; align-items: flex-start; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col--main { flex: 1 1 46%; }
.col--side { flex: 1 1 54%; }
.sec { padding: 20px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; margin: 0; }
.sec__sub { font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .04em; }
.sec__empty { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

/* ── Domaines ─────────────────────────────────────────────────────────────── */
.drows { display: flex; flex-direction: column; gap: 7px; }
.drow {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line);
}
.drow__name { font-family: var(--mono); font-size: 13.5px; color: var(--text); word-break: break-all; }
.drow__badge {
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.drow.is-free    { border-color: color-mix(in oklab, var(--ok) 40%, var(--line)); }
.drow.is-free    .drow__badge { color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, var(--panel)); }
.drow.is-taken   .drow__badge { color: var(--danger); background: var(--danger-wash); }
.drow.is-unknown .drow__badge { color: var(--muted); background: var(--panel-2); }
/* Petit bouton d'action (Réserver / Détails) — pas un simple lien */
.drow__cta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: inherit; font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 6px 11px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .12s var(--ease);
}
.drow__cta:hover { transform: translateY(-1px); border-color: var(--spark); color: var(--spark-strong); }
/* Domaine libre : l'action est la plus utile → on l'accentue */
.drow.is-free .drow__cta {
  color: var(--brand-strong);
  border-color: color-mix(in oklab, var(--brand) 55%, var(--line));
  background: color-mix(in oklab, var(--brand) 16%, var(--panel));
}
.drow.is-free .drow__cta:hover { background: color-mix(in oklab, var(--brand) 30%, var(--panel)); border-color: var(--brand); color: var(--brand-strong); }

/* ── Stores (App Store + Play Store dans une seule carte) ──────────────────── */
.stores { display: flex; flex-direction: column; gap: 8px; }
.store {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.store__ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.store__ico svg { width: 19px; height: 19px; }
.store__body { display: flex; flex-direction: column; min-width: 0; }
.store__name { font-weight: 600; font-size: 14px; }
.store__verdict { font-size: 12.5px; color: var(--muted); }
.store.is-warn { border-color: color-mix(in oklab, var(--danger) 35%, var(--line)); background: var(--danger-wash); }
.store.is-warn .store__verdict { color: var(--danger); font-weight: 600; }
.store.is-ok .store__verdict { color: var(--ok); }
.store__app { font-size: 12.5px; color: var(--text); text-decoration: none; margin-top: 2px; opacity: .85; word-break: break-word; }
.store__app:hover { color: var(--brand-strong); }
.store--link { transition: border-color .15s ease, background .15s ease, transform .12s var(--ease); }
.store--link:hover { border-color: var(--spark); background: var(--panel); transform: translateY(-1px); }
.store--link:hover .store__ico { color: var(--spark-strong); border-color: var(--spark); }

/* ── Présence web (estimation Bing) ──────────────────────────────────────────── */
.webgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.webstat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .12s var(--ease);
}
.webstat:hover { border-color: var(--brand); background: var(--panel); transform: translateY(-1px); }
.webstat__k { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.05; color: var(--brand-strong); }
.webstat__lab { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.webstat__go { font-size: 12px; color: var(--brand-strong); font-weight: 600; margin-top: 4px; }
.web-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

/* ── Tuiles liens (réseaux / web) ─────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .12s var(--ease);
}
.tile:hover { border-color: var(--spark); background: var(--panel); transform: translateY(-1px); }
.tile__ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.tile:hover .tile__ico { color: var(--spark-strong); border-color: var(--spark); }
.tile__ico svg { width: 19px; height: 19px; }
.tile__body { display: flex; flex-direction: column; min-width: 0; }
.tile__label { font-weight: 600; font-size: 14px; }
.tile__note { font-size: 11.5px; color: var(--muted); }

/* ── Variantes ─────────────────────────────────────────────────────────────── */
.variants { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.variants__label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chip {
  font-family: var(--mono); font-size: 13px; color: var(--text);
  padding: 7px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  text-decoration: none; transition: border-color .15s ease, background .15s ease, transform .12s var(--ease);
}
.chip:hover { border-color: var(--brand); background: var(--brand-wash); transform: translateY(-1px); }
.chip--nomi { color: var(--spark-strong); border-color: var(--spark); font-weight: 700; }
.chip--nomi:hover { background: var(--spark-wash); border-color: var(--spark); }

/* ── Skeleton de chargement ───────────────────────────────────────────────── */
.skel-wrap { display: flex; flex-direction: column; gap: 7px; }
.skel { height: 40px; border-radius: var(--radius-sm); background: linear-gradient(100deg, var(--bg-2) 30%, var(--panel-2) 50%, var(--bg-2) 70%); background-size: 200% 100%; animation: nc-shimmer 1.2s ease-in-out infinite; }
@keyframes nc-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ── Modale WHOIS (reste sur le site) ────────────────────────────────────────── */
.wmodal { text-align: left; max-width: 460px; width: min(92vw, 460px); padding: 0; overflow: hidden; }
.wmodal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.wmodal__title { font-family: var(--mono); font-size: 15px; font-weight: 700; margin: 0; word-break: break-all; }
.wmodal__close { border: none; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; padding: 4px 6px; border-radius: 8px; }
.wmodal__close:hover { background: var(--panel-2); color: var(--text); }
.wmodal__body { padding: 18px 20px; max-height: 66vh; overflow-y: auto; }
.wmodal__body--load { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.wmodal__body--load .spinner { width: 26px; height: 26px; margin: 0; }
.wverdict { font-size: 13.5px; font-weight: 600; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.wverdict.is-free    { color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, var(--panel)); }
.wverdict.is-taken   { color: var(--danger); background: var(--danger-wash); }
.wverdict.is-unknown { color: var(--muted); background: var(--panel-2); }
.wfields { margin: 0; display: flex; flex-direction: column; gap: 0; }
.wfield { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.wfield dt { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.wfield dd { margin: 0; font-size: 14px; color: var(--text); word-break: break-word; }
.wns { margin-top: 14px; }
.wns__lab { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.wns ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.wns li { font-family: var(--mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.wchip { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; }
.wraw { margin-top: 14px; }
.wraw summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand-strong); }
.wraw pre { margin: 8px 0 0; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow-y: auto; }
.wmodal__src { font-size: 11.5px; color: var(--muted-2); margin: 16px 0 0; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .grid { flex-direction: column; }
  .col--main, .col--side { flex: 1 1 auto; width: 100%; }
}
@media (max-width: 720px) {
  .search { flex-direction: column; }
  .search__btn { width: 100%; }
  .summary { flex-direction: column; align-items: flex-start; }
  .webgrid { grid-template-columns: 1fr; }
  .drow { grid-template-columns: 1fr auto; grid-template-areas: "name badge" "cta cta"; row-gap: 6px; }
  .drow__name { grid-area: name; }
  .drow__badge { grid-area: badge; justify-self: end; }
  .drow__cta { grid-area: cta; justify-self: start; text-align: left; }
}
