@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');


body {
  font-family: 'Cormorant Garamond', serif;
  background: url('../img/59ab548e-38f2-451d-81ff-701804c2f707.png') repeat;
  background-color: #0d0e0b;
  color: #d5d5c5;
  line-height: 1.7;
  letter-spacing: 0.5px;
  transition: background 1s ease;
}

p {
  font-size: 17px;
}

.journal-layout {
  display: flex;
  max-width: 1533px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
}

/* Carte */
.map-section {
  flex: 2;
  border: 3px solid #5c2d0c;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  height: 688px;
}
#map {
  width: 100%;
  height: 688px;
}
/*#map::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 30, 20, 0.25);
  pointer-events: none;
}*/

/* --- CARTE LEAFLET --- */
#map {
  border: 2px solid #3e5c4b;
  box-shadow: 0 0 30px rgba(50,255,180,0.15);
  filter: grayscale(60%) contrast(1.1) brightness(0.9) saturate(0.8);
  border-radius: 10px;
  transition: all 0.3s ease;
}
#map:hover {
  filter: grayscale(50%) brightness(1);
}
.leaflet-container {
  background: #0a0a0a; /* évite l’écran gris Safari */
}

/* --- INFOS ITINÉRAIRE / JOURNAL --- */
#journal {
  background: rgba(20, 25, 25, 0.85);
  border: 1px solid rgba(159, 193, 145, 0.2);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: inset 0 0 20px rgba(0, 255, 150, 0.05);
}

 /* --- Navbar --- */
.navbar {
  top: 0;
  left: 0;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: 50px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background-color: #3a1e0b;
  color: #fdf6e3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  z-index: 1000;
  background: rgba(10, 20, 15, 0.9);
  border-bottom: 2px solid #3e5c4b;
  box-shadow: 0 0 10px rgba(10,255,180,0.2);
  font-family: 'Cinzel Decorative', serif;
  letter-spacing: 2px;
  /*text-transform: uppercase;*/
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
  letter-spacing: 2px;
}

.navbar .logo img {
  height: 32px;
  width: 32px;
}

.navbar .nav-links {
  display: flex;
  gap: 20px;
}

.navbar .nav-links a {
  text-decoration: none;
  color: #a8d5b2;
  font-weight: bold;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.3s;
  text-transform: uppercase;
}

.navbar .nav-links a:hover {
  color: #e1ffcc;
  text-shadow: 0 0 8px #78ffb3;
}

/* --- Sélecteur --- */
#itineraireSelect {
  background: rgba(20, 30, 25, 0.8);
  color: #c9e7c5;
  border: 1px solid #53785d;
  font-family: 'Cormorant Garamond', serif;
  padding: 8px 12px;
  border-radius: 6px;
}
#itineraireSelect:hover {
  background: rgba(40, 60, 45, 0.8);
}

/* Visuel et position du bouton */
html {
  scroll-behavior: smooth; /* scroll fluide (sera ignoré si reduced motion) */
}

/* Bouton back-to-top */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(20, 35, 30, 0.9);
  border: 1px solid rgba(124, 255, 178, 0.25);
  color: #b4d6a6;
  display: grid;
  place-items: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(124, 255, 178, 0.15);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 240ms ease, transform 240ms ease;
  z-index: 2000;
}

.back-to-top:hover {
  background: rgba(50, 80, 60, 0.95);
  box-shadow: 0 0 20px rgba(159, 193, 145, 0.25);
}

/* État visible */
.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile : un peu plus petit et remonté */
@media (max-width: 768px) {
  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    line-height: 36px;
    font-size: 18px;
  }
}

/* Respecte les préférences d’accessibilité */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-to-top {
    transition: none;
  }
}



/* Journal */
.journal-section {
  flex: 1;
  /*background: rgba(250, 240, 220, 0.9);*/
  border: 2px solid #a0794b;
  border-radius: 12px;
  padding: 20px;
  line-height: 1.6em;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}
.journal-section h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 32px;
  text-align: center;
  margin-bottom: 1em;
  color: rgba(250, 240, 220, 0.95);/*#4a2e12;*/
  line-height: normal;
  letter-spacing: 2px;
}
.journal-section h3 {
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 1em;
   color: #4a2e12;
}

.players-section h2, .players-section-chapitre h2, .player-card .info h3 {
  font-family: 'Cormorant Garamond', serif;
}
#itineraireInfos {
  margin-bottom: 20px;
  padding: 12px;
  border-left: 4px solid #4a2e12;
  background: rgba(255, 250, 240, 0.9);
  color: black;
}
select {
  width: 100%;
  padding: 6px;
  font-size: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #7a5a3f;
  background: #fdf8f2;
}

/* Portraits en bas */
.players-section, .players-section-chapitre {
  max-width: 1533px;
  margin: 30px auto;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;
  background: rgba(250, 240, 220, 0.95);
  border: 2px solid #a0794b;
  border-radius: 12px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.players-section h2, .players-section-chapitre h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: #4a2e12;
  letter-spacing: 2px;
}

/* Grille à 3 colonnes */
.players-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Carte joueur */
.player-card {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 16px;
  margin: 10px;
  padding-bottom: 8px;
  text-align: center;
  background: rgba(15, 25, 20, 0.8);
  border: 1px solid #496a55;
  box-shadow: 0 0 15px rgba(0, 255, 150, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-card img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  margin-bottom: 8px;
  object-fit: cover;
  border: 2px solid #4a2e12;
  cursor: pointer;
  transition: transform 0.2s;
}

.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(100,255,200,0.25);
}

.player-card .info h3 {
  font-size: 18px;
  margin: 0 0 5px;
  font-family: 'Cormorant Garamond', serif;
  color: #d2ffdd;
}
.player-card .info p {
  margin: 0;
  font-size: 16px;
  padding-left: 15px;
  padding-right: 15px;
}
.player-card .info h5 {
  font-size: 14px;
  padding-top: 10px;
}

/* Ruban diagonal */
.player-card .ribbon {
  position: absolute;
  top: 25px; /*12px;*/
  left: -50px; /*-40px;*/
  width: 180px; /*160px;*/
  text-align: center;
  line-height: 24px;
  font-size: 15px; /*18px;*/
  font-weight: bold;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  background: #2b694c;
  color: #d2ffdd;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
}

.mort {
  position: absolute;
  top: 0px;
  left: 0px;
  padding: 5px 5px;
  background: linear-gradient(135deg, #1a1a1a, #1a1a1a);
  font-size: 20px;
  font-family: 'Caveat', cursive;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sexe {
  position: absolute;
  top: 0px;
  right: 0px;
  padding: 5px 5px;
  /*border-radius: 12px;*/
  font-size: 20px;
  font-family: 'Caveat', cursive;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Couleurs selon le sexe */
.sexe.homme {
  background: linear-gradient(225deg, #000000, #3366ff);
}

.sexe.femme {
  background: linear-gradient(225deg, #000000, #ff6699);
}

.sexe.autre {
  background: linear-gradient(225deg, #ffffff, #cc66ff);
}

.sexe.master {
  background: linear-gradient(225deg, #ffffff, #a79090);
}

.sexe.mythe {
  background: linear-gradient(135deg, #1a1a1a, #1a1a1a);
}

.nb_part {
  background-color: #2b694c;
  position: absolute;
  bottom: 0px;
  right: 0px;
  padding: 5px 5px;
  /*border-radius: 12px;*/
  font-size: 20px;
  font-family: 'Caveat', cursive;
  font-weight: bold;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  cursor: help;
}


/* Tooltip stylisé */
.tooltip {
  position: absolute;
  bottom: 10%;
  left: 0%;
  transform: translateX(-105%);
  background-color: #2b694c;
  color: white;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 6px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  text-align: left;

  /* Effet de bord vieilli */
  border: 2px solid #5c3b1e;
  outline: 2px dashed rgba(60,30,10,0.5);
  outline-offset: -6px;
}
/* Apparition au survol */
.player-card .nb_part:hover .tooltip {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none; /* masquée par défaut */
  position: fixed;
  z-index: 1000;
  padding-top: 5%;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.85);
  text-align: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

#cntrl-wrap {
	position: absolute;
	top: 0px;
	/*left: -21px;
	right: 0;*/
	width: 100%;
	display: flex;
	justify-content: flex-start;;
	align-items: center;
	padding: .5rem 0;
	z-index: 999999;
}

#cntrl-wrap .cntrl {
	width: 870px;/*25rem;*/
	display: flex;
	flex-direction: row;
	justify-content: start;
	align-items: center;
	padding: .5rem;
	background-color: #fff;
	border-radius: .5rem;
	border: 2px solid #b7b7b7b3;
	overflow: auto;
}

#cntrl-wrap .cntrl .btn {
	color: #1f77a2;
	cursor: pointer;
	border-radius: 5px;
	padding: .25rem .25rem;
	background-color: #5d71db2e;
}

#cntrl-wrap .cntrl .prog-bar-wrap {
	display: flex;
	height: 5px;
	width: 0%;
	padding: 0 .5rem;
	overflow: auto;
}
#prog-bar {
	background-color: #5197e8;
	width: 0%;
	border-radius: 5px;
}

#cntrl-wrap .cntrl .point-info {
	color: #4d4d4d;
	white-space: nowrap;
	background-color: #4d7f9726;
	padding: .25rem;
	border-radius: .5rem;
  width: 100%;
  text-align: center;
}