html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* pas de scroll */
}

#mainMap {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
body{
background-color: black;
background-size: cover;
font-family: Inter, Arial, sans-serif;
}

.voyages-container {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #ccc;
}
.voyages-container strong {
  display: block;
  margin-bottom: 4px;
}
.voyages-container label {
  font-weight: normal;
}
/* Flèches de direction des photos */
.arrow-icon {
  font-size: 18px;
  font-weight: bold;
  color: red;
  text-shadow: 0 0 3px white;
}
.arrow {
  display: inline-block;
  transition: transform 0.2s linear;
  margin-left: 5px;
}


		/* --- Toggle switch style --- */
		.switch {
		  position: relative;
		  display: inline-block;
		  width: 46px;
		  height: 24px;
		}
		.switch input { display: none; }
		.slider {
		  position: absolute;
		  cursor: pointer;
		  top: 0; left: 0; right: 0; bottom: 0;
		  background-color: #ccc;
		  transition: .3s;
		  border-radius: 24px;
		}
		.slider:before {
		  position: absolute;
		  content: "";
		  height: 18px; width: 18px;
		  left: 3px; bottom: 3px;
		  background-color: white;
		  transition: .3s;
		  border-radius: 50%;
		}
		input:checked + .slider {
		  background-color: #2196F3;
		}
		input:checked + .slider:before {
		  transform: translateX(22px);
		}

	    .language-selector {
	        display: flex;
	        gap: 5px;
	        padding: 5px;
	        background: transparent;
			justify-content: space-around;
	    }
	    .language-option {
	        width: 40px;
	        height: 40px;
	        border: 1px solid #ccc;
	        background: white;
	        color: #333;
	        font-weight: bold;
	        cursor: pointer;
	        display: flex;
	        align-items: center;
	        justify-content: center;
			border-radius: 20%;
	    }
	    .language-option.active {
	        background: #f0f0f0;
	        border-color: #999;
	    }
		/* Ligne grise fine */
		.divider {
		    border: 0;
		    height: 1px;
		    background: #ccc;
		    margin: 10px 0;
		}



  #root { position:relative; width:100%; height:100%; overflow:hidden; /*margin:0; padding:0;*/  }
#globePopup #globeContainer {
  width: 100%;
  height: 100%;
}
#globePopup {
  position: fixed;
  top: 1vh; left: 1vw;
  width: 98vw; height: 98vh;
  background: rgba(0,0,0,0.95);
  border-radius: 12px;
  inset: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  display: none;
  z-index: 9990;
  pointer-events: auto;
}
/* Pour tous les contrôles dans la popup du globe */
#globePopup button,
#globePopup input,
#globePopup label,
#globePopup #trajetLegend,
#globePopup #voyagesList {
  /*position: relative;*/
  z-index: 100000;
  pointer-events: auto; 
}

#globeClose {
  position: absolute;
  top: -10px; right: -15px;
  background: red;
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  z-index: 9999;
}

 /* Style du bouton */
        #toggleGlobeBtn {
            position: relative;
            padding: 12px 24px;
            font-size: 16px;
            font-weight: 600;
            color: white;
            background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
            background-size: 200% 200%;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            transition: all 0.4s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        /* Animation du dégradé au survol */
        #toggleGlobeBtn:hover {
            background-position: 100% 100%;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
            transform: translateY(-2px);
        }

        /* Animation de l'icône globe */
        #toggleGlobeBtn::before {
            content: "🌍";
            font-size: 20px;
            display: inline-block;
            animation: spin 8s linear infinite;
        }

        /* Effet de brillance */
        #toggleGlobeBtn::after {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                to bottom right,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 0.2) 50%,
                rgba(255, 255, 255, 0) 100%
            );
            transform: rotate(30deg);
            transition: all 0.4s ease;
        }

        /* Animation de rotation de l'icône */
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Texte du bouton */
        #toggleGlobeBtn span {
            position: relative;
            z-index: 1;
        }


  /* Boutons ronds */
  .toggle-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 120;
    user-select: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.15s;
  }
  .toggle-btn.active { background: rgba(180,220,255,0.9); }
  .toggle-btn:active { transform: scale(0.95); }
  #toggleNight {
    top: 18px;
    left: 18px;
  }
  #toggleRelief {
    top: 80px;
    left: 18px;
  }
  #toggleClouds {
    top: 142px;
    left: 18px;
  }
  /* Bouton carré fond du jour (en bas à gauche) */
  #toggleDayBase {
    position: absolute;
    left: 18px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 120;
    user-select: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    line-height: 1.1;
  }
  #toggleDayBase:active { transform: scale(0.97); }
  /* Légende */
  #legend {
    position:absolute; top:14px; right:14px; z-index:120;
    background: rgba(255,255,255,0.92);
    padding:10px 12px; border-radius:10px;
    min-width:160px; box-shadow:0 6px 18px rgba(0,0,0,0.18);
  }
  #legend label { display:flex; align-items:center; gap:10px; font-weight:600; }
  #legend input[type=checkbox] { width:16px; height:16px; }
  /* Lune */
  #moonPreview {
    position:absolute; bottom:14px; right:14px;
    width:140px; height:140px; z-index:110; border-radius:50%;
    overflow:hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.6); background:black;
  }
  /* Popup stats */
  #trajetPopup {
    position:absolute; bottom:20px; left:20px;
    background:rgba(0,0,0,0.85); color:white;
    padding:10px 14px; border-radius:8px;
    font-size:14px; line-height:1.4; max-width:300px;
    display:none; z-index:200;
  }
  /* Popup Leaflet plein écran */
  #leafletPopup {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    display: none;
    z-index: 400;
  }
  #leafletMap {
    width: 99vw; height: 95vh;
    margin: 2.5vh auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  }
  #leafletClose {
    position: absolute; top: 1px; right: 1px;
    background: #fff; border: none;
    border-radius: 50%; width: 36px; height: 36px;
    cursor: pointer; font-size: 18px; font-weight: bold;
    z-index: 401;
  }
  /* --- AJOUT: styles de la liste dépliable des voyages --- */
  #voyagesDetails { margin-top:8px; }
  #voyagesDetails[hidden] { display:none; }
  #voyagesDetails summary { cursor:pointer; font-weight:700; }
  #voyagesList { margin-top:6px; max-height:260px; overflow:auto; padding-left:2px; }
  #voyagesList label { display:flex; align-items:center; gap:8px; font-weight:500; }

/* Popup d'agrandissement de photo */
#photoPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#photoPopup img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}
#photoClose {
  position: absolute;
  top: 1px;
  right: 1px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  z-index: 500;
}
#photoClose:hover {
  background: #eee;
}

	/* ---- Fullscreen photo overlay ---- */
	.photo-overlay{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.85);z-index:10000}
	.photo-overlay.open{display:flex}
	.photo-overlay img{max-width:95vw;max-height:95vh;box-shadow:0 10px 40px rgba(0,0,0,.6);border-radius:8px}
	.photo-overlay .overlay-close{position:absolute;top:16px;right:16px;font-size:32px;background:transparent;border:none;color:#fff;cursor:pointer;line-height:1}
		
	/* ---- Button in Leaflet popup ---- */
	.enlarge-btn{position:absolute;top:6px;right:6px;background:rgba(0,0,0,.65);color:#fff;border:none;border-radius:6px;padding:4px 8px;cursor:pointer;z-index:1}
	.enlarge-btn:active{transform:scale(0.98)}
.enlarge-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

#leafletPopup {
  z-index: 400;
}
#photoPopup {
  z-index: 500;
} 

.city-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.city-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 206px;
  border: none;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.city-btn span {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  font-weight: bold;
  color: black;
  transition: color 0.3s ease;
}

.city-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0); /* transparent par défaut */
  transition: background 0.3s ease;
}

.city-btn:hover::after {
  background: rgba(0,0,0,0.5); /* assombrit au hover */
}

.city-btn:hover span {
  color: white; /* texte en blanc au hover */
}




/* Cacher sur desktop */
/* Bouton d'ouverture de la bobine */
#toggleReel {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9900; 
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: none; /* caché par défaut */
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* Mobile uniquement */
@media (max-width: 768px) {
  /*#mySidepanelLeft{
    display: none;
  }*/
  #toggleReel {
    display: flex;
    bottom: -25px;
  }
  /* Bouton EARTH (fond du jour) */
  #toggleDayBase {
    top: 204px !important;
    width: 40px;
    height: 40px;
    font-size: 10px;
    border-radius: 8px;
  }
  #cityReel {
    height: 100px; 
    bottom: -110px;
  }
  #cityReel.open {
    bottom: 60px;
  }
}
  #cityReel {
    position: fixed;
    bottom: -140px; /* caché par défaut */
    left: 0;
    right: 0;
    height: 120px;
    background: rgba(0,0,0,0.9);
    z-index: 140;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
    transition: bottom 0.35s ease-in-out;
  }
  #cityReel.open {
    bottom: 0; /* remonte avec animation */
  }
  .city-card {
    display: inline-block;
    background: white;
    border-radius: 10px;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  .city-card:hover {
    background: #f0f0f0;
  }
}
