@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,600&family=Hind:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════
   Wedding Airlines Challenge — Design System
   ═══════════════════════════════════════════════════ */

:root {
    --wac-bg: #fdfcfa;
    --wac-bg-top: #fffcfb;
    --wac-bg-warm: #fffbf7;
    --wac-ink: #1e3345;
    --wac-muted: #5c6c78;
    --wac-line: rgba(44, 76, 105, 0.09);
    --wac-brand: #3a668e;
    --wac-brand-dark: #2c4c69;
    --wac-brand-light: #4a7da8;
    --wac-accent: #10b981;
    --wac-accent-soft: rgba(16, 185, 129, 0.12);
    --wac-gold: #b8956e;
    --wac-gold-dark: #8c6d4a;
    --wac-red: #c0392b;
    --wac-panel: #ffffff;
    --wac-radius: 16px;
    --wac-radius-sm: 12px;
    --wac-shadow: 0 2px 8px rgba(44, 76, 105, 0.04), 0 12px 40px rgba(44, 76, 105, 0.07);
    --wac-shadow-sm: 0 1px 3px rgba(44, 76, 105, 0.05);
    --wac-sans: "Hind", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --wac-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --wac-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.wac-body {
    margin: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-x: clip;
    font-family: var(--wac-sans);
    font-weight: 400;
    color: var(--wac-ink);
    background:
        radial-gradient(ellipse 120% 65% at 50% -12%, rgba(255, 244, 235, 0.45), transparent 58%),
        radial-gradient(ellipse 95% 48% at 0% 100%, rgba(255, 250, 246, 0.55), transparent 52%),
        radial-gradient(ellipse 65% 40% at 100% 28%, rgba(245, 252, 249, 0.28), transparent 50%),
        linear-gradient(165deg, var(--wac-bg-top) 0%, var(--wac-bg) 50%, var(--wac-bg-warm) 100%);
    -webkit-tap-highlight-color: transparent;
}

.wac-body * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    touch-action: manipulation;
}

.wac-body *::selection {
    background: rgba(58, 102, 142, 0.15);
    color: var(--wac-ink);
}

/* ═══ Plein écran (loading + erreur) ═══ */
.wac-main[hidden] {
    display: none !important;
}

.wac-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(48px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-left)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-right));
    min-height: 100dvh;
    background:
        radial-gradient(ellipse 120% 65% at 50% -12%, rgba(255, 244, 235, 0.45), transparent 58%),
        radial-gradient(ellipse 95% 48% at 0% 100%, rgba(255, 250, 246, 0.55), transparent 52%),
        linear-gradient(165deg, var(--wac-bg-top) 0%, var(--wac-bg) 55%, var(--wac-bg-warm) 100%);
}

.wac-screen:not([hidden]) {
    display: flex;
    animation: wac-fadeIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

.wac-screen__content {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.wac-icon-wrap {
    font-size: 2.65rem;
    line-height: 1;
    color: var(--wac-brand);
    filter: drop-shadow(0 3px 12px rgba(58, 102, 142, 0.22));
}

.wac-icon-wrap--danger {
    color: var(--wac-red);
    filter: drop-shadow(0 2px 10px rgba(192, 57, 43, 0.18));
}

.wac-label-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wac-gold);
}

.wac-screen__title {
    font-family: var(--wac-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.wac-screen__subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--wac-muted);
    max-width: 380px;
}

.wac-screen__subtitle strong {
    color: var(--wac-brand-dark);
    font-weight: 600;
}

.wac-screen__recover {
    width: 100%;
    margin-top: 8px;
    text-align: left;
}

.wac-screen__recover-hint {
    font-size: 0.85rem;
    color: var(--wac-muted);
    margin: 0 0 10px;
}

.wac-screen__err {
    color: var(--wac-red);
    font-size: 0.85rem;
    margin: 8px 0 0;
}

.wac-icon {
    font-size: 2.75rem;
    color: var(--wac-brand);
    filter: drop-shadow(0 2px 10px rgba(58, 102, 142, 0.2));
}

.wac-screen__loading-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
}

.wac-screen--games-gate {
    z-index: 99999;
}

.wac-icon-wrap--gate {
    color: var(--wac-gold);
    filter: drop-shadow(0 2px 10px rgba(184, 149, 110, 0.22));
}

.wac-screen__gate-hint {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--wac-muted);
    max-width: 400px;
}

/* ═══ Écran « jeux terminés » + score ═══ */
.wac-gate-ended {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.wac-gate-ended .wac-screen__title {
    margin: 0;
}

.wac-gate-ended__lead {
    margin: 0;
    max-width: 34ch;
}

.wac-screen__ended-ticket {
    width: 100%;
    margin: 0;
    padding: 22px 20px 24px;
    text-align: center;
    background: var(--wac-panel);
    border: 1px solid var(--wac-line);
    border-radius: var(--wac-radius);
    box-shadow: var(--wac-shadow-sm);
    position: relative;
    overflow: hidden;
}

.wac-screen__ended-ticket::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wac-brand), var(--wac-gold));
    opacity: 0.9;
}

.wac-screen__ended-kicker {
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--wac-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wac-gold-dark);
}

.wac-screen__ended-kicker i {
    font-size: 0.55rem;
    opacity: 0.75;
    color: var(--wac-brand);
}

.wac-screen__ended-name {
    margin: 12px 0 0;
    font-family: var(--wac-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--wac-ink);
    line-height: 1.25;
    min-height: 1.25em;
}

.wac-screen__ended-hint {
    margin: 0;
    max-width: 32ch;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--wac-muted);
}

.wac-screen__ended-hint strong {
    color: var(--wac-brand-dark);
    font-weight: 600;
}

.wac-screen__ended-number-row {
    margin-top: 10px;
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 0.28em;
    flex-wrap: nowrap;
}

.wac-screen__ended-digit {
    font-family: var(--wac-serif);
    font-size: clamp(2.5rem, 12vw, 3.25rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--wac-brand-dark);
    font-variant-numeric: tabular-nums;
}

.wac-screen__ended-fs {
    font-family: var(--wac-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--wac-muted);
    line-height: 1;
    transform: translateY(-0.06em);
}

/* ═══════════════════════════════════════════════════
   HUB — Page principale
   ═══════════════════════════════════════════════════ */
.wac-hub {
    max-width: 460px;
    margin: 0 auto;
    padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

/* ── Hero ── */
.wac-hub__hero {
    text-align: center;
    padding: 26px 0 18px;
    position: relative;
}

.wac-hub__hero-plane {
    font-size: 1.5rem;
    color: var(--wac-brand);
    opacity: 0.25;
    margin-bottom: 12px;
    transform: rotate(-12deg);
}

.wac-hub__hero-tag {
    font-family: var(--wac-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wac-gold);
    margin-bottom: 6px;
}

.wac-hub__hero-title {
    font-family: var(--wac-serif);
    font-size: 2.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0 0 12px;
    color: var(--wac-ink);
}

.wac-hub__schedule-notice {
    margin: 10px auto 0;
    max-width: 22rem;
    padding: 0 12px;
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 400;
    color: var(--wac-muted);
}

.wac-hub__schedule-notice strong {
    font-weight: 600;
    color: var(--wac-ink);
}

.wac-hub__hero-sub {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--wac-muted);
    max-width: 320px;
    margin: 0 auto;
}

.wac-hub-main-done {
    margin: 0 0 18px;
    padding: 12px 14px 14px;
    border-radius: var(--wac-radius);
    background: linear-gradient(135deg, rgba(90, 143, 191, 0.12) 0%, rgba(201, 162, 39, 0.1) 100%);
    border: 1px solid var(--wac-line);
    box-shadow: var(--wac-shadow-sm);
}

.wac-hub-main-done__msg {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--wac-muted);
    margin: 0;
}

/* ── Boarding Pass card ── */
.wac-pass {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    overflow: hidden;
    box-shadow: var(--wac-shadow);
    border: 1px solid var(--wac-line);
    margin-bottom: 16px;
}

.wac-pass__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #fff;
    background: linear-gradient(135deg, #3d6a92 0%, #3a668e 40%, #2c4c69 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.wac-pass__header .fa-plane {
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.88;
}

.wac-pass__header-name {
    font-family: var(--wac-serif);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wac-pass__body {
    padding: 18px 20px 20px;
}

.wac-pass__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.wac-pass__field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wac-pass__label {
    font-family: var(--wac-mono);
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--wac-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wac-pass__value {
    font-family: var(--wac-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wac-ink);
}

.wac-pass__value--score {
    color: var(--wac-brand);
    font-size: 1.2rem;
}

.wac-pass__dashed {
    width: 100%;
    height: 1px;
    border: none;
    border-top: 2px dashed rgba(58, 102, 142, 0.14);
    margin: 12px 0;
}

/* Fiole + stats : rangée puis pastilles pleine largeur écran */
.wac-hub__deck {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 4px;
}

.wac-hub__deck-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px 16px;
}

.wac-hub__jar-column {
    flex: 1 1 62%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wac-hub__deck-aside {
    flex: 0 0 clamp(108px, 30vw, 132px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: center;
}

.wac-hub__stats-passenger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px dashed rgba(58, 102, 142, 0.16);
}

.wac-hub__stats-passenger .fa-plane {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--wac-brand);
    opacity: 0.9;
}

.wac-hub__stats-passenger-name {
    font-family: var(--wac-serif);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--wac-ink);
}

/* Pastilles sable : pleine largeur viewport (sous la fiole + cadre scores) */
.wac-hub__jar-dots-strip {
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px max(18px, env(safe-area-inset-left)) 6px max(18px, env(safe-area-inset-right));
}

.wac-hub__jar-hint {
    font-family: var(--wac-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wac-gold);
    margin: 0;
    opacity: 0.85;
    text-align: center;
    line-height: 1.3;
}

.wac-hub__stats-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(58, 102, 142, 0.07) 0%, rgba(255, 255, 255, 0.95) 55%, var(--wac-panel) 100%);
    border-radius: 14px;
    border: 1px solid rgba(58, 102, 142, 0.12);
    box-shadow: 0 2px 12px rgba(44, 76, 105, 0.06);
}

.wac-hub__stat-name {
    font-family: var(--wac-serif);
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--wac-ink);
    text-align: center;
    margin: 0;
    padding: 10px 10px 0;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.wac-hub__stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding: 12px 8px 14px;
    min-height: 0;
}

.wac-hub__stat-cell--escales {
    border-left: 1px solid rgba(58, 102, 142, 0.1);
    background: rgba(255, 255, 255, 0.45);
}

.wac-hub__stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.62rem;
    color: var(--wac-brand);
    background: rgba(58, 102, 142, 0.1);
    margin-bottom: 2px;
}

.wac-hub__stat-cell--escales .wac-hub__stat-icon {
    color: var(--wac-accent);
    background: rgba(16, 185, 129, 0.12);
}

.wac-hub__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wac-hub__stat-label {
    font-family: var(--wac-mono);
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--wac-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.wac-hub__stat-value {
    font-family: var(--wac-mono);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--wac-ink);
    line-height: 1.15;
}

.wac-hub__stat-value--flight-score {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.1em;
    margin: 0;
    color: var(--wac-brand);
    font-size: 1.05rem;
}

.wac-hub__stat-suffix {
    font-size: 0.68em;
    font-weight: 600;
    opacity: 0.75;
}

/* ── Sand jar ── */

/* ViewBox étiré (preserveAspectRatio none) : format un peu plus carré qu’un 1:2 strict */
.wac-jar-wrap {
    position: relative;
    width: 100%;
    max-width: 200px;
    min-width: 0;
    aspect-ratio: 100 / 140;
    height: auto;
    -webkit-user-select: none;
    user-select: none;
}

.wac-jar-svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 20px rgba(44, 76, 105, 0.14));
    transition: transform 0.2s ease;
    /* La fiole (et donc les couches de sable opaques) doit recouvrir le flux de grains
       situé derrière, pour donner l’illusion qu’ils s’enfoncent dans le sable. */
    position: relative;
    z-index: 2;
}


.wac-jar-svg__outline {
    transition: stroke 0.3s;
}

/* Grain sur le sable : désactivé si l’utilisateur demande moins d’animations / d’effets */
@media (prefers-reduced-motion: reduce) {
    .wac-jar-layers {
        filter: none !important;
    }
}

/* Colonne centrée, étroite : flux au milieu de la fiole (ouverture large) */
.wac-jar-particles {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28%;
    max-width: 36px;
    min-width: 18px;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    /* En-dessous de la fiole : les couches de sable masquent visuellement les grains
       qui passent sous la surface, donnant l’impression qu’ils s’y enfoncent. */
    z-index: 1;
}

.wac-jar-grain {
    --wac-dx: 0px;
    --wac-dur: 0.45s;
    --wac-fall: 110px;
    position: absolute;
    border-radius: 45%;
    opacity: 0;
    will-change: transform, opacity;
    /* Linéaire sur la trajectoire : la chute parcourt tout --wac-fall avant de disparaître */
    animation: wac-grain-stream var(--wac-dur) linear forwards;
    animation-delay: var(--wac-delay, 0s);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
}

@keyframes wac-grain-stream {
    0% {
        opacity: 0;
        transform: translate3d(var(--wac-dx), 0, 0) rotate(0deg) scale(1);
    }
    5% {
        opacity: 1;
    }
    82% {
        opacity: 1;
        transform: translate3d(
            calc(var(--wac-dx) * -0.12),
            var(--wac-fall),
            0
        ) rotate(240deg) scale(0.55);
    }
    100% {
        opacity: 0;
        transform: translate3d(
            calc(var(--wac-dx) * -0.18),
            var(--wac-fall),
            0
        ) rotate(265deg) scale(0.42);
    }
}

/* Empilement : montée depuis le bas (scaleY), sans rebond */
.wac-jar-sand-layer {
    opacity: 0;
    transform: scaleY(0.02);
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: wac-sand-pile 0.9s cubic-bezier(0.25, 0.46, 0.45, 1) both;
}

.wac-jar-sand-layer--welcome {
    animation-name: wac-sand-pile-welcome;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 1);
}

@keyframes wac-sand-pile {
    0% {
        opacity: 0;
        transform: scaleY(0.02);
    }
    14% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes wac-sand-pile-welcome {
    0% {
        opacity: 0;
        transform: scaleY(0.02);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0.72;
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wac-jar-grain {
        animation: none;
        opacity: 0;
    }

    .wac-jar-sand-layer,
    .wac-jar-sand-layer--welcome {
        animation: none;
        opacity: 1;
        transform: scaleY(1);
    }

    .wac-jar-sand-layer--welcome {
        opacity: 0.72;
    }
}

.wac-jar-section__colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wac-jar-section__colors--spread {
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 14px;
}

.wac-jar-section__colors--spread .wac-jar-section__dot {
    flex: 0 0 auto;
}

.wac-jar-section__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    transition: opacity 0.3s, filter 0.3s;
}

.wac-jar-section__dot--pending {
    opacity: 0.35;
    filter: saturate(0.3) brightness(1.4);
}

/* ── Section head ── */
.wac-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.wac-section-head--escales {
    margin-bottom: 10px;
    padding-right: 8px;
}

.wac-section-head--challenges .wac-section-head__icon {
    background: linear-gradient(135deg, #c76b9a, #7a6fbe);
}

.wac-section-head__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--wac-brand), var(--wac-brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 3px 10px rgba(58, 102, 142, 0.22);
}

.wac-section-head__title {
    font-family: var(--wac-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.wac-section-head__sub {
    font-size: 0.95rem;
    color: var(--wac-muted);
    margin: 2px 0 0;
    line-height: 1.4;
}

/* ── Escales + défis (hub) ── */
.wac-escales {
    margin-bottom: 28px;
}

.wac-challenges {
    margin-bottom: 32px;
}

/* ── Hub : listes verticales (plus de carrousel horizontal) ── */
.wac-hub-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.wac-hub-stack--dense {
    gap: 10px;
}

/* ── Défis : lignes « feuille de route » ── */
.wac-challenge-row {
    --wac-ch-sand: var(--wac-brand);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: var(--wac-panel);
    border: 1px solid var(--wac-line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 4px 18px rgba(44, 76, 105, 0.06);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wac-challenge-row__stripe {
    flex: 0 0 5px;
    align-self: stretch;
    min-height: 100%;
    background: var(--wac-ch-sand);
}

.wac-challenge-row__icon {
    flex-shrink: 0;
    align-self: center;
    width: 44px;
    height: 44px;
    margin: 0 0 0 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(145deg, var(--wac-ch-sand), #2c2a45);
    box-shadow: 0 3px 12px rgba(44, 76, 105, 0.2);
}

.wac-challenge-row__body {
    flex: 1;
    min-width: 0;
    padding: 12px 10px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wac-challenge-row__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 2px;
}

.wac-challenge-row__pill {
    font-family: var(--wac-mono);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wac-muted);
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(58, 102, 142, 0.07);
    border: 1px solid rgba(58, 102, 142, 0.1);
}

.wac-challenge-row__pts {
    font-family: var(--wac-mono);
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--wac-muted);
}

.wac-challenge-row__title {
    font-family: var(--wac-serif);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--wac-ink);
}

.wac-challenge-row__teaser {
    font-size: 0.72rem;
    line-height: 1.42;
    color: var(--wac-muted);
    margin: 5px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wac-challenge-row__tail {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px 10px 6px;
}

.wac-challenge-row__qr {
    font-size: 0.75rem;
    color: var(--wac-gold-dark);
    opacity: 0.85;
}

.wac-challenge-row__chev {
    font-size: 0.62rem;
    color: var(--wac-muted);
    opacity: 0.35;
    margin-top: 2px;
}

.wac-challenge-row:active {
    transform: scale(0.992);
}

@media (hover: hover) {
    .wac-challenge-row:hover {
        border-color: rgba(58, 102, 142, 0.22);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 8px 26px rgba(44, 76, 105, 0.09);
    }
}

.wac-game-card--locked.wac-challenge-row {
    opacity: 0.52;
    pointer-events: none;
    filter: grayscale(0.12);
}

.wac-game-card--done.wac-challenge-row {
    border-color: rgba(16, 185, 129, 0.32);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.wac-game-card--done.wac-challenge-row .wac-challenge-row__body {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
}

/* ── Escales : billets pleine largeur, empilés ── */
.wac-game-card.wac-escale-ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    flex: none;
    border-radius: 14px;
    background: transparent;
    border: none;
    text-decoration: none;
    color: inherit;
    overflow: visible;
    box-shadow: 0 6px 24px rgba(44, 76, 105, 0.1), 0 2px 8px rgba(44, 76, 105, 0.06);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.wac-escale-ticket__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px 13px;
    border-radius: 14px 14px 0 0;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.wac-escale-ticket__header-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wac-escale-ticket__header-icon {
    flex-shrink: 0;
    line-height: 1;
    font-size: 1.2rem;
    opacity: 0.92;
}

.wac-escale-ticket__eyebrow {
    font-family: var(--wac-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.88;
}

.wac-escale-ticket__escale-no {
    font-family: var(--wac-mono);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.wac-escale-ticket__perforation {
    height: 0;
    margin: 0 12px;
    border-top: 2px dashed rgba(58, 102, 142, 0.2);
    position: relative;
    z-index: 1;
}

.wac-escale-ticket__body {
    flex: 1;
    padding: 12px 14px 14px;
    background: var(--wac-panel);
    border: 1px solid var(--wac-line);
    border-top: none;
    border-radius: 0 0 14px 14px;
    min-height: 124px;
    display: flex;
    flex-direction: column;
}

.wac-escale-ticket__title {
    font-family: var(--wac-serif);
    font-weight: 600;
    font-size: 1.12rem;
    margin: 0;
    line-height: 1.28;
    flex: 0 0 auto;
}

.wac-escale-ticket__teaser {
    font-size: 0.85rem;
    line-height: 1.38;
    color: var(--wac-muted);
    margin: 8px 0 0;
    flex: 1 1 auto;
}

.wac-escale-ticket__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-top: auto;
    padding-top: 10px;
}

.wac-escale-ticket__row .wac-game-card__badge {
    margin-left: auto;
}

.wac-escale-ticket__pts {
    font-family: var(--wac-mono);
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--wac-muted);
}

.wac-escale-ticket__qr {
    font-family: var(--wac-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wac-gold-dark);
    opacity: 0.85;
}

.wac-escale-ticket__open {
    font-family: var(--wac-mono);
    font-size: 0.73rem;
    font-weight: 600;
    color: #0d7a52;
    opacity: 0.9;
}

.wac-escale-ticket__header--bonus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.wac-game-card.wac-escale-ticket:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .wac-game-card.wac-escale-ticket:hover {
        box-shadow: 0 10px 32px rgba(44, 76, 105, 0.12), 0 4px 14px rgba(44, 76, 105, 0.08);
    }
}

.wac-game-card--locked.wac-escale-ticket {
    opacity: 0.52;
    pointer-events: none;
    filter: grayscale(0.15);
}

.wac-game-card--service-off.wac-escale-ticket {
    opacity: 0.62;
    pointer-events: none;
    filter: grayscale(0.45);
}

.wac-escale-ticket__header--off {
    filter: grayscale(0.35) brightness(0.95);
}

/* Clic sur le badge « Scannez pour débloquer » (déblocage temporaire sans QR) */
.wac-game-card--locked.wac-escale-ticket .wac-game-card__badge {
    pointer-events: auto;
    cursor: pointer;
}

.wac-game-card--done.wac-escale-ticket {
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.12);
}

.wac-game-card--done.wac-escale-ticket .wac-escale-ticket__body {
    background: linear-gradient(180deg, #fff 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(16, 185, 129, 0.28);
}

.wac-game-card__badge {
    font-family: var(--wac-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.wac-game-card__badge--play {
    background: rgba(58, 102, 142, 0.12);
    color: var(--wac-brand-dark);
}

.wac-game-card__badge--done {
    background: var(--wac-accent-soft);
    color: #0d7a52;
}

.wac-game-card__badge--lock {
    background: rgba(92, 108, 120, 0.1);
    color: var(--wac-muted);
}

/* ── Footer ── */
.wac-hub__footer {
    text-align: center;
    padding: 8px 0 16px;
}

.wac-hub__footer-line {
    width: 40px;
    height: 2px;
    border-radius: 1px;
    background: var(--wac-line);
    margin: 0 auto 14px;
}

.wac-hub__footer-text {
    font-family: var(--wac-serif);
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--wac-muted);
    margin: 0;
}

/* Pied de page discret — mêmes repères que le hub terminal */
.wac-game-footer {
    text-align: center;
    padding: 20px 0 8px;
    margin-top: auto;
}

.wac-game-footer__line {
    width: 40px;
    height: 2px;
    border-radius: 1px;
    background: var(--wac-line);
    margin: 0 auto 14px;
}

.wac-game-footer__text {
    font-family: var(--wac-serif);
    font-size: 1.05rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--wac-muted);
    margin: 0;
}

.wac-quiz-done__detail {
    margin: -6px 0 18px;
    font-size: 0.98rem;
}

.wac-guess__done .wac-pf-result-note,
.wac-guess__already .wac-pf-result-note {
    margin: -6px 0 18px;
    max-width: 300px;
    font-size: 0.98rem;
    line-height: 1.45;
}

/* Jeu avec pied de page : bandeau + contenu + signature en bas de viewport */
.wac-app--with-game-footer {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.wac-app--with-game-footer .wac-game-column {
    flex: 1 1 auto;
}

.wac-app--with-game-footer .wac-game-footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════
   GAME PAGES — Layout commun
   ═══════════════════════════════════════════════════ */
.wac-app {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    box-sizing: border-box;
}

.wac-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.wac-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wac-brand);
    text-decoration: none;
    padding: 8px 6px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.wac-back .fa-solid {
    font-size: 0.72rem;
    opacity: 0.92;
    margin-top: 1px;
}

@media (hover: hover) {
    .wac-back:hover { color: var(--wac-brand-dark); background: rgba(58, 102, 142, 0.08); }
}

/* Thème par escale (jeux 1 & 2) : --wac-escale-color défini sur .wac-app--escale-themed */
.wac-app--escale-themed {
    --wac-escale-color: var(--wac-brand);
}

/* Bandeau jeu : même esprit que .wac-escale-ticket__header, pleine largeur viewport, collé au haut */
.wac-app--escale-themed .wac-header-bar--escale {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: calc(-1 * max(16px, env(safe-area-inset-top, 0px)));
    margin-bottom: 20px;
    padding-top: max(14px, calc(env(safe-area-inset-top, 0px) + 10px));
    padding-bottom: 14px;
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    border: none;
    border-radius: 0 0 14px 14px;
    background: var(--wac-escale-color);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 8px 24px rgba(44, 76, 105, 0.12);
}

.wac-app--escale-themed .wac-header-bar--escale .wac-back {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

@media (hover: hover) {
    .wac-app--escale-themed .wac-header-bar--escale .wac-back:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.16);
    }
}

.wac-app--escale-themed .wac-header-bar--escale .wac-guess__progress {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.wac-app--escale-themed .wac-guess__score-bar {
    color: var(--wac-escale-color);
}

.wac-app--escale-themed .wac-guess__result-points {
    color: var(--wac-escale-color);
}

.wac-app--escale-themed .wac-guess__done-score {
    color: var(--wac-escale-color);
}

.wac-guess__done-score strong {
    font-size: inherit;
    font-weight: 700;
}

.wac-app--escale-themed .gd-marker--guess {
    background: var(--wac-escale-color);
}

.wac-app--escale-themed .wac-btn--primary {
    background: var(--wac-escale-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

@media (hover: hover) {
    .wac-app--escale-themed .wac-btn--primary:hover:not(:disabled) {
        filter: brightness(1.06);
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.14) inset;
    }
}

.wac-app--escale-themed .gd-flip-btn--cta {
    background: var(--wac-escale-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.wac-app--escale-themed .gd-flip-btn--cta:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.wac-app--escale-themed .gd-flip-btn--cta .gd-flip-btn__icon {
    background: rgba(255, 255, 255, 0.22);
}

.wac-app--escale-themed .wac-safari__opt--picked .wac-safari__opt-frame {
    border-color: var(--wac-escale-color);
    border-width: 4px;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.18);
    transform: scale(1.04);
}

.wac-app--escale-themed .wac-safari__opt--picked .wac-safari__opt-caption {
    color: var(--wac-escale-color);
}

.wac-app--escale-themed .wac-safari__notebook-kicker {
    color: var(--wac-escale-color);
    opacity: 0.88;
}

@supports (color: color-mix(in srgb, white, black)) {
    .wac-app--escale-themed .wac-icon-wrap--success {
        filter: drop-shadow(0 3px 14px color-mix(in srgb, var(--wac-escale-color) 35%, transparent));
    }
}

.wac-icon-wrap--success {
    color: var(--wac-accent);
    filter: drop-shadow(0 3px 12px rgba(16, 185, 129, 0.22));
}

.wac-app--escale-themed .wac-icon-wrap--success {
    color: var(--wac-escale-color);
}

.wac-title {
    font-family: var(--wac-serif);
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 6px;
    line-height: 1.2;
}

.wac-subtitle {
    font-size: 1.05rem;
    color: var(--wac-muted);
    line-height: 1.55;
    margin: 0 0 16px;
}

.wac-card {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    box-shadow: var(--wac-shadow);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--wac-line);
}

/* ═══ Buttons ═══ */
.wac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--wac-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 16px 24px;
    border-radius: var(--wac-radius-sm);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    text-decoration: none;
    box-sizing: border-box;
}

.wac-btn:active {
    transform: scale(0.98);
}

.wac-btn--primary {
    background: linear-gradient(145deg, #3d6a92 0%, #3a668e 40%, #2c4c69 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(44, 76, 105, 0.25), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

@media (hover: hover) {
    .wac-btn--primary:hover:not(:disabled) {
        box-shadow: 0 8px 24px rgba(44, 76, 105, 0.32), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
    }
}

.wac-btn--ghost {
    background: transparent;
    color: var(--wac-muted);
    border: 1px solid var(--wac-line);
    margin-top: 10px;
}

@media (hover: hover) {
    .wac-btn--ghost:hover { background: rgba(26, 47, 71, 0.03); color: var(--wac-ink); }
}

.wac-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.wac-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--wac-radius-sm);
    border: 1px solid rgba(58, 102, 142, 0.18);
    margin-bottom: 12px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.72);
    transition: border-color 0.2s;
}

.wac-input:focus {
    outline: none;
    border-color: var(--wac-brand);
    box-shadow: 0 0 0 3px rgba(58, 102, 142, 0.12);
}

/* ═══ Quiz ═══ */
.wac-quiz-q {
    font-family: var(--wac-serif);
    font-size: 1.38rem;
    font-weight: 600;
    margin: 0 0 14px;
    line-height: 1.3;
}

.wac-quiz-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 72px;
}

.wac-quiz-opts--many {
    max-height: min(52vh, 440px);
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}

/* Bloc storytelling — escale manquante */
.wac-escale-manquante__story {
    margin-bottom: 18px;
}

.wac-escale-manquante__lede {
    margin: 0 0 12px;
}

.wac-escale-manquante__hint {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--wac-muted);
    padding: 12px 14px;
    border-radius: var(--wac-radius-sm);
    border: 1px dashed rgba(58, 102, 142, 0.22);
    background: rgba(255, 255, 255, 0.45);
}

.wac-escale-manquante__hint i {
    margin-right: 6px;
    opacity: 0.55;
    font-size: 0.85rem;
}

.wac-quiz-opt {
    text-align: left;
    padding: 14px 16px;
    border-radius: var(--wac-radius-sm);
    border: 1px solid rgba(58, 102, 142, 0.12);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    font-family: inherit;
    font-size: 1.08rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.2s;
    box-shadow: var(--wac-shadow-sm);
}

@media (hover: hover) {
    .wac-quiz-opt:hover { border-color: rgba(58, 102, 142, 0.3); background: rgba(58, 102, 142, 0.04); }
}

.wac-quiz-opt--selected {
    border-color: var(--wac-brand);
    background: rgba(58, 102, 142, 0.08);
    box-shadow: 0 0 0 2px rgba(58, 102, 142, 0.25);
}

.wac-app--escale-themed .wac-quiz-opt--selected {
    border-color: var(--wac-escale-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.wac-quiz-opt--correct {
    border-color: #2a9d6e !important;
    background: rgba(42, 157, 110, 0.1) !important;
}

.wac-quiz-opt--wrong {
    border-color: var(--wac-red) !important;
    background: rgba(192, 57, 43, 0.08) !important;
}

.wac-quiz-progress {
    font-family: var(--wac-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--wac-muted);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

/* ═══ Match grid ═══ */
.wac-match-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* 10 paires (20 cartes) : grille plus dense */
.wac-match-grid--many {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.wac-match-grid--many .wac-match-card {
    font-size: 1.25rem;
}

.wac-match-grid--many .wac-match-card span {
    font-size: 0.52rem;
}

.wac-match-card {
    aspect-ratio: 1;
    border-radius: var(--wac-radius-sm);
    border: 2px solid rgba(58, 102, 142, 0.1);
    background: linear-gradient(145deg, #fff, #f8fafc);
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.12s, border-color 0.15s, opacity 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: var(--wac-shadow-sm);
}

.wac-match-card span {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--wac-muted);
    margin-top: 2px;
    text-align: center;
    line-height: 1.1;
}

.wac-match-card--photo {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.wac-match-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--wac-radius-sm) - 2px);
}

.wac-match-card__photo-num {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--wac-mono);
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--wac-ink);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 6px;
    border: 1px solid rgba(58, 102, 142, 0.15);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.wac-match-card:active {
    transform: scale(0.96);
}

.wac-match-card--picked {
    border-color: var(--wac-brand);
    box-shadow: 0 0 0 3px rgba(58, 102, 142, 0.18);
}

.wac-match-card--matched {
    opacity: 0.3;
    pointer-events: none;
}

/* ═══ Toast ═══ */
.wac-toast {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--wac-ink);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--wac-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100001;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.35s;
    max-width: min(90vw, 360px);
    text-align: center;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(30, 51, 69, 0.35);
    visibility: hidden;
}

.wac-toast.wac-toast--show {
    transform: translateX(-50%) translateY(0);
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0s;
}

/* ═══ Result ═══ */
.wac-result {
    text-align: center;
    padding: 12px 0 4px;
}

.wac-result__pts {
    font-family: var(--wac-mono);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--wac-brand);
    font-variant-numeric: tabular-nums;
}

.wac-result__label {
    color: var(--wac-muted);
    font-size: 1.02rem;
    margin-bottom: 20px;
}

/* ═══ Selfie ═══ */
.wac-selfie-hint {
    font-size: 0.88rem;
    color: var(--wac-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.wac-selfie-status {
    font-size: 0.85rem;
    margin-top: 10px;
    min-height: 1.2em;
}

.wac-selfie-status--ok { color: #0d7a52; }
.wac-selfie-status--err { color: var(--wac-red); }

/* ═══ Placeholder « bientôt » (contenu sous .wac-game-column) ═══ */
.wac-soon__card {
    max-width: 420px;
    margin: 0 auto 32px;
    background: var(--wac-panel);
    border: 1px solid var(--wac-line);
    border-radius: var(--wac-radius);
    padding: 22px 20px 24px;
    box-shadow: var(--wac-shadow-sm);
}

.wac-soon__card--unavailable {
    border-color: rgba(192, 57, 43, 0.18);
    box-shadow: 0 2px 14px rgba(192, 57, 43, 0.06);
}

.wac-soon__eyebrow {
    font-family: var(--wac-mono);
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wac-gold-dark);
    margin: 0 0 10px;
    opacity: 0.9;
}

.wac-soon__title {
    font-family: var(--wac-serif);
    font-size: 1.45rem;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.25;
    color: var(--wac-ink);
}

.wac-soon__text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--wac-muted);
    margin: 0 0 16px;
}

.wac-soon__hint {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--wac-muted);
    margin: 0;
    padding-top: 14px;
    border-top: 1px dashed var(--wac-line);
    opacity: 0.92;
}

/* ═══ Poids fiole (bonus cadeau « plus proche ») ═══ */
.wac-pf-wait__card {
    margin-top: 8px;
}

.wac-pf-wait__status {
    font-family: var(--wac-mono);
    font-size: 0.72rem;
    color: var(--wac-muted);
    margin: 14px 0 0;
    text-align: center;
}

.wac-pf-lede {
    margin-bottom: 18px;
}

.wac-pf-lede--note {
    margin-top: -6px;
    margin-bottom: 22px;
    font-size: 0.85em;
    opacity: 0.85;
}

.wac-pf-form {
    display: block;
    margin: 0;
}

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

.wac-pf-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--wac-ink);
    margin-bottom: 8px;
}

.wac-pf-input {
    width: 100%;
    max-width: 280px;
    margin-bottom: 10px;
}

.wac-pf-hint {
    font-size: 0.82rem;
    color: var(--wac-red);
    margin: 0 0 14px;
}

.wac-game-card--pf-wait .wac-escale-ticket__qr,
.wac-game-card--pf-wait .wac-escale-ticket__open {
    opacity: 0.65;
}

@media (max-width: 380px) {
    .wac-hub__hero-title { font-size: 2.4rem; }
    .wac-match-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .wac-match-grid--many { grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .wac-match-card { font-size: 1.2rem; }

    .wac-hub__deck-main {
        flex-direction: column;
        align-items: center;
    }

    .wac-hub__deck-aside {
        flex: 0 1 auto;
        width: 100%;
        max-width: 280px;
    }

    .wac-hub__jar-column {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }
}

@media (min-width: 500px) {
    .wac-hub { max-width: 480px; }
}

/* ═══════════════════════════════════════════════════
   Devine la destination
   ═══════════════════════════════════════════════════ */

.wac-guess { padding-bottom: 24px; }

/* Colonne jeu (85 %) : titres, sous-titres, contenu — aligné devine-destination / safari */
.wac-game-column {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.wac-guess__progress {
    font-family: var(--wac-mono);
    font-size: 0.90rem;
    color: var(--wac-muted);
    margin-left: auto;
}

.wac-guess__score-bar {
    text-align: center;
    font-family: var(--wac-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wac-brand);
    margin: 4px 0 12px;
}

/* — Flip card — */
.gd-flipcard {
    perspective: 900px;
    margin: 0 0 12px;
    width: 100%;
    max-width: none;
    aspect-ratio: 1 / 1.18;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.18));
    cursor: pointer;
}

.gd-flipcard__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(.4,.2,.2,1);
    transform-style: preserve-3d;
}

.gd-flipcard--flipped .gd-flipcard__inner {
    transform: rotateY(180deg);
}

.gd-flipcard__front,
.gd-flipcard__back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 6px;
    overflow: hidden;
}

.gd-flipcard__back {
    transform: rotateY(180deg);
}

/* — Polaroid — */
.gd-polaroid {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 8px 8px 0;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.08);
    /* À l'échelle 1 : on autorise le scroll vertical de la page à 1 doigt,
       on bloque uniquement le pinch-zoom navigateur (capté par le JS).
       Le `!important` surcharge la règle universelle
       `.wac-body * { touch-action: manipulation }` (ligne ~56). */
    touch-action: pan-y !important;
    -ms-touch-action: pan-y !important;
    overflow: hidden;
}

.gd-polaroid--zoomed {
    /* Quand on est zoomé, le 1 doigt sert à déplacer la photo (pan), donc
       plus aucun geste navigateur n'est autorisé sur le polaroid. */
    touch-action: none !important;
    -ms-touch-action: none !important;
}

.gd-polaroid__viewport {
    /* Cadre interne qui contient l'image. Il occupe l'espace entre les
       bords blancs (padding du polaroid) et clippe l'image quand on
       zoome, pour que les bords blancs restent toujours visibles. */
    display: block;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 3px;
    position: relative;
    background: #f3f1ec;
}

.gd-polaroid__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.18s ease-out;
    touch-action: none !important;
    /* L'image n'intercepte pas les gestes : ils remontent au polaroid. */
    pointer-events: none;
}

.gd-polaroid__letter {
    /* Empêche les événements sur le label « Photo A » : ils doivent passer
       au wrap pour ne pas couper un pinch qui finit sur le bas du polaroid. */
    pointer-events: none;
}

.gd-polaroid--pinching .gd-polaroid__img {
    transition: none;
}

.gd-polaroid__letter {
    display: block;
    text-align: center;
    font-family: var(--wac-serif);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--wac-ink);
    padding: 10px 0 8px;
    letter-spacing: 0.04em;
}

/* — Flip CTA (voir la carte / proposition) — */
[hidden].gd-flip-block,
[hidden].gd-map-actions,
[hidden]#gd-flip-hint,
[hidden].gd-flipcard,
[hidden].wac-guess__done,
[hidden].wac-guess__already,
[hidden]#wac-safari-done,
[hidden]#wac-safari-already { display: none !important; }

[hidden]#wac-baggage-done,
[hidden]#wac-baggage-already { display: none !important; }

[hidden]#wac-quiz-done,
[hidden]#wac-quiz-already { display: none !important; }

.gd-flip-block {
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

#gd-flip-hint.gd-flip-block__hint {
    font-size: 1.04rem;
    line-height: 1.45;
    color: var(--wac-muted);
    margin: 0 0 14px;
    text-align: center;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.gd-map-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 22px;
    padding-bottom: 6px;
    box-sizing: border-box;
}

.gd-map-actions .gd-back-photo-btn {
    margin-bottom: 10px;
}

.gd-back-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    font-family: var(--wac-sans);
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--wac-muted);
    background: transparent;
    border: 1px solid var(--wac-line);
    border-radius: var(--wac-radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gd-back-photo-btn:hover {
    border-color: var(--wac-brand);
    color: var(--wac-brand);
    background: rgba(58, 102, 142, 0.06);
}

.wac-app--escale-themed .gd-back-photo-btn:hover {
    border-color: var(--wac-escale-color);
    color: var(--wac-escale-color);
    background: rgba(0, 0, 0, 0.04);
}

.gd-flip-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: var(--wac-radius-sm);
    padding: 11px 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.gd-flip-btn:active {
    transform: scale(0.98);
}

.gd-flip-btn--cta {
    background: linear-gradient(145deg, #3d6a92 0%, #3a668e 40%, #2c4c69 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(44, 76, 105, 0.28), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.gd-flip-btn--cta:hover {
    box-shadow: 0 6px 18px rgba(44, 76, 105, 0.34), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.gd-flip-btn__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.gd-flip-btn--cta .gd-flip-btn__icon {
    background: rgba(255, 255, 255, 0.18);
}

.gd-flip-btn__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gd-flip-btn__title {
    font-family: var(--wac-sans);
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.gd-flip-btn--cta .gd-flip-btn__title {
    color: #fff;
}

.gd-flip-btn__subtitle {
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0.92;
    line-height: 1.35;
}

.gd-flip-btn--cta .gd-flip-btn__subtitle {
    color: rgba(255, 255, 255, 0.88);
}

/* — Map container (back of card) — */
.wac-guess__map-container {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    z-index: 0;
}

.wac-guess__confirm {
    width: 100%;
    margin-bottom: 0;
}

.wac-guess__confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wac-guess__result {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    padding: 20px 20px 72px;
    box-shadow: var(--wac-shadow);
    text-align: center;
    margin-bottom: 14px;
    animation: wacFadeInUp .35s ease;
}

.wac-guess__result-distance {
    font-family: var(--wac-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wac-ink);
    margin: 0 0 6px;
}

.wac-guess__result-points {
    font-size: 1.08rem;
    color: var(--wac-brand);
    font-weight: 600;
    margin: 0 0 4px;
}

.wac-guess__result-name {
    font-family: var(--wac-serif);
    font-size: 1.32rem;
    font-weight: 600;
    color: var(--wac-ink);
    margin: 0 0 8px;
}

.wac-guess__anecdote {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 4px solid var(--wac-gold);
    background: rgba(184, 149, 110, 0.1);
    border-radius: 0 var(--wac-radius-sm) var(--wac-radius-sm) 0;
    font-family: var(--wac-serif);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--wac-ink);
    text-align: left;
}

.wac-app--escale-themed .wac-guess__anecdote {
    border-left-color: var(--wac-escale-color);
    background: rgba(255, 255, 255, 0.55);
}

.wac-guess__next {
    width: 100%;
}

.wac-guess__done,
.wac-guess__already {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    min-height: calc(100vh - 160px);
    animation: wacFadeInUp .4s ease;
}

.wac-guess__done-title {
    font-family: var(--wac-serif);
    font-size: 1.72rem;
    font-weight: 700;
    color: var(--wac-ink);
    margin: 16px 0 8px;
}

.wac-guess__done-score {
    font-family: var(--wac-mono);
    font-size: clamp(1.05rem, 4.2vw, 1.45rem);
    line-height: 1.35;
    color: var(--wac-brand);
    font-weight: 600;
    margin: 0 0 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gd-marker {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.gd-marker--guess {
    background: var(--wac-brand, #3a668e);
}
.gd-marker--truth {
    background: var(--wac-accent, #10b981);
}

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

/* ═══ Code unlock modal ═══ */
.gd-code-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(30, 51, 69, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wacFadeIn .2s ease;
}
.gd-code-overlay[hidden] { display: none !important; }

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

.gd-code-modal {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    box-shadow: var(--wac-shadow);
    padding: 28px 24px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: wacFadeInUp .3s ease;
}

.gd-code-modal__close {
    position: absolute;
    top: 10px; right: 14px;
    background: none; border: none;
    font-size: 1.4rem;
    color: var(--wac-muted);
    cursor: pointer;
    line-height: 1;
}

.gd-code-modal__icon {
    font-size: 1.6rem;
    color: var(--wac-brand);
    margin-bottom: 10px;
}

.gd-code-modal__title {
    font-family: var(--wac-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--wac-ink);
    margin: 0 0 6px;
}

.gd-code-modal__text {
    font-size: 0.85rem;
    color: var(--wac-muted);
    margin: 0 0 16px;
}

.gd-code-modal__input {
    text-align: center;
    text-transform: uppercase;
    font-family: var(--wac-mono);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.gd-code-modal__err {
    font-size: 0.8rem;
    color: var(--wac-red);
    margin: 0 0 10px;
}

.gd-code-modal__submit {
    width: 100%;
}

/* ═══ Comment jouer (avant chaque jeu) ═══ */
.wac-how-to-play-overlay {
    --wac-escale-color: var(--wac-brand);
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(30, 51, 69, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wacFadeIn 0.2s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wac-how-to-play-modal {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    box-shadow: var(--wac-shadow);
    padding: 26px 22px 22px;
    max-width: 400px;
    width: 100%;
    text-align: left;
    position: relative;
    margin: auto;
    animation: wacFadeInUp 0.3s ease;
}

.wac-how-to-play__eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wac-muted);
    margin: 0 0 6px;
    text-align: center;
}

.wac-how-to-play__title {
    font-family: var(--wac-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wac-ink);
    margin: 0 0 16px;
    text-align: center;
    line-height: 1.25;
}

.wac-how-to-play__body {
    max-height: min(52vh, 320px);
    overflow-y: auto;
    margin-bottom: 18px;
    padding-right: 4px;
}

.wac-how-to-play__p {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--wac-ink);
    margin: 0 0 12px;
}

.wac-how-to-play__p:last-child {
    margin-bottom: 0;
}

.wac-how-to-play__btn {
    width: 100%;
}

/* Bouton « C’est parti » : couleur d’escale (copiée en JS depuis .wac-app--escale-themed, car l’overlay est sur body) */
.wac-how-to-play-overlay .wac-how-to-play__btn.wac-btn--primary {
    background: var(--wac-escale-color);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

@media (hover: hover) {
    .wac-how-to-play-overlay .wac-how-to-play__btn.wac-btn--primary:hover:not(:disabled) {
        filter: brightness(1.06);
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.14) inset;
    }
}

/* ═══ Safari identification (escale 2) ═══ */
.wac-safari {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wac-safari__notebook {
    position: relative;
    padding: 1.1rem 1.15rem 1.2rem;
    border-radius: var(--wac-radius-sm);
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.95) 0%, rgba(248, 242, 232, 0.98) 100%);
    border: 1px solid rgba(90, 72, 48, 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 6px 18px rgba(62, 48, 32, 0.07);
}

.wac-safari__notebook::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(184, 149, 110, 0.45), rgba(184, 149, 110, 0.15));
    pointer-events: none;
}

.wac-safari__notebook-kicker {
    margin: 0 0 0.5rem;
    padding-left: 10px;
    font-size: 0.80rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wac-gold-dark);
}

.wac-safari__clue {
    margin: 0;
    padding-left: 10px;
    font-family: var(--wac-serif);
    font-size: 1.32rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--wac-ink);
}

.wac-safari__grid-label {
    margin: 0.15rem 0 0;
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--wac-muted);
    text-align: center;
}

.wac-safari__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-bottom: 72px;
}

.wac-safari__opt {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: center;
    border-radius: var(--wac-radius-sm);
    -webkit-tap-highlight-color: transparent;
}

.wac-safari__opt-frame {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 8px rgba(44, 76, 105, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    aspect-ratio: 1;
    position: relative;
}

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

.wac-safari__opt-caption {
    font-family: var(--wac-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wac-muted);
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 0 1px;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
}

.wac-safari__opt--picked .wac-safari__opt-frame {
    border-color: var(--wac-brand);
    border-width: 4px;
    box-shadow: 0 0 0 3px rgba(58, 102, 142, 0.35), 0 6px 20px rgba(58, 102, 142, 0.25);
    transform: scale(1.04);
}

.wac-safari__opt--picked .wac-safari__opt-caption {
    color: var(--wac-brand);
    font-weight: 700;
}

.wac-safari__opt--picked .wac-safari__opt-frame::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--wac-brand);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 2;
    animation: wacFadeIn 0.2s ease;
}

.wac-app--escale-themed .wac-safari__opt--picked .wac-safari__opt-frame::after {
    background: var(--wac-escale-color);
}

.wac-safari__opt--solution .wac-safari__opt-frame {
    border-color: var(--wac-accent);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.wac-safari__opt--wrong .wac-safari__opt-frame {
    border-color: var(--wac-red);
    opacity: 0.92;
}

.wac-safari__opt:disabled {
    cursor: default;
    opacity: 1;
}

.wac-floating-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px max(18px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-right));
    background: linear-gradient(to top, rgba(253, 252, 250, 0.97) 60%, rgba(253, 252, 250, 0) 100%);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s 0.3s;
    pointer-events: none;
}

.wac-floating-actions--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, visibility 0s 0s;
    pointer-events: auto;
}

.wac-floating-actions .wac-btn {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    display: block;
}

.wac-safari__feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 8px 0 4px;
    animation: wacFadeInUp 0.35s ease;
}

.wac-safari__feedback-msg {
    margin: 0;
    font-family: var(--wac-serif);
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.35;
}

.wac-safari__feedback--ok .wac-safari__feedback-msg {
    color: #1d6b4a;
}

.wac-safari__feedback--err .wac-safari__feedback-msg {
    color: var(--wac-red);
}

.wac-safari__feedback-pts {
    margin: -4px 0 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--wac-muted);
}

.wac-safari__anecdote {
    margin: 0;
    width: 100%;
    max-width: 320px;
    padding: 10px 12px;
    border-left: 4px solid var(--wac-gold);
    background: rgba(184, 149, 110, 0.1);
    border-radius: 0 var(--wac-radius-sm) var(--wac-radius-sm) 0;
    font-family: var(--wac-serif);
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--wac-ink);
    text-align: left;
}

.wac-app--escale-themed .wac-safari__anecdote {
    border-left-color: var(--wac-escale-color);
    background: rgba(255, 255, 255, 0.55);
}

.wac-safari__continue {
    width: 100%;
    max-width: 320px;
}

/* Pop-up résultat Safari (manche) */
.wac-safari-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(30, 51, 69, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wacFadeIn 0.2s ease;
}

.wac-safari-result-overlay[hidden] {
    display: none !important;
}

.wac-safari-result-modal {
    background: var(--wac-panel);
    border-radius: var(--wac-radius);
    box-shadow: var(--wac-shadow);
    padding: 24px 22px 22px;
    max-width: 360px;
    width: 100%;
    position: relative;
    animation: wacFadeInUp 0.3s ease;
    outline: none;
}

.wac-app--escale-themed .wac-safari-result-modal {
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.wac-safari-result-modal .wac-safari__feedback {
    padding: 4px 0 0;
    gap: 14px;
}

.wac-safari-result-modal .wac-safari__anecdote {
    text-align: left;
}

/* ═══ Inspection bagages (escale 3) — aligné Safari / escale ═══ */
#wac-baggage-root {
    margin-top: 14px;
    padding-top: 4px;
}

.wac-baggage-suitcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 8px;
    width: 112px;
}

.wac-baggage-suitcase__handle {
    width: 36px;
    height: 14px;
    border: 3px solid rgba(90, 72, 48, 0.35);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    margin-bottom: -2px;
}

.wac-baggage-suitcase__body {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 0.72;
    border-radius: 14px;
    background: linear-gradient(160deg, #d4a84b 0%, #b8893a 45%, #9a7028 100%);
    border: 3px solid rgba(74, 60, 42, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 8px 22px rgba(62, 48, 32, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wac-baggage-suitcase__num {
    font-family: var(--wac-mono);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(255, 252, 246, 0.95);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.wac-baggage-bag-tag {
    margin: 0 0 8px;
    text-align: center;
    font-family: var(--wac-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--wac-muted);
}

.wac-baggage-object-name {
    margin: 0 0 18px;
    padding: 0 10px;
    text-align: center;
    font-family: var(--wac-serif);
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--wac-ink);
}

.wac-baggage-bag-tag + .wac-baggage-question {
    margin-top: 10px;
}

.wac-baggage-intro {
    margin: 0 0 16px;
    font-family: var(--wac-serif);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--wac-ink);
    text-align: center;
}

.wac-baggage-question {
    margin: 0 0 14px;
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--wac-muted);
    text-align: center;
    line-height: 1.35;
}

.wac-baggage-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 72px;
}

.wac-baggage-grid--continent {
    grid-template-columns: 1fr;
}

@media (min-width: 400px) {
    .wac-baggage-grid--continent {
        grid-template-columns: 1fr 1fr;
    }
}

.wac-baggage-grid--countries {
    grid-template-columns: 1fr 1fr;
}

.wac-baggage-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: var(--wac-radius-sm);
    border: 2px solid rgba(44, 76, 105, 0.12);
    background: var(--wac-panel);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--wac-ink);
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.wac-baggage-choice:hover {
    border-color: rgba(58, 102, 142, 0.28);
    background: rgba(58, 102, 142, 0.04);
}

.wac-baggage-choice--picked {
    border-color: var(--wac-brand);
    box-shadow: 0 0 0 2px rgba(58, 102, 142, 0.15);
    background: rgba(58, 102, 142, 0.06);
}

.wac-app--escale-themed .wac-baggage-choice--picked {
    border-color: var(--wac-escale-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.92);
}

.wac-baggage-actions {
    margin-top: 0;
}

.wac-baggage-actions .wac-btn {
    width: 100%;
}

.wac-baggage-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px 0 8px;
    animation: wacFadeInUp 0.35s ease;
}

.wac-baggage-fb-title {
    margin: 0 0 4px;
    font-family: var(--wac-serif);
    font-size: 1.32rem;
    font-weight: 700;
    text-align: center;
    color: var(--wac-ink);
}

.wac-baggage-fb-line {
    margin: 0;
    font-size: 1.04rem;
    font-weight: 600;
    text-align: center;
}

.wac-baggage-fb-line--ok {
    color: #1d6b4a;
}

.wac-baggage-fb-line--bad {
    color: var(--wac-red);
}

.wac-baggage-fb-line--skip {
    color: var(--wac-muted);
    font-style: italic;
}

.wac-baggage-fb-total {
    margin: 2px 0 0;
    font-size: 1.08rem;
    text-align: center;
    color: var(--wac-ink);
}

.wac-baggage-reveal {
    margin: 14px 0 4px;
    width: 100%;
    max-width: 360px;
    padding: 12px 14px;
    box-sizing: border-box;
    border-radius: var(--wac-radius-sm);
    background: rgba(44, 76, 105, 0.06);
    font-family: var(--wac-serif);
    font-size: 1.16rem;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
    color: var(--wac-ink);
}

.wac-app--escale-themed .wac-baggage-reveal {
    background: rgba(255, 255, 255, 0.65);
}

.wac-baggage-next {
    margin-top: 6px;
    width: 100%;
    max-width: 320px;
    align-self: center;
}
