/* ==========================================================================
   1. MODULE CRM : CONNEXION & AUTHENTIFICATION
   ========================================================================== */
#clubtir_login_form p, #clubtir_login_form_mail p { margin-bottom: 20px; }
#clubtir_login_form label, #clubtir_login_form_mail label { display: block; font-weight: 600; color: #374151; font-size: 13px; margin-bottom: 6px; }
#clubtir_login_form input[type="text"], #clubtir_login_form input[type="password"],
#clubtir_login_form_mail input[type="text"], #clubtir_login_form_mail input[type="password"] { 
    width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; box-sizing: border-box; font-size: 14px; background: #fff; outline: none; transition: all 0.2s ease; 
}
#clubtir_login_form input[type="text"]:focus, #clubtir_login_form input[type="password"]:focus,
#clubtir_login_form_mail input[type="text"]:focus, #clubtir_login_form_mail input[type="password"]:focus { border-color: #3498db; }
#clubtir_login_form input[type="submit"], #clubtir_login_form_mail input[type="submit"] { 
    width: 100%; background: #111827; color: #fff; border: none; padding: 12px; font-size: 14px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: background 0.2s ease; 
}
#clubtir_login_form input[type="submit"]:hover, #clubtir_login_form_mail input[type="submit"]:hover { background: #1f2937; }
#clubtir_login_form .forgetmenot, #clubtir_login_form_mail .forgetmenot { display: flex; align-items: center; gap: 8px; font-weight: normal; color: #6b7280; }
#clubtir_login_form .forgetmenot input[type="checkbox"], #clubtir_login_form_mail .forgetmenot input[type="checkbox"] { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.login-username label, .login-password label { font-size: 0 !important; }
.login-username label::before { content: "Identifiant ou E-mail"; font-size: 13px; }
.login-password label::before { content: "Mot de passe"; font-size: 13px; }

/* ==========================================================================
   2. NAVIGATION PRINCIPALE (OPTIMISÉE & COMPACTE)
   ========================================================================== */
.ct-nav-container { 
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; margin-bottom: 25px; 
    display: flex; flex-wrap: wrap; gap: 15px 25px; align-items: flex-start; align-content: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}
.ct-nav-group { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 220px; }
.ct-nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #6b7280; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid #f3f4f6; margin: 0 0 4px 0; }
.ct-nav-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-nav-item { 
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 12px; font-size: 13px; 
    font-weight: 600; border-radius: 6px; color: #374151; background: #f8fafc; border: 1px solid #e2e8f0; transition: all 0.2s ease; line-height: 1; margin: 0;
}
.ct-nav-item svg.menu-icon { opacity: 0.7; transition: 0.2s; }
.ct-nav-item:hover { background: #e2e8f0; color: #0f172a; border-color: #cbd5e1; }
.ct-nav-item:hover svg.menu-icon { opacity: 1; }
.ct-nav-item.active { background: #111827; color: #ffffff; border-color: #111827; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.ct-nav-item.active svg.menu-icon { opacity: 1; }

.ct-nav-locked { opacity: 0.6; background: #fff !important; border: 1px dashed #cbd5e1 !important; color: #94a3b8 !important; }
.ct-nav-locked:hover { background: #fef2f2 !important; color: #991b1b !important; border-color: #fca5a5 !important; opacity: 1; }
.ct-nav-locked:hover svg.menu-icon { opacity: 0.9; }

/* ==========================================================================
   3. FORMULAIRES & COMPOSANTS GLOBAUX
   ========================================================================== */
.ct-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 25px; margin-bottom: 25px; align-items: start; }
.ct-settings-card { background: #fff; padding: 25px; border-radius: 12px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.ct-settings-title { color: #111827; margin-top: 0; font-size: 16px; font-weight: 600; border-bottom: 1px solid #e5e7eb; padding-bottom: 12px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.ct-s-group { margin-bottom: 15px; }
.ct-s-label { display: block; font-weight: 500; font-size: 13px; color: #4b5563; margin-bottom: 6px; }
.ct-s-input { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; box-sizing: border-box; font-family: inherit; }
.ct-s-desc { font-size: 11px; color: #6b7280; margin-top: 4px; margin-bottom: 0; display: block; line-height: 1.4; }
.ct-btn-export { background: #111827; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; transition: 0.2s; }
.ct-btn-export:hover { background: #1f2937; }

.ct-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.65); z-index: 99999; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.ct-modal-box { background: #fff; width: 95%; max-width: 650px; max-height: 85vh; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15); }
.ct-modal-header { padding: 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.ct-modal-title { margin: 0; font-size: 16px; font-weight: bold; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.ct-modal-close { cursor: pointer; border: none; background: none; font-size: 20px; color: #64748b; transition: 0.2s; }
.ct-modal-close:hover { color: #e74c3c; }
.ct-modal-body { overflow-y: auto; padding: 20px; background: #fff; flex: 1; min-height: 0; }
.ct-modal-footer { padding: 20px; border-top: 1px solid #e5e7eb; background: #f8fafc; display: flex; justify-content: space-between; align-items: center; }

/* ==========================================================================
   4. TABLEAU DE BORD (STATS, LEAFLET, PALMARÈS)
   ========================================================================== */
.ct-dash-top { display: flex; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; }
.ct-dash-black { background: #0f172a; color: #fff; border-radius: 12px; padding: 30px; flex: 1; min-width: 300px; text-align: center; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); display: flex; flex-direction: column; justify-content: center; }
.ct-geo-lists { display: flex; gap: 20px; flex: 2; flex-wrap: wrap; }
.ct-geo-list-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; flex: 1; min-width: 220px; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.ct-geo-card-title { margin: 0 0 15px 0; font-size: 14px; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.ct-geo-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; color: #475569; font-weight: 500; }
.ct-geo-row:last-child { border-bottom: none; }
.ct-geo-badge { background: #e2e8f0; color: #334155; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.ct-big-map-container { width: 100%; height: 450px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 12px; margin-bottom: 30px; position: relative; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
#clubtir-map { width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; }
.leaflet-tooltip { background: rgba(255,255,255,0.95); border: 1px solid #cbd5e1; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); color: #0f172a; font-size: 12px; padding: 6px 10px; }
.leaflet-tooltip-permanent { background: transparent; border: none; box-shadow: none; text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 0px 2px 3px rgba(0,0,0,0.3); font-size: 12px; font-weight: bold; }
.ct-dash-alert { background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

.ct-dash-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 30px; }
.ct-dash-rank { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.ct-dash-rank:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: #cbd5e1; }
.ct-rank-title { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0 0 5px 0; display: flex; align-items: center; gap: 8px; }
.ct-rank-sub { font-size: 11px; color: #64748b; margin: 0 0 15px 0; }
.ct-rank-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 12px; color: #334155; font-weight: 600; }
.ct-rank-badge { background: #dbeafe; color: #1e40af; padding: 3px 8px; border-radius: 12px; font-size: 11px; }

.ct-pos-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: bold; margin-right: 8px; flex-shrink: 0; }
.ct-pos-1 { background: #fef08a; color: #854d0e; border: 1px solid #fde047; }
.ct-pos-2 { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.ct-pos-3 { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.ct-pos-n { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.palmares-list { display: none; }
.ct-modal-search { padding: 15px 20px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.ct-modal-search input { width: 100%; padding: 10px 15px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.ct-ville-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 15px; }
.ct-ville-name { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: #334155; font-weight: 500; }

/* ==========================================================================
   5. LISTE DES LICENCIÉS & RECHERCHE
   ========================================================================== */
.ct-filter-bar { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.02); margin-bottom: 20px; }
.ct-search-box { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; }
.ct-search-input-wrapper { display: flex; align-items: center; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 10px; width: 100%; max-width: 400px; }
.ct-search-input { width: 100%; border: none; outline: none; padding: 10px 5px; font-size: 14px; background: transparent; }

.ct-filters-wrapper { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-top: 20px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.ct-filter-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 15px; border-bottom: 1px dashed #cbd5e1; padding-bottom: 12px; }
.ct-filter-row:last-child { border-bottom: none; padding-bottom: 0; }
.ct-filter-label { min-width: 140px; font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; padding-top: 8px; }
.ct-filter-links { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }

.ct-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; border: 1px solid #d1d5db; color: #4b5563; background: #fff; transition: 0.2s; white-space: nowrap; height: auto; line-height: 1.2; }
.ct-chip:hover { background: #f3f4f6; }
.ct-chip.active { background: #111827; color: #fff; border-color: #111827; }
.ct-chip.active svg { color: #fff !important; }

.ct-bulk-bar { background: #fffbeb; border: 1px solid #fde68a; padding: 10px 15px; border-radius: 8px; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; }
.ct-bulk-select { padding: 8px 12px; border: 1px solid #fcd34d; border-radius: 6px; font-size: 13px; background: #fff; outline: none; }
.ct-bulk-btn { background: #d97706; color: #fff; border: none; padding: 8px 15px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; transition: 0.2s; }
.ct-bulk-btn:hover { background: #b45309; }

.ct-table-tspd { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.02); border: 1px solid #e5e7eb; }
.ct-table-tspd th { background: #f8fafc; text-align: left; padding: 15px; color: #6b7280; font-weight: 600; border-bottom: 1px solid #e5e7eb; }
.ct-table-tspd td { padding: 15px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: middle; }
.ct-table-tspd tr:hover td { background: #f8fafc; }
.ct-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-width: 160px; }
.ct-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; padding: 5px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; text-align: center; text-decoration: none; cursor: pointer; transition: 0.2s; }
.ct-action-btn:hover { background: #e5e7eb; }

.ct-export-group { margin-bottom: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.ct-export-group-title { background: #f1f5f9; padding: 10px 15px; font-weight: bold; color: #334155; font-size: 13px; border-bottom: 1px solid #e2e8f0; }
.ct-export-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; }
.ct-export-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #475569; }

/* ==========================================================================
   6. COTISATIONS & TRÉSORERIE
   ========================================================================= */
.ct-fin-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.ct-fin-title { font-size: 15px; font-weight: 600; color: #334155; margin: 0 0 15px 0; display: flex; align-items: center; gap: 8px; }
.ct-fin-red-bar { background: #fef2f2; border: 1px solid #fca5a5; display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; border-radius: 8px; margin-bottom: 20px; }
.ct-fin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ct-fin-box { background: #fff; border: 1px solid #e5e7eb; padding: 12px 15px; border-radius: 6px; font-size: 13px; color: #4b5563; display: flex; justify-content: space-between; align-items: center; }
.ct-fin-box strong { color: #111827; font-size: 14px; }
.ct-fin-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed #e5e7eb; font-size: 13px; color: #4b5563; }
.ct-fin-row:last-child { border-bottom: none; }
.ct-fin-net { background: #10b981; color: #fff; font-size: 18px; font-weight: bold; padding: 10px 20px; border-radius: 8px; text-align: right; display: inline-block; }

/* ==========================================================================
   7. PARAMÈTRES & SYSTÈME (ONGLETS & PRO)
   ========================================================================== */
.ct-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 2px solid #e5e7eb; padding-bottom: 0; flex-wrap: wrap; }
.ct-tab-btn { background: transparent; border: none; padding: 12px 20px; font-size: 14px; font-weight: 600; color: #6b7280; cursor: pointer; margin-bottom: -2px; border-bottom: 2px solid transparent; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.ct-tab-btn:hover { color: #111827; }
.ct-tab-btn.active { color: #3498db; border-bottom: 2px solid #3498db; }
.ct-tab-content { display: none; animation: fadeIn 0.3s ease-in-out; }
.ct-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.ct-pro-lock { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 40px; text-align: center; }
.ct-pro-lock h3 { color: #d97706; margin-top: 0; font-size: 22px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.ct-pro-lock p { color: #92400e; font-size: 15px; max-width: 600px; margin: 0 auto 20px auto; line-height: 1.6; }
.ct-pro-btn { display: inline-flex; align-items: center; gap: 8px; background: #111827; color: #fff; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: 600; transition: 0.2s; }
.ct-pro-btn:hover { background: #1f2937; }

/* ==========================================================================
   8. MODULE API GÉO (AUTO-COMPLÉTION)
   ========================================================================== */
.clubtir-dropdown-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0; } 
.clubtir-dropdown-item:hover { background-color: #f4fdf8; color: #16a085; font-weight: bold; }

/* ==========================================================================
   9. BOUCLIER ANTI-THÈME (Force le design contre Elementor/Divi/Astra)
   ========================================================================== */
.ct-nav-container { align-items: flex-start !important; align-content: flex-start !important; height: auto !important; }
.ct-nav-group { height: max-content !important; min-height: 0 !important; justify-content: flex-start !important; }
.ct-nav-item { height: auto !important; line-height: normal !important; margin-bottom: 0 !important; }
.ct-nav-item svg { margin: 0 !important; padding: 0 !important; display: inline-block !important; }
.ct-dash-top { align-items: flex-start !important; }
.ct-dash-black, .ct-geo-list-card { height: max-content !important; }

/* Bouclier spécifique pour les filtres 3 lignes */
.ct-filters-wrapper {
    background: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 8px !important;
    padding: 15px !important; margin-top: 20px !important; margin-bottom: 20px !important;
    display: flex !important; flex-direction: column !important; gap: 12px !important;
}
.ct-filter-row {
    display: flex !important; align-items: flex-start !important; flex-wrap: wrap !important;
    gap: 15px !important; border-bottom: 1px dashed #cbd5e1 !important; padding-bottom: 12px !important;
}
.ct-filter-row:last-child { border-bottom: none !important; padding-bottom: 0 !important; }
.ct-filter-label {
    min-width: 140px !important; font-size: 11px !important; font-weight: 700 !important;
    color: #475569 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important;
    display: flex !important; align-items: center !important; gap: 6px !important; padding-top: 8px !important;
}
.ct-filter-links { display: flex !important; align-items: center !important; gap: 10px 12px !important; flex-wrap: wrap !important; }
.ct-chip {
    display: inline-flex !important; align-items: center !important; gap: 6px !important; padding: 8px 16px !important;
    white-space: nowrap !important; height: auto !important; line-height: 1.2 !important;
}