/* ============================================================
   ANDROMATE DOCS — LIGHT / BLUE / MONOSPACE THEME
   (structure du thème sombre, couleurs bleu & blanc)
   ============================================================ */

/* ---------------- COLOR TOKENS ---------------- */
:root {
  --am-bg:          #ffffff;
  --am-page:        #f4f5f7;
  --am-surface:     #f7f8fa;
  --am-surface-2:   #eef1f6;
  --am-border:      #e3e8ef;
  --am-accent:      #1976d2;   /* bleu principal */
  --am-accent-2:    #3f51b5;   /* bleu indigo */
  --am-accent-soft: rgba(25, 118, 210, 0.10);
  --am-text:        #212121;
  --am-text-dim:    #5f6b76;
}

/* ---------------- GLOBAL ---------------- */
body {
  background: var(--am-page);
  color: var(--am-text);
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: 14px;
  letter-spacing: -0.1px;
}

/* Menu collé à gauche, contenu pleine largeur */
.md-main { background: transparent; padding-top: 0 !important; }
.md-main__inner {
  max-width: none !important;
  margin: 0 !important;
}

/* ---------------- HEADER ---------------- */
.md-header {
  background: #ffffff;
  height: 56px;
  color: var(--am-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}
.md-header__inner { max-width: none; padding: 0 1.5rem; }
.md-header__topic {
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  color: #212121;
}
.md-header__option .md-icon,
.md-header__button { color: #424242; }

/* ---------------- SEARCH ---------------- */
.md-search__form {
  background: #f0f1f4;
  border: 1px solid var(--am-border);
  border-radius: 10px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
/* Focus — anneau bleu façon champ moderne */
.md-search__form:focus-within {
  background: #ffffff;
  border-color: var(--am-accent);
  box-shadow: 0 0 0 3px var(--am-accent-soft);
}

.md-search__input {
  background: transparent;
  color: var(--am-text);
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 13.5px;
}
.md-search__input::placeholder { color: var(--am-text-dim); }

/* Icône de recherche — passe en bleu au focus */
.md-search__icon { color: var(--am-text-dim); }
.md-search__form:focus-within .md-search__icon[for="__search"] { color: var(--am-accent); }

/* Raccourci clavier (/) affiché à droite */
.md-search__options .md-search__icon { color: var(--am-text-dim); }

/* ---- Menu de résultats ---- */
.md-search__output {
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.md-search-result__meta {
  background: #eef2fb;
  color: var(--am-accent-2);
  font-weight: 600;
  border-bottom: 1px solid var(--am-border);
}
.md-search-result__item { border-bottom: 1px solid #f0f1f4; }

.md-search-result__link {
  border-radius: 6px;
  margin: 2px 4px;
  transition: background 0.12s ease;
}
.md-search-result__link:hover,
.md-search-result__link[data-md-state="active"],
.md-search-result__more summary:hover {
  background: var(--am-accent-soft);
}

.md-search-result__title { font-weight: 600; color: var(--am-text); }
.md-search-result__teaser { color: var(--am-text-dim); }

/* Terme recherché surligné dans les résultats */
.md-search-result__teaser mark,
.md-search-result__title mark {
  background: rgba(25, 118, 210, 0.18);
  color: var(--am-accent);
  border-radius: 2px;
}

/* Logo round */
.md-header__button.md-logo img {
  height: 40px !important;
  border-radius: 50%;
}

/* ---------------- CONTENT ---------------- */
.md-content {
  background: var(--am-bg);
  margin-left: 0 !important;
  margin-top: 0 !important;
}
.md-content__inner {
  margin-top: 0 !important;
  padding-top: 1rem !important;
  max-width: 960px;
}

/* ---------------- LEFT SIDEBAR ---------------- */
.md-sidebar--primary {
  background: #ffffff;
  border-right: 1px solid var(--am-border);
  margin-top: 0 !important;
}
.md-sidebar__scrollwrap { padding-top: 0 !important; }

.md-nav__title {
  font-size: 12px;
  color: var(--am-accent-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.8rem 1rem 0.3rem;
}

.md-nav__link {
  color: var(--am-text) !important;
  font-weight: 500;
  padding: 0.42rem 0.7rem;
  margin: 1px 0.5rem;
  border-radius: 6px;
  transition: background 0.13s ease, color 0.13s ease, box-shadow 0.13s ease;
}
/* Hover — gris/bleu discret façon Jira */
.md-nav__link:hover {
  background: #eef1f6;
  color: var(--am-accent) !important;
}

/* Active item — style Jira : barre d'accent gauche + fond bleu léger + texte bleu */
.md-nav__item--active > .md-nav__link,
.md-nav__link--active {
  background: var(--am-accent-soft) !important;
  color: var(--am-accent) !important;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--am-accent);
}

/* ---------------- RIGHT TOC — CARD STYLE ---------------- */
.md-sidebar--secondary { display: block !important; }
.md-sidebar--secondary .md-nav__title { display: none; }
.md-sidebar--secondary .md-nav__list { padding: 0 0.4rem; }

.md-sidebar--secondary .md-nav__link {
  display: block;
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: 7px;
  padding: 0.5rem 0.7rem;
  margin: 0 0 0.45rem 0;
  color: var(--am-text-dim) !important;
  font-size: 12.5px;
  line-height: 1.35;
}
.md-sidebar--secondary .md-nav__link:hover {
  background: var(--am-surface-2);
  border-color: var(--am-accent);
  color: var(--am-accent) !important;
}
.md-sidebar--secondary .md-nav__link--active {
  background: var(--am-accent-soft) !important;
  border-color: var(--am-accent);
  color: var(--am-accent) !important;
  font-weight: 600;
}

/* ---------------- TYPOGRAPHY ---------------- */
.md-typeset { font-family: "JetBrains Mono", "Roboto Mono", monospace; }

.md-typeset h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #212121;
  letter-spacing: -0.5px;
  margin-top: 0;
  border-bottom: 1px solid var(--am-border);
  padding-bottom: 0.5rem;
}

.md-typeset h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1976d2;
  margin-top: 2.2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--am-border);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.md-typeset h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--am-accent);
  border-radius: 2px;
}

.md-typeset h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: #37474f;
  border-left: 3px solid #c5cae9;
  padding-left: 0.55rem;
  margin-top: 1.5rem;
}

.md-typeset a { color: var(--am-accent); text-decoration: none; }
.md-typeset a:hover { text-decoration: underline; }
.md-typeset strong { color: #212121; }

/* ---------------- INLINE CODE — blue chip ---------------- */
.md-typeset code {
  background: var(--am-accent-soft);
  color: var(--am-accent);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 0.85em;
}

/* ---------------- CODE BLOCKS ---------------- */
.md-typeset pre,
.md-typeset .highlight { border-radius: 8px; }
.md-typeset pre > code {
  background: var(--am-surface);
  color: #263238;
  border: 1px solid var(--am-border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.md-typeset pre code {
  background: transparent;
  color: inherit;
}

/* ---------------- CONTENT TABS ---------------- */
.md-typeset .tabbed-labels > label {
  color: var(--am-text-dim);
  font-weight: 600;
}
.md-typeset .tabbed-labels > input:checked + label { color: var(--am-accent); }

/* ---------------- TABLES ---------------- */
.md-typeset table:not([class]) {
  background: var(--am-bg);
  border: 1px solid var(--am-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.md-typeset table:not([class]) th {
  background: #eef2fb;
  color: #1a237e;
  font-weight: 600;
  padding: 0.65rem 0.8rem;
  border: none;
  border-bottom: 2px solid #d6def5;
}
.md-typeset table:not([class]) td {
  border: none;
  border-bottom: 1px solid #eceff4;
  padding: 0.6rem 0.8rem;
  color: var(--am-text);
}
.md-typeset table:not([class]) tr:nth-child(even) td { background: #fafbfd; }
.md-typeset table:not([class]) tbody tr:hover td { background: var(--am-accent-soft); }

/* ---------------- BLOCKQUOTES ---------------- */
.md-typeset blockquote {
  border-left: 4px solid var(--am-accent);
  background: #f0f7ff;
  border-radius: 0 6px 6px 0;
  padding: 0.7rem 1rem;
  color: #37474f;
}
.md-typeset blockquote p { margin: 0.3rem 0; }

/* ---------------- HR ---------------- */
.md-typeset hr {
  border: none;
  border-top: 1px solid var(--am-border);
  margin: 1.6rem 0;
}

/* ---------------- LISTS ---------------- */
.md-typeset ul li,
.md-typeset ol li { margin-bottom: 0.3rem; }
.md-typeset ul li::marker { color: var(--am-accent); }

/* ---------------- FOOTER — hidden ---------------- */
.md-footer,
.md-footer__inner,
.md-footer__meta,
.md-footer-nav { display: none !important; }
.md-main { padding-bottom: 0 !important; margin-bottom: 0 !important; }
