/* ==========================================================================
   Mon Super Board - board-core.css (Variables & Base)
   Fichier principal : contient UNIQUEMENT les variables CSS et les styles
   de base du plugin. Les styles spécifiques sont dans les modules séparés.
   ========================================================================== */

/* ==========================================================================
   Variables CSS (Couleurs, Polices, Espacements)
   ========================================================================== */
:root {
  /* Couleurs Primaires (Thème Sombre inspiré LoL Boards) */
  --clr-bg-page: #0A0A0E;                     /* Fond général très sombre, presque noir */
  --clr-bg-container: #101820;               /* Fond des conteneurs principaux (un peu plus clair) */
  --clr-bg-element: #1A2028;                 /* Fond pour éléments (sujets, commentaires, champs) */
  --clr-bg-element-hover: #202831;           /* Hover pour les éléments */
  --clr-bg-sidebar: #0D131A;                 /* Fond de la sidebar gauche */
  --clr-bg-header-bar: #010A13;               /* Fond pour la barre "FORUM" / Titre du sujet */

  --clr-text-primary: #C8C8C8;               /* Texte principal (gris clair) */
  --clr-text-secondary: #7E7E7E;             /* Texte secondaire (meta, labels, etc.) */
  --clr-text-heading: #F0F0F0;               /* Titres (blanc cassé) */
  --clr-text-link: #CDA158;                  /* Liens (doré LoL) */
  --clr-text-link-hover: #E8C37E;            /* Hover des liens */
  --clr-text-on-accent: #0A0A0E;             /* Texte sur fond doré (pour contraste) */

  /* Accents */
  --clr-accent-gold: #CDA158;                /* Doré principal */
  --clr-accent-gold-darker: #A77E36;          /* Doré plus foncé pour hover/boutons */
  --clr-accent-blue-highlight: #0BC6E3;       /* Bleu pour certains highlights ou icônes (optionnel) */
    --clr-accent-gold-rgb: 205, 161, 88;

  /* Bordures & Séparateurs */
  --clr-border-primary: #252F3B;             /* Bordures subtiles pour conteneurs */
  --clr-border-secondary: #353F4D;           /* Bordures pour éléments internes (champs) */
  --clr-border-accent: var(--clr-accent-gold);/* Bordure dorée */
  --clr-divider: var(--clr-border-primary);  /* Lignes de séparation */

  --clr-bg-comment-primary: #1A2028; /* Votre "bleu clair" (fond de base des éléments) */
  --clr-bg-comment-secondary: #101820;

  --clr-bg-page-rgb: 10, 10, 14;         /* Pour #0A0A0E */
  --clr-bg-element-rgb: 26, 32, 40;    /* Pour #1A2028 */
  --clr-bg-element-pinned: #1E2A3A;

  /* Typographie */
  --font-base: "Helvetica Neue", Helvetica, Arial, sans-serif; /* Alternative à Beaufort */
  --font-size-base: 0.875rem;
  --font-size-sm: 0.75rem;
  --font-size-lg: 1rem;
  --font-size-xl: 1.25rem;
  --font-size-xxl: 1.75rem;
  --line-height-base: 1.5;
  --line-height-content: 1.7;

  /* Espacements */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Chanfreins */
  --cut-sm: 8px;
  --cut-md: 12px;
  --chamfer-sm: polygon(
      var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)),
      calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm)
  );
  --chamfer-md: polygon(
      var(--cut-md) 0, 100% 0, 100% calc(100% - var(--cut-md)),
      calc(100% - var(--cut-md)) 100%, 0 100%, 0 var(--cut-md)
  );

  /* Autres */
  --border-radius: 3px;
  --max-width-forum: 1500px;
}

/* ==========================================================================
   Styles de Base pour le Contenu du Plugin
   ========================================================================== */
.msb-lol-forum-wrapper,
.msb-lol-single-thread-page { /* Appliqué sur <main> dans single-lol_forum_thread.php */
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--clr-text-primary);
}

.msb-lol-forum-wrapper a,
.msb-lol-single-thread-page a {
    color: var(--clr-text-link);
    text-decoration: none;
}
.msb-lol-forum-wrapper a:hover,
.msb-lol-single-thread-page a:hover {
    color: var(--clr-text-link-hover);
    text-decoration: underline;
}

.msb-lol-forum-wrapper h1, .msb-lol-forum-wrapper h2, .msb-lol-forum-wrapper h3, .msb-lol-forum-wrapper h4,
.msb-lol-single-thread-page h1, .msb-lol-single-thread-page h2, .msb-lol-single-thread-page h3, .msb-lol-single-thread-page h4 {
    font-weight: 500;
    color: var(--clr-text-heading);
    margin-top: 0;
    margin-bottom: var(--space-md); /* Espacement par défaut sous les titres */
}

/* Utilitaires (optionnel) */
.msb-lol-screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}


/* ==========================================================================
   Conteneur Principal (Sidebar + Contenu) - Pour l'alignement
   ========================================================================== */
.msb-lol-content-wrapper-outer {
    max-width: var(--max-width-forum);
    margin: var(--space-lg) auto;
    padding: 0; /* Les bordures dorées de la sidebar/content s'aligneront avec le header-bar-inner */
                /* Si vous voulez un retrait, ajoutez du padding ici ex: padding: 0 var(--space-lg); */
}

.msb-lol-main-container {
  display: flex;
  gap: var(--space-lg);
}

/* ==========================================================================
   Catégories de la Sidebar (hiérarchie)
   ========================================================================== */
.msb-lol-parent-category-title {
    display: block;
    padding: var(--space-sm) var(--space-xs);
    color: var(--clr-text-heading);
    font-weight: bold;
    font-size: calc(var(--font-size-base) * 1.1);
    cursor: default;
    margin-top: var(--space-sm);
}

.msb-lol-parent-category-title.active-parent-group {
    color: var(--clr-accent-gold);
}

/* Style de base pour les listes enfants (niveau 1, 2, 3...) */
.msb-lol-child-board-list {
    list-style: none;
    padding: 0;
    margin: var(--space-xs) 0 0 var(--space-md); /* Indentation de base pour chaque niveau */
}

.msb-lol-child-board-list.depth-2 {
    margin-left: var(--space-lg); /* Augmente l'indentation pour le niveau 2 */
}
.msb-lol-child-board-list.depth-3 {
    margin-left: var(--space-xl); /* Encore plus pour le niveau 3 */
}


.msb-lol-child-board-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    color: var(--clr-text-secondary);
    font-size: var(--font-size-base);
    font-weight: normal;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease;
}

/* Supprime la bordure inférieure du lien dans le DERNIER li du menu principal */
.msb-lol-boards-list > ul > li:last-child > a {
    border-bottom: none;
}

/* Supprime la bordure inférieure du lien dans le DERNIER li d'une sous-liste (enfant) */
.msb-lol-boards-list .msb-lol-child-board-list li:last-child > a {
    border-bottom: none;
}


.msb-lol-child-board-list li a:hover,
.msb-lol-child-board-list li a.active {
    color: var(--clr-text-link);
}

.msb-lol-child-board-list li a .msb-lol-board-count {
    font-size: var(--font-size-sm);
    color: inherit;
}

.msb-lol-category-separator {
    list-style-type: none;
    padding: 0;
    margin: var(--space-sm) 0;
}

.msb-lol-hr-separator {
    border: none;
    height: 1px;
    background-color: var(--clr-divider);
    margin: 0;
}

html.light-mode .msb-lol-forum-wrapper h1,
html.light-mode .msb-lol-forum-wrapper h2,
html.light-mode .msb-lol-forum-wrapper h3,
html.light-mode .msb-lol-forum-wrapper h4,
html.light-mode .msb-lol-single-thread-page h1,
html.light-mode .msb-lol-single-thread-page h2,
html.light-mode .msb-lol-single-thread-page h3,
html.light-mode .msb-lol-single-thread-page h4 {
    color: var(--color-text-heading, #4A3B31);
}

html.light-mode .msb-lol-parent-category-title {
    color: var(--color-text-heading, #4A3B31);
}
html.light-mode .msb-lol-parent-category-title.active-parent-group {
    color: var(--clr-accent-gold);
}
html.light-mode .msb-lol-child-board-list li a {
    color: var(--color-text-secondary);
}
html.light-mode .msb-lol-child-board-list li a:hover,
html.light-mode .msb-lol-child-board-list li a.active {
    color: var(--clr-text-link);
}
html.light-mode .msb-lol-hr-separator {
    background-color: var(--clr-divider, #E0D5C1);
}
