/* =============================================
   VARIABLES CSS
   ============================================= */
:root {
    --nantes-green: #1e9bbb;
    --nantes-gold: #FAB700;
    --nantes-red: #C2201B;
    --light-gray: #f8f9fa;
    --dark-gray: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-circle: 50%;
    --max-width: 1200px;
}

/* =============================================
   RESET ET BASE
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    overflow-x: hidden;
}

/* =============================================
   CONTAINERS
   ============================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    margin-bottom: 3rem;
    width: 100%;
}

/* =============================================
   HEADER
   ============================================= */
.header {
    background-color: var(--nantes-green);
    color: white;
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-align: center;
    flex-grow: 1;
}

.logo img {
    height: 80px;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.logo p {
    font-size: 1rem;
    opacity: 0.9;
}

/* =============================================
   SECTION ITINÉRAIRES
   ============================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.8rem;
    color: var(--nantes-green);
    position: relative;
    padding-bottom: 0.5rem;
    margin: 0;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--nantes-gold);
    border-radius: 2px;
}

.section-actions {
    display: flex;
    gap: 1rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--nantes-gold);
    color: var(--nantes-green);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.map-link:hover {
    background-color: white;
    color: var(--nantes-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Sélecteur du nombre d'itinéraires par page */
.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    justify-content: flex-end;
}

.items-per-page select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Compteur de résultats */
.results-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: rgba(30, 155, 187, 0.1);
    border-radius: 20px;
    color: var(--nantes-green);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(30, 155, 187, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.results-counter i {
    color: var(--nantes-gold);
}

/* =============================================
   FILTRES
   ============================================= */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
    max-width: 200px;
}

.filter-group-label {
    font-weight: 600;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.filter-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
    font-size: 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.filter-btn.active {
    background-color: var(--nantes-green);
    color: white;
    border-color: var(--nantes-green);
    box-shadow: 0 2px 4px rgba(30, 155, 187, 0.2);
}

.filter-btn:hover:not(.active) {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.filter-btn.reset-btn {
    background-color: #f0f0f0;
    color: #666;
    border-color: #ccc;
}

.filter-btn.reset-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Champ de recherche de tag */
.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 100%;
    min-width: 150px;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-input:focus {
    border-color: var(--nantes-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 155, 187, 0.2);
}

/* Tri */
.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sort-label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* =============================================
   GRILLE DES ITINÉRAIRES
   ============================================= */
.itineraries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* =============================================
   CARTES D'ITINÉRAIRE
   ============================================= */
.itinerary-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    margin-bottom: 1rem;
}

.itinerary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.itinerary-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    cursor: pointer;
}

.itinerary-image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #f5f5f5;
}

.itinerary-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.itinerary-card:hover .itinerary-image {
    transform: scale(1.05);
}

.view-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--nantes-green);
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.itinerary-card:hover .view-indicator {
    opacity: 1;
}

.itinerary-content {
    padding: 1.2rem 1.2rem 3rem; /* Padding-bottom augmenté pour éviter le chevauchement */
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}
/* Badge de classement */
.classement-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 10;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
}

.classement-badge.top-1 { background-color: gold; }
.classement-badge.top-2 { background-color: silver; }
.classement-badge.top-3 { background-color: #cd7f32; }
.classement-badge.other { background-color: rgba(0, 0, 0, 0.5); }

.classement-badge i {
    font-size: 0.9rem;
}
/* =============================================
   EN-TÊTE DE LA CARTE D'ITINÉRAIRE (CORRIGÉ)
   ============================================= */

   .itinerary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.itinerary-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.author-name {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icônes d'accessibilité */
.access-icon {
    color: var(--nantes-gold);
    font-size: 0.9rem;
    margin-left: 0.3rem;
    flex-shrink: 0;
}

/* Stats (durée et niveau) */
.itinerary-stats {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.duree, .niveau {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    color: var(--nantes-gold);
}

.duree i, .niveau i {
    font-size: 0.8rem;
    color: var(--nantes-gold);
}

.facile {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.moyen {
    background-color: #fff3e0;
    color: #f57c00;
}

.difficile {
    background-color: #ffebee;
    color: #c62828;
}

.itinerary-title {
    color: var(--nantes-green);
    margin: 0.5rem 0 0.8rem;
    font-size: 1.3rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.itinerary-description {
    margin: 0 0 0.5rem;
    color: #555;
    margin-bottom: 2px;
    line-height: 1.4;
    font-size: 0.9rem;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
/* =============================================
   TAGS D'ITINÉRAIRE (NOUVEAU)
   ============================================= */
.itinerary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: auto; /* Pousse les tags vers le haut */
    margin-bottom: 1.5rem;
    z-index: 3; /* Assure que les tags sont au-dessus de la barre d'actions */
}

.itinerary-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 4px;
    background-color: rgba(30, 155, 187, 0.1);
    color: var(--nantes-green);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(30, 155, 187, 0.3);
    transition: all 0.2s;
}

.itinerary-tag i {
    font-size: 0.7rem;
}
/* =============================================
   ACTIONS EN BAS DE LA CARTE
   ============================================= */
.itinerary-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #eee;
    z-index: 2; /* Doit être inférieur à .itinerary-tags (z-index: 3) */
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: 4px;
}

.action-btn:hover {
    color: var(--nantes-green);
    background-color: rgba(30, 155, 187, 0.05);
}

.action-btn.active {
    color: var(--nantes-red);
}

.action-btn.active i.fa-heart {
    color: var(--nantes-red);
}

.action-btn.voted {
    color: var(--nantes-gold);
}

.action-btn.voted i.fa-thumbs-up {
    color: var(--nantes-gold);
}

.btn-text {
    font-size: 0.7rem;
    margin-top: 3px;
    color: #666;
    white-space: nowrap;
}

.vote-count, .comment-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 3px;
    border-radius: var(--border-radius-circle);
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    margin: 0;
    text-decoration: none;
    border-radius: 4px;
    color: var(--nantes-green);
    background-color: #f1f1f1;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap; /* Empêche le retour à la ligne */
}

.pagination a:hover {
    background-color: var(--nantes-gold);
    color: var(--nantes-green);
}

.pagination .active {
    background-color: var(--nantes-green);
    color: white;
    font-weight: bold;
}

/* =============================================
   MODALES
   ============================================= */
.comment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 1rem;
}

.comment-modal.active, .share-modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(90deg, var(--nantes-green), var(--nantes-gold));
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.modal-header h2, .modal-content h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.8;
}

/* Modale des commentaires */
.comment-form-container {
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.comment-form-container h3 {
    color: var(--nantes-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.user-comment-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.user-comment-header .comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 1px solid var(--nantes-gold);
}

#newComment {
    width: 100%;
    min-height: 80px;
    max-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.submit-btn {
    background-color: var(--nantes-green);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #1a87a8;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.comments-list {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 220px);
}

.comment {
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-avatar {
    width: 35px;
    height: 35px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 1px solid var(--nantes-gold);
}

.comment .author-name {
    font-weight: 600;
    color: var(--nantes-green);
    font-size: 0.9rem;
}

.comment-date {
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
}

.comment-content {
    color: #555;
    line-height: 1.5;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-comment-btn, .delete-comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.edit-comment-btn {
    color: var(--nantes-green);
}

.edit-comment-btn:hover {
    background-color: rgba(30, 155, 187, 0.1);
}

.delete-comment-btn {
    color: #dc3545;
}

.delete-comment-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.login-prompt {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--nantes-green);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
}

/* =============================================
   MODALE DE PARTAGE
   ============================================= */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1003;
    justify-content: center;
    align-items: center;
}

.share-modal.active {
    display: flex;
}

.share-modal .modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.share-url-section {
    margin-bottom: 1.5rem;
}

.share-url-section p {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.share-url-container {
    display: flex;
    margin-bottom: 1rem;
}

.share-url-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.copy-button {
    padding: 0.8rem 1.2rem;
    background-color: var(--nantes-gold);
    color: var(--nantes-green);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background-color: #e6a200;
}

.share-networks {
    text-align: center;
}

.share-networks p {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 500;
}
.social-icons{
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 auto;  /* ✅ Centrer horizontalement */
    max-width: 300px;  /* ✅ Limiter la largeur pour éviter l'étirement */
}
    .network-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        color: white;
        font-size: 1.5rem;
        transition: all 0.2s ease;
        text-decoration: none;
    }

    .network-icon.facebook { background-color: #3b5998; }
    .network-icon.twitter { background-color: #1da1f2; }
    .network-icon.instagram {
        background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    }
    .network-icon.whatsapp { background-color: #25D366; }
    .network-icon.email { background-color: #666; }

    .network-icon:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

/* =============================================
   BOUTON VERS LA CARTE
   ============================================= */
.map-link-container {
    text-align: center;
    margin: 2rem 0;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 6px 24px;
    background-color: var(--nantes-gold);
    color: var(--nantes-green);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.map-link:hover {
    background-color: white;
    color: var(--nantes-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.map-link i {
    font-size: 1.2rem;
}

/* =============================================
   MESSAGES ET ÉTATS
   ============================================= */
.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.loading-comments {
    text-align: center;
    padding: 2rem;
    color: var(--nantes-green);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .itineraries-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .filters-container {
        gap: 1rem;
    }

    .filter-group {
        min-width: 140px;
    }

    .filter-btn {
        min-width: 100px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .itineraries-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .filter-group {
        min-width: 120px;
        max-width: 150px;
    }

    .filter-btn {
        min-width: 100%;
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .btn-text {
        display: none;
    }

    .action-btn {
        padding: 8px;
        font-size: 1.2rem;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .comments-list {
        padding: 1rem;
        max-height: calc(90vh - 200px);
    }

    #newComment {
        min-height: 70px;
        font-size: 0.85rem;
    }

    .share-url-container {
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
        border-radius: 4px;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .itineraries-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .filter-group {
        min-width: 100%;
        max-width: 100%;
    }

    .filter-btn {
        min-width: 100%;
    }

    .items-per-page {
        justify-content: flex-start;
    }

    .results-counter {
        justify-content: center;
        width: 100%;
        margin-bottom: 1rem;
    }

    .pagination {
        flex-wrap: nowrap; /* Empêche le retour à la ligne */
        overflow-x: auto; /* Active le défilement horizontal si nécessaire */
        justify-content: flex-start; /* Aligne à gauche pour éviter le centrage */
        padding-bottom: 0.5rem; /* Espace pour le défilement */
        margin-left: auto;
        margin-right: auto;
        max-width: 100%; /* Limite la largeur */
    }

    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 0.8rem;
        flex-shrink: 0; /* Empêche la réduction des éléments */
    }
}