« Modèle:MiniCard/styles.css » : différence entre les versions
De Nefald
Autres actions
mAucun résumé des modifications |
m flexwrap |
||
| Ligne 5 : | Ligne 5 : | ||
/* Conteneur de grille */ | /* Conteneur de grille */ | ||
.minicard-grid { | .minicard-grid { | ||
display: | display: flex; | ||
flex-wrap: wrap; | |||
gap: 12px; | gap: 12px; | ||
margin: 0 auto 24px auto; | margin: 0 auto 24px auto; | ||
width: 100%; | width: 100%; | ||
/* Les enfants se partagent l'espace équitablement sur chaque ligne */ | |||
justify-content: flex-start; | |||
} | } | ||
| Ligne 25 : | Ligne 26 : | ||
align-items: center; | align-items: center; | ||
height: 60px; | height: 60px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
/* Taille de base : ~6 cartes par ligne, avec le gap déduit */ | |||
flex: 1 1 calc((100% - 5 * 12px) / 6); | |||
min-width: 130px; | |||
} | } | ||
| Ligne 170 : | Ligne 173 : | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.minicard-grid { | .minicard-grid { | ||
gap: 8px; | gap: 8px; | ||
} | } | ||
| Ligne 178 : | Ligne 179 : | ||
font-size: 0.85rem; | font-size: 0.85rem; | ||
height: 52px; | height: 52px; | ||
/* ~3 cartes par ligne sur tablette */ | |||
flex: 1 1 calc((100% - 2 * 8px) / 3); | |||
min-width: 120px; | |||
} | } | ||
| Ligne 191 : | Ligne 195 : | ||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
.minicard-grid { | .minicard-grid { | ||
gap: 6px; | gap: 6px; | ||
} | |||
.minicard { | |||
/* 2 cartes par ligne sur mobile */ | |||
flex: 1 1 calc((100% - 6px) / 2); | |||
min-width: 0; | |||
} | } | ||
} | } | ||
Version du 4 mars 2026 à 15:27
/* =============================================================================
MINICARD - Navigation Pills
============================================================================= */
/* Conteneur de grille */
.minicard-grid {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin: 0 auto 24px auto;
width: 100%;
/* Les enfants se partagent l'espace équitablement sur chaque ligne */
justify-content: flex-start;
}
/* MiniCard individuelle */
.minicard {
position: relative;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
font-weight: 600;
font-size: 0.95rem;
overflow: hidden;
transition: all 0.3s ease;
display: flex;
align-items: center;
height: 60px;
box-sizing: border-box;
/* Taille de base : ~6 cartes par ligne, avec le gap déduit */
flex: 1 1 calc((100% - 5 * 12px) / 6);
min-width: 130px;
}
.minicard:hover {
border-color: rgba(74, 158, 255, 0.4);
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
/* Background avec image */
.minicard-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
overflow: hidden;
z-index: 0;
}
.minicard-background img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.4s ease;
}
.minicard:hover .minicard-background img {
transform: scale(1.1);
}
/* Overlay sombre */
.minicard-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
135deg,
rgba(0, 0, 0, 0.7) 0%,
rgba(0, 0, 0, 0.5) 50%,
rgba(0, 0, 0, 0.7) 100%
);
transition: opacity 0.3s ease;
z-index: 0;
}
.minicard:hover .minicard-overlay {
opacity: 0.6;
}
/* Liens internes */
.minicard > a:not(.minicard-link-external) {
position: relative;
z-index: 1;
padding: 0 16px;
width: 100%;
height: 100%;
display: flex;
align-items: center;
color: #ffffff !important;
text-decoration: none !important;
text-shadow:
-1px -1px 4px rgba(0, 0, 0, 0.8),
1px 1px 4px rgba(0, 0, 0, 0.8),
0 0 8px rgba(0, 0, 0, 0.6);
transition: all 0.3s ease;
}
.minicard:hover > a:not(.minicard-link-external) {
padding-left: 20px;
text-shadow:
-1px -1px 6px rgba(0, 0, 0, 0.9),
1px 1px 6px rgba(0, 0, 0, 0.9),
0 0 12px rgba(74, 158, 255, 0.5);
}
/* Liens externes */
.minicard-link-external {
position: relative;
z-index: 1;
padding: 0 16px;
width: 100%;
height: 100%;
display: flex !important;
align-items: center;
color: #ffffff !important;
text-decoration: none !important;
text-shadow:
-1px -1px 4px rgba(0, 0, 0, 0.8),
1px 1px 4px rgba(0, 0, 0, 0.8),
0 0 8px rgba(0, 0, 0, 0.6);
font-weight: 600;
font-size: 0.95rem;
transition: all 0.3s ease;
cursor: pointer;
}
.minicard:hover .minicard-link-external {
padding-left: 20px;
text-shadow:
-1px -1px 6px rgba(0, 0, 0, 0.9),
1px 1px 6px rgba(0, 0, 0, 0.9),
0 0 12px rgba(74, 158, 255, 0.5);
}
/* Icône externe */
.minicard-external-icon {
margin-left: 4px;
font-size: 0.85rem;
opacity: 0.7;
transition: opacity 0.3s ease;
}
.minicard:hover .minicard-external-icon {
opacity: 1;
}
/* Texte sans lien */
.minicard-text {
position: relative;
z-index: 1;
padding: 0 16px;
color: #ffffff;
text-shadow:
-1px -1px 4px rgba(0, 0, 0, 0.8),
1px 1px 4px rgba(0, 0, 0, 0.8),
0 0 8px rgba(0, 0, 0, 0.6);
}
/* Version sans image (fallback) */
.minicard.minicard--no-image {
background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}
.minicard.minicard--no-image:hover {
background: linear-gradient(135deg, rgba(74, 158, 255, 0.15) 0%, rgba(74, 158, 255, 0.05) 100%);
}
/* Responsive tablette */
@media (max-width: 768px) {
.minicard-grid {
gap: 8px;
}
.minicard {
font-size: 0.85rem;
height: 52px;
/* ~3 cartes par ligne sur tablette */
flex: 1 1 calc((100% - 2 * 8px) / 3);
min-width: 120px;
}
.minicard > a:not(.minicard-link-external),
.minicard-link-external,
.minicard-text {
padding: 0 12px;
font-size: 0.85rem;
}
}
/* Responsive mobile */
@media (max-width: 480px) {
.minicard-grid {
gap: 6px;
}
.minicard {
/* 2 cartes par ligne sur mobile */
flex: 1 1 calc((100% - 6px) / 2);
min-width: 0;
}
}