/* =============================================================================
   EASYTRAX MODULE v1.3 - CSS
   ============================================================================= */

:root {
    --ez-primary: #2563eb;
    --ez-primary-dark: #1d4ed8;
    --ez-bg: #023477;
    --ez-text-dark: #0f2744;
    --ez-text-light: #93c5fd;
    --ez-text-muted: #64748b;
    --ez-white: #ffffff;
    --ez-border: rgba(37, 99, 235, 0.1);
    --ez-glass-bg: rgba(255, 255, 255, 0.08);
    --ez-glass-border: rgba(255, 255, 255, 0.15);
}

.easytrax-adherents {
    font-family: 'Poppins', sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px 40px;
}
.easytrax-adherents * {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* =============================================================================
   DÉSACTIVER AUTO-DÉTECTION ADRESSES/TÉLÉPHONES SUR MOBILE
   ============================================================================= */

.easytrax-card-address,
.easytrax-card-title,
.easytrax-group-title,
.easytrax-subgroup-title {
    /* Empêcher Safari/iOS de détecter les adresses et numéros */
    -webkit-text-size-adjust: none;
    text-decoration: none !important;
}

/* Cibler les liens auto-générés par iOS/Android dans les adresses */
.easytrax-card-address a,
.easytrax-card-title a,
.easytrax-group-title a,
.easytrax-subgroup-title a {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
}

/* =============================================================================
   ONGLETS
   ============================================================================= */

.easytrax-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.easytrax-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.easytrax-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255, 255, 255, 0.1);
}
.easytrax-tab.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: var(--ez-white);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
}
.easytrax-tab-icon {
    font-size: 20px;
}

/* =============================================================================
   DROPDOWN
   ============================================================================= */

.easytrax-filter-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
.easytrax-select-container {
    width: 100%;
    max-width: 672px;
}
.easytrax-select {
    width: 100%;
    padding: 20px 48px 20px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--ez-text-dark);
    background-color: var(--ez-white);
    border: 2px solid transparent;
    outline: none;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f2744' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
}
.easytrax-select:hover { border-color: #60a5fa; }
.easytrax-select:focus {
    border-color: var(--ez-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(0,0,0,0.05);
}

/* =============================================================================
   CONTENU (PANNEAU + LISTE)
   ============================================================================= */

.easytrax-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 24px;
    align-items: start;
}

/* =============================================================================
   PANNEAU GAUCHE
   ============================================================================= */

.easytrax-panel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: var(--ez-glass-bg);
    border: 1px solid var(--ez-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.easytrax-panel-generic,
.easytrax-panel-dynamic {
    padding: 24px;
}
.easytrax-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
/* Icône panneau générique (sonorisateur) - +30% : 48px → 62px */
.easytrax-panel-icon-img {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
}
/* Icône panneau dynamique (type) - +30% : 48px → 62px */
.easytrax-panel-dyn-icon-img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0;
    background: none;
}
.easytrax-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ez-white);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 0;
    padding: 0;
}
.easytrax-panel-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #dbeafe;
    margin-bottom: 20px;
    font-weight: 600;
}
.easytrax-panel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--ez-white) !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.easytrax-panel-btn:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
    color: var(--ez-white) !important;
    text-decoration: none !important;
}
.easytrax-panel-btn svg { flex-shrink: 0; }

/* =============================================================================
   LISTE
   ============================================================================= */

.easytrax-list-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--ez-border);
}
.easytrax-list-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-bottom: 1px solid rgba(15, 39, 68, 0.06);
    position: relative;
}
.easytrax-list-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #93c5fd, transparent);
}
.easytrax-list-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: var(--ez-white);
}
.easytrax-list-header-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--ez-text-dark);
}
.easytrax-list {
    max-height: 700px;
    overflow-y: auto;
    padding: 20px;
}

/* Scrollbar */
.easytrax-list::-webkit-scrollbar { width: 6px; }
.easytrax-list::-webkit-scrollbar-track { background: #eff6ff; border-radius: 10px; }
.easytrax-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #3b82f6, #1d4ed8); border-radius: 10px; }
.easytrax-list::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #2563eb, #153660); }

/* =============================================================================
   PLACEHOLDER
   ============================================================================= */

.easytrax-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}
.easytrax-placeholder-icon-img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}
.easytrax-placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    color: var(--ez-primary);
}
.easytrax-placeholder-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--ez-text-dark);
    margin: 0 0 8px;
    padding: 0;
}
.easytrax-placeholder-sub {
    font-size: 16px;
    color: var(--ez-text-muted);
    margin: 0;
}

/* =============================================================================
   GROUPEMENT
   ============================================================================= */

.easytrax-group {
    margin-bottom: 24px;
}
.easytrax-group:last-child { margin-bottom: 0; }
.easytrax-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}
.easytrax-group-pin-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}
.easytrax-group-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--ez-text-dark);
    margin: 0;
    line-height: 36px;
    padding: 0;
}
.easytrax-subgroup {
    margin-left: 16px;
    margin-bottom: 16px;
}
.easytrax-subgroup-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e40af;
    margin: 0 0 8px;
}

/* =============================================================================
   CARTE
   ============================================================================= */

.easytrax-card {
    border-radius: 8px;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
}
.easytrax-card:hover {
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.03);
}
.easytrax-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.easytrax-card-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none !important;
    color: inherit !important;
}
.easytrax-card-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}
.easytrax-card-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
/* Icônes des adhérents (cartes) - +30% : 40px → 52px */
.easytrax-card-icon {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: contain;
}
.easytrax-card-content {
    flex: 1;
    min-width: 0;
    line-height: 20px;
}
.easytrax-card-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--ez-text-dark);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.easytrax-card-address {
    display: block;
    font-size: 12px;
    color: var(--ez-text-muted);
}

/* Bouton copier */
.easytrax-copy-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.08);
    border: none;
    cursor: pointer;
    color: var(--ez-primary);
    opacity: 0.35;
    transition: all 0.2s ease;
    padding: 0;
}
.easytrax-card:hover .easytrax-copy-btn {
    opacity: 0.7;
}
.easytrax-copy-btn:hover {
    opacity: 1 !important;
    background: rgba(37, 99, 235, 0.15);
}
.easytrax-copy-btn:active {
    transform: scale(0.9);
}

/* Toast copie */
.easytrax-copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 99999;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.easytrax-copy-toast.visible {
    opacity: 1;
    transform: translateX(0);
}

/* =============================================================================
   LOADER
   ============================================================================= */

.easytrax-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}
.easytrax-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #dbeafe;
    border-top-color: var(--ez-primary);
    border-radius: 50%;
    animation: easytrax-spin 0.8s linear infinite;
}
@keyframes easytrax-spin { to { transform: rotate(360deg); } }
.easytrax-loader-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--ez-text-muted);
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

.easytrax-fade-in {
    animation: easytrax-fadeIn 0.5s ease-out forwards;
    opacity: 0;
}
@keyframes easytrax-fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
    .easytrax-content {
        grid-template-columns: 1fr;
    }
    .easytrax-panel {
        order: -1;
    }
}
@media (max-width: 768px) {
    .easytrax-tabs { gap: 8px; }
    .easytrax-tab {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
    }
    .easytrax-select {
        padding: 16px 40px 16px 16px;
        font-size: 14px;
        border-radius: 12px;
    }
    .easytrax-list { padding: 12px; }
    .easytrax-card-title { white-space: normal; }

    /* ==========================================================================
       MOBILE : Cartes avec 2 icônes → layout empilé
       Les icônes passent en colonne (l'une en dessous de l'autre)
       ========================================================================== */
    /* Icônes empilées verticalement */
    .easytrax-card-two-icons .easytrax-card-icons {
        flex-direction: column;
        gap: 4px;
    }
}