html, body {
    height: 100%;
    margin: 0;
}
html {
    overflow: hidden;
    padding-top: 0px !important;
}
body {
    padding-top: 5px !important;
}

.header {
    height: 45px;
    max-height: 45px;
    min-height: 45px;
}
.header .menu-déroulant, .header #header-connexion {
    display: none;
}
#header-container h1 {
    font-size: 30px !important;
}
.conteneur {
    background-color: #fff;
    border-radius: 10px;
    border: #000 3px solid;
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    padding: 10px;
    
    width: 100vw;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
}

#layout-haut {
    flex-shrink: 0;
}

#layout-bas {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: 1em;
}

#colonne-carte {
    flex: 2 1 350px;
    min-width: 0;
}

#map, #mapFin {
    width: 100%;
    height: 150px; /* hauteur fixe sur mobile */
}

#colonne-itineraire {
    flex: 1 1 200px;
    min-width: 0;
}

#trajet {
    margin-top: 10px;
}

/* Desktop : tout tient dans l'écran sans scroll global */
@media (min-width: 700px) {
    .conteneur {
        height: 100%;
        overflow: hidden;
    }

    #layout-bas {
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
        overflow: hidden;
    }

    #colonne-carte {
        min-height: 0;
    }

    #map, #mapFin {
        height: 100%;
        min-height: 250px;
    }

    #colonne-itineraire {
        min-height: 0;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #trajet {
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
    }
}

button {
    background-color: var(--accentuation);
    color: black;
    font-weight: bold;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-family: "parisine-std";
    font-size: 1.1em;
    margin-right: 10px !important;
    margin-top: 5px !important;
    -webkit-transition: background-color 500ms ease, transform 0.3s ease;
    -ms-transition: background-color 500ms ease, transform 0.3s ease;
    transition: background-color 500ms ease, transform 0.3s ease;
}

button:hover {
    transform: scale(1.1); 
}

button:disabled {
    background-color: #888;
    cursor: not-allowed;
}

.stationChoix {
    background-color: #fffff0 !important;
    outline: 1px solid black !important;
    border-radius: 5px !important;
    padding: 7px !important;
    transition: background-color 0.3s ease;
    display: inline-block !important;
    text-align: left !important;
    font-size: 1em !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 5px !important;
}
.stationChoix:hover {
    transform: scale(1) !important;
}

.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    padding-top: 58px;
}

.popup {
    border-radius: 10px;
    border: 5px solid #000;
    font-family: "parisine-std";
    width: 100%;
    max-width: 900px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    max-height: 100%;
    overflow-y: auto;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}
td {
    padding: 0;
    margin: 0;
    line-height: 0;
}
tr {
    padding: 0;
    margin: 0;
}

.leaflet-control-attribution {
    font-family: "parisine-std", sans-serif !important;
}

.a_demain {
    font-weight: bold;
    color: var(--bleu_nuit);
    font-size: large;
    margin-bottom: 0px;
    text-align: center;
}

.terminus-box {
    font-size: 1.5em !important;
    border-radius: 5px;
    margin-top: 0px !important;
}

summary, select {
    cursor: pointer;
}

/* Couleur de fond du popup */
.leaflet-popup-content-wrapper {
	font-family: 'parisine-std', sans-serif !important;
	background-color: var(--bleu_nuit) !important;
	color: white !important;
	border-radius: 8px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
	vertical-align: middle !important;
}

/* Le petit triangle sous le popup */
.leaflet-popup-tip {
	background-color: var(--bleu_nuit) !important;
}

.leaflet-popup-close-button {
  color: white !important;
  font-weight: bold !important;
}

#search-results {
    max-height: 20vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    padding-left: 10px;
}