/* ============================================
   MAILLAGE INTERNE - Section réutilisable
   Pour toutes les pages transactionnelles
   (compagnies, bateaux, ports, escales, destinations)
   ============================================ */

/* Section principale */
.maillage-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0;
    position: relative;
}

.maillage-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

/* Titre de section */
.maillage-header {
    text-align: center;
    margin-bottom: 50px;
}

.maillage-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.maillage-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    border-radius: 2px;
}

.maillage-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 20px auto 0;
}

/* Navigation par onglets */
.maillage-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.maillage-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.maillage-tab:hover {
    border-color: #0077b6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.2);
}

.maillage-tab.active {
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    border-color: transparent;
}

.maillage-tab-icon {
    margin-right: 8px;
}

.maillage-tab-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 15px;
    margin-left: 8px;
    font-size: 0.85rem;
}

.maillage-tab.active .maillage-tab-count {
    background: rgba(255,255,255,0.3);
}

/* Contenu des onglets */
.maillage-content {
    animation: fadeIn 0.5s ease;
}

/* Par défaut, tous les contenus sont visibles pour le SEO */
.maillage-tab-content {
    display: block !important;
    margin-bottom: 40px;
}

/* Quand JavaScript est activé, on applique le comportement des onglets */
.js-enabled .maillage-tab-content {
    display: none !important;
    margin-bottom: 0;
}

.js-enabled .maillage-tab-content.active {
    display: block !important;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grille de cartes */
.maillage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Carte maillage */
.maillage-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    position: relative;
    display: flex;
    flex-direction: column;
}

.maillage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.maillage-card-image {
    /*height: 180px;*/
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

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

.maillage-card:hover .maillage-card-image img {
    transform: scale(1.1);
}

.maillage-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.maillage-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.maillage-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.3;
}

.maillage-card-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex: 1;
}

.maillage-card-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.maillage-stat {
    text-align: center;
    flex: 1;
}

.maillage-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0077b6;
    margin-bottom: 3px;
}

.maillage-stat-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Liste compacte */
.maillage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 10px 0;
    max-width: 100%;
    overflow: visible;
}

.maillage-list-item {
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.maillage-list-item:hover {
    border-color: #0077b6;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 182, 0.3);
}

.maillage-list-item-count {
    background: rgba(0, 119, 182, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #0077b6;
}

.maillage-list-item:hover .maillage-list-item-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Bouton voir plus */
.maillage-more {
    text-align: center;
    margin-top: 40px;
}

.maillage-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.maillage-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 119, 182, 0.4);
}

/* États désactivés */
.maillage-card.disabled,
.maillage-list-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.maillage-card.disabled:hover,
.maillage-list-item.disabled:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 768px) {
    .maillage-section {
        padding: 40px 0;
    }
    
    .maillage-header h2 {
        font-size: 1.6rem;
    }
    
    .maillage-tabs {
        gap: 8px;
    }
    
    .maillage-tab {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .maillage-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .maillage-card-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .maillage-grid {
        grid-template-columns: 1fr;
    }
}