/* Style personnalisé inspiré de mypenskad.sfpd.fgov.be */

:root {
  /* Couleurs principales - Palette mypenskad */
  /* Bleu foncé: #012851 | Turquoise: #2C9BA6 | Bordeaux: #17637E */
  --md-primary-fg-color: #17637E;
  --md-primary-fg-color--light: #D4145A;
  --md-primary-fg-color--dark: #8A0135;
  --md-accent-fg-color: #2C9BA6;
  --md-accent-fg-color--transparent: rgba(44, 155, 166, 0.1);
}

/* Header avec style SFPD */
.md-header {
  background-color: #17637E;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.md-header__title {
  font-weight: 600;
}

/* Cacher le titre du site dans la sidebar - seulement sur grand écran */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title {
    display: none;
  }
}

/* Liens - Turquoise */
.md-typeset a {
  color: #2C9BA6;
}

.md-typeset a:hover {
  color: #3BB8C5;
  text-decoration: underline;
}

/* Tables avec style officiel - Bleu foncé */
.md-typeset table:not([class]) {
  border: 1px solid #ddd;
  border-collapse: collapse;
}

.md-typeset table:not([class]) th {
  background-color: #012851;
  color: white;
  font-weight: 600;
  padding: 12px 16px;
}

.md-typeset table:not([class]) td {
  padding: 10px 16px;
  border-bottom: 1px solid #ecf0f1;
}

.md-typeset table:not([class]) tr:nth-child(even) {
  background-color: #f8f9fa;
}

.md-typeset table:not([class]) tr:hover {
  background-color: #e8f4f5;
}

/* Admonitions - style avec accent turquoise */
.md-typeset .admonition,
.md-typeset details {
  border-left: 4px solid #2C9BA6;
  border-radius: 4px;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: #2C9BA6;
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-left-color: #012851;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: #f39c12;
}

.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left-color: #17637E;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: #27ae60;
}

/* Code blocks */
.md-typeset code {
  background-color: #e8f4f5;
  color: #012851;
  border-radius: 3px;
  padding: 2px 6px;
}

.md-typeset pre > code {
  background-color: #f5f7f9;
  color: #012851;
  border: 1px solid #e0e4e8;
}

/* Footer - Bleu foncé */
.md-footer {
  background-color: #012851;
}

.md-footer-meta {
  background-color: #011a38;
}

/* Cacher le "Made with Material for MkDocs" */
.md-footer-meta__inner {
  display: none;
}

/* Footer navigation - couleurs claires */
.md-footer__link {
  color: rgba(255, 255, 255, 0.9);
}

.md-footer__link:hover {
  color: #2C9BA6;
}

/* Sidebar navigation - seulement sur grand écran */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: 14rem;
  }
  
  .md-nav--primary .md-nav__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #012851;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, #e8f4f5 0%, #f8f9fa 100%);
    border-bottom: 2px solid #2C9BA6;
    margin-bottom: 0.5rem;
  }
  
  .md-nav--primary > .md-nav__list {
    padding: 0 0.4rem;
  }

  .md-nav__link {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    margin: 2px 0;
    transition: all 0.2s ease;
  }

  .md-nav__link:hover {
    color: #2C9BA6;
    background-color: rgba(44, 155, 166, 0.1);
  }

  .md-nav__link--active {
    color: #17637E;
    font-weight: 600;
    background-color: rgba(23, 99, 126, 0.1);
    border-left: 3px solid #17637E;
  }
}

/* Search */
.md-search__input {
  background-color: rgba(255, 255, 255, 0.1);
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Boutons - Bordeaux */
.md-typeset .md-button {
  background-color: #17637E;
  border-color: #17637E;
  color: white;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.md-typeset .md-button:hover {
  background-color: #8A0135;
  border-color: #8A0135;
}

.md-typeset .md-button--primary {
  background-color: #2C9BA6;
  border-color: #2C9BA6;
}

.md-typeset .md-button--primary:hover {
  background-color: #238A94;
  border-color: #238A94;
}

/* Content area */
.md-content {
  max-width: 1200px;
}

/* Headings - Bleu foncé */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: #012851;
  font-weight: 600;
}

.md-typeset h1 {
  border-bottom: 2px solid #2C9BA6;
  padding-bottom: 10px;
}

/* Table des matières - accent turquoise */
.md-nav--secondary .md-nav__link--active {
  color: #2C9BA6;
}

/* Mode sombre - ajustements */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #D4145A;
  --md-accent-fg-color: #3BB8C5;
  --md-default-bg-color: #0d1f33;
}

[data-md-color-scheme="slate"] .md-header {
  background-color: #17637E;
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: #012851;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border: 1px solid #2C9BA6;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #012851;
  color: #ffffff;
  border-bottom: 2px solid #2C9BA6;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  color: #e0e0e0;
  border-bottom: 1px solid #1a3a5c;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(even) {
  background-color: #0d2840;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(odd) {
  background-color: #0a1f33;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background-color: #1a4a6e;
}

[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4 {
  color: #7CB8C2;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background-color: #0d2840;
  color: #3BB8C5;
}

[data-md-color-scheme="slate"] .md-footer {
  background-color: #012851;
}

[data-md-color-scheme="slate"] .md-footer-meta {
  background-color: #011a38;
}

/* SVG et images en mode sombre */
[data-md-color-scheme="slate"] .md-typeset img[src$=".svg"],
[data-md-color-scheme="slate"] .md-typeset svg {
  filter: invert(1) hue-rotate(180deg);
  background-color: transparent;
}

/* Alternative: fond clair pour les SVG en mode sombre */
[data-md-color-scheme="slate"] .md-typeset .svg-light-bg img[src$=".svg"],
[data-md-color-scheme="slate"] .md-typeset .svg-light-bg svg {
  filter: none;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
}
