/* ==========================================================
   JUMPLOC - Grille de navigation par totems
   Tuiles en cristal sombre, titres nus, panneau violet vers orange.
   Polices : Montserrat et Neucha, deja chargees par le theme du site.
   ========================================================== */

.jl-totems {
    margin: 0;
    --jl-or:      #ffd60a;
    --jl-magenta: #c2187f;
    --jl-site:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --jl-titre:   'Neucha', 'Comic Sans MS', cursive;
}

.jl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 14px;
    align-items: start;
}

@media (min-width: 782px) {
    .jl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; }
}

/* ---------- Chapeau ---------- */

.jl-chapeau {
    max-width: 560px;
    margin: 0 auto 22px;
    padding: 16px 20px 18px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 22px;
    background: rgba(22, 8, 34, .46);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .34) inset, 0 14px 30px rgba(14, 4, 24, .45);
    text-align: center;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .jl-chapeau {
        -webkit-backdrop-filter: blur(14px) saturate(1.5);
        backdrop-filter: blur(14px) saturate(1.5);
    }
}

.jl-chapeau b {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-family: var(--jl-titre);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.12;
    text-shadow: 0 2px 6px rgba(10, 2, 18, .6);
    text-wrap: balance;
}

.jl-chapeau span {
    display: block;
    color: rgba(255, 255, 255, .92);
    font-family: var(--jl-site);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(10, 2, 18, .6);
    text-wrap: balance;
}

.jl-chapeau .jl-chapeau__trait {
    display: block;
    width: 48px;
    height: 3px;
    margin: 11px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--jl-or), var(--jl-magenta));
}

.jl-chapeau .jl-clic { display: none; }

@media (hover: hover) {
    .jl-chapeau .jl-clic { display: block; }
    .jl-chapeau .jl-touche { display: none; }
}

@media (min-width: 782px) {
    .jl-chapeau b { font-size: 34px; }
    .jl-chapeau span { font-size: 15.5px; }
}

/* ---------- Pastille ---------- */

.jl-tile {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 24px;
    background: none;
    font: inherit;
    color: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .32s cubic-bezier(.2, .7, .3, 1);
}

.jl-tile:focus-visible { outline: 3px solid var(--jl-or); outline-offset: 5px; }

/* Cadre de cristal : repli opaque d'abord, flou ensuite si le navigateur sait. */
.jl-tile__cadre {
    position: relative;
    display: block;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 24px;
    background: rgba(22, 8, 34, .62);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 14px 30px rgba(14, 4, 24, .5);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .jl-tile__cadre {
        background: rgba(22, 8, 34, .42);
        -webkit-backdrop-filter: blur(14px) saturate(1.5);
        backdrop-filter: blur(14px) saturate(1.5);
    }
}

.jl-tile__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 15px;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.jl-tile__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.jl-tile__lustre {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: .4;
    background: linear-gradient(145deg, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .08) 34%, transparent 58%);
}

.jl-tile__absente {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    background: repeating-linear-gradient(45deg, #2b2b33, #2b2b33 10px, #35353f 10px, #35353f 20px);
    color: #fff;
    font-size: 11px;
    word-break: break-all;
}

/* ---------- Titre nu, sous la tuile ---------- */

.jl-tile__title {
    display: block;
    margin: 12px 4px 0;
    padding: 0;
    color: #fff;
    font-family: var(--jl-site);
    font-size: 15.5px;
    line-height: 1.24;
    font-weight: 700;
    letter-spacing: -.005em;
    text-shadow: 0 2px 6px rgba(18, 6, 28, .78), 0 0 2px rgba(18, 6, 28, .5);
    text-wrap: balance;
}

@media (min-width: 782px) {
    .jl-tile__title { font-size: 17px; }
}

.jl-tile__chevron { display: none; }

/* ---------- Badge des pastilles depliantes ---------- */

.jl-tile__compteur {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(12, 6, 18, .78);
    color: #fff;
    font-family: var(--jl-site);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    pointer-events: none;
}

.jl-tile__compteur::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .35s ease;
}

.jl-tile--parent[aria-expanded="true"] .jl-tile__compteur::after {
    transform: rotate(-135deg) translateY(-1px);
}

/* ---------- Pastille ouverte : halo dore ---------- */

.jl-tile--ouvert { position: relative; z-index: 2; transform: scale(1.04); }

.jl-tile--ouvert .jl-tile__cadre {
    border-color: rgba(255, 214, 10, .8);
    animation: jl-halo 2.1s ease-in-out infinite;
}

@keyframes jl-halo {
    0%, 100% { box-shadow: 0 0 0 4px var(--jl-or), 0 0 22px 6px rgba(255, 214, 10, .38), 0 14px 30px rgba(14, 4, 24, .5); }
    50%      { box-shadow: 0 0 0 4px var(--jl-or), 0 0 38px 14px rgba(255, 214, 10, .62), 0 14px 30px rgba(14, 4, 24, .5); }
}

/* ---------- Couches decoratives ---------- */

.jl-tile__shine,
.jl-tile__sparks { pointer-events: none; }

.jl-tile__shine {
    position: absolute;
    top: -20%;
    left: -60%;
    width: 45%;
    height: 140%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .78), transparent);
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
    mix-blend-mode: screen;
}

.jl-tile__sparks i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, .9);
    opacity: 0;
    transform: scale(0);
}

.jl-tile__sparks i:nth-child(1) { top: 14%; left: 78%; }
.jl-tile__sparks i:nth-child(2) { top: 72%; left: 13%; }
.jl-tile__sparks i:nth-child(3) { top: 34%; left: 30%; }

/* ---------- Animations, niveau C ---------- */

[data-anim="C"] .jl-tile,
[data-anim="B"] .jl-tile {
    opacity: 0;
    transform: translateY(22px) scale(.94);
}

[data-anim="C"] .jl-tile.is-in,
[data-anim="B"] .jl-tile.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .55s ease var(--jl-delai, 0s), transform .6s cubic-bezier(.2, .8, .25, 1) var(--jl-delai, 0s);
}

/* Eclat d'accueil des l'entree a l'ecran. */
[data-anim="C"] .jl-tile.is-vue .jl-tile__shine {
    animation: jl-sweep-fast 1s ease-out var(--jl-delai, 0s) 1;
}

/* Puis boucle calme, assez lente pour ne pas faire clignoter la page. */
[data-anim="C"] .jl-tile.is-live .jl-tile__media::after {
    content: "";
    position: absolute;
    inset: -25%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .3), transparent 62%);
    mix-blend-mode: screen;
    animation: jl-pulse 6s ease-in-out infinite;
    animation-delay: var(--jl-delai, 0s);
}

[data-anim="C"] .jl-tile.is-live .jl-tile__shine {
    animation: jl-sweep 9.5s ease-in-out infinite;
    animation-delay: calc(var(--jl-rang, 1) * .35s);
}

[data-anim="C"] .jl-tile.is-live .jl-tile__sparks i {
    animation: jl-twinkle 4.6s ease-in-out infinite;
}

[data-anim="C"] .jl-tile.is-live .jl-tile__sparks i:nth-child(2) { animation-delay: 1.5s; }
[data-anim="C"] .jl-tile.is-live .jl-tile__sparks i:nth-child(3) { animation-delay: 3s; }

@keyframes jl-pulse {
    0%, 100% { opacity: .25; }
    50%      { opacity: .7; }
}

@keyframes jl-sweep {
    0%, 62%  { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
    68%      { opacity: .95; }
    88%      { transform: translateX(320%) skewX(-18deg); opacity: 0; }
    100%     { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}

@keyframes jl-twinkle {
    0%, 100%  { opacity: 0; transform: scale(0); }
    45%       { opacity: 1; transform: scale(1); }
    70%       { opacity: 0; transform: scale(.3); }
}

@keyframes jl-sweep-fast {
    0%   { transform: translateX(-120%) skewX(-18deg); opacity: 0; }
    15%  { opacity: 1; }
    100% { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}

/* ---------- Survol et appui ---------- */

@media (hover: hover) {
    .jl-tile:hover { transform: translateY(-7px); }
    [data-anim="C"] .jl-tile:hover .jl-tile__shine { animation: jl-sweep-fast .75s ease-out 1; }
}

.jl-tile:active { transform: scale(.97); }
.jl-tile.is-touche .jl-tile__shine { animation: jl-sweep-fast .7s ease-out 1; }

.jl-confetti {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    animation: jl-confetti .62s cubic-bezier(.15, .7, .3, 1) 1;
}

@keyframes jl-confetti {
    0%   { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--jl-x)), calc(-50% + var(--jl-y))) scale(1) rotate(var(--jl-r)); }
}

/* ---------- Panneau deroulant ---------- */

.jl-panels { display: none; }

.jl-panel {
    grid-column: 1 / -1;
    overflow: hidden;
    height: 0;
    transition: height .5s cubic-bezier(.2, .8, .25, 1);
}

.jl-panel[hidden] { display: none; }

.jl-panel__inner {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 14px;
    padding: 14px 12px 18px;
    margin-top: 16px;
    border-radius: 22px;
    background: linear-gradient(170deg, #6d28d9 0%, #a21caf 40%, #d9348a 72%, #ff8a1f 100%);
    box-shadow: 0 0 0 3px rgba(255, 214, 10, .85),
                0 0 34px 8px rgba(255, 214, 10, .26),
                0 12px 30px rgba(30, 8, 48, .42);
}

@media (min-width: 782px) {
    .jl-panel__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; padding: 18px 18px 22px; }
}

/* Fleche pointant la pastille d'origine, positionnee par le script. */
.jl-panel__inner::before {
    content: "";
    position: absolute;
    top: -8px;
    left: var(--jl-fleche, 50%);
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 3px 0 0 0;
    background: #6d28d9;
    box-shadow: -2px -2px 0 0 var(--jl-or);
    transform: rotate(45deg);
}

.jl-panel__retour {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 4px;
    padding: 8px 6px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    background: none;
    color: #fff;
    font: 700 13px var(--jl-site);
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}

.jl-panel__fleche {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-left: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(45deg);
}

.jl-panel__nom { flex: 1 1 auto; min-width: 0; }

.jl-panel__nombre {
    flex: 0 0 auto;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #fff;
    font-size: 11.5px;
    letter-spacing: 0;
    text-transform: none;
}

/* Les sous-pastilles sont posees sur un fond colore : cadre plus contraste. */
.jl-panel .jl-tile__cadre {
    background: rgba(16, 5, 26, .34);
    border-color: rgba(255, 255, 255, .45);
}

/* ---------- Espace avant le bloc editorial des categories ---------- */

.jl-apres-produits { clear: both; height: 34px; }

/* ---------- Respect des preferences systeme ---------- */

@media (prefers-reduced-motion: reduce) {
    .jl-totems *,
    .jl-totems *::after,
    .jl-totems *::before {
        animation: none !important;
        transition: none !important;
    }
    .jl-totems .jl-tile { opacity: 1 !important; transform: none !important; }
    .jl-tile--ouvert .jl-tile__cadre {
        box-shadow: 0 0 0 4px var(--jl-or), 0 14px 30px rgba(14, 4, 24, .5);
    }
}

[data-anim="A"] .jl-tile { opacity: 1; transform: none; }
[data-anim="A"] .jl-tile__shine,
[data-anim="A"] .jl-tile__sparks { display: none; }

/* ==========================================================
   Barre d'univers en haut des pages categories
   Les couleurs de texte heritent du theme : on ne sait pas si le fond de
   la page categorie est clair ou sombre, et une couleur forcee prendrait
   le risque d'etre illisible. L'etat courant est porte par l'or, qui se
   voit sur les deux.
   ========================================================== */

.jl-barre {
    margin: 0 0 18px;
    --jl-or: #ffd60a;
    --jl-site: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

.jl-barre__piste {
    display: flex;
    gap: 16px;
    padding: 8px 2px 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.jl-barre__piste::-webkit-scrollbar { display: none; }

.jl-barre__item {
    flex: 0 0 auto;
    width: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
}

.jl-barre__rond {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(128, 110, 150, .4);
    background: rgba(128, 110, 150, .12);
    box-shadow: 0 4px 10px rgba(20, 6, 32, .2);
    transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease;
}

.jl-barre__rond img { display: block; width: 100%; height: 100%; object-fit: cover; }

.jl-barre__nom {
    font-family: var(--jl-site);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

@media (hover: hover) {
    .jl-barre__item:hover .jl-barre__rond { transform: translateY(-3px) scale(1.06); }
}

.jl-barre__item--courant { cursor: default; }

.jl-barre__item--courant .jl-barre__rond {
    border-color: var(--jl-or);
    box-shadow: 0 0 0 3px rgba(255, 214, 10, .85), 0 4px 12px rgba(20, 6, 32, .28);
}

.jl-barre__item--courant .jl-barre__nom {
    position: relative;
    padding-bottom: 5px;
}

.jl-barre__item--courant .jl-barre__nom::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 22px;
    height: 3px;
    margin-left: -11px;
    border-radius: 3px;
    background: var(--jl-or);
}

/* ==========================================================
   Grille de rebond, apres la liste des produits
   Les tuiles de cristal et les titres blancs ont besoin d'un fond sombre :
   le bloc porte donc le sien, quel que soit le theme de la page.
   ========================================================== */

.jl-totems--rebond {
    margin: 10px 0 28px;
    padding: 22px 14px 26px;
    border-radius: 26px;
    background: linear-gradient(165deg, #5b21b6 0%, #9b3ac4 55%, #c0569b 100%);
    box-shadow: 0 14px 34px rgba(30, 8, 48, .3);
}

@media (min-width: 782px) {
    .jl-totems--rebond { padding: 26px 24px 30px; }
}

/* ---------- Tiroir de la barre ---------- */

.jl-barre__item--parent {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.jl-barre__rond { position: relative; }

.jl-barre__chevron {
    position: absolute;
    right: -1px;
    bottom: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #c2187f;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}

.jl-barre__chevron::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -2px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    transition: transform .3s ease;
}

.jl-barre__item--parent[aria-expanded="true"] .jl-barre__chevron::before {
    margin-top: 1px;
    transform: rotate(-135deg);
}

.jl-barre__tiroir {
    overflow: hidden;
    height: 0;
    margin-top: 2px;
    transition: height .4s cubic-bezier(.2, .8, .25, 1);
}

.jl-barre__tiroir[hidden] { display: none; }

.jl-barre__tiroir .jl-barre__piste {
    margin-top: 6px;
    padding: 10px 8px 8px;
    border-radius: 18px;
    background: linear-gradient(170deg, rgba(109, 40, 217, .14), rgba(194, 24, 127, .12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}

.jl-barre__tiroir .jl-barre__rond { width: 50px; height: 50px; }
.jl-barre__tiroir .jl-barre__item { width: 68px; }
.jl-barre__tiroir .jl-barre__nom { font-size: 11px; }
