body {
  background: #1e1e1e;
  color: #f0f0f0;
  padding: 2rem;
  font-family: 'inter', sans-serif;
  margin: 0;
  min-height: 100vh;
}

/* Bannière de maintenance Alyx */
.maintenance-banner {
    display: none; /* <--- "flex" pour l'afficher */
    background: linear-gradient(90deg, #ffcc00 0%, #ffdb4d 100%);
    color: #1a1a1a;
    padding: 20px;
    border-bottom: 4px solid #333;
    font-family: 'Orbitron', sans-serif;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    position: relative;
}

.maintenance-content {
    display: flex;
    align-items: center;
    max-width: 800px;
    gap: 20px;
}

.maintenance-content p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

.maint-icon {
    font-size: 2rem;
    animation: pulse-gear 2s infinite;
}

@keyframes pulse-gear {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Adaptation mobile */
@media (max-width: 600px) {
    .maintenance-content {
        flex-direction: column;
        text-align: center;
    }
}

input {
  width: 100%;
  max-width: 600px;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  background: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  border-radius: 24px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 1rem;
  font-family: 'Orbitron', sans-serif;
}

input::placeholder {
  color: #888;
  opacity: 1;
}

.relais-container h4 {
  margin: 0;
}

/* Le bouton principal */
.btn-fiche-relais {
    display: inline-block;
    text-align: center;
    background-color: #d32f2f;
    color: #ffffff !important;
    padding: 3px 15px;
    margin: 15px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    border-bottom: 3px solid #a12323;
    transition: all 0.2s ease;
}

/* Interaction au survol */
.btn-fiche-relais:hover {
    background-color: #e53935;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Effet de clic (bouton qui s'enfonce) */
.btn-fiche-relais:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    margin-bottom: 17px; /* Compense la perte de bordure pour éviter le saut de mise en page */
}

.download-gpx-link, .open-gpx-map-link, .relais-container h4 a {
  color: #ff6600;
  text-decoration: none;
  margin-right: 15px;
}

.download-gpx-link a:hover, .open-gpx-map-link a:hover, .relais-container h4 a:hover {
  text-decoration: underline;
}

input:focus {
  border-color: #ff6600;
  box-shadow: 0 0 8px #ff6600;
}

.presentation {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: #2a2a2a;
  border: 1px solid #444;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 1s ease-out forwards;
  max-width: 500px;
}

.presentation img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

#results {
  margin-top: 2rem;
  max-width: 1500px;
  padding: 1rem;
  background: #252525;
  border: 1px solid #444;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.2);
  font-family: 'Orbitron', sans-serif;
  overflow-y: auto;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notoriete-bar {
  max-width: 150px;
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  margin-bottom: 8px;
  overflow: hidden;
}
.notoriete-bar-inner {
  height: 100%;
  background-color: #4caf50;
  transition: width 0.4s ease-in-out;
}

.commentaire-contextuel {
  background-color: #2a2a2a;
  border-left: 4px solid #ffaa00;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-style: italic;
  color: #f0f0f0;
}

.homonyme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem;
}
.btn-ville-option {
  background-color: #444;
  color: #fff;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-ville-option:hover {
  background-color: #666;
}

.bubble {
  padding: 1rem 1.2rem;
  border-radius: 20px;
  max-width: 80%;
  word-wrap: break-word;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInSlideUp 0.4s ease forwards;
  font-size: 0.9rem;
  line-height: 1.4;
  font-family: 'roboto', sans-serif;
}

.bubble.user {
  background: #ff6600;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
  box-shadow: 0 3px 8px rgba(255, 102, 0, 0.7);
}

#message {
  font-family: oxygen;
}

.bubble.bot {
  background: #333;
  color: #f0f0f0;
  align-self: flex-start;
  border-bottom-left-radius: 0;
  min-width: 80%;
  position: relative;
}

.bubble.bot em {
    color: lime!important;
    font-weight: bold;
}

.copy-icon {
  cursor: pointer;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease-in-out;
  position: absolute;
  top: 0;
  right: 8px;
}

.copy-icon:hover {
  color: white;
}

.fiche.relais-container {
  background: #444 !important;
  border-left: 5px solid #ff6600 !important;
  padding: 0.8rem !important;
  margin-top: 0.5rem;
  box-shadow: none !important;
  border-radius: 12px !important;
  transition: none !important;
}

.fiche.relais-container:hover {
  background: #555 !important;
  transform: none !important;
}

.relais-image {
  max-width: 200px;
  max-height: 200px;
  min-width: 200px;
  width: auto;
  height: auto;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  margin-right: 1rem;
}

.relais-content {
  flex: 1;
  min-width: 200px;
}

.relais-content p {
  margin: 0;
}

.relais-container {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1em;
	margin-bottom: 1.5em;
	background: #252525;
	border-radius: 8px;
	padding: 8px;
}

.fiche {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  background: #333;
  border-left: 5px solid #ff6600;
  transition: transform 0.3s ease, background 0.3s ease;
  font-family: 'Orbitron', sans-serif;
}

.fiche:hover {
  transform: translateX(5px);
  background: #3a3a3a;
}

.fiche h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: #ff6600;
  font-weight: 700;
}

.relais-container h3 a {
  color: #ff6600;
  text-decoration: none;
  font-weight: 700;
}

.relais-container h3 a:hover {
  text-decoration: underline;
}

.fiche p {
  margin: 0.3rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

#searchForm {
  transition: all 0.3s ease;
  box-sizing: border-box;
  padding: 1rem 2rem;
  background-color: #1e1e1e;
  z-index: 1000;
}

#searchForm.fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.7);
}

#question-container {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%; 
    padding: 0 20px;
    box-sizing: border-box;
}

#question-container input#question {
  flex-grow: 1;
  width: 100%;
	margin: 0;  
}

#btnSpeech {
  background-color: #3e3e3e;
  color: white;
  border: none;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.2s, color 0.2s;
}

#btnSpeech.active {
  background-color: #ff3333;
  color: white;
  box-shadow: 0 0 10px rgba(255, 51, 51, 0.7);
}

#question-container button {
  height: 40px;
  vertical-align: middle;
}

/* Style spécifique pour le bouton GPX */
#btnShowGpxPopup {
    background-color: #ff6600;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#question-container #btnShowGpxPopup {
    height: 40px;
    vertical-align: middle;
}

#btnShowGpxPopup:hover {
    background-color: #e65c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#btnShowGpxPopup:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

body {
  padding-bottom: 80px;
}

.presentation #btnAboutAlyx {
  margin-top: 10px;
  padding: 5px 5px;
  border: none;
  background-color: #007BFF;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.presentation #btnAboutAlyx:hover {
  background-color: #e85500;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
  z-index: 1000;
  font-size: 12px;
  color: #000;
  font-family: verdana;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}

.popup-content {
  background-color: white;
  padding: 20px 30px;
  border-radius: 12px;
  max-width: 550px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.95);
  animation: popIn 0.3s ease forwards;
  font-size: 1em;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

@keyframes fadeIn {
  from { background-color: rgba(0,0,0,0); }
  to { background-color: rgba(0,0,0,0.5); }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.footer {
  width: 100%;
  padding: 15px 20px;
  background-color: #333;
  color: #f0f0f0;
  text-align: center;
  font-size: 0.7em;
  border-top: 1px solid #444;
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #66ccff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

#gpx-map-container {
  height: 60vh;
  width: 100%;
  margin-top: 20px;
}

.feedback-section {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 10px;
  line-height: 10px;
}
.feedback-section button {
	background-color: transparent;
	color: white;
	padding: 0!important;
	border: none;
	border-radius: none;
	cursor: pointer;
	font-size: 0.8rem;
	margin: 0 5px;
	transition: background-color 0.3s ease;
}
.feedback-section button:hover {
  background-color: transparent;
}
.feedback-section button.negative {
  background-color: transparent;
}
.feedback-section button.negative:hover {
  background-color: transparent;
}
.feedback-response {
  margin-top: 10px;
  font-style: italic;
  color: #aaa;
  margin-top: 0px !important;
}

.feedback-section > div{
	flex-wrap: wrap;
}

.bubble.bot a {
  color: #ff6600;
}

#relais-map-container {
  height: 500px;
  width: 100%;
}
.btn-show-map, .btn-download-pdf {
  background-color: #f0ad4e;
  color: #1e1e1e;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 0;
  display: inline-block;
  text-align: center;
}
.btn-show-map:hover {
  background-color: #ec971f;
}

@media (max-width: 600px) {
  #searchForm.fixed {
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 600px) {
  .relais-container {
    flex-direction: column;
    align-items: center;
  }

  .relais-image {
    margin-bottom: 1em;
    margin-right: 0;
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================== */
/* AJOUTS POUR LA PAGE BUGS.HTML (JOURNAL DES CORRECTIFS) */
/* ========================================================== */

.bugs-content-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.bugs-content-container h1 {
	font-size: 1.5em;
	color: #fff;
	padding-bottom: 15px;
	margin-bottom: 5px;
	border-bottom: 3px solid #333;
	text-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}


.bugs-content-container p {
    font-size: 1.0em;
    margin-bottom: 30px;
    color: #b0b0b0;
    font-family: sans-serif; 
}

.bugs-content-container a {
    color: #ff6600; 
	text-decoration: none;
}

.bugs-content-container h2 {
    font-size: 1.1em;
    color: #f0f0f0;
    background-color: #2a2a2a;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #ff6600;
    letter-spacing: 1px;
    font-family: 'Orbitron', sans-serif;
}

.bugs-content-container ul {
    list-style: none;
    padding-left: 0;
}

.fix-item {
    background-color: #252525;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid #3e3e3e;
    transition: background-color 0.3s, transform 0.2s;
    font-family: sans-serif; /* Rendre le texte lisible */
}

.fix-item:hover {
    background-color: #2c2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 102, 0, 0.1);
}

.fix-date {
    display: inline-block;
    font-weight: 700;
    color: #ff6600;
    background-color: #3e3e3e;
    padding: 4px 8px;
    border-radius: 5px;
    margin-right: 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.fix-item strong {
    color: #90ee90;
    font-weight: 700;
}

.fix-item code {
    background-color: #444;
    color: #ffaa00;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.relais-image-wrapper {
	position: relative;
	width: 100%;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	max-width: 200px;
	border: 3px solid #fff;
}

.badge-new {
    position: absolute;
    top: 3px;
    right: 3px;
    background-color: #ff0000;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 9px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
    pointer-events: none;
}

.relais-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;

}

/* Conteneur principal du popup */
.popup-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.5;
}

/* Titre stylisé */
.popup-content h2 {
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-right: 30px; /* Éviter le chevauchement avec le bouton fermer */
}

/* Paragraphes */
.popup-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #555;
}

/* Alerte attention (Rouge plus moderne) */
.popup-content p[style*="color:red"] {
    background: #fff5f5;
    border-left: 4px solid #ff4d4d;
    padding: 12px;
    border-radius: 4px;
    color: #c92a2a !important; /* Rouge moins agressif */
    font-size: 0.9rem;
}

/* Bouton Fermer (le "X") */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.popup-close:hover {
    background: #e0e0e0;
}

/* Bouton de sélection de fichier */
.select-file-button {
    display: block;
    width: 100%;
    background: #2d3436; /* Gris très foncé / Look cuir/pneu */
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-file-button:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.select-file-button:active {
    transform: translateY(0);
}

/* Message de statut (C'est parti...) */
#gpxStatusMessage {
    text-align: center;
    font-style: italic;
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
}

/*--- FAQ et conversation ----------*/
.faq-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}
.faq-overlay.open {
    display: block;
}
.faq-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 480px;
    background: #1e1e1e;
    color: #fff;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 15px rgba(0,0,0,0.5);
    overflow-y: auto;
}
.faq-drawer a{
	color: #f39c12;
	text-decoration: none;
}
.faq-drawer.open {
    transform: translateX(0);
}
.faq-drawer-content {
    padding: 20px 24px 60px;
}
.faq-drawer-content h2, .faq-drawer-content h3 {
    color: #f39c12;
}
.faq-drawer-content ul {
    padding-left: 1.2em;
}
.faq-drawer-content li {
    margin-bottom: 6px;
}
.faq-drawer-close {
    position: sticky;
    top: 0;
    float: right;
    margin: 10px 14px 0 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2002;
}
@media (max-width: 600px) {
    .faq-drawer {
        max-width: 100%;
    }
}

/* --- Indicateur visuel : mémoire de conversation active --- */
#question.memoire-active {
    border: 2px solid red !important;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.6);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
