/* ==========================================================================
   SikuliX Documentation - Theme modernise (2025)
   Heritage : sphinxdoc
   Maintenu par oculix-org pour RaiMan
   ========================================================================== */

@import url("sphinxdoc.css");

/* --- Typographie et base --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #2e2e2e;
  -webkit-font-smoothing: antialiased;
}

/* --- Liens (couleur SikuliX conservee) --- */
div.related ul li a,
a {
  color: #9D2900;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c0370a;
}

a tt,
a code {
  font-size: 1em;
  color: #9D2900;
}

/* --- Sidebar --- */
div.sphinxsidebar {
  width: 220px;
  padding: 12px 16px;
  font-size: 0.9em;
  line-height: 1.6;
}

.sidebar li {
  margin-bottom: 6px;
}

/* --- Blocs de code SikuliX --- */
.sikuli-code {
  font-size: 1.1em;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "Menlo", monospace;
  line-height: 1.6;
  display: table-cell;
  white-space: pre-wrap;
  word-wrap: break-word;
  width: 99%;
  overflow: visible;
  margin-left: 2em;
  background: #fafafa;
  padding: 8px;
  border-radius: 4px;
}

/* --- Numeros de ligne --- */
.lineno {
  user-select: none;
  color: #bbb;
  position: relative;
  left: -2.4em;
  width: 1.5em;
  margin-right: -1.5em;
  display: inline-block;
  text-align: right;
  font-size: small;
}

/* --- Coloration syntaxique --- */
.kw {
  color: #1a5fb4;
}

.skw {
  color: #2a7a7a;
}

.str {
  color: #a31515;
}

.dig {
  color: #b45309;
}

.cmt {
  color: #6a8a70;
  font-style: italic;
}

/* --- Bloc info --- */
.info {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

/* --- Images dans le contenu --- */
.document img {
  margin: 10px;
  border: 1px solid #ddd;
  padding: 3px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sikuli-code img {
  vertical-align: middle;
  margin: 2px;
  border: 1px solid #ddd;
  padding: 2px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* --- Badge de version --- */
.versionmodified {
  float: right;
  position: relative;
  padding: 2px 10px 2px 16px;
  margin: 0;
  color: #333;
  background: #fef3c7;
  height: auto;
  font-size: 0.85em;
  border-radius: 0 4px 4px 0;
  line-height: 1.6;
}

.versionmodified:before {
  content: "";
  display: block;
  position: absolute;
  left: -10px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 10px solid #fef3c7;
}

/* --- Blocs de code generiques Sphinx --- */
div.highlight pre,
pre {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "Menlo", monospace;
  font-size: 0.9em;
  line-height: 1.6;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 12px 16px;
  overflow-x: auto;
}

/* --- Notes, warnings, tips --- */
div.admonition {
  border-radius: 4px;
  padding: 12px 16px;
  margin: 16px 0;
  border-left: 4px solid #9D2900;
  background: #fdf6f4;
}

div.admonition.warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

div.admonition.tip,
div.admonition.hint {
  border-left-color: #059669;
  background: #f0fdf4;
}

div.admonition p.admonition-title {
  font-weight: 600;
  margin: 0 0 6px 0;
}

/* --- Titres --- */
h1, h2, h3, h4 {
  color: #1a1a1a;
  font-weight: 600;
}

h1 {
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 8px;
}

/* --- Tables --- */
table.docutils {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}

table.docutils td,
table.docutils th {
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
}

table.docutils th {
  background: #f5f5f5;
  font-weight: 600;
}

table.docutils tr:hover {
  background: #fafafa;
}