/*NAV BAR*/
.menu-burger {
  display: none;
  background: none;
  border: none;
  color: #FFD700;
  font-size: 28px;
  cursor: pointer;
}

.navbar {
	z-index: 9999;
  position: relative;
  background-color: #002ab6; 
  padding: 15px 40px;
  display: flex;
  justify-content: space-between; 
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin-bottom: 40px; 
}
.navbar .logo {
  color: #ffcc00; /* Jaune Brique House */
  font-size: 1.5em;
  font-weight: 800;
  font-family: 'Gilroy', 'Lexend Deca', sans-serif;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  font-family: 'Lexend Deca', sans-serif;
  transition: color 0.3s ease-in-out;
}

/* Effet au survol ET page active */
.nav-links a:hover, 
.nav-links a.active {
  color: #ffcc00;
}

/*STYLE INDEX*/
.indexp {
  color: white !important;
  font-size: 30px !important;
  font-family: 'Lexend Deca', Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: bold;
  text-align: center !important;
}

.indexul {
  color: #002ab6 !important;
  font-size: 30px !important;
  font-family: 'Lexend Deca', Roboto, Helvetica, Arial, sans-serif !important;
  text-align: left !important;
}

.indexa {
  color: blue !important;
}

@media (max-width: 950px) {
	.menu-burger {
		display: block;
		margin-left: auto;
		padding-right: 20px;
	}

	.nav-links {
	display: none !important;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 20px;
    width: 220px;
    background-color: #002ab6;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
		border-radius: 10px;
  }

	.nav-links li {
    text-align: center;
    padding: 15px 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

	.nav-links li:last-child {
    border-bottom: none;
	}

	 .nav-links.active {
    display: flex !important;
  }
}

/* STYLE GMS */
body {
  font-family: Lexend Deca; 
  background: #f3b0cf; 
  color: #000000; 
  text-align: center;
}

.grid {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 20px; 
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  border: 1px solid #444; 
  padding: 15px; 
  border-radius: 12px; 
  background: #fff;
  transition: transform 0.2s;
}

.degre {
  font-weight: bold; 
  color: #e075aa;
}

.PrecisionPMC {
  font-size: 20px; 
  color: gray;
  text-align: right;
}


/* Bouton Téléchargement Excel */
.btn-excel {
  background-color: #002ab6;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  margin-top: 15px;
  width: 100%;
  transition: background-color 0.3s, transform 0.1s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-excel:hover {
  background-color: #ffcc00;
  color: #002ab6;
}

.btn-excel:active {
  transform: scale(0.98);
}

/*STYLE MODALE BIERES GMS*/
.modale-fond {
  display: none; /* Cachée par défaut */
  position: fixed;
  z-index: 1000; /* Toujours au premier plan */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Fond noir transparent */
}

.modale-contenu {
  background-color: #f3b0cf; /* Fond rose BH  */
  padding: 30px;
  width: 80%;
  max-width: 600px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 3px solid #002ab6;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  max-height: 85vh;
  overflow-y: auto;
}

.modale-fermer {
  color: #002ab6;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.modale-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.modale-image-container img {
  width: 150px; /* Taille de l'image de la bière */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modale-texte {
  color: #002ab6;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

.modale-texte h2 {
  margin-top: 0;
  font-size: 24px;
}


/*STYLE GENERAL*/

*{
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Lexend Deca', Roboto, Helvetica, Arial, sans-serif;
  background-color: #f3b0cf;
  color: #333;
  margin: 0;
  padding: 20px;
}

h1 {
  text-align: center;
  color: #002ab6;
  margin-bottom: 30px;
}

/*BOUTON DE BIERES*/
.menu-boutons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  background: linear-gradient(110deg, #e41b19 50%, #002ab6 50%);
  background-size: 250% 100%;
  background-position: 100% 0;
  color: white;
  border: none;
  padding: 12px 25px;
  margin: 2px 2px 2px 2px;
  font-size: 1em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background-position 0.5s ease-in-out, color 0.5s ease-in-out;

  font-family: 'Lexend Deca', sans-serif;
  font-weight: bold;
  text-transform: none;
} 

.btn:hover {
  background-position: 0 0;
  color: white;
  border: solid;
}
/*L'ECRAN*/

#ecran-affichage {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px rgba(0,0,0,0.08);
  border: 2px solid #002ab6;
  text-align: left;
  min-height: 200px;
}

.mot-cle {
  color: #e075aa;
  font-size: 1.2em;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: bold;
  display: inline-block;
}

.definition {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.definition p {
  line-height: 1.6;
  margin-bottom: 12px;
}

.decale-droite {
  margin-left: 40px !important;
  border-left: 4px solid #002ab6 !important;
  padding-left: 15px !important;
  background-color: #f4f6f9 !important;
}

/*LIEN*/

.wiki-link {
  color: blue;
  font-weight: bold;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #2980b9;
  transition: color 0.2s;
}

.wiki-link:hover {
  color: #e075aa;
  text-decoration-style: solid;
}

/*font noir transparent*/
#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 999;
}

/*POPUP*/

#modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  text-align: left;
  background: white;
  border-radius: 12px !important;
  border: none !important;
  padding: 30px !important;
}

#modal-titre {
  color: #2980b9;
  margin-top: 0;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

#modal button {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.2s;
}

#modal button:hover {
  background-color: #555;
}

/*CARTE DISTRIB*/
@media (max-width: 768px) {
  #map {
    flex-grow: 1;
    height: 60vh;
    width: 100%;
    height: 450px;
  }

  .controls {
    align-items: stretch;
  }

  select, .rechercheInput {
    width: 100%;
  }
}

#map {
  flex-grow: 1;
  height: 60vh;
  width: 90%;
  border: 5px solid white;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  margin: 0;
}

.controls {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
}

select {
  padding: 10px;
  font-size: 16px;
  width: 300px;
}

.rechercheInput {
 padding: 10px;
 font-size: 16px;
 width: 300px;
}

.fontBiere {
  width: 90%;
  margin: 0 auto;
  position: absolute;
  z-index: 0;
}

.font-distrib {
  width: 85%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 40px 20px;
  border-radius: 20px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.4);

  background-position: center;
  background-image: url('/images/fontDistrib.png');
  background-size: cover;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.conteneur-carte-panneau {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 20px;
  align-items: stretch;
}

.panneau-lateral {
  background: white;
  border: 4px solid #e075aa;
  border-radius: 15px;
  width: 300px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.panneau-en-tete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.panneau-en-tete h3 {
  margin: 0;
  color: #002ab6;
  font-size: 1.2em;
}

.btn-icone {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-icone:hover {
  transform: scale(1.2);
}

  /* Design de la liste avec les boutons + et - */
#liste-bieres-ref {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

#liste-bieres-ref li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f4f6f9;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #333;
  font-weight: bold;
}

.btn-action-biere {
  background: white;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-weight: bold;
}

.btn-action-biere.retirer { color: red; border-color: red; }
.btn-action-biere.ajouter { color: green; border-color: green; }


/* Panneau de saisie rapide */
.panneau-saisie {
  background: rgba(255, 255, 255, 0.5);
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  border: 2px dashed #002ab6;
}

.badges-saisie {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges-saisie button {
  background: #f3b0cf;
  border: 1px solid #002ab6;
  color: #002ab6;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.badges-saisie button:hover {
  background: #002ab6;
  color: white;
}

/* Bouton Proforma */
.menu-typeform {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.btn-form{
    background-color: #002ab6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    width: 45%;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);

    padding: 12px 24px;
}

.btn-form:hover {
  background-color: #ffcc00;
  color: #002ab6;
  border: 2px solid #f3b0cf
}

.btn-form:active {
  transform: scale(0.98);
}

/*=======================
/*MAPPING GMS
/*=======================

/* Styles spécifiques pour la mise en page de la carte */
.map-container {
  display: flex;
  height: calc(100vh - 80px); 
  overflow: hidden;
	flex-direction: row;
	width: 100%;
}

#left {
  height: 100%;
  overflow-y: auto; /* Scroll uniquement ici */
  padding: 15px;
  box-sizing: border-box;
  background-color: transparent; /* Fond propre */
  text-align: left; /* Empêche le centrage moche du texte */
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.sidebar-filters {
  width: 100%;
  box-sizing: border-box;
  background-color: #fafafa;
  border-right: 2px solid #002ab6;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-radius: 20px;
  flex-shrink: 0;
  overflow-y: auto;
}

#map {
  flex: 1;
  height: 100%;
	z-index: 1;
}

.search-input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box
}

.toggle-container {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: bold
}
.toggle-label {margin-left: 10px}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
}
.slider:before {
   position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider { background-color: #28a745; }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

.geo-details {
  margin-bottom: 15px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
}
.geo-details summary {
  font-weight: bold;
  cursor: pointer;
  outline: none;
}
.details-content { margin-top: 10px; }

/* Style pour les listes de cases à cocher multi-choix */
.custom-select {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
}

.select-box {
  border: 1px solid #ccc;
  padding: 10px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  border-radius: 4px;
  font-size: 14px;
}

.dropdown-list {
  display: none; /* Caché par défaut */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto; /* Scroll interne à la liste */
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 1000; /* Passe au-dessus du reste */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-list.show {
  display: block; /* S'affiche quand on clique */
}

.dropdown-list label {
  display: block;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  margin: 0;
}

.dropdown-list label:hover {
  background-color: #f0f0f0;
}

.dropdown-list input[type="checkbox"] {
  margin-right: 8px;
}

.btn-delete-etape {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  padding: 0;
}



.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
   
.filter-group label {
  font-weight: bold;
  color: #002ab6;
  font-size: 14px;
}

.filter-group select, .filter-group input {
  padding: 8px;
  border: 2px solid #f3b0cf;
  border-radius: 6px;
  font-weight: bold;
}

.btn-gps {
  background-color: #002ab6;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.btn-gps:hover {
  background-color: #ffcc00;
  color: #002ab6;
}

/* STYLE POUR L'OPTIMISATION DE TOURNEE */
#panneau-tournee {
  position: relative; 
  z-index: 1000; 
  background: white;
  margin: 20px auto;
  padding: 15px; 
  border-radius: 8px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
  text-align: center; 
  width: 300px;
	display: flex;
	flex-direction: column;
  flex-shrink: 0;
  height: fit-content;
}

#ma_tournee {
  margin: 0 0 10px 0; 
  color: #002ab6; 
  font-size: 16px;
}

#liste-tournee {
  list-style: none; 
  padding: 0; 
  margin: 0 0 15px 0; 
  max-height: 100px; 
  overflow-y: auto; 
  font-size: 12px; 
  text-align: left; 
  color: #333;
}

#DGMAPS {
  display: flex; 
  gap: 10px; 
  justify-content: center;
}

#BGMAPS {
  flex: 1; 
  background-color: #4285F4; 
  color: white; 
  border: none; 
  padding: 8px; 
  border-radius: 5px; 
  cursor: pointer; 
  font-weight: bold; 
  font-size: 12px;
}

#btn-waze {
  flex: 1; 
  background-color: #33ccff; 
  color: white; 
  border: none; 
  padding: 8px; 
  border-radius: 5px; 
  cursor: pointer; 
  font-weight: bold; 
  font-size: 12px;
}

#vider {
  margin-top: 10px; 
  width: 100%; 
  background: none; 
  border: 1px solid #dc3545; 
  color: #dc3545; 
  padding: 5px; 
  border-radius: 5px; 
  cursor: pointer; 
  font-size: 11px;
}

#btn-opti {
  width : 100%;
  background-color: #ffc107;
  color: #333;
  border: none;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 10px;
  transition: 0.2s;
}

#btn-opti:hover {
  background-color: #e0a800;
}


@media (max-width: 768px) {
	.map-container {
		display: flex;
		flex-direction: column-reverse;
		height: auto;
	}

	#map {
		width: 100%;
		height: 55vh;
		min-height: 400px;
		z-index: 1;
	}

	#left {
		width: 100%;
		height: auto;
		overflow : visible;
		padding: 10px;
		box-sizing: border-box;
	}

	.btn-gps, #btn-opti, #BGMPS, #btn-waze, #vider {
		width: 100%;
		padding: 15px;
		font-size: 16px;
		margin-bottom: 10px;
	}
}

/* ==========================================
   NOTIFICATION "TOAST" (Ajout réussi)
   ========================================== */
#toast-notification {
  visibility: hidden;
  min-width: 250px;
  background-color: #28a745; /* Vert succès */
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 15px 20px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
}

/* Classe ajoutée en JS pour déclencher l'animation */
#toast-notification.toast-show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from { bottom: 0; opacity: 0; }
  to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
  from { bottom: 30px; opacity: 1; }
  to { bottom: 0; opacity: 0; }
}
