/* Nom : Atelier sur téléphone. Auteur : OpenAI pour Maxime.
   Fonctionnement : dispositions portrait et paysage, zones tactiles et encoches.
   Version : 1.0 — 28 octobre 2026. */
.mobile-world-nav{display:none}
@media(max-width:800px), (max-width:950px) and (max-height:500px) and (orientation:landscape){
 html{ -webkit-text-size-adjust:100% }
 button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
 button,a{touch-action:manipulation}
 .storybook-world{height:100dvh}
 .storybook-world>header{height:calc(68px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);z-index:50}
 .storybook-world .nav{height:68px;padding:0 12px;gap:8px}
 .storybook-world .logo{font-size:18px;gap:6px;min-width:0}
 .storybook-world .logo small{font-size:5.5px;letter-spacing:1px}
 .storybook-world .logo svg{width:25px;flex-shrink:0}
 .storybook-world .navright{gap:0;margin-left:auto}
 .storybook-world .iconbtn{width:44px;min-width:44px;min-height:44px;padding:10px}
 .storybook-world .navlinks,.storybook-world .navright>.btn,.storybook-world .iconbtn .label{display:none}
 .storybook-world .mobilemenu{display:flex}
 .storybook-world .mobile-nav{background:#122e28f5;color:#fff2d7;max-height:calc(100dvh - 90px);overflow:auto;box-shadow:0 12px 30px #0004}
 .storybook-world .mobile-nav a{min-height:48px;padding:14px 4px;font-size:14px;border-bottom:1px solid #ffffff18}
 .storybook-world .demo-ribbon{display:none}
 .world-deck{inset:calc(72px + env(safe-area-inset-top)) 0 calc(100px + env(safe-area-inset-bottom))}
 .journey-hero.world-scene{display:flex;flex-direction:column;overflow-y:auto;padding:16px 7% 28px!important;gap:12px}
 .world-scene .journey-copy{padding:0;flex:none;width:100%}
 .world-scene .journey-copy h1{font-size:clamp(36px,10vw,54px);line-height:1.04;letter-spacing:-1px;margin:12px 0 16px}
 .world-scene .journey-copy>p{font-size:14px;line-height:1.65;max-width:none}
 .world-scene .journey-copy .eyebrow{margin-bottom:12px}
 .world-scene .scene-wrap{width:100%;height:auto;flex:none}
 .world-scene .book-stage{height:260px;width:100%;margin:0}
 .world-scene .scene-button,.world-scene .world-picker button,.world-scene .btn,.world-scene .journey-link{min-height:44px;font-size:12px}
 .world-controls{bottom:calc(26px + env(safe-area-inset-bottom));gap:12px;width:calc(100% - 32px);justify-content:center}
 .world-controls>button{width:44px;height:44px;font-size:18px}
 .world-progress{width:min(240px,60vw)}
 .world-progress>b{font-size:12px}
 .storybook-world>.motion-toggle{bottom:calc(3px + env(safe-area-inset-bottom));right:16px;font-size:10px;min-height:24px}
 .world-scene .portal-entry{gap:12px}
 .world-scene .portal-entry-copy h2{font-size:38px;margin:12px 0}
 .world-scene .portal-entry-copy>p{font-size:14px}
 .portal-entry-button{min-height:48px;margin-top:15px;font-size:14px}
 .entry-gate{width:min(65vw,280px);margin:28px auto 35px}
 .portal-shortcuts a{min-height:44px;display:inline-flex;align-items:center;font-size:12px}
 .overlay{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);align-items:flex-end}
 .modal,.drawer{width:100%;max-width:100%;max-height:94dvh;padding:28px 20px calc(24px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;overscroll-behavior:contain}
 .modal .close{min-width:44px;min-height:44px}
 .modal-actions{flex-wrap:wrap;gap:10px}
 .modal-actions .btn{min-height:48px;flex:1}
 .fields,.theme-choices{grid-template-columns:1fr}
 .visual-choice{min-height:48px}.photo-pick input{max-width:100%}
 /* La scène reste en plein écran ; commandes séparées du panorama. */
 body.spherical-world{--phone-bottom:env(safe-area-inset-bottom);touch-action:none}
 .spherical-world .realm-header{height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0;gap:8px}
 .spherical-world .realm-header>a{min-height:44px;display:flex;align-items:center;font-size:12px}
 .spherical-world .realm-header>span{display:none}
 .spherical-world .realm-header .realm-brand{font-size:15px}
 .spherical-world .realm-layout{inset:calc(64px + env(safe-area-inset-top)) 0 calc(262px + var(--phone-bottom));pointer-events:none}
 .spherical-world .realm-copy{left:6%;width:88%;top:0}
 .spherical-world .realm-copy h1{font-size:clamp(24px,7vw,34px);margin:8px 0;line-height:1.05}
 .spherical-world .realm-copy>p{font-size:12px;line-height:1.4}
 .spherical-world .realm-copy .realm-eyebrow{font-size:9px;letter-spacing:1.5px}
 .spherical-world .realm-book{width:150px;height:155px;left:calc(50% - 75px);bottom:-20px;pointer-events:auto}
 .spherical-world .realm-actions{bottom:calc(158px + var(--phone-bottom));gap:6px;pointer-events:auto;flex-direction:column}
 .spherical-world .realm-primary{min-height:46px;padding:12px 22px;font-size:13px}
 .spherical-world .realm-actions>a:last-child{font-size:12px;min-height:38px;display:flex;align-items:center}
 .spherical-world .portal-navigation .portal-destination{display:none}
 .spherical-world .side-portal>small,.spherical-world .side-portal>b{display:none}
 .spherical-world .portal-preview-arrow{width:44px;height:44px;font-size:20px}
 .spherical-world .portal-gesture-hint{bottom:calc(138px + var(--phone-bottom));font-size:10px}
 .spherical-world .camera-recenter{bottom:calc(108px + var(--phone-bottom));right:16px;min-height:30px;padding:4px 12px;font-size:11px}
 .spherical-world .portal-motion-control{bottom:calc(4px + var(--phone-bottom));left:16px;right:16px;transform:none;display:flex;justify-content:center;align-items:center;gap:8px;font-size:10px;white-space:normal}
 .spherical-world .portal-motion-control select{width:auto;min-width:0;max-width:58%;height:40px;padding:4px 8px;font-size:12px!important}
 .mobile-world-nav{display:grid;grid-template-columns:1fr .8fr 1fr;position:fixed;z-index:40;bottom:calc(48px + env(safe-area-inset-bottom));left:12px;right:12px;gap:6px;padding:6px;border:1px solid #eed7aa40;border-radius:20px;background:#102a29e8;box-shadow:0 8px 30px #0003;backdrop-filter:blur(12px)}
 .mobile-world-nav button{display:grid;grid-template-columns:20px 1fr;column-gap:4px;align-content:center;min-height:48px;min-width:0;text-align:left;border:0;border-radius:12px;color:#fff1d5;background:transparent;padding:5px;font:inherit}
 .mobile-world-nav button>span{grid-row:1/3;align-self:center;font-size:20px}
 .mobile-world-nav small{font-size:8px;opacity:.7}
 .mobile-world-nav b{font-size:10px;font-weight:500;line-height:1.3;overflow-wrap:anywhere}
 .mobile-world-nav .mobile-all{background:#ecd8af;color:#19372f;grid-template-columns:1fr;text-align:center;gap:2px}
 .mobile-world-nav .mobile-all>span{grid-row:auto;font-size:16px}
 .mobile-world-nav button:disabled{opacity:.5}
 .portal-camera-travel .mobile-world-nav,.inline-reading .mobile-world-nav{visibility:hidden;pointer-events:none}
 .constellation{width:calc(100vw - 24px);max-height:calc(100dvh - 40px);padding:50px 16px 24px;border-radius:24px}
 .constellation-close{width:44px;height:44px;top:8px;right:8px}
 .constellation-map{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .constellation-map a{font-size:13px;min-height:100px;border:1px solid #ffffff15}
 .constellation-map a>span>small{font-size:10px}
 .inline-reader{padding:calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));overscroll-behavior:contain}
 .inline-heading{gap:12px;align-items:center}
 .inline-heading h2{font-size:21px}
 .inline-heading button{min-height:44px;min-width:44px;flex-shrink:0}
 .inline-stage{height:min(56dvh,115vw);margin:12px auto}
 .inline-toolbar>button{min-width:48px;min-height:48px}
 .inline-toolbar{gap:8px}
 .inline-toolbar>span{font-size:13px}
 .inline-toolbar label{font-size:12px}
 .inline-toolbar select{min-height:44px}
 .inline-hint{font-size:11px;line-height:1.5;margin-top:10px}
 body:has(>aside) .heading,body:has(>aside) .actions{flex-wrap:wrap}
 body:has(>aside) button{min-height:44px}
}
@media(max-width:360px){.storybook-world .logo{font-size:15px}.storybook-world .logo svg{display:none}.storybook-world .logo small{font-size:5px}.mobile-world-nav{left:6px;right:6px}.mobile-world-nav b{font-size:9px}}
@media(max-width:800px) and (max-height:660px) and (orientation:portrait){
 .spherical-world .realm-copy>p:not(.realm-eyebrow){display:none}
 .spherical-world .realm-copy h1{font-size:24px}
 .spherical-world .realm-book{width:115px;height:120px;left:calc(50% - 57.5px);bottom:-15px}
}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape){
 .spherical-world .realm-copy{left:5%;width:40%;text-align:left}
 .spherical-world .realm-copy h1{font-size:25px}
 .spherical-world .realm-copy>p:not(.realm-eyebrow){display:none}
 .spherical-world .realm-book{left:65%;bottom:-20px;width:120px;height:130px}
 .spherical-world .realm-layout{top:64px;bottom:160px}
 .spherical-world .realm-actions{left:5%;right:auto;bottom:90px;align-items:flex-start}
 .spherical-world .portal-gesture-hint,.spherical-world .camera-recenter{display:none}
 .inline-heading h2{font-size:18px;margin:0}.inline-heading small,.inline-hint{display:none}
 .inline-stage{height:calc(100dvh - 135px);margin:4px auto}
 .inline-toolbar label{width:auto}.inline-toolbar select{min-height:36px;padding:4px}
}
