Basculer le menu
Changer de menu des préférences
Basculer le menu personnel
Non connecté(e)
Votre adresse IP sera visible au public si vous faites des modifications.

« MediaWiki:Citizen.css » : différence entre les versions

Page de l’interface de MediaWiki
Hiob (discussion | contributions)
m balises code dans tableaux colorées.
Hiob (discussion | contributions)
Aucun résumé des modifications
 
(13 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
/* La totalité du CSS placé ici s’appliquera aux utilisateurs de l’habillage Citizen. */
/* ============================================================
* Mediawiki:Citizen.css — Nefald Wiki
* Palette centralisée OKLCH + support light/dark/auto
* ============================================================ */
 
/* ============================================================
* 1. PALETTE NEFALD — Variables personnalisées
*    Définies sur :root, surchargées par thème
* ============================================================ */


:root {
:root {
--color-progressive-oklch__h: 230;
/* -- Couleur progressive Citizen (hue = teinte principale) -- */
--color-progressive-hsl__h: 205;
/* Bleu-acier Nefald : ajuste __h pour ta teinte de marque */
--color-progressive-oklch__l: 53.25%;
--color-progressive-oklch__c: 0.1679;
--color-progressive-oklch__h: 230;
 
/* -- Palette sémantique Nefald (light par défaut) -- */
/* Success */
--nefald-success-bg: oklch(93% 0.08 145);
--nefald-success-text: oklch(35% 0.12 145);
--nefald-success-border: oklch(75% 0.14 145);
 
/* Danger */
--nefald-danger-bg: oklch(93% 0.07 25);
--nefald-danger-text: oklch(38% 0.14 25);
--nefald-danger-border: oklch(70% 0.16 25);
 
/* Warning */
--nefald-warning-bg: oklch(95% 0.09 85);
--nefald-warning-text: oklch(42% 0.13 75);
--nefald-warning-border: oklch(78% 0.15 85);
 
/* Info */
--nefald-info-bg: oklch(93% 0.06 230);
--nefald-info-text: oklch(38% 0.12 230);
--nefald-info-border: oklch(72% 0.14 230);
 
/* Neutral */
--nefald-neutral-bg: oklch(94% 0.01 230);
--nefald-neutral-text: oklch(40% 0.02 230);
--nefald-neutral-border: oklch(78% 0.02 230);
 
/* Accent (couleur de marque directe) */
--nefald-accent: oklch(53.25% 0.1679 230);
--nefald-accent-subtle: oklch(93% 0.05 230);
}
 
/* -- Mode sombre (manuel) -- */
:root.skin-theme-clientpref-night {
--nefald-success-bg: oklch(28% 0.09 145);
--nefald-success-text: oklch(82% 0.12 145);
--nefald-success-border: oklch(45% 0.12 145);
 
--nefald-danger-bg: oklch(28% 0.09 25);
--nefald-danger-text: oklch(85% 0.10 25);
--nefald-danger-border: oklch(48% 0.14 25);
 
--nefald-warning-bg: oklch(30% 0.09 75);
--nefald-warning-text: oklch(88% 0.12 85);
--nefald-warning-border: oklch(52% 0.14 80);
 
--nefald-info-bg: oklch(28% 0.07 230);
--nefald-info-text: oklch(84% 0.10 230);
--nefald-info-border: oklch(48% 0.12 230);
 
--nefald-neutral-bg: oklch(28% 0.01 230);
--nefald-neutral-text: oklch(82% 0.02 230);
--nefald-neutral-border: oklch(45% 0.02 230);
 
--nefald-accent: oklch(65% 0.18 230);
--nefald-accent-subtle: oklch(28% 0.07 230);
}
}


h1,
/* -- Mode automatique (suit le système) -- */
h2,
@media (prefers-color-scheme: dark) {
h3,
:root.skin-theme-clientpref-os {
h4,
--nefald-success-bg: oklch(28% 0.09 145);
h5,
--nefald-success-text: oklch(82% 0.12 145);
h6,
--nefald-success-border: oklch(45% 0.12 145);
.mw-logo-wordmark,
 
--nefald-danger-bg: oklch(28% 0.09 25);
--nefald-danger-text: oklch(85% 0.10 25);
--nefald-danger-border: oklch(48% 0.14 25);
 
--nefald-warning-bg: oklch(30% 0.09 75);
--nefald-warning-text: oklch(88% 0.12 85);
--nefald-warning-border: oklch(52% 0.14 80);
 
--nefald-info-bg: oklch(28% 0.07 230);
--nefald-info-text: oklch(84% 0.10 230);
--nefald-info-border: oklch(48% 0.12 230);
 
--nefald-neutral-bg: oklch(28% 0.01 230);
--nefald-neutral-text: oklch(82% 0.02 230);
--nefald-neutral-border: oklch(45% 0.02 230);
 
--nefald-accent: oklch(65% 0.18 230);
--nefald-accent-subtle: oklch(28% 0.07 230);
}
}
 
 
/* ============================================================
* 2. TYPOGRAPHIE
* ============================================================ */
 
h1, h2, h3, h4, h5, h6,
.citizen-sticky-header-page-title {
.citizen-sticky-header-page-title {
font-weight: var( --font-weight-medium );
font-weight: var(--font-weight-medium);
}
}


h4,
h4, h5, h6 {
h5,
letter-spacing: 0.0125em;
h6 {
letter-spacing: 0.0125em;
}
}


/* Align icon opacity with skin default */
 
/* Main Logo */
/* ============================================================
.citizen-header__logo {
* 3. TABLEAUX — Classes sémantiques
*    Usage : class="wikitable" + class="table-color-success" sur <td>
* ============================================================ */
 
.table-color-success {
background-color: var(--nefald-success-bg) !important;
color: var(--nefald-success-text) !important;
border-left: 3px solid var(--nefald-success-border) !important;
}
}


.mw-logo-icon {
.table-color-danger {
opacity: var( --opacity-icon-base );
background-color: var(--nefald-danger-bg) !important;
filter: var( --filter-invert );
color: var(--nefald-danger-text) !important;
border-left: 3px solid var(--nefald-danger-border) !important;
}
}


/* === Couleurs de tableaux modernes === */
.table-color-warning {
background-color: var(--nefald-warning-bg) !important;
color: var(--nefald-warning-bg) !important;
border-left: 3px solid var(--nefald-warning-border) !important;
}


/* Transition douce au survol */
.table-color-info {
.table-color-cell {
background-color: var(--nefald-info-bg) !important;
    transition: all 0.2s ease;
color: var(--nefald-info-text) !important;
border-left: 3px solid var(--nefald-info-border) !important;
}
}


/* Effet au survol - légèrement plus foncé */
.table-color-secondary {
.wikitable tr:hover .table-color-cell {
background-color: var(--nefald-neutral-bg) !important;
    filter: brightness(0.95);
color: var(--nefald-neutral-text) !important;
border-left: 3px solid var(--nefald-neutral-border) !important;
}
}


/* Support du mode sombre Citizen */
/* Transition et hover */
@media (prefers-color-scheme: dark) {
.table-color-success,
    .table-color-success { background-color: #1b4332 !important; color: #95d5b2 !important; }
.table-color-danger,
    .table-color-danger { background-color: #641220 !important; color: #ffccd5 !important; }
.table-color-warning,
    .table-color-warning { background-color: #664d03 !important; color: #ffe69c !important; }
.table-color-info,
    .table-color-info { background-color: #052c65 !important; color: #9ec5fe !important; }
.table-color-secondary {
    .table-color-secondary { background-color: #41464b !important; color: #e2e3e5 !important; }
transition: filter 0.2s ease;
}
}


/* Bordures subtiles */
.wikitable tr:hover .table-color-success,
.wikitable .table-color-cell {
.wikitable tr:hover .table-color-danger,
    border-left: 3px solid rgba(0,0,0,0.1);
.wikitable tr:hover .table-color-warning,
.wikitable tr:hover .table-color-info,
.wikitable tr:hover .table-color-secondary {
filter: brightness(0.95);
}
}


/* Accessibilité - focus clavier */
/* Code dans les cellules colorées */
.table-color-cell:focus-within {
.table-color-success code,
    outline: 2px solid currentColor;
.table-color-danger code,
    outline-offset: -2px;
.table-color-warning code,
.table-color-info code,
.table-color-secondary code {
background-color: rgba(0, 0, 0, 0.1) !important;
color: inherit !important;
border: 1px solid rgba(0, 0, 0, 0.15);
padding: 2px 6px;
border-radius: 3px;
font-size: 0.9em;
}
}


/* Style pour les balises code dans les cellules colorées */
:root.skin-theme-clientpref-night .table-color-success code,
[style*="background-color"] code {
:root.skin-theme-clientpref-night .table-color-danger code,
    background-color: rgba(0, 0, 0, 0.1) !important;
:root.skin-theme-clientpref-night .table-color-warning code,
    color: inherit !important;
:root.skin-theme-clientpref-night .table-color-info code,
    border: 1px solid rgba(0, 0, 0, 0.15);
:root.skin-theme-clientpref-night .table-color-secondary code {
    padding: 2px 6px;
background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px;
border-color: rgba(255, 255, 255, 0.15);
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
}
}


/* Variante plus contrastée pour les fonds clairs */
/* Focus accessibilité */
[style*="background-color: #f8f9fa"] code,
.table-color-success:focus-within,
[style*="background-color: #e3f2fd"] code,
.table-color-danger:focus-within,
[style*="background-color: #e8f5e9"] code,
.table-color-warning:focus-within,
[style*="background-color: #fffde7"] code,
.table-color-info:focus-within,
[style*="background-color: #ffebee"] code {
.table-color-secondary:focus-within {
    background-color: rgba(0, 0, 0, 0.08) !important;
outline: 2px solid currentColor;
outline-offset: -2px;
}
}


/* Variante pour les fonds foncés */
 
[style*="background-color: #ced4da"] code,
/* ============================================================
[style*="background-color: #e2e3e5"] code {
* 4. COMMAND PALETTE — Repositionnement desktop
    background-color: rgba(0, 0, 0, 0.15) !important;
* ============================================================ */
 
@media (min-width: 1000px) {
.citizen-command-palette {
left: calc(56px + var(--space-xs)) !important;
top: 2rem !important;
}
}
}




/*
/* ============================================================
  * Menu
  * 5. MENU LATÉRAL (Drawer)
  * Rich format menu to have more hierarchy
  * ============================================================ */
*/
 
/* Remove bottom spacing as it is handled in footer portlet */
/* Suppression de l'espace bas géré par le portlet footer */
.citizen-drawer__menu {
.citizen-drawer__menu {
margin-bottom: 0;
margin-bottom: 0;
padding-bottom: 0;
padding-bottom: 0;
}
}


/* Portlet liens externes — sticky en bas du drawer */
.mw-portlet-External {
.mw-portlet-External {
position: sticky;
position: sticky;
bottom: 0;
bottom: 0;
margin-top: var( --space-md );
margin-top: var(--space-md);
margin-inline: calc( var( --space-xs ) * -1 );
margin-inline: calc(var(--space-xs) * -1);
    padding: var( --space-xs );
padding: var(--space-xs);
border-top: var( --border-base );
border-top: var(--border-base);
backdrop-filter: var( --backdrop-filter-frosted-glass );
backdrop-filter: var(--backdrop-filter-frosted-glass);
font-size: var( --font-size-x-small );
font-size: var(--font-size-x-small);
grid-column: 1 / -1;
grid-column: 1 / -1;
white-space: nowrap;
white-space: nowrap;
}
}


.mw-portlet-External .citizen-menu__heading {
.mw-portlet-External .citizen-menu__heading {
display: none;
display: none;
}
}


.mw-portlet-External ul {
.mw-portlet-External ul {
display: flex;
display: flex;
overflow: auto;
overflow: auto;
}
}


.mw-portlet-External .mw-list-item a {
.mw-portlet-External .mw-list-item a {
gap: 0;
gap: 0;
}
}


/* Label */
/* Labels de section sidebar */
.citizen-drawer__menu [id^="n-sidebar-label-"] a {
.citizen-drawer__menu [id^="n-sidebar-label-"] a {
pointer-events: none;
pointer-events: none;
    margin-left: var( --space-xs );
margin-left: var(--space-xs);
    padding-left: var( --space-md );
padding-left: var(--space-md);
padding-right: var( --space-xs );
padding-right: var(--space-xs);
border-left: 1px solid var( --border-color-base );
border-left: 1px solid var(--border-color-base);
    border-radius: 0;
border-radius: 0;
    letter-spacing: 0.05em;
letter-spacing: 0.05em;
    font-weight: var( --font-weight-normal );
font-weight: var(--font-weight-normal);
    color: var( --color-subtle ) !important;
color: var(--color-subtle) !important;
}
}


/* Icons */
/* Icônes sidebar (masque SVG) */
.citizen-drawer__menu [id^="n-sidebar-icon-"] a {
.citizen-drawer__menu [id^="n-sidebar-icon-"] a {
font-size: 0;
font-size: 0;
    content-visibility: auto;
content-visibility: auto;
 
}
}


.citizen-drawer__menu [id^="n-sidebar-icon-"] a:before {
.citizen-drawer__menu [id^="n-sidebar-icon-"] a:before {
display: block;
display: block;
    content: "";
content: "";
    width: var( --size-icon );
width: var(--size-icon);
    height: var( --size-icon );
height: var(--size-icon);
    background-color: currentColor;
background-color: currentColor;
mask-size: contain;
mask-size: contain;
mask-repeat: no-repeat;
mask-repeat: no-repeat;
mask-position: center;
mask-position: center;
}
}


#n-sidebar-icon-discord a:before {
/* Icônes réseaux sociaux */
mask-image: url( https://wiki.nefald.fr/images/9/9c/Discord_Icons.svg );
#n-sidebar-icon-bluesky a:before  { mask-image: url(https://wiki.nefald.fr/images/2/21/IconButton-bluesky.svg); }
}
#n-sidebar-icon-discord a:before   { mask-image: url(https://wiki.nefald.fr/images/9/9c/Discord_Icons.svg); }
#n-sidebar-icon-facebook a:before  { mask-image: url(https://wiki.nefald.fr/images/9/9c/IconButton-facebook.svg); }
#n-sidebar-icon-ghost a:before    { mask-image: url(https://wiki.nefald.fr/images/f/f6/IconButton-ghost.svg); }
#n-sidebar-icon-gitlab a:before    { mask-image: url(https://wiki.nefald.fr/images/0/01/IconButton-gitlab.svg); }
#n-sidebar-icon-helloasso a:before { mask-image: url(https://wiki.nefald.fr/images/c/c3/IconButton-helloasso.svg); }
#n-sidebar-icon-instagram a:before { mask-image: url(https://wiki.nefald.fr/images/f/f9/ButtonLink-instagram.svg); }
#n-sidebar-icon-mastodon a:before  { mask-image: url(https://wiki.nefald.fr/images/b/b0/IconButton-mastodon.svg); }
#n-sidebar-icon-patreon a:before  { mask-image: url(); }
#n-sidebar-icon-tiktok a:before    { mask-image: url(https://wiki.nefald.fr/images/0/07/IconButton-tiktok.svg); }
#n-sidebar-icon-twitter a:before  { mask-image: url(https://wiki.nefald.fr/images/3/35/ButtonLink-twitter.svg); }
#n-sidebar-icon-youtube a:before  { mask-image: url(https://wiki.nefald.fr/images/6/64/IconButton-youtube.svg); }


#n-sidebar-icon-twitter a:before {
mask-image: url( https://commons.wikimedia.org/wiki/File:X_logo_2023.svg );
}


#n-sidebar-icon-patreon a:before {
/* ============================================================
mask-image: url( );
  * 6. FOOTER
}
* ============================================================ */


/* Footer changes */
.citizen-footer {
.citizen-footer {
padding-block: 6rem;
padding-block: 6rem;
background-color: transparent;
background-color: transparent;
}
}


.citizen-footer__siteinfo {
.citizen-footer__siteinfo {
justify-content: space-between;
justify-content: space-between;
}
 
.citizen-footer__sitetitle mw-logo-icon {
display: none;
}
}


/*.citizen-footer__sitetitle .mw-logo-wordmark {
/* Icônes footer custom */
display: none;
}*/
 
/*
* Footer icons
* We use custom footer icons so we need to fine tune it
*/
#footer-icons a {
#footer-icons a {
border: 0;
border: 0;
padding: 0;
padding: 0;
background: transparent;
background: transparent;
opacity: var( --opacity-icon-base );
opacity: var(--opacity-icon-base);
transition: opacity 250ms ease;
transition: opacity 250ms ease;
}
}


#footer-icons a:hover {
#footer-icons a:hover { opacity: var(--opacity-icon-base--hover); }
opacity: var( --opacity-icon-base--hover );
#footer-icons a:active { opacity: var(--opacity-icon-base--active); }
}
 
#footer-icons a:active {
opacity: var( --opacity-icon-base--active );
}


/* More space between icons */
#footer-icons ul,
#footer-icons ul,
#footer-icons li {
#footer-icons li {
column-gap: var( --space-md );
column-gap: var(--space-md);
}
}


#footer-icons img {
#footer-icons img {
width: auto;
width: auto;
height: 32px;
height: 32px;
}
}
Les témoins (''cookies'') nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de témoins.