html {
    /* To disable double-click zoom and remove latency on some touch screens */
    touch-action: manipulation;
}

/* ═══════════════════════════════════════════════════════════════
   Écran de chargement — shimmer skeleton
   Les propriétés critiques (position, background-color) sont
   déjà injectées inline dans le <head> via smi-initial-theme,
   pour être disponibles avant ce fichier CSS.
═══════════════════════════════════════════════════════════════ */

.hider-element {
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.hider-element.active {
    opacity: 1;
    pointer-events: all;
}

.hider-element:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* ── Animation shimmer ───────────────────────────────────── */

@keyframes hider-shimmer {
    from { background-position: -800px 0; }
    to   { background-position:  800px 0; }
}

.hider-element .skeleton {
    background-color: var(--loading-secondary, #3d444d);
    background-image: linear-gradient(
        90deg,
        transparent 0%,
        var(--loading-shimmer, rgba(255,255,255,0.08)) 50%,
        transparent 100%
    );
    background-size: 800px 100%;
    animation: hider-shimmer 1.6s infinite linear;
    border-radius: 0.4rem;
}

/* ── Squelette navbar ────────────────────────────────────── */

.hider-sk-navbar {
    height: 3.5rem;
    background-color: var(--loading-secondary, #3d444d);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

.hider-sk-logo   { width: 7rem;  height: 1.25rem; flex-shrink: 0; }
.hider-sk-spacer { flex: 1; }
.hider-sk-item   { width: 4.5rem; height: 0.75rem; }
.hider-sk-avatar { width: 2rem;  height: 2rem; border-radius: 50%; flex-shrink: 0; }

/* ── Squelette corps ─────────────────────────────────────── */

.hider-sk-body {
    padding: 2rem 1.5rem 10rem;
    max-width: 64rem;
    margin: 0 auto;
}

.hider-sk-banner {
    width: 100%;
    height: 13rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.hider-sk-section-title {
    width: 12rem;
    height: 1rem;
    margin-bottom: 1.25rem;
}

.hider-sk-section-title--short { width: 9rem; }

/* Grille de cartes manga */
.hider-sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.hider-sk-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hider-sk-card--faded { opacity: 0.45; }

.hider-sk-card-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 0.375rem;
}

.hider-sk-card-title { height: 0.75rem; width: 80%; }
.hider-sk-card-sub   { height: 0.65rem; width: 55%; }

/* Liste */
.hider-sk-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hider-sk-list-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hider-sk-list-thumb {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.3rem;
    flex-shrink: 0;
}

.hider-sk-list-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hider-sk-line { height: 0.75rem; }
.hider-sk-line--a { width: 70%; }
.hider-sk-line--b { height: 0.65rem; width: 45%; }

/* ── Barre du bas : logo + dots + tip ───────────────────── */

.hider-tip-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 1.25rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(to top, var(--loading-bg, #31373f) 65%, transparent);
}

.hider-logo {
    height: 1.75rem;
    width: auto;
    display: block;
}

.hider-tip-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-direction: column;
}

.hider-dots {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ── Dots animés ─────────────────────────────────────────── */

@keyframes hider-dot-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.2; }
    40%           { transform: scale(1);   opacity: 1; }
}

.hider-loading-round {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--loading-main, #a2cdf0);
    display: inline-block;
    animation: hider-dot-pulse 1.5s ease-in-out infinite;
}

.hider-loading-round:nth-child(1) { animation-delay: 0s; }
.hider-loading-round:nth-child(2) { animation-delay: 0.18s; }
.hider-loading-round:nth-child(3) { animation-delay: 0.36s; }

/* ── Tip ─────────────────────────────────────────────────── */

.hider-element .tip {
    font-size: 0.8rem;
    color: var(--loading-text, #e9e9e9);
    opacity: 0.65;
    text-align: center;
    max-width: 30rem;
    line-height: 1.5;
    transition: opacity 0.35s ease;
}

.hider-element .tip.fading { opacity: 0; }


.christmas {
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes fall {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
        transform: translateY(100vh);
    }
}

@keyframes diagonal-fall {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0.25;
        transform: translate(10vw, 100vh);
    }
}

.smi-confirm-panel-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    padding: 0.5rem;
}

.smi-confirm-panel-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    z-index: -1;
}

.smi-confirm-panel-container .smi-confirm-panel-content {
    background-color: var(--internal-main-background-color);
    padding: 4rem 1rem 1rem;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    max-width: 60rem;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: rgba(0, 0, 0, 0.35) 0 5px 15px;
    border-radius: 0.5rem;
}

.smi-confirm-panel-container .smi-confirm-panel-content .panel {
    padding: 1rem;
}

.smi-confirm-panel-container .smi-confirm-panel-content .smi-confirm-panel-buttons {
    margin-top: 1rem;
    text-align: center;
}

.clr-picker {
    z-index: 300000 !important;
}