/* DESKTOP (par défaut) */

/* ======== Global ======== */
body {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  line-height: 1.6;
  background-color: #f4f1ea;
  color: #2c2c2c;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  margin-top: 10px;
  line-height: 1.3;
  text-align:center;
}

/* ======== Header ======== */
header {
  position: relative;
  height: 350px;
  background: url('../img/header.png') center/cover no-repeat;
  background-position: center -300px;  
  background-attachment: fixed; /* effet parallax */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* effet parchemin */
header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(244, 241, 234, 0.4);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Titre principal */
header h1 {
  position: relative;
  font-family: 'Cinzel', serif;
  font-size: 3.5em;
  letter-spacing: 3px;
  color: #fdf6e3;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  border: 2px solid rgba(255,255,255,0.3);
  padding: 10px 25px;
  backdrop-filter: blur(3px);
  text-align: center;
}

/* Sous-titre style parchemin */
header .sous-titre {
  position: absolute;
  bottom: 25px;
  right: 25px;
  font-family: 'Cinzel', serif;
  font-size: 23px;
  color: #8b5e3c;
  transform: rotate(-10deg);
  background-color: rgba(255, 245, 230, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Sous-titre style parchemin */
header .cadstre24 {
  position: absolute;
  top: 15px;
  left: 25px;
  font-family: 'Cinzel', serif;
  font-size: 23px;
  color: #8b5e3c;
  transform: rotate(0deg);
  background-color: rgba(255, 245, 230, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  white-space: nowrap;
}


/* ======== Navigation ======== */
nav {
  background-color: #1e1e1e;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 15px 20px;
  color: #f4f1ea;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  transition: background 0.3s;
}

nav ul li:hover {
  background-color: #444;
}

nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2c2c2c;
  flex-direction: column;
  min-width: 200px;
  z-index: 1000;
}

nav ul li ul li ul {
  top: 0;
  left: 100%;
}

nav > ul > li:hover > ul {
  display: flex;
  animation: fadeIn 0.2s ease-in-out;
}

nav ul li ul li:hover > ul {
  display: flex;
  animation: fadeIn 0.2s ease-in-out;
}

nav ul li ul li ul {
  display: none;
}

nav ul li > a::after {
  content: "";
  font-size: 0.7em;
}

nav ul li ul li > a::after {
  content: "";
  float: right;
}

nav ul li ul li ul li > a::after {
  content: "";
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======== Main ======== */
main {
  padding: 40px;
  margin: auto;
}

.main-narrow {
  max-width: 900px;
  width: 90%;
}

.main-full {
  max-width: 100%;
  width: 98%;
  margin: 20px auto;
  padding: 0 10px;  
}

.main-map {
  max-width: 100%;
  width: 60%;
  margin: 20px auto;
  padding: 0 10px;  
}

.card {
  background: white;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.cartouche {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  position: relative;
}

.cartouche h1 {
  font-family: 'Cinzel', serif;
  font-size: 3em;
  color: #F4CA16;
  text-transform: uppercase;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  letter-spacing: 2px;
  text-align: center;
  padding: 80px 120px;

  /* Parchemin + texture papier */
  background: linear-gradient(145deg, #f9efd7, #e6d3a0);
  border: 3px double #a57f52;
  border-radius: 12px;

  /* Ombres pour effet relief */
  box-shadow:
    0 5px 15px rgba(0,0,0,0.3),
    inset 0 0 15px rgba(0,0,0,0.1);

  /* Fond parchemin un peu vieilli */
  background-image:
    url('../img/parchemin-texture.png'),
    linear-gradient(45deg, #c9a44b, #f4d77a, #b8922e);

  background-blend-mode: multiply;  background-size: cover;

  /* Bordures décoratives façon carte ancienne */
  position: relative;
  filter: contrast(1.1) brightness(1.05);
}



/* ======== Gestion des Boutons ======== */
  .styled-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  .styled-button:hover { background-color: #45a049; transform: scale(1.05); }
  .styled-button:active { background-color: #3e8e41; transform: scale(1); }  
  
  .styled-button-bleu {
    background-color: #318CE7;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
  }  
  .styled-button-bleu:hover { background-color: #3150E7; transform: scale(1.05); }
  .styled-button-bleu:active { background-color: #31ACE7; transform: scale(1); }

/* ======== Footer ======== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #666;
}


/* ======= Gestion des Map ======== */
#map {
	height: 70vh;
	width: 75%;
	margin: 10px auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}
#map.small-map {
	height: 60vh; /* Hauteur réduite pour cette page */
	width: 95%; /* Garde la largeur inchangée */
	margin: 10px auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;			
}	
#map.big-map { 
	width: 800px;
	height: 800px;
	right: 20%;
	border-radius: 20px;
	/* position: absolute; */
	overflow: hidden; /* Évite les débordements des tuiles Leaflet */
	border: 2px solid #333; /* Optionnel pour visualiser la bordure */
}	

/* Style pour ajuster la carte en plein écran */
.leaflet-fullscreen-on #map {
	height: 100vh !important;
	width: 100vw !important;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
}


/* =======  Styles pour les infobulles  ======== */
.leaflet-popup-content-wrapper {
	background-color: rgba(0, 38, 51, 0.9) !important; /* Couleur de fond */
	color: rgba(255, 255, 255, 1) !important; /* Couleur du texte */
	border-radius: 10px; /* Coins arrondis */
	max-height: 300px; /* Hauteur maximale de l'infobulle */
	width: 320px; /* Largeur maximale de l'infobulle */
	overflow-y: auto; /* Ajout d'une barre de défilement verticale si le contenu dépasse */
	overflow-x: hidden; /* Évite l'apparition d'une barre de défilement horizontale */
}

/* Personnalisation de la barre de défilement pour les navigateurs basés sur WebKit */
.leaflet-popup-content-wrapper::-webkit-scrollbar {
	width: 12px; /* Largeur de la barre de défilement */
}

.leaflet-popup-content-wrapper::-webkit-scrollbar-track {
	background: rgba(0, 38, 51, 0.9); /* Couleur de l'arrière-plan de la piste */
}

.leaflet-popup-content-wrapper::-webkit-scrollbar-thumb {
	background: yellow; /* Couleur du curseur de la barre de défilement */
	border-radius: 6px; /* Coins arrondis du curseur */
}

.leaflet-popup-content-wrapper::-webkit-scrollbar-thumb:hover {
	background: orange; /* Couleur du curseur au survol */
}

/* Personnalisation de la barre de défilement pour Firefox */
.leaflet-popup-content-wrapper {
	scrollbar-color: yellow rgba(0, 38, 51, 0.9); /* Couleur du curseur et de la piste */
	scrollbar-width: thin; /* Largeur de la barre de défilement (fine ou épaisse) */
}

.leaflet-popup-content {
	padding: 10px; /* Espacement interne */
}

.leaflet-popup-tip {
	background: rgba(0, 38, 51, 0.9); /* Couleur de la flèche */
}


/* =======  Styles cercles et légende  ======== */
.circle {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: inline-block;
}
.cyan {
	background-color: cyan;
}
.yellow {
	background-color: yellow;
}
.red {
	background-color: red;
}

/* Style de la légende map */
.legend {
	background-color: white;
	padding: 10px;
	border-radius: 5px;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
	font-size: 14px;
	line-height: 18px;
	color: #333;
}

/* Style des cercles dans la légende */
.legend .circle {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-left: 5px;
	vertical-align: middle;
}

.legend .cyan {
	background-color: cyan;
}

.legend .yellow {
	background-color: yellow;
}

.legend .red {
	background-color: red;
}
.legend .green {
	background-color: #328800;
}

.legend .orange {
	background-color: #F07427;
}

.legend .default {
	background-color: #a6cee3;
}	

/* =======  Aide Sitadel  ======== */
		
.first-column img {
	display: block;
	margin: 0 auto;
}		
.image-container {
	position: relative;
	display: inline-block;
}

.image-container img {
	width: 100px;  /* Taille de l'image réduite */
	height: 100px;
	transition: opacity 0.2s;
}






/* ======== Media Queries ======== */

/* Tablettes */
@media (max-width: 600px) {

  /* ===== HEADER ===== */
  header {
    height: 220px; /* on garde une image visible */
    background-attachment: scroll; /* IMPORTANT : désactive parallax sur mobile */
    padding: 10px;
	background-position: center 0px;
  }

  header h1 {
    font-size: 1.8em;
    padding: 8px 15px;
  }

  header .sous-titre {
    position: relative;
    display: block;
    margin-top: 8px;
    text-align: center;
    transform: rotate(0deg);
    font-size: 13px;
    background: none;
    box-shadow: none;
  }

  /* ===== MENU MOBILE ===== */
  nav ul {
    flex-direction: column;
  }

  nav ul li {
    border-bottom: 1px solid #444;
  }

  nav ul li a {
    padding: 14px;
    font-size: 15px;
  }

  /* 🔥 Sous-menus visibles en mobile */
  nav ul li ul {
    position: static;
    display: block;
    background-color: #2c2c2c;
    padding-left: 15px;
  }

  nav ul li ul li ul {
    position: static;
    display: block;
    padding-left: 15px;
  }

  /* on enlève les hover inutiles */
  nav > ul > li:hover > ul,
  nav ul li ul li:hover > ul {
    display: block;
  }
  
  /* ===== MAIN GLOBAL ===== */
  main {
    padding: 20px 10px;
    margin: 0;
  }

  /* Tous les layouts passent en full width */
  .main-narrow,
  .main-full,
  .main-map {
    width: 80%;
    max-width: 80%;
    margin: 0 auto;
    padding: 0 10px;
  }

  /* Cas spécifique carte (optionnel mais conseillé) */
  .main-map {
    padding: 0;
  }

  .card {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
  }

  .card:hover {
    transform: translateY(-5px);
  }
  

  /* ===== CARTOUCHE ===== */
  .cartouche {
    margin: 20px 0;
    padding: 0 10px;
  }

  .cartouche h1 {
    font-size: 1.6em;
    padding: 20px 15px;
    letter-spacing: 1px;

    /* évite que le texte déborde */
    word-wrap: break-word;
  }

  /* ===== CARTOUCHE ===== */
  #map {
	  height: 60vh;
	  width: 100%;
	  margin: 10px auto;
	  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	  border-radius: 8px;
	  overflow: hidden;
  }  
}

  
/* ===== BOUTON BURGER ===== */
.menu-toggle {
  display: none;
  width: 100%;
  background-color: #1e1e1e;
  color: #f4f1ea;
  border: none;
  padding: 15px;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  cursor: pointer;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {

  /* bouton visible */
  .menu-toggle {
    display: block;
  }

  /* menu caché par défaut */
  nav {
    display: none;
  }

  /* menu actif */
  nav.active {
    display: block;
  }

  /* menu vertical */
  nav ul {
    flex-direction: column;
  }

  nav ul li {
    border-bottom: 1px solid #444;
  }

  nav ul li a {
    padding: 14px;
  }

  /* sous-menus visibles */
  nav ul li ul {
    position: static;
    display: none;
    padding-left: 15px;
  }

  nav ul li ul li ul {
    padding-left: 15px;
  }

  nav ul li.open > ul {
    display: block;
  }  
}