/**
 * Vandeto Géo-Intelligence — Styles front.
 * Radius widget, badge distance, meet widget, heatmap table.
 */

:root {
    --vgi-accent: #ffc220;
    --vgi-dark: #11151c;
    --vgi-ink: #1e2530;
    --vgi-ink2: #5b6573;
    --vgi-line: #e7eaef;
    --vgi-bg: #f4f6fa;
    --vgi-radius-ui: 18px;
    --vgi-shadow: 0 4px 24px rgba(17, 21, 28, .14);
}

/* ---- Badge distance -------------------------------------------------- */
.vgi-dist-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(17, 21, 28, .72);
    backdrop-filter: blur(4px);
    padding: 4px 9px;
    border-radius: 999px;
    pointer-events: none;
    letter-spacing: .02em;
}

/* ---- Trigger floating button ---------------------------------------- */
/* .vgi-radius-trigger retiré : remplacé par le bouton unifié #vgi-ar-trigger (Auto-Radius) pour éviter le doublon de boutons flottants. */

/* ---- Panneau rayon --------------------------------------------------- */
.vgi-radius-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(17, 21, 28, .45);
    backdrop-filter: blur(3px);
}

.vgi-radius-panel__inner {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: var(--vgi-radius-ui) var(--vgi-radius-ui) 0 0;
    padding: 28px 26px 34px;
    box-shadow: var(--vgi-shadow);
    position: relative;
}

.vgi-radius-panel__close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--vgi-ink2);
}

.vgi-radius-panel__title {
    font-size: 18px;
    font-weight: 750;
    margin: 0 0 20px;
    color: var(--vgi-ink);
}

/* Cercles concentriques */
.vgi-radius-visual {
    position: relative;
    height: 160px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vgi-radius-visual__dot {
    position: absolute;
    width: 42px;
    height: 42px;
    background: var(--vgi-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.vgi-radius-visual__dot span {
    font-size: 10px;
    color: var(--vgi-accent);
    font-weight: 800;
    letter-spacing: .06em;
}

.vgi-radius-visual__ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px;
    transition: border-color .2s ease;
    cursor: pointer;
}

.vgi-ring-0 { width:  72px; height:  72px; border-color: var(--vgi-accent); background: rgba(255, 194, 32, .08); }
.vgi-ring-1 { width: 118px; height: 118px; border-color: rgba(255, 194, 32, .5); }
.vgi-ring-2 { width: 160px; height: 160px; border-color: rgba(255, 194, 32, .2); }

.vgi-ring-label { font-size: 10px; font-weight: 700; color: var(--vgi-ink2); }
.vgi-ring-count { display: none; }

/* Liste des paliers */
.vgi-radius-tiers {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vgi-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border: 1.5px solid var(--vgi-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.vgi-tier.is-active {
    border-color: var(--vgi-accent);
    background: #fff8e1;
}

.vgi-tier input { display: none; }

.vgi-tier__label { font-size: 14px; font-weight: 650; color: var(--vgi-ink); }
.vgi-tier__count { font-size: 12.5px; color: var(--vgi-ink2); font-weight: 600; }

.vgi-radius-panel__apply {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: var(--vgi-dark);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

.vgi-radius-panel__apply:hover { background: #000; }

/* ---- Points de rencontre -------------------------------------------- */
.vgi-meet-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1.5px solid var(--vgi-line);
    border-radius: 999px;
    background: #fff;
    color: var(--vgi-ink);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(17, 21, 28, .06);
    transition: box-shadow .15s ease;
}

.vgi-meet-trigger:hover { box-shadow: 0 4px 16px rgba(17, 21, 28, .12); }

.vgi-meet-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(17, 21, 28, .4);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.vgi-meet-widget__inner {
    width: 100%;
    max-width: 540px;
    background: #fff;
    border-radius: var(--vgi-radius-ui) var(--vgi-radius-ui) 0 0;
    padding: 20px 22px 30px;
    box-shadow: var(--vgi-shadow);
}

.vgi-meet-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.vgi-meet-header__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff6da, #ffefb8);
    border: 1px solid #ffe79a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.vgi-meet-header h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--vgi-ink); }
.vgi-meet-header p  { margin: 0; font-size: 12px; color: var(--vgi-ink2); }

.vgi-meet-widget__close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--vgi-ink2);
    flex: 0 0 auto;
}

.vgi-meet-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.vgi-meet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--vgi-line);
    border-radius: 12px;
    background: var(--vgi-bg);
}

.vgi-meet-icon { font-size: 22px; flex: 0 0 auto; }
.vgi-meet-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.vgi-meet-info strong { font-size: 14px; color: var(--vgi-ink); }
.vgi-meet-addr { font-size: 12px; color: var(--vgi-ink2); }
.vgi-meet-dist { font-size: 11.5px; color: var(--vgi-ink2); font-weight: 600; }

.vgi-meet-choose {
    padding: 7px 14px;
    border: 1.5px solid var(--vgi-dark);
    border-radius: 8px;
    background: #fff;
    color: var(--vgi-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background .12s ease, color .12s ease;
}

.vgi-meet-choose:hover { background: var(--vgi-dark); color: #fff; }
.vgi-meet-loading { color: var(--vgi-ink2); font-size: 13px; text-align: center; padding: 16px 0; }
.vgi-meet-empty  { color: var(--vgi-ink2); font-size: 13px; }

/* ---- Heatmap table -------------------------------------------------- */
.vgi-heatmap-table-wrap { overflow-x: auto; }

.vgi-heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.vgi-heatmap-table th,
.vgi-heatmap-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--vgi-line);
}

.vgi-heatmap-table th { font-weight: 700; background: var(--vgi-bg); color: var(--vgi-ink); }
.vgi-gap-positive { color: #16a34a; font-weight: 700; }
.vgi-gap-negative { color: #dc2626; font-weight: 700; }
