/* Centre d'aide Eyefind (aide.php). Couleurs du thème du site (--bg, --text,
   --border…), donc clair/sombre automatiques ; --hp-color = couleur du guide. */

.hp-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px 56px;
  color: var(--text);
}

/* ---- Accueil ---------------------------------------------------------- */
.hp-hero {
  text-align: center;
  padding: 28px 0 36px;
}

.hp-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hp-hero p {
  max-width: 560px;
  margin: 0 auto 26px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.hp-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 580px;
  height: 52px;
  margin: 0 auto;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--bg);
  box-shadow: 0 1px 6px var(--shadow-soft);
  cursor: text;
}

.hp-search:focus-within {
  box-shadow: 0 2px 10px var(--shadow-soft);
  border-color: transparent;
}

.hp-search svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.hp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.hp-group {
  margin-top: 30px;
}

.hp-group h2,
.hp-related h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
}

.hp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.hp-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}

.hp-card:hover {
  box-shadow: 0 2px 10px var(--shadow-soft);
  transform: translateY(-1px);
  text-decoration: none;
}

.hp-card[hidden],
.hp-group[hidden] {
  display: none;
}

.hp-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hp-card-body strong {
  font-size: 15px;
  font-weight: 600;
}

.hp-card-body span {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.hp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--hp-color);
  background: color-mix(in srgb, var(--hp-color) 15%, transparent);
}

.hp-icon svg {
  width: 22px;
  height: 22px;
}

.hp-icon-lg {
  width: 64px;
  height: 64px;
}

.hp-icon-lg svg {
  width: 32px;
  height: 32px;
}

.hp-empty {
  margin: 30px 0 0;
  text-align: center;
  color: var(--text-muted);
}

.hp-contact {
  margin-top: 44px;
  padding: 28px 24px;
  border-radius: var(--radius-md, 14px);
  background: var(--btn-bg);
  text-align: center;
}

.hp-contact h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 500;
}

.hp-contact p {
  max-width: 520px;
  margin: 0 auto 18px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--link);
  color: var(--bg); /* blanc sur bleu en clair, foncé sur bleu clair en sombre */
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hp-btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.hp-btn svg {
  width: 16px;
  height: 16px;
}

/* ---- Page d'un guide -------------------------------------------------- */
.hp-guide-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin: 10px 0 34px;
  padding: 28px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--hp-color) 9%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--hp-color) 22%, var(--border));
}

.hp-guide-head h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 500;
}

.hp-guide-head p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.hp-guide-head .hp-kicker {
  margin: 0 0 4px;
  color: var(--hp-color);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-guide {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.hp-toc {
  position: sticky;
  top: 20px;
  padding: 16px 0;
}

.hp-toc p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hp-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--border);
}

.hp-toc a {
  display: block;
  margin-left: -2px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.hp-toc a:hover {
  color: var(--text);
  border-left-color: var(--hp-color);
  text-decoration: none;
}

.hp-content {
  min-width: 0;
}

.hp-section {
  padding: 4px 0 30px;
  scroll-margin-top: 20px;
}

.hp-section + .hp-section {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.hp-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 500;
}

.hp-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hp-color);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hp-section p,
.hp-section li {
  font-size: 15.5px;
  line-height: 1.65;
}

.hp-section p {
  margin: 0 0 14px;
}

.hp-section a {
  color: var(--link);
}

/* Étapes numérotées, reliées par un trait vertical. */
.hp-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: hp-step;
}

.hp-steps li {
  position: relative;
  padding: 0 0 14px 44px;
  counter-increment: hp-step;
}

.hp-steps li::before {
  content: counter(hp-step);
  position: absolute;
  top: 1px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--hp-color);
  color: var(--hp-color);
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  z-index: 1;
}

.hp-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 2px;
  left: 14px;
  width: 2px;
  background: color-mix(in srgb, var(--hp-color) 25%, transparent);
}

.hp-list {
  margin: 0 0 16px;
  padding-left: 22px;
}

.hp-list li {
  margin-bottom: 6px;
}

.hp-list li::marker {
  color: var(--hp-color);
}

.hp-note {
  margin: 4px 0 16px !important;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14.5px !important;
}

.hp-note strong:first-child {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.hp-note-tip {
  background: color-mix(in srgb, var(--hp-color) 10%, var(--bg));
  border-left: 4px solid var(--hp-color);
}

.hp-note-warn {
  background: color-mix(in srgb, #e37400 12%, var(--bg));
  border-left: 4px solid #e37400;
}

.hp-faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--bg);
}

.hp-faq summary {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.hp-faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--text-muted);
}

.hp-related {
  margin-top: 26px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hp-back {
  margin: 22px 0 0;
}

.hp-back a {
  color: var(--link);
  text-decoration: none;
}

@media (max-width: 820px) {
  .hp-guide {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hp-toc {
    position: static;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .hp-guide-head {
    flex-direction: column;
    gap: 14px;
    padding: 22px 18px;
  }

  .hp-cards {
    grid-template-columns: 1fr;
  }
}
