/* ================================================================
   Aide-memoire PowerShell AD
   ================================================================ */

:root {
  --serif: 'Instrument Serif', Georgia, serif;
}

.outil-header {
  padding: 54px 80px 50px;
  text-align: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(30,100,152,.28), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(16,185,129,.10), transparent 28%),
    linear-gradient(135deg, #0b1018 0%, #121a24 58%, #0d1117 100%);
  border-bottom: 1px solid rgba(30,100,152,.34);
}

.outil-label {
  margin-bottom: 14px;
  color: #93c5fd;
  font-family: var(--mono);
  font-size: 12px;
}

.outil-title {
  max-width: 760px;
  margin: 0 auto 14px;
  color: #f1f5f9;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.outil-concept {
  max-width: 620px;
  margin: 0 auto;
  color: #dbe5f1;
  font-size: 15px;
  line-height: 1.65;
}

.outil-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 8px 12px;
  border: 1px solid rgba(148,163,184,.20);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  color: #dbe5f1;
  font-family: var(--mono);
  font-size: 12px;
}

.outil-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.search-wrap,
.mode-legend,
.memo-table,
.memo-empty {
  border: 1px solid rgba(26,22,18,.10);
  border-radius: 8px;
  background: var(--bg2);
  box-shadow: 0 10px 26px rgba(26,22,18,.045);
}

.search-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(30,100,152,.10);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}

.search-clear {
  display: none;
  padding: 6px 9px;
  border: 1px solid rgba(26,22,18,.12);
  border-radius: 5px;
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.search-clear:hover {
  border-color: rgba(30,100,152,.28);
  background: rgba(30,100,152,.08);
  color: var(--text);
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 18px;
  margin: 8px 0 16px;
}

.search-count {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
}

.theme-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.theme-filter-btn {
  padding: 8px 11px;
  border: 1px solid rgba(30,100,152,.15);
  border-radius: 6px;
  background: rgba(244,239,230,.55);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}

.theme-filter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(30,100,152,.34);
  background: rgba(30,100,152,.08);
  color: var(--text);
}

.theme-filter-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.mode-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 26px;
  color: var(--text3);
  font-size: 11px;
}

.mode-legend-label {
  margin-right: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
}

.mode-badge {
  position: relative;
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid rgba(26,22,18,.10);
  border-radius: 5px;
  background: var(--bg6);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  cursor: help;
}

.mode-badge.ps-admin { color: var(--accent); }
.mode-badge.ps-dc { color: #047857; }
.mode-badge.ps-any { color: #6b48d8; }
.mode-badge.cmd { color: #b45309; }

.mode-badge:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 7px 10px;
  border: 1px solid rgba(26,22,18,.12);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(26,22,18,.14);
  pointer-events: none;
}

.memo-section {
  margin-bottom: 26px;
}

.memo-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(26,22,18,.08);
}

.memo-section-title {
  flex: 1;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.memo-section-count {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 11px;
}

.memo-table {
  overflow: visible;
}

.memo-row {
  display: grid;
  grid-template-columns: minmax(250px, 2.15fr) 104px minmax(250px, 2.85fr) auto;
  align-items: center;
  border-bottom: 1px solid rgba(26,22,18,.08);
  transition: background .12s;
  overflow: visible;
}

.memo-row:last-child {
  border-bottom: 0;
}

.memo-row:hover {
  background: rgba(244,239,230,.64);
}

.memo-row-cmd {
  padding: 12px 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.memo-row-mode {
  padding: 12px 8px;
  text-align: center;
}

.memo-row-desc {
  padding: 12px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.55;
}

.memo-row-desc mark,
.memo-row-cmd mark {
  padding: 0 3px;
  border-radius: 3px;
  background: #dbeafe;
  color: #1e40af;
}

.memo-copy {
  margin-right: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(30,100,152,.22);
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}

.memo-copy:hover {
  border-color: var(--accent);
  background: rgba(30,100,152,.08);
  color: var(--text);
}

.memo-empty {
  padding: 42px 20px;
  color: var(--text3);
  font-size: 14px;
  text-align: center;
}

.memo-empty strong {
  color: var(--text2);
}

@media(max-width:860px) {
  .outil-header {
    padding: 42px 24px;
  }

  .memo-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
  }

  .memo-row-cmd {
    grid-column: 1;
    grid-row: 1;
  }

  .memo-row-mode {
    grid-column: 2;
    grid-row: 1;
    padding-right: 14px;
  }

  .memo-row-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0;
  }

  .memo-copy {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    margin: 0 0 12px 16px;
  }
}

@media(max-width:700px) {
  .outil-header {
    padding: 36px 16px;
  }

  .outil-title {
    font-size: 34px;
  }

  .outil-meta {
    flex-wrap: wrap;
    justify-content: center;
  }

  .outil-wrap {
    padding: 34px 16px 60px;
  }

  .search-wrap {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .search-clear {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .theme-filter-btn {
    flex: 1 1 auto;
  }
}
