/**
 * Styles pour les pages de localisation (villes/territoires)
 */

/* Container principal */
.fim-location-page-container {
    margin: 40px 0;
    padding: 0;
}

/* Section principale */
.fim-location-main {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

/* Loading */
.fim-location-loading {
    text-align: center;
    padding: 60px 20px;
}

.fim-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: fim-spin 1s linear infinite;
}

@keyframes fim-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.fim-location-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.fim-location-title {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #2271b1;
}

.fim-location-meta {
    font-size: 16px;
    color: #666;
}

.fim-region-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fim-region-link:hover {
    color: #1a5a8a;
    text-decoration: underline;
}

.fim-location-region {
    display: inline-block;
    padding: 5px 15px;
    background: #eaf7f6;
    color: #2AB3A6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.fim-location-region .fim-region-link {
    color: inherit;
    text-decoration: none;
}

.fim-location-region .fim-region-link:hover {
    text-decoration: underline;
}

/* Description */
.fim-location-description {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.fim-location-description p {
    margin: 0 0 15px 0;
}

/* Actions */
.fim-location-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* Onglets */
.fim-location-tabs {
    margin-top: 30px;
}

.fim-tabs-nav {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.fim-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.fim-tab-btn:hover {
    color: #2AB3A6;
    background: #f9f9f9;
}

.fim-tab-btn.active {
    color: #2AB3A6;
    border-bottom-color: #2AB3A6;
}

.fim-tab-btn .fim-count {
    font-size: 14px;
    color: #999;
}

.fim-tab-btn.active .fim-count {
    color: #2AB3A6;
}

.fim-tab-icon {
    font-size: 20px;
}

.fim-tab-pane {
    display: none;
}

.fim-tab-pane.active {
    display: block;
}

/* Message vide */
.fim-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
}

/* Bouton retour */
.fim-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.fim-back-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* Format liste pour balades/greeters */
.fim-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fim-list-item {
    display: flex;
    gap: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.fim-list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fim-list-image {
    flex-shrink: 0;
    width: 150px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

.fim-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fim-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fim-list-content h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2AB3A6;
}

.fim-list-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
    flex: 1;
}

.fim-greeter-name {
    font-size: 16px;
    color: #2AB3A6;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.fim-greeter-languages {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    font-style: italic;
}

/* Bloc texte conditionnel réservation */
.fim-booking-text {
    font-size: 14px;
    color: #2AB3A6;
    background: #eaf7f6;
    padding: 12px 16px 12px 16px;
    border-left: 3px solid #2AB3A6;
    border-radius: 4px;
    margin-bottom: 20px;
    font-style: italic;
    padding-bottom: 12px !important;
}

.fim-greeter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.fim-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.fim-centres-interet {
    font-size: 14px;
    color: #555;
    margin: 8px 0;
}

.fim-list-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.fim-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.fim-compact-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.fim-compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.fim-compact-card.fim-compact-card-active {
    border-color: #2AB3A6;
    box-shadow: 0 0 0 2px rgba(42, 179, 166, 0.12);
}

.fim-compact-card .fim-list-image {
    flex: 0 0 34%;
    width: 34%;
    height: auto;
    min-height: 150px;
    max-height: 170px;
    border-radius: 0;
}

.fim-compact-card .fim-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fim-compact-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.fim-compact-card-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2AB3A6;
}

.fim-compact-card-footer {
    margin-top: auto;
}

.fim-show-details-btn {
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 14px;
}

.fim-detail-panel {
    display: none;
    margin-top: 25px;
}

.fim-detail-panel.fim-detail-panel-active {
    display: block;
}

.fim-detail-item {
    border: 1px solid #dfe9e8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

@media screen and (max-width: 1024px) {
    .fim-compact-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 640px) {
    .fim-compact-card .fim-list-image {
        flex: 0 0 30%;
        width: 30%;
        min-height: 150px;
        max-height: 175px;
    }

    .fim-compact-card-content {
        padding: 14px;
    }
}

/* Offre locale */
.fim-offre-locale {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px 0;
}

.fim-offre-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fim-offre-title {
    font-size: 22px;
    color: #2AB3A6;
    margin: 0;
}

.fim-offre-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-style: italic;
}

.fim-offre-paragraph {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.fim-offre-paragraph p {
    margin: 0 0 10px 0;
}

.fim-offre-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

@media screen and (max-width: 768px) {
    .fim-offre-locale {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Greeters imbriqués (nested in balades) */
.fim-nested-greeters {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.fim-nested-greeters-title {
    font-size: 16px;
    font-weight: 700;
    color: #2AB3A6;
    margin: 0 0 12px 0;
}

.fim-compact-grid-nested {
    gap: 12px;
}

.fim-nested-card {
    border: 1px solid #e0e0e0;
}

.fim-nested-detail-panel {
    margin-top: 10px;
}

.fim-nested-detail-panel:empty {
    display: none;
}

.fim-nested-detail-panel.fim-detail-panel-active {
    display: block;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #2AB3A6;
}

.fim-nested-detail-item {
    border: none;
    box-shadow: none;
}

/* Vue des destinations de la région */
.fim-region-destinations-view {
    margin-bottom: 40px;
}

.fim-region-destinations-header {
    margin-bottom: 30px;
}

.fim-region-destinations-title {
    font-size: 28px;
    color: #2271b1;
    margin: 0 0 10px 0;
}

.fim-region-destinations-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.fim-region-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0 20px 0;
}

.fim-stat-item {
    background: #f0f7ff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #2271b1;
    font-weight: 500;
}

.fim-region-destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Section destinations à proximité */
.fim-location-nearby {
    margin-top: 40px;
}

.fim-location-nearby h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.fim-nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.fim-nearby-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.fim-nearby-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fim-nearby-card-image {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
}

.fim-nearby-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fim-destination-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(34, 113, 177, 0.9);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fim-nearby-card:hover .fim-nearby-card-image img {
    transform: scale(1.05);
}

.fim-nearby-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.fim-nearby-card h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.fim-nearby-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.fim-nearby-arrow {
    align-self: flex-end;
    font-size: 24px;
    color: #2271b1;
    transition: transform 0.3s ease;
}

.fim-nearby-card:hover .fim-nearby-arrow {
    transform: translateX(5px);
}

/* Section toggle carte */
.fim-map-toggle-section {
    text-align: center;
    margin: 40px 0;
}

#fim-toggle-map {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

.fim-map-icon {
    font-size: 20px;
}

/* Section carte complète */
.fim-full-map-section {
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    transition: all 0.3s ease;
}

.fim-full-map-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.fim-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
    color: #fff;
}

.fim-map-header h3 {
    margin: 0;
    font-size: 20px;
}

.fim-map-header .fim-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fim-map-header .fim-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.fim-map-content {
    padding: 20px;
    min-height: 600px;
}

/* Erreur */
.fim-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    color: #c33;
    text-align: center;
}

/* Toggle description */
.fim-description-toggle {
    margin: 10px 0 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #2AB3A6;
    border-radius: 4px;
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.fim-description-toggle p {
    margin: 0 0 10px 0;
}

.fim-description-toggle p:last-child {
    margin-bottom: 0;
}

.fim-detail-breadcrumb {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px 0;
}

.fim-detail-breadcrumb-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    font-size: 14px;
    color: #5f6b7a;
}

.fim-detail-crumb,
.fim-detail-current {
    font-size: 14px;
    line-height: 1.4;
}

.fim-detail-crumb {
    background: none;
    border: 0;
    padding: 0;
    color: #2AB3A6;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fim-detail-crumb:hover {
    color: #219488;
}

.fim-detail-current {
    color: #182230;
    font-weight: 600;
}

.fim-detail-sep {
    color: #98a2b3;
}

.fim-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.fim-detail-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fim-detail-back:hover {
    border-color: #bfc6d1;
    background: #f8fafc;
}

.fim-detail-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fim-detail-close:hover {
    border-color: #bfc6d1;
    background: #f8fafc;
}

/* Gallery */
.fim-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 10px 0 15px 0;
}

.fim-gallery-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3 / 2;
}

.fim-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.fim-gallery-thumb:hover img {
    transform: scale(1.08);
}

.fim-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 4px 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox overlay */
.fim-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.fim-lightbox-overlay.fim-lightbox-active {
    display: flex;
}

.fim-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    text-align: center;
}

.fim-lightbox-img {
    display: block;
    float: none;
    clear: both;
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.fim-lightbox-caption {
    display: block;
    float: none;
    clear: both;
    width: 100%;
    color: #fff;
    font-size: 14px;
    margin: 12px 0 0 0;
    text-align: center;
}

.fim-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: opacity 0.2s;
}

.fim-lightbox-close:hover {
    opacity: 0.7;
}

.fim-lightbox-prev,
.fim-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 30px;
    padding: 15px 18px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.2s;
}

.fim-lightbox-prev:hover,
.fim-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.fim-lightbox-prev {
    left: 20px;
}

.fim-lightbox-next {
    right: 20px;
}

/* Greeter languages (flags) */
.fim-greeter-languages {
    font-size: 22px;
    letter-spacing: 4px;
    margin: 0 0 10px 0;
    font-style: normal;
}

.fim-greeter-langues {
    font-size: 22px;
    letter-spacing: 4px;
    margin: 0 0 10px 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .fim-location-main {
        padding: 25px 20px;
    }
    
    .fim-location-title {
        font-size: 24px;
    }
    
    .fim-tabs-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .fim-tab-btn {
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
        margin-bottom: 0;
    }
    
    .fim-tab-btn.active {
        border-bottom-color: #e0e0e0;
        border-left-color: #2271b1;
    }
    
    .fim-nearby-grid {
        grid-template-columns: 1fr;
    }
    
    .fim-location-actions {
        flex-direction: column;
    }
    
    .fim-location-actions .fim-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Format liste responsive */
    .fim-list-item {
        flex-direction: column;
        align-items: center;
    }
    
    .fim-list-image {
        width: 200px;
        height: 280px;
        max-width: 100%;
    }
    
    .fim-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fim-lightbox-prev,
    .fim-lightbox-next {
        padding: 10px 12px;
        font-size: 22px;
    }
    
    .fim-lightbox-prev {
        left: 8px;
    }
    
    .fim-lightbox-next {
        right: 8px;
    }
}

@media screen and (max-width: 480px) {
    .fim-location-page-container {
        padding: 0 15px;
    }
    
    .fim-location-main {
        padding: 20px 15px;
    }
    
    .fim-location-title {
        font-size: 20px;
    }
}
