@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700&family=Raleway:wght@400;700&display=swap');

/* seeyoo-update-test 2026-07-16T01:09 — marqueur test détection MAJ (retirer après test) */

/* Transitions 3000ms sur anneau visibilité + saturation (interpolation navigateurs récents) */
@property --scan-visibility-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}
@property --scan-visibility-color {
    syntax: '<color>';
    inherits: false;
    initial-value: #7c3aed;
}
@property --scan-visibility-track {
    syntax: '<color>';
    inherits: false;
    initial-value: rgba(124, 58, 237, 0.18);
}
@property --scanner-visibility-saturation {
    syntax: '<number>';
    inherits: false;
    initial-value: 1;
}

/*
 * Réduit au maximum l’appui long « système » (menu image/lien, sélection, glisser) et la vibration haptique
 * associée sur Android / iOS. Les champs de saisie rétablissent sélection + callout en dessous.
 */
html {
    -webkit-touch-callout: none;
    touch-action: manipulation;
    height: 100%;
    height: 100dvh;
}

:root {
    --sy-safe-top: 0px;
    --sy-safe-bottom: 0px;
    --sy-safe-left: 0px;
    --sy-safe-right: 0px;
}

/* Safe areas — iOS PWA : padding body + variables (--sy-safe-* via pwaSafeAreaBootstrap.js).
   Android PWA : env() sur éléments bas uniquement. Navigateur : env() léger sur header iOS. */
html.platform-ios.display-standalone body {
    box-sizing: border-box;
    padding-top: var(--sy-safe-top);
    padding-bottom: var(--sy-safe-bottom);
}

html.platform-ios.display-standalone #app-container > header.glass-liquid-pro {
    padding-top: 1rem;
}

html.platform-ios.display-standalone #bottom-navbar {
    bottom: calc(1.5rem + var(--sy-safe-bottom)) !important;
}

html.platform-ios.display-standalone #distinctive-signs-btn-container {
    bottom: calc(110px + var(--sy-safe-bottom)) !important;
}

html.platform-android.display-standalone #bottom-navbar {
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

html.platform-android.display-standalone #distinctive-signs-btn-container {
    bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
}

@supports (padding: env(safe-area-inset-top)) {
    body {
        min-height: 100%;
        min-height: 100dvh;
    }

    html.platform-ios:not(.display-standalone) #app-container > header.glass-liquid-pro {
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    html.platform-android:not(.display-standalone) #app-container > header.glass-liquid-pro {
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    #app-loading-screen {
        padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
            env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    }

    html.platform-ios.display-standalone #app-loading-screen {
        padding-top: var(--sy-safe-top);
        padding-bottom: var(--sy-safe-bottom);
    }

    #auth-container {
        padding-top: max(1.5rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    }

    html.platform-ios.display-standalone #auth-container {
        padding-top: max(1.5rem, var(--sy-safe-top));
        padding-bottom: max(1.5rem, var(--sy-safe-bottom));
    }

    #temp-message-container {
        top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    html.platform-ios.display-standalone #temp-message-container {
        top: calc(1rem + var(--sy-safe-top));
    }



    html.platform-ios.display-standalone .scanner-ad-drawer-close-btn {
        top: calc(0.75rem + var(--sy-safe-top));
    }

    html.platform-ios.display-standalone .scanner-ad-premium-promo__inner,
    html.platform-ios.display-standalone .scanner-ad-history-filters__inner {
        padding-top: calc(3.25rem + var(--sy-safe-top));
    }

    html.platform-ios.display-standalone .scanner-proximity-sim-bar {
        bottom: calc(90px + var(--sy-safe-bottom));
    }
}

*,
*::before,
*::after {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', sans-serif;
}

img,
picture,
svg {
    -webkit-user-drag: none;
}

/* Saisie : sélection / coller — menu contextuel utile */
input:not([type="hidden"]),
textarea,
select,
[contenteditable]:not([contenteditable="false"]) {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Mécanique avant: `.font-raleway` utilisait Raleway regular (400). */
.font-raleway {
    font-family: 'Raleway', sans-serif;
    font-weight: 700; /* FORCE: bold pour les titres décoratifs */
}

/* Conteneur pilule des titres de section : entrée depuis la gauche, décalage via --sy-title-stagger (0, 1, 2…) */
.sy-section-title-wrap {
    --sy-title-stagger: 0;
}

@keyframes sy-section-title-slide-in {
    from {
        opacity: 0;
        transform: translateX(-2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-section.sy-page--titles-enter .sy-section-title-wrap {
    animation: sy-section-title-slide-in 300ms ease-out both;
    animation-delay: calc(var(--sy-title-stagger) * 80ms);
}

/* Pilule dans une section masquée (.hidden) : pas d’anim (évite un slide invisible avant révélation) */
.page-section.sy-page--titles-enter .sy-section-title-wrap.sy-section-title-wrap--no-anim {
    animation: none !important;
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .page-section.sy-page--titles-enter .sy-section-title-wrap {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* SEEYOU Branding Component */
.seeyou-brand {
    display: inline-flex;
    align-items: center;
}
.seeyou-brand .seeyou-text {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.125rem; /* 18px */
    letter-spacing: 0.02em;
}
.seeyou-logo-img {
    height: 1.125rem; /* 18px */
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Variant for auth page (large) */
.seeyou-brand--auth .seeyou-text {
    font-size: 3rem;
    line-height: 1;
}
.seeyou-brand--auth .seeyou-logo-img {
    height: 3rem;
}

/* SEEYOO combined logo - auth variant */
.seeyoo-logo-img.auth-logo {
    height: 3.5rem; /* larger for auth */
    width: auto;
    display: block;
}

.force-white {
    filter: grayscale(1) brightness(10);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Écran de chargement (#app-loading-screen) — fond aurora : modules/loadingScreenBackground.css (link synchrone index.php) */

#app-loading-screen {
    box-sizing: border-box;
    z-index: 99999;
}

#app-loading-screen .app-loading-screen__stack {
    position: absolute;
    left: 50%;
    top: calc(50% + var(--loader-logo-half-h, 3.5rem) + var(--loader-logo-phrase-gap, 1.15rem));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: min(94vw, 680px);
    max-width: 100%;
    margin: 0;
    text-align: center;
    overflow: visible;
    z-index: 1;
}

#app-loading-screen .app-loading-screen__boot-logo-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#app-loading-screen .app-loading-screen__boot-logo-spin {
    display: block;
    line-height: 0;
}

#app-loading-screen .app-loading-screen__boot-logo {
    display: block;
    width: min(36vw, 112px);
    height: auto;
    max-width: 160px;
    filter: brightness(0) invert(1);
}

#app-loading-screen .app-loading-screen__boot-logo-wrap--hidden {
    opacity: 0;
    visibility: hidden;
}

#app-loading-screen .app-loading-screen__update-detected {
    display: none;
    margin: 0.85rem 0 0;
    padding: 0 1rem;
    max-width: min(90vw, 20rem);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    letter-spacing: 0.01em;
}

#app-loading-screen .app-loading-screen__update-detected.is-visible {
    display: block;
}

#app-loading-screen .app-loading-screen__phrases {
    --loader-phrase-active-h: 2.35rem;
    --loader-phrase-gap: 0.55rem;
    --loader-phrase-active-fs: 17px;
    --loader-phrase-final-fs: 20px;
    --loader-phrase-history-fs: 15px;
    --loader-phrase-motion-ms: 220ms;
    --loader-phrase-shift-ms: 180ms;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: min(90vw, 24rem);
    min-height: var(--loader-phrase-active-h);
    margin: 0 auto;
    padding: 0 16px;
    overflow: visible;
}

.loading-phrases-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: var(--loader-phrase-gap);
    width: 100%;
    box-sizing: border-box;
}

/* Phrase la plus récente = première ligne de la liste (insérée en tête). */
.loading-phrases-list > .loading-phrase-row:first-child,
.loading-phrases-list > .loading-phrase-row:first-child .loading-phrase-row__text {
    font-weight: 700;
}

.loading-phrase-row--active {
    min-height: var(--loader-phrase-active-h);
    font-size: var(--loader-phrase-active-fs);
    font-weight: 700;
    opacity: 1;
}

.loading-phrase-row--active.loading-phrase-row--final {
    font-size: var(--loader-phrase-final-fs);
    font-weight: 700;
}

.loading-phrase-row--done-recent,
.loading-phrase-row--done-older {
    font-size: var(--loader-phrase-history-fs);
    font-weight: 500;
}

.loading-phrase-row.loading-phrase-row--shift {
    will-change: transform;
}

.loading-phrase-row--active.loading-phrase-row--enter {
    animation: loaderPhraseActiveBounceIn var(--loader-phrase-motion-ms) cubic-bezier(0.34, 1.45, 0.55, 1) both;
    will-change: transform, opacity;
}

.loading-phrase-row--done-recent.loading-phrase-row--enter,
.loading-phrase-row--done-older.loading-phrase-row--enter {
    animation: none !important;
}

@keyframes loaderPhraseActiveBounceIn {
    0% {
        opacity: 0;
        transform: translateY(-0.65rem) scale(0.82);
    }
    55% {
        opacity: 1;
        transform: translateY(0.06rem) scale(1.08);
    }
    78% {
        transform: translateY(0) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.loading-phrase-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-family: 'Raleway', sans-serif;
    font-size: var(--loader-phrase-history-fs);
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
    transition: opacity 0.45s ease, font-size var(--loader-phrase-motion-ms) cubic-bezier(0.22, 1, 0.36, 1), font-weight var(--loader-phrase-motion-ms) ease;
}

.loading-phrase-row__inner {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.loading-phrase-row--done-recent {
    opacity: 0.8;
}

.loading-phrase-row--done-older {
    opacity: 0.6;
}

.loading-phrase-row__text {
    text-align: center;
}

.loading-phrase-row__check {
    position: absolute;
    left: 100%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: 0.55rem;
    color: #4ade80;
    opacity: 0;
    transform: translateY(-50%) scale(0.5);
    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-phrase-row--validated .loading-phrase-row__check {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.loading-phrase-row--no-motion,
.loading-phrase-row--no-motion .loading-phrase-row__check {
    transition: none;
    animation: none !important;
}

#app-loading-screen .app-loading-screen__update-title-placeholder {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#loading-progress {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#loading-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed 0%, #3b82f6 100%);
    transition: width 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    #loading-progress-fill {
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-phrase-row,
    .loading-phrase-row__check {
        transition: none;
    }
    .loading-phrase-row--active.loading-phrase-row--enter {
        animation: none !important;
    }
}

/* Animations */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Discover : entrée du bouton scanner à chaque affichage de la page (200 ms, départ scale 0 puis rebond) */
@keyframes scanner-discover-entrance-bounce {
    0% {
        transform: scale(0);
    }
    55% {
        transform: scale(1.09);
    }
    100% {
        transform: scale(1);
    }
}

#scanner-button.scanner-discover-entrance {
    transform-origin: center center;
    animation: scanner-discover-entrance-bounce 200ms cubic-bezier(0.34, 1.45, 0.55, 1) forwards !important;
}

/* Entrée Discover pilotée par WAAPI (`playDiscoverScannerButtonEntranceThenGreeting`) : couper l’idle sur le bouton */
#scanner-button.scanner-discover-entrance-waapi {
    animation: none !important;
}

/* Lieu / ville : masqués jusqu’à fin entrée Discover (bouton + anneaux) ou fin animation de scan (app.js), sauf si en cours de chargement (shimmer). */
#location-banner.scanner-location-banner--hold-reveal #location-name-display:not(.location-banner-shimmer),
#location-banner.scanner-location-banner--hold-reveal #location-city-display:not(.location-banner-shimmer),
#discrete-location-overlay.scanner-location-banner--hold-reveal #location-name-display:not(.location-banner-shimmer),
#discrete-location-overlay.scanner-location-banner--hold-reveal #location-city-display:not(.location-banner-shimmer) {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Mode discret : masquage temporaire POI / ville (modules/discreteModePrivacy.js) */
#discrete-location-overlay.discrete-location-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#location-name-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Discover : salutation masquée jusqu’à la révélation (évite tout flash du dégradé / texte HTML) */
#scanner-greeting.scanner-greeting-pending-reveal {
    opacity: 0 !important;
    visibility: hidden !important;
    min-height: 2.5rem;
    pointer-events: none;
}

/* Entrée : apparition floue puis bleu vif, puis couleur finale (dégradé scan ou gris subline). Durée alignée sur GREETING_GHOST_LETTER_ANIM_MS (scannerGreetingSublineHint.js). */
@keyframes scanner-greeting-letter-ghost-subline {
    0% {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(0.12em);
        color: #2563eb;
        -webkit-text-fill-color: #2563eb;
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
    }
    38% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
        color: #2563eb;
        -webkit-text-fill-color: #2563eb;
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
        color: inherit;
        -webkit-text-fill-color: currentColor;
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
    }
}

@keyframes scanner-greeting-letter-ghost-scan {
    0% {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(0.12em);
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        -webkit-text-fill-color: #2563eb;
        color: #2563eb;
    }
    38% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        -webkit-text-fill-color: #2563eb;
        color: #2563eb;
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
        background: linear-gradient(135deg, #7c3aed 45%, #3b82f6 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        background-size: 200% 200%;
        color: transparent;
    }
}

@keyframes scanner-greeting-letter-ghost-exit {
    from {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
    to {
        opacity: 0;
        filter: blur(12px);
        transform: translateY(0.12em);
    }
}

/* Même axe gauche et même logique de ligne pour greeting + subline (tailles de police différentes). */
#greeting-wrapper #scanner-greeting,
#greeting-wrapper #scanner-greeting-place-subline {
    margin-inline: 0;
    text-align: start;
    text-indent: 0;
}

/* Layout Discover : contenu centré verticalement (avec ou sans subline lieu) */
#scanner-discover-content-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    min-height: 0;
}

#scanner-discover-centered-slot {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 0;
}

#scanner-greeting-place-subline.scanner-greeting-place-subline-diag {
    opacity: 1;
    font-size: 0.7rem;
    line-height: 1.35;
    color: #b45309;
    font-style: italic;
    white-space: normal;
    word-break: break-word;
}

#scanner-greeting .scanner-greeting-letter,
#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter {
    display: inline-block;
    vertical-align: top;
    opacity: 0;
    will-change: opacity, filter, color;
}

#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter {
    animation: scanner-greeting-letter-ghost-subline 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#scanner-greeting.text-gradient-scan .scanner-greeting-letter {
    animation: scanner-greeting-letter-ghost-scan 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#scanner-greeting:not(.text-gradient-scan) .scanner-greeting-letter {
    animation: scanner-greeting-letter-ghost-subline 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#scanner-greeting .scanner-greeting-letter--space,
#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter--space {
    width: 0.28em;
}

/* Sous-ligne lieu : pas de retour à la ligne au milieu d’un mot (lettres en inline-block) */
#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-word {
    white-space: nowrap;
    display: inline-block;
    vertical-align: top;
}

/* Sous-ligne lieu (pas de dégradé : texte gris hérité). Pas de !important ici : il empêchait les keyframes d’entrée (phase bleue). */
#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: inherit;
    background-clip: border-box;
    -webkit-background-clip: border-box;
}

/* Dégradé sur les lettres du greeting : @keyframes scanner-greeting-letter-ghost-scan (100 %) + forwards (une règle statique ici écrasait la phase bleue). */

/* `both` : pendant `animation-delay` (stagger), conserver l’état « from » (opaque) — sinon la règle de base
   `opacity: 0` sur `.scanner-greeting-letter` réapparaît et masque tout le texte sauf les lettres déjà en cours d’anim. */
#scanner-greeting .scanner-greeting-letter.scanner-greeting-letter--ghost-exiting,
#scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter.scanner-greeting-letter--ghost-exiting {
    animation: scanner-greeting-letter-ghost-exit 347ms cubic-bezier(0.36, 0, 0.78, 1) both;
    will-change: opacity, filter;
}

#scanner-greeting.text-gradient-scan .scanner-greeting-letter.scanner-greeting-letter--ghost-exiting {
    background: linear-gradient(135deg, #7c3aed 45%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

@media (prefers-reduced-motion: reduce) {
    #scanner-greeting .scanner-greeting-letter,
    #scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter {
        animation: none;
        opacity: 1;
        filter: none;
        transform: none;
    }

    #scanner-greeting .scanner-greeting-letter.scanner-greeting-letter--ghost-exiting,
    #scanner-greeting-place-subline.scanner-ghost-text-host .scanner-greeting-letter.scanner-greeting-letter--ghost-exiting {
        animation: none;
        opacity: 0;
    }
}

/* Meeting cards (historique + Seeyoo likes) : entrée scale rebond staggerée */
@keyframes meetingCardScaleBounce {
    0% {
        transform: scale(0);
    }
    60% {
        transform: scale(1.08);
    }
    80% {
        transform: scale(0.96);
    }
    100% {
        transform: scale(1);
    }
}

.meeting-card-entrance {
    animation: meetingCardScaleBounce 300ms cubic-bezier(0.34, 1.45, 0.55, 1) both;
}

/* Modale Passions — rebond au clic sur une chip (amplitudes modérées pour éviter clip / scroll parasite) */
@keyframes passion-chip-bounce-scale {
    0% { transform: scale(1); }
    30% { transform: scale(1.07); }
    55% { transform: scale(0.96); }
    80% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.passion-chip-btn {
    transform-origin: center center;
}

.passion-chip-btn.passion-chip-bounce {
    animation: passion-chip-bounce-scale 0.38s cubic-bezier(0.34, 1.45, 0.64, 1);
}

/* Zone scroll des chips : padding pour l’overflow visuel du scale ; pas de scroll horizontal */
.passions-chips-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.625rem 0.5rem;
}

#passions-chips-container {
    overflow: visible;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

@keyframes buttonPush {
    0% { transform: scale(1); }
    50% { transform: scale(0.88); }
    100% { transform: scale(1); }
}

@keyframes buttonGlow {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

@keyframes buttonGlowBlue {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.8); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes buttonGlowRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes bubbleBounce {
    0% { 
        transform: scale(0);
        opacity: 1;
        transform-origin: top right;
    }
    50% { 
        transform: scale(1.08);
        transform-origin: top right;
    }
    70% { 
        transform: scale(0.99);
        transform-origin: top right;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        transform-origin: top right;
    }
}

.cassiopee-bubble {
    width: 340px;
    max-width: calc(100vw - 32px);
    transform-origin: top right;
    animation: bubbleBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
    transition: opacity 0.3s ease-out;
    right: 16px !important;
}

.cassiopee-bubble.hidden {
    opacity: 0;
    pointer-events: none;
}

.cassiopee-bubble > div {
    background: linear-gradient(135deg, #3b82f6 0%, #6d28d9 100%);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#cassiopee-toast {
    left: 16px !important;
    right: 16px !important;
    max-width: none !important;
}

#cassiopee-toast > div {
    margin-left: auto;
    margin-right: auto;
}

.cassiopee-bubble h2,
.cassiopee-bubble p {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
}

.cassiopee-bubble.animate-in {
    animation: bubbleBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

.pop-in {
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

.action-btn {
    transition: color 0.3s ease-out, background-color 0.3s ease-out;
}

.action-btn:active,
.action-btn:focus,
.action-btn:focus-visible {
    color: rgb(107, 114, 128) !important;
    outline: none !important;
}

.action-btn[data-action="dislike"]:active,
.action-btn[data-action="dislike"]:focus {
    color: rgb(107, 114, 128) !important;
}

.action-btn[data-action="like"]:active,
.action-btn[data-action="like"]:focus {
    color: rgb(107, 114, 128) !important;
}

.button-click {
    animation: buttonPush 0.3s ease-out !important;
}

.button-glow-like {
    animation: buttonGlowBlue 0.6s ease-out !important;
}

.button-glow-dislike {
    animation: buttonGlowRed 0.6s ease-out !important;
}

.button-bg-like {
    background-color: rgb(59, 130, 246) !important;
    transition: background-color 0.3s ease-out !important;
}

.button-bg-dislike {
    background-color: rgb(239, 68, 68) !important;
    transition: background-color 0.3s ease-out !important;
}

.button-text-white i,
.button-text-white {
    color: rgb(255, 255, 255) !important;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    position: relative;
    word-wrap: break-word;
}

.chat-bubble.sent {
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    color: white;
    border-bottom-right-radius: 0.25rem;
    margin-left: auto;
}

.chat-bubble.received {
    background-color: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
    margin-right: auto;
}

/* Card Stack Styles */
.profile-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    background-color: white;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: grab;
}

.profile-card:active {
    cursor: grabbing;
}

.profile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card .info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    padding: 2rem 1.5rem 1.5rem;
    color: white;
}

/* Map Styles */
.leaflet-container {
    background: #f8fafc;
}

/* GPS overlay while waiting for precise position */
.leaflet-container.blurred {
    filter: blur(6px) brightness(0.88);
    transition: filter 0.25s ease;
}

/* Allow blurring the map but not the title overlay above it */
#meetings-heatmap-div.blurred {
    filter: blur(6px) brightness(0.88);
    transition: filter 0.6s ease;
}

.map-gps-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(255,255,255,0.35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    pointer-events: none; /* keep overlay non-blocking for map gestures; spinner itself handles pointer-events */
    opacity: 1;
    visibility: visible;
    /* Use 2s for opacity transitions so both show and hide are smooth (hide duration requirement) */
    transition: opacity 2s ease;
}

/* When hidden, fade opacity to 0; JS will set visibility:hidden after the fade completes. */
.map-gps-overlay.overlay-hidden {
    opacity: 0;
    pointer-events: none;
}

.gps-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
    background: transparent; /* no white background per request */
    border-radius: 12px;
    padding: 0.2rem 0.2rem; /* smaller padding so logo feels integrated */
    box-shadow: none;
}

/* Logo spinner */
.gps-spinner-logo {
    width: 56px; /* increased size */
    height: 56px;
    display: block;
    animation: gps-spin 1s linear infinite;
}

/* legacy spinner removed; replaced by logo */
/* .gps-spinner-icon removed */

.gps-spinner-text {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 600;
    margin-top: 4px;
}

/* Icon-only mode for overlay (hide text) */
.gps-spinner.icon-only {
    padding: 0.2rem;
}
.gps-spinner.icon-only .gps-spinner-text { display: none; }

@keyframes gps-spin {
    to { transform: rotate(360deg); }
}

/* Masquage heatmap pendant zoom : canvas Leaflet.heat uniquement (pas removeLayer) */
#meetings-heatmap-div.map-heatmap-canvas-hidden canvas.leaflet-heatmap-layer {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* MapLibre eau Positron : ne jamais intercepter pinch/zoom Leaflet */
.leaflet-pane.leaflet-positronWaterPane,
.leaflet-pane.leaflet-positronWaterPane * {
    pointer-events: none !important;
}

/* Spinner : au-dessus de Leaflet (~700), sous les boutons carte (z-1001) ; flou uniquement sur #meetings-heatmap-div */
.map-heatmap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
}
.map-heatmap-overlay:not(.overlay-hidden) {
    animation: map-overlay-fade-in var(--map-loader-in-ms, 720ms) cubic-bezier(0.34, 1.45, 0.55, 1) both;
}
.map-heatmap-overlay.map-heatmap-overlay--exit {
    animation: map-overlay-fade-out var(--map-loader-out-ms, 600ms) cubic-bezier(0.34, 1.45, 0.55, 1) forwards;
}
@keyframes map-overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes map-overlay-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}
.map-heatmap-overlay.overlay-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: none;
}

.heatmap-spinner {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
    opacity: 1;
    filter: none;
    isolation: isolate;
}
.heatmap-spinner.map-loader-bounce-in {
    animation: map-loader-bounce-in 720ms cubic-bezier(0.34, 1.45, 0.55, 1) both;
}
/* Pendant le bounce-out du logo, l'overlay reste opaque (géré en JS via animation:none) */
.heatmap-spinner.map-loader-bounce-out {
    animation: map-loader-bounce-out 600ms cubic-bezier(0.34, 1.45, 0.55, 1) forwards;
    will-change: transform, opacity;
}
@keyframes map-loader-bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    58% {
        transform: scale(1.14);
        opacity: 1;
    }
    78% {
        transform: scale(0.94);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
@keyframes map-loader-bounce-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    28% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}
.heatmap-spinner-logo {
    width: 88px;
    height: 88px;
    display: block;
    animation: gps-spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .heatmap-spinner.map-loader-bounce-in,
    .heatmap-spinner.map-loader-bounce-out {
        animation: none !important;
    }
}

/* Keep the old pill rule as fallback (unused) */
.map-heatmap-loader { display: none; }

/* Pendant l’appui scanner : évite que le scroll de la page vole le geste (iOS / Chrome Android) */
#page-discover.scanner-scroll-lock,
#main-content.scanner-scroll-lock {
    touch-action: none;
    overscroll-behavior: none;
}

/* Onglet Scanner : le fond blanc plein de #main-content masquait la carte en fond — fond plus léger */
#main-content:has(#page-discover:not(.hidden)) {
    background-color: rgba(255, 255, 255, 0.42);
}

/* Fond carte Leaflet derrière le scanner (Découvrir) : léger flou sur les tuiles */
.scanner-panel-bg-map {
    filter: blur(2px);
}

/* Hors page Discover : masquer sans visibility:hidden (évite effets de bord transitions / hit-testing selon navigateurs). */
body.discover-off #scanner-button,
body.discover-off #scanner-container,
body.discover-off #scanner-proximity-rings,
body.discover-off #scanner-hint,
body.discover-off #scanner-presence-instant,
body.discover-off .scanner-mood-flyaway,
/* Même logique que le bouton : pas de texte Discover (salutation / légendes) tant que le scanner n’est pas révélé */
body.discover-off #greeting-wrapper,
body.discover-off #last-scan-info,
body.discover-off #scanner-proximity-count,
body.discover-off #scanner-auto-scan-hint,
body.discover-off #meeting-feedback,
body.discover-off #location-banner,
body.discover-off #location-name-display,
body.discover-off #location-city-display {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Sortie Discover : un frame sans transition / animation sur le chrome masqué par discover-off. */
body.discover-off.discover-exit-chrome-instant #scanner-button,
body.discover-off.discover-exit-chrome-instant #scanner-container,
body.discover-off.discover-exit-chrome-instant #scanner-proximity-rings,
body.discover-off.discover-exit-chrome-instant #scanner-hint,
body.discover-off.discover-exit-chrome-instant #scanner-presence-instant,
body.discover-off.discover-exit-chrome-instant .scanner-mood-flyaway,
body.discover-off.discover-exit-chrome-instant #greeting-wrapper,
body.discover-off.discover-exit-chrome-instant #last-scan-info,
body.discover-off.discover-exit-chrome-instant #scanner-proximity-count,
body.discover-off.discover-exit-chrome-instant #scanner-auto-scan-hint,
body.discover-off.discover-exit-chrome-instant #meeting-feedback,
body.discover-off.discover-exit-chrome-instant #location-banner,
body.discover-off.discover-exit-chrome-instant #location-name-display,
body.discover-off.discover-exit-chrome-instant #location-city-display {
    transition: none !important;
    animation: none !important;
}

/* Entrée Discover : le bouton / anneaux sont visibles ; salutation + bandeau lieu + hint + feedback masqués jusqu’à la révélation de la salutation (app.js retire la classe). */
body.discover-entrance-before-greeting #greeting-wrapper,
body.discover-entrance-before-greeting #location-banner,
body.discover-entrance-before-greeting #location-name-display,
body.discover-entrance-before-greeting #location-city-display,
body.discover-entrance-before-greeting #scanner-hint,
body.discover-entrance-before-greeting #meeting-feedback {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Colonne Discover (hint + présence + bouton) : léger fondu au greeting / subline / présence (pas de translate). */
@keyframes scanner-discover-main-col-descend {
    from {
        opacity: 0.9;
    }
    to {
        opacity: 1;
    }
}

#scanner-discover-main-col.scanner-discover-main-col--descend {
    animation: scanner-discover-main-col-descend 373ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bounce-subtle {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

.animate-bounce-subtle {
    animation: bounce-subtle 2s infinite;
    color: rgb(107, 114, 128);
}

/* Scanner Button Styles */
#scanner-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Halos proximité : les anneaux peuvent dépasser légèrement du fond du conteneur */
    overflow: visible;
    /* Tempo respiration bouton + anneau `::before` au repos (les halos proximité suivent le Geiger en JS) */
    --scanner-idle-breathe-duration: 3s;
}

/* Anneaux pleins « profondeur » derrière le bouton scanner (radar proximité) */
#scanner-proximity-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

@keyframes scanner-proximity-ring-geiger-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    45% {
        transform: translate(-50%, -50%) scale(1.065);
        opacity: 0.98;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.92;
    }
}

/* `background` par couche via JS (`proximityRingBackgroundForLayer`) : violet intérieur → bleu extérieur. */
.scanner-proximity-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(91, 94, 242, 0.36));
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.22),
        0 4px 12px rgba(0, 0, 0, 0.12),
        inset 0 2px 14px rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.92;
    transition: transform 0.38s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.35s ease;
}

/* Pulse court déclenché par le Geiger (`geigerVibrateAndPulseProximityRings`), pas de boucle continue liée au bouton */
/* `transition` sur `.scanner-proximity-ring` peut empêcher l’animation transform/opacity de se voir sans `transition: none`. */
.scanner-proximity-ring.scanner-proximity-ring--geiger-pulse-anim {
    animation: scanner-proximity-ring-geiger-pulse 0.22s ease-out forwards;
    transition: none;
}

/* Ne pas cibler `--geiger-pulse-anim` : sinon `animation: none` l’emporte sur le pulse (spécificité #id + .is-resetting). */
#scanner-container.is-scanning .scanner-proximity-ring:not(.scanner-proximity-ring--enter):not(.scanner-proximity-ring--exit):not(.scanner-proximity-ring--geiger-pulse-anim),
#scanner-container.is-resetting .scanner-proximity-ring:not(.scanner-proximity-ring--enter):not(.scanner-proximity-ring--exit):not(.scanner-proximity-ring--geiger-pulse-anim) {
    animation: none;
}

.scanner-proximity-ring--enter {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.scanner-proximity-ring--exit {
    transform: translate(-50%, -50%) scale(0) !important;
    opacity: 0 !important;
    transition: transform 0.34s ease-in, opacity 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
    .scanner-proximity-ring,
    .scanner-proximity-ring--enter,
    .scanner-proximity-ring--exit {
        transition: none;
    }
    .scanner-proximity-ring--geiger-pulse-anim {
        animation: none !important;
    }
    .scanner-proximity-ring--enter {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.92;
    }
}

/* Ping scan à proximité : halo bleu sur tout le bord de l’écran (~2 s, voir PROXIMITY_SCAN_PING_HALO_DURATION_MS) */
@keyframes proximity-scan-ping-halo-anim {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.proximity-scan-ping-screen-halo {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483646;
    box-shadow:
        inset 0 0 0 3px rgba(59, 130, 246, 0.55),
        inset 0 0 72px 20px rgba(59, 130, 246, 0.38),
        inset 0 0 140px 56px rgba(59, 130, 246, 0.12);
    opacity: 0;
    will-change: opacity;
}

.proximity-scan-ping-screen-halo.proximity-scan-ping-screen-halo--anim {
    animation: proximity-scan-ping-halo-anim var(--proximity-ping-halo-dur, 2000ms) ease-in-out forwards;
}

@media (prefers-reduced-motion: reduce) {
    .proximity-scan-ping-screen-halo.proximity-scan-ping-screen-halo--anim {
        animation: none !important;
        opacity: 0 !important;
    }
}

/* Au-dessus des anneaux qui débordent du #scanner-container (halos z ≤ 5 à l’intérieur) */
#scanner-hint {
    position: relative;
    z-index: 15;
}

/* Masqué : le JS met encore à jour le texte (accessibilité / futur) ; l’UI repose sur les anneaux + vibrations */
#scanner-proximity-count {
    display: none !important;
}

.scanner-auto-scan-hint:not(.scanner-auto-scan-hint--discrete) {
    color: #6b7280;
    font-weight: 500;
}

#scanner-auto-scan-hint:not(.hidden):not(.scanner-auto-scan-hint--discrete) {
    opacity: 0.92;
}

.scanner-auto-scan-hint--discrete {
    font-weight: 500;
}

/* TEMP : masquer la phrase sous le bouton scanner (#meeting-feedback) ; le JS continue de mettre à jour le texte */
#meeting-feedback {
    display: none !important;
}

/* TEMP : masquer le texte « Choisis ton envie actuelle » ; le flux / margin-bottom de la consigne reste actif pour les satellites */
#scanner-mood-instruction {
    visibility: hidden !important;
}

/* Simulation compteur radar (Discover) — au-dessus de la zone du #bottom-navbar (~24px + 65px) */
.scanner-proximity-sim-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    z-index: 8000;
    padding: 8px 14px;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
}

.scanner-proximity-sim-bar[hidden] {
    display: none !important;
}

.scanner-proximity-sim-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 28rem;
    margin: 0 auto;
}

.scanner-proximity-sim-bar__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    font-family: inherit;
}

.scanner-proximity-sim-bar__toggle input {
    accent-color: #a78bfa;
}

.scanner-proximity-sim-bar input[type='range'] {
    flex: 1;
    min-width: 0;
    height: 6px;
    accent-color: #8b5cf6;
}

.scanner-proximity-sim-bar__value {
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e5e7eb;
    min-width: 1.5rem;
    text-align: right;
}

#scanner-button {
    position: relative;
    width: 160px; 
    height: 160px; 
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-1) 45%, var(--color-2) 100%);
    --color-1: #7C3AED;
    --color-2: #3B82F6;
    color: white; 
    font-weight: bold; 
    font-size: 1.2rem;
    box-sizing: border-box;
    border-style: solid;
    border-color: #ffffff;
    border-width: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.5);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    cursor: pointer; 
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-width 0.65s ease,
        filter 3000ms ease,
        --scanner-visibility-saturation 3000ms ease;
    filter: saturate(var(--scanner-visibility-saturation, 1));
    z-index: 10;
    flex-direction: column;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
    touch-action: manipulation; /* Disable double-tap zoom */
    overflow: visible; /* l’anneau 2h dépasse légèrement (×1,1) tout en restant enfant du bouton */
}

/* Anneau 2h : nœud réel dans #scanner-button (même transform breathe/scan que le bouton) */
#scanner-last-scan-visibility-ring {
    --scan-visibility-angle: 0deg;
    --scan-visibility-color: #7c3aed;
    --scan-visibility-track: rgba(124, 58, 237, 0.18);
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    background:
        conic-gradient(var(--scan-visibility-track) 0deg 360deg),
        conic-gradient(
            var(--scan-visibility-color) 0deg var(--scan-visibility-angle),
            rgba(0, 0, 0, 0) var(--scan-visibility-angle) 360deg
        );
    -webkit-mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - 8px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - 8px), #000 calc(100% - 8px));
    transition:
        --scan-visibility-angle 3000ms ease,
        --scan-visibility-color 3000ms ease,
        --scan-visibility-track 3000ms ease;
    /* Diamètre +10 % vs le bouton ; scale composé avec l’animation du parent (breathe / scan) */
    transform: rotate(0deg) scale(1.12);
    transform-origin: center center;
}

#scanner-button:active { 
    transform: scale(0.95); 
}

/* Maintien pression : désactive la respiration idle ; shake + --color-1/2 (mélange vers blanc) pilotés en JS */
#scanner-button.scanner-charging {
    animation: none !important;
    transition: none;
    /* Évite que le scroll du <main> vole le pointeur (pointercancel) pendant maintien / glisser vers emoji */
    touch-action: none;
}

/* Pendant l'affichage de la couronne : on bloque seulement les gestes natifs.
   Le conteneur garde sa taille de base (180 px / 64 px discret) et les satellites
   debordent via overflow: visible — leur position absolue (calc(50% + Xpx)) est
   independante de la taille du conteneur, donc aucun saut layout ; les translations
   FLIP/transform restent accelerees par le compositeur (Android Chrome 60 fps). */
#scanner-container.scanner-mood-open {
    touch-action: none;
    overflow: visible;
}

/* Satellites emoji après charge longue (3 s) — couronne autour du bouton */
.scanner-mood-satellites {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
    touch-action: none;
}

/* Consigne : repliée par défaut ; .scanner-mood-instruction--visible anime hauteur / opacité (évite saut du layout) */
.scanner-mood-instruction {
    box-sizing: border-box;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #5b21b6;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.95),
        0 1px 2px rgba(255, 255, 255, 0.85);
    pointer-events: none;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition:
        max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease,
        margin-bottom 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        padding-top 0.32s ease,
        padding-bottom 0.32s ease;
}

.scanner-mood-instruction--visible {
    max-height: 6rem;
    opacity: 1;
    /* Garde-fou contre le chevauchement des libellés satellites (label = position: absolute,
       bottom: 100% du bouton satellite ; le top satellite (-90°) place son libellé jusqu'a
       ~55 px au-dessus du haut de #scanner-container). Ajusté à 2rem. */
    margin-bottom: 2rem;
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.scanner-mood-instruction--discrete {
    color: rgba(250, 245, 255, 0.95);
    text-shadow:
        0 0 12px rgba(0, 0, 0, 0.45),
        0 1px 2px rgba(0, 0, 0, 0.35);
}

.scanner-mood-instruction--discrete.scanner-mood-instruction--visible {
    margin-bottom: 0.375rem;
}

@media (min-width: 640px) {
    .scanner-mood-instruction {
        font-size: 1.25rem;
        line-height: 1.28;
    }

    .scanner-mood-instruction--visible {
        max-height: 6.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Aucune transition CSS sur le conteneur scanner (plus de redimensionnement) ; on neutralise
       seulement la transition de la consigne — les animations FLIP / fondu d'entree sont deja
       court-circuitees cote JS via `scannerReduceMotion`. */
    .scanner-mood-instruction {
        transition: none;
    }
}

/* Pop-in sur le disque complet (fond + ombre + emoji) : le <button> ne fait que position + scale actif */
@keyframes scanner-mood-btn-inner-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    72% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hit box un peu plus large que le disque visible (48×48) pour viser plus facilement au doigt */
.scanner-mood-btn {
    --mood-idx-delay: 0ms;
    --mood-face-size: 48px;
    --mood-hit-size: 58px;
    position: absolute;
    z-index: 1;
    width: var(--mood-hit-size);
    height: var(--mood-hit-size);
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    background: transparent;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.scanner-mood-btn__stack {
    position: relative;
    z-index: 0;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.26s cubic-bezier(0.34, 1.45, 0.45, 1);
}

/* Libellé au-dessus du disque : une seule ligne, centré, pas de wrap */
.scanner-mood-btn__label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom: 4px;
    padding: 0;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #5b21b6;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(255, 255, 255, 0.85);
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.92);
    transform-origin: center bottom;
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.34, 1.35, 0.45, 1);
    pointer-events: none;
    white-space: nowrap;
    max-width: none;
    z-index: 2;
}

/* Uniquement .scanner-mood-btn--active (JS + pointermove) : évite :hover / :active tactiles « collés » et double surbrillance */
.scanner-mood-btn.scanner-mood-btn--active .scanner-mood-btn__label {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.scanner-mood-btn__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--mood-face-size);
    height: var(--mood-face-size);
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(255, 255, 255, 0.9);
    transform: scale(0);
    opacity: 0;
    animation: scanner-mood-btn-inner-pop 0.48s cubic-bezier(0.34, 1.35, 0.55, 1) forwards;
    animation-delay: var(--mood-idx-delay);
    pointer-events: none;
    transition: box-shadow 0.26s ease, background 0.26s ease;
}

/* Événement K2A : disque fluo (variable --k2a-mood-color sur l’élément) */
.scanner-mood-btn__inner--k2a {
    font-size: 0;
    line-height: 0;
    background: var(--k2a-mood-color, #ff00aa) !important;
    box-shadow:
        0 0 10px var(--k2a-mood-color, #ff00aa),
        0 0 22px color-mix(in srgb, var(--k2a-mood-color, #ff00aa) 65%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Annuler le scan : disque rouge + croix blanche (bas centre, 90° — app.js SCANNER_MOOD_CANCEL_ORBIT_FINAL_DEG) */
.scanner-mood-btn__inner--cancel {
    background: #dc2626 !important;
    box-shadow:
        0 4px 14px rgba(220, 38, 38, 0.45),
        0 0 0 2px rgba(255, 255, 255, 0.35);
}

.scanner-mood-btn__inner--cancel::before,
.scanner-mood-btn__inner--cancel::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52%;
    height: 3px;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
}

.scanner-mood-btn__inner--cancel::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.scanner-mood-btn__inner--cancel::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.scanner-mood-btn.scanner-mood-btn--active .scanner-mood-btn__inner--cancel {
    background: #b91c1c !important;
    box-shadow:
        0 8px 22px rgba(220, 38, 38, 0.55),
        0 0 0 3px rgba(255, 255, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .scanner-mood-btn__inner {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }

    .scanner-mood-btn__stack {
        transition: none;
    }
}

/* Sélection : uniquement classe JS (pas :hover / :active — voir libellé ci-dessus) */
.scanner-mood-btn.scanner-mood-btn--active .scanner-mood-btn__inner {
    background: linear-gradient(145deg, #3b82f6 0%, #6366f1 38%, #7c3aed 72%, #6d28d9 100%);
    box-shadow: 0 10px 32px rgba(124, 58, 237, 0.5), 0 4px 14px rgba(37, 99, 235, 0.35);
}

.scanner-mood-btn.scanner-mood-btn--active .scanner-mood-btn__inner--k2a {
    background: var(--k2a-mood-color, #ff00aa) !important;
    box-shadow:
        0 0 0 3px rgba(124, 58, 237, 0.95),
        0 0 16px var(--k2a-mood-color, #ff00aa),
        0 0 32px color-mix(in srgb, var(--k2a-mood-color, #ff00aa) 70%, transparent),
        0 10px 28px rgba(124, 58, 237, 0.4),
        0 4px 14px rgba(0, 0, 0, 0.2);
}

.scanner-mood-btn.scanner-mood-btn--active {
    z-index: 20;
}

.scanner-mood-btn.scanner-mood-btn--active .scanner-mood-btn__stack {
    transform: scale(2);
}

/* Relâchement avec humeur : emoji qui s’envole depuis le satellite (clone fixed, voir spawnScannerMoodFlyawayEmoji dans app.js) */
@keyframes scanner-mood-flyaway-float {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + min(6vw, 28px)), calc(-50% - min(38vh, 280px))) scale(1.28);
        opacity: 0;
    }
}

.scanner-mood-flyaway {
    position: fixed;
    z-index: 100050;
    margin: 0;
    padding: 0;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    will-change: transform, opacity;
    filter: drop-shadow(0 8px 18px rgba(124, 58, 237, 0.38));
}

.scanner-mood-flyaway--dot {
    border-radius: 50%;
    box-sizing: border-box;
    /* currentColor = même teinte fluo que le fond (défini en JS) */
    filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 22px currentColor)
        drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.scanner-mood-flyaway--play {
    animation: scanner-mood-flyaway-float 1.4s cubic-bezier(0.18, 0.75, 0.22, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .scanner-mood-flyaway--play {
        animation: none;
        opacity: 0;
    }
}

/* Relâchement : rebond scale proportionnel à la durée d’appui (Web Animations API dans app.js) */

/* === Animation idle du scanner (quand non utilisé) === */
/* Légère pulsation de respiration + glow pour attirer l'attention */
#scanner-container:not(.is-scanning):not(.is-resetting) #scanner-button {
    animation: scanner-idle-breathe var(--scanner-idle-breathe-duration, 3s) ease-in-out infinite;
}

@keyframes scanner-idle-breathe {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35), 0 0 20px rgba(59, 130, 246, 0.25), 0 0 0 8px rgba(255, 255, 255, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.5);
    }
}

/* Anneau lumineux qui pulse autour du scanner au repos */
#scanner-container:not(.is-scanning):not(.is-resetting)::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.3);
    animation: scanner-idle-ring var(--scanner-idle-breathe-duration, 3s) ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes scanner-idle-ring {
    0% {
        transform: scale(1);
        opacity: 0;
        border-color: rgba(124, 58, 237, 0.1);
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        border-color: rgba(124, 58, 237, 0.4);
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
        border-color: rgba(59, 130, 246, 0.1);
    }
}

#scanner-container.is-scanning {
    animation: rotate-scan var(--scan-rotate-duration, 4s) linear infinite;
}

#scanner-container.is-resetting {
    transition: transform 3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rotate-scan {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#scanner-container.is-scanning #scanner-button {
    animation: pulse-scan var(--scan-pulse-duration, 1s) ease-in-out infinite;
}

@keyframes pulse-scan {
    0% { transform: scale(0.95); }
    60% { transform: scale(1); }
    85% { transform: scale(1.15); }
    100% { transform: scale(0.95); }
}

/* Wave Pairs - Dynamic JS Injection */
.scanner-wave-pair {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* Scanner Step Colors */
#scanner-button.step-0 {
    --color-1: #7C3AED;
    --color-2: #3B82F6;
}

#scanner-button.step-1 {
    --color-1: #10B981;
    --color-2: #14B8A6;
}

#scanner-button.step-2 {
    --color-1: #F0F0F0;
    --color-2: #3B82F6;
}

#scanner-button.step-3 {
    --color-1: #A855F7;
    --color-2: #EC4899;
}

#scanner-button.step-4 {
    --color-1: #3B82F6;
    --color-2: #7C3AED;
}

/* GPS : bordure blanche — 0 = pas de position (défaut, classes retirées), 5 = imprécis / erreur scan, 8 = précis */
#scanner-button.gps-high-accuracy {
    border-width: 8px;
}

#scanner-button.gps-low-accuracy,
#scanner-button.gps-no-accuracy {
    border-width: 5px;
    border-color: #ffffff;
}

.scanner-wave-pair::before, 
.scanner-wave-pair::after {
    content: ''; 
    position: absolute; 
    top: 50%; 
    width: 160px; 
    height: 160px; 
    border-radius: 50%;
    background-color: transparent; 
    border-width: var(--wave-border-width, 4px);
    border-style: solid;
    transform: translate(-50%, -50%) scale(0.7); 
    opacity: 0;
}

.scanner-wave-pair::before {
    left: 35%;
    border-color: #7C3AED;
}

.scanner-wave-pair::after { 
    left: 65%;
    border-color: #3B82F6;
}

/* Animation triggered by JS adding the class */
.scanner-wave-pair.animate::before,
.scanner-wave-pair.animate::after {
    animation: scan-wave 3s ease-out forwards;
}

@keyframes scan-wave {
    0% { 
        transform: translate(-50%, -50%) scale(0.7); 
        opacity: 1;
        filter: blur(0px);
    }
    30% {
        filter: blur(0px);
    }
    75% {
       opacity: 0;
    }
    100% { 
        transform: translate(-50%, -50%) scale(3.5); 
        opacity: 0;
        filter: blur(8px);
    }
}

/* Swiper / Tinder Cards */
.swipe-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    will-change: transform;
}
.swipe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.swipe-card .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 20%, transparent);
    pointer-events: none;
}
.swipe-card .card-info h3 {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* Dislike Particle Explosion Effect */
.dislike-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Overlays "LIKE" et "NOPE" */
.swipe-overlay {
    position: absolute;
    top: 2rem;
    font-size: 3rem;
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: 4px solid;
    opacity: 0;
    transform: rotate(0deg);
    pointer-events: none;
    z-index: 10;
}
#like-overlay {
    color: #34d399; /* Vert */
    right: 1rem;
    transform: rotate(15deg);
}
#nope-overlay {
    color: #ef4444; /* Rouge */
    left: 1rem;
    transform: rotate(-15deg);
}

/* Grid / Meeting Cards */

/* ----------------------------------------------
 * Generated by Animista on 2026-1-11 16:19:34
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation shadow-pop-br
 * ----------------------------------------
 */
@-webkit-keyframes shadow-pop-br {
  0% {
    -webkit-box-shadow: 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e;
            box-shadow: 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e;
    -webkit-transform: translateX(0) translateY(0);
            transform: translateX(0) translateY(0);
  }
  100% {
    -webkit-box-shadow: 1px 1px #3e3e3e, 2px 2px #3e3e3e, 3px 3px #3e3e3e, 4px 4px #3e3e3e, 5px 5px #3e3e3e, 6px 6px #3e3e3e, 7px 7px #3e3e3e, 8px 8px #3e3e3e;
            box-shadow: 1px 1px #3e3e3e, 2px 2px #3e3e3e, 3px 3px #3e3e3e, 4px 4px #3e3e3e, 5px 5px #3e3e3e, 6px 6px #3e3e3e, 7px 7px #3e3e3e, 8px 8px #3e3e3e;
    -webkit-transform: translateX(-8px) translateY(-8px);
            transform: translateX(-8px) translateY(-8px);
  }
}
@keyframes shadow-pop-br {
  0% {
    -webkit-box-shadow: 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e;
            box-shadow: 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e, 0 0 #3e3e3e;
    -webkit-transform: translateX(0) translateY(0);
            transform: translateX(0) translateY(0);
  }
  100% {
    -webkit-box-shadow: 1px 1px #3e3e3e, 2px 2px #3e3e3e, 3px 3px #3e3e3e, 4px 4px #3e3e3e, 5px 5px #3e3e3e, 6px 6px #3e3e3e, 7px 7px #3e3e3e, 8px 8px #3e3e3e;
            box-shadow: 1px 1px #3e3e3e, 2px 2px #3e3e3e, 3px 3px #3e3e3e, 4px 4px #3e3e3e, 5px 5px #3e3e3e, 6px 6px #3e3e3e, 7px 7px #3e3e3e, 8px 8px #3e3e3e;
    -webkit-transform: translateX(-8px) translateY(-8px);
            transform: translateX(-8px) translateY(-8px);
  }
}

/* Envie « sur place » (2 h) : au-dessus du scanner — une seule ligne, pas de wrap */
.scanner-presence-instant {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1.2;
    pointer-events: none;
    max-width: none;
    white-space: nowrap;
}

.scanner-presence-instant.hidden {
    display: none !important;
}

/* Mode discret : fond sombre, libellé plus clair */
.scanner-presence-instant--discrete .scanner-presence-instant__label {
    color: #f3e8ff;
    text-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.85);
}

.scanner-presence-instant--discrete .scanner-presence-instant__emoji {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}

.scanner-presence-instant__stack {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: none;
    white-space: nowrap;
}

/* Emoji devant ; libellé glisse depuis la gauche (derrière) sur la même ligne */
.scanner-presence-instant__emoji {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
    transform: scale(0);
    opacity: 0;
}

.scanner-presence-instant__k2a-dot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    box-shadow:
        0 0 8px currentColor,
        0 0 16px currentColor,
        0 1px 4px rgba(0, 0, 0, 0.35);
    transform: scale(0);
    opacity: 0;
}

.scanner-presence-instant__label {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #5b21b6;
    text-align: left;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.95), 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateX(-12px);
    opacity: 0;
}

@keyframes scanner-presence-emoji-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    58% {
        transform: scale(1.2);
        opacity: 1;
    }
    78% {
        transform: scale(0.92);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scanner-presence-label-from-behind {
    0% {
        opacity: 0;
        transform: translateX(-14px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.scanner-presence-instant--enter .scanner-presence-instant__emoji,
.scanner-presence-instant--enter .scanner-presence-instant__k2a-dot {
    animation: scanner-presence-emoji-pop 0.55s cubic-bezier(0.34, 1.5, 0.45, 1) forwards;
}

.scanner-presence-instant--enter .scanner-presence-instant__label {
    animation: scanner-presence-label-from-behind 0.48s cubic-bezier(0.22, 0.88, 0.32, 1) forwards;
    animation-delay: 0.4s;
}

.scanner-presence-instant--static .scanner-presence-instant__emoji,
.scanner-presence-instant--static .scanner-presence-instant__k2a-dot,
.scanner-presence-instant--static .scanner-presence-instant__label {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .scanner-presence-instant__emoji,
    .scanner-presence-instant__k2a-dot,
    .scanner-presence-instant__label {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Envie « carte historique » (2 h) : une ligne sous le prénom + âge (createHistoryCard) */
.user-card-meeting-top .history-map-presence-badge {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    white-space: nowrap;
}

.history-map-presence-badge__emoji {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.history-map-presence-badge__k2a-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow:
        0 0 6px currentColor,
        0 0 12px currentColor,
        0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Filtres rapides historique : pastille K2A (même logique que les satellites) */
.history-presence-filter-k2a-dot {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow:
        0 0 8px currentColor,
        0 0 16px currentColor,
        0 1px 4px rgba(0, 0, 0, 0.3);
}

.user-card-meeting-top .history-map-presence-badge .history-map-presence-badge__label {
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.history-map-presence-leaflet-marker {
    background: transparent !important;
    border: none !important;
}

.history-map-presence-leaflet-inner {
    min-width: 88px;
    max-width: 112px;
    padding: 6px 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(124, 58, 237, 0.35);
}

.history-map-presence-leaflet-emo {
    font-size: 1.35rem;
    line-height: 1;
}

.history-map-presence-leaflet-lbl {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #5b21b6;
    max-width: 104px;
}

.user-card-meeting {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* Lift + Shadow hover replaced by shadow-pop-br animation */
    transition: box-shadow 200ms;
    transform-origin: center;
    will-change: transform, box-shadow;
}
.user-card-meeting:hover,
.user-card-meeting:focus-visible,
.user-card-meeting:focus-within {
    animation: shadow-pop-br 220ms cubic-bezier(.2,.9,.2,1) forwards;
}
@media (prefers-reduced-motion: reduce) {
    .user-card-meeting, .user-card-meeting * {
        transition: none !important;
        animation: none !important;
    }
}
.user-card-meeting img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cartes publicitaires (page Historique) — même gabarit que user-card-meeting */
a.user-card-meeting--ad {
    display: block;
    text-decoration: none;
    color: inherit;
}
a.user-card-meeting--ad:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Publicités (.advert) — bordure lumineuse bleu / violet floue */
a.user-card-meeting.advert {
    box-shadow:
        0 0 0 1.5px rgba(99, 102, 241, 0.55),
        0 0 10px 2px rgba(124, 58, 237, 0.45),
        0 0 22px 4px rgba(59, 130, 246, 0.28);
}
a.user-card-meeting.advert:hover,
a.user-card-meeting.advert:focus-visible {
    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.65),
        0 0 14px 3px rgba(124, 58, 237, 0.55),
        0 0 28px 6px rgba(59, 130, 246, 0.35);
}

#conversations-list > .advert {
    margin: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    border-bottom-width: 0 !important;
    box-shadow:
        inset 0 0 0 1.5px rgba(99, 102, 241, 0.5),
        0 0 14px 2px rgba(124, 58, 237, 0.38),
        0 0 24px 4px rgba(59, 130, 246, 0.22);
}
#conversations-list > .advert:hover,
#conversations-list > .advert:focus-visible {
    box-shadow:
        inset 0 0 0 2px rgba(99, 102, 241, 0.62),
        0 0 18px 3px rgba(124, 58, 237, 0.48),
        0 0 30px 6px rgba(59, 130, 246, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    a.user-card-meeting.advert,
    a.user-card-meeting.advert:hover,
    a.user-card-meeting.advert:focus-visible,
    #conversations-list > .advert,
    #conversations-list > .advert:hover,
    #conversations-list > .advert:focus-visible {
        box-shadow:
            0 0 0 1.5px rgba(99, 102, 241, 0.55),
            0 0 8px 1px rgba(124, 58, 237, 0.35);
    }
}

/* Matches scroller: allow shadows to be visible at edges */
#matches-grid {
    /* keep horizontal scroll, but allow vertical overflow so shadows aren't clipped */
    overflow-x: auto;
    overflow-y: visible;
    /* small horizontal padding so first/last card shadows are visible */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    /* add a tiny top padding to leave room for upward shadow from animation */
    padding-top: 0.5rem;
}
#matches-grid .user-card-meeting {
    /* ensure the card stacking context allows shadow to render above neighbors */
    position: relative;
    z-index: 0;
}
#matches-grid .user-card-meeting:hover,
#matches-grid .user-card-meeting:focus-within {
    z-index: 5; /* bring hovered card above neighbors so its shadow is visible */
}
/* Cartes rencontre / Seeyoo : prénom (ligne 1) + âge (ligne 2) en haut à gauche ; ouverture + temps en bas */
.user-card-meeting-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 0.5rem 0.75rem 2rem;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 55%, transparent 100%);
    color: #fff;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.user-card-meeting-top__name {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(0,0,0,0.85);
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}
.user-card-meeting-top__age {
    margin: 0;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.85);
}
.user-card-meeting-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 2.25rem 0.75rem 0.45rem;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 52%, transparent 100%);
    color: #fff;
    text-align: left;
    font-size: 0.75rem;
}
.user-card-meeting-bottom p {
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.user-card-meeting-bottom p + p {
    margin-top: 0.15rem;
}
.user-card-meeting-bottom-openness {
    letter-spacing: 0.02em;
}
.user-card-meeting-bottom-crossed {
    opacity: 0.85;
    font-size: 0.7rem;
}

/* Result Cards Animation */
@keyframes scaleInUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.search-result-card {
    opacity: 0;
    animation: scaleInUp 0.4s ease-out forwards;
}

/* Reconsider Button */
.user-card-meeting .reconsider-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 4px;
    display: flex;
    cursor: pointer;
    transition: transform 0.2s;
}
.user-card-meeting .reconsider-btn:hover {
    transform: scale(1.1);
}

/* Match Animation Styles */
.match-text {
    font-family: 'Raleway', sans-serif;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 12px #3b82f6, 0 0 24px #3b82f6;
}

.match-photo {
    opacity: 0;
    transform: scale(0);
}

#match-animation-overlay.animate #match-user-1 {
    animation: slide-in-from-left 0.8s 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#match-animation-overlay.animate #match-user-2 {
    animation: slide-in-from-right 0.8s 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slide-in-from-left {
    from {
        transform: translateX(-150%) scale(0.7);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1.5);
        opacity: 1;
    }
}

@keyframes slide-in-from-right {
    from {
        transform: translateX(150%) scale(0.7);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1.5);
        opacity: 1;
    }
}

/* Classe qui déclenche l'animation d'apparition */
#match-animation-content.animate-match {
    /* L'animation "scale-in" dure 0.5s, puis "glow" commence après 0.3s et dure 2s */
    animation: scale-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, 
               glow 2s 0.3s ease-in-out forwards;
}

/* Animation 1 : Le texte grossit et apparaît */
@keyframes scale-in {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animation 2 : La lueur du texte palpite pour un effet dynamique */
@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 12px #3b82f6, 0 0 24px #3b82f6;
    }
    50% {
        text-shadow: 0 0 16px rgba(255, 255, 255, 0.5), 0 0 24px #60a5fa, 0 0 48px #60a5fa;
    }
}

/* Range Slider Styling */
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #9333ea; /* purple-600 */
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 30;
    position: relative;
}

.range-slider::-moz-range-thumb {
    pointer-events: auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #9333ea;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 30;
    position: relative;
}

/* Remove default focus outline */
.range-slider:focus {
    outline: none;
}

/* Hide scrollbar utility */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* Profile Gallery Grid */
.gallery-square-container {
    width: 100%;
    padding-top: 100%; /* Force 1:1 Aspect Ratio */
    position: relative;
    background-color: #f3f4f6;
    /* overflow: hidden; REMOVED to allow overlay to stick out */
}

/* Matched state: apply blue inset glow to the profile page (overlay above content) */
.matched-profile {
    position: relative;
}

.matched-profile::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 30; /* above page-profile content */
    pointer-events: none;
    box-shadow: inset 0 0 30px 8px rgb(59 130 246 / 70%);
    transition: box-shadow 0.3s ease, opacity 0.25s ease;
}

/* Social info blurred placeholder for unmatched profiles */
.info-blurred {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
    display: inline-block;
}

/* Private Photos — Blurred overlay for non-matched visitors */
.private-photo-cell {
    position: relative;
    overflow: hidden;
}

.private-blurred-photo {
    filter: blur(20px);
    transform: scale(1.1);
    user-select: none;
    pointer-events: none;
}

.private-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2;
    pointer-events: none;
}

/* Private photos separator in manage-photos modal */
.private-photos-separator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-gallery-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    gap: 0;
    overflow: hidden; /* Double check to prevent overflow */
    z-index: 0; /* keep images below overlays */
}

.profile-gallery-grid img,
.profile-gallery-grid .private-photo-cell {
    z-index: 0;
}

.profile-gallery-grid img,
.profile-gallery-grid .private-photo-cell {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    display: block;
    min-width: 0; /* Prevent grid blowout */
    min-height: 0; /* Prevent grid blowout */
    overflow: hidden;
}

/* Gallery info overlay - ancien style désactivé, overlay désormais séparé */
.gallery-info-wrapper {
    transform: none;
}

/* Nouveau conteneur overlay séparé de la galerie, avec fond flou */
.profile-overlay-container {
    position: relative;
    width: 100%;
    overflow: visible; /* sticky #profile-info-overlay : pas de overflow:hidden sur l’ancêtre */
    /* Remonter légèrement pour coller à la galerie sans gap ; annulé en --stuck (voir :has ci-dessous) */
    margin-top: -30px;
    transition: margin-top 0.3s ease;
}

/* Sticky : sans ce reset, le -30px remonte tout le bandeau au-dessus du top safe-area */
.profile-overlay-with-actions:has(#profile-info-overlay.profile-info-overlay--stuck) .profile-overlay-container {
    margin-top: -15px;
}

/* Fente ~1px au-dessus du bandeau collé : même formule que le Tailwind top, −1px (sub-pixels / bord du scrollport) */
.profile-overlay-with-actions.gallery-info-wrapper:has(#profile-info-overlay.profile-info-overlay--stuck) {
    top: calc(max(1rem, env(safe-area-inset-top, 0px)) - 1px);
}

.profile-overlay-bg-clip {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.profile-overlay-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px);
    transform: scale(1.3);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 400ms ease-in;
}

.profile-overlay-bg.is-visible {
    opacity: 1;
}

.profile-info-content {
    position: relative;
    z-index: 1;
}

/* Bandeau nom / âge : sticky sur .profile-overlay-with-actions ; repli (--stuck) sur #profile-info-overlay */
.profile-info-overlay {
    transition: box-shadow 0.3s ease;
}
.profile-info-overlay-main {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-info-overlay-collapse-root {
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
}
.profile-info-overlay-collapse-inner {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.profile-info-overlay-location-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.5rem;
    width: 100%;
    min-width: 0;
}
.profile-info-overlay-location {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    max-height: 5rem;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
}
.profile-encounter-more-btn {
    white-space: nowrap;
}
.profile-info-overlay--stuck .profile-info-overlay-location-row {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Drawer profil — squelette de chargement (réutilise @keyframes img-shimmer) */
.profile-drawer-skeleton-block {
    background: linear-gradient(
        110deg,
        #e5e7eb 0%,
        #e5e7eb 30%,
        #f3f4f6 50%,
        #e5e7eb 70%,
        #e5e7eb 100%
    );
    background-size: 300% 100%;
    animation: img-shimmer 1.8s ease-in-out infinite;
}
.profile-drawer-skeleton-gallery {
    width: 100%;
    height: 100%;
}
.profile-drawer-skeleton-title {
    height: 1.75rem;
    width: 55%;
    max-width: 12rem;
}
.profile-drawer-skeleton-subtitle {
    height: 1.125rem;
    width: 28%;
    max-width: 5rem;
}
.profile-drawer-skeleton-location {
    height: 0.875rem;
    width: 68%;
    max-width: 14rem;
}
.profile-drawer-skeleton-section-title {
    height: 1.125rem;
    width: 38%;
    max-width: 9rem;
}
.profile-drawer-skeleton-line {
    height: 0.875rem;
    width: 100%;
}
.profile-drawer-skeleton-line--short {
    width: 72%;
}
@media (prefers-reduced-motion: reduce) {
    .profile-drawer-skeleton-block {
        animation: none;
    }
}
.profile-info-overlay--stuck .profile-info-overlay-collapse-root {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
}
.profile-info-overlay--stuck .profile-info-overlay-main {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.375rem;
}
.profile-info-overlay--stuck {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ——— Partage / scan QR profil ——— */
.profile-share-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-left: auto;
    padding: 0.45rem 0.85rem 0.45rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 9999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.88), rgba(37, 99, 235, 0.82));
    box-shadow:
        0 4px 18px rgba(91, 33, 182, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    overflow: hidden;
}
.profile-share-btn__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
    pointer-events: none;
}
.profile-share-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow:
        0 8px 24px rgba(91, 33, 182, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    filter: brightness(1.06);
}
.profile-share-btn:hover .profile-share-btn__shine {
    transform: translateX(120%);
}
.profile-share-btn:active {
    transform: scale(0.97);
}
.profile-share-btn__icon {
    font-size: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.profile-share-btn__label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.header-qr-scan-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(147, 51, 234, 0.25);
    color: #7c3aed;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(243, 232, 255, 0.9));
    box-shadow:
        0 4px 14px rgba(147, 51, 234, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.header-qr-scan-btn i {
    font-size: 1.25rem;
}
.header-qr-scan-btn:hover {
    transform: translateY(-1px) scale(1.05);
    color: #6d28d9;
    box-shadow: 0 6px 18px rgba(147, 51, 234, 0.28);
}
.header-qr-scan-btn:active {
    transform: scale(0.96);
}

.sy-profile-qr-modal-panel {
    background: linear-gradient(165deg, #ffffff 0%, #f8f5ff 48%, #eef2ff 100%);
    border: 1px solid rgba(147, 51, 234, 0.12);
    box-shadow:
        0 24px 60px rgba(49, 46, 129, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.sy-profile-qr-modal-hero {
    background: linear-gradient(125deg, #6d28d9 0%, #7c3aed 38%, #2563eb 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.sy-profile-qr-modal-hero::after {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
    pointer-events: none;
}
.sy-profile-qr-frame {
    position: relative;
    padding: 0.85rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow:
        0 10px 30px rgba(91, 33, 182, 0.14),
        inset 0 0 0 1px rgba(147, 51, 234, 0.08);
}
.sy-profile-qr-frame::before {
    content: '';
    position: absolute;
    inset: 0.55rem;
    border: 2px dashed rgba(147, 51, 234, 0.22);
    border-radius: 0.95rem;
    pointer-events: none;
}
#profile-share-qr-canvas {
    display: block;
    width: 220px;
    height: 220px;
    border-radius: 0.85rem;
}

.profile-qr-scan-panel {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-qr-flip-stage {
    perspective: 1400px;
    width: 100%;
    max-width: 28rem;
}
.profile-qr-flip-inner {
    position: relative;
    width: 100%;
    min-height: 34rem;
    transform-style: preserve-3d;
    transition: transform 0.62s cubic-bezier(0.4, 0.15, 0.2, 1);
    transform: rotateY(0deg);
}
.profile-qr-flip-inner[data-active-face='share'] {
    transform: rotateY(180deg);
}
.profile-qr-flip-inner--no-transition {
    transition: none !important;
}
.profile-qr-flip-face {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 34rem;
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.profile-qr-flip-face--share {
    transform: rotateY(180deg);
}
.profile-qr-share-panel {
    background: linear-gradient(165deg, #ffffff 0%, #f8f5ff 48%, #eef2ff 100%);
    border: 1px solid rgba(147, 51, 234, 0.12);
    color: #1e1b4b;
    box-shadow:
        0 24px 60px rgba(49, 46, 129, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.profile-qr-hub-header {
    flex-shrink: 0;
}
.profile-qr-hub-body {
    flex: 1 1 auto;
    min-height: 0;
}
#profile-qr-hub-face-scanner,
#profile-qr-hub-face-share {
    justify-content: center;
}
.profile-qr-hub-modal--open .profile-qr-flip-stage {
    animation: profile-qr-hub-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes profile-qr-hub-pop-in {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.profile-qr-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
}
.profile-qr-tab {
    flex: 1;
    padding: 0.5rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.profile-qr-tab:hover {
    color: #fff;
}
.profile-qr-tab--active {
    background: rgba(255, 255, 255, 0.95);
    color: #5b21b6;
    box-shadow: 0 2px 10px rgba(91, 33, 182, 0.18);
}
.profile-qr-tab--active:hover {
    color: #4c1d95;
}
.profile-qr-media-square {
    position: relative;
    width: min(100%, 13.75rem);
    max-width: 13.75rem;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
    flex: 0 0 auto;
}
.profile-qr-scan-viewport {
    position: absolute;
    inset: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.profile-qr-scan-viewport video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-qr-scan-viewport canvas {
    display: none;
}
.profile-qr-share-frame {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.profile-qr-share-frame #profile-share-qr-canvas {
    width: auto;
    height: auto;
    max-width: calc(100% - 1.7rem);
    max-height: calc(100% - 1.7rem);
    aspect-ratio: 1 / 1;
}
.profile-qr-scan-reticle {
    position: absolute;
    inset: 14%;
    border-radius: 1rem;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.42);
}
.profile-qr-scan-reticle span {
    position: absolute;
    inset: 0;
}
.profile-qr-scan-reticle::before,
.profile-qr-scan-reticle::after {
    content: '';
    position: absolute;
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid #c4b5fd;
}
.profile-qr-scan-reticle::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 0.75rem;
}
.profile-qr-scan-reticle::after {
    right: 0;
    bottom: 0;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 0.75rem;
}
.profile-qr-scan-reticle span::before,
.profile-qr-scan-reticle span::after {
    content: '';
    position: absolute;
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid #c4b5fd;
}
.profile-qr-scan-reticle span::before {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 0.75rem;
}
.profile-qr-scan-reticle span::after {
    left: 0;
    bottom: 0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 0.75rem;
}
.profile-qr-scan-reticle-line {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 2px;
    top: 18%;
    background: linear-gradient(90deg, transparent, #a78bfa, transparent);
    animation: profile-qr-scan-sweep 2.4s ease-in-out infinite;
    opacity: 0.85;
}
@keyframes profile-qr-scan-sweep {
    0%, 100% { top: 18%; opacity: 0.35; }
    50% { top: 78%; opacity: 0.95; }
}
#profile-qr-scan-status[data-tone='error'] {
    color: #fecaca;
}
#profile-qr-scan-status[data-tone='neutral'] {
    color: #ddd6fe;
}
@media (prefers-reduced-motion: reduce) {
    .profile-share-btn,
    .profile-share-btn__shine,
    .header-qr-scan-btn {
        transition: none;
    }
    .profile-qr-flip-inner {
        transition: none !important;
    }
    .profile-qr-hub-modal--open .profile-qr-flip-stage {
        animation: none;
    }
    .profile-qr-scan-reticle-line {
        animation: none;
        top: 50%;
    }
}

/* Layouts */
.gallery-1 { 
    grid-template-columns: 1fr; 
    grid-template-rows: 1fr;
}
.gallery-2 { 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 1fr;
}
.gallery-3 { 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 1fr 1fr; 
}
.gallery-3 :nth-child(1) { grid-column: 1; grid-row: 1; }
.gallery-3 :nth-child(2) { grid-column: 1; grid-row: 2; }
.gallery-3 :nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }

.gallery-4 { 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 1fr 1fr; 
}

.gallery-5 { 
    grid-template-columns: repeat(6, 1fr); 
    grid-template-rows: 1fr 1fr; 
}
.gallery-5 :nth-child(1) { grid-column: 1 / span 3; grid-row: 1; }
.gallery-5 :nth-child(2) { grid-column: 4 / span 3; grid-row: 1; }
.gallery-5 :nth-child(3) { grid-column: 1 / span 2; grid-row: 2; }
.gallery-5 :nth-child(4) { grid-column: 3 / span 2; grid-row: 2; }
.gallery-5 :nth-child(5) { grid-column: 5 / span 2; grid-row: 2; }

.gallery-6 { 
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-rows: 1fr 1fr; 
}

.gallery-7 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
}
.gallery-7 :nth-child(1) { grid-column: 1 / span 3; grid-row: 1; }
.gallery-7 :nth-child(2) { grid-column: 4 / span 3; grid-row: 1; }
.gallery-7 :nth-child(3) { grid-column: 1 / span 3; grid-row: 2; }
.gallery-7 :nth-child(4) { grid-column: 4 / span 3; grid-row: 2; }
.gallery-7 :nth-child(5) { grid-column: 1 / span 2; grid-row: 3; }
.gallery-7 :nth-child(6) { grid-column: 3 / span 2; grid-row: 3; }
.gallery-7 :nth-child(7) { grid-column: 5 / span 2; grid-row: 3; }

.gallery-8 { 
    grid-template-columns: 1fr 1fr 1fr 1fr; 
    grid-template-rows: 1fr 1fr; 
}

.gallery-9 { 
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-rows: 1fr 1fr 1fr; 
}

/* Lightbox Animation */
/* Au-dessus du drawer profil (z ~10020) */
#lightbox-modal {
    z-index: 10050;
    background-color: rgba(0, 0, 0, 0); /* Transparent background */
    backdrop-filter: blur(5px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

#lightbox-image {
    position: fixed;
    z-index: 10051;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
    border-radius: 12px; /* Rounded corners */
}

#lightbox-modal.closing {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    pointer-events: none;
}

#lightbox-modal.hidden #lightbox-image {
    pointer-events: none !important;
}

/* Distinctive Signs Drawer Styling */
#distinctive-signs-drawer select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Drawer publicitaire post-scan Discover */
#scanner-ad-drawer-overlay {
    z-index: 10010 !important;
}
#scanner-ad-drawer-overlay:not(.hidden) {
    pointer-events: auto;
}

/* Même zone réservée que #bottom-navbar (bottom-6 + h 65px) + safe-area — la pub ne passe pas sous le menu */
#scanner-ad-drawer {
    flex-shrink: 0;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
}

#scanner-ad-drawer-inner {
    position: relative;
    box-sizing: border-box;
    min-height: 100%;
}

/* Croix au-dessus du bloc pub (ne réserve plus de hauteur dans le flux) */
.scanner-ad-drawer-close-btn {
    position: absolute;
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: 0.75rem;
    z-index: 20;
    pointer-events: auto;
}
.scanner-ad-drawer-close-btn.is-disabled {
    pointer-events: none !important;
    opacity: 0.85;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    background: #d1d5db !important;
}
.scanner-ad-drawer-countdown-num {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.scanner-ad-drawer-slot {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.scanner-ad-drawer-slot:not(.scanner-ad-slot--filled) {
    min-height: 12rem;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* —— Pub Premium (drawer post-scan) —— */
.scanner-ad-premium-promo {
    position: relative;
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    overflow: hidden;
    color: #1f2937;
    background: #fff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.scanner-ad-premium-promo__glow {
    display: none;
}

.scanner-ad-premium-promo__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    padding-top: calc(3.25rem + env(safe-area-inset-top, 0px));
    min-height: 100%;
    flex: 1 1 auto;
}

.scanner-ad-premium-promo__head {
    text-align: center;
}

.scanner-ad-premium-promo__logo,
.scanner-ad-history-filters__logo {
    display: block;
    height: 4rem;
    width: auto;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.scanner-ad-premium-promo__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 auto 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 9999px;
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.scanner-ad-premium-promo__title {
    margin: 0;
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    font-weight: 800;
    line-height: 1.15;
    text-wrap: balance;
}

.scanner-ad-premium-promo__lead {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #4b5563;
}

.scanner-ad-premium-promo__price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
}

.scanner-ad-premium-promo__price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.scanner-ad-premium-promo__price-old {
    font-size: 1.5rem;
    text-decoration: line-through;
    color: #9ca3af;
}

.scanner-ad-premium-promo__price-main {
    background: linear-gradient(135deg, #7C3AED 45%, #DB2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    display: inline-block;
}

.scanner-ad-premium-promo__price-unit {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
    width: 100%;
    text-align: center;
}

.scanner-ad-premium-promo__badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background-color: #ef4444;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    width: auto;
    text-align: center;
}

.scanner-ad-premium-promo__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.scanner-ad-premium-promo__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #374151;
}

.scanner-ad-premium-promo__features i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.1rem;
    color: #7c3aed;
}

.scanner-ad-premium-promo__cta {
    font-weight: 700;
    font-size: 1rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.scanner-ad-premium-promo__cta-icon {
    font-size: 1.15rem;
}

/* —— Pub filtres Historique (drawer post-scan) —— */
.scanner-ad-history-filters {
    position: relative;
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    overflow: hidden;
    color: #1f2937;
    background: #fff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.scanner-ad-history-filters__glow {
    display: none;
}

.scanner-ad-history-filters__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    padding-top: calc(3.25rem + env(safe-area-inset-top, 0px));
    min-height: 100%;
    flex: 1 1 auto;
}

.scanner-ad-history-filters__head {
    text-align: center;
}

.scanner-ad-history-filters__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 auto 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.scanner-ad-history-filters__title {
    margin: 0;
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    font-weight: 800;
    line-height: 1.15;
    text-wrap: balance;
}

.scanner-ad-history-filters__lead {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #4b5563;
}

.scanner-ad-history-filters__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.scanner-ad-history-filters__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #374151;
}

.scanner-ad-history-filters__features i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.1rem;
    color: #2563eb;
}

.scanner-ad-history-filters__hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
    text-align: center;
    border-radius: 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.scanner-ad-history-filters__cta {
    font-weight: 700;
    font-size: 1rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.scanner-ad-history-filters__cta-icon {
    font-size: 1.15rem;
}

/* —— Pub image partenaire (drawer post-scan) —— */
.scanner-ad-custom-image {
    position: relative;
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.scanner-ad-custom-image__inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100%;
}

.scanner-ad-custom-image__link {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scanner-ad-custom-image__link:active {
    transform: scale(0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.scanner-ad-custom-image__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70dvh;
    object-fit: contain;
    margin: 0 auto;
}

#distinctive-signs-drawer select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Tiroir filtres — <select> en pilule + chevron cohérent */
#filter-drawer select.filter-drawer-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
}

/* Tiroir filtres (non-premium) : un seul flou + voile bleu ; CTA lock sans 2e voile blanc */
.all-filters-blur-wrapper {
    position: relative;
}
.all-filters-blur-stack {
    position: relative;
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}
.all-filters-blur-stack::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(37, 99, 235, 0.28);
    pointer-events: none;
}
#filter-drawer .premium-overlay-lock-all {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: transparent;
}

#distinctive-signs-btn {
    animation: buttonPush 0.3s ease-out;
}

#distinctive-signs-btn:active {
    animation: buttonPush 0.3s ease-out;
}

/* Distinctive Signs Filter Animation */
#distinctive-signs-filters {
    max-height: 0;
    opacity: 0;
    padding: 0 1rem;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#distinctive-signs-filters.expanded {
    max-height: 3000px;
    opacity: 1;
    padding: 1rem;
}

#distinctive-signs-caret {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#distinctive-signs-caret.rotated {
    transform: rotate(180deg);
}


/* Hexagon Badge Styles */
.hexagon-wrapper {
    position: relative;
    width: 80px;
    height: 92px; /* Aspect ratio for hexagon */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.hexagon-wrapper:active {
    transform: scale(0.95);
}

.hexagon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e5e7eb; /* Gray-200 default locked */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hexagon-inner {
    width: 90%;
    height: 90%;
    background-color: #f3f4f6; /* Gray-100 */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Badge Levels */
.badge-bronze .hexagon {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}
.badge-bronze .hexagon-inner {
    background: linear-gradient(135deg, #fff, #f0e6dc);
    color: #8b4513;
}

.badge-silver .hexagon {
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
}
.badge-silver .hexagon-inner {
    background: linear-gradient(135deg, #fff, #f5f5f5);
    color: #616161;
}

.badge-gold .hexagon {
    background: linear-gradient(135deg, #ffd700, #b8860b);
}
.badge-gold .hexagon-inner {
    background: linear-gradient(135deg, #fff, #fff8e1);
    color: #b8860b;
}

.badge-locked .hexagon {
    background: #d1d5db;
}
.badge-locked .hexagon-inner {
    background: #f3f4f6;
    color: #9ca3af;
}

.badge-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.badge-label {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
}

/* Custom Gradient for Distinctive Signs Button (matching Scan Button) */
.bg-gradient-scan {
    background: linear-gradient(135deg, #7C3AED 45%, #3B82F6 100%);
}

/* Lignes d’état sous le titre Carte Seeyoo */
.map-layer-status-line {
    margin: 0;
}
.map-layer-status-word--on {
    background: linear-gradient(135deg, #7C3AED 45%, #3B82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.map-layer-status-word--off {
    color: #9ca3af;
    -webkit-text-fill-color: #9ca3af;
    background: none;
}

/* Boutons flottants carte (heatmap, croisements) — ON = bleu centrage, OFF = gris + icône dégradé */
.map-floating-toggle-btn--off,
.show-encounter-btn--off,
.show-heatmap-btn--off,
.show-important-places-btn--off {
    background-color: #e5e7eb;
}
/* ON = même rendu que #center-on-me-crushmap-btn (bg-gradient-scan + icône blanche) */
.map-floating-toggle-btn--on,
.show-encounter-btn--on,
.show-heatmap-btn--on,
.show-important-places-btn--on,
#map-floating-controls .map-floating-toggle-btn.bg-gradient-scan {
    background: linear-gradient(135deg, #7C3AED 45%, #3B82F6 100%);
    background-color: transparent;
}
.map-floating-toggle-btn--off .map-floating-toggle-btn__icon,
.show-encounter-btn--off .show-encounter-btn__icon,
.show-encounter-btn--off .map-floating-toggle-btn__icon,
.show-heatmap-btn--off .show-heatmap-btn__icon,
.show-heatmap-btn--off .map-floating-toggle-btn__icon,
.show-important-places-btn--off .show-important-places-btn__icon,
.show-important-places-btn--off .map-floating-toggle-btn__icon {
    background: linear-gradient(135deg, #7C3AED 45%, #3B82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.map-floating-toggle-btn--on .map-floating-toggle-btn__icon,
.show-encounter-btn--on .show-encounter-btn__icon,
.show-encounter-btn--on .map-floating-toggle-btn__icon,
.show-heatmap-btn--on .show-heatmap-btn__icon,
.show-heatmap-btn--on .map-floating-toggle-btn__icon,
.show-important-places-btn--on .show-important-places-btn__icon,
.show-important-places-btn--on .map-floating-toggle-btn__icon {
    color: #fff;
    -webkit-text-fill-color: #fff;
    background: none;
}

/* Marqueurs croisements sur la carte */
.seeyoo-map-encounter-marker-wrap,
.seeyoo-map-encounter-cluster-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.seeyoo-map-encounter-photo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 3px solid #fff;
    overflow: hidden;
    background-color: #e5e7eb;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    pointer-events: auto;
    cursor: pointer;
    transform-origin: center center;
}

.seeyoo-map-encounter-photo-wrap--recent-crossing {
    background-color: #1f2937;
}

.seeyoo-map-encounter-photo__bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e5e7eb;
    pointer-events: none;
    user-select: none;
}

/* Flou anti-stalker : aligné sur .user-card-meeting--recent-crossing__img */
.seeyoo-map-encounter-photo-wrap--recent-crossing .seeyoo-map-encounter-photo__bg {
    filter: blur(15px);
    -webkit-filter: blur(15px);
    transform: scale(1.12);
    transform-origin: center center;
}

/* Entrée des photos croisement sur la carte (rebond léger, calqué sur meetingCardScaleBounce) */
@keyframes mapEncounterPhotoBounce {
    0% {
        transform: scale(0);
        opacity: 0.85;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    80% {
        transform: scale(0.96);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.seeyoo-map-encounter-photo-wrap--entrance {
    animation: mapEncounterPhotoBounce 320ms cubic-bezier(0.34, 1.45, 0.55, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .seeyoo-map-encounter-photo-wrap--entrance {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .seeyoo-map-encounter-photo-wrap--recent-crossing .seeyoo-map-encounter-photo__bg {
        transform: none;
    }
}
.seeyoo-map-encounter-cluster {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 3px solid #fff;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    pointer-events: auto;
    cursor: pointer;
}

.seeyoo-map-poi-cluster-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.seeyoo-map-poi-cluster {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 3px solid #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    pointer-events: auto;
    cursor: pointer;
}

/* ============================================ */
/* HEEBOO IA CHAT STYLES */
/* ============================================ */

/* Avatars Heeboo / Eeboo — fond blanc (PNG transparents) */
img[src*="UI/Eeboo/eeboo_"],
img.cassiopee-eeboo-avatar,
#cassiopee-header-avatar,
#cassiopee-chat-avatar,
#cassiopee-toast-avatar,
#cassiopee-btn img {
    background-color: #fff;
}

/* Chat Modal */
#cassiopee-modal {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

/* Messages Container */
#cassiopee-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Écart avec la barre de saisie / actions en bas */
    margin-bottom: 1rem;
}

/* Message Bubble */
.cassiopee-message {
    display: flex;
    gap: 0.5rem;
    animation: slideInUp 0.3s ease-out;
    width: 100%;
}

.cassiopee-message.user {
    justify-content: flex-end;
}

.cassiopee-message.cassiopee {
    justify-content: flex-start;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    max-width: none;
    min-width: 50px;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.cassiopee-message.user .message-bubble {
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    color: white;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.cassiopee-message.cassiopee .message-bubble {
    background: #e5e7eb;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Message Avatar */
.cassiopee-message.cassiopee .message-avatar,
.cassiopee-message.loading .message-avatar,
#cassiopee-messages .cassiopee-mood-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden; /* Ensure image stays in circle */
}

/* Loading Indicator in Messages */
.cassiopee-message.loading .message-bubble {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.loading-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7C3AED;
    animation: bounce 1.4s infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { opacity: 0.5; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-8px); }
}

/* Input Focus Effects */
#cassiopee-input:focus {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Send Button Effects */
#cassiopee-send-btn {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cassiopee-send-btn:active {
    transform: scale(0.95);
}

#cassiopee-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    #cassiopee-modal .cassiopee-message.user {
        justify-content: flex-end;
    }
    
    #cassiopee-modal .cassiopee-message.cassiopee {
        justify-content: flex-start;
    }
}

/* Error Message */
.cassiopee-error {
    color: #dc2626;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    background: #fee2e2;
    border-left: 3px solid #dc2626;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Success Message */
.cassiopee-success {
    color: #059669;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    background: #d1fae5;
    border-left: 3px solid #059669;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Action Button in Chat */
.cassiopee-action-button {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin: 0.25rem;
}

.cassiopee-action-button:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
}

.cassiopee-action-button:active {
    transform: translateY(0);
}

/* History card seen state */
.history-seen {
    opacity: 0.5;
    filter: grayscale(50%);
}

/* ========== SHIMMER EFFECT - NEW/UNSEEN CARDS ========== */
.card-unseen-shimmer {
    position: relative;
    overflow: hidden;
}
.card-unseen-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        #dbeafe 0%,
        #dbeafe 30%,
        #ede9fe 50%,
        #dbeafe 70%,
        #dbeafe 100%
    );
    background-size: 300% 100%;
    animation: img-shimmer 1.8s ease-in-out infinite;
    opacity: 0.4;
}
.card-unseen-shimmer.shimmer-fade-out::after {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .card-unseen-shimmer::after {
        animation: none !important;
        background: #dbeafe !important;
    }
}

/* ========== HISTORIQUE — RÉVÉLATION SIMPLE (opacité + shiny, sans scale / vibration / particules) ========== */
.history-card-unseen-simple {
    position: relative;
    z-index: 0;
}
.history-card-unseen-simple::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 21;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 22%,
        rgba(219, 234, 254, 0.92) 40%,
        rgba(237, 233, 254, 0.98) 50%,
        rgba(219, 234, 254, 0.92) 60%,
        rgba(255, 255, 255, 0.45) 78%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 300% 100%;
    opacity: 1;
}
.user-card-meeting.history-card-unseen-simple > img {
    position: relative;
    z-index: 0;
    opacity: 0 !important;
    transition: none !important;
}
.user-card-meeting.history-card-unseen-simple .user-card-meeting-top,
.user-card-meeting.history-card-unseen-simple .user-card-meeting-bottom {
    z-index: 2;
}
.user-card-meeting.history-card-unseen-simple.history-card-unseen-simple-play > img {
    animation: history-simple-img-fade-in 0.95s ease-out var(--history-simple-stagger, 0ms) forwards !important;
}
.history-card-unseen-simple.history-card-unseen-simple-play::after {
    animation: history-simple-shiny-out 1s ease-out var(--history-simple-stagger, 0ms) forwards;
}

@keyframes history-simple-img-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes history-simple-shiny-out {
    0% {
        opacity: 1;
        background-position: 100% 50%;
    }
    50% {
        opacity: 1;
        background-position: 0% 50%;
    }
    80% {
        opacity: 0.75;
        background-position: 0% 50%;
    }
    100% {
        opacity: 0;
        background-position: 0% 50%;
    }
}

/* ========== MATCHS SEEYOO — RÉVÉLATION CARTE TCG (scale, vibration, particules) ========== */
.history-card-unseen-tcg {
    position: relative;
    transform: scale(0);
    transform-origin: center center;
    will-change: transform;
    z-index: 0;
}
/* ::before = dos blanc : surclassé plus bas (.user-card-meeting + exception :has(is-loaded)) */
.history-card-unseen-tcg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    border-radius: inherit;
    background: #ffffff;
    opacity: 1;
}
.history-card-unseen-tcg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 21;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.45) 22%,
        rgba(219, 234, 254, 0.92) 40%,
        rgba(237, 233, 254, 0.98) 50%,
        rgba(219, 234, 254, 0.92) 60%,
        rgba(255, 255, 255, 0.45) 78%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 300% 100%;
    opacity: 1;
}

.history-card-unseen-tcg.history-card-tcg-reveal-play {
    overflow: visible !important;
    z-index: 12;
    isolation: isolate;
    /* Évite fil noir / déchirure sur les arrondis (transform + overflow visible + compositing) */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Même teinte que #page-history (bg-gray-50) : les coins du calque ne laissent pas voir du « vide » noir */
    background-color: #f9fafb;
    /* delay = --history-tcg-stagger (plusieurs nouvelles cartes visibles : 100 ms entre chaque) */
    animation: history-tcg-card-main 2.6s cubic-bezier(0.22, 0.92, 0.34, 1) var(--history-tcg-stagger, 0ms) forwards;
}
.history-card-unseen-tcg.history-card-tcg-reveal-play::before {
    animation: history-tcg-white-out 2.6s ease-out var(--history-tcg-stagger, 0ms) forwards;
}
.history-card-unseen-tcg.history-card-tcg-reveal-play::after {
    animation: history-tcg-shiny-out 2.6s ease-out var(--history-tcg-stagger, 0ms) forwards;
}

/* Photo invisible jusqu’au scale final ; z-index 0 + translateZ(0) pour un calque composite sous les particules */
/* Seeyoo matchs : image dans <a>, pas enfant direct de la carte */
.user-card-meeting.history-card-unseen-tcg > img,
.user-card-meeting.history-card-unseen-tcg a > img {
    position: relative;
    z-index: 0;
    transform: translateZ(0);
    opacity: 0 !important;
    transition: none !important;
}
.user-card-meeting.history-card-unseen-tcg .user-card-meeting-top,
.user-card-meeting.history-card-unseen-tcg .user-card-meeting-bottom {
    z-index: 2;
}
.user-card-meeting.history-card-unseen-tcg.history-card-tcg-reveal-play > img,
.user-card-meeting.history-card-unseen-tcg.history-card-tcg-reveal-play a > img {
    /* linear : opacité 0→1 proportionnelle au temps sur la phase scale finale (80–100 %) */
    animation: history-tcg-img-fade-in 2.6s linear var(--history-tcg-stagger, 0ms) forwards !important;
}

/* Photo un peu après le début de l’éclat particules pour éviter qu’elle ne les recouvre visuellement */
@keyframes history-tcg-img-fade-in {
    0%,
    82% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Particules : calque au-dessus de tout le contenu carte (image, bandeaux, pseudo overlays) */
.history-tcg-particles-burst {
    position: absolute;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    overflow: visible;
    isolation: isolate;
    transform: translate3d(0, 0, 1px);
    backface-visibility: hidden;
}
.history-card-unseen-tcg .history-tcg-particle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 28% 28%, #ffffff 0%, #f5f3ff 35%, #c4b5fd 65%, #7c3aed 100%);
    box-shadow:
        0 0 4px 2px rgba(255, 255, 255, 1),
        0 0 14px 4px rgba(196, 181, 253, 0.95),
        0 0 28px 8px rgba(124, 58, 237, 0.65),
        0 0 42px 12px rgba(167, 139, 250, 0.45);
    opacity: 0;
    transform: translate3d(0, 0, 2px) rotate(var(--history-tcg-part-angle, 0deg)) translateY(0) scale(0.35);
    will-change: transform, opacity;
}
/* Une particule sur deux : variante plus large pour densifier l’éclat */
.history-card-unseen-tcg .history-tcg-particle:nth-child(even) {
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    box-shadow:
        0 0 3px 1px rgba(255, 255, 255, 0.95),
        0 0 12px 5px rgba(236, 72, 153, 0.5),
        0 0 24px 10px rgba(167, 139, 250, 0.55);
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #fce7f3 45%, #a78bfa 100%);
}
.history-card-unseen-tcg.history-card-tcg-reveal-play .history-tcg-particle {
    /* Durée un peu plus longue pour une trajectoire plus grande */
    animation: history-tcg-particle-burst 0.72s linear forwards;
    animation-delay: var(--history-tcg-p-delay, 2.08s);
}

@keyframes history-tcg-particle-burst {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 2px) rotate(var(--history-tcg-part-angle, 0deg)) translateY(-2px) scale(0.2);
    }
    12% {
        opacity: 1;
    }
    76% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(0, 0, 2px) rotate(var(--history-tcg-part-angle, 0deg))
            translateY(calc(-1 * var(--history-tcg-part-travel, 200px))) scale(0.95);
    }
}

/* Grille historique : ne pas rogner les particules qui dépassent de la carte (Tailwind [&>*]:overflow-hidden) */
#history-by-location-container .grid:has(.history-card-tcg-reveal-play) {
    overflow: visible;
}

/* Vibration : amplitude croissante (petite → forte), pic vers le pulse scale 1,2 ; pas 2,5 % */
@keyframes history-tcg-card-main {
    0% {
        transform: scale(0) rotate(0deg);
    }
    2.5% {
        transform: scale(0.07) rotate(0.12deg);
    }
    5% {
        transform: scale(0.14) rotate(-0.18deg);
    }
    7.5% {
        transform: scale(0.21) rotate(0.24deg);
    }
    10% {
        transform: scale(0.29) rotate(-0.3deg);
    }
    12.5% {
        transform: scale(0.36) rotate(0.36deg);
    }
    15% {
        transform: scale(0.43) rotate(-0.42deg);
    }
    17.5% {
        transform: scale(0.5) rotate(0.48deg);
    }
    20% {
        transform: scale(0.57) rotate(-0.54deg);
    }
    22.5% {
        transform: scale(0.64) rotate(0.6deg);
    }
    25% {
        transform: scale(0.7) rotate(-0.66deg);
    }
    27.5% {
        transform: scale(0.76) rotate(0.72deg);
    }
    30% {
        transform: scale(0.81) rotate(-0.78deg);
    }
    32.5% {
        transform: scale(0.86) rotate(0.84deg);
    }
    35% {
        transform: scale(0.9) rotate(-0.9deg);
    }
    37.5% {
        transform: scale(0.93) rotate(0.96deg);
    }
    40% {
        transform: scale(0.96) rotate(-1.02deg);
    }
    42% {
        transform: scale(1) rotate(1.08deg);
    }
    44% {
        transform: scale(1) rotate(-1.15deg);
    }
    46% {
        transform: scale(1) rotate(1.25deg);
    }
    48% {
        transform: scale(1) rotate(-1.35deg);
    }
    50% {
        transform: scale(1) rotate(1.46deg);
    }
    52% {
        transform: scale(1) rotate(-1.56deg);
    }
    54% {
        transform: scale(1) rotate(1.66deg);
    }
    56% {
        transform: scale(1) rotate(-1.77deg);
    }
    58% {
        transform: scale(1) rotate(1.87deg);
    }
    60% {
        transform: scale(1) rotate(-1.98deg);
    }
    62% {
        transform: scale(1) rotate(2.08deg);
    }
    64% {
        transform: scale(1) rotate(-2.19deg);
    }
    66% {
        transform: scale(1) rotate(2.29deg);
    }
    68% {
        transform: scale(1) rotate(-2.4deg);
    }
    70% {
        transform: scale(1) rotate(2.5deg);
    }
    72% {
        transform: scale(1.05) rotate(-2.1deg);
    }
    74% {
        transform: scale(1.1) rotate(1.65deg);
    }
    76% {
        transform: scale(1.15) rotate(-1.1deg);
    }
    78% {
        transform: scale(1.18) rotate(0.55deg);
    }
    80% {
        transform: scale(1.2) rotate(0deg);
    }
    90% {
        transform: scale(0.98) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Overlay blanc : plein jusqu’à la fin de la vibration, puis disparition avec le pulse */
@keyframes history-tcg-white-out {
    0%,
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Reflet shiny : balayage puis fondu avec l’overlay */
@keyframes history-tcg-shiny-out {
    0% {
        opacity: 1;
        background-position: 100% 50%;
    }
    55% {
        opacity: 1;
        background-position: 0% 50%;
    }
    70% {
        opacity: 0.85;
        background-position: 0% 50%;
    }
    100% {
        opacity: 0;
        background-position: 0% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .history-card-unseen-simple::after {
        opacity: 0 !important;
        animation: none !important;
    }
    .history-card-unseen-simple.history-card-unseen-simple-play::after {
        animation: none !important;
    }
    .user-card-meeting.history-card-unseen-simple > img,
    .user-card-meeting.history-card-unseen-simple.history-card-unseen-simple-play > img {
        opacity: 1 !important;
        animation: none !important;
    }
    .history-card-unseen-tcg {
        transform: scale(1);
    }
    .history-card-unseen-tcg::before,
    .history-card-unseen-tcg::after {
        opacity: 0 !important;
        animation: none !important;
    }
    .history-card-unseen-tcg.history-card-tcg-reveal-play {
        animation: none !important;
    }
    .user-card-meeting.history-card-unseen-tcg > img,
    .user-card-meeting.history-card-unseen-tcg a > img,
    .user-card-meeting.history-card-unseen-tcg.history-card-tcg-reveal-play > img,
    .user-card-meeting.history-card-unseen-tcg.history-card-tcg-reveal-play a > img {
        opacity: 1 !important;
        animation: none !important;
    }
    .history-tcg-particles-burst {
        display: none !important;
    }
}

/* ========== MAP LOADING SHIMMER ========== */
#meetings-heatmap-div {
    position: relative;
}
#meetings-heatmap-div::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        #dbeafe 0%,
        #dbeafe 30%,
        #ede9fe 50%,
        #dbeafe 70%,
        #dbeafe 100%
    );
    background-size: 300% 100%;
    animation: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--map-loader-in-ms, 720ms) cubic-bezier(0.34, 1.45, 0.55, 1), visibility 0s;
}
#meetings-heatmap-div.map-loading-shimmer::after {
    animation: img-shimmer 1.8s ease-in-out infinite;
    opacity: 0.7;
    visibility: visible;
}
#meetings-heatmap-div.map-loading-shimmer--exit::after {
    animation: none;
    opacity: 0;
    transition: opacity var(--map-loader-out-ms, 600ms) cubic-bezier(0.34, 1.45, 0.55, 1);
}
@media (prefers-reduced-motion: reduce) {
    #meetings-heatmap-div.map-loading-shimmer::after {
        animation: none !important;
        background: #dbeafe !important;
    }
}

/* CSS removed for navbar recreation */

/* Distinctive Signs Button Position */
#toggle-distinctive-signs-filter {
    transform: translateY(-10px);
}

/* Hide last scan info */
#last-scan-info {
    display: none;
}

/* ========== ANIMATED SCANNER BACKGROUND ========== */

/* Container for animated background */
.animated-bg-container {
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(124, 58, 237, 0.05) 40%, rgba(59, 130, 246, 0.05) 60%, #FFFFFF 100%);
    z-index: 0;
    overflow: visible;
    position: absolute;
    inset: 0;
}

/* Inner shadow overlay using pseudo-element specifically for white edges */
.animated-bg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* White fade at top (10%) only - Removed bottom fade for full screen effect */
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0) 15%, 
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 5; /* Above bubbles */
}

/* Floating bubbles - JS Driven Transitions */
.floating-bubble {
    position: absolute;
    border-radius: 50%;
    /* Default Purple */
    background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.05));
    pointer-events: none;
    will-change: transform, opacity, top, left;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.15);
    
    /* Smooth transition for top/left changes */
    transition: top var(--move-duration, 15s) ease-in-out, left var(--move-duration, 15s) ease-in-out;
}

.floating-bubble.bubble-1 {
    width: 120px;
    height: 120px;
    /* Initial position set by JS */
}

.floating-bubble.bubble-2 {
    width: 80px;
    height: 80px;
    /* Blue */
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.05));
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
}

.floating-bubble.bubble-3 {
    width: 150px;
    height: 150px;
    /* Purple Light */
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.04));
    opacity: 0.4;
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.15);
}

.floating-bubble.bubble-4 {
    width: 100px;
    height: 100px;
    /* Blue-Purple Mix */
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.25), rgba(99, 102, 241, 0.04));
    box-shadow: 0 0 28px rgba(99, 102, 241, 0.18);
}

.floating-bubble.bubble-5 {
    width: 90px;
    height: 90px;
    /* Purple */
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.04));
    box-shadow: 0 0 26px rgba(139, 92, 246, 0.18);
}

.floating-bubble.bubble-6 {
    width: 60px;
    height: 60px;
    /* Light Blue */
    background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.05));
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.2);
}

.floating-bubble.bubble-7 {
    width: 110px;
    height: 110px;
    /* Deep Blue */
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.04));
    box-shadow: 0 0 32px rgba(37, 99, 235, 0.15);
}

.floating-bubble.bubble-8 {
    width: 75px;
    height: 75px;
    /* Indigo */
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.04));
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}

/* Floating orbs (larger glow effects) */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
    filter: blur(50px);
}

.floating-orb.orb-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 5%;
    background: rgba(124, 58, 237, 0.15);
    animation: float-slow 25s ease-in-out infinite;
    animation-delay: 0s;
}

.floating-orb.orb-2 {
    width: 250px;
    height: 250px;
    bottom: 5%;
    left: 2%;
    background: rgba(59, 130, 246, 0.2);
    animation: float-slow 28s ease-in-out infinite reverse;
    animation-delay: 5s;
}

/* Random Float 1: Vertical biased */
@keyframes float-random-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -20px); }
    50% { transform: translate(-5px, -40px); }
    75% { transform: translate(-10px, -20px); }
}

/* Random Float 2: Wide Horizontal */
@keyframes float-random-2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -15px); }
    66% { transform: translate(-20px, 10px); }
}

/* Random Float 3: Circular motion */
@keyframes float-random-3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, 20px) rotate(5deg); }
    50% { transform: translate(0, 40px) rotate(0deg); }
    75% { transform: translate(-20px, 20px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Float-slow animation for large orbs */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-40px) scale(1.1);
        opacity: 0.7;
    }
}

/* Pulsing effect for depth */
@keyframes pulse-gentle {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

.floating-bubble {
    animation-iteration-count: infinite;
}

/* Faster animation during scan - Individual speeds to maintain randomness */
/* We speed up transitions, JS will trigger moves frequently */
.animated-bg-container.is-scanning .floating-bubble {
    transition: top var(--move-duration) ease-in-out, left var(--move-duration) ease-in-out !important;
}

.animated-bg-container.is-scanning .floating-orb {
    animation-duration: 3s !important;
}

.floating-orb {
    animation-iteration-count: infinite;
}


/* Disable long press on images */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* TCG Card Styles (Codex) */
.tcg-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.tcg-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.tcg-card-container {
    width: 85%;
    max-width: 300px;
    perspective: 1000px;
}

.tcg-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    border-radius: 20px;
    border: 3px solid #d4af37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4), inset 0 0 50px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
    transform-origin: center center;
    transform: scale(0.2) rotateY(180deg);
    transform-style: preserve-3d;
    opacity: 0;
    transition: all 0.3s ease-out; /* Smooth no bounce */
}
.tcg-modal.active .tcg-card {
    transform: scale(1) rotateY(0);
    opacity: 1;
}

/* Card Header (Name) */
.tcg-card-header {
    background: linear-gradient(to bottom, #d4af37, #b4942b);
    padding: 8px 15px;
    text-align: center;
    border-bottom: 2px solid #8a701e;
}
.tcg-card-name {
    color: #1a1a1a;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

/* Card Image Area */
.tcg-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio */
    background: #000;
    border-bottom: 3px solid #d4af37;
}
.tcg-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tcg-rarity-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #d4af37;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #d4af37;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Card Description Area */
.tcg-card-body {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
}

.tcg-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tcg-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    font-size: 0.9rem;
}
.tcg-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tcg-label {
    color: #aaaaaa;
    font-size: 0.85rem;
}
.tcg-value {
    color: #ffffff;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* Special "Captured" State */
.tcg-card.captured {
    border-color: #9333ea; /* Purple-600 */
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
}
.tcg-card.captured .tcg-card-header {
    background: linear-gradient(to bottom, #a855f7, #7e22ce); /* Purple-500 to Purple-700 */
    border-bottom-color: #581c87; /* Purple-900 */
}
/* Removed Stamp Styles */

/* ========== Seeyoo — système de boutons sy-btn (cohérence UX) ========== */
.sy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
    border-radius: 9999px; /* pilule */
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.sy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.sy-btn--block {
    width: 100%;
}

.sy-btn--spread {
    justify-content: space-between;
}

/* En-tête accordéon : pas de pilule en bas */
.sy-btn--collapsible-top {
    border-radius: 0.75rem 0.75rem 0 0;
}

.sy-btn--sm {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    border-radius: 9999px;
}

.sy-btn--primary {
    color: #fff;
    border: none;
    background: linear-gradient(90deg, #9333ea, #2563eb);
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}

.sy-btn--primary:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: scale(1.02);
}

.sy-btn--primary:active:not(:disabled) {
    transform: scale(0.98);
}

/* Secondary glass — fond sombre (auth, bannières) */
.sy-btn--secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sy-btn--secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

/* Blanc / texte violet sur dégradé auth */
.sy-btn--tertiary-inverse {
    color: #9333ea;
    background: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.sy-btn--tertiary-inverse:hover:not(:disabled) {
    background: #f4f4f5;
    transform: scale(1.02);
}

/* Blanc / texte dégradé bleu→violet (variante de tertiary-inverse).
   Le dégradé est appliqué sur un <span> interne (.sy-btn-gradient-text-inner),
   pas sur le bouton lui-même : `background` + `background-clip:text` sur le
   bouton entrerait en conflit avec son propre fond blanc. */
.sy-btn--white-gradient-text {
    background: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.sy-btn--white-gradient-text:hover:not(:disabled) {
    background: #f4f4f5;
    transform: scale(1.02);
}

.sy-btn-gradient-text-inner {
    background: linear-gradient(90deg, #2563eb, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Contour neutre */
.sy-btn--tertiary {
    color: #374151;
    background: #fff;
    border: 2px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sy-btn--tertiary:hover:not(:disabled) {
    background: #fafafa;
    border-color: #d4d4d8;
}

/* Annuler pleine largeur, fond gris clair */
.sy-btn--cancel {
    color: #374151;
    background: #f3f4f6;
    border: none;
    font-weight: 500;
}

.sy-btn--cancel:hover:not(:disabled) {
    background: #e5e7eb;
}

/* Refus / secondaire neutre foncé */
.sy-btn--neutral-dark {
    color: #fff;
    background: #6b7280;
    border: none;
    font-weight: 600;
}

.sy-btn--neutral-dark:hover:not(:disabled) {
    background: #4b5563;
}

/* Violet plein (alternative au dégradé, modales) */
.sy-btn--solid-purple {
    color: #fff;
    background: #9333ea;
    border: none;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.25);
}

.sy-btn--solid-purple:hover:not(:disabled) {
    background: #7e22ce;
    transform: scale(1.02);
}

/* Lien sur fond sombre (auth) */
.sy-btn--ghost-auth {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0.25rem;
}

.sy-btn--ghost-auth:hover:not(:disabled) {
    color: #fff;
}

.sy-btn--ghost-auth-sm {
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: underline;
    opacity: 0.9;
}

/* Icône retour — fond sombre */
.sy-btn--icon-auth {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.25rem;
    border-radius: 9999px;
    margin-left: -0.25rem;
}

.sy-btn--icon-auth:hover:not(:disabled) {
    color: #fff;
}

/* Icône — fond clair */
.sy-btn--icon-light {
    background: transparent;
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 9999px;
}

.sy-btn--icon-light:hover:not(:disabled) {
    background: #f3f4f6;
    color: #374151;
}

/* Destructif */
.sy-btn--danger {
    color: #dc2626;
    background: #fff;
    border: 2px solid #fecaca;
}

.sy-btn--danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
}

.sy-btn--danger-solid {
    color: #fff;
    background: #dc2626;
    border: none;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.sy-btn--danger-solid:hover:not(:disabled) {
    background: #b91c1c;
    transform: scale(1.02);
}

.sy-btn--danger-ghost {
    background: transparent;
    border: none;
    color: #f87171;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.sy-btn--danger-ghost:hover:not(:disabled) {
    color: #dc2626;
}

/* Succès / conversion (CTA positif distinct du dégradé brand) */
.sy-btn--success {
    color: #fff;
    background: linear-gradient(90deg, #22c55e, #059669);
    border: none;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.sy-btn--success:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: scale(1.02);
}

/* FAB rond violet (envoi chat, etc.) */
.sy-btn--fab-primary {
    padding: 0.5rem;
    border-radius: 9999px;
    background: #9333ea;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.35);
}

.sy-btn--fab-primary:hover:not(:disabled) {
    background: #7e22ce;
}

/* Avertissement (suspendre abonnement) */
.sy-btn--warn {
    color: #fff;
    background: #f97316;
    border: none;
}

.sy-btn--warn:hover:not(:disabled) {
    background: #ea580c;
}

/* Réactivation abonnement */
.sy-btn--resume {
    color: #fff;
    background: #22c55e;
    border: none;
}

.sy-btn--resume:hover:not(:disabled) {
    background: #16a34a;
}

.sy-btn--danger-soft {
    color: #dc2626;
    background: #fef2f2;
    border: none;
    font-weight: 500;
}

.sy-btn--danger-soft:hover:not(:disabled) {
    background: #fee2e2;
}

/* Icône sur fond brand (toast bleu, etc.) */
.sy-btn--icon-on-brand {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.25rem;
    border-radius: 9999px;
    box-shadow: none;
    font-weight: 400;
}

.sy-btn--icon-on-brand:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

/* Fermeture modales / drawers / toasts — croix dans un rond dégradé bleu-violet */
.sy-btn.sy-btn--close-overlay {
    padding: 0;
    gap: 0;
    min-width: 3.5rem;
    min-height: 3.5rem;
    width: 3rem;
    height: 3rem;
    font-weight: 400;
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.sy-btn.sy-btn--close-overlay:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: scale(1.04);
}

.sy-btn.sy-btn--close-overlay:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

.sy-btn.sy-btn--close-overlay i {
    color: inherit;
}

/* Lien texte — accent violet (filtres, etc.) */
.sy-btn--ghost-link-purple {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #9333ea;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.25rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sy-btn--ghost-link-purple:hover:not(:disabled) {
    color: #7e22ce;
}

.sy-btn--ghost-muted {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.sy-btn--ghost-muted:hover:not(:disabled) {
    color: #374151;
}

/* Fiche abonnement mensuel : bordure animée via .sy-btn--gradient-border-anim (modules/gradientBorderAnimated.css) */
.premium-offer-card.sy-btn--gradient-border-anim {
    isolation: isolate;
}

/* Upsell premium (modale paramètres) : dépliage / repli animé en hauteur */
.premium-offer-collapsible-root {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease-in-out;
}
.premium-offer-collapsible-root.premium-offer-collapsible-root--open {
    grid-template-rows: 1fr;
}
.premium-offer-collapsible-root > .premium-offer-collapsible-measure {
    min-height: 0;
    overflow: hidden;
}

/* Boutons d’achat des fiches premium : pas d’ombre portée */
.premium-offer-card-panel .sy-btn--primary {
    box-shadow: none;
}
.premium-offer-card-panel .sy-btn--primary:hover:not(:disabled) {
    box-shadow: none;
}

/* Navbar Indicator Animations */
#nav-indicator {
    /* Fast transitions for caterpillar effect */
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-origin: center center;
    /* Center horizontally (-50%) and vertically centered from top:50% */
    transform: translate(-50%, -50%); 
    /* width value handled by tailwind classes or JS */
}

/* Ephemeral warning banner close animation */
.ephemeral-warning-banner {
    overflow: hidden;
    min-height: 3.5rem;
    height: auto;
    opacity: 1;
    transition: height 0.28s ease, opacity 0.2s ease;
    will-change: height, opacity;
}

.ephemeral-warning-banner.is-closing {
    min-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
}

.ephemeral-warning-banner .btn-close,
.ephemeral-warning-banner .btn-close:hover:not(:disabled) {
    transition: none !important;
    transform: translateY(-50%) !important;
    filter: none !important;
}

/* Zoom effect when on scanner */
#nav-indicator.on-scanner {
    /* Scale up significantly (Big Button Effect) */
    transform: translate(-50%, -50%) scale(1.5) !important;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
}

/* Removed .is-moving overrides as width is handled in JS */

/* CSS removed for navbar recreation */


/* iOS / VisionOS Liquid Glass Style */
.glass-liquid-pro {
    /* Gradient subtle pour donner du volume */
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.05) 100%
    ) !important;
    
    /* Flou ajusté (Signature Apple avec blur réduit) */
    backdrop-filter: blur(6px) saturate(190%) contrast(100%);
    -webkit-backdrop-filter: blur(6px) saturate(190%) contrast(100%);
    
    /* Bordures fines et lumineuses */
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    
    box-shadow:
        /* Ombre douce diffuse */
        0 15px 35px rgba(0, 0, 0, 0.15),
        
        /* Reflet interne haut (Lumière) */
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        
        /* Reflet interne bas (Profondeur) */
        inset 0 -1px 2px rgba(0, 0, 0, 0.05);

    position: relative;
    /* overflow: hidden; Removed to allow nav-indicator to pop out / glow */
}

/* ::before removed as it was unused and required overflow:hidden */


/* Smooth Image Loading with Shimmer */
.fade-on-load {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.fade-on-load.is-loaded {
    opacity: 1;
}

/* ========== IMAGE SHIMMER LOADING PLACEHOLDER ========== */
/* Shimmer animé via ::before sur les conteneurs d'images.
   L'image en fade-on-load (opacity:0) laisse voir le shimmer.
   Quand l'image charge (is-loaded → opacity:1), elle recouvre le shimmer.
   Le ::before est retiré via :has(img.is-loaded) pour les perfs. */

@keyframes img-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cartes utilisateurs (history + seeyoo/likes/matches) */
.user-card-meeting::before,
.user-card-match::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        #dbeafe 0%,
        #dbeafe 30%,
        #ede9fe 50%,
        #dbeafe 70%,
        #dbeafe 100%
    );
    background-size: 300% 100%;
    animation: img-shimmer 1.8s ease-in-out infinite;
}

/* Galerie photos (page profil) — shimmer indépendant sur chaque image */
.img-shimmer-wrapper {
    position: relative;
    overflow: hidden;
}
.img-shimmer-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        #dbeafe 0%,
        #dbeafe 30%,
        #ede9fe 50%,
        #dbeafe 70%,
        #dbeafe 100%
    );
    background-size: 300% 100%;
    animation: img-shimmer 1.8s ease-in-out infinite;
}

/* Arrêter le shimmer quand l'image est chargée (perf) */
.user-card-meeting:has(img.is-loaded)::before,
.user-card-match:has(img.is-loaded)::before {
    display: none;
}
/* TCG historique : le ::before sert au dos blanc, pas au shimmer — ne pas le masquer quand l’image est chargée */
.user-card-meeting.history-card-unseen-tcg::before {
    display: block !important;
    z-index: 20;
    background: #ffffff !important;
    background-size: auto !important;
    opacity: 1;
    content: '' !important;
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    animation: none !important;
}
.user-card-meeting.history-card-unseen-tcg.history-card-tcg-reveal-play::before {
    animation: history-tcg-white-out 2.6s ease-out forwards !important;
}
.user-card-meeting.history-card-unseen-tcg::after {
    z-index: 21;
}
.img-shimmer-wrapper:has(img.is-loaded)::before {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .user-card-meeting::before,
    .user-card-match::before,
    .img-shimmer-wrapper::before {
        animation: none !important;
        background: #dbeafe !important;
    }
}

/* ========== MAP LOADING SHIMMER ========== */
#encounter-detail-map {
    position: relative;
}

#encounter-detail-map::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        110deg,
        #dbeafe 0%,
        #dbeafe 30%,
        #ede9fe 50%,
        #dbeafe 70%,
        #dbeafe 100%
    );
    background-size: 300% 100%;
    animation: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms ease, visibility 200ms ease;
}

#encounter-detail-map.map-loading::before {
    animation: img-shimmer 1.8s ease-in-out infinite;
    opacity: 0.5;
    visibility: visible;
}

/* Gradient Text (Same as Scanner Button) */
.text-gradient-scan {
    background: linear-gradient(135deg, #7C3AED 45%, #3B82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

/* Match Cards - Bigger than regular cards (same ratio, larger size) */
.user-card-match {
    width: 12rem !important; /* Équivalent à w-48 */
    height: auto !important;
}

/* Bottom Navbar - toujours au-dessus de tout */
#bottom-navbar {
    z-index: 9999 !important;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid rgba(229, 231, 235, 0.70) !important;
}

/* Bandeau POI / ville — bas gauche ; droite réservée à #map-floating-controls (right-4 + w-12 + marge) */
.map-location-banner {
    --map-floating-controls-reserve: calc(1rem + 3rem + 0.75rem); /* right-4 + bouton h-12/w-12 + gap */
    bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    right: var(--map-floating-controls-reserve);
    transform: none;
    width: auto;
    max-width: none;
    text-align: center;
}

.map-location-banner__poi,
.map-location-banner__city {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Responsive: 2 colonnes sur très petits écrans (< 350px) */
@media (max-width: 349px) {
    /* Grille Seeyoo (Likes reçus) */
    #seeyoo-users-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* Grilles History (Personnes croisées par lieu) */
    #history-by-location-container .grid.grid-cols-3 {
        grid-template-columns: 1fr 1fr !important;
    }
}
/* ========================================
   MODE DISCRET - Lecteur musique camouflé
   ======================================== */

/* Layout principal du mode discret */
.discrete-mode {
    background: transparent !important;
    min-height: 100vh;
}

/* Fond dynamique flou basé sur les couleurs de la pochette */
/* Fond dynamique flou : couches A/B avec crossfade */
.discrete-dynamic-bg-layer {
    background: linear-gradient(135deg, rgb(26,26,46) 0%, rgb(15,52,96) 50%, rgb(26,26,46) 100%);
    filter: blur(80px) saturate(1.5);
    transform: scale(1.3);
    transition: opacity 1s ease;
}

#discrete-dynamic-bg-overlay {
    backdrop-filter: blur(0px);
}

/* Pochette d'album — overflow visible pour les transitions depuis hors-écran (voir slideDiscreteCover) */
.discrete-album-cover {
    width: 85vw;
    aspect-ratio: 1 / 1;
    max-height: calc(100vh - 80px - 350px);
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}

.discrete-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.discrete-album-cover img.discrete-cover-layer {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Infos de la piste */
.discrete-track-info {
    text-align: left;
}

.discrete-track-info p {
    margin: 0;
}

/* Barre de progression : temps réel (lecture simulée), pas de transition CSS */
#discrete-progress-bar.discrete-progress-bar--live {
    transition: none !important;
}

/* Actions like/dislike */
.discrete-actions button {
    border: none;
    background: none;
    cursor: pointer;
}

.discrete-actions button:active {
    transform: scale(0.9);
    transition: transform 0.1s;
}

/* Bouton play/pause (camouflé en scanner) */
.discrete-play-btn {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: white !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
    /* Override scanner button styles */
    animation: none !important;
    --color-1: transparent !important;
    --color-2: transparent !important;
}

/* Ne masquer que ::before (déco éventuelle) ; l’anneau 2h est le nœud #scanner-last-scan-visibility-ring dans le bouton. */
.discrete-play-btn::before {
    display: none !important;
}

.discrete-play-btn:active {
    transform: scale(0.92) !important;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15) !important;
}

/* Boutons navigation prev/next */
.discrete-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.15s ease;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.discrete-nav-btn:active {
    transform: scale(0.85);
}

/* Barre de progression */
#discrete-progress-container {
    position: relative;
}

#discrete-progress-bar {
    transition: width 0.1s linear;
}

/* Override du scanner container en mode discret */
.discrete-mode #scanner-container {
    width: 64px !important;
    height: 64px !important;
}

/* Satellites humeur en mode discret : conteneur garde 64 px, satellites debordent via overflow: visible. */
.discrete-mode #scanner-container.scanner-mood-open {
    overflow: visible;
}

.discrete-mode #scanner-container::before,
.discrete-mode #scanner-container::after {
    display: none !important;
}

/* Désactiver les animations scanner en mode discret */
.discrete-mode .scanner-wave-pair {
    display: none !important;
}

.discrete-mode #scanner-button.gps-high-accuracy,
.discrete-mode #scanner-button.gps-low-accuracy,
.discrete-mode #scanner-button.gps-no-accuracy {
    border-width: 0 !important;
    border-color: transparent !important;
}

/* Navbar camouflée */
.discrete-navbar {
    background: rgba(26, 26, 46, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Mode discret : header réduit au bouton paramètres (modules/discreteModePrivacy.js) */
#app-container > header.discrete-header-privacy {
    justify-content: flex-end;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

#app-container > header.discrete-header-privacy #logo-header,
#app-container > header.discrete-header-privacy #header-qr-scan-btn,
#app-container > header.discrete-header-privacy #cassiopee-btn,
#app-container > header.discrete-header-privacy #notifications-btn,
#app-container > header.discrete-header-privacy #nav-btn-profile {
    display: none !important;
}

/* Nouveau conteneur overlay séparé de la galerie, avec fond flou */
.profile-overlay-container {
    position: relative;
    width: 100%;
    overflow: visible; /* sticky #profile-info-overlay */
    /* Remonte légèrement pour coller à la galerie sans gap (au lieu d'être un enfant absolu) ; transition + reset --stuck : bloc principal plus haut */
    margin-top: -30px;
    transition: margin-top 0.3s ease;
}

.profile-overlay-bg-clip {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.profile-overlay-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px); /* L'effet de fond flouté derrière l'overlay profil. */
}

/* ========== HISTORIQUE — CROISEMENT < 12H : carte anonymisée ========== */
/* Anti-stalker : croisement < 12 h — photo basse résolution (blur_private_photo.php, ≤ 20 px)
   + filter CSS blur(50px) sur l'img. Cf. modules/historyRecentCrossingBlur.js. */
.user-card-meeting--recent-crossing {
    background-color: #1f2937;
    overflow: hidden;
    cursor: pointer;
    /* Annule explicitement le hover lift du .user-card-meeting parent : pas d'interaction. */
    animation: none !important;
}
.user-card-meeting--recent-crossing:hover,
.user-card-meeting--recent-crossing:focus-visible,
.user-card-meeting--recent-crossing:focus-within {
    animation: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
.user-card-meeting--recent-crossing__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    filter: blur(15px);
    -webkit-filter: blur(15px);
    transform: scale(1.12);
    transform-origin: center center;
}
.user-card-meeting--recent-crossing__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.20) 50%,
        rgba(0, 0, 0, 0.35) 100%
    );
}
.user-card-meeting--recent-crossing__clock {
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}
.user-card-meeting--recent-crossing__remaining {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
    .user-card-meeting--recent-crossing,
    .user-card-meeting--recent-crossing * {
        animation: none !important;
        transition: none !important;
    }
}

#chat-thread-panel:not(.-translate-x-full) {
    pointer-events: auto !important;
}

#chat-thread-panel:not(.-translate-x-full) #chat-composer-area {
    pointer-events: auto !important;
}



/* ========== NOTIFICATION BELL RING ANIMATION ========== */
@keyframes notif-bell-ring {
    0%   { transform: scale(1)   rotate(0deg); }
    10%  { transform: scale(1.5) rotate(14deg); }
    20%  { transform: scale(1.5) rotate(-12deg); }
    30%  { transform: scale(1.35) rotate(10deg); }
    40%  { transform: scale(1.35) rotate(-8deg); }
    50%  { transform: scale(1.2) rotate(6deg); }
    60%  { transform: scale(1.2) rotate(-4deg); }
    70%  { transform: scale(1.1) rotate(2deg); }
    80%  { transform: scale(1.1) rotate(-1deg); }
    90%  { transform: scale(1)   rotate(0.5deg); }
    100% { transform: scale(1)   rotate(0deg); }
}

.notif-bell-ring {
    animation: notif-bell-ring 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform-origin: top center;
}

@media (prefers-reduced-motion: reduce) {
    .notif-bell-ring {
        animation: none !important;
    }
}

/* Navbar (header) avec fond blanc opacité 80% constant */
header.glass-liquid-pro {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Liste Messages — squelette de chargement (réutilise @keyframes img-shimmer) */
.conv-list-skeleton-block {
    background: linear-gradient(
        110deg,
        #e5e7eb 0%,
        #e5e7eb 30%,
        #f3f4f6 50%,
        #e5e7eb 70%,
        #e5e7eb 100%
    );
    background-size: 300% 100%;
    animation: img-shimmer 1.8s ease-in-out infinite;
}
.conv-list-skeleton-avatar {
    width: 3rem;
    height: 3rem;
}
.conv-list-skeleton-name {
    height: 0.875rem;
    width: 45%;
    max-width: 9rem;
}
.conv-list-skeleton-preview {
    height: 0.75rem;
    width: 72%;
    max-width: 14rem;
}
.conv-list-skeleton-item {
    animation: conv-list-skeleton-fade-in 0.35s ease both;
    animation-delay: calc(var(--conv-sk-stagger, 0) * 60ms);
}
@keyframes conv-list-skeleton-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .conv-list-skeleton-block {
        animation: none;
    }
    .conv-list-skeleton-item {
        animation: none;
    }
}

/* Styles pour l'animation du compteur du scanneur */
#scanner-button-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 1;
}
#scanner-button-logo.is-hidden {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
}
#scanner-button-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    line-height: 1;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
#scanner-button-count.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
#scanner-button-count.animate-bounce-scale {
    animation: scanner-count-bounce-scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes scanner-count-bounce-scale {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.45);
    }
    75% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}
#scanner-crossed-label {
    transition: opacity 0.4s ease;
}


