/* Guide RetentIA - complète /assets/retentia-site.css */
:root {
  --primary-rgb: 124, 58, 237;
  --primary: var(--violet);
  --primary-dark: var(--violet-3);
  --codebg: #0b1220;
  --codetext: #e5e7eb;
  --g-success: #34d399;
  --g-warning: #fbbf24;
  --g-danger: #f87171;
}
[data-theme="light"] {
  --g-success: #059669;
  --g-warning: #d97706;
  --g-danger: #ef4444;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --g-success: #059669;
    --g-warning: #d97706;
    --g-danger: #ef4444;
  }
}

.wrap {
  width: min(1120px, calc(100% - 3rem));
  max-width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.4rem) 0 4rem;
  min-width: 0;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 34%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
  transition: background .2s, border-color .2s;
}
.card:hover {
  border-color: var(--border-2);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.045em; margin: 0 0 .65rem; color: var(--text); line-height: 1.04; }
h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  margin: 0 0 .9rem;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.18;
}
h3 { font-size: 1.05rem; margin: 1.15rem 0 .45rem; color: var(--text); line-height: 1.25; }
p { margin: .6rem 0; color: var(--text-2); line-height: 1.75; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
.subtitle { color: var(--text-2); margin-top: 0.25rem; max-width: 76ch; font-size: 1rem; line-height: 1.75; }

.guide-fast-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.1rem 0;
}
.guide-fast-lanes a {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 118px;
  padding: .95rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--violet-pale), var(--surface));
  color: var(--text-2);
}
.guide-fast-lanes a:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
  text-decoration: none;
}
.guide-fast-lanes strong {
  color: var(--text);
  font-size: .98rem;
  line-height: 1.25;
}
.guide-fast-lanes span {
  font-size: .88rem;
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--violet-pale);
  color: var(--violet);
  font-weight: 600;
  font-size: 0.85rem;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
}

ul, ol { padding-left: 1.2rem; margin: .65rem 0; }
li { margin: .42rem 0; color: var(--text-2); line-height: 1.65; }
li::marker { color: var(--violet); }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre {
  margin: .75rem 0;
  padding: .9rem;
  border-radius: 12px;
  background: var(--codebg);
  color: var(--codetext);
  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

@supports (padding: max(0px)) {
  .wrap {
    width: min(1120px, calc(100% - 3rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }
}

kbd {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.callout {
  border-left: 4px solid var(--violet);
  background: var(--violet-pale);
  padding: .9rem 1rem;
  border-radius: 14px;
  margin: .9rem 0;
  line-height: 1.65;
}
.ok { border-left-color: var(--g-success); background: rgba(52, 211, 153, 0.12); }
.warn { border-left-color: var(--g-warning); background: rgba(251, 191, 36, 0.12); }
.danger { border-left-color: var(--g-danger); background: rgba(248, 113, 113, 0.11); }

.toc {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-2) 72%, transparent);
}
.toc > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin-top: .75rem !important;
}
.toc a {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.25;
}
.toc a:hover {
  color: var(--violet);
  border-color: var(--border-2);
  background: var(--violet-pale);
  text-decoration: none;
}
.muted { color: var(--text-3); }
.hr { height: 1px; background: var(--border); margin: 1rem 0; }

.card > p:last-child a[href="#top"] {
  display: inline-flex;
  align-items: center;
  margin-top: .55rem;
  padding: .38rem .62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
  font-size: .82rem;
  background: var(--bg-2);
}
.card > p:last-child a[href="#top"]:hover {
  color: var(--violet);
  border-color: var(--border-2);
  text-decoration: none;
}

.card[id] {
  scroll-margin-top: 5.5rem;
}
.card[id] > h2:first-child {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.card[id] > h2:first-child + p,
.card[id] > h2:first-child + ul,
.card[id] > h2:first-child + .grid2 {
  margin-top: 1rem;
}

@media (min-width: 1180px) {
  .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .guide-fast-lanes,
  .toc > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 1.5rem);
    max-width: calc(100% - 1.5rem);
  }
  .toc {
    padding: .75rem;
  }
  .guide-fast-lanes,
  .toc > div {
    grid-template-columns: 1fr;
  }
  pre {
    font-size: .78rem;
  }
}

.guide-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  vertical-align: -0.15rem;
  margin-right: .35rem;
  color: var(--text-3);
}
.guide-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
