/* ============================================================
   HOME.CSS — Wokoli · dépend de variables.css + Bootstrap 5
   ============================================================ */

/* ============================================================
   LAYOUT GLOBAL — home sort du container de base.html
   ============================================================ */
body.wk-home main.container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ============================================================
   HERO
   ============================================================ */
.wk-home-hero {
    position: relative;
    background: linear-gradient(160deg, #0f0d08 0%, #1a1200 55%, #0f0d08 100%);
    padding: 0 0 52px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.wk-home-hero__halo {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.wk-home-hero__halo--1 {
    top: -180px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 126, 0, .07) 0%, transparent 65%);
}

.wk-home-hero__halo--2 {
    bottom: -120px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 61, 0, .05) 0%, transparent 65%);
}

/* Pill localisation */
.wk-location-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Titre */
.wk-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    color: var(--text-primary);
}

.wk-hero-title__accent {
    color: var(--primary);
}

.wk-hero-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
}

/* Barre de recherche */
.wk-hero-search {
    max-width: 620px;
}

.wk-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-pill);
    padding: 5px 5px 5px 18px;
    gap: 8px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.wk-search-bar:focus-within {
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(255, 126, 0, .12);
}

.wk-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: .9rem;
    min-width: 0;
}

.wk-search-bar input::placeholder {
    color: var(--text-muted);
}

.wk-search-btn {
    background: var(--primary);
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    color: #fff;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: .875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    display: flex;
    align-items: center;
    gap: 5px;
}

.wk-search-btn:hover {
    background: var(--primary-light);
    transform: scale(1.02);
    box-shadow: var(--shadow-primary);
}

/* Catégories */
.wk-hero-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wk-cat-btn {
    padding: 7px 18px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
}

.wk-cat-btn:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.wk-cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

/* Stats desktop */
.wk-hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
}

.wk-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wk-hero-stat__val {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--primary);
}

.wk-hero-stat__lbl {
    font-size: .75rem;
    color: var(--text-muted);
}

.wk-hero-stat__sep {
    width: 1px;
    height: 36px;
    background: var(--border-default);
}

/* ============================================================
   CARTE
   ============================================================ */
.wk-map-section {
    position: relative;
    height: calc(100vh - 64px);
    min-height: 480px;
}

.wk-map-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-root);
}

/* ============================================================
   BADGE RÉSULTATS
   ============================================================ */
.wk-results-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(10, 10, 10, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    font-size: .82rem;
}

/* ============================================================
   PANELS FLOTTANTS — base commune
   ============================================================ */
.wk-routing-panel,
.wk-list-panel {
    position: absolute;
    z-index: 1000;
    background: rgba(10, 10, 10, .9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

/* Panel itinéraire */
.wk-routing-panel {
    bottom: 16px;
    left: 16px;
    width: 340px;
    max-width: calc(100vw - 32px);
    animation: slideUp .3s ease;
}

/* Panel liste */
.wk-list-panel {
    top: 56px;
    right: 16px;
    width: 320px;
    max-height: calc(100% - 72px);
    max-width: calc(100vw - 32px);
    animation: slideRight .3s ease;
    display: flex;
    flex-direction: column;
}

.wk-list-panel__body {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
}

/* En-tête commun */
.wk-routing-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-default);
    background: rgba(0, 0, 0, .25);
}

.wk-routing-panel__body {
    padding: 14px 16px;
}

/* Infos destination */
.wk-dest-info {
    padding: 10px 12px;
    background: rgba(255, 126, 0, .08);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: .875rem;
}

.wk-dest-info h6 {
    margin: 0 0 2px;
    font-weight: 700;
    color: var(--text-primary);
}

.wk-dest-info p {
    margin: 0;
    font-size: .78rem;
    color: var(--text-muted);
}

/* Card distance/temps */
.wk-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

/* Statut vocal */
.wk-voice-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: var(--color-success-bg);
    border-radius: var(--radius-md);
    color: var(--color-success);
    font-size: .82rem;
    font-weight: 600;
}

/* Instructions itinéraire */
.wk-routing-instructions {
    max-height: 160px;
    overflow-y: auto;
    padding: 0 16px 14px;
}

.wk-instruction {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: .82rem;
}

.wk-instruction i {
    color: var(--primary);
    width: 20px;
    flex-shrink: 0;
}

/* Carte restaurant dans la liste */
.wk-resto-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast);
    margin-bottom: 4px;
}

.wk-resto-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-glow);
}

.wk-resto-item__logo {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 126, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wk-resto-item__logo img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.wk-resto-item__name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.wk-resto-item__meta {
    font-size: .75rem;
    color: var(--text-muted);
}

/* ============================================================
   BOUTONS FAB
   ============================================================ */
.wk-fab-stack {
    position: absolute;
    right: 16px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.wk-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 10, 10, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glow);
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
    box-shadow: var(--shadow-sm);
}

.wk-fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-primary);
    border-color: var(--border-strong);
}

/* Bouton icône (fermeture panels) */
.wk-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color var(--t-fast), background var(--t-fast);
}

.wk-icon-btn:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

/* ============================================================
   MARQUEURS CARTE — Popup personnalisé
   ============================================================ */
.leaflet-popup-content-wrapper {
    background: rgba(17, 17, 17, .96) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-card) !important;
    color: var(--text-primary) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
}

.leaflet-popup-tip-container {
    display: none;
}

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 18px !important;
    top: 8px !important;
    right: 8px !important;
}

/* Contenu popup */
.wk-popup {
    padding: 14px 16px;
    min-width: 220px;
    font-family: var(--font-main);
}

.wk-popup__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wk-popup__logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 126, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.wk-popup__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wk-popup__name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
}

.wk-popup__type {
    font-size: .75rem;
    color: var(--text-muted);
}

.wk-popup__meta {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.wk-popup__meta i {
    color: var(--primary);
    margin-right: 4px;
}

.wk-popup__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}

.wk-popup__btn {
    padding: 8px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all var(--t-fast);
}

.wk-popup__btn--primary {
    background: var(--primary);
    color: #fff;
}

.wk-popup__btn--primary:hover {
    background: var(--primary-light);
}

.wk-popup__btn--secondary {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.wk-popup__btn--secondary:hover {
    border-color: var(--border-glow);
    background: var(--bg-hover);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: .8;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .wk-home-hero {
        padding: 0 0 36px;
    }

    .wk-map-section {
        height: calc(100vh - 56px);
        min-height: 420px;
    }

    .wk-results-badge {
        top: 10px;
        right: 10px;
    }

    .wk-routing-panel {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .wk-list-panel {
        top: 50px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 55vh;
    }

    .wk-fab-stack {
        bottom: 14px;
        right: 12px;
    }

    .wk-fab {
        width: 40px;
        height: 40px;
        font-size: .9rem;
    }
}

/* ============================================================
   LAYOUT PRINCIPAL — remplace les anciennes règles hero + map
   ============================================================ */

/* Grid côte-à-côte sur desktop */
.wk-home-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50% / 50% */
    height: calc(100vh - 64px);
    /* plein écran sous la navbar */
    overflow: hidden;
}

/* ---- Colonne hero (gauche) ---- */
.wk-home-hero__inner {
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
    width: 100%;
    overflow-y: auto;
    max-height: 100%;
}

.wk-home-hero__halo {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.wk-home-hero__halo--1 {
    top: -180px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 126, 0, .07) 0%, transparent 65%);
}

.wk-home-hero__halo--2 {
    bottom: -120px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 61, 0, .05) 0%, transparent 65%);
}

/* ---- Colonne carte (droite) ---- */
.wk-map-col {
    position: relative;
    height: 100%;
}

.wk-map-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-root);
}

/* ============================================================
   MOBILE — hero au-dessus, carte en-dessous
   ============================================================ */
@media (max-width: 991px) {
    .wk-home-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .wk-home-hero {
        height: auto;
        align-items: flex-start;
    }

    .wk-hero-stats {
        display: none;
    }

    .wk-location-pill {
        display: none;
    }

    .wk-map-col {
        height: 60vh;
        min-height: 420px;
    }
}

@media (max-width: 575px) {
    .wk-home-hero__inner {
        padding: .5rem 1rem;
        /* padding: 1rem 1.25rem; */
    }

    .wk-map-col {
        height: 55vh;
    }
}