
.mtpm-app{font-family:system-ui,-apple-system,sans-serif;max-width:900px;margin:auto;color:#29374d}.mtpm-home{text-align:center;padding:24px 10px}.mtpm-home h2{font-size:clamp(30px,6vw,46px);margin:0}.mtpm-home p{font-size:21px}.mtpm-themes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;max-width:570px;margin:25px auto}.mtpm-themes button{background:#f0f7ff;border:2px solid #d9e7f8;border-radius:24px;min-height:165px;font-size:67px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.mtpm-themes span{font-size:23px;font-weight:750}.mtpm-view[hidden]{display:none!important}.mtpm-view{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483000!important;background:#fff8ef;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y;overscroll-behavior:contain;margin:0!important;padding:0!important}.mtpm-slide{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.mtpm-image{width:min(100vw,75vh);height:min(83vh,110vw);object-fit:contain;user-select:none;-webkit-user-drag:none}.mtpm-name{font-size:clamp(26px,6vw,44px);font-weight:800;margin-top:-5vh;color:#33405b}.mtpm-replay,.mtpm-close{position:absolute;top:max(15px,env(safe-area-inset-top));width:66px;height:66px;border-radius:50%;border:0;background:#fff;color:#26354a;font-size:30px;z-index:3;box-shadow:0 4px 15px #0002;cursor:pointer}.mtpm-replay{left:max(15px,env(safe-area-inset-left))}.mtpm-close{right:max(15px,env(safe-area-inset-right))}.mtpm-hint{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));font-size:14px;color:#64748b;pointer-events:none}body.mtpm-lock{overflow:hidden!important}@media(max-width:480px){.mtpm-image{width:100vw;height:78vh}.mtpm-name{font-size:30px;margin-top:-4vh}}

.mtpm-app .mtpm-home h2{color:var(--mtpm-accent,#5878D9)}.mtpm-app .mtpm-themes button{border-color:var(--mtpm-accent,#5878D9);background:color-mix(in srgb,var(--mtpm-accent,#5878D9) 9%,white)}.mtpm-app .mtpm-themes button:focus-visible,.mtpm-app .mtpm-replay:focus-visible,.mtpm-app .mtpm-close:focus-visible{outline:4px solid var(--mtpm-accent,#5878D9);outline-offset:4px}.mtpm-app .mtpm-replay,.mtpm-app .mtpm-close{color:var(--mtpm-accent,#5878D9)}.mtpm-app .mtpm-logo{display:block;max-width:min(300px,70vw);max-height:145px;object-fit:contain;margin:0 auto 16px}.mtpm-app .mtpm-view-logo{position:absolute;z-index:2;top:max(20px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);max-width:135px;max-height:52px;object-fit:contain;pointer-events:none}

/* Version 6.2 : logo principal fluide, 30 % de la largeur visible */
.mtpm-app .mtpm-home .mtpm-logo{width:30vw!important;max-width:100%!important;height:auto!important;max-height:none!important;object-fit:contain;display:block;margin:0 auto 18px}
.mtpm-app .mtpm-home{overflow:hidden}

/* v6.2.1 : ne jamais afficher le logo dans les fiches plein écran */
.mtpm-app .mtpm-view .mtpm-view-logo{display:none!important}

/* v6.7 — photos bord à bord sur tout l'écran, sans bande ni marges */
.mtpm-app .mtpm-view{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;z-index:2147483000!important}
.mtpm-app .mtpm-view .mtpm-slide{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important}
.mtpm-app .mtpm-view .mtpm-image{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;min-width:100%!important;min-height:100%!important;object-fit:cover!important;object-position:center center!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;transform:none!important;user-select:none;-webkit-user-drag:none}
.mtpm-app .mtpm-view .mtpm-name{position:absolute!important;left:0;right:0;bottom:max(36px,env(safe-area-inset-bottom));z-index:2;margin:0!important;padding:12px 70px;text-align:center;color:#fff!important;font-size:clamp(25px,5vw,42px);text-shadow:0 2px 8px #000,0 1px 3px #000;background:linear-gradient(transparent,rgba(0,0,0,.32));pointer-events:none}
.mtpm-app .mtpm-view .mtpm-view-logo{display:none!important}

/* v6.9 — plein écran enfant, commandes uniquement sur l’accueil */
.mtpm-app .mtpm-kiosk-controls{display:flex;justify-content:center;gap:12px;margin:0 auto 12px;flex-wrap:wrap}
.mtpm-app .mtpm-kiosk-controls button,.mtpm-app .mtpm-parent-gate button{background:var(--mtpm-accent,#5878D9);color:#fff;border:0;border-radius:14px;font-size:17px;font-weight:700;padding:13px 17px;cursor:pointer;min-height:48px}
.mtpm-app .mtpm-kiosk-controls button[hidden],.mtpm-app .mtpm-parent-gate[hidden],.mtpm-app .mtpm-fullscreen-note[hidden]{display:none!important}
.mtpm-app .mtpm-fullscreen-note{font-size:15px;color:#8a3b17;margin:8px auto;max-width:600px}
.mtpm-app .mtpm-parent-gate{max-width:420px;margin:10px auto 20px;padding:18px;border:2px solid var(--mtpm-accent,#5878D9);border-radius:18px;background:#fff}
.mtpm-app .mtpm-gate-question{display:block;font-weight:750;font-size:19px;margin-bottom:10px}
.mtpm-app .mtpm-gate-answer{display:block;width:130px;max-width:100%;margin:0 auto 12px;font-size:24px;padding:9px;border:2px solid #9ba6b8;border-radius:10px;text-align:center}
.mtpm-app .mtpm-gate-feedback{color:#a52727;font-size:15px}
.mtpm-app:fullscreen,.mtpm-app:-webkit-full-screen{width:100vw!important;max-width:none!important;height:100vh!important;height:100dvh!important;overflow-y:auto;background:#fff8ef;margin:0!important;overscroll-behavior:contain}
.mtpm-app:fullscreen .mtpm-home,.mtpm-app:-webkit-full-screen .mtpm-home{min-height:100%;padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom));box-sizing:border-box}
.mtpm-app:fullscreen .mtpm-view,.mtpm-app:-webkit-full-screen .mtpm-view{z-index:2147483000!important}
.mtpm-app .mtpm-kiosk-controls button:focus-visible,.mtpm-app .mtpm-parent-gate button:focus-visible{outline:3px solid #1c3e70;outline-offset:3px}

/* v6.10 - mode immersif de repli lorsque le navigateur refuse Fullscreen API */
.mtpm-app.mtpm-fullscreen-active{position:fixed!important;inset:0!important;z-index:2147482000!important;width:100vw!important;height:100dvh!important;max-width:none!important;overflow-y:auto!important;overscroll-behavior:contain;background:#fff8ef!important;margin:0!important;padding:0!important}
.mtpm-app .mtpm-music-toggle{border:2px solid var(--mtpm-accent,#5878D9);background:#fff;color:#344055;padding:9px 16px;border-radius:14px;font-size:15px;font-weight:650;cursor:pointer}
.mtpm-app .mtpm-themes{max-width:720px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:650px){.mtpm-app .mtpm-themes{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v6.11: paysage de fond interchangeable et grille adaptative */
.mtpm-app .mtpm-home{background-image:linear-gradient(#ffffff36,#ffffff22),var(--mtpm-home-bg);background-size:cover;background-position:center;min-height:100dvh;box-sizing:border-box;border-radius:18px;padding:22px 12px 40px!important}
.mtpm-app{max-width:none}
.mtpm-app .mtpm-themes{max-width:1050px;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:13px}
.mtpm-app .mtpm-themes button{min-height:132px;font-size:50px;background:#ffffffd9;box-shadow:0 5px 15px #0002;backdrop-filter:blur(5px)}
.mtpm-app .mtpm-themes span{font-size:17px}
.mtpm-app .mtpm-home>p{font-weight:800;color:#253958;text-shadow:0 1px 8px #fff}
@media(max-width:520px){.mtpm-app .mtpm-themes{grid-template-columns:repeat(2,minmax(0,1fr))}.mtpm-app .mtpm-themes button{min-height:120px;font-size:43px}.mtpm-app .mtpm-themes span{font-size:15px}}


/* v6.12 : accueil illustré, tuiles photo et boutons colorés */
.mtpm-app{max-width:none!important;width:100%;}
.mtpm-app .mtpm-home{background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;background-attachment:scroll!important;border-radius:0!important;min-height:100dvh!important;padding:clamp(14px,2vw,30px)!important;overflow:visible!important;isolation:isolate;}
.mtpm-app .mtpm-home .mtpm-logo{width:clamp(150px,30vw,520px)!important;max-width:88vw!important;max-height:170px!important;filter:drop-shadow(0 5px 5px #143c554d);margin:8px auto 14px!important;}
.mtpm-app .mtpm-home .mtpm-welcome{display:block;background:rgba(255,255,255,.87);border:3px solid #fff;border-radius:40px;box-shadow:0 5px 16px #1c422d42;max-width:max-content;margin:22px auto 10px;padding:10px 22px;font-size:clamp(14px,2vw,21px);color:#30435d;}
.mtpm-app .mtpm-themes{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;max-width:1480px!important;width:100%;gap:clamp(9px,1.1vw,18px)!important;margin:20px auto 30px!important;}
.mtpm-app .mtpm-themes button{position:relative;display:flex;flex-direction:column;justify-content:stretch;align-items:stretch;min-height:0!important;aspect-ratio: .94;overflow:hidden;padding:0!important;border:5px solid white!important;border-radius:27px!important;background:#fff!important;box-shadow:0 6px 14px #163c5680!important;transition:transform .18s,box-shadow .18s;}
.mtpm-app .mtpm-themes button:hover{transform:translateY(-3px);box-shadow:0 10px 18px #163c5680!important;}
.mtpm-app .mtpm-themes .mtpm-theme-picture{display:flex;flex:1;align-items:center;justify-content:center;min-height:0;width:100%;font-size:clamp(36px,5vw,70px);background:linear-gradient(145deg,#e9fbff,#fff1cc);overflow:hidden;}
.mtpm-app .mtpm-themes .mtpm-theme-picture img{display:block;width:100%;height:100%;min-height:0;object-fit:cover;object-position:center;}
.mtpm-app .mtpm-themes button>span:last-child{display:flex;align-items:center;justify-content:center;min-height:52px;width:100%;padding:8px 5px;box-sizing:border-box;font-size:clamp(13px,1.45vw,22px)!important;line-height:1.13;color:#fff!important;font-weight:900;text-shadow:0 2px 3px #0005;background:linear-gradient(#76d52b,#2ca517);}
.mtpm-app .mtpm-themes button:nth-child(6n+2)>span:last-child{background:linear-gradient(#47c6ff,#0782e3)}
.mtpm-app .mtpm-themes button:nth-child(6n+3)>span:last-child{background:linear-gradient(#ffcc44,#f79a08)}
.mtpm-app .mtpm-themes button:nth-child(6n+4)>span:last-child{background:linear-gradient(#f79ae5,#bb49c4)}
.mtpm-app .mtpm-themes button:nth-child(6n+5)>span:last-child{background:linear-gradient(#ff9d9d,#f54d88)}
.mtpm-app .mtpm-themes button:nth-child(6n+6)>span:last-child{background:linear-gradient(#b994fa,#8250cb)}
.mtpm-app .mtpm-kiosk-controls{display:inline-flex!important;vertical-align:middle;gap:10px!important;justify-content:center;align-items:center;margin:0 8px 8px 0!important;}
.mtpm-app .mtpm-kiosk-controls button{background:linear-gradient(#46b6fc,#096ed0)!important;border:3px solid white!important;border-radius:40px!important;box-shadow:0 4px 10px #123e6880!important;color:white!important;padding:11px 16px!important;font-size:clamp(12px,1.4vw,17px)!important;}
.mtpm-app .mtpm-music-toggle{display:inline-block;vertical-align:middle;margin:0 0 8px!important;background:linear-gradient(#aa7de6,#693cb7)!important;border:3px solid white!important;border-radius:40px!important;box-shadow:0 4px 10px #123e6880!important;color:white!important;font-weight:800!important;padding:11px 16px!important;font-size:clamp(12px,1.4vw,17px)!important;}
.mtpm-app .mtpm-parent-gate{position:relative;z-index:3;}
@media(max-width:950px){.mtpm-app .mtpm-themes{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mtpm-app .mtpm-themes button{border-width:4px!important;border-radius:22px!important}.mtpm-app .mtpm-themes button>span:last-child{font-size:clamp(13px,2vw,19px)!important}}
@media(max-width:580px){.mtpm-app .mtpm-home{padding:12px 9px 28px!important}.mtpm-app .mtpm-themes{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.mtpm-app .mtpm-themes button{border-width:3px!important;border-radius:19px!important;aspect-ratio:.95}.mtpm-app .mtpm-themes button>span:last-child{min-height:43px;font-size:14px!important}.mtpm-app .mtpm-kiosk-controls button,.mtpm-app .mtpm-music-toggle{font-size:12px!important;padding:10px 12px!important}.mtpm-app .mtpm-home .mtpm-welcome{font-size:13px;padding:8px 10px}.mtpm-app .mtpm-home .mtpm-logo{width:55vw!important}}

/* v6.13 : couvertures de thèmes indépendantes des fiches */
.mtpm-app .mtpm-themes .mtpm-theme-picture{flex:1 1 auto!important;min-height:75px!important;display:flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;text-align:center!important;font-size:clamp(48px,5.5vw,86px)!important;background:linear-gradient(145deg,#e8f8ff,#fff2ce)!important;}
.mtpm-app .mtpm-themes button:nth-child(5n+2) .mtpm-theme-picture{background:linear-gradient(145deg,#d8f4ff,#e4e6ff)!important;}
.mtpm-app .mtpm-themes button:nth-child(5n+3) .mtpm-theme-picture{background:linear-gradient(145deg,#fff4c6,#ffe1e8)!important;}
.mtpm-app .mtpm-themes button:nth-child(5n+4) .mtpm-theme-picture{background:linear-gradient(145deg,#fce0f5,#e5f5d5)!important;}
.mtpm-app .mtpm-themes button:nth-child(5n+5) .mtpm-theme-picture{background:linear-gradient(145deg,#e5f8d5,#d9f3ff)!important;}

/* 6.16 — accueil bord à bord, indépendamment de la largeur du thème WordPress */
html,body{overflow-x:clip!important}
.mtpm-app{position:relative!important;left:50%!important;transform:translateX(-50%)!important;width:100vw!important;max-width:none!important;margin:0!important;padding:0!important;box-sizing:border-box!important}
.mtpm-app .mtpm-home{box-sizing:border-box!important;position:relative!important;width:100%!important;max-width:none!important;min-height:100vh!important;min-height:100dvh!important;margin:0!important;background-image:linear-gradient(rgba(255,255,255,.07),rgba(255,255,255,.13)),var(--mtpm-home-bg)!important;background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important;background-attachment:scroll!important;padding:clamp(12px,3vw,36px)!important}
.mtpm-app .mtpm-home .mtpm-themes{max-width:1200px!important}
.mtpm-app.mtpm-fullscreen-active{position:fixed!important;inset:0!important;left:0!important;transform:none!important;width:100vw!important;height:100vh!important;height:100dvh!important;overflow-y:auto!important;overscroll-behavior:contain!important;z-index:2147482000!important;background:#e6f5d7!important}
.mtpm-app.mtpm-fullscreen-active .mtpm-home{min-height:100%!important}
.mtpm-app .mtpm-fullscreen-note:not([hidden]){background:#fffefa!important;border:2px solid #fff!important;border-radius:14px!important;padding:12px!important;max-width:640px!important;margin:10px auto!important;color:#243447!important;font-size:14px!important}
.mtpm-app .mtpm-parent-gate[hidden],.mtpm-app .mtpm-exit-fullscreen[hidden],.mtpm-app .mtpm-enter-fullscreen[hidden]{display:none!important}
@media(max-width:600px){.mtpm-app .mtpm-home{padding:12px 10px 28px!important}.mtpm-app .mtpm-kiosk-controls{max-width:52%!important}.mtpm-app .mtpm-music-toggle{max-width:44%!important}.mtpm-app .mtpm-kiosk-controls button,.mtpm-app .mtpm-music-toggle{white-space:normal!important}}

/* v6.17 : un seul bouton de musique, centré sur l’accueil */
.mtpm-app .mtpm-kiosk-controls{display:flex!important;max-width:none!important;width:100%!important;margin:0 auto 12px!important;justify-content:center!important}
.mtpm-app .mtpm-kiosk-controls .mtpm-music-toggle{display:inline-flex!important;align-items:center;justify-content:center;max-width:min(92vw,330px)!important;margin:0!important;background:linear-gradient(#aa7de6,#693cb7)!important;color:#fff!important;border:3px solid #fff!important;border-radius:40px!important;padding:12px 20px!important;font-size:clamp(14px,3.5vw,18px)!important;white-space:normal!important}

/* v6.18 : deux commandes de musique indépendantes sur l'accueil */
.mtpm-app .mtpm-kiosk-controls{display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important;justify-content:center!important;width:100%!important;max-width:none!important}
.mtpm-app .mtpm-kiosk-controls .mtpm-music-start,
.mtpm-app .mtpm-kiosk-controls .mtpm-music-stop{display:inline-flex!important;align-items:center;justify-content:center;flex:1 1 145px;max-width:260px!important;min-height:48px;margin:0!important;border:3px solid #fff!important;border-radius:28px!important;color:#fff!important;font-weight:800!important;font-size:clamp(12px,3.2vw,16px)!important;line-height:1.25;padding:10px 12px!important;box-shadow:0 3px 10px #123e6840!important;white-space:normal!important}
.mtpm-app .mtpm-kiosk-controls .mtpm-music-start{background:linear-gradient(#50c878,#198b54)!important}
.mtpm-app .mtpm-kiosk-controls .mtpm-music-stop{background:linear-gradient(#ffae73,#dc4e4e)!important}
.mtpm-app .mtpm-kiosk-controls button:disabled{opacity:.55!important;cursor:default!important}
.mtpm-app .mtpm-music-status{flex-basis:100%;margin:0;text-align:center;color:#fff;font-weight:700;text-shadow:0 1px 3px #333}
.mtpm-app .mtpm-music-status:empty{display:none}
