+
▶
-
Cliquez pour jouer
+
Cliquez pour jouer
diff --git a/src/views/Article.svelte b/src/views/Article.svelte
index 92ea29d..dca6ec2 100644
--- a/src/views/Article.svelte
+++ b/src/views/Article.svelte
@@ -27,6 +27,7 @@
const deactivateBtn = container.querySelector('.iframe-deactivate-btn')
overlay?.addEventListener('click', () => {
+ if (overlay.getAttribute('data-state') === 'ended') return
overlay.style.display = 'none'
iframe.style.pointerEvents = 'auto'
container.classList.add('game-active')
@@ -36,6 +37,7 @@
deactivateBtn?.addEventListener('click', (e) => {
e.stopPropagation()
overlay.style.display = 'flex'
+ overlay.setAttribute('data-state', 'initial')
iframe.style.pointerEvents = 'none'
container.classList.remove('game-active')
})
@@ -371,24 +373,129 @@
/* --- Bloc jeu iframe --- */
.article-body :global(.iframe-game-container) {
position: relative;
- display: inline-block;
+ width: 100%;
+ height: auto;
+ border-radius: 8px;
+ overflow: hidden;
+ margin: 2rem 0;
+ }
+
+ .article-body :global(.iframe-game-container iframe) {
+ border: none;
+ display: block;
+ width: 100%;
+ transition: filter 0.3s ease;
}
.article-body :global(.iframe-click-overlay) {
position: absolute;
- inset: 0;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
display: flex;
- flex-direction: column;
align-items: center;
justify-content: center;
+ z-index: 10;
cursor: pointer;
+ transition: all 0.3s ease;
+ background: rgba(13, 14, 34, 0.90);
+ backdrop-filter: blur(5px);
+ }
+
+ .article-body :global(.iframe-click-overlay[data-state="initial"]) {
+ background: rgba(13, 14, 34, 0.98);
+ backdrop-filter: blur(5px);
+ border: 1px solid rgba(77, 252, 161, 0.3);
+ }
+
+ .article-body :global(.iframe-click-overlay[data-state="initial"]:hover) {
+ border-color: rgba(77, 252, 161, 0.6);
+ }
+
+ .article-body :global(.iframe-click-overlay[data-state="ended"]) {
+ background: rgba(13, 14, 34, 0.10);
+ backdrop-filter: none;
+ border: 2px solid #4DFCA1;
+ cursor: default;
+ }
+
+ .article-body :global(.overlay-content) {
+ text-align: center;
+ color: white;
+ user-select: none;
+ padding: 20px;
+ }
+
+ .article-body :global(.play-icon) {
+ width: 60px;
+ height: 60px;
+ background: linear-gradient(135deg, #4DFCA1 0%, #04fea0 100%);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0 auto 16px auto;
+ font-size: 24px;
+ color: black;
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
+ box-shadow: 0 4px 15px rgba(77, 252, 161, 0.3);
+ }
+
+ .article-body :global(.iframe-click-overlay[data-state="initial"]:hover .play-icon) {
+ transform: scale(1.1);
+ box-shadow: 0 6px 20px rgba(77, 252, 161, 0.5);
+ }
+
+ .article-body :global(.overlay-message) {
+ font-family: "Danzza", sans-serif;
+ font-size: 16px;
+ font-weight: 600;
+ margin: 0;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ color: white;
+ }
+
+ .article-body :global(.iframe-click-overlay[data-state="ended"] .overlay-message) {
+ font-size: 20px;
+ font-weight: 700;
+ color: #4DFCA1;
}
.article-body :global(.iframe-deactivate-btn) {
position: absolute;
- top: 8px;
- right: 8px;
+ top: 15px;
+ right: 15px;
+ width: 40px;
+ height: 40px;
+ background: rgba(0, 0, 0, 0.7);
+ color: white;
+ border: 2px solid #04fea0;
+ border-radius: 50%;
cursor: pointer;
+ font-size: 16px;
+ font-weight: bold;
+ z-index: 11;
+ opacity: 0;
+ transition: opacity 0.3s ease;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .article-body :global(.iframe-deactivate-btn:hover) {
+ background: #4DFCA1;
+ color: black;
+ transform: scale(1.1);
+ }
+
+ .article-body :global(.iframe-game-container.game-active:hover .iframe-deactivate-btn) {
+ opacity: 1;
+ }
+
+ .article-body :global(.iframe-game-container.game-active) {
+ box-shadow: 0 0 0 2px rgba(77, 252, 161, 0.5);
}
/* --- Recommandations --- */