/* minimap.css — thème Tetley Studio.
   ⚠️ AUCUN TWIG DANS CE FICHIER : il est servi via asset(), donc Tebex renvoie le fichier
   BRUT, sans passer par Twig. Toute valeur du panel passe par une variable CSS déclarée
   dans le bloc <style> de layout.html.
   📖 Documentation complète (le pourquoi de chaque règle, les pièges, les mesures qui ont
   motivé les choix) : DOCUMENTATION.md, à la racine du thème, section « minimap.css ». */
.ts-minimap-section {
    position: relative; overflow: hidden; margin: 20px 0 0; padding: 0;
    --ts-blip-glow: color-mix(in srgb, var(--ts-blip, var(--main-color)), transparent 55%);
    background: var(--ink-2);
    border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r3);
    box-shadow: var(--shadow-card);
}
.ts-minimap-toolbar {
    position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
    padding: 16px 22px;
    background: var(--ink-2);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}
.ts-minimap-search { position: relative; flex: 1 1 240px; max-width: 320px; }
.ts-minimap-search .ts-i { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 12px; }
.ts-minimap-search input {
    width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    padding: 6px 2px 6px 20px; color: var(--text); font-family: var(--font-body); font-size: 14px; outline: none;
    transition: border-color .2s ease;
}
.ts-minimap-search input::placeholder { color: var(--mute); }
.ts-minimap-search input:focus { border-color: var(--main-color); }
.ts-minimap-filters { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 18px; flex: 2 1 auto; min-width: 0; overflow: hidden; }
.ts-minimap-chip {
    font-family: var(--font-head); font-weight: 600; font-size: 12px; padding: 4px 2px; border-radius: 0;
    background: none; border: 0; border-bottom: 2px solid transparent; color: var(--mute); cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
    white-space: nowrap; flex: 0 0 auto; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.ts-minimap-chip-ghost {
    width: 58px; height: 18px; align-self: center; pointer-events: none;
    border-bottom: 0; border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 50%, rgba(255,255,255,.05) 75%);
    background-size: 200% 100%;
    animation: ts-ghost-shimmer 1.2s linear infinite;
}
.ts-minimap-chip-ghost:nth-of-type(3) { width: 42px; }
.ts-minimap-chip-ghost:nth-of-type(4) { width: 70px; }
@keyframes ts-ghost-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ts-minimap-popup-loading { color: var(--mute); font-size: 12px; padding-top: 6px; }
@media (prefers-reduced-motion: reduce) { .ts-minimap-chip-ghost { animation: none; } }

.ts-minimap-chip-more { position: relative; letter-spacing: .1em; }
.ts-minimap-chip-more.active { color: var(--text); text-shadow: 0 0 12px var(--glow-strong); }
.ts-minimap-filters-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0; min-width: 180px; max-height: 260px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px; padding: 8px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r2);
    box-shadow: var(--shadow-dropdown); z-index: 30;
}
.ts-minimap-filters-dropdown .ts-minimap-chip {
    max-width: none; padding: 8px 10px; border-bottom: 0; border-radius: var(--r1); text-align: left; color: var(--dim);
}
.ts-minimap-filters-dropdown .ts-minimap-chip:hover { background: var(--panel); color: var(--text); }
.ts-minimap-filters-dropdown .ts-minimap-chip.active { background: var(--glow); color: var(--main-color); text-shadow: none; }
.ts-minimap-chip:hover { color: var(--text); }
.ts-minimap-chip.active { color: var(--text); font-weight: 700; border-bottom-color: var(--main-color); text-shadow: 0 0 12px var(--glow-strong); }
.ts-minimap-zoom { display: flex; gap: 8px; margin-left: auto; }
.ts-minimap-zoom button {
    width: 40px; height: 40px; border-radius: 999px; background: none; border: 0;
    color: var(--mute); font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: color .18s ease, transform .18s ease;
}
.ts-minimap-zoom button:hover { color: var(--main-color); transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) {
    .ts-minimap-zoom button:hover { transform: none; }
}

@media (max-width: 640px) {
    .ts-minimap-toolbar { flex-wrap: nowrap; gap: 10px; }
    .ts-minimap-search { order: 1; flex: 1 1 auto; max-width: none; min-width: 0; }
    .ts-minimap-zoom { order: 2; margin-left: 0; flex: 0 0 auto; }
    .ts-minimap-filters { order: 3; flex: 0 0 auto; gap: 10px; }
    .ts-minimap-filters-dropdown { right: 0; left: auto; }
}

.ts-minimap {
    position: relative; z-index: 0; width: 100%; aspect-ratio: 16 / 11; min-height: 440px; max-height: min(720px, 62vh);
    background: var(--minimap-bg, #05070a);
}
.ts-minimap-body { display: flex; align-items: stretch; }
.ts-minimap-body > .ts-minimap { flex: 1 1 auto; width: auto; min-width: 0; }
.ts-minimap-list {
    flex: 0 0 264px; max-width: 264px;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 0;
    background: var(--ink-2);
    border-left: 1px solid rgba(255, 255, 255, .10);
}
.ts-minimap-list-item {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 9px 16px; background: none; border: 0; cursor: pointer; text-align: left;
    font-family: var(--font-body); font-size: 13px; color: var(--dim);
    transition: background .18s ease, color .18s ease;
}
.ts-minimap-list-item .ts-i {
    display: inline-block;
    font-size: 12px; color: var(--ts-blip, var(--main-color)); flex: 0 0 auto;
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.ts-minimap-list-item:hover .ts-i { transform: scale(1.18); }
.ts-minimap-list-item.active .ts-i { transform: scale(1.45); }
@media (prefers-reduced-motion: reduce) {
    .ts-minimap-list-item .ts-i { transition: none; }
}
.ts-minimap-list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-minimap-list-item:hover { background: var(--overlay-soft); color: var(--text); }
.ts-minimap-list-item.active { color: var(--text); background: var(--overlay-soft); }
.ts-minimap-list-item.is-parent { font-family: var(--font-head); font-weight: 600; color: var(--text); }
.ts-minimap-list-chev { margin-left: auto; transition: transform .22s ease; }
.ts-minimap-list-item.is-parent.open .ts-minimap-list-chev { transform: rotate(180deg); }
.ts-minimap-list-sub {  /* l enfant .ts-minimap-list-sub-in porte overflow:hidden, sans lui la ligne ne se referme pas */ display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.ts-minimap-list-sub > * { overflow: hidden; }
.ts-minimap-list-sub.open { grid-template-rows: 1fr; }
.ts-minimap-list-sub-in { display: flex; flex-direction: column; }
.ts-minimap-list-item.is-child { padding-left: 34px; font-size: 12px; }
.ts-minimap-list-empty { padding: 18px 16px; font-size: 12px; color: var(--mute); }
@media (prefers-reduced-motion: reduce) {
    .ts-minimap-list-sub, .ts-minimap-list-chev { transition: none; }
}
.ts-minimap-list-item:focus-visible { outline-offset: -3px; border-radius: 0; }
@media (max-width: 900px) {
    .ts-minimap-body { flex-direction: column; }
    .ts-minimap-body > .ts-minimap { width: 100%; }
    .ts-minimap-list {
        flex: 0 0 auto; max-width: none; width: 100%; max-height: 232px;
        border-left: 0; border-top: 1px solid rgba(255, 255, 255, .10);
    }
}

.ts-minimap-loader {
    position: absolute; inset: 0; z-index: 1200;
    display: flex; align-items: center; justify-content: center;
    background: var(--minimap-bg, #05070a);
    overflow: hidden;
    transition: opacity .45s ease;
}
.ts-minimap-loader .ts-i { font-size: 22px; color: var(--main-color); opacity: .55; }
.ts-minimap-loader::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 50%, transparent 80%);
    transform: translateX(-100%);
    animation: ts-minimap-shimmer 1.5s ease-in-out infinite;
}
.ts-minimap-loader.is-hidden { opacity: 0; pointer-events: none; }
@keyframes ts-minimap-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
    .ts-minimap-loader::after { animation: none; }
    .ts-minimap-loader .ts-i { animation: none; }
}
.ts-minimap .leaflet-control-container { display: none; }
.ts-minimap .leaflet-container { background: var(--minimap-bg, #05070a); font-family: var(--font-body); outline: none; }
.ts-minimap-caption {
    position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-body); font-size: 12px; letter-spacing: .04em; color: var(--mute); text-align: center; padding: 20px; pointer-events: none;
}
.ts-minimap-pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.ts-minimap-pin-dot {
    width: 30px; height: 30px; display: block;
    transform-origin: 50% 100%;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)) drop-shadow(0 0 6px var(--ts-blip-glow));
    transition: transform .2s cubic-bezier(.22, 1, .36, 1), filter .2s ease;
}
.ts-minimap-pin:hover .ts-minimap-pin-dot,
.ts-minimap-pin.active .ts-minimap-pin-dot {
    transform: scale(1.3);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 15px var(--ts-blip-glow));
}
.ts-minimap-pin.dimmed { opacity: .15; }

.ts-minimap .leaflet-popup-content-wrapper {
    background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r2); padding: 0; overflow: hidden;
    box-shadow: var(--shadow-strong);
}
.ts-minimap a.leaflet-popup-close-button {
    width: 36px; height: 36px; padding: 0;
    font-size: 28px; line-height: 34px; text-align: center;
    color: var(--text);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
    transition: color .18s ease, transform .18s ease;
}
.ts-minimap a.leaflet-popup-close-button:hover { color: #fff; transform: scale(1.12); }
.ts-minimap .leaflet-popup-content { margin: 0; min-width: 300px; }
.ts-minimap .leaflet-popup-tip { background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .12); box-shadow: none; }
.ts-minimap-popup-link { display: block; color: inherit; text-decoration: none; }
.ts-minimap-popup-link:hover .ts-minimap-popup-cta { text-decoration: underline; }
.ts-minimap-popup-img { display: block; width: 100%; height: 170px; object-fit: cover; outline: 1px solid var(--img-outline); outline-offset: -1px; }
.ts-minimap-popup-body { margin: 16px 20px 18px; }
.ts-minimap-popup-cat { font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--main-color); margin-bottom: 6px; }
.ts-minimap-popup-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; margin-bottom: 8px; color: var(--text); }
.ts-minimap-popup-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ts-minimap-popup-price { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--main-color); font-variant-numeric: tabular-nums; }
.ts-minimap-popup-old { color: var(--promo-2); text-decoration: line-through; font-size: 14px; font-weight: 600; }
.ts-minimap-popup-disc { background: var(--promo); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 12px; padding: 4px 8px; border-radius: var(--r1); }
.ts-minimap-popup-cta { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--main-color); }
