MediaWiki:Timeless.css

De WikiPerche
(diff) ← Version précédente | Version actuelle (diff) | Version suivante → (diff)

Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
  • Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
  •  Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
/* Tout CSS placé ici sera chargé avec les pages accédées par les utilisateurs de l’habillage Timeless */

/* ============================================================
   Thème « Perche Nogentais » — COMPATIBLE TIMELESS
   ============================================================ */

/* ---------- Fond de page ---------- */
body {
  background: linear-gradient(180deg, #dfe7d4 0%, var(--couleur-fond, #f7f5ef) 340px);
  color: var(--couleur-texte, #26251f);
  box-sizing: border-box; /* Important pour les bordures */
}

/* ---------- Logo et titre ---------- */
#mw-header, .mw-wiki-title, .ts-logo {
  background: transparent;
}
.mw-wiki-title a, .ts-logo a {
  color: #2f5233;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ---------- Barre de navigation ---------- */
#site-navigation, #site-tools, #user-tools {
  border: 1px solid #d9d5c7;
  border-radius: 6px;
  background: rgba(238, 240, 228, .9);
  padding: .3em .5em;
  box-shadow: 0 1px 3px rgba(47, 82, 51, .08);
  /* Pas de display: block ou width: 100% */
}
#site-navigation .sidebar-chunk h2,
#site-tools .sidebar-chunk h2,
#user-tools .sidebar-chunk h2 {
  color: #2f5233;
  border-bottom: 2px solid #8c5a2b;
  font-size: 1em;
}
#site-navigation a, #site-tools a, #user-tools a {
  color: #26251f;
}
#site-navigation a:visited, #site-tools a:visited {
  color: #26251f;
}
#site-navigation li:hover, .ts-inner .sidebar-inner li:hover {
  background: #eef0e4;
  border-radius: 4px;
}

/* ---------- Onglets page/discussion ---------- */
#p-page-tools, .toolset {
  border: none;
}
#p-page-tools li.selected a, .ns-talk .toolset a:hover {
  color: #2f5233;
  font-weight: 600;
}

/* ---------- Contenu principal ---------- */
#mw-content, .mw-body {
  background: #ffffff;
  border: 1px solid #d9d5c7;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(47, 82, 51, .10);
  padding: 1.4em;
  box-sizing: border-box; /* Évite les débordements */
}

/* ---------- Table des matières ---------- */
#toc, .toc {
  background: transparent;
  border: none;
  padding-left: 0;
}
#toc::after {
  content: none;
}

/* ---------- Tableaux ---------- */
table.wikitable > caption, table.infobox .infobox-title {
  background: #2f5233;
  color: #ffffff;
  border-radius: 6px 6px 0 0;
}

/* ---------- Pied de page ---------- */
#footer, .footer {
  background: transparent;
  border-top: 2px solid #8c5a2b;
  color: #55524a;
}
#footer a {
  color: #2b6cb0;
}

/* ---------- Liens [modifier] ---------- */
.mw-editsection a {
  color: #8c5a2b;
}

/* ---------- Layout large : ajustements visuels uniquement ---------- */
@media screen and (min-width: 1100px) {
  .ts-inner {
    /* Pas de max-width ou padding horizontal */
    border-left: 2px solid #eef0e4; /* Style visuel uniquement */
  }
  #site-navigation:not(:empty)::before,
  #site-tools:not(:empty)::before {
    border-left: 2px solid #eef0e4;
  }
}

/* ---------- Mobile : conservez la structure ---------- */
@media screen and (max-width: 720px) {
  body {
    background: #f7f5ef;
  }
  #mw-content, .mw-body {
    padding: .8em;
    /* Gardez les bordures si Timeless les utilise */
    border-left: 1px solid #d9d5c7;
    border-right: 1px solid #d9d5c7;
  }
  #site-navigation, #site-tools, #user-tools {
    /* Ne pas supprimer les propriétés structurelles */
    background: transparent;
    box-shadow: none;
  }
  table.infobox {
    float: none;
    width: 100% !important;
    margin: 0 0 1em 0;
  }
}

/* ---------- Mode sombre ---------- */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(180deg, #171d14 0%, #12160f 340px);
    color: #e9e7dc;
  }
  #site-navigation, #site-tools, #user-tools {
    background: rgba(32, 38, 29, .95);
    border-color: #333b2e;
  }
  #site-navigation .sidebar-chunk h2,
  #site-tools .sidebar-chunk h2,
  #user-tools .sidebar-chunk h2 {
    color: #a9c79b;
    border-bottom-color: #8c5a2b;
  }
  #site-navigation a, #site-tools a, #user-tools a {
    color: #e9e7dc;
  }
  #mw-content, .mw-body {
    background: #1a2018;
    border-color: #333b2e;
    color: #e9e7dc;
  }
  .mw-body h1, .mw-body h2, .mw-body h3 {
    color: #a9c79b;
  }
  #footer {
    color: #9aa292;
  }
}