/* 1. CENTRER LE SITE : On fixe la largeur et on centre la boîte au milieu */
.md-grid {
    max-width: 1200px;    /* Largeur idéale pour simuler AideDD sur grand écran */
    margin-left: auto;    /* Pousse le vide à gauche */
    margin-right: auto;   /* Pousse le vide à droite */
    display: flex;
}

/* 2. SUPPRIMER LA COLONNE DE DROITE : On enlève le menu invisible qui décale tout */
.md-sidebar--secondary {
    display: none !important;
}

/* 3. ÉLARGIR LE CONTENU : Le texte prend tout l'espace restant dans la colonne centrée */
.md-content {
    flex-grow: 1;
}

.md-content__inner {
    max-width: 100%
}

/* 4. RÉGLAGES DE LECTURE (Police et Justification) */
.md-typeset {
    font-size: 17px;
}

.md-typeset p {
    text-align: justify;
    hyphens: auto;
}

/* 5. IMAGE À DROITE : Elle se collera proprement au bord droit de la zone centrée */
img[align="right"] {
    margin-left: 30px;
    margin-bottom: 20px;
    margin-top: 5px;
    border-radius: 5px;
}

.magic {
  font-size: 1.4em !important;
  font-weight: bold !important;
  color: #822000 !important;
  display: inline-block !important;
  margin-top: 0.2em !important;
}

/* --- STYLE DES TITRES FAÇON AIDEDD --- */

.md-typeset h1 {
  margin-top: 0.3em !important;
  margin-bottom: 0.2rem !important;
}

.md-typeset h2 {
  margin-top: 0.5em !important;
  margin-bottom: 0.25rem !important;
}

.md-typeset h3 {
  margin-top: 0.4em !important;
  margin-bottom: 0.2rem !important;
}

/* Titre principal (H1) */
.md-typeset h1 {
    color: #822000;      /* Le rouge sombre typique de D&D */
    font-weight: bold;
    font-variant: small-caps; /* Optionnel : met les titres en petites majuscules pour le look pro */
}

/* Titres de sections (H2) */
.md-typeset h2 {
    color: #822000;
    font-weight: bold;
    border-bottom: none; /* On enlève le soulignement par défaut de MkDocs */
}

/* Titres de sections (H3) */
.md-typeset h3 {
	font-size: 1.6em !important;
    font-weight: bold;
    border-bottom: none; /* On enlève le soulignement par défaut de MkDocs */
}

/* La barre interligne (Horizontal Rule) */
.md-typeset hr {
    background-color: #822000; /* Couleur de la ligne */
    height: 2px;               /* Épaisseur de la ligne */
    border: none;
    margin-top: 0;             /* Pour qu'elle soit proche du titre */
    margin-bottom: 1rem;
}

/* réduit l'espace entre le titre et la liste, et entre les items */

.md-typeset ul {
  margin-top: 0.2rem !important;    /* espace entre titre et liste */
  margin-bottom: 0.6rem !important;
  padding-left: 1.1rem !important;  /* indentation */
}

.md-typeset ul li {
  margin: 0.16rem 0 !important;     /* espace entre chaque item */
  line-height: 1.25 !important;
}

/* si tu utilises des listes inline (p.ex. <p> - **X** : ...), forcer des retours */
.md-typeset p > strong:first-child + span {
  display: block;
  margin-bottom: 0.2rem;
}

.md-typeset p {
  margin-top: 0.2em !important;
  margin-bottom: 0.2em !important;
}

/* =========================
   Table style "D&D grimoire"
   ========================= */

/* conteneur */
.table-dnd {
  overflow-x: auto !important;
  display: block !important;
  margin: 0 auto !important;
  width: fit-content !important;
}

/* tableau */
.table-dnd table {
  width: auto !important;
  max-width: none !important;
  border-collapse: collapse !important;
  font-size: 0.65rem !important;
  table-layout: auto !important;
}

.table-dnd td:nth-child(4) {
  min-width: 140px !important; /* Attaque */
}

.table-dnd::-webkit-scrollbar {
  height: 6px;
}

/* cellules */
.table-dnd th,
.table-dnd td {
  padding: 1px 3px !important; /* 👈 un peu plus compact */
  white-space: nowrap !important; /* 👈 empêche l'étirement */
}

.table-dnd td {
  border-bottom: 1px solid #ddd !important;
}

/* headers */
.table-dnd th {
  line-height: 1.2 !important;
  width: 1% !important; /* 👈 force le minimum */
}

.table-dnd th {
  width: 1% !important;
  white-space: nowrap !important;
  padding: 1px 6px !important;
}

/* colonnes numériques */
.table-dnd td:nth-child(1),
.table-dnd td:nth-child(2),
.table-dnd td:nth-child(4),
.table-dnd td:nth-child(5),
.table-dnd td:nth-child(6),
.table-dnd td:nth-child(7) {
  width: auto !important;
  text-align: center !important;
}

/* colonne aptitudes */
.table-dnd td:nth-child(3),
.table-dnd th:nth-child(3) {
  min-width: 220px !important;
}

.table-dnd tbody tr:nth-child(even) {
  background: #FFFFFF !important;
}

.table-dnd tbody tr:nth-child(odd) {
  background: #f2ede3 !important;
}

@media (max-width: 900px) {
  .table-dnd table {
    font-size: 0.8rem !important;
  }
}

/* Bloc sort D&D */
.spell {
  border-left: 4px solid #822000;
  background: #f7f3ed;
  padding: 12px 16px;
  margin: 1em 0;
  border-radius: 6px;
}

/* Titre du sort */
.spell-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #822000;
}

/* Sous-titre (niveau + école) */
.spell-subtitle {
  font-style: italic;
  color: #555;
  margin-bottom: 8px;
}

/* Ligne d’info */
.spell p {
  margin: 0.2em 0 !important;
}

/* Labels (Temps, Portée...) */
.spell strong {
  color: #333;
}

.monster-block {
  background: #f4ecd8;
  border: 3px solid #7a1e1e;
  border-radius: 6px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-family: "Roboto Slab", serif;
}

.monster-header {
  font-size: 28px;
  font-weight: bold;
  color: #7a1e1e;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.monster-sub {
  font-style: italic;
  margin-bottom: 10px;
}

.monster-block hr {
  border: none;
  border-top: 3px solid #7a1e1e;
  margin: 15px 0;
}

.monster-stats {
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.monster-stats span {
  flex: 1;
}

.monster-block strong {
  color: #7a1e1e;
}

h4 {
  color: #7a1e1e;
  text-transform: uppercase;
}

.monster-divider {
  height: 3px;
  background: #922610;
  width: 70%;
  margin: 12px 0 12px 0; /* ← plus centré */
}

.monster-section-title {
  font-weight: bold;
  text-transform: uppercase;
  color: #922610;
  border-bottom: 1px solid #922610;
  padding-bottom: 2px;
  margin-top: 15px;
  letter-spacing: 1px;
}

.monster-section-title span {
  text-transform: none;
  font-weight: normal;
}