/*------------ fiche ---------------------*/
.titre_fiche{
	font-family: Josefin Sans, sans-serif;
	font-size: 30px;
	font-weight: 300;
	color: #4CAF50;
}

.titre_fiche span {
	color: #8d8d8d;
	font-size: 25px;
}

.intro{
	display: flex!important;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: top; 
}

.intro_img {
	width: 350px;
	background: #f5f5f5;
	padding-top: 25px;
}

.intro_img img {
	max-width: 350px;
	max-height: 350px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.intro_adresse{
	min-width: 350px;
	width: 33%;
	background: #f5f5f5;
    border-color:#555 #666 #666 #555 ;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	-khtml-border-radius: 4px;
	border-radius: 4px;
	padding: 10px;
}

.intro_picto{
	min-width: 350px;
	width: 33%;
	background: #f5f5f5;
    border-color:#555 #666 #666 #555 ;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	-khtml-border-radius: 4px;
	border-radius: 4px;
	padding: 10px;
}

.com-gmapfp-item {
	padding: 25px;
}


.intro_adresse dt, .intro_adresse dd{
	display: inline-block;
}

.intro_adresse dl{
	margin-bottom: 5px;
}

.icone_patron img{
	display: inline;
}

.jicons-icons img {
	vertical-align: middle;
	display: inline;
	margin-right: 10px;
}

.ouvert{
	color: green;
}

.ferme{
	color: red;
}

.resa{
	color: orange;
}

.gmapfp_icone {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: start;
	width: 100%;
	align-items: center;
}

.relais_icone{
	display: flex!important;
	flex-wrap: wrap;
	justify-content: center;
}

.picto {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;

}

.picto img {
	margin-right: 8px;
	width: 40px;
	cursor: pointer;
	background: #f5f5f5;
}

.picto .hp img, .picto .carte img {
	width: 54px;
	cursor: pointer;
	background: #f5f5f5;
}

.picto img:hover{
	background: #eeff37; 
}


.custom-tooltip {
  position: absolute;
  background-color: #000;
  color: #fff;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 8px;
  max-width: 200px;
  text-align: center;
  z-index: 9999;
}

.hits{
	width: 100%;
}

.offre {
	min-width: 350px;
	padding-top: 42px;
	background: url("https://relais-motards.com/images/menu/info-motard.png") no-repeat scroll top left;
	margin-top: 15px;
	position: relative;
}

.offre > div {
	-moz-box-shadow: 2px 2px 4px #b5a49f;
	-webkit-box-shadow: 2px 2px 4px #b5a49f;
	box-shadow: 2px 2px 4px #b5a49f;
	-moz-border-radius: 6px;
	-webkit-border-radius: 6px;
	-khtml-border-radius: 6px;
	border-radius: 6px;
	padding: 7px;
	background: #fff;
}

#galerie .sigFreeContainer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.com-gmapfp-item__body{
	max-width: 1900px;
	min-width: 350px;
	margin: 10px auto;
	border: 4px solid #e9f5f4;
	border-radius: 10px;
	padding: 10px 10px 20px;
}

.biw {
	text-align: center;
	margin: 25px 0;
}

.com-gmapfp-item__body h2, .bloc h2 {
	padding: 8px 15px;
	letter-spacing: 0.5px;
	background: rgb(243, 234, 79, 0.6);
	color: #403e6d;
	border-color: #403e6d;
	margin: 26px 0 30px 0;
}

#sp-footer a {
	color: #000!important;
}

/*--------------------------------------------------------*/
.bouton-roadtrip {
    display: inline-block;
    background-color: #d31e1e; /* Rouge calé sur le logo */
    color: #ffffff !important;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none !important;
    padding: 10px 22px;
    border-radius: 25px; /* De beaux bords arrondis modernes */
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}
.bouton-roadtrip:hover {
    background-color: #b01616; /* Rouge un peu plus sombre au survol */
    transform: translateY(-1px); /* Léger effet de rebond */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ==========================================================================
   1. CONTENEUR PRINCIPAL & STRUCTURE DE NAVIGATION
   ========================================================================== */
.rt-nav-wrapper {
	position: relative;
	width: 100%;
	height: auto !important;
	min-height: 400px;
	overflow: hidden !important;
	font-family: Arial, sans-serif;
	background: #e3e3e3;
}

/* Vue Liste des itinéraires */
.rt-relais-container {
    padding: 15px;
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    overflow-y: auto; /* Active le scroll vertical uniquement pour la liste */
    transition: opacity 0.2s ease;
}

/* Cache la liste proprement en JS */
.rt-relais-container.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.rt-relais-container .page-header h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
    font-weight: bold;
}

/* ==========================================================================
   2. CARTES COMPACTES (VUE LISTE)
   ========================================================================== */
.rt-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rt-compact-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.rt-compact-card:hover {
    background-color: #f9f9f9;
    border-color: #ccc;
}

.rt-card-info {
    flex-grow: 1;
    min-width: 0; /* Empêche le texte de casser le flex */
}

.rt-card-title {
    margin: 0 0 6px 0;
    font-size: 11px!important;
    color: #222;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Coupe proprement avec "..." si le titre est très long */
}

.rt-card-meta-inline {
    font-size: 0.8rem;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-separator {
    color: #ccc;
}

.rt-card-action {
    flex-shrink: 0;
}

/* Bouton compact "Voir" */
button.rt-btn-compact {
    display: inline-block;
    background: #d32f2f;
    color: #ffffff !important;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

button.rt-btn-compact:hover {
    background: #b71c1c;
}

/* ==========================================================================
   3. PANNEAU DE DÉTAIL COULISSANT
   ========================================================================== */
.rt-detail-panel {
    position: absolute; /* Reste confiné à l'intérieur de .rt-nav-wrapper */
    top: 0;
    right: -100%; /* Totalement masqué à droite initialement */
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden !important; /* Sécurité anti-double-scroll */
}

/* Classe d'ouverture gérée par le JavaScript */
.rt-detail-panel.is-open {
    right: 0;
}

/* En-tête du panneau de détail (Bouton retour et Titre fixe) */
.rt-detail-header {
    padding: 5px 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto; /* Fixé pour permettre le calcul de hauteur précis du body */
    box-sizing: border-box;
}

.rt-btn-back {
    background: #333333;
    color: #ffffff;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.2s ease;
}

.rt-btn-back:hover {
    background: #555555;
}

.rt-detail-meta h3 {
    margin: 2px 0 0 0;
    font-size: 11px!important;
    color: #111;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rt-detail-infos {
    font-size: 1rem;
    color: #666;
    display: flex;
    gap: 8px;
    margin-top: 0;
	font-weight: bold;
}

/* Corps du volet de détail (L'UNIQUE zone de défilement vertical pour le texte + la carte) */
.rt-detail-body {
    padding: 15px;
    flex-grow: 1;
    height: calc(100% - 90px) !important; /* Soustrait la hauteur exacte de l'en-tête */
    max-height: calc(100% - 90px) !important;
    overflow-y: auto !important; /* Seul ce défilement est autorisé */
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* ==========================================================================
   4. ÉLÉMENTS INTERNES DU DÉTAIL
   ========================================================================== */

/* Wrapper de la photo de couverture */
.rt-detail-photo-wrap {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    display: none; /* Contrôlé par le JS */
}

.rt-detail-photo-wrap img {
	width: auto;
	height: auto;
	object-fit: cover;
	max-height: 150px;
	display: block;
	margin: 0 auto;
}

/* Zone de description (introtext HTML provenant de la BDD) */
.rt-detail-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 20px;
}

.rt-detail-text h2, .rt-detail-text h3 {
    font-size: 18px!important;
    margin: 15px 0 8px 0;
    color: #222;
}

.rt-detail-text p {
    margin: 0 0 10px 0;
	color: #413f3f;
}

#rt-btn-download-gpx {
	margin: 5px auto;
	display: block;
}

/* ==========================================================================
   5. CARTES ET LEAFLET (SÉCURISATION & AFFICHAGE)
   ========================================================================== */
.rt-detail-map-wrap {
    display: block !important;
    height: auto !important;
    min-height: 400px !important;
    overflow: visible !important;
    margin-top: 20px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#rt-map {
    display: block !important;
    visibility: visible !important;
    height: 400px !important;
    width: 100% !important;
    min-height: 400px !important;
    opacity: 1 !important;
    z-index: 1 !important; /* Laisse les popups s'ouvrir correctement sans conflit de calque */
    border-radius: 5px;
}

/* Surcharges de sécurité indispensables pour contrer les règles de templates Joomla agressifs */
.leaflet-container img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    visibility: visible !important;
}

/* Modifications de styles sur les lignes de tracés GPX Leaflet */
.leaflet-overlay-pane svg {
    z-index: 2;
}

/* ==========================================================================
   6. ÉTATS, FEEDBACKS & SÉCURITÉS
   ========================================================================== */
.rt-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
}

.rt-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    margin: 10px 0;
}

.rt-no-article {
    font-style: italic;
    color: #888888;
    font-size: 0.9rem;
    padding: 10px;
    text-align: center;
}

.rt-nav-wrapper{
	height: 450px!important;
}