Modèle:ButtonLink/styles.css
De Nefald
Autres actions
/* ============================================
WRAPPER PRINCIPAL
============================================ */
.button-link-wrapper {
min-height: 80px;
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: stretch; /* ⬅️ CHANGÉ */
}
.button-link-wrapper:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* ============================================
CONTENU PRINCIPAL
============================================ */
.button-link-content {
width: 100%;
display: flex; /* ⬅️ AJOUTÉ */
align-items: center; /* ⬅️ AJOUTÉ */
}
.button-link-content a {
color: white !important;
text-decoration: none !important;
display: flex;
align-items: center;
width: 100%;
padding: 1rem;
gap: 1rem; /* ⬅️ Espacement entre image et texte */
}
.button-link-content a:hover,
.button-link-content a:visited {
color: white !important;
}
/* ============================================
CONTENEUR IMAGE
============================================ */
.button-link-image-container {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 120px; /* ⬅️ Réduit */
height: 100%; /* ⬅️ Prend toute la hauteur disponible */
overflow: hidden;
background: transparent;
}
.button-link-image-container .mw-file-description {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
padding: 0.5rem; /* ⬅️ Petit padding interne */
}
.button-link-image-container img {
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
object-fit: contain;
display: block;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
/* ============================================
TEXTE DU BOUTON
============================================ */
.button-link-text {
flex: 1; /* ⬅️ Prend l'espace restant */
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
min-width: 0; /* ⬅️ Permet au texte de se réduire si besoin */
}
.button-link-text strong {
font-size: 1.1em;
display: block;
margin-bottom: 0.25rem;
}
/* ============================================
POSITIONNEMENT QR CODE
============================================ */
/* QR Code à GAUCHE (défaut) */
.button-link--imagepos-left .button-link-content a {
flex-direction: row;
}
.button-link--imagepos-left .button-link-text {
text-align: left;
}
/* QR Code à DROITE */
.button-link--imagepos-right .button-link-content a {
flex-direction: row-reverse;
}
.button-link--imagepos-right .button-link-text {
text-align: right;
}
/* QR Code CENTRÉ (pas de texte) */
.button-link--imagepos-center .button-link-content a {
justify-content: center;
}
.button-link--imagepos-center .button-link-image-container {
width: 200px; /* ⬅️ Plus grand quand centré */
}
.button-link--imagepos-center .button-link-text {
display: none;
}
/* ============================================
ALIGNEMENT DU BOUTON
============================================ */
.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;
}
/* Masquer l'icône de lien externe */
.button-link-content a.external::after {
display: none !important;
}