/* Aide au clic droit et manuels. Même charte que le journal et le portail. */

.aide-panneau {
  position: fixed;
  z-index: 80;
  width: min(380px, calc(100vw - 16px));
  max-height: min(420px, 70vh);
  overflow: auto;
  background: var(--paper, #fff);
  color: var(--ink, #163a5c);
  border: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(22, 58, 92, 0.16);
  text-align: left;
  font-family: var(--font-body), Outfit, system-ui, sans-serif;
}

.aide-panneau[hidden] {
  display: none;
}

.aide-panneau__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, rgba(22, 58, 92, 0.14));
  background: #f7fafc;
  border-radius: 12px 12px 0 0;
}

.aide-panneau__kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.65);
}

.aide-panneau__fermer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(22, 58, 92, 0.14);
  background: #fff;
  color: #163a5c;
  cursor: pointer;
}

.aide-panneau__fermer:hover {
  background: #f2f7fb;
}

.aide-panneau__titre {
  margin: 0;
  padding: 12px 14px 0;
  font-family: var(--font-display), Syne, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.aide-panneau__corps {
  padding: 8px 14px 4px;
}

.aide-panneau__corps p {
  margin: 0 0 0.7rem;
  line-height: 1.45;
  font-size: 0.92rem;
}

.aide-panneau__suite {
  margin: 0;
  padding: 0 14px 12px;
}

.aide-panneau__suite a {
  color: #2a6fa0;
  font-weight: 600;
  text-decoration: none;
}

.aide-panneau__suite a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.aide-acces {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(22, 58, 92, 0.14);
  background: #f2f7fb;
  color: #163a5c;
  font-weight: 600;
  font-size: 0.78rem;
  font-family: var(--font-body), Outfit, system-ui, sans-serif;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  line-height: 1.2;
}

a.aide-acces:hover {
  background: #fff;
}

.aide-page {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--mist, #f2f7fb);
  color: var(--ink, #163a5c);
  font-family: var(--font-body), Outfit, system-ui, sans-serif;
}

.aide-page h1,
.aide-page h2,
.aide-page h3 {
  font-family: var(--font-display), Syne, system-ui, sans-serif;
}

.aide-colonne {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.aide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
}

.aide-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.aide-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.aide-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.65);
}

.aide-title {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.aide-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.aide-lien {
  color: #2a6fa0;
  font-weight: 600;
  text-decoration: none;
}

.aide-lien:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.aide-lien[hidden] {
  display: none;
}

.aide-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.aide-nav,
.aide-lecture {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.aide-nav {
  background: #fff;
  border-right: 1px solid rgba(22, 58, 92, 0.14);
  padding: 0.9rem 0.75rem 1.5rem;
}

.aide-nav__titre {
  margin: 0.85rem 0.5rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.65);
}

.aide-nav button,
.aide-nav a {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0.15rem 0;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #163a5c;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.aide-nav button:hover,
.aide-nav a:hover,
.aide-nav .is-actif {
  background: rgba(61, 143, 196, 0.1);
  color: #2a6fa0;
}

.aide-nav button.niveau-3 {
  padding-left: 1.15rem;
  font-weight: 500;
}

.aide-lecture {
  padding: 1.1rem 1.4rem 2.5rem;
}

.aide-lead,
.aide-alerte {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.aide-alerte {
  background: #fef3f2;
  border: 1px solid rgba(180, 35, 24, 0.25);
  color: #b42318;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.aide-article {
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(22, 58, 92, 0.06);
  padding: 1.15rem 1.3rem 1.4rem;
  max-width: 920px;
}

.aide-article h1 {
  margin: 0 0 0.8rem;
  font-size: 1.55rem;
  font-weight: 800;
}

.aide-article h2 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.aide-article h3 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.aide-article p,
.aide-article li {
  line-height: 1.55;
}

.aide-article a {
  color: #2a6fa0;
  font-weight: 600;
}

.aide-capture {
  margin: 1rem 0 1.15rem;
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(22, 58, 92, 0.06);
}

.aide-capture img {
  display: block;
  width: 100%;
  height: auto;
  background: #f2f7fb;
}

.aide-capture figcaption {
  margin: 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(22, 58, 92, 0.7);
  background: #f7fafc;
  border-top: 1px solid rgba(22, 58, 92, 0.14);
}

.aide-fiche {
  margin: 1.1rem 0 1.25rem;
  padding: 0.95rem 1.1rem 1rem;
  background: #f2f7fb;
  border: 1px solid rgba(61, 143, 196, 0.35);
  border-left: 4px solid #3d8fc4;
  border-radius: 12px;
}

.aide-fiche__kicker {
  margin: 0 0 0.3rem;
  font-family: var(--font-display), Syne, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2a6fa0;
}

.aide-fiche h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.aide-fiche p:last-child,
.aide-fiche ul:last-child {
  margin-bottom: 0;
}

.aide-nav a.niveau-3 {
  padding-left: 1.15rem;
  font-weight: 500;
}

.aide-article ul,
.aide-article ol {
  padding-left: 1.2rem;
}

.aide-article code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: #f2f7fb;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.aide-article pre {
  overflow: auto;
  background: #f7fafc;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.aide-article pre code {
  background: transparent;
  padding: 0;
}

.aide-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 1rem;
  font-size: 0.92rem;
}

.aide-article th {
  background: #f7fafc;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.65);
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
}

.aide-article td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
  vertical-align: top;
}

@media (max-width: 800px) {
  .aide-page {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .aide-colonne,
  .aide-shell,
  .aide-nav,
  .aide-lecture {
    height: auto;
    overflow: visible;
    display: block;
  }
}
