diff --git a/css/styles.css b/css/styles.css index 1a29e16..8f1f56b 100644 --- a/css/styles.css +++ b/css/styles.css @@ -1115,6 +1115,46 @@ img { transform: scale(1.2); } +/* Shorts specific styling */ +.short-card { + width: 180px; +} + +.short-thumbnail { + aspect-ratio: 9/16; + height: 320px; + border-radius: 12px; + overflow: hidden; +} + +.short-thumbnail img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; +} + +/* Ajustements pour mobile */ +@media (max-width: 768px) { + .short-card { + width: 150px; + } + + .short-thumbnail { + height: 267px; /* Maintient le ratio 9:16 */ + } +} + +@media (max-width: 480px) { + .short-card { + width: 130px; + } + + .short-thumbnail { + height: 231px; /* Maintient le ratio 9:16 */ + } +} + /* View More Button */ .view-more { display: block; diff --git a/index.php b/index.php index 9778f44..efd1a79 100644 --- a/index.php +++ b/index.php @@ -271,14 +271,34 @@ setSecurityHeaders(); foreach ($shorts as $video): ?>