/* =========================
   HIGHLIGHTS – FRISE CHRONOLOGIQUE HORIZONTALE
========================= */

/* ---------- Layout général ---------- */

.hl-section {
    padding: 40px 0 60px;
}

/* =========================
   FILTRES – IDENTIQUES HÔTELS
========================= */

.hl-section .l3-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 0.5px solid #888;
    max-width: 100%;
    margin: 0 0 28px 0;
    padding: 0 0 0 0;
}

.hl-section .l3-filters-dropdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.hl-section .l3-filter-wrapper {
    position: relative;
    display: inline-block;
}

/* Bouton filtre — copie exacte hôtels */
.hl-section .l3-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 0.5px solid #888;
    border-radius: 4px;
    background: transparent;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.hl-section .l3-filter-btn:hover {
    color: #fff;
    background: #444;
    border-color: #444;
}

.hl-section .l3-filter-btn.active {
    color: #fff;
    background: #444;
    border-color: #444;
}

.hl-section .l3-filter-btn .btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.hl-section .l3-filter-btn .btn-arrow {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    transition: transform 0.2s;
    stroke: currentColor;
    fill: none;
}

.hl-section .l3-filter-btn.open .btn-arrow {
    transform: rotate(180deg);
}

/* Panel dropdown */
.hl-section .l3-dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: var(--background-nav-color, #fff);
    border: 1.5px solid var(--text-color, #111);
    border-radius: 4px;
    z-index: 200;
    display: none;
    color: var(--text-color, #111);
}

.hl-section .l3-dropdown-panel.open {
    display: block;
}

.hl-section .l3-dropdown-title {
    padding: 14px 16px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hl-section .l3-dropdown-sep {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 0;
}

.hl-section .l3-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
}

.hl-section .l3-dropdown-list::-webkit-scrollbar { width: 4px; }
.hl-section .l3-dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.hl-section .l3-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-color, #111);
    transition: background 0.1s;
}

.hl-section .l3-dropdown-option:hover {
    background: var(--background-nav-contrasted, #f5f5f5);
}

.hl-section .l3-dropdown-option.selected { font-weight: 500; }

.hl-section .l3-check {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1.5px solid var(--text-color, #111);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl-section .l3-dropdown-option.selected .l3-check {
    background: #111;
    border-color: #111;
}

.hl-section .l3-check-mark {
    display: none;
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.hl-section .l3-dropdown-option.selected .l3-check-mark {
    display: block;
}

/* =========================
   FRISE HORIZONTALE
========================= */

.hl-timeline-outer {
    position: relative;
    width: 100%;
}

/* Ligne horizontale centrale */
.hl-spine {
    position: absolute;
    top: 100px; /* centré sur la pastille */
    left: 0;
    right: 0;
    height: 1px;
    background-color: #d1d0c9;
    z-index: 0;
    pointer-events: none;
}

/* Scroll horizontal snap */
.hl-timeline {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: #d1d0c9 transparent;
    /* Masque le scrollbar sur webkit — navigation par drag */
    cursor: grab;
}

.hl-timeline:active {
    cursor: grabbing;
}

.hl-timeline::-webkit-scrollbar {
    height: 3px;
}

.hl-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.hl-timeline::-webkit-scrollbar-thumb {
    background: #d1d0c9;
    border-radius: 2px;
}

/* Fade latéral pour suggérer le scroll */
.hl-timeline-outer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: calc(100% - 16px);
    background: linear-gradient(to left, var(--background-color, #fff) 10%, transparent);
    pointer-events: none;
    z-index: 10;
}

/* ---------- Groupe mois ---------- */

.hl-month-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    scroll-snap-align: start;
    min-width: 200px;
    max-width: 240px;
    padding: 0 12px;
    position: relative;
    z-index: 1;
}

/* Séparateur de mois */
.hl-separator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    padding-top: 20px;
}

.hl-month-label {
    background: #fff;
    border: 0.5px solid #aaa9a2;
    border-radius: 4px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #6b6a63;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Badge plage de mois — sous le label */
.hl-month-range-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1efe8;
    border: 0.5px solid #c9c7bf;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #6b6a63;
    text-transform: uppercase;
    white-space: nowrap;
}

.hl-month-range-badge svg {
    opacity: 0.55;
    flex-shrink: 0;
}

/* Pastille sur la spine */
.hl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a1a18;
    border: 2px solid #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
    transition: transform 0.2s ease, background 0.2s ease;
    margin: 10px 0;
}

/* Stack de cartes dans un mois */
.hl-month-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ---------- Carte ---------- */

.hl-card {
    width: 100%;
    background: #fff;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hl-month-group:hover .hl-dot {
    transform: scale(1.4);
    background: #444;
}

/* Lien conteneur */
.hl-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ---------- Image ---------- */

.hl-image-wrap {
    position: relative;
    overflow: hidden;
}

.hl-image-wrap img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.hl-card:hover .hl-image-wrap img {
    transform: scale(1.03);
}

.hl-copyright {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.25);
    padding: 1px 5px;
    border-radius: 3px;
    pointer-events: none;
}

/* Badge type */
.hl-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.4;
}

/* Palettes par type */
.hl-type-music      { background: #ede9fe; color: #5b21b6; }
.hl-type-food       { background: #d1fae5; color: #065f46; }
.hl-type-spectacle  { background: #dbeafe; color: #1e3a8a; }
.hl-type-mode       { background: #fef3c7; color: #78350f; }
.hl-type-cinema     { background: #fee2e2; color: #991b1b; }
.hl-type-badge:not([class*="hl-type-music"]):not([class*="hl-type-food"]):not([class*="hl-type-spectacle"]):not([class*="hl-type-mode"]):not([class*="hl-type-cinema"]) {
    background: #f1efe8;
    color: #44403c;
}

/* Corps de carte */
.hl-body {
    padding: 10px 12px 12px;
}

.hl-meta {
    font-size: 10px;
    color: #888;
    margin: 0 0 4px;
    line-height: 1.4;
}

.hl-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a18;
    margin: 0;
    line-height: 1.4;
}

/* ---------- Filtrage ---------- */

.hl-month-group.hl-hidden {
    display: none;
}

/* =========================
   NAVIGATION FLÈCHES (desktop)
========================= */

.hl-nav-btn {
    display: none; /* masqué par défaut, affiché sur desktop */
    position: absolute;
    top: 88px; /* aligné sur la pastille */
    transform: translateY(-50%);
    z-index: 20;
    background: #fff;
    border: 0.5px solid #ccc;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #444;
    transition: box-shadow 0.15s, color 0.15s;
    padding: 0;
}

.hl-nav-btn:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: #1a1a18;
}

.hl-nav-prev { left: -6px; }
.hl-nav-next { right: -6px; }

/* Indicateur de progression (dots) */
.hl-progress {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 12px;
}

.hl-progress-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d0c9;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.hl-progress-dot.active {
    background: #1a1a18;
    transform: scale(1.3);
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 700px) {
    .hl-nav-btn {
        display: flex;
    }

    .hl-month-group {
        min-width: 220px;
        max-width: 260px;
    }

    .hl-image-wrap img {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .hl-month-group {
        min-width: 75vw;
        max-width: 80vw;
        padding: 0 10px;
    }

    .hl-image-wrap img {
        height: 120px;
    }

    .hl-title {
        font-size: 12px;
    }

    .hl-section .l3-filter-btn {
        padding: 8px 11px;
        font-size: 12px;
        gap: 6px;
    }
}

/* =========================
   DARK MODE
========================= */

@media (prefers-color-scheme: dark) {

    .hl-spine { background-color: rgba(255, 255, 255, 0.12); }

    .hl-timeline-outer::after {
        background: linear-gradient(to left, var(--background-color, #111) 10%, transparent);
    }

    .hl-month-label {
        background: #1e1e1c;
        border-color: rgba(255, 255, 255, 0.18);
        color: #9a9890;
    }

    .hl-month-range-badge {
        background: #2a2a28;
        border-color: rgba(255, 255, 255, 0.15);
        color: #9a9890;
    }

    .hl-dot {
        background: #e2e0d8;
        border-color: #1e1e1c;
    }

    .hl-month-group:hover .hl-dot { background: #fff; }

    .hl-card {
        background: #1e1e1c;
        border-color: rgba(255, 255, 255, 0.08);
    }

    .hl-card:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

    .hl-meta  { color: #7a7870; }
    .hl-title { color: #e2e0d8; }

    .hl-nav-btn {
        background: #1e1e1c;
        border-color: rgba(255, 255, 255, 0.15);
        color: #e2e0d8;
    }

    .hl-progress-dot { background: rgba(255,255,255,0.2); }
    .hl-progress-dot.active { background: #e2e0d8; }

    /* Filtres */
    .hl-section .l3-filter-btn {
        border-color: rgba(255, 255, 255, 0.2);
        color: #9a9890;
    }
    .hl-section .l3-filter-btn:hover,
    .hl-section .l3-filter-btn.active {
        background: #3a3a38;
        border-color: rgba(255, 255, 255, 0.4);
        color: #e2e0d8;
    }
    .hl-section .l3-header {
        border-bottom-color: rgba(255, 255, 255, 0.15);
    }
    .hl-section .l3-dropdown-sep {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    .hl-section .l3-dropdown-panel {
        background: #1e1e1c;
        border-color: rgba(255,255,255,0.3);
        color: #e2e0d8;
    }
    .hl-section .l3-dropdown-option:hover {
        background: rgba(255,255,255,0.06);
    }
    .hl-section .l3-check {
        border-color: rgba(255,255,255,0.4);
    }
    .hl-section .l3-dropdown-option.selected .l3-check {
        background: #e2e0d8;
        border-color: #e2e0d8;
    }
    .hl-section .l3-dropdown-option.selected .l3-check-mark {
        border-color: #1a1a18;
    }

    /* badges type : dark */
    .hl-type-music      { background: #3b1f6e; color: #c4b5fd; }
    .hl-type-food       { background: #064e3b; color: #6ee7b7; }
    .hl-type-spectacle  { background: #1e2a5e; color: #93c5fd; }
    .hl-type-mode       { background: #4a2508; color: #fde68a; }
    .hl-type-cinema     { background: #5a1a1a; color: #fca5a5; }
}