  :root {
    --cover-background-color: transparent;
    --cover-background-mask-opacity: 0.5;
    --sidebar-name-color: #d3d3d3;
    --navbar-menu-link-text-decoration--hover: underline;
    --cover-blockquote-color: #d3d3d3;
    --cover-button-primary-background--hover: transparent;
    --cover-background-mask-color: black;
    --border-color: rgba(192, 192, 192, 0.3);
    --hr-border: 1px solid rgba(205, 175, 130, 0.5);
    --blockquote-border-color: rgba(205, 175, 130, 1);
    --heading-h1-border-color: rgba(205, 175, 130, 1);
    --heading-h2-border-color: rgba(205, 175, 130, 1);
    --heading-h3-border-color: rgba(205, 175, 130, 1);
    --heading-h4-border-color: rgba(205, 175, 130, 1);
    --heading-h5-border-color: rgba(205, 175, 130, 1);
    --heading-h6-border-color: rgba(205, 175, 130, 1);
    --sidebar-border-color: rgba(205, 175, 130, 0.5);
    --code-inline-background: rgba(0, 0, 0, 0.3);
    --code-theme-background: rgba(0, 0, 0, 0.5);
    --blockquote-background: rgba(0, 0, 0, 0.3);
    --table-cell-border-color: rgba(205, 175, 130, 0.3);
    --notice-background: rgba(0, 0, 0, 0.3);
    --notice-important-background: rgba(0, 0, 0, 0.3);
    --notice-tip-background: rgba(0, 0, 0, 0.3);
    --table-row-odd-background: rgba(0, 0, 0, 0.2);
    --sidebar-toggle-background: rgba(0, 0, 0, 0.5);
    --sidebar-nav-link-border-color--active: rgba(205, 175, 130, 0.5);
    --sidebar-nav-link-color--active: rgba(205, 175, 130, 1);
    --navbar-menu-background: rgba(0, 0, 0, 0.3);
    --cover-button-primary-background: rgba(0, 0, 0, 0.3);
    --cover-button-background--hover: rgba(0, 0, 0, 0.3);
    --cover-button-primary-border: 1px solid rgba(205, 175, 130, 1);
    --cover-button-border: 1px solid rgba(205, 175, 130, 1);
    --base-background-color: #2c2c2c;
    --copycode-background: rgba(44, 44, 44, 0.8);
    --sidebar-toggle-icon-width: 0px;
    --link-text-decoration: none;
    --content-max-width: 60em;
  }

  main {
    background-image: url('_media/background-texture.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  .markdown-section p a {
    color: var(--sidebar-nav-link-color--active) !important;
    font-weight: 500;
  }

  .markdown-section p a:hover {
    text-decoration: underline !important;
  }

  .alert a {
    color: var(--sidebar-nav-link-color--active) !important;
    font-weight: 500;
  }

  .alert a:hover {
    text-decoration: underline !important;
  }

  strong a {
    color: var(--sidebar-nav-link-color--active) !important;
  }

  strong a:hover {
    text-decoration: underline !important;
  }

  li a:hover {
    text-decoration: underline !important;
  }

  tr a {
    color: var(--sidebar-nav-link-color--active) !important;
    font-weight: 500;
  }

  .texte a {
    color: var(--sidebar-nav-link-color--active) !important;
    font-weight: 500;
  }

  .texte a:hover {
    text-decoration: underline !important;
  }

  tr a:hover {
    text-decoration: underline !important;
  }

  .gallery-item a:hover {
    text-decoration: underline !important;
  }

  #harptos-date .fa-solid {
    color: rgba(205, 175, 130, 1);
  }

  .sidebar-toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-toggle-button i {
    font-size: 1em;
  }

  .sidebar-toggle-button:hover {
    transition: all 0.2s;
    color: var(--sidebar-nav-link-color--active);
  }

  /* Quand la sidebar est fermée, rotation + léger "pop" */
  body.close .sidebar-toggle-button i {
    transform: rotate(180deg) scale(1.2);
  }

  .progress {
    background-color: rgba(205, 175, 130, 1);
  }

  .cover {
    border-bottom: 1px solid rgba(205, 175, 130, 0.5);
  }

  .cover .cover-main>p:last-child a {
    border: 1px solid transparent;
  }

  .cover:before{
    background-image: none;
  }

  .breadcrumb a {
    color:rgba(205, 175, 130, 1) !important;
  }

  .dense-table table td,
  .dense-table table th {
    padding: 0.4em 0.3em;
  }

  .app-name-link img {
    width: 30%;
    filter: drop-shadow(1px 2px 3px rgba(205, 175, 130, 0));
    transition: all 0.2s ease;
  }

  .app-name-link img:hover {
    filter: drop-shadow(1px 2px 3px rgba(205, 175, 130, 1));
  }

  .sidebar {
    background: none;
  }

  .sidebar .search {
    display: none;
  }

  .sidebar-nav {
    border-top: var(--hr-border, 0);
  }

  .ko-fi {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    width: 80%;
    border: rgba(0, 0, 0, 0) 1px solid;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
    margin-top: 15px;
  }

  .ko-fi img {
    height: 20px;
    width: 20px;
    margin-right: 10px;
    margin-top: 1px;
  }

  .ko-fi:hover {
    border: rgba(205, 175, 130, 1) 1px solid;
  }

  #conan-status {
    margin-top: 5px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-top: 1px;
  }

  .markdown-section table {
    display: table;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
  }

  .table-flex {
    width: -webkit-fill-available !important;
    width: fill-available !important;
  }

  .cover-main p {
    text-align: center;
  }

  p {
    text-align: justify;
  }

  .docsify-select--classic .docsify-select-menu  {
    background-color: #283339;
  }

  li {
    text-align: justify;
  }

  .sidebar .search .clear-button {
    padding: 10px;
  }

  .app-nav a {
    color: #d3d3d3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  }

  .app-nav a:hover {
    text-decoration: underline;
  }

  .alert.callout {
    margin: 2em 0;
  }

  .mermaid {
    border: 1px solid var(--mono-tint2);
    border-radius: 5px;
    margin: 1em 0;
  }

  .sidebar>h1 .app-name-link {
    font-size: medium;
  }

  .error-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 4em 0;
  }

  @keyframes wobble {
    0% {
      transform: translateY(0) scaleY(1);
    }
    30% {
      transform: translateY(-5px) scaleY(1.05);
    }
    50% {
      transform: translateY(2px) scaleY(0.98);
    }
    70% {
      transform: translateY(-3px) scaleY(1.02);
    }
    100% {
      transform: translateY(0) scaleY(1);
    }
  }

  .error-img {
    width: 50%;
    animation: wobble 0.6s ease-out;
    transform-origin: bottom center;
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.3));
    mix-blend-mode: hard-light;
  }

  .error-title {
    font-size: larger;
    font-style: normal;
    font-weight: bold;
  }

  .error-text p {
    text-align: center;
    font-style: italic;
    line-height: normal;
  }

  button.download-btn {
    background-color: transparent;
    color: var(--cover-button-color);
    border: none;
    padding: 10px 18px;
    border: var(--cover-button-border);
    border-radius: var(--cover-button-border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 8px 6px 16px 0;
  }

  button.download-btn:hover {
    background-color: var(--cover-button-primary-background);
  }

  .home-icon {
    font-size: 40px;
    transition: transform 0.3s ease;
    transition: all 0.2s ease;
  }

  .gallery-home {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: baseline;
    margin: 4em 0;
  }

  .gallery-item:hover .home-icon {
    color: rgba(205, 175, 130, 1);
  }
  
  summary {
    cursor: pointer;
  }

  summary:hover {
    text-decoration: underline;
  }

  svg {
    color: #d3d3d3;
  }

  .img-caption {
    color: #d3d3d3;
  }

  .no-heading {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
  }

  .markdown-section h6 a[data-id] {
    display: none;
  }

  .mermaid button {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .mermaid:hover button {
    opacity: 1;
    visibility: visible;
  }

  .icon-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  
  .icon-container img.icon-r-title {
    width: 50px;
    height: auto;
    transform: translateY(10px);
    filter: drop-shadow(1px 2px 3px black);
  }

  .icon-container img.icon-title {
    width: 40px;
    height: auto;
    transform: translateY(5px);
    filter: drop-shadow(1px 2px 3px black);
  }

  .icon-pantheon {
    width: 60px;
    height: auto;
    transform: translateY(15px);
    filter: drop-shadow(1px 2px 3px black);
  }

  .icon-abilities {
    width: 100px;
    height: auto;
    transform: translateY(35px);
    margin-bottom: 25px;
    filter: drop-shadow(1px 2px 3px black);
  }

  .icon-skills {
    width: 50px;
    height: auto;
    transform: translateY(15px);
    margin-bottom: 25px;
    filter: drop-shadow(1px 2px 3px black);
  }

  .icon-spells {
    width: 50px;
    height: auto;
    transform: translateY(15px);
    filter: drop-shadow(1px 2px 3px black);
  }

  .bloc-pres {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 20 0 20 0;
    box-sizing: border-box;
  }

  .bloc-texte {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
  }

  .pres {
    font-size: 1.5em;
    max-width: 90%;
  }
  
  .texte {
    text-align: justify;
  }

  .bold-text {
    font-weight: bold;
  }

  .summary {
    margin-top: 5%;
  }
  
  .img-pres {
    width: 250px;
    height: auto;
    filter: drop-shadow(2px 4px 6px black);
  }

  .img-pres-l {
    width: 35%;
    height: auto;
    float: left;
    margin: 0 20px 20px 0;
    filter: drop-shadow(2px 4px 6px black);
  }

  .img-pres-r {
    width: 35%;
    height: auto;
    float: right;
    margin: 0 0 20px 20px;
    filter: drop-shadow(2px 4px 6px black);
  }

  /* Introduction */

  .bloc-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    padding: 20 0 20 0;
    box-sizing: border-box;
  }

  .bloc-texte-intro {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: 5%;
  }

  .intro {
    font-size: 1.5em;
    font-weight: bold;
  }
  
  .texte-intro {
    text-align: justify;
  }
  
  .img-intro {
    width: 250px;
    height: auto;
    filter: drop-shadow(2px 4px 6px black);
  }

  .img-title {
    width: 100%;
    height: auto;
    margin-bottom: -50px;
    filter: drop-shadow(1px 2px 3px black);
  }

  .equipment {
    width: 80%;
    height: auto;
    display: flex;
    justify-self: center;
  }

  .container-filter {
    display: flex;
    justify-content: flex-start;
    gap: 5%;
    margin-top: 2%;
  }

  .spell-filter {
    margin-bottom: 15px;
  }

  .spell-filter select {
    background-color: rgba(0, 0, 0, 0.3);
    color: #d3d3d3;
  }

  .spell-filter select option {
    background-color: rgba(0, 0, 0, 0.8);
  }

  .spell-card .fa,
  .spell-card .fas {
    display: block;
    text-align: center;
    color: rgba(205, 175, 130, 1);
  }

  .spell-info {
    line-height: 0%;
  }

  .spell-search {
    background-color: rgba(0, 0, 0, 0.3);
    color: #d3d3d3;
    display: flex;
    align-self: center;
    border: #767676 solid 1px;
    padding: 3px;
    outline: none;
  }

  .spell-search::placeholder {
    color: #d3d3d3;
  }

  .spell-search:focus {
    border: #d3d3d3 1px solid;
  }

  .spell-type-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 10px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 0.5em;
    vertical-align: middle;
    position: relative;
    cursor: help;
    transition: all 0.2s;
  }

  .spell-type-tag:hover {
    transform: translateY(-2px);
  }

    /* Tooltip */
  .spell-type-tag::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 170%; /* place au-dessus du tag */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
    z-index: 10;
  }

  /* Petite flèche */
  .spell-type-tag::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.3) transparent;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    z-index: 10;
  }

  /* Affichage au hover */
  .spell-type-tag:hover::after,
  .spell-type-tag:hover::before {
    opacity: 1;
  }

  .type-social {
    background: linear-gradient(135deg, rgba(107, 91, 68, 0.9), rgba(120, 100, 70, 0.85));
    border: 1px solid rgba(205, 175, 130, 1);
  }
  
  .type-suivirp {
    background: linear-gradient(135deg, rgba(120, 20, 20, 0.9), rgba(60, 10, 10, 1));
    border: 1px solid rgba(205, 175, 130, 1);
  }

  .symbol-thievescant {
    width: 64px;
    height: auto;
  }

  .symbol-thievescant:hover{
    cursor: pointer;
  }

  /* Fin introduction */
  
  #back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid var(--border-color);;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: ease 0.2s;
  }

  #back-to-top:hover {
    border: 1px solid rgba(205, 175, 130, 1);
  }

.footer {
  display: block;
  text-align: center;
  max-width: 800px;
  margin: -10px auto;
}

.footer a {
  text-decoration: underline;
}

.footer a:hover {
  color: var(--sidebar-nav-link-color--active);
  text-decoration: underline;
}

.copyright {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.legal-mentions {
  margin-bottom: 10px;
}

/* Media Queries */

  @media (max-width: 600px) {

    .img-pres {
      display: none;
    }

    .img-pres-l {
      display: none;
    }

    .img-pres-r {
      display: none;
    }

    .img-intro {
      display: none;
    }

    .img-title {
      display: none;
    }

    .equipment {
      display: none;
    }

    .icon-pantheon {
      display: none;
    }

    .icon-abilities {
      display: none;
    }

    .icon-skills {
      display: none;
    }

    .bloc-texte-intro {
      margin-left: 0%;
    }

    nav {
      font-size: 0.8em;
    }
  }

/* Gallerie Espèces, Races, Métiers, Historiques */

  .gallery {
    display: flex;
    flex-wrap: wrap; /* Permet de passer à la ligne */
    justify-content: center; /* Centre le contenu horizontalement */
    gap: 30px; /* Espacement entre les items */
    align-items: baseline;
  }

  /* Éléments individuels */
  .gallery-item {
    flex: 1 1 calc(25% - 16px); /* 4 colonnes, responsive */
    max-width: calc(24% - 16px); /* Limite la largeur des items */
    text-align: center; /* Centre le texte */
    overflow: hidden; /* Coupe les débordements */
    background-color: transparent; /* Fond blanc */
  }

  .gallery-item-small {
    flex: 1 1 calc(17% - 16px); /* 4 colonnes, responsive */
    max-width: calc(16% - 16px); /* Limite la largeur des items */
    text-align: center; /* Centre le texte */
    overflow: hidden; /* Coupe les débordements */
    background-color: transparent; /* Fond blanc */
  }

  .gallery-item, .gallery-item-small img {
    filter: drop-shadow(2px 4px 6px black);
    transition: filter 0.3s ease-in-out;
  }

  .gallery-item:hover, .gallery-item-small:hover img {
    filter: drop-shadow(0px 0px 3px rgba(205, 175, 130, 0.5));
  }

    /* Images */
  .gallery-item img {
    width: 100%; /* Rend l'image responsive */
    height: auto; /* Préserve le ratio de l'image */
    display: block;
  }

  /* Titres */
  .gallery-item h3 {
    font-size: 16px;
    margin: 8px 0;
    color: #d3d3d3;
  }

  .gallery-item-small h3 {
    font-size: 16px;
    margin: 5px 0;
    color: #d3d3d3;
  }

  /* Responsive : 2 colonnes sur écrans moyens */
  @media (max-width: 600px) {
    .gallery-item {
      flex: 1 1 calc(50% - 16px);
      max-width: calc(30% - 16px);
    }
    .gallery-item-small {
      flex: 1 1 calc(50% - 16px);
      max-width: calc(30% - 16px);
    }
  }

  /* Responsive : 1 colonne sur petits écrans */
  @media (max-width: 480px) {
    .gallery-item {
      flex: 1 1 100%;
      max-width: 100%;
    }
    .gallery-item-small {
      flex: 1 1 100%;
      max-width: 100%;
    }
  }