/* ============================================================
   WINDOW TO MARS — V4.2 · Interface de la carte (proposition « D »)
   Fonds des outils quasi noirs, bloc titre en bas à gauche, frise pleine largeur
   avec profil d'altitude. Tout est limité à l'écran carte (#map.v41) : l'accueil ne change pas.
   ============================================================ */
#map.v41{ --g-bg:rgba(7,6,6,.92); --g-line:rgba(255,255,255,.09); --g-mute:rgba(245,239,233,.56); --g-dim:rgba(245,239,233,.38);
  --g-mars:#E0662A; --g-mars-soft:#F2A06A; }

/* ---------- éléments de la V4 qui disparaissent ---------- */
#map.v41 #topBar, #map.v41 #ticker, #map.v41 #mapCredit,
#map.v41 .recenterCtrl, #map.v41 .leaflet-control-zoom{ display:none !important; }

/* ---------- verre quasi noir commun ---------- */
#map.v41 .v41-glass{ background:var(--g-bg); border:1px solid var(--g-line); border-radius:14px;
  box-shadow:0 10px 36px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter:saturate(140%) blur(14px); backdrop-filter:saturate(140%) blur(14px); }

/* voile de lisibilité (bas de l'écran) */
#v41Veil{ position:absolute; left:0; right:0; bottom:0; height:340px; z-index:24; pointer-events:none;
  background:linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.42) 40%, rgba(0,0,0,.74)); }   /* V4.1 : entre-deux (ni mi-hauteur ni trop léger) */
#v41Veil::before{ content:''; position:absolute; left:0; bottom:0; width:min(640px,55vw); height:100%;
  background:radial-gradient(ellipse at 16% 62%, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); }   /* assombrit juste derrière le bloc SOL */

/* ---------- marque + sélecteur d'engins ---------- */
#v41Brand{ position:absolute; top:18px; left:18px; z-index:31; display:flex; align-items:center; gap:6px; padding:6px; }
#v41Brand .logo{ width:44px; height:40px; display:grid; place-items:center; }
#v41Brand .logo svg{ width:30px; height:22px; }
#v41Brand #roverSwitch{ position:relative !important; left:auto !important; top:auto !important; flex-direction:row; gap:2px; padding:2px;
  border-radius:10px; background:rgba(255,255,255,.035); }
#v41Brand #roverSwitch .rv{ position:relative; z-index:1; min-width:0 !important; gap:8px; padding:9px 14px; border:0; background:none;
  border-radius:8px; color:var(--g-mute); font-size:11.5px; font-weight:600; letter-spacing:.14em; }
#v41Brand #roverSwitch .rv svg{ width:17px; height:17px; }
#v41Brand #roverSwitch .rv:hover{ color:#fff; }
#v41Brand #roverSwitch .rv.active{ color:#fff; background:none; border:0; }
#v41Brand #roverSwitch .pill{ position:absolute; top:2px; bottom:2px; left:2px; width:0; border-radius:8px; pointer-events:none;
  background:linear-gradient(rgba(255,255,255,.13), rgba(255,255,255,.05)); border:1px solid rgba(255,255,255,.16);
  transition:left .35s cubic-bezier(.5,0,.2,1), width .35s cubic-bezier(.5,0,.2,1); }
#v41Brand #roverSwitch .pill::after{ content:''; position:absolute; left:14px; right:14px; bottom:-1px; height:2px; border-radius:2px; background:var(--g-mars); }

/* ---------- rail d'outils (gauche) ---------- */
#map.v41 #v4Tools{ left:18px; top:50%; transform:translateY(-50%); bottom:auto; right:auto; flex-direction:column; gap:2px; padding:6px; align-items:center; overflow:visible;
  background:var(--g-bg); border:1px solid var(--g-line); border-radius:14px; box-shadow:0 10px 36px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
#map.v41 #v4Tools button{ position:relative; width:44px; height:44px; min-width:0; padding:0; justify-content:center; border:0; border-radius:10px;
  background:none; color:var(--g-mute); -webkit-backdrop-filter:none; backdrop-filter:none; }
#map.v41 #v4Tools button svg{ width:20px; height:20px; }
#map.v41 #v4Tools button:hover{ background:rgba(255,255,255,.07); color:#fff; }
#map.v41 #v4Tools button.on{ background:rgba(255,255,255,.08); color:#fff; border:0; }
#map.v41 #v4Tools button.on::before{ content:''; position:absolute; left:-7px; top:12px; bottom:12px; width:2px; border-radius:2px; background:var(--g-mars); }
#map.v41 #v4Tools button span{ display:block; position:absolute; left:56px; top:50%; transform:translate(-6px,-50%); white-space:nowrap; pointer-events:none; opacity:0;
  padding:7px 10px; border-radius:8px; background:rgba(7,6,6,.96); border:1px solid var(--g-line); color:#fff; font-size:10.5px; font-weight:600; letter-spacing:.14em;
  transition:opacity .18s, transform .18s; }
#map.v41 #v4Tools button:hover span, #map.v41 #v4Tools button:focus-visible span{ opacity:1; transform:translate(0,-50%); }
#map.v41 #v4Tools button[data-v4="data"]{ order:0; color:var(--g-mars-soft); }
#map.v41 #v4Tools button[data-v4="layers"]{ order:1; }
#map.v41 #v4Tools button[data-v4="tours"]{ order:2; }
#map.v41 #v4Tools button[data-v4="teach"]{ order:3; }
#map.v41 #v4Tools button[data-v4="share"]{ order:4; margin-top:9px; }
#map.v41 #v4Tools button[data-v4="share"]::after{ content:''; position:absolute; top:-6px; left:8px; right:8px; height:1px; background:var(--g-line); }
#map.v41 #v4Layers{ left:84px; top:50%; transform:translateY(-50%); background:rgba(7,6,6,.95); border-color:var(--g-line); border-radius:14px; }

/* ---------- son (haut droite) ---------- */
#v41Sound{ position:absolute; top:18px; right:18px; z-index:31; width:46px; height:46px; border-radius:50% !important; padding:0; transition:right .45s cubic-bezier(.5,0,.15,1); }
#v41Sound #soundToggle{ width:100%; height:100%; padding:0; border:0; border-radius:50%; background:none; justify-content:center; color:#fff; }
#v41Sound #soundToggle .bars{ height:14px; gap:3px; }
#v41Sound #soundToggle .bars i{ background:#fff; width:3px; }
#v41Sound #soundToggle.off .bars i{ background:var(--g-mute); }
#v41Sound #soundLbl{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
#v41Sound:hover{ border-color:rgba(255,255,255,.3); }

/* ---------- pile de contrôles (droite) ---------- */
#v41Ctl{ position:absolute; right:18px; top:50%; transform:translateY(-50%); z-index:31; width:46px; padding:4px; display:flex; flex-direction:column; transition:right .45s cubic-bezier(.5,0,.15,1); }
#v41Ctl button{ height:38px; border:0; border-radius:9px; background:none; color:#F5EFE9; display:grid; place-items:center; cursor:pointer; }
#v41Ctl button:hover{ background:rgba(255,255,255,.08); }
#v41Ctl button svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#v41Ctl hr{ border:0; height:1px; background:var(--g-line); margin:3px 6px; }

/* ---------- bloc titre (bas gauche) ---------- */
#v41Title{ position:absolute; left:88px; bottom:136px; z-index:30; max-width:560px; color:#F5EFE9; pointer-events:none; }
/* apparition en fondu, élément par élément, à la fin de l'animation du tracé */
#v41Title > *{ opacity:0; transform:translateY(12px); transition:opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
#v41Title.on{ pointer-events:auto; }
#v41Title.on > *{ opacity:1; transform:none; }
#v41Title.on > :nth-child(2){ transition-delay:.12s; }
#v41Title.on > :nth-child(3){ transition-delay:.26s; }
#v41Title.on > :nth-child(4){ transition-delay:.42s; }
#v41Title .over{ display:flex; align-items:center; gap:10px; font-size:11px; letter-spacing:.3em; font-weight:600; color:var(--g-mars-soft);
  text-shadow:0 1px 2px rgba(0,0,0,.8); margin-bottom:4px; }
#v41Title .over i{ width:24px; height:1px; background:var(--g-mars-soft); flex:none; }
#v41Title h1{ margin:0; font-weight:200; font-size:80px; line-height:.95; letter-spacing:-.02em; white-space:nowrap; }
#v41Title h1 span{ font-weight:600; font-size:22px; letter-spacing:.3em; vertical-align:top; margin-right:12px; position:relative; top:12px; }
#v41Title h1 b{ font-weight:200; }
#v41Title .facts{ display:flex; gap:26px; margin-top:12px; }
#v41Title .kv small{ display:block; font-size:9.5px; letter-spacing:.2em; color:var(--g-dim); font-weight:600; margin-bottom:3px; text-shadow:0 1px 2px rgba(0,0,0,.8); white-space:nowrap; }
#v41Title .kv div{ font-size:15px; white-space:nowrap; }
#v41Title .kv div em{ font-style:normal; color:var(--g-mute); font-size:12px; margin-left:4px; }

/* carte d'appel « Aujourd'hui sur Mars » */
#v41Today{ position:relative; display:flex; align-items:center; gap:14px; width:470px; max-width:100%; margin-top:18px; padding:10px 12px 10px 10px; text-align:left;
  border-radius:16px; background:var(--g-bg); border:1px solid rgba(255,255,255,.1); color:#fff; cursor:pointer; overflow:hidden;
  box-shadow:0 14px 44px rgba(0,0,0,.7); transition:transform .25s, border-color .25s, box-shadow .25s; }
#v41Today::before{ content:''; position:absolute; inset:0; border-radius:16px; padding:1px; pointer-events:none;
  background:linear-gradient(110deg, rgba(224,102,42,0) 30%, rgba(224,102,42,.85) 50%, rgba(224,102,42,0) 70%) 0 0/250% 100%;
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude;
  animation:v41sweep 5s infinite linear; }
@keyframes v41sweep{ from{ background-position:150% 0 } to{ background-position:-100% 0 } }
#v41Today:hover{ transform:translateY(-2px); border-color:rgba(224,102,42,.55); box-shadow:0 18px 50px rgba(0,0,0,.8), 0 0 0 4px rgba(224,102,42,.12); }
#v41Today .th{ position:relative; flex:0 0 96px; height:72px; border-radius:10px; overflow:hidden; background:#1c1512; }
#v41Today .th img{ width:100%; height:100%; object-fit:cover; display:block; transition:opacity .5s; }
#v41Today .th b em{ font-style:normal; }
#v41Today .th b{ white-space:nowrap; position:absolute; left:5px; top:5px; font-size:8.5px; letter-spacing:.12em; background:var(--g-mars); color:#111; padding:2px 5px; border-radius:4px; font-weight:700; }
#v41Today.noimg .th{ display:none; }
#v41Today .tx{ flex:1; min-width:0; display:block; }
#v41Today .t1{ display:flex; align-items:center; gap:8px; font-size:12px; letter-spacing:.2em; font-weight:700; }
#v41Today .t1 i{ width:7px; height:7px; border-radius:50%; background:#4ADE80; box-shadow:0 0 8px #4ADE80; animation:v4blink 2s infinite; flex:none; }
#v41Today .t2{ display:block; margin-top:5px; font-size:13.5px; line-height:1.35; color:var(--g-mute); height:37px; overflow:hidden; transition:opacity .38s; }
#v41Today .t2.fade{ opacity:0; }
#v41Today .t2 b{ color:#fff; font-weight:500; }
#v41Today .go{ flex:0 0 40px; height:40px; border-radius:50%; background:var(--g-mars); color:#111; display:grid; place-items:center; transition:transform .25s; }
#v41Today .go svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
#v41Today:hover .go{ transform:translateX(3px); }

/* ---------- frise pleine largeur + profil d'altitude ---------- */
#map.v41 #v4Timeline{ left:24px; right:24px; bottom:24px; transform:none; width:auto; min-width:0; z-index:30; display:flex; align-items:flex-end; gap:16px;
  background:none; border:0; border-radius:0; padding:0; -webkit-backdrop-filter:none; backdrop-filter:none; transition:right .45s cubic-bezier(.5,0,.15,1); }
#map.v41 #v4Timeline.empty{ opacity:.55; }
#map.v41 #v4TlPlay{ flex:none; width:36px; height:36px; margin-bottom:6px; border-radius:50%; border:1px solid rgba(255,255,255,.3); background:rgba(0,0,0,.35);
  color:#fff; display:grid; place-items:center; cursor:pointer; font-size:11px; }
#map.v41 #v4TlPlay svg{ width:13px; height:13px; fill:currentColor; margin-left:2px; }
#map.v41 #v4TlPlay:hover{ background:#fff; color:#000; }
#map.v41 #v4Timeline.playing #v4TlPlay svg{ display:none; }
#map.v41 #v4Timeline.playing #v4TlPlay::after{ content:'❚❚'; letter-spacing:1px; }
#map.v41 #v4TlTrack{ flex:1; position:relative; height:104px; cursor:pointer; touch-action:none; }
#v4TlProf{ position:absolute; left:0; right:0; top:14px; height:58px; }
#v4TlCv{ position:absolute; inset:0; width:100%; height:100%; display:block; }
#v4TlAxis span{ position:absolute; left:0; font-size:9px; letter-spacing:.08em; color:var(--g-dim); text-shadow:0 1px 2px #000; white-space:nowrap; }
#v4TlStages .stg{ position:absolute; top:0; bottom:0; border-left:1px dashed rgba(255,255,255,.28); pointer-events:none; }
#v4TlStages .stg span{ position:absolute; left:5px; top:-1px; font-size:9px; letter-spacing:.16em; font-weight:600; color:var(--g-mute); white-space:nowrap; text-transform:uppercase; text-shadow:0 1px 2px #000; }
#map.v41 #v4TlBar{ position:absolute; left:0; right:0; top:78px; height:1px; margin:0; border-radius:0; background:rgba(255,255,255,.35); }
#map.v41 #v4TlBar.grad{ background:rgba(255,255,255,.35); }
#v4TlFill{ position:absolute; left:0; top:-1px; height:3px; width:0; background:linear-gradient(90deg, rgba(224,102,42,0), var(--g-mars)); }
#v4TlTicks i{ position:absolute; top:74px; width:1px; height:9px; background:rgba(255,255,255,.4); }
#v4TlTicks i.y{ top:71px; height:15px; background:#fff; }
#v4TlTicks label{ position:absolute; top:90px; transform:translateX(-50%); font-size:9.5px; letter-spacing:.16em; color:var(--g-dim); white-space:nowrap; }
#v4TlTicks label.first{ transform:none; }
#v4TlV{ position:absolute; top:14px; height:64px; width:1px; margin-left:-.5px; background:linear-gradient(rgba(224,102,42,0), var(--g-mars)); pointer-events:none; }
#v4TlKnob{ position:absolute; top:71px; width:15px; height:15px; margin-left:-7.5px; border-radius:50%; background:var(--g-mars);
  box-shadow:0 0 0 5px rgba(224,102,42,.25), 0 0 18px var(--g-mars); pointer-events:none; }
#v4TlBubble{ position:absolute; top:8px; transform:translate(-50%,-100%); padding:5px 9px; border-radius:8px; background:rgba(7,6,6,.94); border:1px solid var(--g-line);
  white-space:nowrap; pointer-events:none; display:flex; flex-direction:column; gap:1px; box-shadow:0 6px 20px rgba(0,0,0,.6); }
#v4TlBubble.right{ transform:translate(calc(-100% + 2px),-100%); }
#v4TlBubble.left{ transform:translate(-12px,-100%); }
#map.v41 #v4TlBubble b{ font-size:11px; letter-spacing:.14em; font-weight:700; color:#fff; }
#map.v41 #v4TlBubble span{ font-size:10.5px; color:var(--g-mute); letter-spacing:.02em; }
#map.v41 #v4TlRange{ position:absolute; left:0; right:0; top:70px; height:16px; opacity:0; pointer-events:none; }
#map.v41 #v4Timeline:focus-within #v4TlKnob{ box-shadow:0 0 0 5px rgba(255,255,255,.5), 0 0 18px var(--g-mars); }
#v4TlEnd{ flex:none; margin-bottom:10px; }
#v4TlEnd .v4-scale{ background:none; border:0; padding:0; margin:0 !important; font-size:10px; letter-spacing:.14em; color:#fff; text-shadow:0 1px 2px #000; }
#v4TlEnd .v4-scale .bar{ height:5px; border:1.5px solid #fff; border-top:0; margin-bottom:16px; }
#v4TlEnd #v4Coords{ font-size:9.5px; letter-spacing:.04em; color:var(--g-dim); min-width:150px; }

/* attributions des fonds de carte : discrètes, tout en bas */
#map.v41 .leaflet-bottom.leaflet-left .leaflet-control-attribution{ background:none !important; color:rgba(255,255,255,.32) !important; font-size:8.5px !important; margin:0 0 2px 8px; }

/* ---------- panneau « Aujourd'hui sur Mars » ---------- */
#map.v41 #v4Drawer{ top:0; bottom:0; width:420px; z-index:40; background:rgba(7,6,6,.96); border-left:1px solid rgba(255,255,255,.08); box-shadow:-20px 0 60px rgba(0,0,0,.6);
  transition:transform .45s cubic-bezier(.5,0,.15,1); }
#map.v41 .v4d-hd{ padding:22px 24px 18px; align-items:flex-start; }
#map.v41 .v4d-hd b{ display:block; font-size:24px; font-weight:300; letter-spacing:.02em; text-transform:none; }
#map.v41 .v4d-hd b::before{ content:''; display:inline-block; width:8px; height:8px; border-radius:50%; background:#4ADE80; box-shadow:0 0 8px #4ADE80; margin:0 10px 4px 0; vertical-align:middle; animation:v4blink 2s infinite; }
#map.v41 .v4d-hd span{ display:block; margin-top:6px; font-size:10.5px; letter-spacing:.2em; color:var(--g-mars-soft); }
#map.v41 .v4d-hd button{ width:34px; height:34px; border-radius:50%; border:1px solid rgba(255,255,255,.16); font-size:13px; flex:none; }
#map.v41 .v4d-hd button:hover{ border-color:#fff; }
#map.v41 .v4d-sec summary{ padding:15px 24px; }
#map.v41 .v4d-c{ padding:0 24px 16px; }
#map.v41 .v4wx{ background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.08); border-radius:12px; }
body.v41-panel #v41Ctl, body.v41-panel #v41Sound{ right:438px; }
body.v41-panel #map.v41 #v4Timeline{ right:444px; }

/* ---------- autres éléments recalés ---------- */
#map.v41 .roverMark .lbl{ background:rgba(7,6,6,.9); border:1px solid rgba(255,255,255,.12); border-radius:8px; padding:6px 10px; letter-spacing:.12em; }
#map.v41 #v4Tour{ left:84px; top:88px; bottom:auto; background:rgba(7,6,6,.95); }
#v4Toast{ bottom:170px; }

/* ---------- écrans peu hauts ---------- */
@media (max-height:760px) and (min-width:761px){
  #v41Title h1{ font-size:62px; }
  #v41Title h1 span{ top:8px; font-size:18px; }
  #v41Title .facts{ margin-top:8px; }
  #v41Today{ margin-top:12px; }
  #v41Today .th{ height:60px; flex-basis:84px; }
}
@media (max-height:640px) and (min-width:761px){ #v41Title .facts{ display:none; } }

/* ---------- mobile ---------- */
@media (max-width:760px){
  #v41Brand{ top:10px; left:10px; padding:4px; gap:2px; }
  #v41Brand .logo{ width:34px; height:34px; }
  #v41Brand .logo svg{ width:24px; height:18px; }
  #v41Brand #roverSwitch .rv{ padding:8px 9px !important; font-size:9.5px !important; letter-spacing:.1em; gap:6px; }
  #v41Brand #roverSwitch .rv:not(.active){ font-size:0 !important; gap:0; }
  #v41Brand #roverSwitch .pill::after{ left:9px; right:9px; }
  #v41Sound{ top:10px; right:10px; width:40px; height:40px; }
  #map.v41 #v4Tools{ left:10px; top:62px; transform:none; padding:4px; }
  #map.v41 #v4Tools button{ width:38px; height:38px; }
  #map.v41 #v4Tools button svg{ width:18px; height:18px; }
  #map.v41 #v4Tools button span{ display:none; }
  #map.v41 #v4Layers{ left:62px; right:10px; top:62px; transform:none; bottom:auto; width:auto; }
  #v41Ctl{ right:10px; top:62px; transform:none; bottom:auto; width:40px; padding:3px; }
  #v41Ctl button{ height:34px; }
  #v41Veil{ height:40%; }
  #v41Title{ left:12px; right:12px; bottom:146px; max-width:none; }
  #v41Today .th b em{ display:none; }
  #v41Title .over{ font-size:9px; letter-spacing:.2em; gap:8px; }
  #v41Title .over i{ width:14px; }
  #v41Title h1{ font-size:46px; }
  #v41Title h1 span{ font-size:13px; top:6px; margin-right:8px; }
  #v41Title .facts{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; margin-top:8px; }
  #v41Title .kv small{ font-size:7.5px; letter-spacing:.12em; overflow:hidden; text-overflow:ellipsis; }
  #v41Title .kv div{ font-size:12.5px; overflow:hidden; text-overflow:ellipsis; }
  #v41Title .kv div em{ display:none; }
  #v41Today{ width:100%; margin-top:10px; gap:10px; padding:8px 10px 8px 8px; border-radius:14px; }
  #v41Today .th{ flex-basis:62px; height:52px; border-radius:8px; }
  #v41Today .t1{ font-size:10.5px; letter-spacing:.14em; }
  #v41Today .t2{ font-size:12px; height:32px; margin-top:3px; }
  #v41Today .go{ flex-basis:34px; height:34px; }
  #map.v41 #v4Timeline{ left:10px; right:12px; bottom:14px; gap:10px; }
  #map.v41 #v4TlPlay{ width:32px; height:32px; margin-bottom:4px; }
  #map.v41 #v4TlTrack{ height:84px; }
  #v4TlProf{ top:12px; height:40px; }
  #map.v41 #v4TlBar{ top:60px; }
  #v4TlTicks i{ top:56px; } #v4TlTicks i.y{ top:53px; } #v4TlTicks label{ top:70px; font-size:8.5px; letter-spacing:.1em; }
  #v4TlV{ top:12px; height:48px; }
  #v4TlKnob{ top:53px; }
  #map.v41 #v4TlRange{ top:52px; }
  #v4TlAxis, #v4TlStages .stg span{ display:none; }
  #v4TlBubble{ top:6px; padding:4px 7px; }
  #map.v41 #v4TlBubble span{ font-size:9.5px; }
  #v4TlEnd{ display:none; }
  #map.v41 #v4Drawer{ width:100%; z-index:60; }
  body.v41-panel #v41Ctl, body.v41-panel #v41Sound{ right:10px; }
  body.v41-panel #map.v41 #v4Timeline{ right:12px; }
  #map.v41 #v4Tour{ left:10px; right:10px; top:110px; width:auto; }
  #map.v41 .leaflet-control-attribution{ display:none; }
}
@media (max-width:760px) and (max-height:700px){
  #v41Title .facts{ display:none; }
  #v41Title h1{ font-size:38px; }
}

/* ---------- chargement d'un panorama (écran panorama) ---------- */
#panoLoad{ position:absolute; inset:0; z-index:54; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  background:radial-gradient(ellipse at center, rgba(40,24,16,.92), rgba(6,5,5,.97) 70%); opacity:0; pointer-events:none; transition:opacity .35s ease; }
#panoLoad.on{ opacity:1; }
#panoLoad .pl-ring{ width:46px; height:46px; border-radius:50%; border:2px solid rgba(255,255,255,.12); border-top-color:#E0662A; animation:v4spin .9s linear infinite; }
#panoLoad b{ font-size:12px; letter-spacing:.26em; font-weight:600; color:#fff; text-align:center; padding:0 20px; }
#panoLoad .pl-bar{ width:min(260px,60vw); height:2px; border-radius:2px; background:rgba(255,255,255,.12); overflow:hidden; }
#panoLoad .pl-bar i{ display:block; height:100%; width:0; background:#E0662A; transition:width .25s ease; }
#panoLoad.indet .pl-bar i{ width:40% !important; animation:v41indet 1.2s ease-in-out infinite; }
@keyframes v41indet{ from{ transform:translateX(-100%) } to{ transform:translateX(250%) } }
#panoLoad span{ font-size:11.5px; letter-spacing:.06em; color:rgba(245,239,233,.6); min-height:1em; }
#panoView .pnlm-load-box{ display:none !important; }   /* le « Loading… » de la visionneuse fait doublon */
#pano:has(#panoLoad.on) .hint{ opacity:0 !important; }

/* ---------- V4.1 : chiffres sous le SOL retirés (ils sont dans les actualités) ---------- */
#v41Title .facts{ display:none !important; }
#v41Title .over{ text-shadow:0 1px 2px #000, 0 0 10px rgba(0,0,0,.85); color:#F6B07A; }
#v41Title h1{ text-shadow:0 1px 3px rgba(0,0,0,.7), 0 2px 22px rgba(0,0,0,.7); }
#v41Title h1 span{ text-shadow:0 1px 3px #000; }

/* ---------- encart des actualités en haut à gauche ---------- */
#v41News{ position:absolute; top:84px; left:18px; z-index:31; width:470px; max-width:calc(100% - 96px);
  opacity:0; transform:translateY(-8px); pointer-events:none; transition:opacity .7s ease .5s, transform .8s cubic-bezier(.2,.8,.2,1) .5s; }
#v41News.on{ opacity:1; transform:none; pointer-events:auto; }
#v41News #v41Today{ margin-top:0; width:100%; }
#map.v41 #v4Tour{ top:190px; }
@media (max-width:760px){
  #v41News{ top:56px; left:10px; right:10px; width:auto; max-width:none; }
  #map.v41 #v4Tools{ top:136px; }
  #v41Ctl{ top:136px; }
  #map.v41 #v4Layers{ top:136px; }
  #map.v41 #v4Tour{ top:200px; }
  #v41Title{ bottom:128px; }
}

/* ---------- pastilles de panorama avec aperçu ---------- */
#map.v41 .panoMark.thumb .ring{ inset:4px; border:2px solid #fff; background-color:#1a120e; background-size:cover; background-position:center;
  box-shadow:0 2px 10px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.35); transition:transform .25s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s; }
#map.v41 .panoMark.thumb:hover .ring{ transform:scale(1.35); border-color:#E0662A; background-color:#1a120e; box-shadow:0 6px 22px rgba(0,0,0,.8), 0 0 0 4px rgba(224,102,42,.35); z-index:2; }
#map.v41 .panoMark.thumb .pulse2{ inset:2px; background:rgba(255,255,255,.22); }
#map.v41 .leaflet-marker-icon:hover{ z-index:10000 !important; }

/* ---------- séquence d'arrivée : SOL en fondu, puis la frise monte et le pousse ---------- */
#map.v41 #v4Timeline{ opacity:0; transform:translateY(60px); pointer-events:none;
  transition:opacity .7s ease, transform .9s cubic-bezier(.22,1.2,.36,1), right .45s cubic-bezier(.5,0,.15,1); }
#map.v41.v41-tl #v4Timeline{ opacity:1; transform:none; pointer-events:auto; }
#map.v41 #v41Title{ bottom:30px; transition:bottom .9s cubic-bezier(.22,1.2,.36,1); }
#map.v41.v41-tl #v41Title{ bottom:136px; }
@media (max-width:760px){
  #map.v41 #v41Title{ bottom:22px; }
  #map.v41.v41-tl #v41Title{ bottom:128px; }
}

/* ---------- frise sur toute la largeur : l'échelle et les coordonnées passent sous la frise, à droite ---------- */
#map.v41 #v4TlEnd{ position:absolute; right:0; bottom:-20px; margin:0; }
#map.v41 #v4TlEnd .v4-scale{ display:flex; align-items:center; white-space:nowrap; }
#map.v41 #v4TlEnd .v4-scale .bar{ position:relative; margin:0 52px 0 0; height:5px; }
#map.v41 #v4TlEnd .v4-scale .bar span{ position:absolute; left:calc(100% + 6px); top:-5px; }
#map.v41 #v4TlEnd #v4Coords{ min-width:0; margin-left:4px; }

/* ---------- en-tête centré (logo + engins + son) et actualités à droite ---------- */
#v41Brand{ left:50%; transform:translateX(-50%); }
#v41Brand #v41Sound{ position:static; width:auto; height:auto; padding:0 0 0 6px; margin-left:4px; border:0; border-left:1px solid rgba(255,255,255,.1);
  border-radius:0 !important; background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; display:flex; align-items:center; }
#v41Brand #v41Sound #soundToggle{ width:40px; height:40px; border-radius:10px; }
#v41Brand #v41Sound #soundToggle:hover{ background:rgba(255,255,255,.07); }
body.v41-panel #v41Brand #v41Sound{ right:auto; }
#v41News{ left:auto; right:18px; top:84px; width:440px; transform:translateY(-8px); }
#v41News.on{ transform:none; }
body.v41-panel #v41News{ opacity:0; pointer-events:none; }   /* le panneau ouvert reprend son contenu */
#v41Today .go svg{ width:18px; height:18px; stroke-width:1.9; }
@media (max-width:760px){
  #v41Brand{ top:10px; }
  #v41Brand #v41Sound{ padding-left:4px; margin-left:2px; }
  #v41Brand #v41Sound #soundToggle{ width:34px; height:34px; }
  #v41News{ left:10px; right:10px; width:auto; top:62px; }
}

/* ---------- V4.1 : en-tête à gauche / « Aujourd'hui sur Mars » à droite, même hauteur,
   alignés sur le rail d'outils (gauche) et la pile de contrôles (droite) ---------- */
#v41Brand{ left:18px; top:18px; transform:none; height:56px; box-sizing:border-box; padding:6px; }
#v41Brand .logo{ width:auto; height:42px; display:flex; align-items:center; gap:10px; padding:0 12px 0 8px; border-radius:10px; text-decoration:none; color:#fff; }
#v41Brand .logo:hover{ background:rgba(255,255,255,.07); }
#v41Brand .logo svg{ width:30px; height:22px; flex:none; }
#v41Brand .logo .wm{ font-size:15px; font-weight:600; letter-spacing:.22em; text-transform:uppercase; white-space:nowrap; }
/* cartouche : style d'origine (grande vignette, deux lignes), aligné en HAUT sur le bloc logo (même ligne, 18 px) */
#v41News{ top:18px; right:18px; left:auto; width:470px; height:auto; transform:translateY(-6px); }
#v41News.on{ transform:none; }
#v41News #v41Today .go{ flex:none; width:auto; height:36px; padding:0 16px; border-radius:999px; display:flex; align-items:center;
  font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:#1a0e08; background:#E0662A; box-shadow:0 4px 14px rgba(224,102,42,.35); }
#v41News #v41Today:hover .go{ transform:none; background:#F07A3E; }
@media (max-width:1100px) and (min-width:761px){ #v41News{ width:380px; } }
@media (max-width:760px){
  #v41Brand{ left:10px; top:10px; height:48px; padding:4px; }
  #v41Brand .logo{ height:38px; padding:0 6px; }
  #v41Brand .logo .wm{ display:none; }
  #v41News{ left:10px; right:10px; top:66px; width:auto; height:auto; }
  #v41News #v41Today .go{ height:32px; padding:0 12px; font-size:10px; }
  #map.v41 #v4Tools, #v41Ctl, #map.v41 #v4Layers{ top:140px; }
}
/* tablette : engins inactifs en icône seule ; sous 980 px l'encart passe sous l'en-tête (toujours aligné à droite) */
@media (max-width:1320px) and (min-width:761px){
  #v41Brand #roverSwitch .rv:not(.active){ font-size:0 !important; gap:0; padding:9px 11px; }
}
@media (max-width:980px) and (min-width:761px){ #v41News{ top:84px; width:400px; } }

@media (max-width:760px){ #map.v41 #v4Tools, #v41Ctl, #map.v41 #v4Layers{ top:160px; } }
/* mobile : pas de « Aujourd'hui sur Mars » (ni cartouche, ni icône dans le rail) ; outils remontés sous l'en-tête */
@media (max-width:760px){
  #v41News, #map.v41 #v4Tools button[data-v4="data"]{ display:none !important; }
  #map.v41 #v4Tools, #v41Ctl, #map.v41 #v4Layers{ top:70px; }
  #map.v41 #v4Tour{ top:70px; }
}

/* ---------- Accueil (V4.2) : crédit « Site créé par Baptiste & Magali » (même style que mcs-rugby.org),
   pied de page centré, sans l'info des sondes ni le bouton ×100 ---------- */
#homeFoot{ justify-content:center !important; text-align:center; }
#homeFoot .home-credit{ display:inline; color:rgba(255,255,255,.5); font-size:12.5px; letter-spacing:.3px; }
#homeFoot a.home-sign{ border:0 !important; white-space:nowrap; color:inherit; font-size:14px; }
#homeFoot a.home-sign .nm{ color:#fff; font-weight:600; transition:color .15s; }
#homeFoot a.home-sign .amp{ color:#E54B8D; font-weight:700; }
#homeFoot a.home-sign:hover .nm{ color:#E54B8D; }
@media (max-width:760px){
  #homeFoot > span.home-credit{ display:inline !important; font-size:11px; }
  #homeFoot .home-data{ display:none; }
  #homeFoot a.home-sign{ font-size:12.5px; }
}

/* crédit + sondes sur une seule ligne centrée (sans bouton ×100) */
#homeFoot{ gap:22px; flex-wrap:wrap; }
#homeFoot #homeOrbInfo{ display:inline-flex; align-items:center; gap:8px; font-size:12px; color:rgba(255,255,255,.5); }
@media (max-width:760px){ #homeFoot #homeOrbInfo{ display:none; } }
/* retour à la mise en page d'origine : crédit à gauche, sondes à droite, alignés au centre sur la hauteur */
#homeFoot{ justify-content:space-between !important; align-items:center !important; text-align:left; }
@media (max-width:760px){ #homeFoot{ justify-content:flex-start !important; } }
/* mobile : rail d'outils et pile de contrôles centrés sur la hauteur, comme sur ordinateur */
@media (max-width:760px){
  #map.v41 #v4Tools, #v41Ctl{ top:50% !important; transform:translateY(-50%) !important; bottom:auto; }
  #map.v41 #v4Layers{ top:50% !important; transform:translateY(-50%) !important; }
}
