.save-button {
    background-color: #27ae60;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
    box-sizing: border-box;
}

 .view-itinerary-button {
        display: inline-block;
        margin-top: 10px;
        padding: 8px 15px;
        background-color: #3498db;
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    .view-itinerary-button:hover {
        background-color: #2980b9;
    }
    .view-itinerary-button i {
        margin-right: 5px;
    }

.save-button:hover {
    background-color: #219d53;
    transform: translateY(-2px);
}
/* --- General Body and Container Styles (to ensure proper alignment) --- */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
}

.main-container {
    display: flex;
    min-height: 100vh;
}

/* --- Authentication Buttons in Header --- */
.header-auth {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.auth-buttons .btn-auth {
    background-color: #f39c12;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.auth-buttons .btn-auth:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
}

.auth-buttons span {
    font-size: 16px;
    font-weight: bold;
    color: #444;
    margin-right: 15px;
}

/* --- Modal Overlay and Content --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: 50px;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.4s ease-out;
}

.modal-content h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

.close-button {
    color: #888;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #333;
}

/* --- Form Fields and Buttons inside Modals --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.2);
    outline: none;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-content button[type="submit"]:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
	margin-bottom: 2%;
}


.btn-auth {
    background-color: #f39c12;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 16px;
}

.btn-auth:hover {
    background-color: #e67e22;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.segment-color-legend {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #333;
	margin-left: 12px;
}

.leaflet-pane .leaflet-path {
  stroke: #d09f21;
  stroke-opacity: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.pagination button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background-color: #0056b3;
}

.yelp-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.yelp-details p {
    margin: 5px 0;
}

:root {
    /* Palette de couleurs */
    --primary-color: #007bff; /* Bleu vibrant */
    --primary-dark: #0056b3;
    --secondary-color: #6c757d; /* Gris foncé pour le texte secondaire */
    --background-color: #f8f9fa; /* Arrière-plan très clair */
    --card-bg: #0d0e12; /* Fond des cartes et conteneurs */
    --border-color: #e9ecef; /* Couleur des bordures et séparations */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05); /* Ombre légère */
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1); /* Ombre plus prononcée */
}

/* Base styles for the overall layout */
html, body, .main-container {
    height: 100%;
    margin: 0;
    padding: 0;
  
}

.main-container {
    display: flex;
}

.sidebar {
    width: 400px; /* Fixed width for the sidebar on larger screens */
    background-color: #0d0e12;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto; /* Allow scrolling for long content */
    padding: 20px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

#map {
    flex-grow: 1; /* Map takes up remaining space */
    height: 100%;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    transition: width 0.3s ease;
}

/* Sidebar collapse/expand styles */
.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar.collapsed + #map {
    width: 100%;
}

.toggle-sidebar {
    position: absolute;
    right: -36px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

/* General typography and component styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: #343a40;
    line-height: 1.6;
}

h1 {
  text-align: center;
  color: #d09f21;
  margin-bottom: 30px;
  font-weight: 300;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
}
h2 {
    color: #d09f21;
  font-family: 'Montserrat', sans-serif;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Form styles */
.form-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
	margin-top: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
	color: #d09f21;
	font-family: 'Montserrat', sans-serif;
}

input, select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
    outline: none;
}

button[type="submit"] {
    margin-top: 10%;
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

button[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

/* Itinerary and accordion styles */
#itineraryContainer {
    margin-top: 30px;
}

.summary-box {
    background-color: #e9f5ff;
    border: 1px solid #cce5ff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    text-align: center;
}
.summary-box h2 {
    margin: 0;
    padding: 0;
    border-bottom: none;
    color: var(--primary-dark);
    font-size: 1.4rem;
}
.summary-box p {
    margin: 10px 0 0;
    font-size: 1.0rem;
    color: #495057;
}

#accordion {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-header {
    background-color: #f1f3f5;
    color: #495057;
    cursor: pointer;
    padding: 18px 25px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s;
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-header:hover {
    background-color: #f1f3f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.accordion-header.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.accordion-header .arrow-icon {
    margin-right: 15px;
    transition: transform 0.3s;
    font-size: 1.2em;
}

.accordion-header.active .arrow-icon {
    transform: rotate(90deg);
}

.accordion-header .segment-summary {
    margin-left: auto;
    font-weight: normal;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.accordion-header.active .segment-summary {
    color: white;
    opacity: 0.8;
}

.accordion-body {
    background-color: #fcfdff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    border-radius: 12px;
   
    border-top: none;
    padding: 0;
}

.accordion-body.active {
    max-height: 100% !important;
    padding: 15px 25px;
    border-top: none;
}

.accordion-body ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.accordion-body li {
    display: flex;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f5;
}

.step-icon {
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
    width: 25px;
    text-align: center;
    color: var(--primary-color);
}

.step-details {
    flex-grow: 1;
}

.step-details p {
    margin: 0;
    line-height: 1.4;
    font-size: 15px;
    color: #333;
}

.step-details small {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 5px;
}

.road-name {
    font-style: italic;
    color: #6c757d;
    font-weight: normal;
}

.distance-text {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: right;
    flex-shrink: 0;
    min-width: 50px;
}

/* POI list styles */
#poiList {
    margin-top: 30px;
}

#poiList ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#poiList li {
    display: flex;
    align-items: center;
    background-color: #fafbfd;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

#poiList li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.poi-marker-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.poi-marker-icon::before {
    content: "\f041"; /* Default marker icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

#poiList li strong {
    font-size: 1.1em;
}

#poiList li p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

/* Utility classes */
.hidden {
    display: none;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

/* Loading spinner */
#loadingMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    font-size: 1.1em;
    color: var(--secondary-color);
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-right: 12px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Leaflet map styles */
.leaflet-container .leaflet-overlay-pane svg path.leaflet-interactive {
    transition: stroke 0.3s;
}

.leaflet-container {
    background-color: #fff;
}

.leaflet-overlay-pane svg {
    display: block;
}

.segment-0 {
    stroke: red;
}

.segment-1 {
    stroke: green;
}

.segment-2 {
    stroke: yellow;
}

.segment-highlight {
    stroke-width: 5;
    stroke-opacity: 0.9;
}

/* Sidebar logo */
.sidebar-content img {
    width: 50% ;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Concept card */
.concept-card {
    background-color: #eaf6ff;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.concept-card i.icon-primary {
    font-size: 2.5em;
    color: var(--primary-color);
}

.concept-card p {
    margin: 0;
    font-size: 0.7em;
    line-height: 1.5;
    color: #333;
	 font-family: 'Montserrat', sans-serif;
}

/* NEW: Mobile-specific styles for better responsiveness */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column; /* Stack sidebar and map vertically */
        height: auto;
        overflow-y: auto; /* Allow scrolling on the main container */
    }

    .sidebar {
        width: 100%; /* Sidebar takes full width */
        height: auto; /* Auto height to fit content */
        max-height: 48vh; /* Limit sidebar height to a percentage of the viewport height */
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 15px;
        order: 1; /* Place the sidebar first in the flex container */
        position: relative; /* Set position for the toggle button */
    }

    .sidebar.collapsed {
        max-height: 50px; /* Collapsed state with just a toggle button visible */
        overflow: hidden;
        border-bottom: 1px solid var(--border-color);
        transform: none; /* Override transform */
    }

    .sidebar.collapsed .sidebar-content {
        display: none; /* Hide the content when collapsed */
    }

    #map {
    width: 100%;
    height: 38vh;
    order: 2;
    height: 500px !important;
    }

    .form-row {
        flex-direction: column; /* Stack form groups vertically */
        gap: 0;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .accordion-header {
        font-size: 16px;
        padding: 15px;
    }

    .summary-box {
        padding: 15px;
    }

    .concept-card {
        padding: 15px;
    }

    .toggle-sidebar {
        right: 15px; /* Adjust button position on mobile */
        top: 15px;
        transform: translateY(0);
        background-color: var(--primary-dark);
        z-index: 1002;
    }

    /* Add a visual indicator for collapsed state */
    .sidebar.collapsed .toggle-sidebar::after {
        content: "Ouvrir";
        font-size: 12px;
        margin-left: 10px;
    }
	
	/* Sidebar logo */
.sidebar-content img {
    width: 20% !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
}

.footer {
   
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    color: #fff;
    margin: 0 10px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #1a73e8;
}
