Modèle:ButtonLink/styles.css
De Nefald
Autres actions
/* ============================================
FIX: RÉINITIALISATION POUR ÉVITER CONFLITS
============================================ */
.button-link-image-container,
.button-link-image-container *,
.button-link-image,
.button-link-image * {
border: none !important;
box-sizing: border-box !important;
}
.button-link-image-container img {
max-width: 100%;
height: auto;
display: block;
}
/* ============================================
MASQUER L'ICÔNE DE LIEN EXTERNE MEDIAWIKI
============================================ */
.button-link-wrapper a.external,
.button-link-wrapper a[href^="http"]::after,
.button-link-wrapper a.external::after {
background-image: none !important;
background: none !important;
padding-right: 0 !important;
content: '' !important;
}
.button-link-wrapper .mw-parser-output a.external {
background: none !important;
padding: 0 !important;
}
/* ============================================
BASE DU BOUTON
============================================ */
.button-link-wrapper {
min-height: 100px;
border-radius: 12px;
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: relative;
background: #6c757d;
display: flex;
align-items: center;
justify-content: center;
}
.button-link-wrapper:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* ============================================
ZONE CLIQUABLE (lien invisible)
============================================ */
.button-link-wrapper > a {
position: absolute !important;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 20;
opacity: 0;
overflow: hidden;
text-indent: -9999px;
display: block !important;
}
.button-link-clickzone {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
}
/* Masquer complètement l'icône et le texte du lien */
.button-link-wrapper > a > .mw-file-description,
.button-link-wrapper > a > img {
display: none !important;
}
/* ============================================
CONTENU DU BOUTON
============================================ */
.button-link-content {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
padding: 20px 30px;
position: relative;
z-index: 10;
pointer-events: none;
width: 100%;
}
/* ============================================
CONTENEUR IMAGE
============================================ */
.button-link-image-container {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border-radius: 8px;
padding: 0.5rem;
min-width: 40px;
max-width: 40px;
min-height: 40px;
max-height: 40px;
background: transparent;
margin: -0.5rem 0.75rem -0.5rem -0.5rem;
overflow: visible; /* Changé de hidden à visible */
}
/* Image à droite : inverser les marges */
.button-link--position-right .button-link-image-container {
margin: -0.5rem -0.5rem -0.5rem 0.75rem;
}
.button-link-image-container .mw-file-description {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.button-link-image-container img {
width: 100%;
height: 100%;
object-fit: contain;
}
/* ============================================
DISPOSITION PAR DÉFAUT : IMAGE CENTRÉE
============================================ */
.button-link--imagepos-center .button-link-content {
flex-direction: column;
text-align: center;
}
/* ============================================
DISPOSITION : IMAGE À GAUCHE
============================================ */
.button-link--imagepos-left .button-link-content {
flex-direction: row;
justify-content: flex-start;
text-align: left;
}
/* ============================================
DISPOSITION : IMAGE À DROITE
============================================ */
.button-link--imagepos-right .button-link-content {
flex-direction: row-reverse;
justify-content: flex-start;
text-align: right;
}
/* ============================================
IMAGE
============================================ */
.button-link-image-container {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
overflow: hidden;
}
.button-link-image {
display: block;
max-width: 100%; /* Ne dépasse pas le conteneur */
max-height: 100%; /* Ne dépasse pas le conteneur */
}
/* ============================================
TEXTE
============================================ */
.button-link-text {
color: white;
font-size: 1.2em;
line-height: 1.4;
font-weight: bold;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
flex: 1;
display: flex;
align-items: center;
}
/* Centrage vertical du texte selon la position */
.button-link--imagepos-center .button-link-text {
justify-content: center;
}
.button-link--imagepos-left .button-link-text {
justify-content: flex-start;
}
.button-link--imagepos-right .button-link-text {
justify-content: flex-end;
}
/* ============================================
COULEURS PRÉDÉFINIES (LOGOS)
============================================ */
/* RÉSEAUX SOCIAUX */
.button-link--bluesky { background: #0085ff; }
.button-link--discord { background: #5865f2; }
.button-link--facebook { background: #1877f2; }
.button-link--github { background: #24292e; }
.button-link--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.button-link--linkedin { background: #0a66c2; }
.button-link--mastodon { background: #6364ff; }
.button-link--reddit { background: #ff4500; }
.button-link--signal { background: #3a76f0; }
.button-link--snapchat { background: #fffc00; }
.button-link--snapchat .button-link-text { color: #000; }
.button-link--telegram { background: #0088cc; }
.button-link--tiktok { background: #000000; }
.button-link--twitch { background: #9146ff; }
.button-link--twitter { background: #1da1f2; }
.button-link--x { background: #000000; }
.button-link--youtube { background: #ff0000; }
/* SERVICES */
.button-link--bandcamp { background: #1da0c3; }
.button-link--deezer { background: #ff0092; }
.button-link--gitlab { background: #fc6d26; }
.button-link--soundcloud { background: #ff5500; }
.button-link--spotify { background: #1db954; }
.button-link--steam { background: #171a21; }
/* JEUX */
.button-link--curseforge { background: #f16436; }
.button-link--minecraft { background: #62b47a; }
.button-link--modrinth { background: #1bd96a; }
.button-link--spigot { background: #ed8106; }
/* FINANCEMENT */
.button-link--buymeacoffee { background: #ffdd00; }
.button-link--buymeacoffee .button-link-text { color: #000; }
.button-link--helloasso { background: #4C40CF; }
.button-link--kofi { background: #ff5e5b; }
.button-link--liberapay { background: #f6c915; }
.button-link--liberapay .button-link-text { color: #000; }
.button-link--opencollective { background: #7fadf2; }
.button-link--patreon { background: #ff424d; }
.button-link--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.button-link--qonto { background: #1d1d1d; }
.button-link--stripe { background: #635BFF; }
/* ============================================
ALIGNEMENT
============================================ */
.button-link--align-left {
width: 450px;
max-width: 100%;
margin-right: auto;
margin-left: 0;
}
.button-link--align-center {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.button-link--align-right {
width: 450px;
max-width: 100%;
margin-left: auto;
margin-right: 0;
}