Modèle:IconButton/styles.css
De Nefald
Autres actions
/* ============================================
ICON BUTTON - Boutons icônes compacts
============================================ */
.icon-button {
border-radius: 8px;
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: relative;
background: #6c757d;
display: inline-flex;
align-items: center;
justify-content: center;
margin: 4px;
vertical-align: middle;
}
/* Bouton carré (sans texte) */
.icon-button:not(.icon-button--with-text) {
width: 60px;
height: 60px;
}
/* Bouton rectangulaire (avec texte) */
.icon-button--with-text {
width: auto;
min-width: 180px;
height: 50px;
padding: 0 20px;
}
.icon-button:hover {
transform: translateY(-2px) scale(1.05);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.icon-button:active {
transform: translateY(0) scale(1);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
/* ========== CONTENEUR INTERNE ========== */
.icon-button-content {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
width: 100%;
height: 100%;
}
.icon-button-content a {
display: flex !important;
align-items: center;
justify-content: center;
gap: 12px;
width: 100%;
height: 100%;
color: white !important;
text-decoration: none !important;
}
/* Sans texte : lien centré avec padding */
.icon-button:not(.icon-button--with-text) .icon-button-content a {
padding: 8px !important;
box-sizing: border-box;
}
/* Avec texte : pas de padding (géré par le conteneur) */
.icon-button--with-text .icon-button-content a {
padding: 0 !important;
}
.icon-button-content a:hover,
.icon-button-content a:visited {
color: white !important;
}
/* ========== ICÔNE ========== */
.icon-button-icon {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
/* Conteneur d'image */
.icon-button-icon .mw-file-description {
display: flex !important;
align-items: center;
justify-content: center;
margin: 0 !important;
padding: 0 !important;
}
/* Sans texte : image prend tout l'espace */
.icon-button:not(.icon-button--with-text) .icon-button-icon .mw-file-description {
width: 100% !important;
height: 100% !important;
}
/* Avec texte : taille fixe */
.icon-button--with-text .icon-button-icon .mw-file-description {
width: 32px !important;
height: 32px !important;
}
/* Image responsive */
.icon-button img {
max-width: 100% !important;
max-height: 100% !important;
width: 100% !important;
height: 100% !important;
object-fit: contain !important;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
/* ========== LABEL TEXTE ========== */
.icon-button-label {
font-size: 15px;
font-weight: 600;
color: white;
white-space: nowrap;
line-height: 1;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* Masquer l'icône de lien externe */
.icon-button a.external::after {
display: none !important;
}
/* ============================================
COULEURS PRÉDÉFINIES
============================================ */
/* ========== RÉSEAUX SOCIAUX ========== */
.icon-button--bluesky { background: #0085ff; }
.icon-button--discord { background: #5865f2; }
.icon-button--facebook { background: #1877f2; }
.icon-button--instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.icon-button--linkedin { background: #0077b5; }
.icon-button--mastodon { background: #6364ff; }
.icon-button--reddit { background: #ff4500; }
.icon-button--snapchat { background: #fffc00; color: #000 !important; }
.icon-button--threads { background: #000000; }
.icon-button--tiktok { background: #000000; }
.icon-button--twitch { background: #9146ff; }
.icon-button--twitter { background: #1da1f2; }
.icon-button--youtube { background: #ff0000; }
/* ========== HÉBERGEMENT DE CODE ========== */
.icon-button--github { background: #24292e; }
.icon-button--gitlab { background: #fc6f23; }
/* ========== SERVICES DE DÉVELOPPEMENT ========== */
.icon-button--codepen { background: #ffffff; }
.icon-button--docker { background: #2496ed; }
.icon-button--gradle { background: #02303a; }
.icon-button--jenkins { background: #d24939; }
.icon-button--kubernetes { background: #326ce5; }
.icon-button--maven { background: #c71a36; }
.icon-button--npm { background: #cb3837; }
.icon-button--stackoverflow { background: #f48024; }
/* ========== MINECRAFT MODLOADERS ========== */
.icon-button--fabric { background: #dbd3c8; }
.icon-button--forge { background: #1e2c42; }
.icon-button--minecraft { background: #62b47a; }
.icon-button--neoforge { background: #ff6b35; }
.icon-button--quilt { background: #8b5cf6; }
/* ========== PLATEFORMES DE PLUGINS ========== */
.icon-button--bukkit { background: #f7931e; }
.icon-button--curseforge { background: #f16436; }
.icon-button--github-releases { background: #238636; }
.icon-button--hangar { background: #0089ff; }
.icon-button--modrinth { background: #1bd96a; }
.icon-button--paper { background: #1a8cff; }
.icon-button--polymart { background: #2196f3; }
.icon-button--purpur { background: #a855f7; }
.icon-button--spigot { background: #ed8106; }
/* ========== PLATEFORMES DE FINANCEMENT ========== */
.icon-button--buymeacoffee { background: #ffdd00; }
.icon-button--helloasso { background: #4C40CF; }
.icon-button--helloasso:hover { background: #3d3fc7; }
.icon-button--kofi { background: #ff5e5b; }
.icon-button--liberapay { background: #f6c915; }
.icon-button--opencollective { background: #7fadf2; }
.icon-button--patreon { background: #ff424d; }
.icon-button--paypal { background: linear-gradient(135deg, #0070ba 0%, #1546a0 100%); }
.icon-button--paypal:hover { background: linear-gradient(135deg, #005ea6 0%, #003087 100%); }
.icon-button--qonto { background: #1d1d1dff; }
.icon-button--stripe { background: #635BFF; }
/* ========== COULEURS STANDARDS ========== */
.icon-button--primary, .icon-button--blue { background: #3366cc; }
.icon-button--secondary, .icon-button--gray, .icon-button--grey { background: #72777d; }
.icon-button--success, .icon-button--green { background: #14866d; }
.icon-button--danger, .icon-button--red { background: #d73333; }
.icon-button--warning, .icon-button--yellow { background: #fc3; }
.icon-button--info, .icon-button--cyan { background: #00b8d4; }
.icon-button--purple, .icon-button--violet { background: #6f42c1; }
.icon-button--pink { background: #d63384; }
.icon-button--orange { background: #fd7e14; }
.icon-button--teal { background: #20c997; }
.icon-button--indigo { background: #6610f2; }
.icon-button--black { background: #000; }
.icon-button--white { background: #fff; }
.icon-button--light { background: #f8f9fa; }
.icon-button--dark { background: #343a40; }
/* ============================================
RESPONSIVE
============================================ */
@media (max-width: 768px) {
.icon-button--with-text {
min-width: 150px;
height: 45px;
padding: 0 16px;
}
.icon-button-label {
font-size: 13px;
}
.icon-button-content {
gap: 8px;
}
.icon-button--with-text .icon-button-icon .mw-file-description {
width: 28px !important;
height: 28px !important;
}
}
/* Mode sombre */
@media (prefers-color-scheme: dark) {
.icon-button {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.icon-button:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
}