/**
 * VigiCrécy® Éoliennes — CSS Front v1.0.5
 *
 * Charte officielle stricte :
 *   - Bleu marine "Vigi"   : #3B6CB7
 *   - Turquoise "Crécy"    : #3BBFB0
 *   - Bleu nuit (textes)   : #1A2E4A
 *   - Bleu très clair      : #EEF4FB
 *   - Bleu pâle            : #D6EAF8
 *   - Gradient officiel    : 135deg, #3B6CB7 → #5AADCF
 *
 * Règles strictes :
 *   - Pas de z-index > 100 (sauf modale = 9999, aucune ici)
 *   - Popup padding 0 (.leaflet-popup-content-wrapper / .leaflet-popup-content)
 *   - autoPanPadding géré côté JS (L.point(10,60))
 */

/* =========================================================
   PAGE TEST (shortcode)
   ========================================================= */
.vge-test-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1A2E4A;
}

.vge-test-header {
    background: linear-gradient(135deg, #3B6CB7, #5AADCF);
    color: #ffffff;
    padding: 18px 22px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.vge-test-header h2 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.vge-test-header p {
    margin: 0;
    opacity: 0.92;
    font-size: 13px;
}

.vge-test-map {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(26, 46, 74, 0.12);
    overflow: hidden;
    background: #f4f6f9;
}

.vge-test-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(26, 46, 74, 0.2);
    color: #1A2E4A;
    font-size: 14px;
    z-index: 50;
}

.vge-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #D6EAF8;
    border-top-color: #3B6CB7;
    border-radius: 50%;
    animation: vge-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes vge-spin {
    to { transform: rotate(360deg); }
}

.vge-error {
    background: #fff;
    border-left: 4px solid #C0392B;
    padding: 12px 16px;
    margin-top: 12px;
    color: #000;
    border-radius: 4px;
}

/* =========================================================
   MARKERS — éoliennes & postes
   ========================================================= */
.vge-aero-marker,
.vge-poste-marker {
    background: transparent !important;
    border: none !important;
}

.vge-aero-marker svg,
.vge-poste-marker svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow( 0 1px 2px rgba(0, 0, 0, 0.3) );
}

/* =========================================================
   CLUSTERS — design VigiCrécy®
   ========================================================= */
.vge-cluster-wrap {
    background: transparent !important;
    border: none !important;
}

.vge-cluster {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(26, 46, 74, 0.3);
    border: 3px solid #ffffff;
}

.vge-cluster-small {
    background: #3BBFB0;
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.vge-cluster-medium {
    background: #3B6CB7;
    width: 42px;
    height: 42px;
}

.vge-cluster-large {
    background: linear-gradient(135deg, #3B6CB7, #1A2E4A);
    width: 50px;
    height: 50px;
    font-size: 14px;
}

/* =========================================================
   POPUPS — pattern VigiCrécy®
   ========================================================= */
.vge-leaflet-popup .leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 46, 74, 0.25);
}

.vge-leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
    width: 320px !important;
    max-width: 320px;
}

.vge-popup {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1A2E4A;
    font-size: 13px;
    line-height: 1.4;
}

.vge-popup-header {
    background: linear-gradient(135deg, #3B6CB7, #5AADCF);
    color: #ffffff;
    padding: 12px 16px;
}

.vge-popup-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.vge-popup-sub {
    font-size: 15px;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.2;
}

.vge-popup-body {
    padding: 12px 16px;
    background: #ffffff;
}

.vge-popup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.vge-popup-table th {
    text-align: left;
    color: #6B9FCC;
    font-weight: 600;
    padding: 4px 8px 4px 0;
    width: 38%;
    vertical-align: top;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vge-popup-table td {
    color: #1A2E4A;
    padding: 4px 0;
    vertical-align: top;
}

.vge-popup-table code {
    background: #EEF4FB;
    color: #3B6CB7;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

.vge-popup-table strong {
    color: #3B6CB7;
}

.vge-pill {
    display: inline-block;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.vge-popup-comment {
    background: #EEF4FB;
    border-left: 3px solid #3BBFB0;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #1A2E4A;
    border-radius: 0 4px 4px 0;
}

.vge-popup-comment strong {
    color: #3B6CB7;
}

/* =========================================================
   LEAFLET CONTROL LAYERS — adaptation
   ========================================================= */
.leaflet-control-layers-expanded {
    color: #1A2E4A !important;
    font-size: 13px;
}

.leaflet-control-layers-expanded label {
    margin-bottom: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
    .vge-leaflet-popup .leaflet-popup-content {
        width: 260px !important;
        max-width: 260px;
    }
    .vge-popup-table th { width: 42%; }
    .vge-test-header h2 { font-size: 17px; }
}
