:root{
--violet:#6d28d9;
--violet-2:#7c3aed;
--violet-brand:#8d57c6;
--violet-dark:#4c1d95;
--violet-soft:#efe8ff;
--violet-soft-2:#f6f0ff;
--fond:#f7f3ff;
--text:#221b3a;
--muted:#6f6782;
--line:#ece6f5;
--white:#ffffff;
}

html,
body{
margin:0;
width:100%;
height:100%;
overflow:hidden;
font-family:Arial,Helvetica,sans-serif;
background:var(--fond);
color:var(--text);
}

button{
font-family:inherit;
cursor:pointer;
}

#panorama{
width:100%;
height:100%;
background:#111;
}

/* ACCUEIL */

#home{
position:fixed;
inset:0;
z-index:40;
display:flex;
justify-content:center;
align-items:center;
padding:32px;
background:linear-gradient(135deg,#ffffff,var(--fond));
}

#home.hidden{
opacity:0;
pointer-events:none;
transition:.6s;
}

.home-card{
width:min(1500px,92vw);
height:min(760px,88vh);
display:grid;
grid-template-columns:1fr 1fr;
overflow:hidden;
border-radius:42px;
background:white;
box-shadow:0 30px 90px rgba(91,33,182,.14);
}

.home-visual{
background:
linear-gradient(rgba(91,33,182,.04),rgba(91,33,182,.10)),
url("Image/accueil.png");
background-size:cover;
background-position:center;
}

.home-content{
display:flex;
flex-direction:column;
justify-content:center;
padding:72px;
}

.brand{
display:grid;
grid-template-columns:150px 1fr;
column-gap:24px;
align-items:center;
margin-bottom:34px;
}

.logo{
width:150px;
height:auto;
object-fit:contain;
}

.brand-right{
display:flex;
flex-direction:column;
justify-content:center;
align-items:flex-end;
min-width:0;
}

.badge{
display:inline-flex;
padding:9px 18px;
border-radius:999px;
background:var(--violet-soft);
color:var(--violet-brand);
font-size:14px;
font-weight:700;
margin-bottom:18px;
}

.home-card h1{
margin:0;
color:var(--violet-brand);
font-size:clamp(24px,1.8vw,36px);
font-weight:700;
line-height:1.1;
white-space:nowrap;
letter-spacing:-.5px;
}

.slogan{
margin-top:4px;
color:#222;
font-family:"Parisienne","Brush Script MT","Segoe Script",cursive;
font-size:clamp(17px,1.2vw,25px);
font-weight:400;
line-height:1.1;
white-space:nowrap;
opacity:.9;
}

.home-card p{
margin:0 0 40px;
color:var(--text);
font-size:19px;
line-height:1.7;
max-width:620px;
}

.home-actions{
display:flex;
gap:14px;
flex-wrap:wrap;
}

#startBtn{
width:fit-content;
padding:20px 42px;
border:none;
border-radius:999px;
font-size:18px;
font-weight:700;
background:linear-gradient(135deg,#8d57c6,#581c87);
color:white;
box-shadow:0 16px 38px rgba(109,40,217,.32);
}

/* VISITE */

#menuBtn,
#editBtn,
#homeSceneBtn,
#fullscreenBtn,
.top-actions button{
padding:12px 18px;
border:none;
border-radius:999px;
background:rgba(0,0,0,.55);
color:white;
z-index:20;
backdrop-filter:blur(10px);
font-weight:700;
}

#menuBtn,
#editBtn,
#homeSceneBtn,
#fullscreenBtn{
position:fixed;
}

#menuBtn{
left:20px;
bottom:120px;
}

#editBtn{
right:20px;
top:20px;
}

#homeSceneBtn{
left:20px;
top:20px;
}

#fullscreenBtn{
left:20px;
top:70px;
}

.top-actions{
position:fixed;
top:20px;
left:20px;
right:20px;
z-index:20;
display:flex;
gap:10px;
align-items:center;
pointer-events:none;
}

.top-actions button{
pointer-events:auto;
position:static !important;
}

.top-actions #editBtn{
margin-left:auto;
}

#editBtn.active{
background:var(--violet-brand);
}

#sceneTitle{
position:fixed;
left:20px;
bottom:70px;
top:auto;
transform:none;
padding:12px 20px;
border-radius:999px;
background:rgba(0,0,0,.55);
color:white;
z-index:20;
backdrop-filter:blur(10px);
}

/* MINIATURES */

#thumbs{
position:fixed;
left:50%;
bottom:20px;
transform:translateX(-50%);
display:flex;
gap:10px;
padding:10px;
max-width:90%;
overflow-x:auto;
border-radius:18px;
background:rgba(0,0,0,.5);
z-index:20;
backdrop-filter:blur(10px);
}

.thumb{
border:none;
padding:0;
border-radius:14px;
overflow:hidden;
background:white;
color:var(--text);
}

.thumb.active{
outline:3px solid var(--violet-brand);
}

.thumb img{
width:140px;
height:72px;
object-fit:cover;
display:block;
}

.thumb span{
display:block;
padding:8px;
font-size:13px;
font-weight:700;
}

/* HOTSPOTS */

.hotspot-info,
.hotspot-nav{
width:44px !important;
height:44px !important;
display:flex !important;
align-items:center !important;
justify-content:center !important;
background-image:none !important;
cursor:pointer;
}

.hotspot-info{
border-radius:15px !important;
background:#111 !important;
border:2px solid rgba(255,255,255,.18) !important;
box-shadow:0 10px 28px rgba(0,0,0,.22) !important;
}

.hotspot-info::after{
content:"i";
display:flex;
align-items:center;
justify-content:center;
width:100%;
height:100%;
font-family:Arial,Helvetica,sans-serif;
font-size:30px;
font-weight:900;
font-style:normal;
line-height:1;
color:white;
transform:translateY(-1px);
}

/* Navigation : icône claire et stable.
   Le sens est choisi dans l’éditeur : avant / droite / gauche / retour. */
/* HOTSPOTS */

.hotspot-info,
.hotspot-nav{
width:52px !important;
height:52px !important;
border-radius:18px !important;
display:flex !important;
align-items:center !important;
justify-content:center !important;
box-shadow:0 10px 28px rgba(0,0,0,.20) !important;
background-image:none !important;
backdrop-filter:blur(8px);
cursor:pointer;
transition:all .18s ease;
}

.hotspot-info:hover,
.hotspot-nav:hover{
transform:scale(1.08);
box-shadow:0 14px 36px rgba(0,0,0,.28) !important;
}

/* ==========================
   POINT INFORMATION
========================== */

.hotspot-info{
background:#8d57c6 !important;
border:3px solid rgba(255,255,255,.95) !important;
}

.hotspot-info::after{
content:"i";
display:flex;
align-items:center;
justify-content:center;
width:100%;
height:100%;
font-family:Arial, Helvetica, sans-serif;
font-size:34px;
font-weight:900;
line-height:1;
color:white;
transform:translateY(-1px);
}

/* ==========================
   NAVIGATION
========================== */

.hotspot-nav{
background:rgba(255,255,255,.96) !important;
border:3px solid #8d57c6 !important;
box-shadow:
0 10px 28px rgba(0,0,0,.16),
0 0 0 3px rgba(141,87,198,.08) !important;
}

.hotspot-nav::after{
font-size:34px;
font-weight:900;
font-family:Arial, Helvetica, sans-serif;
color:#8d57c6;
line-height:1;
text-shadow:
0 1px 0 rgba(255,255,255,.6);
}

/* Directions */

.hotspot-forward::after{
content:"↑";
}

.hotspot-right::after{
content:"→";
}

.hotspot-left::after{
content:"←";
}

.hotspot-back::after{
content:"↓";
}

/* Tooltip */

.pnlm-hotspot-base{
overflow:visible !important;
}

.pnlm-tooltip{
background:rgba(0,0,0,.85) !important;
border-radius:12px !important;
padding:8px 12px !important;
font-size:13px !important;
font-weight:600 !important;
color:#fff !important;
border:none !important;
box-shadow:0 8px 20px rgba(0,0,0,.3) !important;
}

/* PANNEAU INFO */

#infoPanel{
position:fixed;
left:50%;
bottom:110px;
transform:translateX(-50%) translateY(20px);
width:min(460px,calc(100vw - 40px));
padding:24px;
border-radius:24px;
background:rgba(255,255,255,.95);
box-shadow:0 24px 80px rgba(40,20,80,.22);
z-index:25;
opacity:0;
pointer-events:none;
transition:.25s;
color:var(--text);
}

#infoPanel.visible{
opacity:1;
pointer-events:auto;
transform:translateX(-50%) translateY(0);
}

#infoPanel h3{
margin:0 38px 10px 0;
color:var(--violet-dark);
font-size:22px;
}

#infoPanel p{
margin:0;
line-height:1.55;
color:var(--muted);
white-space:pre-line;
}

#closeInfoBtn{
position:absolute;
right:14px;
top:12px;
width:34px;
height:34px;
border:none;
border-radius:50%;
background:var(--violet-soft);
color:var(--violet-dark);
font-size:24px;
line-height:1;
}

/* EDITEUR */

#editor{
position:fixed;
right:20px;
top:20px;
width:380px;
max-width:calc(100vw - 40px);
max-height:calc(100vh - 40px);
overflow:auto;
padding:28px 30px;
border-radius:24px;
background:rgba(255,255,255,.96);
color:var(--text);
display:none;
z-index:30;
box-shadow:0 30px 90px rgba(33,18,68,.28);
backdrop-filter:blur(14px);
scrollbar-width:thin;
scrollbar-color:#8b8794 transparent;
}

#editor.visible{
display:block;
}

.editor-head{
display:flex;
align-items:center;
justify-content:space-between;
gap:16px;
}

.editor-head h2,
#editor h2{
margin:0;
color:var(--violet-dark);
font-size:28px;
line-height:1.1;
}

#closeEditorBtn{
width:36px !important;
height:36px !important;
margin:0 !important;
padding:0 !important;
border-radius:50% !important;
background:var(--violet-soft) !important;
color:var(--violet-dark) !important;
font-size:24px !important;
line-height:1 !important;
}

#editor h3{
margin:0 0 18px;
color:#20183b;
font-size:20px;
}

#editor label{
display:block;
margin-top:16px;
margin-bottom:8px;
font-size:15px;
color:#625a78;
font-weight:700;
}

#editor input,
#editor select,
#editor textarea,
#editor button{
width:100%;
box-sizing:border-box;
font:inherit;
}

#editor input,
#editor select,
#editor textarea{
padding:14px 18px;
border:1px solid #ddd8e7;
border-radius:16px;
background:#fff;
color:#111;
font-size:16px;
outline:none;
}

#editor textarea{
min-height:92px;
resize:vertical;
line-height:1.45;
}

#editor input:focus,
#editor select:focus,
#editor textarea:focus{
border-color:var(--violet-2);
box-shadow:0 0 0 4px rgba(124,58,237,.12);
}

#editor button{
margin-top:14px;
padding:15px 18px;
border:none;
border-radius:16px;
font-size:16px;
font-weight:800;
}

#editor hr{
margin:28px 0;
border:none;
border-top:1px solid var(--line);
}

.editor-section{
margin:0;
}

.coords{
padding:18px;
margin:24px 0;
border-radius:18px;
background:var(--violet-soft-2);
border:1px solid #eadcff;
color:var(--violet-dark);
line-height:1.35;
}

.coords span{
color:#2b1b55;
font-weight:800;
}

.coords strong{
display:block;
color:#2b1b55;
}

.primary-btn,
#addBtn,
#addInfoBtn{
background:linear-gradient(135deg,#8d57c6,#6d28d9) !important;
color:white !important;
box-shadow:0 12px 24px rgba(109,40,217,.22);
}

.soft-btn,
#deleteHotspotBtn,
#deleteSceneBtn{
background:#eadfff !important;
color:var(--violet-dark) !important;
}

.soft-btn.danger{
color:#7f1d1d !important;
background:#fee2e2 !important;
}

.outline-btn,
#placeBtn,
#placeInfoBtn{
background:#fbfaff !important;
color:#5b21b6 !important;
border:1.5px dashed #6d28d9 !important;
}

#placeBtn.active,
#placeInfoBtn.active{
background:#facc15 !important;
color:#111 !important;
border-color:#facc15 !important;
}

#exportBtn,
.export{
background:var(--violet-brand) !important;
color:white !important;
margin-top:18px !important;
}

.checkbox-line{
display:flex !important;
align-items:center;
gap:10px;
margin-top:16px;
font-size:15px;
color:#625a78;
font-weight:700;
}

.checkbox-line input{
width:18px !important;
height:18px !important;
margin:0 !important;
accent-color:var(--violet-brand);
}

.help-box{
padding:14px;
margin-bottom:18px;
border-radius:16px;
background:var(--violet-soft-2);
font-size:13px;
line-height:1.55;
color:#4c4164;
}

/* TOAST */

#toast{
position:fixed;
top:80px;
left:50%;
transform:translateX(-50%);
padding:12px 18px;
border-radius:999px;
background:linear-gradient(135deg,var(--violet-brand),var(--violet-dark));
color:white;
opacity:0;
transition:.3s;
z-index:60;
box-shadow:0 12px 30px rgba(76,29,149,.25);
}

#toast.visible{
opacity:1;
}

/* RESPONSIVE */

@media(max-width:1100px){
.home-card{
grid-template-columns:1fr;
height:auto;
}

.home-visual{
height:320px;
}

.brand-right{
align-items:flex-start;
}

.home-card h1,
.slogan{
white-space:normal;
}
}

@media(max-width:700px){
#home {
padding:12px;
overflow-y:auto; /* Autorise le scroll sur la page d'accueil mobile */
-webkit-overflow-scrolling:touch;
align-items:flex-start;
}

.home-card {
grid-template-columns:1fr;
height:auto;
max-height:none;
border-radius:24px;
margin-top:10px;
margin-bottom:20px;
}

.home-visual {
height:160px; /* Réduit le visuel du haut */
}

.home-content {
padding:20px;
}

.brand {
grid-template-columns:100px 1fr;
row-gap:10px;
column-gap:14px;
margin-bottom:18px;
}

.logo {
width:90px;
}

.home-card h1 {
font-size:22px;
white-space:normal;
}

.slogan {
font-size:18px;
white-space:normal;
}

.badge {
padding:5px 12px;
font-size:12px;
margin-bottom:8px;
}

.home-card p {
font-size:15px;
margin-bottom:20px;
line-height:1.5;
}

#startBtn {
width:100%; /* Bouton pleine largeur facile à cliquer au pouce */
padding:16px 24px;
font-size:16px;
text-align:center;
}

.top-actions {
left:58px !important;
top:12px !important;
right:12px !important;
gap:6px !important;
}

.top-actions button {
padding:8px 12px !important;
font-size:12px !important;
}

#editor {
right:10px !important;
top:10px !important;
width:calc(100vw - 20px) !important;
padding:18px !important;
}

#thumbs {
bottom:10px !important;
padding:6px !important;
max-width:calc(100vw - 20px) !important;
}

.thumb-image-container,
.thumb img {
width:90px !important;
height:50px !important;
}

.thumb span {
font-size:11px !important;
padding:4px !important;
}
}

/* ==========================
   VISITE 360 - FINITION VALIDÉE
========================== */

#menuBtn{
    position:static !important;
}

.hotspot-nav,
.hotspot-info{
    transition:box-shadow .18s ease, background .18s ease !important;
}

.hotspot-nav{
    width:54px !important;
    height:54px !important;
    border-radius:18px !important;
    background:rgba(80,80,80,.52) !important;
    border:2px solid rgba(255,255,255,.88) !important;
    box-shadow:0 12px 30px rgba(0,0,0,.22) !important;
    backdrop-filter:blur(10px);
}

.hotspot-nav::after{
    color:white !important;
    font-size:35px !important;
    font-weight:900 !important;
    text-shadow:0 2px 8px rgba(0,0,0,.35) !important;
}

.hotspot-info{
    width:54px !important;
    height:54px !important;
    border-radius:18px !important;
    background:rgba(141,87,198,.88) !important;
    border:2px solid rgba(255,255,255,.9) !important;
}

#hotspotList{
    min-height:120px;
}

#saveDraftBtn{
    background:#f3ecff !important;
    color:var(--violet-dark) !important;
}

#resetConfigBtn{
    background:#fee2e2 !important;
    color:#7f1d1d !important;
}

#fullscreenBtn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

:fullscreen .top-actions{
    top:14px;
}

:fullscreen #sceneTitle{
    bottom:86px;
}

/* ==========================
   CORRECTIONS HOTSPOTS + EDITEUR COMPACT
========================== */

/* Décale les boutons pour ne pas recouvrir les contrôles zoom Pannellum */
.top-actions{
    left:74px !important;
}

/* Icônes Pannellum robustes : visibles même si le sprite natif ne charge pas */
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info{
    width:56px !important;
    height:56px !important;
    margin-left:-28px !important;
    margin-top:-28px !important;
    position:absolute !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:visible !important;
    background-image:none !important;
    background-position:initial !important;
    background-size:auto !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

.pnlm-hotspot-base.hotspot-nav::before,
.pnlm-hotspot-base.hotspot-info::before{
    content:"";
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:18px;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
    font-weight:900;
    line-height:1;
    z-index:2;
}

.pnlm-hotspot-base.hotspot-nav::before{
    background:rgba(80,80,80,.58);
    border:2px solid rgba(255,255,255,.92);
    color:white;
    font-size:36px;
    box-shadow:0 12px 30px rgba(0,0,0,.24);
    text-shadow:0 2px 8px rgba(0,0,0,.38);
    backdrop-filter:blur(10px);
}

.pnlm-hotspot-base.hotspot-info::before{
    content:"i";
    background:rgba(141,87,198,.92);
    border:2px solid rgba(255,255,255,.92);
    color:white;
    font-size:36px;
    box-shadow:0 12px 30px rgba(0,0,0,.24);
    backdrop-filter:blur(10px);
}

.pnlm-hotspot-base.hotspot-forward::before{ content:"↑"; }
.pnlm-hotspot-base.hotspot-right::before{ content:"→"; }
.pnlm-hotspot-base.hotspot-left::before{ content:"←"; }
.pnlm-hotspot-base.hotspot-back::before{ content:"↓"; }

/* Éditeur en panneaux repliables : moins chargé, moins de scroll */
#editor{
    width:420px !important;
    padding:22px !important;
}

.editor-help{
    margin:14px 0 16px;
    padding:12px 14px;
    border-radius:14px;
    background:var(--violet-soft-2);
    color:#514765;
    font-size:13px;
    line-height:1.35;
}

.editor-panel{
    margin:10px 0;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fff;
    overflow:hidden;
}

.editor-panel summary{
    list-style:none;
    cursor:pointer;
    padding:15px 16px;
    font-weight:900;
    color:var(--violet-dark);
    background:linear-gradient(135deg,#fff,#f8f4ff);
    user-select:none;
}

.editor-panel summary::-webkit-details-marker{
    display:none;
}

.editor-panel summary::after{
    content:"+";
    float:right;
    font-size:20px;
    line-height:1;
}

.editor-panel[open] summary::after{
    content:"–";
}

.editor-panel > label,
.editor-panel > input,
.editor-panel > select,
.editor-panel > textarea,
.editor-panel > button,
.editor-panel > .coords,
.editor-panel > .checkbox-line{
    width:calc(100% - 32px) !important;
    margin-left:16px !important;
    margin-right:16px !important;
}

.editor-panel > button:last-child,
.editor-panel > select:last-child{
    margin-bottom:16px !important;
}

.editor-panel .coords{
    padding:14px !important;
    margin-top:14px !important;
    margin-bottom:4px !important;
}

#editor hr{
    display:none;
}

@media(max-width:700px){
    .top-actions{
        left:58px !important;
    }
    #editor{
        width:calc(100vw - 20px) !important;
    }
}

/* ==========================
   V3 - CORRECTION AFFICHAGE RÉEL HOTSPOTS
========================== */

/* Supprime le titre natif Pannellum en bas gauche : on garde uniquement notre pastille #sceneTitle. */
.pnlm-title-box{
    display:none !important;
}

/* On neutralise les anciens pseudo-éléments qui pouvaient se retrouver en haut à gauche. */
.pnlm-hotspot-base.hotspot-nav::before,
.pnlm-hotspot-base.hotspot-info::before,
.pnlm-hotspot-base.hotspot-nav::after,
.pnlm-hotspot-base.hotspot-info::after,
.hotspot-nav::before,
.hotspot-info::before,
.hotspot-nav::after,
.hotspot-info::after{
    content:none !important;
    display:none !important;
}

/* Hotspot rendu par JS avec un vrai élément HTML interne, plus fiable que ::before/::after. */
.pnlm-hotspot-base.visite-hotspot,
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info{
    width:62px !important;
    height:62px !important;
    margin-left:-31px !important;
    margin-top:-31px !important;
    display:block !important;
    overflow:visible !important;
    background:none !important;
    border:none !important;
    box-shadow:none !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
}

.pnlm-hotspot-base .hotspot-icon{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:56px;
    height:56px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    box-sizing:border-box;
    color:white;
    font-family:Arial, Helvetica, sans-serif;
    font-size:38px;
    font-weight:900;
    line-height:1;
    border:3px solid rgba(255,255,255,.95);
    box-shadow:0 12px 30px rgba(0,0,0,.28);
    text-shadow:0 2px 8px rgba(0,0,0,.35);
    z-index:5;
}

.pnlm-hotspot-base.visite-hotspot-nav .hotspot-icon,
.pnlm-hotspot-base.hotspot-nav .hotspot-icon{
    background:rgba(80,80,80,.62);
    backdrop-filter:blur(10px);
}

.pnlm-hotspot-base.visite-hotspot-info .hotspot-icon,
.pnlm-hotspot-base.hotspot-info .hotspot-icon{
    background:rgba(141,87,198,.94);
    font-style:italic;
    font-family:Georgia, serif;
    padding-bottom:4px;
}

.pnlm-hotspot-base:hover .hotspot-icon{
    transform:translate(-50%,-50%) scale(1.06);
}

/* Décalage un peu plus propre des boutons haut gauche. */
.top-actions{
    left:86px !important;
    top:22px !important;
}

@media(max-width:700px){
    .top-actions{
        left:64px !important;
        top:12px !important;
    }
}


/* ==========================
   V4 - HOTSPOTS PANNELLUM FIABLES
   Pannellum n'accepte pas type:"custom" comme type visuel standard.
   Les hotspots sont maintenant type:"info" + rendu HTML interne.
========================== */
.pnlm-hotspot-base.visite-hotspot,
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info{
    width:64px !important;
    height:64px !important;
    margin-left:-32px !important;
    margin-top:-32px !important;
    padding:0 !important;
    background:none !important;
    background-image:none !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    display:block !important;
    opacity:1 !important;
    visibility:visible !important;
    overflow:visible !important;
    pointer-events:auto !important;
    z-index:15 !important;
}

.pnlm-hotspot-base.visite-hotspot > .hotspot-icon,
.pnlm-hotspot-base.hotspot-nav > .hotspot-icon,
.pnlm-hotspot-base.hotspot-info > .hotspot-icon{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    width:58px !important;
    height:58px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:999px !important;
    box-sizing:border-box !important;
    border:3px solid rgba(255,255,255,.96) !important;
    color:white !important;
    background:rgba(80,80,80,.66) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.35) !important;
    backdrop-filter:blur(8px);
    font-family:Arial, Helvetica, sans-serif !important;
    font-size:40px !important;
    font-weight:900 !important;
    line-height:1 !important;
    text-shadow:0 2px 8px rgba(0,0,0,.4) !important;
    z-index:99 !important;
}

.pnlm-hotspot-base.visite-hotspot-info > .hotspot-icon,
.pnlm-hotspot-base.hotspot-info > .hotspot-icon{
    background:rgba(141,87,198,.95) !important;
    font-family:Georgia, serif !important;
    font-style:italic !important;
    padding-bottom:5px !important;
}

.pnlm-hotspot-base.visite-hotspot:hover > .hotspot-icon{
    transform:translate(-50%,-50%) scale(1.06) !important;
}

/* Tooltip uniquement au survol, pour ne pas masquer l'icône. */
.pnlm-hotspot-base.visite-hotspot .pnlm-tooltip{
    position:absolute !important;
    left:50% !important;
    top:66px !important;
    transform:translateX(-50%) !important;
    display:none !important;
    white-space:nowrap !important;
    pointer-events:none !important;
}

.pnlm-hotspot-base.visite-hotspot:hover .pnlm-tooltip{
    display:block !important;
}

/* Sécurité : retire les anciens dessins CSS qui entraient en conflit. */
.hotspot-nav::before,
.hotspot-nav::after,
.hotspot-info::before,
.hotspot-info::after{
    content:none !important;
    display:none !important;
}


/* ==========================
   V5 - HOTSPOTS PANNELLUM FIX DÉFINITIF
   Pannellum a besoin d'un text sur les hotspots info.
   On force ensuite l'affichage de l'élément créé par createTooltipFunc.
========================== */

.pnlm-hotspot-base.visite-hotspot{
    width:68px !important;
    height:68px !important;
    margin-left:-34px !important;
    margin-top:-34px !important;
    padding:0 !important;
    background:transparent !important;
    background-image:none !important;
    border:0 !important;
    display:block !important;
    overflow:visible !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    z-index:50 !important;
}

.pnlm-hotspot-base.visite-hotspot .hotspot-icon{
    position:absolute !important;
    inset:5px !important;
    width:58px !important;
    height:58px !important;
    margin:0 !important;
    transform:none !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:50% !important;
    border:3px solid #fff !important;
    color:#fff !important;
    background:rgba(75,75,75,.72) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.38) !important;
    font-family:Arial, Helvetica, sans-serif !important;
    font-size:40px !important;
    font-weight:900 !important;
    line-height:1 !important;
    text-shadow:0 2px 8px rgba(0,0,0,.45) !important;
    z-index:100 !important;
}

.pnlm-hotspot-base.visite-hotspot-info .hotspot-icon{
    background:rgba(141,87,198,.96) !important;
    font-family:Georgia, serif !important;
    font-style:italic !important;
    padding-bottom:5px !important;
}

.pnlm-hotspot-base.visite-hotspot:hover .hotspot-icon{
    transform:translate(-50%,-50%) scale(1.06) !important;
}

.pnlm-hotspot-base.visite-hotspot .pnlm-tooltip{
    position:absolute !important;
    top:70px !important;
    left:50% !important;
    transform:translateX(-50%) !important;
    display:none !important;
    white-space:nowrap !important;
    width:auto !important;
    height:auto !important;
    z-index:101 !important;
}

.pnlm-hotspot-base.visite-hotspot:hover .pnlm-tooltip{
    display:block !important;
}


/* ==========================
   V6 - FIX RÉEL POSITION HOTSPOTS
   Important : Pannellum positionne les hotspots avec transform en inline.
   Ne jamais mettre transform:none sur .hotspot-nav / .hotspot-info / .pnlm-hotspot-base,
   sinon les icônes restent collées hors champ / coin haut gauche.
========================== */

.pnlm-hotspot-base.visite-hotspot,
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info{
    width:68px !important;
    height:68px !important;
    margin-left:-34px !important;
    margin-top:-34px !important;
    padding:0 !important;
    background:transparent !important;
    background-image:none !important;
    border:0 !important;
    box-shadow:none !important;
    overflow:visible !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    z-index:80 !important;
}

.pnlm-hotspot-base.visite-hotspot .hotspot-icon,
.pnlm-hotspot-base.hotspot-nav .hotspot-icon,
.pnlm-hotspot-base.hotspot-info .hotspot-icon{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    width:70px !important;
    height:70px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:6% !important;
    box-sizing:border-box !important;
    border:5px solid #8d57c6 !important;
    color:#fff !important;
    background:rgba(75,75,75,.72) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.38) !important;
    font-family: "Arial Black", Arial, sans-serif !important;
    font-size:53px !important;
    font-weight:900 !important;
	padding-bottom:15px !important;
    line-height:1 !important;
    text-shadow:0 2px 8px rgba(0,0,0,.45) !important;
    z-index:100 !important;
}

.pnlm-hotspot-base.visite-hotspot-info .hotspot-icon,
.pnlm-hotspot-base.hotspot-info .hotspot-icon{
    background:rgba(141,87,198,.96) !important;
    font-family:Georgia, serif !important;
    font-style:italic !important;
    padding-bottom:5px !important;
}

.pnlm-hotspot-base.visite-hotspot:hover .hotspot-icon{
    transform:translate(-50%,-50%) scale(1.06) !important;
}

.pnlm-hotspot-base.hotspot-nav .hotspot-icon{
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
}

.hotspot-arrow-img{
    width:72px !important;
    height:72px !important;
    object-fit:contain !important;
    display:block !important;
    pointer-events:none !important;
}
/* Flèche PNG dans le carré existant */
.pnlm-hotspot-base.hotspot-nav .hotspot-icon{
    font-size:0 !important;
    padding-bottom:0 !important;
}

.hotspot-arrow-img{
    width:58px !important;
    height:58px !important;
    object-fit:contain !important;
    display:block !important;
    pointer-events:none !important;
}
.pnlm-hotspot-base.hotspot-nav .hotspot-icon{
    border:5px solid #d9c2ff !important;
    border-radius:6% !important;
    background:rgba(75,75,75,.72) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.38) !important;
}

.hotspot-arrow-img{
    width:54px !important;
    height:54px !important;
    object-fit:contain !important;
    display:block !important;
    pointer-events:none !important;
}

/* ==========================
   RECHERCHE RAPIDE
========================== */

#searchModal{
    position:fixed;
    top:90px;
    left:50%;
    transform:translateX(-50%);
    width:min(520px,calc(100vw - 32px));
    display:none;
    z-index:5000;
    background:transparent;
}

.search-box{
    width:min(500px,90vw);
    background:white;
    border-radius:20px;
    padding:20px;
    box-shadow:0 20px 60px rgba(0,0,0,.3);
}

.search-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.search-head h3{
    margin:0;
    color:#8d57c6;
}

#closeSearchBtn{
    border:none;
    background:none;
    font-size:28px;
    cursor:pointer;
}

#searchInput{
    width:100%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    box-sizing:border-box;
    margin-bottom:15px;
}

.search-result{
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    margin-bottom:6px;
}

.search-result:hover{
    background:#f2ebfb;
}

.search-scene{
    font-weight:600;
}

/* Point info plus propre quand on dézoome */
.pnlm-hotspot-base.hotspot-info .hotspot-icon{
    box-shadow:none !important;
    backdrop-filter:none !important;
}
/* Nettoyage complet du conteneur Pannellum */
.pnlm-hotspot-base.hotspot-info,
.pnlm-hotspot-base.visite-hotspot-info,
.hotspot-info{
    background:transparent !important;
    background-image:none !important;
    border:none !important;
    box-shadow:none !important;
    backdrop-filter:none !important;
}

/* Icône info seule, en cercle */
.pnlm-hotspot-base.hotspot-info .hotspot-icon,
.pnlm-hotspot-base.visite-hotspot-info .hotspot-icon{
    width:64px !important;
    height:64px !important;
    border-radius:50% !important;
    background:#8d57c6 !important;
    border:4px solid #f3ecff !important;
    box-shadow:0 6px 14px rgba(0,0,0,.22) !important;
    backdrop-filter:none !important;
}

/* Suppression ABSOLUE de tous les fonds des hotspots */
.pnlm-hotspot-base,
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info,
.pnlm-hotspot-base.visite-hotspot-nav,
.pnlm-hotspot-base.visite-hotspot-info{
    background:none !important;
    background-color:transparent !important;
    background-image:none !important;
    border:none !important;
    box-shadow:none !important;
    filter:none !important;
    backdrop-filter:none !important;
}

/* Seule l'icône reste visible */
.hotspot-icon{
    background:none !important;
}

/* Masque le petit panneau noir "Loading..." de Pannellum */
.pnlm-load-box{
    display:none !important;
}

#planContainer{
    position:relative;
    max-width:100%;
}

#planImage{
    width:100%;
    border-radius:12px;
    display:block;
}

/* Point n°1 */
#planPoint1{
    position:absolute;

    left:67%;
    top:73%;

    width:40px;
    height:40px;

    cursor:pointer;

    border-radius:50%;

    background:rgba(141,87,198,.35);

    border:3px solid white;
}

.search-modal{
    position:fixed;
    inset:0;
    display:flex;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,.45);
    z-index:5000;
}

#planModal .search-box{
    width:min(1100px,95vw);
    max-height:90vh;
    overflow:auto;
    position:relative;
}

#closePlanBtn{
    position:absolute;
    right:15px;
    top:15px;
    border:none;
    background:none;
    font-size:28px;
    cursor:pointer;
}

#planModal .plan-click-zone{
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    color:transparent !important;
}

#planModal.plan-edit-enabled .plan-click-zone{
    background:rgba(141,87,198,.22) !important;
    border:2px solid rgba(255,255,255,.65) !important;
}

#planModal .plan-click-zone:hover,
#planModal .plan-click-zone.active{
    transform:translate(-50%,-50%) scale(1.12) !important;
    filter:drop-shadow(0 0 10px rgba(141,87,198,.85)) !important;
    background:rgba(141,87,198,.28) !important;
    border:none !important;
    box-shadow:none !important;
}
#planModal:not(.plan-edit-enabled) .plan-click-zone,
#planModal:not(.plan-edit-enabled) .plan-click-zone.active,
#planModal:not(.plan-edit-enabled) .plan-click-zone:hover{
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    filter:none !important;
    color:transparent !important;
}

/* ==========================
   MINI-RADAR PUBLIC 
========================== */

#miniRadar{
    width:220px !important;
    height:150px !important;

    border-radius:18px !important;

    border:4px solid var(--violet-brand) !important;

    background:rgba(0,0,0,.58) !important;

    overflow:hidden !important;

    box-shadow:0 18px 55px rgba(0,0,0,.38) !important;
}

.mini-radar-img{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center center !important;
    opacity:.96 !important;
    pointer-events:none !important;
}

.mini-radar-shade{
    position:absolute !important;
    inset:0 !important;
    background:radial-gradient(circle at center,rgba(255,255,255,.04),rgba(0,0,0,.16)) !important;
    pointer-events:none !important;
}

.mini-radar-point{
    position:absolute;
    left:50%;
    top:50%;
    width:0;
    height:0;
    transform:translate(-50%,-50%);
    background:transparent;
    border:none;
    box-shadow:none;
    pointer-events:none;
}


.mini-radar-arrow{
    position:absolute !important;
    left:50% !important;
    top:50% !important;

    width:42px !important;
    height:42px !important;

    transform:translate(-50%,-50%) rotate(0deg) !important;
    transform-origin:50% 50% !important;

    pointer-events:none !important;
    filter:drop-shadow(0 3px 6px rgba(0,0,0,.35));
}


/* =========================================================
   PATCH FINAL - SANS MENU + ANTI HOTSPOT FANTÔME
   À garder tout en bas du CSS.
========================================================= */

/* Le bouton Menu est supprimé du HTML, mais on le cache aussi si un ancien cache le recrée */
#menuBtn{
    display:none !important;
}

/* Barre haute sans menu */
.top-actions{
    position:fixed !important;
    top:22px !important;
    left:86px !important;
    right:20px !important;
    z-index:20 !important;
    display:flex !important;
    gap:10px !important;
    align-items:center !important;
    pointer-events:none !important;
}

.top-actions button{
    pointer-events:auto !important;
    position:static !important;
}

.top-actions #editBtn{
    margin-left:auto !important;
}

/* Ne jamais forcer visible un hotspot que Pannellum cache hors champ */
.pnlm-hotspot-base[style*="visibility: hidden"],
.pnlm-hotspot-base[style*="visibility:hidden"],
.pnlm-hotspot-base[style*="display: none"],
.pnlm-hotspot-base[style*="display:none"]{
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
}

/* Anti-fantôme : le conteneur Pannellum reste neutre */
.pnlm-hotspot-base{
    background:transparent !important;
    background-image:none !important;
    border:none !important;
    box-shadow:none !important;
}

/* Pas de pseudo-éléments anciens : uniquement le HTML créé par makeTooltip() */
.pnlm-hotspot-base.hotspot-nav::before,
.pnlm-hotspot-base.hotspot-nav::after,
.pnlm-hotspot-base.hotspot-info::before,
.pnlm-hotspot-base.hotspot-info::after,
.hotspot-nav::before,
.hotspot-nav::after,
.hotspot-info::before,
.hotspot-info::after{
    content:none !important;
    display:none !important;
}

/* Hotspot normal : surtout ne pas modifier le transform inline de Pannellum */
.pnlm-hotspot-base.visite-hotspot,
.pnlm-hotspot-base.hotspot-nav,
.pnlm-hotspot-base.hotspot-info{
    width:68px !important;
    height:68px !important;
    margin-left:-34px !important;
    margin-top:-34px !important;
    padding:0 !important;
    overflow:visible !important;
    pointer-events:auto !important;
}

/* Icônes internes */
.pnlm-hotspot-base .hotspot-icon{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    transform:translate(-50%,-50%) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    z-index:100 !important;
}

.pnlm-hotspot-base.hotspot-nav .hotspot-icon{
    width:70px !important;
    height:70px !important;
    border:5px solid #d9c2ff !important;
    border-radius:6% !important;
    background:rgba(75,75,75,.72) !important;
    box-shadow:0 12px 32px rgba(0,0,0,.38) !important;
    font-size:0 !important;
    padding:0 !important;
}

.hotspot-arrow-img{
    width:54px !important;
    height:54px !important;
    object-fit:contain !important;
    display:block !important;
    pointer-events:none !important;
}

.pnlm-hotspot-base.hotspot-info .hotspot-icon,
.pnlm-hotspot-base.visite-hotspot-info .hotspot-icon{
    width:64px !important;
    height:64px !important;
    border-radius:50% !important;
    background:#8d57c6 !important;
    border:4px solid #f3ecff !important;
    box-shadow:0 6px 14px rgba(0,0,0,.22) !important;
    color:#fff !important;
    font-family:Georgia,serif !important;
    font-style:italic !important;
    font-size:42px !important;
    line-height:1 !important;
    padding-bottom:5px !important;
}

@media(max-width:700px){

    #miniRadar{
        width:190px !important;
        height:125px !important;
        border-radius:14px !important;
    }

}


/* =========================================================
   PATCH FINAL - INFO STREET VIEW ACCROCHÉE AU HOTSPOT
   La bulle suit le point info et disparaît hors champ.
========================================================= */

#infoPanel{
    position:fixed !important;
    left:50%;
    bottom:110px;
    width:min(420px,calc(100vw - 28px)) !important;
    padding:20px !important;
    border-radius:22px !important;
    background:rgba(255,255,255,.97) !important;
    box-shadow:0 24px 80px rgba(40,20,80,.25) !important;
    z-index:25 !important;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease !important;
    color:var(--text);
    transform:translateX(-50%) translateY(12px);
}

#infoPanel.visible{
    opacity:1 !important;
    pointer-events:auto !important;
    transform:translateX(-50%) translateY(0);
}

#infoPanel.anchored{
    bottom:auto !important;
    transform:translateY(8px) !important;
}

#infoPanel.anchored.visible{
    transform:translateY(0) !important;
}

#infoPanel.out-of-view{
    opacity:0 !important;
    pointer-events:none !important;
}

#infoPanel.anchored::before{
    content:"" !important;
    position:absolute !important;
    top:var(--info-arrow-top,32px) !important;
    width:0 !important;
    height:0 !important;
    transform:translateY(-50%) !important;
    filter:drop-shadow(0 4px 6px rgba(40,20,80,.12)) !important;
}

#infoPanel.anchored.anchor-right::before{
    left:-10px !important;
    border-top:10px solid transparent !important;
    border-bottom:10px solid transparent !important;
    border-right:10px solid rgba(255,255,255,.97) !important;
}

#infoPanel.anchored.anchor-left::before{
    right:-10px !important;
    border-top:10px solid transparent !important;
    border-bottom:10px solid transparent !important;
    border-left:10px solid rgba(255,255,255,.97) !important;
}

#infoPanel h3{
    margin:0 38px 10px 0 !important;
    color:var(--violet-dark) !important;
    font-size:21px !important;
}

#infoPanel p{
    margin:0 !important;
    line-height:1.55 !important;
    color:var(--muted) !important;
    white-space:pre-line !important;
}

#closeInfoBtn{
    position:absolute !important;
    right:12px !important;
    top:10px !important;
    width:34px !important;
    height:34px !important;
    border:none !important;
    border-radius:50% !important;
    background:var(--violet-soft) !important;
    color:var(--violet-dark) !important;
    font-size:24px !important;
    line-height:1 !important;
}


/* =========================================================
   PATCH FINAL - MINI-RADAR RECTANGLE + AVION LRG
   Écrase les anciens styles du radar rond / GTA.
========================================================= */

#miniRadar{
    position:fixed !important;
    right:26px !important;
    bottom:110px !important;
    width:280px !important;
    height:185px !important;
    padding:0 !important;
    overflow:hidden !important;
    border:4px solid var(--violet-brand) !important;
    border-radius:22px !important;
    background:rgba(0,0,0,.58) !important;
    box-shadow:0 18px 55px rgba(0,0,0,.38) !important;
    z-index:24 !important;
    backdrop-filter:blur(10px) !important;
}

#miniRadar:hover{
    transform:translateY(-2px) scale(1.02) !important;
}

.mini-radar-img{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center center !important;
	  transform:scale(1.15) !important;
    opacity:.96 !important;
    pointer-events:none !important;
}

.mini-radar-shade{
    position:absolute !important;
    inset:0 !important;
    background:
        linear-gradient(to top,rgba(0,0,0,.18),rgba(0,0,0,.02)),
        radial-gradient(circle at center,rgba(255,255,255,.06),rgba(0,0,0,.10)) !important;
    pointer-events:none !important;
}

.mini-radar-point{
    position:absolute !important;
    left:50%;
    top:50%;
    width:0 !important;
    height:0 !important;
    transform:translate(-50%,-50%) !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    pointer-events:none !important;
    z-index:2 !important;
}

.mini-radar-arrow{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    width:60px !important;
    height:60px !important;
    object-fit:contain !important;
    display:block !important;
    transform:translate(-50%,-50%) rotate(0deg) !important;
    transform-origin:50% 50% !important;
    pointer-events:none !important;
	filter:drop-shadow(0 5px 10px rgba(0,0,0,.5)) !important;
    z-index:3 !important;
}

#miniRadar.no-point .mini-radar-point{
    display:none !important;
}

@media(max-width:700px){
    #miniRadar{
        right:12px !important;
        bottom:108px !important;
        width:165px !important;
        height:112px !important;
        border-width:3px !important;
        border-radius:16px !important;
    }

    .mini-radar-arrow{
        width:34px !important;
        height:34px !important;
    }
}

#miniRadar {
    display: none !important;
}
/* Aucun titre de scène affiché dans la visite */
#sceneTitle{
    display:none !important;
}
/* PHOTO POINT INFORMATION */
#infoImage{
    display:block;
    width:100%;
    height:auto;
    max-height:260px;
    object-fit:contain;
    border-radius:18px;
    margin:0 0 16px 0;
}
#infoImage[hidden]{
    display:none !important;
}
@media(max-width:700px){
    #infoImage{
        max-height:170px;
        border-radius:14px;
    }
}

.thumb-image-container {
    width: 140px;
    height: 72px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
}

/* Format Plat */
.thumb-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Format 360 interactif */
.thumb-360-viewer {
    width: 140px;
    height: 72px;
    pointer-events: auto;
}

/* Masque les contrôles internes Pannellum dans les vignettes pour rester propre */
.thumb-360-viewer .pnlm-controls-container,
.thumb-360-viewer .pnlm-load-box {
    display: none !important;
}

/* Vignettes dynamiques : plat / 360 */
.thumb-image-container {
    width: 140px;
    height: 72px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
}

.thumb-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-360-viewer {
    width: 140px;
    height: 72px;
}

.thumb-360-viewer .pnlm-controls-container,
.thumb-360-viewer .pnlm-load-box {
    display: none !important;
}

/* =========================================================
   DEBLOCAGE DU BOUTON ÉDITION EN LOCAL
========================================================= */
#editBtn {
    display: inline-block !important;
    pointer-events: auto !important;
}

/* BOUTON ÉDITION PERMANENT EN LOCAL */
#editBtn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    background: #8d57c6 !important;
    color: white !important;
}

/* Sécurité version publique */
body.public-mode #editBtn,
body.public-mode #editor,
body.public-mode #planEditorTools {
    display: none !important;
}

/* =========================================================
   BARRE DE PROGRESSION & LOADER D'ACCUEIL (POINT 3)
========================================================= */
/* Barre de progression d'accueil */
#loaderBox {
    margin-top: 20px;
    width: 100%;
    max-width: 480px;
}

.loader-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--violet-dark);
}

.loader-track {
    width: 100%;
    height: 12px;
    background: var(--violet-soft);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

#loaderBar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #8d57c6, #581c87);
    border-radius: 999px;
    transition: width 0.15s ease-out;
}