/* Mission Pôle Nord : la Boussole des Étoiles — thème Noël Polaire & Aurore Boréale */
:root {
    --kc-bg: radial-gradient(circle at 50% 10%, #1e3a8a 0%, #0f172a 65%, #050b14 100%);
    --kc-ink: #f8fafc;
    --kc-muted: #94a3b8;
    --kc-card: #1e293b;
    --kc-line: rgba(243, 183, 62, .45);
    --kc-accent: #f3b73e;
    --kc-accent-2: #d64545;
    --kc-accent-ink: #0f172a;
    --kc-scene: #0a0f1d;
}

/* --- Épreuve 1 : La Lanterne dans le Blizzard --- */
.frost-scene {
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0a0f1d 100%);
    position: relative;
    overflow: hidden;
}
.lantern-bg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.lantern-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.45) 0%, rgba(243, 183, 62, 0.15) 50%, transparent 70%);
    animation: glow-pulse 2.4s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
    0% { transform: scale(0.92); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}
.crystal-item {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.2s, filter 0.2s;
    user-select: none;
    z-index: 5;
    filter: drop-shadow(0 0 8px #f3b73e);
    /* caché sous le givre tant qu'il n'est pas dégivré */
    opacity: 0;
    pointer-events: none;
}
.crystal-item.revealed {
    opacity: 1;
    pointer-events: auto;
}
.crystal-item:active {
    transform: scale(1.25);
}
.crystal-item.found {
    opacity: 0.25;
    pointer-events: none;
    filter: grayscale(1);
}
.frost-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid var(--kc-accent);
    border-radius: 999px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f8fafc;
}

/* --- Épreuve 2 : Le Carillon des Rennes --- */
.chime-scene {
    background: radial-gradient(circle at 50% 30%, #1e3a8a 0%, #0f172a 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    position: relative;
    padding: 16px;
}
.chime-status {
    font-family: 'Fredoka', cursive, sans-serif;
    font-size: 1.25rem;
    color: var(--kc-accent);
    text-align: center;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bells-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 24px);
    width: 100%;
    max-width: 520px;
}
.bell-btn {
    flex: 1;
    max-width: 105px;
    aspect-ratio: 0.82;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
    border: 3px solid var(--bell-color, #f3b73e);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s;
    user-select: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.bell-btn .bell-icon {
    font-size: clamp(2rem, 6vw, 3.2rem);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.2s;
}
.bell-btn .bell-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.05em;
}
.bell-btn:active, .bell-btn.active {
    transform: scale(1.12);
    background: var(--bell-color, #f3b73e);
    box-shadow: 0 0 24px var(--bell-color, #f3b73e);
}
.bell-btn:active .bell-name, .bell-btn.active .bell-name {
    color: #0f172a;
}
.bell-btn:active .bell-icon, .bell-btn.active .bell-icon {
    transform: rotate(-15deg) scale(1.1);
}

/* --- Épreuve 3 : Le Tableau de bord du traîneau --- */
.sleigh-scene {
    background: radial-gradient(circle at 50% 20%, #1e3a8a 0%, #0a0f1d 80%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    position: relative;
    overflow: hidden;
}
.compass-box {
    position: relative;
    width: clamp(180px, 45vw, 240px);
    aspect-ratio: 1;
    margin: 8px auto;
}
.compass-dial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    border: 5px solid var(--kc-accent);
    box-shadow: 0 0 20px rgba(243, 183, 62, 0.4), inset 0 0 15px rgba(0,0,0,0.6);
    position: relative;
    touch-action: none;
    cursor: grab;
}
.compass-dial:active {
    cursor: grabbing;
}
.compass-needle-wrap {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    transition: transform 0.08s ease-out;
}
.target-heading-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--kc-accent-2);
    color: #fff;
    padding: 3px 12px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 10;
}
.booster-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
}
.crystals-gauge {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}
.crystal-slot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px dashed rgba(255,255,255,0.3);
    display: grid;
    place-items: center;
    font-size: 22px;
    transition: transform 0.3s, background-color 0.3s, border-color 0.3s;
}
.crystal-slot.lit {
    background: #f3b73e;
    border-style: solid;
    border-color: #fff;
    box-shadow: 0 0 16px #f3b73e;
    transform: scale(1.15);
}
.btn-booster {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background: linear-gradient(180deg, #d64545 0%, #991b1b 100%);
    color: #fff;
    border: 3px solid #fca5a5;
    border-radius: 999px;
    font-family: 'Fredoka', cursive, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    box-shadow: 0 6px 18px rgba(214, 69, 69, 0.5);
    transition: transform 0.1s, box-shadow 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-booster:active, .btn-booster.holding {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(214, 69, 69, 0.7);
    background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
}
